@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,183 +1,210 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { getIcon, loadIcons } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Injectable, PLATFORM_ID, inject, input, signal } from "@angular/core";
|
|
3
|
+
import { isPlatformBrowser } from "@angular/common";
|
|
4
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
5
|
+
import { v7 } from "uuid";
|
|
6
|
+
import { getIcon, loadIcons } from "iconify-icon";
|
|
7
|
+
var IconRegistry = class IconRegistry {
|
|
8
|
+
_platformId = inject(PLATFORM_ID);
|
|
9
|
+
_cache = /* @__PURE__ */ new Map();
|
|
10
|
+
_pending = /* @__PURE__ */ new Map();
|
|
11
|
+
_queue = /* @__PURE__ */ new Map();
|
|
12
|
+
_flushQueued = false;
|
|
13
|
+
get(name) {
|
|
14
|
+
const cached = this._cache.get(name);
|
|
15
|
+
if (cached) return Promise.resolve(cached);
|
|
16
|
+
const iconifyCached = getIcon(name);
|
|
17
|
+
if (iconifyCached) {
|
|
18
|
+
this._cache.set(name, iconifyCached);
|
|
19
|
+
return Promise.resolve(iconifyCached);
|
|
20
|
+
}
|
|
21
|
+
if (!isPlatformBrowser(this._platformId)) return Promise.reject(/* @__PURE__ */ new Error(`Icon "${name}" is not available during server rendering.`));
|
|
22
|
+
const pending = this._pending.get(name);
|
|
23
|
+
if (pending) return pending;
|
|
24
|
+
const promise = new Promise((resolve, reject) => {
|
|
25
|
+
const queued = this._queue.get(name);
|
|
26
|
+
if (queued) queued.push({
|
|
27
|
+
resolve,
|
|
28
|
+
reject
|
|
29
|
+
});
|
|
30
|
+
else this._queue.set(name, [{
|
|
31
|
+
resolve,
|
|
32
|
+
reject
|
|
33
|
+
}]);
|
|
34
|
+
});
|
|
35
|
+
this._pending.set(name, promise);
|
|
36
|
+
this._scheduleFlush();
|
|
37
|
+
return promise;
|
|
38
|
+
}
|
|
39
|
+
clear() {
|
|
40
|
+
this._cache.clear();
|
|
41
|
+
this._pending.clear();
|
|
42
|
+
this._queue.clear();
|
|
43
|
+
this._flushQueued = false;
|
|
44
|
+
}
|
|
45
|
+
_scheduleFlush() {
|
|
46
|
+
if (this._flushQueued) return;
|
|
47
|
+
this._flushQueued = true;
|
|
48
|
+
queueMicrotask(() => this._flush());
|
|
49
|
+
}
|
|
50
|
+
_flush() {
|
|
51
|
+
this._flushQueued = false;
|
|
52
|
+
const names = Array.from(this._queue.keys());
|
|
53
|
+
if (!names.length) return;
|
|
54
|
+
loadIcons(names, (loaded, missing, pending) => {
|
|
55
|
+
loaded.forEach((icon) => this._resolve(this._serializeName(icon)));
|
|
56
|
+
missing.forEach((icon) => this._reject(this._serializeName(icon), /* @__PURE__ */ new Error(`Icon "${this._serializeName(icon)}" not found.`)));
|
|
57
|
+
if (!pending.length) names.forEach((name) => {
|
|
58
|
+
if (this._queue.has(name)) this._reject(name, /* @__PURE__ */ new Error(`Icon "${name}" was not loaded.`));
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
_resolve(name) {
|
|
63
|
+
const icon = getIcon(name);
|
|
64
|
+
if (!icon) {
|
|
65
|
+
this._reject(name, /* @__PURE__ */ new Error(`Icon "${name}" was loaded but no data was returned.`));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this._cache.set(name, icon);
|
|
69
|
+
this._pending.delete(name);
|
|
70
|
+
const queued = this._queue.get(name) ?? [];
|
|
71
|
+
this._queue.delete(name);
|
|
72
|
+
queued.forEach((item) => item.resolve(icon));
|
|
73
|
+
}
|
|
74
|
+
_reject(name, reason) {
|
|
75
|
+
this._pending.delete(name);
|
|
76
|
+
const queued = this._queue.get(name) ?? [];
|
|
77
|
+
this._queue.delete(name);
|
|
78
|
+
queued.forEach((item) => item.reject(reason));
|
|
79
|
+
}
|
|
80
|
+
_serializeName(icon) {
|
|
81
|
+
return `${icon.provider ? `@${icon.provider}:` : ""}${icon.prefix}:${icon.name}`;
|
|
82
|
+
}
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
84
|
+
minVersion: "12.0.0",
|
|
85
|
+
version: "22.3.0",
|
|
86
|
+
ngImport: i0,
|
|
87
|
+
type: IconRegistry,
|
|
88
|
+
deps: [],
|
|
89
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
90
|
+
});
|
|
91
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
92
|
+
minVersion: "12.0.0",
|
|
93
|
+
version: "22.3.0",
|
|
94
|
+
ngImport: i0,
|
|
95
|
+
type: IconRegistry,
|
|
96
|
+
providedIn: "root"
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.3.0",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: IconRegistry,
|
|
104
|
+
decorators: [{
|
|
105
|
+
type: Injectable,
|
|
106
|
+
args: [{ providedIn: "root" }]
|
|
107
|
+
}]
|
|
108
|
+
});
|
|
109
|
+
var Icon = class Icon {
|
|
110
|
+
_sanitizer = inject(DomSanitizer);
|
|
111
|
+
_iconRegistry = inject(IconRegistry);
|
|
112
|
+
_iconHtml = signal(null, ...ngDevMode ? [{ debugName: "_iconHtml" }] : /* istanbul ignore next */ []);
|
|
113
|
+
name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
114
|
+
loaded = false;
|
|
115
|
+
loadId = 0;
|
|
116
|
+
async ngOnInit() {
|
|
117
|
+
await this._loadIcon();
|
|
118
|
+
}
|
|
119
|
+
async ngOnChanges(changes) {
|
|
120
|
+
if (changes["name"] && !changes["name"].isFirstChange()) {
|
|
121
|
+
if (changes["name"].previousValue === changes["name"].currentValue) return;
|
|
122
|
+
this.loaded = false;
|
|
123
|
+
await this._loadIcon();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
async _loadIcon() {
|
|
127
|
+
if (this.loaded) return;
|
|
128
|
+
const name = this.name();
|
|
129
|
+
const loadId = ++this.loadId;
|
|
130
|
+
if (!name) {
|
|
131
|
+
this.loaded = true;
|
|
132
|
+
this._iconHtml.set(null);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const data = await this._iconRegistry.get(name).catch(() => null);
|
|
136
|
+
if (loadId !== this.loadId || !data) return;
|
|
137
|
+
let body = data.body;
|
|
138
|
+
const allIdMatches = [...body.matchAll(/id="([^"]+)"/g)];
|
|
139
|
+
if (allIdMatches.length > 0) {
|
|
140
|
+
const idMap = /* @__PURE__ */ new Map();
|
|
141
|
+
allIdMatches.forEach((match) => {
|
|
142
|
+
idMap.set(match[1], v7());
|
|
143
|
+
});
|
|
144
|
+
idMap.forEach((nextId, previousId) => {
|
|
145
|
+
body = body.replaceAll(`id="${previousId}"`, `id="${nextId}"`).replaceAll(`url(#${previousId})`, `url(#${nextId})`).replaceAll(`href="#${previousId}"`, `href="#${nextId}"`).replaceAll(`xlink:href="#${previousId}"`, `xlink:href="#${nextId}"`);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
const iconHtml = `<svg viewBox="0 0 ${data.width} ${data.height}">${body}</svg>`;
|
|
149
|
+
this._iconHtml.set(this._sanitizer.bypassSecurityTrustHtml(iconHtml));
|
|
150
|
+
this.loaded = true;
|
|
151
|
+
}
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
153
|
+
minVersion: "12.0.0",
|
|
154
|
+
version: "22.3.0",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: Icon,
|
|
157
|
+
deps: [],
|
|
158
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
159
|
+
});
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
161
|
+
minVersion: "17.1.0",
|
|
162
|
+
version: "22.3.0",
|
|
163
|
+
type: Icon,
|
|
164
|
+
isStandalone: true,
|
|
165
|
+
selector: "ngs-icon",
|
|
166
|
+
inputs: { name: {
|
|
167
|
+
classPropertyName: "name",
|
|
168
|
+
publicName: "name",
|
|
169
|
+
isSignal: true,
|
|
170
|
+
isRequired: true,
|
|
171
|
+
transformFunction: null
|
|
172
|
+
} },
|
|
173
|
+
host: { classAttribute: "ngs-icon" },
|
|
174
|
+
exportAs: ["ngsIcon"],
|
|
175
|
+
usesOnChanges: true,
|
|
176
|
+
ngImport: i0,
|
|
177
|
+
template: "<span [innerHTML]=\"_iconHtml()\" style=\"display: contents\"></span>",
|
|
178
|
+
isInline: true,
|
|
179
|
+
styles: [":host{display:inline-flex;flex:none;align-items:center;justify-content:center;line-height:0}:host svg{flex:none}:host:not([class*=text-]){color:var(--ngs-icon-color)}:host:not([class*=w-]):not([class*=size-]){width:var(--ngs-icon-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--ngs-icon-size)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
180
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
184
|
+
minVersion: "12.0.0",
|
|
185
|
+
version: "22.3.0",
|
|
186
|
+
ngImport: i0,
|
|
187
|
+
type: Icon,
|
|
188
|
+
decorators: [{
|
|
189
|
+
type: Component,
|
|
190
|
+
args: [{
|
|
191
|
+
selector: "ngs-icon",
|
|
192
|
+
exportAs: "ngsIcon",
|
|
193
|
+
template: "<span [innerHTML]=\"_iconHtml()\" style=\"display: contents\"></span>",
|
|
194
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
195
|
+
host: { "class": "ngs-icon" },
|
|
196
|
+
styles: [":host{display:inline-flex;flex:none;align-items:center;justify-content:center;line-height:0}:host svg{flex:none}:host:not([class*=text-]){color:var(--ngs-icon-color)}:host:not([class*=w-]):not([class*=size-]){width:var(--ngs-icon-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--ngs-icon-size)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
197
|
+
}]
|
|
198
|
+
}],
|
|
199
|
+
propDecorators: { name: [{
|
|
200
|
+
type: i0.Input,
|
|
201
|
+
args: [{
|
|
202
|
+
isSignal: true,
|
|
203
|
+
alias: "name",
|
|
204
|
+
required: true
|
|
205
|
+
}]
|
|
206
|
+
}] }
|
|
207
|
+
});
|
|
182
208
|
export { Icon, IconRegistry };
|
|
183
|
-
|
|
209
|
+
|
|
210
|
+
//# sourceMappingURL=ngstarter-ui-components-icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-icon.mjs","sources":["../../../projects/components/icon/src/icon-registry.ts","../../../projects/components/icon/src/icon/icon.ts","../../../projects/components/icon/ngstarter-ui-components-icon.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { getIcon, IconifyIconName, loadIcons } from 'iconify-icon';\n\nexport type IconData = NonNullable<ReturnType<typeof getIcon>>;\n\ninterface QueuedIcon {\n resolve: (icon: IconData) => void;\n reject: (reason?: unknown) => void;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconRegistry {\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _cache = new Map<string, IconData>();\n private readonly _pending = new Map<string, Promise<IconData>>();\n private readonly _queue = new Map<string, QueuedIcon[]>();\n private _flushQueued = false;\n\n get(name: string): Promise<IconData> {\n const cached = this._cache.get(name);\n\n if (cached) {\n return Promise.resolve(cached);\n }\n\n const iconifyCached = getIcon(name);\n\n if (iconifyCached) {\n this._cache.set(name, iconifyCached);\n return Promise.resolve(iconifyCached);\n }\n\n // Iconify's fallback loader uses fetch(). During server rendering, Node's\n // HTTP client can keep Angular unstable with connection timers while a\n // remote icon request is pending. Cached/preloaded icons are still\n // returned above; uncached icons are loaded after hydration in the browser.\n if (!isPlatformBrowser(this._platformId)) {\n return Promise.reject(new Error(`Icon \"${name}\" is not available during server rendering.`));\n }\n\n const pending = this._pending.get(name);\n\n if (pending) {\n return pending;\n }\n\n const promise = new Promise<IconData>((resolve, reject) => {\n const queued = this._queue.get(name);\n\n if (queued) {\n queued.push({ resolve, reject });\n } else {\n this._queue.set(name, [{ resolve, reject }]);\n }\n });\n\n this._pending.set(name, promise);\n this._scheduleFlush();\n\n return promise;\n }\n\n clear(): void {\n this._cache.clear();\n this._pending.clear();\n this._queue.clear();\n this._flushQueued = false;\n }\n\n private _scheduleFlush(): void {\n if (this._flushQueued) {\n return;\n }\n\n this._flushQueued = true;\n queueMicrotask(() => this._flush());\n }\n\n private _flush(): void {\n this._flushQueued = false;\n\n const names = Array.from(this._queue.keys());\n\n if (!names.length) {\n return;\n }\n\n loadIcons(names, (loaded, missing, pending) => {\n loaded.forEach(icon => this._resolve(this._serializeName(icon)));\n missing.forEach(icon => this._reject(this._serializeName(icon), new Error(`Icon \"${this._serializeName(icon)}\" not found.`)));\n\n if (!pending.length) {\n names.forEach(name => {\n if (this._queue.has(name)) {\n this._reject(name, new Error(`Icon \"${name}\" was not loaded.`));\n }\n });\n }\n });\n }\n\n private _resolve(name: string): void {\n const icon = getIcon(name);\n\n if (!icon) {\n this._reject(name, new Error(`Icon \"${name}\" was loaded but no data was returned.`));\n return;\n }\n\n this._cache.set(name, icon);\n this._pending.delete(name);\n\n const queued = this._queue.get(name) ?? [];\n this._queue.delete(name);\n queued.forEach(item => item.resolve(icon));\n }\n\n private _reject(name: string, reason: unknown): void {\n this._pending.delete(name);\n\n const queued = this._queue.get(name) ?? [];\n this._queue.delete(name);\n queued.forEach(item => item.reject(reason));\n }\n\n private _serializeName(icon: IconifyIconName): string {\n const provider = icon.provider ? `@${icon.provider}:` : '';\n\n return `${provider}${icon.prefix}:${icon.name}`;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n OnChanges,\n OnInit,\n signal,\n SimpleChanges\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { v7 as uuid } from 'uuid';\nimport { IconRegistry } from '../icon-registry';\n\n@Component({\n selector: 'ngs-icon',\n exportAs: 'ngsIcon',\n template: '<span [innerHTML]=\"_iconHtml()\" style=\"display: contents\"></span>',\n styleUrl: './icon.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'ngs-icon',\n }\n})\nexport class Icon implements OnInit, OnChanges {\n private _sanitizer = inject(DomSanitizer);\n private _iconRegistry = inject(IconRegistry);\n protected _iconHtml = signal<SafeHtml | null>(null);\n\n name = input.required<string>();\n\n private loaded = false;\n private loadId = 0;\n\n async ngOnInit() {\n await this._loadIcon();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes['name'] && !changes['name'].isFirstChange()) {\n if (changes['name'].previousValue === changes['name'].currentValue) {\n return;\n }\n\n this.loaded = false;\n await this._loadIcon();\n }\n }\n\n private async _loadIcon() {\n if (this.loaded) {\n return;\n }\n\n const name = this.name();\n const loadId = ++this.loadId;\n\n if (!name) {\n this.loaded = true;\n this._iconHtml.set(null);\n return;\n }\n\n const data = await this._iconRegistry.get(name).catch(() => null);\n\n if (loadId !== this.loadId || !data) {\n return;\n }\n\n let body = data.body;\n\n // If svg icon has mask of defs with id, we need to replace to unique id\n // because the same icons can be used on the same page and use the same id, which can cause problems.\n const allIdMatches = [...body.matchAll(/id=\"([^\"]+)\"/g)];\n\n if (allIdMatches.length > 0) {\n const idMap = new Map<string, string>();\n\n allIdMatches.forEach(match => {\n idMap.set(match[1], uuid());\n });\n\n idMap.forEach((nextId, previousId) => {\n body = body\n .replaceAll(`id=\"${previousId}\"`, `id=\"${nextId}\"`)\n .replaceAll(`url(#${previousId})`, `url(#${nextId})`)\n .replaceAll(`href=\"#${previousId}\"`, `href=\"#${nextId}\"`)\n .replaceAll(`xlink:href=\"#${previousId}\"`, `xlink:href=\"#${nextId}\"`);\n });\n }\n\n const iconHtml = `<svg viewBox=\"0 0 ${data.width} ${data.height}\">${body}</svg>`;\n this._iconHtml.set(this._sanitizer.bypassSecurityTrustHtml(iconHtml));\n this.loaded = true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid"],"mappings":";;;;;;;MAca,YAAY,CAAA;AACN,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,MAAM,GAAG,IAAI,GAAG,EAAoB;AACpC,IAAA,QAAQ,GAAG,IAAI,GAAG,EAA6B;AAC/C,IAAA,MAAM,GAAG,IAAI,GAAG,EAAwB;IACjD,YAAY,GAAG,KAAK;AAE5B,IAAA,GAAG,CAAC,IAAY,EAAA;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QAEpC,IAAI,MAAM,EAAE;AACV,YAAA,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC;AAEA,QAAA,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;QAEnC,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC;AACpC,YAAA,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;QACvC;;;;;QAMA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACxC,YAAA,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAA,MAAA,EAAS,IAAI,CAAA,2CAAA,CAA6C,CAAC,CAAC;QAC9F;QAEA,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;QAEvC,IAAI,OAAO,EAAE;AACX,YAAA,OAAO,OAAO;QAChB;QAEA,MAAM,OAAO,GAAG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mEAAmE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,0XAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAOlE,IAAI,EAAA,UAAA,EAAA,CAAA;kBAVhB,SAAS;+BACE,UAAU,EAAA,QAAA,EACV,SAAS,EAAA,QAAA,EACT,mEAAmE,mBAE5D,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,UAAU;AACpB,qBAAA,EAAA,MAAA,EAAA,CAAA,0XAAA,CAAA,EAAA;;;ACtBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-icon.mjs","names":["uuid"],"sources":["../../../projects/components/icon/src/icon-registry.ts","../../../projects/components/icon/src/icon/icon.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { getIcon, IconifyIconName, loadIcons } from 'iconify-icon';\n\nexport type IconData = NonNullable<ReturnType<typeof getIcon>>;\n\ninterface QueuedIcon {\n resolve: (icon: IconData) => void;\n reject: (reason?: unknown) => void;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconRegistry {\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _cache = new Map<string, IconData>();\n private readonly _pending = new Map<string, Promise<IconData>>();\n private readonly _queue = new Map<string, QueuedIcon[]>();\n private _flushQueued = false;\n\n get(name: string): Promise<IconData> {\n const cached = this._cache.get(name);\n\n if (cached) {\n return Promise.resolve(cached);\n }\n\n const iconifyCached = getIcon(name);\n\n if (iconifyCached) {\n this._cache.set(name, iconifyCached);\n return Promise.resolve(iconifyCached);\n }\n\n // Iconify's fallback loader uses fetch(). During server rendering, Node's\n // HTTP client can keep Angular unstable with connection timers while a\n // remote icon request is pending. Cached/preloaded icons are still\n // returned above; uncached icons are loaded after hydration in the browser.\n if (!isPlatformBrowser(this._platformId)) {\n return Promise.reject(new Error(`Icon \"${name}\" is not available during server rendering.`));\n }\n\n const pending = this._pending.get(name);\n\n if (pending) {\n return pending;\n }\n\n const promise = new Promise<IconData>((resolve, reject) => {\n const queued = this._queue.get(name);\n\n if (queued) {\n queued.push({ resolve, reject });\n } else {\n this._queue.set(name, [{ resolve, reject }]);\n }\n });\n\n this._pending.set(name, promise);\n this._scheduleFlush();\n\n return promise;\n }\n\n clear(): void {\n this._cache.clear();\n this._pending.clear();\n this._queue.clear();\n this._flushQueued = false;\n }\n\n private _scheduleFlush(): void {\n if (this._flushQueued) {\n return;\n }\n\n this._flushQueued = true;\n queueMicrotask(() => this._flush());\n }\n\n private _flush(): void {\n this._flushQueued = false;\n\n const names = Array.from(this._queue.keys());\n\n if (!names.length) {\n return;\n }\n\n loadIcons(names, (loaded, missing, pending) => {\n loaded.forEach(icon => this._resolve(this._serializeName(icon)));\n missing.forEach(icon => this._reject(this._serializeName(icon), new Error(`Icon \"${this._serializeName(icon)}\" not found.`)));\n\n if (!pending.length) {\n names.forEach(name => {\n if (this._queue.has(name)) {\n this._reject(name, new Error(`Icon \"${name}\" was not loaded.`));\n }\n });\n }\n });\n }\n\n private _resolve(name: string): void {\n const icon = getIcon(name);\n\n if (!icon) {\n this._reject(name, new Error(`Icon \"${name}\" was loaded but no data was returned.`));\n return;\n }\n\n this._cache.set(name, icon);\n this._pending.delete(name);\n\n const queued = this._queue.get(name) ?? [];\n this._queue.delete(name);\n queued.forEach(item => item.resolve(icon));\n }\n\n private _reject(name: string, reason: unknown): void {\n this._pending.delete(name);\n\n const queued = this._queue.get(name) ?? [];\n this._queue.delete(name);\n queued.forEach(item => item.reject(reason));\n }\n\n private _serializeName(icon: IconifyIconName): string {\n const provider = icon.provider ? `@${icon.provider}:` : '';\n\n return `${provider}${icon.prefix}:${icon.name}`;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n OnChanges,\n OnInit,\n signal,\n SimpleChanges\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { v7 as uuid } from 'uuid';\nimport { IconRegistry } from '../icon-registry';\n\n@Component({\n selector: 'ngs-icon',\n exportAs: 'ngsIcon',\n template: '<span [innerHTML]=\"_iconHtml()\" style=\"display: contents\"></span>',\n styleUrl: './icon.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'ngs-icon',\n }\n})\nexport class Icon implements OnInit, OnChanges {\n private _sanitizer = inject(DomSanitizer);\n private _iconRegistry = inject(IconRegistry);\n protected _iconHtml = signal<SafeHtml | null>(null);\n\n name = input.required<string>();\n\n private loaded = false;\n private loadId = 0;\n\n async ngOnInit() {\n await this._loadIcon();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes['name'] && !changes['name'].isFirstChange()) {\n if (changes['name'].previousValue === changes['name'].currentValue) {\n return;\n }\n\n this.loaded = false;\n await this._loadIcon();\n }\n }\n\n private async _loadIcon() {\n if (this.loaded) {\n return;\n }\n\n const name = this.name();\n const loadId = ++this.loadId;\n\n if (!name) {\n this.loaded = true;\n this._iconHtml.set(null);\n return;\n }\n\n const data = await this._iconRegistry.get(name).catch(() => null);\n\n if (loadId !== this.loadId || !data) {\n return;\n }\n\n let body = data.body;\n\n // If svg icon has mask of defs with id, we need to replace to unique id\n // because the same icons can be used on the same page and use the same id, which can cause problems.\n const allIdMatches = [...body.matchAll(/id=\"([^\"]+)\"/g)];\n\n if (allIdMatches.length > 0) {\n const idMap = new Map<string, string>();\n\n allIdMatches.forEach(match => {\n idMap.set(match[1], uuid());\n });\n\n idMap.forEach((nextId, previousId) => {\n body = body\n .replaceAll(`id=\"${previousId}\"`, `id=\"${nextId}\"`)\n .replaceAll(`url(#${previousId})`, `url(#${nextId})`)\n .replaceAll(`href=\"#${previousId}\"`, `href=\"#${nextId}\"`)\n .replaceAll(`xlink:href=\"#${previousId}\"`, `xlink:href=\"#${nextId}\"`);\n });\n }\n\n const iconHtml = `<svg viewBox=\"0 0 ${data.width} ${data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