@fragiola/primitives-angular 0.0.0-stage → 0.1.0
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/CHANGELOG.md +67 -0
- package/LICENSE +21 -0
- package/README.md +54 -2
- package/fesm2022/fragiola-primitives-angular-accordion.mjs +567 -0
- package/fesm2022/fragiola-primitives-angular-accordion.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-alert-dialog.mjs +562 -0
- package/fesm2022/fragiola-primitives-angular-alert-dialog.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-aspect-ratio.mjs +79 -0
- package/fesm2022/fragiola-primitives-angular-aspect-ratio.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-async-list.mjs +44 -0
- package/fesm2022/fragiola-primitives-angular-async-list.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-autocomplete-virtual.mjs +243 -0
- package/fesm2022/fragiola-primitives-angular-autocomplete-virtual.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-autocomplete.mjs +1751 -0
- package/fesm2022/fragiola-primitives-angular-autocomplete.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-avatar.mjs +308 -0
- package/fesm2022/fragiola-primitives-angular-avatar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-breadcrumbs.mjs +355 -0
- package/fesm2022/fragiola-primitives-angular-breadcrumbs.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-button.mjs +156 -0
- package/fesm2022/fragiola-primitives-angular-button.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-calendar-preset.mjs +126 -0
- package/fesm2022/fragiola-primitives-angular-calendar-preset.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-calendar-view.mjs +289 -0
- package/fesm2022/fragiola-primitives-angular-calendar-view.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-calendar.mjs +1222 -0
- package/fesm2022/fragiola-primitives-angular-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-carousel.mjs +1031 -0
- package/fesm2022/fragiola-primitives-angular-carousel.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-cascade-select.mjs +1391 -0
- package/fesm2022/fragiola-primitives-angular-cascade-select.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-checkbox-group.mjs +221 -0
- package/fesm2022/fragiola-primitives-angular-checkbox-group.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-checkbox.mjs +474 -0
- package/fesm2022/fragiola-primitives-angular-checkbox.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-clipboard.mjs +389 -0
- package/fesm2022/fragiola-primitives-angular-clipboard.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-collapsible.mjs +314 -0
- package/fesm2022/fragiola-primitives-angular-collapsible.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-area.mjs +609 -0
- package/fesm2022/fragiola-primitives-angular-color-area.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-field.mjs +675 -0
- package/fesm2022/fragiola-primitives-angular-color-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-picker-popover.mjs +572 -0
- package/fesm2022/fragiola-primitives-angular-color-picker-popover.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-picker.mjs +528 -0
- package/fesm2022/fragiola-primitives-angular-color-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-slider.mjs +868 -0
- package/fesm2022/fragiola-primitives-angular-color-slider.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-swatch-picker.mjs +503 -0
- package/fesm2022/fragiola-primitives-angular-color-swatch-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-swatch.mjs +141 -0
- package/fesm2022/fragiola-primitives-angular-color-swatch.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-color-wheel.mjs +554 -0
- package/fesm2022/fragiola-primitives-angular-color-wheel.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-combobox-virtual.mjs +247 -0
- package/fesm2022/fragiola-primitives-angular-combobox-virtual.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-combobox.mjs +2083 -0
- package/fesm2022/fragiola-primitives-angular-combobox.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-command-virtual.mjs +263 -0
- package/fesm2022/fragiola-primitives-angular-command-virtual.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-command.mjs +977 -0
- package/fesm2022/fragiola-primitives-angular-command.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-context-menu.mjs +1012 -0
- package/fesm2022/fragiola-primitives-angular-context-menu.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-date-field.mjs +1030 -0
- package/fesm2022/fragiola-primitives-angular-date-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-date-picker-input.mjs +511 -0
- package/fesm2022/fragiola-primitives-angular-date-picker-input.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-date-picker.mjs +991 -0
- package/fesm2022/fragiola-primitives-angular-date-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-date-range-field.mjs +847 -0
- package/fesm2022/fragiola-primitives-angular-date-range-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-date-range-picker-input.mjs +260 -0
- package/fesm2022/fragiola-primitives-angular-date-range-picker-input.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-date-range-picker.mjs +128 -0
- package/fesm2022/fragiola-primitives-angular-date-range-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-dialog.mjs +1076 -0
- package/fesm2022/fragiola-primitives-angular-dialog.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-direction.mjs +82 -0
- package/fesm2022/fragiola-primitives-angular-direction.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-drawer.mjs +890 -0
- package/fesm2022/fragiola-primitives-angular-drawer.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-drop-zone.mjs +189 -0
- package/fesm2022/fragiola-primitives-angular-drop-zone.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-editable.mjs +955 -0
- package/fesm2022/fragiola-primitives-angular-editable.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-field.mjs +929 -0
- package/fesm2022/fragiola-primitives-angular-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-fieldset.mjs +164 -0
- package/fesm2022/fragiola-primitives-angular-fieldset.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-file-upload.mjs +1370 -0
- package/fesm2022/fragiola-primitives-angular-file-upload.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-form.mjs +162 -0
- package/fesm2022/fragiola-primitives-angular-form.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-hover-card.mjs +906 -0
- package/fesm2022/fragiola-primitives-angular-hover-card.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-internal.mjs +980 -0
- package/fesm2022/fragiola-primitives-angular-internal.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-label.mjs +65 -0
- package/fesm2022/fragiola-primitives-angular-label.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-link.mjs +109 -0
- package/fesm2022/fragiola-primitives-angular-link.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-listbox-virtual.mjs +657 -0
- package/fesm2022/fragiola-primitives-angular-listbox-virtual.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-listbox.mjs +851 -0
- package/fesm2022/fragiola-primitives-angular-listbox.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-menu.mjs +2258 -0
- package/fesm2022/fragiola-primitives-angular-menu.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-menubar.mjs +303 -0
- package/fesm2022/fragiola-primitives-angular-menubar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-meter.mjs +410 -0
- package/fesm2022/fragiola-primitives-angular-meter.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-month-calendar.mjs +1066 -0
- package/fesm2022/fragiola-primitives-angular-month-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-month-picker.mjs +514 -0
- package/fesm2022/fragiola-primitives-angular-month-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-month-range-calendar.mjs +163 -0
- package/fesm2022/fragiola-primitives-angular-month-range-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-month-range-picker.mjs +177 -0
- package/fesm2022/fragiola-primitives-angular-month-range-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-multiple-calendar.mjs +216 -0
- package/fesm2022/fragiola-primitives-angular-multiple-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-navigation-menu.mjs +1413 -0
- package/fesm2022/fragiola-primitives-angular-navigation-menu.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-number-field.mjs +1210 -0
- package/fesm2022/fragiola-primitives-angular-number-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-otp-field.mjs +751 -0
- package/fesm2022/fragiola-primitives-angular-otp-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-pagination.mjs +758 -0
- package/fesm2022/fragiola-primitives-angular-pagination.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-password-input.mjs +542 -0
- package/fesm2022/fragiola-primitives-angular-password-input.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-popover.mjs +1011 -0
- package/fesm2022/fragiola-primitives-angular-popover.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-progress.mjs +472 -0
- package/fesm2022/fragiola-primitives-angular-progress.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-radio-group.mjs +321 -0
- package/fesm2022/fragiola-primitives-angular-radio-group.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-radio.mjs +273 -0
- package/fesm2022/fragiola-primitives-angular-radio.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-range-calendar.mjs +108 -0
- package/fesm2022/fragiola-primitives-angular-range-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-rating.mjs +643 -0
- package/fesm2022/fragiola-primitives-angular-rating.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-render.mjs +1 -0
- package/fesm2022/fragiola-primitives-angular-scroll-area.mjs +553 -0
- package/fesm2022/fragiola-primitives-angular-scroll-area.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-search-field.mjs +487 -0
- package/fesm2022/fragiola-primitives-angular-search-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-segmented-control.mjs +762 -0
- package/fesm2022/fragiola-primitives-angular-segmented-control.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-select-virtual.mjs +246 -0
- package/fesm2022/fragiola-primitives-angular-select-virtual.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-select.mjs +1433 -0
- package/fesm2022/fragiola-primitives-angular-select.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-separator.mjs +102 -0
- package/fesm2022/fragiola-primitives-angular-separator.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-slider.mjs +1090 -0
- package/fesm2022/fragiola-primitives-angular-slider.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-steps.mjs +819 -0
- package/fesm2022/fragiola-primitives-angular-steps.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-switch.mjs +422 -0
- package/fesm2022/fragiola-primitives-angular-switch.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-tabs.mjs +726 -0
- package/fesm2022/fragiola-primitives-angular-tabs.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-tag-group.mjs +768 -0
- package/fesm2022/fragiola-primitives-angular-tag-group.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-tags-input.mjs +1126 -0
- package/fesm2022/fragiola-primitives-angular-tags-input.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-time-field.mjs +187 -0
- package/fesm2022/fragiola-primitives-angular-time-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-time-range-field.mjs +188 -0
- package/fesm2022/fragiola-primitives-angular-time-range-field.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-toast.mjs +744 -0
- package/fesm2022/fragiola-primitives-angular-toast.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-toggle-group.mjs +245 -0
- package/fesm2022/fragiola-primitives-angular-toggle-group.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-toggle.mjs +229 -0
- package/fesm2022/fragiola-primitives-angular-toggle.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-toolbar.mjs +623 -0
- package/fesm2022/fragiola-primitives-angular-toolbar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-tooltip.mjs +975 -0
- package/fesm2022/fragiola-primitives-angular-tooltip.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-year-calendar.mjs +163 -0
- package/fesm2022/fragiola-primitives-angular-year-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-year-picker.mjs +177 -0
- package/fesm2022/fragiola-primitives-angular-year-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-year-range-calendar.mjs +163 -0
- package/fesm2022/fragiola-primitives-angular-year-range-calendar.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular-year-range-picker.mjs +177 -0
- package/fesm2022/fragiola-primitives-angular-year-range-picker.mjs.map +1 -0
- package/fesm2022/fragiola-primitives-angular.mjs +94 -0
- package/package.json +437 -3
- package/types/fragiola-primitives-angular-accordion.d.ts +154 -0
- package/types/fragiola-primitives-angular-alert-dialog.d.ts +176 -0
- package/types/fragiola-primitives-angular-aspect-ratio.d.ts +25 -0
- package/types/fragiola-primitives-angular-async-list.d.ts +32 -0
- package/types/fragiola-primitives-angular-autocomplete-virtual.d.ts +82 -0
- package/types/fragiola-primitives-angular-autocomplete.d.ts +496 -0
- package/types/fragiola-primitives-angular-avatar.d.ts +94 -0
- package/types/fragiola-primitives-angular-breadcrumbs.d.ts +62 -0
- package/types/fragiola-primitives-angular-button.d.ts +66 -0
- package/types/fragiola-primitives-angular-calendar-preset.d.ts +35 -0
- package/types/fragiola-primitives-angular-calendar-view.d.ts +80 -0
- package/types/fragiola-primitives-angular-calendar.d.ts +414 -0
- package/types/fragiola-primitives-angular-carousel.d.ts +300 -0
- package/types/fragiola-primitives-angular-cascade-select.d.ts +404 -0
- package/types/fragiola-primitives-angular-checkbox-group.d.ts +74 -0
- package/types/fragiola-primitives-angular-checkbox.d.ts +111 -0
- package/types/fragiola-primitives-angular-clipboard.d.ts +106 -0
- package/types/fragiola-primitives-angular-collapsible.d.ts +88 -0
- package/types/fragiola-primitives-angular-color-area.d.ts +174 -0
- package/types/fragiola-primitives-angular-color-field.d.ts +174 -0
- package/types/fragiola-primitives-angular-color-picker-popover.d.ts +180 -0
- package/types/fragiola-primitives-angular-color-picker.d.ts +137 -0
- package/types/fragiola-primitives-angular-color-slider.d.ts +228 -0
- package/types/fragiola-primitives-angular-color-swatch-picker.d.ts +146 -0
- package/types/fragiola-primitives-angular-color-swatch.d.ts +43 -0
- package/types/fragiola-primitives-angular-color-wheel.d.ts +144 -0
- package/types/fragiola-primitives-angular-combobox-virtual.d.ts +84 -0
- package/types/fragiola-primitives-angular-combobox.d.ts +582 -0
- package/types/fragiola-primitives-angular-command-virtual.d.ts +93 -0
- package/types/fragiola-primitives-angular-command.d.ts +283 -0
- package/types/fragiola-primitives-angular-context-menu.d.ts +278 -0
- package/types/fragiola-primitives-angular-date-field.d.ts +486 -0
- package/types/fragiola-primitives-angular-date-picker-input.d.ts +139 -0
- package/types/fragiola-primitives-angular-date-picker.d.ts +331 -0
- package/types/fragiola-primitives-angular-date-range-field.d.ts +333 -0
- package/types/fragiola-primitives-angular-date-range-picker-input.d.ts +89 -0
- package/types/fragiola-primitives-angular-date-range-picker.d.ts +35 -0
- package/types/fragiola-primitives-angular-dialog.d.ts +359 -0
- package/types/fragiola-primitives-angular-direction.d.ts +31 -0
- package/types/fragiola-primitives-angular-drawer.d.ts +242 -0
- package/types/fragiola-primitives-angular-drop-zone.d.ts +68 -0
- package/types/fragiola-primitives-angular-editable.d.ts +219 -0
- package/types/fragiola-primitives-angular-field.d.ts +397 -0
- package/types/fragiola-primitives-angular-fieldset.d.ts +47 -0
- package/types/fragiola-primitives-angular-file-upload.d.ts +351 -0
- package/types/fragiola-primitives-angular-form.d.ts +44 -0
- package/types/fragiola-primitives-angular-hover-card.d.ts +279 -0
- package/types/fragiola-primitives-angular-internal.d.ts +695 -0
- package/types/fragiola-primitives-angular-label.d.ts +14 -0
- package/types/fragiola-primitives-angular-link.d.ts +33 -0
- package/types/fragiola-primitives-angular-listbox-virtual.d.ts +193 -0
- package/types/fragiola-primitives-angular-listbox.d.ts +237 -0
- package/types/fragiola-primitives-angular-menu.d.ts +758 -0
- package/types/fragiola-primitives-angular-menubar.d.ts +76 -0
- package/types/fragiola-primitives-angular-meter.d.ts +117 -0
- package/types/fragiola-primitives-angular-month-calendar.d.ts +380 -0
- package/types/fragiola-primitives-angular-month-picker.d.ts +183 -0
- package/types/fragiola-primitives-angular-month-range-calendar.d.ts +54 -0
- package/types/fragiola-primitives-angular-month-range-picker.d.ts +56 -0
- package/types/fragiola-primitives-angular-multiple-calendar.d.ts +73 -0
- package/types/fragiola-primitives-angular-navigation-menu.d.ts +355 -0
- package/types/fragiola-primitives-angular-number-field.d.ts +305 -0
- package/types/fragiola-primitives-angular-otp-field.d.ts +210 -0
- package/types/fragiola-primitives-angular-pagination.d.ts +239 -0
- package/types/fragiola-primitives-angular-password-input.d.ts +149 -0
- package/types/fragiola-primitives-angular-popover.d.ts +303 -0
- package/types/fragiola-primitives-angular-progress.d.ts +126 -0
- package/types/fragiola-primitives-angular-radio-group.d.ts +123 -0
- package/types/fragiola-primitives-angular-radio.d.ts +67 -0
- package/types/fragiola-primitives-angular-range-calendar.d.ts +33 -0
- package/types/fragiola-primitives-angular-rating.d.ts +195 -0
- package/types/fragiola-primitives-angular-render.d.ts +2 -0
- package/types/fragiola-primitives-angular-scroll-area.d.ts +134 -0
- package/types/fragiola-primitives-angular-search-field.d.ts +129 -0
- package/types/fragiola-primitives-angular-segmented-control.d.ts +232 -0
- package/types/fragiola-primitives-angular-select-virtual.d.ts +81 -0
- package/types/fragiola-primitives-angular-select.d.ts +403 -0
- package/types/fragiola-primitives-angular-separator.d.ts +32 -0
- package/types/fragiola-primitives-angular-slider.d.ts +297 -0
- package/types/fragiola-primitives-angular-steps.d.ts +194 -0
- package/types/fragiola-primitives-angular-switch.d.ts +102 -0
- package/types/fragiola-primitives-angular-tabs.d.ts +215 -0
- package/types/fragiola-primitives-angular-tag-group.d.ts +232 -0
- package/types/fragiola-primitives-angular-tags-input.d.ts +318 -0
- package/types/fragiola-primitives-angular-time-field.d.ts +63 -0
- package/types/fragiola-primitives-angular-time-range-field.d.ts +65 -0
- package/types/fragiola-primitives-angular-toast.d.ts +196 -0
- package/types/fragiola-primitives-angular-toggle-group.d.ts +89 -0
- package/types/fragiola-primitives-angular-toggle.d.ts +86 -0
- package/types/fragiola-primitives-angular-toolbar.d.ts +187 -0
- package/types/fragiola-primitives-angular-tooltip.d.ts +330 -0
- package/types/fragiola-primitives-angular-year-calendar.d.ts +54 -0
- package/types/fragiola-primitives-angular-year-picker.d.ts +56 -0
- package/types/fragiola-primitives-angular-year-range-calendar.d.ts +54 -0
- package/types/fragiola-primitives-angular-year-range-picker.d.ts +56 -0
- package/types/fragiola-primitives-angular.d.ts +94 -0
|
@@ -0,0 +1,1751 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DestroyRef, Directive, afterNextRender, afterRenderEffect, booleanAttribute, computed, effect, inject, input, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { conditionalView, controllable, createOverlayRoot, dataValue, dataValues, injectEnclosing, injectFlush, injectHost, injectId, mountPortal, placementSignal, portalOptions, positionOverlay, registerHost, writeAttributes } from "@fragiola/primitives-angular/internal";
|
|
4
|
+
import { containsFilter, filterItems, itemLabel, scrollIntoViewWithin, stepThroughNone } from "@fragiola/primitives/collection";
|
|
5
|
+
import { fieldControl, writeFieldAria } from "@fragiola/primitives-angular/field";
|
|
6
|
+
import { bridgeForm } from "@fragiola/primitives/form";
|
|
7
|
+
import { openOverlaySession } from "@fragiola/primitives/overlay";
|
|
8
|
+
const NONE = [];
|
|
9
|
+
var AutocompleteRoot = class AutocompleteRoot {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.items = input(void 0, ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
12
|
+
this.mode = input("list", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this.filter = input(void 0, ...ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.limit = input(-1, ...ngDevMode ? [{ debugName: "limit" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.locale = input(void 0, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.itemToStringValue = input(void 0, ...ngDevMode ? [{ debugName: "itemToStringValue" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.openOnInputClick = input(false, {
|
|
18
|
+
...ngDevMode ? { debugName: "openOnInputClick" } : /* istanbul ignore next */ {},
|
|
19
|
+
transform: booleanAttribute
|
|
20
|
+
});
|
|
21
|
+
this.autoHighlight = input(false, {
|
|
22
|
+
...ngDevMode ? { debugName: "autoHighlight" } : /* istanbul ignore next */ {},
|
|
23
|
+
transform: booleanAttribute
|
|
24
|
+
});
|
|
25
|
+
this.open = input(void 0, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
26
|
+
this.openChange = output();
|
|
27
|
+
this.defaultOpen = input(false, ...ngDevMode ? [{ debugName: "defaultOpen" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.openChangeDetails = output();
|
|
29
|
+
this.openChangeComplete = output();
|
|
30
|
+
this.boundValue = input(void 0, {
|
|
31
|
+
...ngDevMode ? { debugName: "boundValue" } : /* istanbul ignore next */ {},
|
|
32
|
+
alias: "value"
|
|
33
|
+
});
|
|
34
|
+
this.valueChange = output();
|
|
35
|
+
this.defaultValue = input(void 0, ...ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.valueChangeDetails = output();
|
|
37
|
+
this.name = input(void 0, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.required = input(false, {
|
|
39
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
40
|
+
transform: booleanAttribute
|
|
41
|
+
});
|
|
42
|
+
this.disabled = input(false, {
|
|
43
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
44
|
+
transform: booleanAttribute
|
|
45
|
+
});
|
|
46
|
+
this.inputElementId = signal(void 0, ...ngDevMode ? [{ debugName: "inputElementId" }] : /* istanbul ignore next */ []);
|
|
47
|
+
this.overlay = createOverlayRoot(this, (event) => this.openChangeDetails.emit(event), "primitives-autocomplete");
|
|
48
|
+
this.text = controllable(this.boundValue, this.valueChange, () => this.defaultValue() ?? "", (value, details) => this.valueChangeDetails.emit({
|
|
49
|
+
value,
|
|
50
|
+
details
|
|
51
|
+
}));
|
|
52
|
+
this.value = this.text.value;
|
|
53
|
+
this.field = fieldControl({
|
|
54
|
+
id: this.inputElementId,
|
|
55
|
+
labelable: true,
|
|
56
|
+
value: this.value,
|
|
57
|
+
filled: computed(() => this.value() !== ""),
|
|
58
|
+
input: () => this.overlay.trigger(),
|
|
59
|
+
focusTarget: () => this.overlay.trigger()
|
|
60
|
+
});
|
|
61
|
+
this.isDisabled = computed(() => this.disabled() || this.field.disabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.formName = computed(() => this.field.name() ?? this.name(), ...ngDevMode ? [{ debugName: "formName" }] : /* istanbul ignore next */ []);
|
|
63
|
+
this.inline = computed(() => this.mode() === "both" || this.mode() === "inline", ...ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []);
|
|
64
|
+
this.highlighted = signal(null, ...ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []);
|
|
65
|
+
this.shown = signal(null, ...ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.displayed = computed(() => this.shown()?.text ?? this.value(), ...ngDevMode ? [{ debugName: "displayed" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.registered = /* @__PURE__ */ new Map();
|
|
68
|
+
this.itemCount = signal(0, ...ngDevMode ? [{ debugName: "itemCount" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.list = signal(null, ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.button = signal(null, ...ngDevMode ? [{ debugName: "button" }] : /* istanbul ignore next */ []);
|
|
71
|
+
this.inputGroup = signal(null, ...ngDevMode ? [{ debugName: "inputGroup" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.clearButton = signal(null, ...ngDevMode ? [{ debugName: "clearButton" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.listId = `${injectId("primitives-autocomplete")}-list`;
|
|
74
|
+
this.pending = signal(null, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
75
|
+
this.placed = placementSignal({
|
|
76
|
+
side: "bottom",
|
|
77
|
+
align: "start"
|
|
78
|
+
});
|
|
79
|
+
this.flush = injectFlush();
|
|
80
|
+
this.state = computed(() => ({
|
|
81
|
+
open: this.overlay.open(),
|
|
82
|
+
disabled: this.isDisabled(),
|
|
83
|
+
value: this.value()
|
|
84
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
85
|
+
this.resolvedFilter = computed(() => {
|
|
86
|
+
const filter = this.filter();
|
|
87
|
+
return filter === void 0 ? containsFilter(this.locale()) : filter;
|
|
88
|
+
}, ...ngDevMode ? [{ debugName: "resolvedFilter" }] : /* istanbul ignore next */ []);
|
|
89
|
+
this.hasItems = computed(() => this.items() !== void 0, ...ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []);
|
|
90
|
+
this.entries = computed(() => {
|
|
91
|
+
const items = this.items();
|
|
92
|
+
if (items === void 0) return NONE;
|
|
93
|
+
const filters = this.mode() === "list" || this.mode() === "both";
|
|
94
|
+
return filterItems(items, filters ? this.value().trim() : "", {
|
|
95
|
+
filter: filters ? this.resolvedFilter() : null,
|
|
96
|
+
limit: this.limit(),
|
|
97
|
+
itemToString: (item) => this.label(item)
|
|
98
|
+
});
|
|
99
|
+
}, ...ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []);
|
|
100
|
+
this.empty = computed(() => this.hasItems() ? this.entries().length === 0 : this.itemCount() === 0, ...ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []);
|
|
101
|
+
}
|
|
102
|
+
label(item) {
|
|
103
|
+
return itemLabel(item, this.itemToStringValue());
|
|
104
|
+
}
|
|
105
|
+
setOpen(next, reason, event) {
|
|
106
|
+
const shown = untracked(this.shown);
|
|
107
|
+
const changed = this.overlay.setOpen(next, reason, event);
|
|
108
|
+
if (next || !changed) {
|
|
109
|
+
this.flush();
|
|
110
|
+
return changed;
|
|
111
|
+
}
|
|
112
|
+
if (untracked(this.inline) && shown !== null && !shown.disabled && (reason === "focus-out" || reason === "outside-press")) this.text.set(this.label(shown.item), {
|
|
113
|
+
reason: "input-blur",
|
|
114
|
+
event
|
|
115
|
+
});
|
|
116
|
+
this.shown.set(null);
|
|
117
|
+
this.highlighted.set(null);
|
|
118
|
+
this.pending.set(null);
|
|
119
|
+
this.flush();
|
|
120
|
+
return changed;
|
|
121
|
+
}
|
|
122
|
+
type(text, addition, event) {
|
|
123
|
+
this.text.set(text, {
|
|
124
|
+
reason: "input-change",
|
|
125
|
+
event
|
|
126
|
+
});
|
|
127
|
+
this.shown.set(null);
|
|
128
|
+
this.highlighted.set(null);
|
|
129
|
+
this.pending.set(null);
|
|
130
|
+
const filled = text.trim() !== "";
|
|
131
|
+
const open = untracked(this.overlay.open);
|
|
132
|
+
if (filled && !open) {
|
|
133
|
+
if (!this.setOpen(true, "input-change", event)) return;
|
|
134
|
+
} else if (!filled && open && !this.openOnInputClick()) {
|
|
135
|
+
this.setOpen(false, "input-clear", event);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (filled) {
|
|
139
|
+
if (this.inline()) {
|
|
140
|
+
if (addition) this.pending.set("complete");
|
|
141
|
+
} else if (this.autoHighlight()) this.pending.set("first");
|
|
142
|
+
}
|
|
143
|
+
this.flush();
|
|
144
|
+
}
|
|
145
|
+
highlight(id, from) {
|
|
146
|
+
this.highlighted.set(id);
|
|
147
|
+
if (from === "pointer" && untracked(this.inline)) this.shown.set(null);
|
|
148
|
+
if (from === "keyboard" && untracked(this.inline)) {
|
|
149
|
+
const item = [...this.registered.values()].find((entry) => entry.id === id);
|
|
150
|
+
this.shown.set(item === void 0 ? null : {
|
|
151
|
+
item: item.value,
|
|
152
|
+
text: this.label(item.value),
|
|
153
|
+
selectFrom: null,
|
|
154
|
+
disabled: item.disabled
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
this.flush();
|
|
158
|
+
}
|
|
159
|
+
complete(item) {
|
|
160
|
+
const typed = untracked(this.value);
|
|
161
|
+
this.highlighted.set(item.id);
|
|
162
|
+
this.shown.set({
|
|
163
|
+
item: item.value,
|
|
164
|
+
text: this.label(item.value),
|
|
165
|
+
selectFrom: typed.length,
|
|
166
|
+
disabled: item.disabled
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
choose(item, event) {
|
|
170
|
+
this.shown.set(null);
|
|
171
|
+
this.highlighted.set(null);
|
|
172
|
+
this.text.set(this.label(item), {
|
|
173
|
+
reason: "item-press",
|
|
174
|
+
event
|
|
175
|
+
});
|
|
176
|
+
this.setOpen(false, "item-press", event);
|
|
177
|
+
}
|
|
178
|
+
clear(reason, event) {
|
|
179
|
+
this.shown.set(null);
|
|
180
|
+
this.highlighted.set(null);
|
|
181
|
+
this.text.set("", {
|
|
182
|
+
reason,
|
|
183
|
+
event
|
|
184
|
+
});
|
|
185
|
+
this.flush();
|
|
186
|
+
}
|
|
187
|
+
orderedItems() {
|
|
188
|
+
const list = this.list();
|
|
189
|
+
if (list === null) return [];
|
|
190
|
+
return [...list.querySelectorAll("[role=\"option\"]")].map((element) => this.registered.get(element)).filter((item) => item !== void 0);
|
|
191
|
+
}
|
|
192
|
+
itemsRegistered() {
|
|
193
|
+
const list = this.list();
|
|
194
|
+
return list === null || [...list.querySelectorAll("[role=\"option\"]")].every((element) => this.registered.has(element));
|
|
195
|
+
}
|
|
196
|
+
registerItem(element, info) {
|
|
197
|
+
this.registered.set(element, info);
|
|
198
|
+
this.itemCount.set(this.registered.size);
|
|
199
|
+
return () => {
|
|
200
|
+
this.registered.delete(element);
|
|
201
|
+
this.itemCount.set(this.registered.size);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
reset() {
|
|
205
|
+
this.field.reset();
|
|
206
|
+
this.shown.set(null);
|
|
207
|
+
this.highlighted.set(null);
|
|
208
|
+
this.text.set(this.defaultValue() ?? "", { reason: "none" });
|
|
209
|
+
this.setOpen(false, "none");
|
|
210
|
+
const input = this.overlay.trigger();
|
|
211
|
+
if (input instanceof HTMLInputElement) input.value = this.displayed();
|
|
212
|
+
}
|
|
213
|
+
close() {
|
|
214
|
+
this.setOpen(false, "imperative-action");
|
|
215
|
+
}
|
|
216
|
+
unmount() {
|
|
217
|
+
this.overlay.unmount();
|
|
218
|
+
}
|
|
219
|
+
static {
|
|
220
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
221
|
+
minVersion: "12.0.0",
|
|
222
|
+
version: "22.2.6",
|
|
223
|
+
ngImport: i0,
|
|
224
|
+
type: AutocompleteRoot,
|
|
225
|
+
deps: [],
|
|
226
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
static {
|
|
230
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
231
|
+
minVersion: "17.1.0",
|
|
232
|
+
version: "22.2.6",
|
|
233
|
+
type: AutocompleteRoot,
|
|
234
|
+
isStandalone: true,
|
|
235
|
+
selector: "[autocompleteRoot]",
|
|
236
|
+
inputs: {
|
|
237
|
+
items: {
|
|
238
|
+
classPropertyName: "items",
|
|
239
|
+
publicName: "items",
|
|
240
|
+
isSignal: true,
|
|
241
|
+
isRequired: false,
|
|
242
|
+
transformFunction: null
|
|
243
|
+
},
|
|
244
|
+
mode: {
|
|
245
|
+
classPropertyName: "mode",
|
|
246
|
+
publicName: "mode",
|
|
247
|
+
isSignal: true,
|
|
248
|
+
isRequired: false,
|
|
249
|
+
transformFunction: null
|
|
250
|
+
},
|
|
251
|
+
filter: {
|
|
252
|
+
classPropertyName: "filter",
|
|
253
|
+
publicName: "filter",
|
|
254
|
+
isSignal: true,
|
|
255
|
+
isRequired: false,
|
|
256
|
+
transformFunction: null
|
|
257
|
+
},
|
|
258
|
+
limit: {
|
|
259
|
+
classPropertyName: "limit",
|
|
260
|
+
publicName: "limit",
|
|
261
|
+
isSignal: true,
|
|
262
|
+
isRequired: false,
|
|
263
|
+
transformFunction: null
|
|
264
|
+
},
|
|
265
|
+
locale: {
|
|
266
|
+
classPropertyName: "locale",
|
|
267
|
+
publicName: "locale",
|
|
268
|
+
isSignal: true,
|
|
269
|
+
isRequired: false,
|
|
270
|
+
transformFunction: null
|
|
271
|
+
},
|
|
272
|
+
itemToStringValue: {
|
|
273
|
+
classPropertyName: "itemToStringValue",
|
|
274
|
+
publicName: "itemToStringValue",
|
|
275
|
+
isSignal: true,
|
|
276
|
+
isRequired: false,
|
|
277
|
+
transformFunction: null
|
|
278
|
+
},
|
|
279
|
+
openOnInputClick: {
|
|
280
|
+
classPropertyName: "openOnInputClick",
|
|
281
|
+
publicName: "openOnInputClick",
|
|
282
|
+
isSignal: true,
|
|
283
|
+
isRequired: false,
|
|
284
|
+
transformFunction: null
|
|
285
|
+
},
|
|
286
|
+
autoHighlight: {
|
|
287
|
+
classPropertyName: "autoHighlight",
|
|
288
|
+
publicName: "autoHighlight",
|
|
289
|
+
isSignal: true,
|
|
290
|
+
isRequired: false,
|
|
291
|
+
transformFunction: null
|
|
292
|
+
},
|
|
293
|
+
open: {
|
|
294
|
+
classPropertyName: "open",
|
|
295
|
+
publicName: "open",
|
|
296
|
+
isSignal: true,
|
|
297
|
+
isRequired: false,
|
|
298
|
+
transformFunction: null
|
|
299
|
+
},
|
|
300
|
+
defaultOpen: {
|
|
301
|
+
classPropertyName: "defaultOpen",
|
|
302
|
+
publicName: "defaultOpen",
|
|
303
|
+
isSignal: true,
|
|
304
|
+
isRequired: false,
|
|
305
|
+
transformFunction: null
|
|
306
|
+
},
|
|
307
|
+
boundValue: {
|
|
308
|
+
classPropertyName: "boundValue",
|
|
309
|
+
publicName: "value",
|
|
310
|
+
isSignal: true,
|
|
311
|
+
isRequired: false,
|
|
312
|
+
transformFunction: null
|
|
313
|
+
},
|
|
314
|
+
defaultValue: {
|
|
315
|
+
classPropertyName: "defaultValue",
|
|
316
|
+
publicName: "defaultValue",
|
|
317
|
+
isSignal: true,
|
|
318
|
+
isRequired: false,
|
|
319
|
+
transformFunction: null
|
|
320
|
+
},
|
|
321
|
+
name: {
|
|
322
|
+
classPropertyName: "name",
|
|
323
|
+
publicName: "name",
|
|
324
|
+
isSignal: true,
|
|
325
|
+
isRequired: false,
|
|
326
|
+
transformFunction: null
|
|
327
|
+
},
|
|
328
|
+
required: {
|
|
329
|
+
classPropertyName: "required",
|
|
330
|
+
publicName: "required",
|
|
331
|
+
isSignal: true,
|
|
332
|
+
isRequired: false,
|
|
333
|
+
transformFunction: null
|
|
334
|
+
},
|
|
335
|
+
disabled: {
|
|
336
|
+
classPropertyName: "disabled",
|
|
337
|
+
publicName: "disabled",
|
|
338
|
+
isSignal: true,
|
|
339
|
+
isRequired: false,
|
|
340
|
+
transformFunction: null
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
outputs: {
|
|
344
|
+
openChange: "openChange",
|
|
345
|
+
openChangeDetails: "openChangeDetails",
|
|
346
|
+
openChangeComplete: "openChangeComplete",
|
|
347
|
+
valueChange: "valueChange",
|
|
348
|
+
valueChangeDetails: "valueChangeDetails"
|
|
349
|
+
},
|
|
350
|
+
exportAs: ["autocompleteRoot"],
|
|
351
|
+
ngImport: i0
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
356
|
+
minVersion: "12.0.0",
|
|
357
|
+
version: "22.2.6",
|
|
358
|
+
ngImport: i0,
|
|
359
|
+
type: AutocompleteRoot,
|
|
360
|
+
decorators: [{
|
|
361
|
+
type: Directive,
|
|
362
|
+
args: [{
|
|
363
|
+
selector: "[autocompleteRoot]",
|
|
364
|
+
exportAs: "autocompleteRoot"
|
|
365
|
+
}]
|
|
366
|
+
}],
|
|
367
|
+
propDecorators: {
|
|
368
|
+
items: [{
|
|
369
|
+
type: i0.Input,
|
|
370
|
+
args: [{
|
|
371
|
+
isSignal: true,
|
|
372
|
+
alias: "items",
|
|
373
|
+
required: false
|
|
374
|
+
}]
|
|
375
|
+
}],
|
|
376
|
+
mode: [{
|
|
377
|
+
type: i0.Input,
|
|
378
|
+
args: [{
|
|
379
|
+
isSignal: true,
|
|
380
|
+
alias: "mode",
|
|
381
|
+
required: false
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
filter: [{
|
|
385
|
+
type: i0.Input,
|
|
386
|
+
args: [{
|
|
387
|
+
isSignal: true,
|
|
388
|
+
alias: "filter",
|
|
389
|
+
required: false
|
|
390
|
+
}]
|
|
391
|
+
}],
|
|
392
|
+
limit: [{
|
|
393
|
+
type: i0.Input,
|
|
394
|
+
args: [{
|
|
395
|
+
isSignal: true,
|
|
396
|
+
alias: "limit",
|
|
397
|
+
required: false
|
|
398
|
+
}]
|
|
399
|
+
}],
|
|
400
|
+
locale: [{
|
|
401
|
+
type: i0.Input,
|
|
402
|
+
args: [{
|
|
403
|
+
isSignal: true,
|
|
404
|
+
alias: "locale",
|
|
405
|
+
required: false
|
|
406
|
+
}]
|
|
407
|
+
}],
|
|
408
|
+
itemToStringValue: [{
|
|
409
|
+
type: i0.Input,
|
|
410
|
+
args: [{
|
|
411
|
+
isSignal: true,
|
|
412
|
+
alias: "itemToStringValue",
|
|
413
|
+
required: false
|
|
414
|
+
}]
|
|
415
|
+
}],
|
|
416
|
+
openOnInputClick: [{
|
|
417
|
+
type: i0.Input,
|
|
418
|
+
args: [{
|
|
419
|
+
isSignal: true,
|
|
420
|
+
alias: "openOnInputClick",
|
|
421
|
+
required: false
|
|
422
|
+
}]
|
|
423
|
+
}],
|
|
424
|
+
autoHighlight: [{
|
|
425
|
+
type: i0.Input,
|
|
426
|
+
args: [{
|
|
427
|
+
isSignal: true,
|
|
428
|
+
alias: "autoHighlight",
|
|
429
|
+
required: false
|
|
430
|
+
}]
|
|
431
|
+
}],
|
|
432
|
+
open: [{
|
|
433
|
+
type: i0.Input,
|
|
434
|
+
args: [{
|
|
435
|
+
isSignal: true,
|
|
436
|
+
alias: "open",
|
|
437
|
+
required: false
|
|
438
|
+
}]
|
|
439
|
+
}],
|
|
440
|
+
openChange: [{
|
|
441
|
+
type: i0.Output,
|
|
442
|
+
args: ["openChange"]
|
|
443
|
+
}],
|
|
444
|
+
defaultOpen: [{
|
|
445
|
+
type: i0.Input,
|
|
446
|
+
args: [{
|
|
447
|
+
isSignal: true,
|
|
448
|
+
alias: "defaultOpen",
|
|
449
|
+
required: false
|
|
450
|
+
}]
|
|
451
|
+
}],
|
|
452
|
+
openChangeDetails: [{
|
|
453
|
+
type: i0.Output,
|
|
454
|
+
args: ["openChangeDetails"]
|
|
455
|
+
}],
|
|
456
|
+
openChangeComplete: [{
|
|
457
|
+
type: i0.Output,
|
|
458
|
+
args: ["openChangeComplete"]
|
|
459
|
+
}],
|
|
460
|
+
boundValue: [{
|
|
461
|
+
type: i0.Input,
|
|
462
|
+
args: [{
|
|
463
|
+
isSignal: true,
|
|
464
|
+
alias: "value",
|
|
465
|
+
required: false
|
|
466
|
+
}]
|
|
467
|
+
}],
|
|
468
|
+
valueChange: [{
|
|
469
|
+
type: i0.Output,
|
|
470
|
+
args: ["valueChange"]
|
|
471
|
+
}],
|
|
472
|
+
defaultValue: [{
|
|
473
|
+
type: i0.Input,
|
|
474
|
+
args: [{
|
|
475
|
+
isSignal: true,
|
|
476
|
+
alias: "defaultValue",
|
|
477
|
+
required: false
|
|
478
|
+
}]
|
|
479
|
+
}],
|
|
480
|
+
valueChangeDetails: [{
|
|
481
|
+
type: i0.Output,
|
|
482
|
+
args: ["valueChangeDetails"]
|
|
483
|
+
}],
|
|
484
|
+
name: [{
|
|
485
|
+
type: i0.Input,
|
|
486
|
+
args: [{
|
|
487
|
+
isSignal: true,
|
|
488
|
+
alias: "name",
|
|
489
|
+
required: false
|
|
490
|
+
}]
|
|
491
|
+
}],
|
|
492
|
+
required: [{
|
|
493
|
+
type: i0.Input,
|
|
494
|
+
args: [{
|
|
495
|
+
isSignal: true,
|
|
496
|
+
alias: "required",
|
|
497
|
+
required: false
|
|
498
|
+
}]
|
|
499
|
+
}],
|
|
500
|
+
disabled: [{
|
|
501
|
+
type: i0.Input,
|
|
502
|
+
args: [{
|
|
503
|
+
isSignal: true,
|
|
504
|
+
alias: "disabled",
|
|
505
|
+
required: false
|
|
506
|
+
}]
|
|
507
|
+
}]
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
var AutocompleteClear = class AutocompleteClear {
|
|
511
|
+
constructor() {
|
|
512
|
+
this.root = inject(AutocompleteRoot);
|
|
513
|
+
this.state = computed(() => ({ disabled: this.root.isDisabled() }), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
514
|
+
const root = this.root;
|
|
515
|
+
const onPointerDown = (event) => event.preventDefault();
|
|
516
|
+
const onClick = (event) => {
|
|
517
|
+
root.clear("clear-press", event);
|
|
518
|
+
if (root.overlay.open() && !root.openOnInputClick()) root.setOpen(false, "input-clear", event);
|
|
519
|
+
root.overlay.trigger()?.focus();
|
|
520
|
+
};
|
|
521
|
+
const element = conditionalView(computed(() => root.value() !== ""), (button) => {
|
|
522
|
+
writeAttributes(button, {
|
|
523
|
+
type: "button",
|
|
524
|
+
tabindex: "-1",
|
|
525
|
+
"data-primitives-part": "autocomplete-clear"
|
|
526
|
+
});
|
|
527
|
+
button.addEventListener("pointerdown", onPointerDown);
|
|
528
|
+
button.addEventListener("click", onClick);
|
|
529
|
+
});
|
|
530
|
+
effect((onCleanup) => {
|
|
531
|
+
const button = element();
|
|
532
|
+
const disabled = this.state().disabled;
|
|
533
|
+
if (button === null) return;
|
|
534
|
+
writeAttributes(button, {
|
|
535
|
+
disabled: disabled ? "" : null,
|
|
536
|
+
"data-disabled": dataValue(disabled)
|
|
537
|
+
});
|
|
538
|
+
root.clearButton.set(button);
|
|
539
|
+
onCleanup(() => {
|
|
540
|
+
if (root.clearButton() === button) root.clearButton.set(null);
|
|
541
|
+
});
|
|
542
|
+
});
|
|
543
|
+
inject(DestroyRef).onDestroy(() => root.clearButton.set(null));
|
|
544
|
+
}
|
|
545
|
+
static {
|
|
546
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
547
|
+
minVersion: "12.0.0",
|
|
548
|
+
version: "22.2.6",
|
|
549
|
+
ngImport: i0,
|
|
550
|
+
type: AutocompleteClear,
|
|
551
|
+
deps: [],
|
|
552
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
static {
|
|
556
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
557
|
+
minVersion: "14.0.0",
|
|
558
|
+
version: "22.2.6",
|
|
559
|
+
type: AutocompleteClear,
|
|
560
|
+
isStandalone: true,
|
|
561
|
+
selector: "[autocompleteClear]",
|
|
562
|
+
exportAs: ["autocompleteClear"],
|
|
563
|
+
ngImport: i0
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
568
|
+
minVersion: "12.0.0",
|
|
569
|
+
version: "22.2.6",
|
|
570
|
+
ngImport: i0,
|
|
571
|
+
type: AutocompleteClear,
|
|
572
|
+
decorators: [{
|
|
573
|
+
type: Directive,
|
|
574
|
+
args: [{
|
|
575
|
+
selector: "[autocompleteClear]",
|
|
576
|
+
exportAs: "autocompleteClear"
|
|
577
|
+
}]
|
|
578
|
+
}],
|
|
579
|
+
ctorParameters: () => []
|
|
580
|
+
});
|
|
581
|
+
var AutocompleteEmpty = class AutocompleteEmpty {
|
|
582
|
+
constructor() {
|
|
583
|
+
this.root = inject(AutocompleteRoot);
|
|
584
|
+
const host = injectHost();
|
|
585
|
+
const kept = host.ownerDocument.createDocumentFragment();
|
|
586
|
+
afterRenderEffect({ write: () => {
|
|
587
|
+
const empty = this.root.empty();
|
|
588
|
+
untracked(() => {
|
|
589
|
+
if (empty) host.append(kept);
|
|
590
|
+
else kept.append(...host.childNodes);
|
|
591
|
+
});
|
|
592
|
+
} });
|
|
593
|
+
}
|
|
594
|
+
static {
|
|
595
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
596
|
+
minVersion: "12.0.0",
|
|
597
|
+
version: "22.2.6",
|
|
598
|
+
ngImport: i0,
|
|
599
|
+
type: AutocompleteEmpty,
|
|
600
|
+
deps: [],
|
|
601
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
static {
|
|
605
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
606
|
+
minVersion: "14.0.0",
|
|
607
|
+
version: "22.2.6",
|
|
608
|
+
type: AutocompleteEmpty,
|
|
609
|
+
isStandalone: true,
|
|
610
|
+
selector: "[autocompleteEmpty]",
|
|
611
|
+
host: { attributes: {
|
|
612
|
+
"role": "status",
|
|
613
|
+
"aria-live": "polite",
|
|
614
|
+
"aria-atomic": "true",
|
|
615
|
+
"data-primitives-part": "autocomplete-empty"
|
|
616
|
+
} },
|
|
617
|
+
ngImport: i0
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
622
|
+
minVersion: "12.0.0",
|
|
623
|
+
version: "22.2.6",
|
|
624
|
+
ngImport: i0,
|
|
625
|
+
type: AutocompleteEmpty,
|
|
626
|
+
decorators: [{
|
|
627
|
+
type: Directive,
|
|
628
|
+
args: [{
|
|
629
|
+
selector: "[autocompleteEmpty]",
|
|
630
|
+
host: {
|
|
631
|
+
role: "status",
|
|
632
|
+
"aria-live": "polite",
|
|
633
|
+
"aria-atomic": "true",
|
|
634
|
+
"data-primitives-part": "autocomplete-empty"
|
|
635
|
+
}
|
|
636
|
+
}]
|
|
637
|
+
}],
|
|
638
|
+
ctorParameters: () => []
|
|
639
|
+
});
|
|
640
|
+
var AutocompleteGroup = class AutocompleteGroup {
|
|
641
|
+
constructor() {
|
|
642
|
+
this.labelId = `${injectId("primitives-autocomplete-group")}-label`;
|
|
643
|
+
}
|
|
644
|
+
static {
|
|
645
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
646
|
+
minVersion: "12.0.0",
|
|
647
|
+
version: "22.2.6",
|
|
648
|
+
ngImport: i0,
|
|
649
|
+
type: AutocompleteGroup,
|
|
650
|
+
deps: [],
|
|
651
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
static {
|
|
655
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
656
|
+
minVersion: "14.0.0",
|
|
657
|
+
version: "22.2.6",
|
|
658
|
+
type: AutocompleteGroup,
|
|
659
|
+
isStandalone: true,
|
|
660
|
+
selector: "[autocompleteGroup]",
|
|
661
|
+
host: {
|
|
662
|
+
attributes: {
|
|
663
|
+
"role": "group",
|
|
664
|
+
"data-primitives-part": "autocomplete-group"
|
|
665
|
+
},
|
|
666
|
+
properties: { "attr.aria-labelledby": "labelId" }
|
|
667
|
+
},
|
|
668
|
+
exportAs: ["autocompleteGroup"],
|
|
669
|
+
ngImport: i0
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
674
|
+
minVersion: "12.0.0",
|
|
675
|
+
version: "22.2.6",
|
|
676
|
+
ngImport: i0,
|
|
677
|
+
type: AutocompleteGroup,
|
|
678
|
+
decorators: [{
|
|
679
|
+
type: Directive,
|
|
680
|
+
args: [{
|
|
681
|
+
selector: "[autocompleteGroup]",
|
|
682
|
+
exportAs: "autocompleteGroup",
|
|
683
|
+
host: {
|
|
684
|
+
role: "group",
|
|
685
|
+
"data-primitives-part": "autocomplete-group",
|
|
686
|
+
"[attr.aria-labelledby]": "labelId"
|
|
687
|
+
}
|
|
688
|
+
}]
|
|
689
|
+
}]
|
|
690
|
+
});
|
|
691
|
+
var AutocompleteGroupLabel = class AutocompleteGroupLabel {
|
|
692
|
+
constructor() {
|
|
693
|
+
this.group = injectEnclosing(AutocompleteGroup, "autocompleteGroup", "AutocompleteGroupLabel");
|
|
694
|
+
}
|
|
695
|
+
static {
|
|
696
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
697
|
+
minVersion: "12.0.0",
|
|
698
|
+
version: "22.2.6",
|
|
699
|
+
ngImport: i0,
|
|
700
|
+
type: AutocompleteGroupLabel,
|
|
701
|
+
deps: [],
|
|
702
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
static {
|
|
706
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
707
|
+
minVersion: "14.0.0",
|
|
708
|
+
version: "22.2.6",
|
|
709
|
+
type: AutocompleteGroupLabel,
|
|
710
|
+
isStandalone: true,
|
|
711
|
+
selector: "[autocompleteGroupLabel]",
|
|
712
|
+
host: {
|
|
713
|
+
attributes: { "data-primitives-part": "autocomplete-group-label" },
|
|
714
|
+
properties: { "attr.id": "group.labelId" }
|
|
715
|
+
},
|
|
716
|
+
ngImport: i0
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
721
|
+
minVersion: "12.0.0",
|
|
722
|
+
version: "22.2.6",
|
|
723
|
+
ngImport: i0,
|
|
724
|
+
type: AutocompleteGroupLabel,
|
|
725
|
+
decorators: [{
|
|
726
|
+
type: Directive,
|
|
727
|
+
args: [{
|
|
728
|
+
selector: "[autocompleteGroupLabel]",
|
|
729
|
+
host: {
|
|
730
|
+
"data-primitives-part": "autocomplete-group-label",
|
|
731
|
+
"[attr.id]": "group.labelId"
|
|
732
|
+
}
|
|
733
|
+
}]
|
|
734
|
+
}]
|
|
735
|
+
});
|
|
736
|
+
var AutocompleteInput = class AutocompleteInput {
|
|
737
|
+
constructor() {
|
|
738
|
+
this.root = inject(AutocompleteRoot);
|
|
739
|
+
this.state = computed(() => ({
|
|
740
|
+
open: this.root.overlay.open(),
|
|
741
|
+
disabled: this.root.isDisabled()
|
|
742
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
743
|
+
this.data = computed(() => dataValues(this.state()), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
744
|
+
this.active = computed(() => {
|
|
745
|
+
this.root.itemCount();
|
|
746
|
+
const highlighted = this.root.highlighted();
|
|
747
|
+
if (!this.state().open || highlighted === null) return;
|
|
748
|
+
return this.root.orderedItems().find((item) => item.id === highlighted);
|
|
749
|
+
}, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
750
|
+
this.activeId = computed(() => this.active()?.id ?? null, ...ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []);
|
|
751
|
+
this.String = String;
|
|
752
|
+
this.input = registerHost(this.root.overlay.singleTrigger);
|
|
753
|
+
this.flush = injectFlush();
|
|
754
|
+
const { field } = this.root;
|
|
755
|
+
const host = this.input;
|
|
756
|
+
writeFieldAria(field, host, {
|
|
757
|
+
"aria-labelledby": field.labelledBy,
|
|
758
|
+
"aria-describedby": field.describedBy,
|
|
759
|
+
"aria-invalid": field.ariaInvalid
|
|
760
|
+
});
|
|
761
|
+
let stop = null;
|
|
762
|
+
afterNextRender(() => {
|
|
763
|
+
if (host.id === "") host.id = this.root.overlay.triggerId;
|
|
764
|
+
this.root.inputElementId.set(host.id);
|
|
765
|
+
stop = bridgeForm(host, { reset: () => this.root.reset() });
|
|
766
|
+
});
|
|
767
|
+
inject(DestroyRef).onDestroy(() => stop?.());
|
|
768
|
+
afterRenderEffect(() => {
|
|
769
|
+
const shown = this.root.shown();
|
|
770
|
+
if (shown === null || host.ownerDocument.activeElement !== host) return;
|
|
771
|
+
const end = shown.text.length;
|
|
772
|
+
if (host.value === shown.text) host.setSelectionRange(shown.selectFrom ?? end, end);
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
onInput(event) {
|
|
776
|
+
const root = this.root;
|
|
777
|
+
const inputType = event.inputType ?? "";
|
|
778
|
+
root.type(this.input.value, root.inline() && inputType.startsWith("insert"), event);
|
|
779
|
+
this.flush();
|
|
780
|
+
const displayed = root.displayed();
|
|
781
|
+
if (this.input.value !== displayed) {
|
|
782
|
+
this.input.value = displayed;
|
|
783
|
+
const shown = root.shown();
|
|
784
|
+
if (shown !== null) {
|
|
785
|
+
const end = shown.text.length;
|
|
786
|
+
this.input.setSelectionRange(shown.selectFrom ?? end, end);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
onClick(event) {
|
|
791
|
+
const root = this.root;
|
|
792
|
+
if (root.openOnInputClick() && !root.overlay.open() && !root.isDisabled()) root.setOpen(true, "input-press", event);
|
|
793
|
+
}
|
|
794
|
+
onKeyDown(event) {
|
|
795
|
+
const root = this.root;
|
|
796
|
+
const open = root.overlay.open();
|
|
797
|
+
const openWith = (pending) => {
|
|
798
|
+
root.pending.set(pending);
|
|
799
|
+
if (!root.setOpen(true, "list-navigation", event)) root.pending.set(null);
|
|
800
|
+
};
|
|
801
|
+
switch (event.key) {
|
|
802
|
+
case "ArrowDown":
|
|
803
|
+
case "ArrowUp": {
|
|
804
|
+
event.preventDefault();
|
|
805
|
+
if (event.altKey) {
|
|
806
|
+
if (event.key === "ArrowDown" && !open) openWith(null);
|
|
807
|
+
else if (event.key === "ArrowUp" && open) root.setOpen(false, "list-navigation", event);
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
if (!open) {
|
|
811
|
+
openWith(event.key === "ArrowDown" ? "first" : "last");
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
const items = root.orderedItems();
|
|
815
|
+
const index = items.findIndex((item) => item.id === root.highlighted());
|
|
816
|
+
const delta = event.key === "ArrowDown" ? 1 : -1;
|
|
817
|
+
root.highlight(items[stepThroughNone(items.length, index, delta)]?.id ?? null, "keyboard");
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
case "Enter": {
|
|
821
|
+
if (!open) return;
|
|
822
|
+
const active = this.active();
|
|
823
|
+
if (active === void 0) {
|
|
824
|
+
root.setOpen(false, "none", event);
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
event.preventDefault();
|
|
828
|
+
if (!active.disabled) root.choose(active.value, event);
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
case "Escape":
|
|
832
|
+
if (!open && root.value() !== "") {
|
|
833
|
+
event.preventDefault();
|
|
834
|
+
root.clear("escape-key", event);
|
|
835
|
+
}
|
|
836
|
+
return;
|
|
837
|
+
case "Tab":
|
|
838
|
+
if (open) root.setOpen(false, "focus-out", event);
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
static {
|
|
843
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
844
|
+
minVersion: "12.0.0",
|
|
845
|
+
version: "22.2.6",
|
|
846
|
+
ngImport: i0,
|
|
847
|
+
type: AutocompleteInput,
|
|
848
|
+
deps: [],
|
|
849
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
static {
|
|
853
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
854
|
+
minVersion: "14.0.0",
|
|
855
|
+
version: "22.2.6",
|
|
856
|
+
type: AutocompleteInput,
|
|
857
|
+
isStandalone: true,
|
|
858
|
+
selector: "input[autocompleteInput]",
|
|
859
|
+
host: {
|
|
860
|
+
attributes: {
|
|
861
|
+
"type": "text",
|
|
862
|
+
"role": "combobox",
|
|
863
|
+
"autocomplete": "off",
|
|
864
|
+
"data-primitives-part": "autocomplete-input"
|
|
865
|
+
},
|
|
866
|
+
listeners: {
|
|
867
|
+
"input": "onInput($event)",
|
|
868
|
+
"click": "onClick($event)",
|
|
869
|
+
"keydown": "onKeyDown($event)",
|
|
870
|
+
"focus": "root.field.focused()",
|
|
871
|
+
"blur": "root.field.blurred()"
|
|
872
|
+
},
|
|
873
|
+
properties: {
|
|
874
|
+
"attr.name": "root.formName() ?? null",
|
|
875
|
+
"attr.required": "root.required() ? '' : null",
|
|
876
|
+
"attr.disabled": "data().disabled",
|
|
877
|
+
"value": "root.displayed()",
|
|
878
|
+
"attr.value": "root.displayed()",
|
|
879
|
+
"attr.aria-autocomplete": "root.mode()",
|
|
880
|
+
"attr.aria-expanded": "String(state().open)",
|
|
881
|
+
"attr.aria-controls": "root.listId",
|
|
882
|
+
"attr.aria-activedescendant": "activeId()",
|
|
883
|
+
"attr.data-invalid": "root.field.data().invalid",
|
|
884
|
+
"attr.data-valid": "root.field.data().valid",
|
|
885
|
+
"attr.data-dirty": "root.field.data().dirty",
|
|
886
|
+
"attr.data-touched": "root.field.data().touched",
|
|
887
|
+
"attr.data-filled": "root.field.data().filled",
|
|
888
|
+
"attr.data-focused": "root.field.data().focused",
|
|
889
|
+
"attr.data-popup-open": "data().open",
|
|
890
|
+
"attr.data-disabled": "data().disabled"
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
exportAs: ["autocompleteInput"],
|
|
894
|
+
ngImport: i0
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
};
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
899
|
+
minVersion: "12.0.0",
|
|
900
|
+
version: "22.2.6",
|
|
901
|
+
ngImport: i0,
|
|
902
|
+
type: AutocompleteInput,
|
|
903
|
+
decorators: [{
|
|
904
|
+
type: Directive,
|
|
905
|
+
args: [{
|
|
906
|
+
selector: "input[autocompleteInput]",
|
|
907
|
+
exportAs: "autocompleteInput",
|
|
908
|
+
host: {
|
|
909
|
+
type: "text",
|
|
910
|
+
role: "combobox",
|
|
911
|
+
autocomplete: "off",
|
|
912
|
+
"data-primitives-part": "autocomplete-input",
|
|
913
|
+
"[attr.name]": "root.formName() ?? null",
|
|
914
|
+
"[attr.required]": "root.required() ? '' : null",
|
|
915
|
+
"[attr.disabled]": "data().disabled",
|
|
916
|
+
"[value]": "root.displayed()",
|
|
917
|
+
"[attr.value]": "root.displayed()",
|
|
918
|
+
"[attr.aria-autocomplete]": "root.mode()",
|
|
919
|
+
"[attr.aria-expanded]": "String(state().open)",
|
|
920
|
+
"[attr.aria-controls]": "root.listId",
|
|
921
|
+
"[attr.aria-activedescendant]": "activeId()",
|
|
922
|
+
"[attr.data-invalid]": "root.field.data().invalid",
|
|
923
|
+
"[attr.data-valid]": "root.field.data().valid",
|
|
924
|
+
"[attr.data-dirty]": "root.field.data().dirty",
|
|
925
|
+
"[attr.data-touched]": "root.field.data().touched",
|
|
926
|
+
"[attr.data-filled]": "root.field.data().filled",
|
|
927
|
+
"[attr.data-focused]": "root.field.data().focused",
|
|
928
|
+
"[attr.data-popup-open]": "data().open",
|
|
929
|
+
"[attr.data-disabled]": "data().disabled",
|
|
930
|
+
"(input)": "onInput($event)",
|
|
931
|
+
"(click)": "onClick($event)",
|
|
932
|
+
"(keydown)": "onKeyDown($event)",
|
|
933
|
+
"(focus)": "root.field.focused()",
|
|
934
|
+
"(blur)": "root.field.blurred()"
|
|
935
|
+
}
|
|
936
|
+
}]
|
|
937
|
+
}],
|
|
938
|
+
ctorParameters: () => []
|
|
939
|
+
});
|
|
940
|
+
var AutocompleteInputGroup = class AutocompleteInputGroup {
|
|
941
|
+
constructor() {
|
|
942
|
+
this.root = inject(AutocompleteRoot);
|
|
943
|
+
this.state = computed(() => ({
|
|
944
|
+
open: this.root.overlay.open(),
|
|
945
|
+
disabled: this.root.isDisabled()
|
|
946
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
947
|
+
this.data = computed(() => dataValues(this.state()), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
948
|
+
registerHost(this.root.inputGroup);
|
|
949
|
+
}
|
|
950
|
+
onMouseDown(event) {
|
|
951
|
+
const root = this.root;
|
|
952
|
+
const target = event.target;
|
|
953
|
+
const input = root.overlay.trigger();
|
|
954
|
+
if (target === null || target === input || target.closest("button") !== null) return;
|
|
955
|
+
event.preventDefault();
|
|
956
|
+
if (root.isDisabled()) return;
|
|
957
|
+
input?.focus();
|
|
958
|
+
if (root.openOnInputClick() && !root.overlay.open()) root.setOpen(true, "input-press", event);
|
|
959
|
+
}
|
|
960
|
+
static {
|
|
961
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
962
|
+
minVersion: "12.0.0",
|
|
963
|
+
version: "22.2.6",
|
|
964
|
+
ngImport: i0,
|
|
965
|
+
type: AutocompleteInputGroup,
|
|
966
|
+
deps: [],
|
|
967
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
static {
|
|
971
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
972
|
+
minVersion: "14.0.0",
|
|
973
|
+
version: "22.2.6",
|
|
974
|
+
type: AutocompleteInputGroup,
|
|
975
|
+
isStandalone: true,
|
|
976
|
+
selector: "[autocompleteInputGroup]",
|
|
977
|
+
host: {
|
|
978
|
+
attributes: {
|
|
979
|
+
"role": "group",
|
|
980
|
+
"data-primitives-part": "autocomplete-input-group"
|
|
981
|
+
},
|
|
982
|
+
listeners: { "mousedown": "onMouseDown($event)" },
|
|
983
|
+
properties: {
|
|
984
|
+
"attr.data-popup-open": "data().open",
|
|
985
|
+
"attr.data-disabled": "data().disabled"
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
exportAs: ["autocompleteInputGroup"],
|
|
989
|
+
ngImport: i0
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
994
|
+
minVersion: "12.0.0",
|
|
995
|
+
version: "22.2.6",
|
|
996
|
+
ngImport: i0,
|
|
997
|
+
type: AutocompleteInputGroup,
|
|
998
|
+
decorators: [{
|
|
999
|
+
type: Directive,
|
|
1000
|
+
args: [{
|
|
1001
|
+
selector: "[autocompleteInputGroup]",
|
|
1002
|
+
exportAs: "autocompleteInputGroup",
|
|
1003
|
+
host: {
|
|
1004
|
+
role: "group",
|
|
1005
|
+
"data-primitives-part": "autocomplete-input-group",
|
|
1006
|
+
"[attr.data-popup-open]": "data().open",
|
|
1007
|
+
"[attr.data-disabled]": "data().disabled",
|
|
1008
|
+
"(mousedown)": "onMouseDown($event)"
|
|
1009
|
+
}
|
|
1010
|
+
}]
|
|
1011
|
+
}],
|
|
1012
|
+
ctorParameters: () => []
|
|
1013
|
+
});
|
|
1014
|
+
var AutocompleteItem = class AutocompleteItem {
|
|
1015
|
+
constructor() {
|
|
1016
|
+
this.root = inject(AutocompleteRoot);
|
|
1017
|
+
this.value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1018
|
+
this.disabled = input(false, {
|
|
1019
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
1020
|
+
transform: booleanAttribute
|
|
1021
|
+
});
|
|
1022
|
+
this.id = injectId("primitives-autocomplete-item");
|
|
1023
|
+
this.state = computed(() => ({
|
|
1024
|
+
highlighted: this.root.highlighted() === this.id,
|
|
1025
|
+
disabled: this.disabled()
|
|
1026
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
1027
|
+
this.data = computed(() => dataValues(this.state()), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
1028
|
+
const host = injectHost();
|
|
1029
|
+
const root = this.root;
|
|
1030
|
+
let unregister = null;
|
|
1031
|
+
effect(() => {
|
|
1032
|
+
const value = this.value();
|
|
1033
|
+
const disabled = this.disabled();
|
|
1034
|
+
untracked(() => {
|
|
1035
|
+
unregister?.();
|
|
1036
|
+
unregister = root.registerItem(host, {
|
|
1037
|
+
value,
|
|
1038
|
+
disabled,
|
|
1039
|
+
id: this.id
|
|
1040
|
+
});
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
inject(DestroyRef).onDestroy(() => unregister?.());
|
|
1044
|
+
afterRenderEffect(() => {
|
|
1045
|
+
if (this.state().highlighted) scrollIntoViewWithin(host, this.root.overlay.positioner());
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
onPointerMove() {
|
|
1049
|
+
if (!this.state().highlighted) this.root.highlight(this.id, "pointer");
|
|
1050
|
+
}
|
|
1051
|
+
onClick(event) {
|
|
1052
|
+
if (!this.disabled()) this.root.choose(this.value(), event);
|
|
1053
|
+
}
|
|
1054
|
+
static {
|
|
1055
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1056
|
+
minVersion: "12.0.0",
|
|
1057
|
+
version: "22.2.6",
|
|
1058
|
+
ngImport: i0,
|
|
1059
|
+
type: AutocompleteItem,
|
|
1060
|
+
deps: [],
|
|
1061
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
static {
|
|
1065
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1066
|
+
minVersion: "17.1.0",
|
|
1067
|
+
version: "22.2.6",
|
|
1068
|
+
type: AutocompleteItem,
|
|
1069
|
+
isStandalone: true,
|
|
1070
|
+
selector: "[autocompleteItem]",
|
|
1071
|
+
inputs: {
|
|
1072
|
+
value: {
|
|
1073
|
+
classPropertyName: "value",
|
|
1074
|
+
publicName: "value",
|
|
1075
|
+
isSignal: true,
|
|
1076
|
+
isRequired: true,
|
|
1077
|
+
transformFunction: null
|
|
1078
|
+
},
|
|
1079
|
+
disabled: {
|
|
1080
|
+
classPropertyName: "disabled",
|
|
1081
|
+
publicName: "disabled",
|
|
1082
|
+
isSignal: true,
|
|
1083
|
+
isRequired: false,
|
|
1084
|
+
transformFunction: null
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
host: {
|
|
1088
|
+
attributes: {
|
|
1089
|
+
"role": "option",
|
|
1090
|
+
"data-primitives-part": "autocomplete-item"
|
|
1091
|
+
},
|
|
1092
|
+
listeners: {
|
|
1093
|
+
"pointermove": "onPointerMove()",
|
|
1094
|
+
"pointerdown": "$event.preventDefault()",
|
|
1095
|
+
"click": "onClick($event)"
|
|
1096
|
+
},
|
|
1097
|
+
properties: {
|
|
1098
|
+
"attr.id": "id",
|
|
1099
|
+
"attr.aria-disabled": "state().disabled ? 'true' : null",
|
|
1100
|
+
"attr.data-highlighted": "data().highlighted",
|
|
1101
|
+
"attr.data-disabled": "data().disabled"
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
exportAs: ["autocompleteItem"],
|
|
1105
|
+
ngImport: i0
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1110
|
+
minVersion: "12.0.0",
|
|
1111
|
+
version: "22.2.6",
|
|
1112
|
+
ngImport: i0,
|
|
1113
|
+
type: AutocompleteItem,
|
|
1114
|
+
decorators: [{
|
|
1115
|
+
type: Directive,
|
|
1116
|
+
args: [{
|
|
1117
|
+
selector: "[autocompleteItem]",
|
|
1118
|
+
exportAs: "autocompleteItem",
|
|
1119
|
+
host: {
|
|
1120
|
+
role: "option",
|
|
1121
|
+
"data-primitives-part": "autocomplete-item",
|
|
1122
|
+
"[attr.id]": "id",
|
|
1123
|
+
"[attr.aria-disabled]": "state().disabled ? 'true' : null",
|
|
1124
|
+
"[attr.data-highlighted]": "data().highlighted",
|
|
1125
|
+
"[attr.data-disabled]": "data().disabled",
|
|
1126
|
+
"(pointermove)": "onPointerMove()",
|
|
1127
|
+
"(pointerdown)": "$event.preventDefault()",
|
|
1128
|
+
"(click)": "onClick($event)"
|
|
1129
|
+
}
|
|
1130
|
+
}]
|
|
1131
|
+
}],
|
|
1132
|
+
ctorParameters: () => [],
|
|
1133
|
+
propDecorators: {
|
|
1134
|
+
value: [{
|
|
1135
|
+
type: i0.Input,
|
|
1136
|
+
args: [{
|
|
1137
|
+
isSignal: true,
|
|
1138
|
+
alias: "value",
|
|
1139
|
+
required: true
|
|
1140
|
+
}]
|
|
1141
|
+
}],
|
|
1142
|
+
disabled: [{
|
|
1143
|
+
type: i0.Input,
|
|
1144
|
+
args: [{
|
|
1145
|
+
isSignal: true,
|
|
1146
|
+
alias: "disabled",
|
|
1147
|
+
required: false
|
|
1148
|
+
}]
|
|
1149
|
+
}]
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
var AutocompleteList = class AutocompleteList {
|
|
1153
|
+
constructor() {
|
|
1154
|
+
this.root = inject(AutocompleteRoot);
|
|
1155
|
+
this.entries = computed(() => this.root.entries(), ...ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []);
|
|
1156
|
+
this.state = computed(() => ({ empty: this.root.empty() }), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
1157
|
+
this.data = computed(() => dataValues(this.state()), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
1158
|
+
const root = this.root;
|
|
1159
|
+
registerHost(root.list);
|
|
1160
|
+
afterRenderEffect(() => {
|
|
1161
|
+
const list = root.list();
|
|
1162
|
+
const pending = root.pending();
|
|
1163
|
+
root.itemCount();
|
|
1164
|
+
root.entries();
|
|
1165
|
+
const open = root.overlay.open();
|
|
1166
|
+
if (list === null) return;
|
|
1167
|
+
untracked(() => {
|
|
1168
|
+
if (!root.itemsRegistered()) return;
|
|
1169
|
+
const items = root.orderedItems();
|
|
1170
|
+
if (pending !== null && open) {
|
|
1171
|
+
root.pending.set(null);
|
|
1172
|
+
if (pending === "complete") {
|
|
1173
|
+
const typed = root.value().toLowerCase();
|
|
1174
|
+
const match = items.find((item) => !item.disabled && root.label(item.value).toLowerCase().startsWith(typed));
|
|
1175
|
+
if (match !== void 0) root.complete(match);
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
const target = pending === "first" ? items[0] : items.at(-1);
|
|
1179
|
+
root.highlight(target?.id ?? null, "keyboard");
|
|
1180
|
+
return;
|
|
1181
|
+
}
|
|
1182
|
+
const highlighted = root.highlighted();
|
|
1183
|
+
if (highlighted !== null && !items.some((item) => item.id === highlighted)) root.highlight(null, "keyboard");
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
static {
|
|
1188
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1189
|
+
minVersion: "12.0.0",
|
|
1190
|
+
version: "22.2.6",
|
|
1191
|
+
ngImport: i0,
|
|
1192
|
+
type: AutocompleteList,
|
|
1193
|
+
deps: [],
|
|
1194
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
static {
|
|
1198
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1199
|
+
minVersion: "14.0.0",
|
|
1200
|
+
version: "22.2.6",
|
|
1201
|
+
type: AutocompleteList,
|
|
1202
|
+
isStandalone: true,
|
|
1203
|
+
selector: "[autocompleteList]",
|
|
1204
|
+
host: {
|
|
1205
|
+
attributes: {
|
|
1206
|
+
"role": "listbox",
|
|
1207
|
+
"data-primitives-part": "autocomplete-list"
|
|
1208
|
+
},
|
|
1209
|
+
properties: {
|
|
1210
|
+
"attr.id": "root.listId",
|
|
1211
|
+
"attr.data-empty": "data().empty"
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
exportAs: ["autocompleteList"],
|
|
1215
|
+
ngImport: i0
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
};
|
|
1219
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1220
|
+
minVersion: "12.0.0",
|
|
1221
|
+
version: "22.2.6",
|
|
1222
|
+
ngImport: i0,
|
|
1223
|
+
type: AutocompleteList,
|
|
1224
|
+
decorators: [{
|
|
1225
|
+
type: Directive,
|
|
1226
|
+
args: [{
|
|
1227
|
+
selector: "[autocompleteList]",
|
|
1228
|
+
exportAs: "autocompleteList",
|
|
1229
|
+
host: {
|
|
1230
|
+
role: "listbox",
|
|
1231
|
+
"data-primitives-part": "autocomplete-list",
|
|
1232
|
+
"[attr.id]": "root.listId",
|
|
1233
|
+
"[attr.data-empty]": "data().empty"
|
|
1234
|
+
}
|
|
1235
|
+
}]
|
|
1236
|
+
}],
|
|
1237
|
+
ctorParameters: () => []
|
|
1238
|
+
});
|
|
1239
|
+
var AutocompletePopup = class AutocompletePopup {
|
|
1240
|
+
constructor() {
|
|
1241
|
+
this.root = inject(AutocompleteRoot);
|
|
1242
|
+
this.state = computed(() => ({
|
|
1243
|
+
open: this.root.overlay.open(),
|
|
1244
|
+
...this.root.placed()
|
|
1245
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
1246
|
+
this.data = computed(() => {
|
|
1247
|
+
const status = this.root.overlay.presence.status();
|
|
1248
|
+
const state = this.state();
|
|
1249
|
+
return dataValues({
|
|
1250
|
+
...state,
|
|
1251
|
+
closed: !state.open,
|
|
1252
|
+
"starting-style": status === "starting",
|
|
1253
|
+
"ending-style": status === "ending"
|
|
1254
|
+
});
|
|
1255
|
+
}, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
1256
|
+
registerHost(this.root.overlay.popup);
|
|
1257
|
+
}
|
|
1258
|
+
static {
|
|
1259
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1260
|
+
minVersion: "12.0.0",
|
|
1261
|
+
version: "22.2.6",
|
|
1262
|
+
ngImport: i0,
|
|
1263
|
+
type: AutocompletePopup,
|
|
1264
|
+
deps: [],
|
|
1265
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
static {
|
|
1269
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1270
|
+
minVersion: "14.0.0",
|
|
1271
|
+
version: "22.2.6",
|
|
1272
|
+
type: AutocompletePopup,
|
|
1273
|
+
isStandalone: true,
|
|
1274
|
+
selector: "[autocompletePopup]",
|
|
1275
|
+
host: {
|
|
1276
|
+
attributes: { "data-primitives-part": "autocomplete-popup" },
|
|
1277
|
+
properties: {
|
|
1278
|
+
"attr.data-open": "data().open",
|
|
1279
|
+
"attr.data-closed": "data().closed",
|
|
1280
|
+
"attr.data-side": "data().side",
|
|
1281
|
+
"attr.data-align": "data().align",
|
|
1282
|
+
"attr.data-starting-style": "data()['starting-style']",
|
|
1283
|
+
"attr.data-ending-style": "data()['ending-style']"
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
exportAs: ["autocompletePopup"],
|
|
1287
|
+
ngImport: i0
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1292
|
+
minVersion: "12.0.0",
|
|
1293
|
+
version: "22.2.6",
|
|
1294
|
+
ngImport: i0,
|
|
1295
|
+
type: AutocompletePopup,
|
|
1296
|
+
decorators: [{
|
|
1297
|
+
type: Directive,
|
|
1298
|
+
args: [{
|
|
1299
|
+
selector: "[autocompletePopup]",
|
|
1300
|
+
exportAs: "autocompletePopup",
|
|
1301
|
+
host: {
|
|
1302
|
+
"data-primitives-part": "autocomplete-popup",
|
|
1303
|
+
"[attr.data-open]": "data().open",
|
|
1304
|
+
"[attr.data-closed]": "data().closed",
|
|
1305
|
+
"[attr.data-side]": "data().side",
|
|
1306
|
+
"[attr.data-align]": "data().align",
|
|
1307
|
+
"[attr.data-starting-style]": "data()['starting-style']",
|
|
1308
|
+
"[attr.data-ending-style]": "data()['ending-style']"
|
|
1309
|
+
}
|
|
1310
|
+
}]
|
|
1311
|
+
}],
|
|
1312
|
+
ctorParameters: () => []
|
|
1313
|
+
});
|
|
1314
|
+
var AutocompletePortal = class AutocompletePortal {
|
|
1315
|
+
constructor() {
|
|
1316
|
+
this.options = input({}, {
|
|
1317
|
+
...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
|
|
1318
|
+
alias: "autocompletePortal",
|
|
1319
|
+
transform: portalOptions
|
|
1320
|
+
});
|
|
1321
|
+
mountPortal(inject(AutocompleteRoot).overlay.presence.mounted, this.options);
|
|
1322
|
+
}
|
|
1323
|
+
static {
|
|
1324
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1325
|
+
minVersion: "12.0.0",
|
|
1326
|
+
version: "22.2.6",
|
|
1327
|
+
ngImport: i0,
|
|
1328
|
+
type: AutocompletePortal,
|
|
1329
|
+
deps: [],
|
|
1330
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
static {
|
|
1334
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1335
|
+
minVersion: "17.1.0",
|
|
1336
|
+
version: "22.2.6",
|
|
1337
|
+
type: AutocompletePortal,
|
|
1338
|
+
isStandalone: true,
|
|
1339
|
+
selector: "[autocompletePortal]",
|
|
1340
|
+
inputs: { options: {
|
|
1341
|
+
classPropertyName: "options",
|
|
1342
|
+
publicName: "autocompletePortal",
|
|
1343
|
+
isSignal: true,
|
|
1344
|
+
isRequired: false,
|
|
1345
|
+
transformFunction: null
|
|
1346
|
+
} },
|
|
1347
|
+
ngImport: i0
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
};
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1352
|
+
minVersion: "12.0.0",
|
|
1353
|
+
version: "22.2.6",
|
|
1354
|
+
ngImport: i0,
|
|
1355
|
+
type: AutocompletePortal,
|
|
1356
|
+
decorators: [{
|
|
1357
|
+
type: Directive,
|
|
1358
|
+
args: [{ selector: "[autocompletePortal]" }]
|
|
1359
|
+
}],
|
|
1360
|
+
ctorParameters: () => [],
|
|
1361
|
+
propDecorators: { options: [{
|
|
1362
|
+
type: i0.Input,
|
|
1363
|
+
args: [{
|
|
1364
|
+
isSignal: true,
|
|
1365
|
+
alias: "autocompletePortal",
|
|
1366
|
+
required: false
|
|
1367
|
+
}]
|
|
1368
|
+
}] }
|
|
1369
|
+
});
|
|
1370
|
+
var AutocompletePositioner = class AutocompletePositioner {
|
|
1371
|
+
constructor() {
|
|
1372
|
+
this.root = inject(AutocompleteRoot);
|
|
1373
|
+
this.side = input(void 0, ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
|
|
1374
|
+
this.align = input(void 0, ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
1375
|
+
this.sideOffset = input(void 0, ...ngDevMode ? [{ debugName: "sideOffset" }] : /* istanbul ignore next */ []);
|
|
1376
|
+
this.alignOffset = input(void 0, ...ngDevMode ? [{ debugName: "alignOffset" }] : /* istanbul ignore next */ []);
|
|
1377
|
+
this.collisionPadding = input(void 0, ...ngDevMode ? [{ debugName: "collisionPadding" }] : /* istanbul ignore next */ []);
|
|
1378
|
+
this.anchor = input(void 0, ...ngDevMode ? [{ debugName: "anchor" }] : /* istanbul ignore next */ []);
|
|
1379
|
+
this.state = computed(() => ({
|
|
1380
|
+
open: this.root.overlay.open(),
|
|
1381
|
+
...this.root.placed()
|
|
1382
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
1383
|
+
this.data = computed(() => dataValues({
|
|
1384
|
+
...this.state(),
|
|
1385
|
+
closed: !this.state().open
|
|
1386
|
+
}), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
1387
|
+
const root = this.root;
|
|
1388
|
+
const overlay = root.overlay;
|
|
1389
|
+
const positioner = registerHost(overlay.positioner);
|
|
1390
|
+
positionOverlay(this, {
|
|
1391
|
+
side: "bottom",
|
|
1392
|
+
align: "start"
|
|
1393
|
+
}, {
|
|
1394
|
+
anchor: computed(() => root.inputGroup() ?? overlay.trigger()),
|
|
1395
|
+
positioner,
|
|
1396
|
+
mounted: overlay.presence.mounted
|
|
1397
|
+
}, root.placed);
|
|
1398
|
+
afterRenderEffect((onCleanup) => {
|
|
1399
|
+
const open = overlay.open();
|
|
1400
|
+
const ignored = [
|
|
1401
|
+
overlay.trigger(),
|
|
1402
|
+
root.button(),
|
|
1403
|
+
root.inputGroup(),
|
|
1404
|
+
root.clearButton()
|
|
1405
|
+
];
|
|
1406
|
+
if (!open) return;
|
|
1407
|
+
untracked(() => {
|
|
1408
|
+
onCleanup(openOverlaySession(positioner.ownerDocument, {
|
|
1409
|
+
elements: () => [positioner],
|
|
1410
|
+
ignore: () => ignored,
|
|
1411
|
+
dismiss: (reason, event) => root.setOpen(false, reason, event)
|
|
1412
|
+
}).end);
|
|
1413
|
+
});
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
static {
|
|
1417
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1418
|
+
minVersion: "12.0.0",
|
|
1419
|
+
version: "22.2.6",
|
|
1420
|
+
ngImport: i0,
|
|
1421
|
+
type: AutocompletePositioner,
|
|
1422
|
+
deps: [],
|
|
1423
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
static {
|
|
1427
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1428
|
+
minVersion: "17.1.0",
|
|
1429
|
+
version: "22.2.6",
|
|
1430
|
+
type: AutocompletePositioner,
|
|
1431
|
+
isStandalone: true,
|
|
1432
|
+
selector: "[autocompletePositioner]",
|
|
1433
|
+
inputs: {
|
|
1434
|
+
side: {
|
|
1435
|
+
classPropertyName: "side",
|
|
1436
|
+
publicName: "side",
|
|
1437
|
+
isSignal: true,
|
|
1438
|
+
isRequired: false,
|
|
1439
|
+
transformFunction: null
|
|
1440
|
+
},
|
|
1441
|
+
align: {
|
|
1442
|
+
classPropertyName: "align",
|
|
1443
|
+
publicName: "align",
|
|
1444
|
+
isSignal: true,
|
|
1445
|
+
isRequired: false,
|
|
1446
|
+
transformFunction: null
|
|
1447
|
+
},
|
|
1448
|
+
sideOffset: {
|
|
1449
|
+
classPropertyName: "sideOffset",
|
|
1450
|
+
publicName: "sideOffset",
|
|
1451
|
+
isSignal: true,
|
|
1452
|
+
isRequired: false,
|
|
1453
|
+
transformFunction: null
|
|
1454
|
+
},
|
|
1455
|
+
alignOffset: {
|
|
1456
|
+
classPropertyName: "alignOffset",
|
|
1457
|
+
publicName: "alignOffset",
|
|
1458
|
+
isSignal: true,
|
|
1459
|
+
isRequired: false,
|
|
1460
|
+
transformFunction: null
|
|
1461
|
+
},
|
|
1462
|
+
collisionPadding: {
|
|
1463
|
+
classPropertyName: "collisionPadding",
|
|
1464
|
+
publicName: "collisionPadding",
|
|
1465
|
+
isSignal: true,
|
|
1466
|
+
isRequired: false,
|
|
1467
|
+
transformFunction: null
|
|
1468
|
+
},
|
|
1469
|
+
anchor: {
|
|
1470
|
+
classPropertyName: "anchor",
|
|
1471
|
+
publicName: "anchor",
|
|
1472
|
+
isSignal: true,
|
|
1473
|
+
isRequired: false,
|
|
1474
|
+
transformFunction: null
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
host: {
|
|
1478
|
+
attributes: {
|
|
1479
|
+
"role": "presentation",
|
|
1480
|
+
"data-primitives-part": "autocomplete-positioner"
|
|
1481
|
+
},
|
|
1482
|
+
properties: {
|
|
1483
|
+
"attr.hidden": "root.overlay.presence.mounted() ? null : ''",
|
|
1484
|
+
"attr.data-open": "data().open",
|
|
1485
|
+
"attr.data-closed": "data().closed",
|
|
1486
|
+
"attr.data-side": "data().side",
|
|
1487
|
+
"attr.data-align": "data().align"
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
exportAs: ["autocompletePositioner"],
|
|
1491
|
+
ngImport: i0
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1496
|
+
minVersion: "12.0.0",
|
|
1497
|
+
version: "22.2.6",
|
|
1498
|
+
ngImport: i0,
|
|
1499
|
+
type: AutocompletePositioner,
|
|
1500
|
+
decorators: [{
|
|
1501
|
+
type: Directive,
|
|
1502
|
+
args: [{
|
|
1503
|
+
selector: "[autocompletePositioner]",
|
|
1504
|
+
exportAs: "autocompletePositioner",
|
|
1505
|
+
host: {
|
|
1506
|
+
role: "presentation",
|
|
1507
|
+
"data-primitives-part": "autocomplete-positioner",
|
|
1508
|
+
"[attr.hidden]": "root.overlay.presence.mounted() ? null : ''",
|
|
1509
|
+
"[attr.data-open]": "data().open",
|
|
1510
|
+
"[attr.data-closed]": "data().closed",
|
|
1511
|
+
"[attr.data-side]": "data().side",
|
|
1512
|
+
"[attr.data-align]": "data().align"
|
|
1513
|
+
}
|
|
1514
|
+
}]
|
|
1515
|
+
}],
|
|
1516
|
+
ctorParameters: () => [],
|
|
1517
|
+
propDecorators: {
|
|
1518
|
+
side: [{
|
|
1519
|
+
type: i0.Input,
|
|
1520
|
+
args: [{
|
|
1521
|
+
isSignal: true,
|
|
1522
|
+
alias: "side",
|
|
1523
|
+
required: false
|
|
1524
|
+
}]
|
|
1525
|
+
}],
|
|
1526
|
+
align: [{
|
|
1527
|
+
type: i0.Input,
|
|
1528
|
+
args: [{
|
|
1529
|
+
isSignal: true,
|
|
1530
|
+
alias: "align",
|
|
1531
|
+
required: false
|
|
1532
|
+
}]
|
|
1533
|
+
}],
|
|
1534
|
+
sideOffset: [{
|
|
1535
|
+
type: i0.Input,
|
|
1536
|
+
args: [{
|
|
1537
|
+
isSignal: true,
|
|
1538
|
+
alias: "sideOffset",
|
|
1539
|
+
required: false
|
|
1540
|
+
}]
|
|
1541
|
+
}],
|
|
1542
|
+
alignOffset: [{
|
|
1543
|
+
type: i0.Input,
|
|
1544
|
+
args: [{
|
|
1545
|
+
isSignal: true,
|
|
1546
|
+
alias: "alignOffset",
|
|
1547
|
+
required: false
|
|
1548
|
+
}]
|
|
1549
|
+
}],
|
|
1550
|
+
collisionPadding: [{
|
|
1551
|
+
type: i0.Input,
|
|
1552
|
+
args: [{
|
|
1553
|
+
isSignal: true,
|
|
1554
|
+
alias: "collisionPadding",
|
|
1555
|
+
required: false
|
|
1556
|
+
}]
|
|
1557
|
+
}],
|
|
1558
|
+
anchor: [{
|
|
1559
|
+
type: i0.Input,
|
|
1560
|
+
args: [{
|
|
1561
|
+
isSignal: true,
|
|
1562
|
+
alias: "anchor",
|
|
1563
|
+
required: false
|
|
1564
|
+
}]
|
|
1565
|
+
}]
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
var AutocompleteSeparator = class AutocompleteSeparator {
|
|
1569
|
+
static {
|
|
1570
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1571
|
+
minVersion: "12.0.0",
|
|
1572
|
+
version: "22.2.6",
|
|
1573
|
+
ngImport: i0,
|
|
1574
|
+
type: AutocompleteSeparator,
|
|
1575
|
+
deps: [],
|
|
1576
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1577
|
+
});
|
|
1578
|
+
}
|
|
1579
|
+
static {
|
|
1580
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1581
|
+
minVersion: "14.0.0",
|
|
1582
|
+
version: "22.2.6",
|
|
1583
|
+
type: AutocompleteSeparator,
|
|
1584
|
+
isStandalone: true,
|
|
1585
|
+
selector: "[autocompleteSeparator]",
|
|
1586
|
+
host: { attributes: {
|
|
1587
|
+
"role": "presentation",
|
|
1588
|
+
"data-orientation": "horizontal",
|
|
1589
|
+
"data-primitives-part": "autocomplete-separator"
|
|
1590
|
+
} },
|
|
1591
|
+
ngImport: i0
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
};
|
|
1595
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1596
|
+
minVersion: "12.0.0",
|
|
1597
|
+
version: "22.2.6",
|
|
1598
|
+
ngImport: i0,
|
|
1599
|
+
type: AutocompleteSeparator,
|
|
1600
|
+
decorators: [{
|
|
1601
|
+
type: Directive,
|
|
1602
|
+
args: [{
|
|
1603
|
+
selector: "[autocompleteSeparator]",
|
|
1604
|
+
host: {
|
|
1605
|
+
role: "presentation",
|
|
1606
|
+
"data-orientation": "horizontal",
|
|
1607
|
+
"data-primitives-part": "autocomplete-separator"
|
|
1608
|
+
}
|
|
1609
|
+
}]
|
|
1610
|
+
}]
|
|
1611
|
+
});
|
|
1612
|
+
var AutocompleteStatus = class AutocompleteStatus {
|
|
1613
|
+
static {
|
|
1614
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1615
|
+
minVersion: "12.0.0",
|
|
1616
|
+
version: "22.2.6",
|
|
1617
|
+
ngImport: i0,
|
|
1618
|
+
type: AutocompleteStatus,
|
|
1619
|
+
deps: [],
|
|
1620
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
static {
|
|
1624
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1625
|
+
minVersion: "14.0.0",
|
|
1626
|
+
version: "22.2.6",
|
|
1627
|
+
type: AutocompleteStatus,
|
|
1628
|
+
isStandalone: true,
|
|
1629
|
+
selector: "[autocompleteStatus]",
|
|
1630
|
+
host: { attributes: {
|
|
1631
|
+
"role": "status",
|
|
1632
|
+
"aria-live": "polite",
|
|
1633
|
+
"aria-atomic": "true",
|
|
1634
|
+
"data-primitives-part": "autocomplete-status"
|
|
1635
|
+
} },
|
|
1636
|
+
ngImport: i0
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
};
|
|
1640
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1641
|
+
minVersion: "12.0.0",
|
|
1642
|
+
version: "22.2.6",
|
|
1643
|
+
ngImport: i0,
|
|
1644
|
+
type: AutocompleteStatus,
|
|
1645
|
+
decorators: [{
|
|
1646
|
+
type: Directive,
|
|
1647
|
+
args: [{
|
|
1648
|
+
selector: "[autocompleteStatus]",
|
|
1649
|
+
host: {
|
|
1650
|
+
role: "status",
|
|
1651
|
+
"aria-live": "polite",
|
|
1652
|
+
"aria-atomic": "true",
|
|
1653
|
+
"data-primitives-part": "autocomplete-status"
|
|
1654
|
+
}
|
|
1655
|
+
}]
|
|
1656
|
+
}]
|
|
1657
|
+
});
|
|
1658
|
+
var AutocompleteTrigger = class AutocompleteTrigger {
|
|
1659
|
+
constructor() {
|
|
1660
|
+
this.root = inject(AutocompleteRoot);
|
|
1661
|
+
this.state = computed(() => ({
|
|
1662
|
+
open: this.root.overlay.open(),
|
|
1663
|
+
disabled: this.root.isDisabled()
|
|
1664
|
+
}), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
1665
|
+
this.data = computed(() => dataValues(this.state()), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
1666
|
+
this.String = String;
|
|
1667
|
+
registerHost(this.root.button);
|
|
1668
|
+
}
|
|
1669
|
+
onClick(event) {
|
|
1670
|
+
const root = this.root;
|
|
1671
|
+
root.pending.set(null);
|
|
1672
|
+
root.setOpen(!root.overlay.open(), "trigger-press", event);
|
|
1673
|
+
root.overlay.trigger()?.focus();
|
|
1674
|
+
}
|
|
1675
|
+
static {
|
|
1676
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1677
|
+
minVersion: "12.0.0",
|
|
1678
|
+
version: "22.2.6",
|
|
1679
|
+
ngImport: i0,
|
|
1680
|
+
type: AutocompleteTrigger,
|
|
1681
|
+
deps: [],
|
|
1682
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
static {
|
|
1686
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1687
|
+
minVersion: "14.0.0",
|
|
1688
|
+
version: "22.2.6",
|
|
1689
|
+
type: AutocompleteTrigger,
|
|
1690
|
+
isStandalone: true,
|
|
1691
|
+
selector: "[autocompleteTrigger]",
|
|
1692
|
+
host: {
|
|
1693
|
+
attributes: {
|
|
1694
|
+
"type": "button",
|
|
1695
|
+
"tabindex": "-1",
|
|
1696
|
+
"data-primitives-part": "autocomplete-trigger"
|
|
1697
|
+
},
|
|
1698
|
+
listeners: {
|
|
1699
|
+
"pointerdown": "$event.preventDefault()",
|
|
1700
|
+
"click": "onClick($event)"
|
|
1701
|
+
},
|
|
1702
|
+
properties: {
|
|
1703
|
+
"attr.disabled": "data().disabled",
|
|
1704
|
+
"attr.aria-expanded": "String(state().open)",
|
|
1705
|
+
"attr.aria-controls": "root.listId",
|
|
1706
|
+
"attr.data-popup-open": "data().open",
|
|
1707
|
+
"attr.data-disabled": "data().disabled"
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
exportAs: ["autocompleteTrigger"],
|
|
1711
|
+
ngImport: i0
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1716
|
+
minVersion: "12.0.0",
|
|
1717
|
+
version: "22.2.6",
|
|
1718
|
+
ngImport: i0,
|
|
1719
|
+
type: AutocompleteTrigger,
|
|
1720
|
+
decorators: [{
|
|
1721
|
+
type: Directive,
|
|
1722
|
+
args: [{
|
|
1723
|
+
selector: "[autocompleteTrigger]",
|
|
1724
|
+
exportAs: "autocompleteTrigger",
|
|
1725
|
+
host: {
|
|
1726
|
+
type: "button",
|
|
1727
|
+
tabindex: "-1",
|
|
1728
|
+
"data-primitives-part": "autocomplete-trigger",
|
|
1729
|
+
"[attr.disabled]": "data().disabled",
|
|
1730
|
+
"[attr.aria-expanded]": "String(state().open)",
|
|
1731
|
+
"[attr.aria-controls]": "root.listId",
|
|
1732
|
+
"[attr.data-popup-open]": "data().open",
|
|
1733
|
+
"[attr.data-disabled]": "data().disabled",
|
|
1734
|
+
"(pointerdown)": "$event.preventDefault()",
|
|
1735
|
+
"(click)": "onClick($event)"
|
|
1736
|
+
}
|
|
1737
|
+
}]
|
|
1738
|
+
}],
|
|
1739
|
+
ctorParameters: () => []
|
|
1740
|
+
});
|
|
1741
|
+
function injectAutocomplete() {
|
|
1742
|
+
const root = injectEnclosing(AutocompleteRoot, "autocompleteRoot", "injectAutocomplete");
|
|
1743
|
+
return {
|
|
1744
|
+
state: root.state,
|
|
1745
|
+
choose: (item) => root.choose(item),
|
|
1746
|
+
clear: () => root.clear("none")
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
export { AutocompleteClear, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRoot, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, injectAutocomplete };
|
|
1750
|
+
|
|
1751
|
+
//# sourceMappingURL=fragiola-primitives-angular-autocomplete.mjs.map
|