@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 @@
|
|
|
1
|
+
{"version":3,"file":"fragiola-primitives-angular-tags-input.mjs","names":[],"sources":["../../tags-input/utils/composing.ts","../../tags-input/directives/tags-input-root.directive.ts","../../tags-input/directives/tags-input-clear-trigger.directive.ts","../../tags-input/directives/tags-input-control.directive.ts","../../tags-input/directives/tags-input-input.directive.ts","../../tags-input/directives/tags-input-tag.directive.ts","../../tags-input/directives/tags-input-tag-input.directive.ts","../../tags-input/directives/tags-input-tag-remove.directive.ts","../../tags-input/directives/tags-input-tag-text.directive.ts"],"sourcesContent":["/** A key of a text composition (an IME), which the TagsInput leaves alone. */\nexport function composing(event: KeyboardEvent): boolean {\n return event.isComposing || event.keyCode === 229;\n}\n","import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n inject,\n input,\n output,\n signal,\n untracked,\n} from \"@angular/core\";\nimport {\n tagsInputInputKeyTarget,\n tagsInputTagKeyTarget,\n} from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport {\n bridgeForm,\n editTag,\n type RefusedTag,\n type TagRefusal,\n type TagRules,\n takeTags,\n typesDelimiter,\n VISUALLY_HIDDEN_INPUT_STYLE,\n} from \"@fragiola/primitives/form\";\nimport { fieldControl } from \"@fragiola/primitives-angular/field\";\nimport {\n type ChangeDetails,\n type ChangeReason,\n controllable,\n dataValues,\n injectFlush,\n injectHost,\n injectProvidedDirection,\n type ValueChangeEvent,\n} from \"@fragiola/primitives-angular/internal\";\nimport { composing } from \"../utils/composing.ts\";\n\n/** What `(valueInvalid)` reports: why the text was refused (spec/tags-input.md, \"API\"). */\nexport interface TagsInputInvalidDetails extends ChangeDetails {\n cause: TagRefusal;\n}\n\n/** What `(valueInvalid)` emits: the refused text and why. */\nexport interface TagsInputInvalidEvent {\n value: string;\n details: TagsInputInvalidDetails;\n}\n\nexport interface TagsInputRootState {\n disabled: boolean;\n empty: boolean;\n}\n\n/** The tag being edited in its TagInput, and its text. */\nexport interface TagsInputEdit {\n index: number;\n text: string;\n}\n\nconst NONE: readonly string[] = [];\nconst TAG_SELECTOR = '[data-primitives-part=\"tags-input-tag\"]';\nconst HIDDEN_PART = \"tags-input-hidden-input\";\n\n/**\n * A text input that turns what is typed into tags (spec/tags-input.md): adding, removing and\n * editing tags, their keys and focus, the hidden form inputs (appended as its last children) and\n * the Field binding. The consumer renders one `[tagsInputTag]` per value, from `tags()`:\n * `<div tagsInputRoot #root=\"tagsInputRoot\" [defaultValue]=\"['react']\"><div tagsInputControl>\n * @for (tag of root.tags(); track $index) { <div tagsInputTag [index]=\"$index\">...</div> }\n * <input tagsInputInput id=\"tags\" /></div></div>`.\n */\n@Directive({\n selector: \"[tagsInputRoot]\",\n exportAs: \"tagsInputRoot\",\n host: {\n \"data-primitives-part\": \"tags-input-root\",\n \"[attr.data-invalid]\": \"field.data().invalid\",\n \"[attr.data-valid]\": \"field.data().valid\",\n \"[attr.data-dirty]\": \"field.data().dirty\",\n \"[attr.data-touched]\": \"field.data().touched\",\n \"[attr.data-filled]\": \"field.data().filled\",\n \"[attr.data-focused]\": \"field.data().focused\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"[attr.data-empty]\": \"data().empty\",\n \"(focusin)\": \"field.focused()\",\n \"(focusout)\": \"onFocusOut($event)\",\n },\n})\nexport class TagsInputRoot {\n /** The tags, in order (controlled, `[(value)]`); `tags()` is the current list. */\n readonly value = input<readonly string[] | undefined>(undefined);\n readonly valueChange = output<readonly string[]>();\n readonly defaultValue = input<readonly string[] | undefined>(undefined);\n readonly valueChangeDetails = output<ValueChangeEvent<readonly string[]>>();\n /** The Input's text (controlled, `[(inputValue)]`); `text()` is the current one. */\n readonly inputValue = input<string | undefined>(undefined);\n readonly inputValueChange = output<string>();\n readonly defaultInputValue = input<string | undefined>(undefined);\n readonly inputValueChangeDetails = output<ValueChangeEvent<string>>();\n /** A text was refused as a tag: a duplicate, past `max`, or refused by `validate`. */\n readonly valueInvalid = output<TagsInputInvalidEvent>();\n /** Ends a tag while typing and splits a paste (default `\",\"`); `null` for none. */\n readonly delimiter = input<string | null>(\",\");\n /** The most tags (default `Infinity`). */\n readonly max = input(Number.POSITIVE_INFINITY);\n /** A text equal to a tag is accepted (default `false`). */\n readonly allowDuplicates = input(false, { transform: booleanAttribute });\n /** `false` refuses a trimmed text; `value` is the tags it would join. */\n readonly validate = input<\n ((tag: string, value: readonly string[]) => boolean) | undefined\n >(undefined);\n /** Leaving the TagsInput adds the text as tags, or clears it (default: it stays). */\n readonly blurBehavior = input<\"add\" | \"clear\" | undefined>(undefined);\n /** Enter and a double press on a Tag edit it in its TagInput (default `false`). */\n readonly editable = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly name = input<string | undefined>(undefined);\n /** The form's validation fails while there is no tag. */\n readonly required = input(false, { transform: booleanAttribute });\n\n private readonly host = injectHost();\n private readonly direction = injectProvidedDirection();\n private readonly flush = injectFlush();\n private readonly selection = controllable<readonly string[], ChangeDetails>(\n this.value,\n this.valueChange,\n () => this.defaultValue() ?? NONE,\n (value, details) => this.valueChangeDetails.emit({ value, details }),\n );\n private readonly typed = controllable<string, ChangeDetails>(\n this.inputValue,\n this.inputValueChange,\n () => this.defaultInputValue() ?? \"\",\n (value, details) =>\n this.inputValueChangeDetails.emit({ value, details }),\n );\n /** The tags, in order: the consumer renders one Tag per entry. */\n readonly tags = computed(() => this.selection.value());\n /** The Input's text. */\n readonly text = computed(() => this.typed.value());\n /** The tag being edited, and its text. */\n readonly editing = signal<TagsInputEdit | null>(null);\n /** The Input, registered by `[tagsInputInput]`, and its id. */\n readonly input = signal<HTMLInputElement | null>(null);\n readonly inputId = signal<string | undefined>(undefined);\n private readonly validation: HTMLInputElement;\n\n /** Inside a `[fieldRoot]`, the Input is the labelable control (spec/tags-input.md, \"Forms\"). */\n readonly field = fieldControl({\n id: this.inputId,\n labelable: true,\n value: this.tags,\n filled: computed(() => this.tags().length > 0),\n input: () => this.validation,\n focusTarget: () => untracked(this.input),\n });\n /** Its own `disabled`, or the field's. */\n readonly isDisabled = computed(\n () => this.disabled() || this.field.disabled(),\n );\n /** The hidden inputs' name: its Field's, which wins, or its own. */\n readonly formName = computed(() => this.field.name() ?? this.name());\n readonly empty = computed(() => this.tags().length === 0);\n readonly state = computed<TagsInputRootState>(() => ({\n disabled: this.isDisabled(),\n empty: this.empty(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n const host = this.host;\n // the hidden inputs are the Root's last children, as React renders them; inserted after the\n // first render, never on a server nor during a hydration (spec/README.md, \"Server rendering\")\n const validation = host.ownerDocument.createElement(\"input\");\n validation.setAttribute(\"aria-hidden\", \"true\");\n validation.tabIndex = -1;\n validation.value = \"\";\n validation.setAttribute(\"data-primitives-part\", HIDDEN_PART);\n Object.assign(validation.style, VISUALLY_HIDDEN_INPUT_STYLE);\n this.validation = validation;\n const hidden: HTMLInputElement[] = [];\n let mounted = false;\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n mounted = true;\n host.appendChild(validation);\n stop = bridgeForm(validation, {\n reset: () => {\n this.field.reset();\n this.editing.set(null);\n this.selection.set(untracked(this.defaultValue) ?? NONE, {\n reason: \"none\",\n });\n this.typed.set(untracked(this.defaultInputValue) ?? \"\", {\n reason: \"none\",\n });\n },\n invalid: () => untracked(this.input),\n });\n this.writeInputs(hidden);\n });\n afterRenderEffect({\n write: () => {\n this.tags();\n this.formName();\n this.isDisabled();\n this.required();\n if (mounted) {\n untracked(() => this.writeInputs(hidden));\n }\n },\n });\n inject(DestroyRef).onDestroy(() => {\n stop?.();\n validation.remove();\n for (const element of hidden) {\n element.remove();\n }\n });\n }\n\n /** Writes the hidden inputs: the validation input, then one `type=\"hidden\"` per tag (named). */\n private writeInputs(hidden: HTMLInputElement[]): void {\n const validation = this.validation;\n const tags = this.tags();\n const name = this.formName();\n const disabled = this.isDisabled();\n validation.required = this.required() && tags.length === 0;\n validation.disabled = disabled;\n const values = name === undefined ? NONE : tags;\n while (hidden.length > values.length) {\n hidden.pop()?.remove();\n }\n while (hidden.length < values.length) {\n const element = this.host.ownerDocument.createElement(\"input\");\n element.type = \"hidden\";\n element.setAttribute(\"data-primitives-part\", HIDDEN_PART);\n hidden.push(element);\n }\n let previous: Node = validation;\n for (const [index, element] of hidden.entries()) {\n element.name = name ?? \"\";\n element.value = values[index] ?? \"\";\n element.disabled = disabled;\n if (previous.nextSibling !== element) {\n this.host.insertBefore(element, previous.nextSibling);\n }\n previous = element;\n }\n }\n\n private rules(): TagRules {\n return untracked(() => ({\n delimiter: this.delimiter(),\n max: this.max(),\n allowDuplicates: this.allowDuplicates(),\n validate: this.validate(),\n }));\n }\n\n /** The rendered Tags, in order. */\n private tagElements(): HTMLElement[] {\n return [...this.host.querySelectorAll<HTMLElement>(TAG_SELECTOR)];\n }\n\n /** Focuses the Input. */\n focusInput(): void {\n untracked(this.input)?.focus();\n }\n\n private focusTag(target: number | \"input\"): void {\n if (target === \"input\") {\n this.focusInput();\n } else {\n this.tagElements()[target]?.focus();\n }\n }\n\n /** Puts the accepted text back on the Input when the binding did not change it. */\n private reassert(): void {\n this.flush();\n const element = untracked(this.input);\n const text = untracked(this.text);\n if (element !== null && element.value !== text) {\n element.value = text;\n }\n }\n\n private refuse(\n refused: readonly RefusedTag[],\n reason: ChangeReason,\n event: Event | undefined,\n ): void {\n for (const entry of refused) {\n this.valueInvalid.emit({\n value: entry.text,\n details: { reason, event, cause: entry.cause },\n });\n }\n }\n\n /** Offers `offered` as tags (spec/tags-input.md, \"Adding tags\"). */\n private offer(\n offered: string,\n whole: boolean,\n reason: ChangeReason,\n event: Event | undefined,\n ): void {\n const taken = takeTags(\n untracked(this.tags),\n offered,\n this.rules(),\n whole,\n );\n if (taken.added.length > 0) {\n this.selection.set([...taken.value], { reason, event });\n }\n this.refuse(taken.refused, reason, event);\n this.typed.set(taken.text, { reason, event });\n }\n\n /**\n * The Input's text changed; a typed delimiter ends the tags before it. Only an input that\n * typed the delimiter offers the text: a refused text left in the Input is not offered again\n * on every keystroke (spec/tags-input.md, \"Adding tags\").\n */\n inputChanged(event: Event): void {\n const next = (event.target as HTMLInputElement).value;\n if (\n typesDelimiter(\n untracked(this.text),\n next,\n untracked(this.delimiter),\n (event as Partial<InputEvent>).data ?? null,\n )\n ) {\n this.offer(next, false, \"input-change\", event);\n } else {\n this.typed.set(next, { reason: \"input-change\", event });\n }\n this.reassert();\n }\n\n /** A paste holding the delimiter is offered whole, in place of the selection. */\n inputPasted(event: ClipboardEvent): void {\n const pasted = event.clipboardData?.getData(\"text\") ?? \"\";\n const delimiter = untracked(this.delimiter);\n // a paste without the delimiter is an ordinary paste\n if (\n delimiter === null ||\n delimiter === \"\" ||\n !pasted.includes(delimiter)\n ) {\n return;\n }\n event.preventDefault();\n const target = event.target as HTMLInputElement;\n const start = target.selectionStart ?? target.value.length;\n const end = target.selectionEnd ?? start;\n this.offer(\n target.value.slice(0, start) + pasted + target.value.slice(end),\n true,\n \"input-paste\",\n event,\n );\n this.reassert();\n }\n\n /** A key in the Input (spec/tags-input.md, \"Keyboard\"). */\n inputKeyDown(event: KeyboardEvent): void {\n if (event.defaultPrevented || composing(event)) {\n return;\n }\n const target = event.target as HTMLInputElement;\n const action = tagsInputInputKeyTarget(\n event,\n target,\n untracked(this.tags).length,\n getDirection(target, this.direction()) === \"rtl\",\n );\n if (action === null) {\n return;\n }\n if (action.type === \"add\") {\n // an empty text leaves Enter to the form, which submits\n if (target.value.trim() === \"\") {\n return;\n }\n event.preventDefault();\n this.offer(target.value, true, \"keyboard\", event);\n this.reassert();\n return;\n }\n event.preventDefault();\n this.focusTag(action.index);\n }\n\n /** Removes the tag at `index`, rendered at once. */\n removeAt(index: number, reason: ChangeReason, event: Event): void {\n const current = untracked(this.tags);\n if (index < 0 || index >= current.length) {\n return;\n }\n // an edit follows its tag: a removal before it moves it down, its own ends it\n // (spec/tags-input.md, \"Editing a tag\")\n const edit = untracked(this.editing);\n if (edit !== null && edit.index >= index) {\n this.editing.set(\n edit.index === index\n ? null\n : { index: edit.index - 1, text: edit.text },\n );\n }\n this.selection.set(\n current.filter((_, position) => position !== index),\n { reason, event },\n );\n this.flush();\n }\n\n /** Starts editing the tag at `index` (`editable`); a double press inside its edit keeps it. */\n startEdit(index: number): void {\n const current = untracked(this.tags)[index];\n if (\n !untracked(this.editable) ||\n untracked(this.isDisabled) ||\n current === undefined ||\n untracked(this.editing)?.index === index\n ) {\n return;\n }\n this.editing.set({ index, text: current });\n // the TagInput takes the focus before the next key\n this.flush();\n }\n\n /** A key on a focused Tag (spec/tags-input.md, \"Keyboard\"). */\n tagKeyDown(event: KeyboardEvent, index: number): void {\n if (\n event.defaultPrevented ||\n event.target !== event.currentTarget ||\n composing(event)\n ) {\n return;\n }\n const element = event.currentTarget as HTMLElement;\n const action = tagsInputTagKeyTarget(\n event,\n index,\n untracked(this.tags).length,\n {\n rtl: getDirection(element, this.direction()) === \"rtl\",\n editable: untracked(this.editable),\n },\n );\n if (action === null) {\n return;\n }\n if (action.type === \"type\") {\n // the character goes on to the Input\n this.focusInput();\n return;\n }\n event.preventDefault();\n if (action.type === \"focus\") {\n this.focusTag(action.target);\n } else if (action.type === \"remove\") {\n this.removeAt(index, \"keyboard\", event);\n this.focusTag(action.focus);\n } else {\n this.startEdit(index);\n }\n }\n\n /** The TagInput's text. */\n setEditText(text: string): void {\n const current = untracked(this.editing);\n if (current !== null) {\n this.editing.set({ index: current.index, text });\n }\n }\n\n /** Ends the edit (spec/tags-input.md, \"Editing a tag\"); `focus`: Enter, which moves it. */\n commitEdit(reason: ChangeReason, event: Event, focus: boolean): void {\n const edit = untracked(this.editing);\n if (edit === null) {\n return;\n }\n const result = editTag(\n untracked(this.tags),\n edit.index,\n edit.text,\n this.rules(),\n );\n if (result.type === \"refused\") {\n this.refuse([result], reason, event);\n // leaving it drops a refused edit; Enter goes on editing\n if (!focus) {\n this.editing.set(null);\n }\n return;\n }\n // ended before the render that hides the TagInput, whose blur then ends nothing\n this.editing.set(null);\n if (result.type !== \"unchanged\") {\n this.selection.set([...result.value], { reason, event });\n }\n if (!focus) {\n return;\n }\n this.flush();\n if (result.type === \"removed\") {\n // as Delete: the tag now at its place, else the previous one, else the Input\n const left = result.value.length;\n this.focusTag(\n edit.index < left ? edit.index : left > 0 ? left - 1 : \"input\",\n );\n } else {\n this.focusTag(edit.index);\n }\n }\n\n /** Escape drops the edit; the Tag is focused. */\n cancelEdit(): void {\n const edit = untracked(this.editing);\n if (edit === null) {\n return;\n }\n this.editing.set(null);\n this.flush();\n this.focusTag(edit.index);\n }\n\n /** The TagInput of the tag at `index` lost the focus: its edit ends. */\n tagInputBlurred(index: number, event: FocusEvent): void {\n if (untracked(this.editing)?.index === index) {\n this.commitEdit(\"input-blur\", event, false);\n }\n }\n\n /** Removes every tag and the text, and focuses the Input. */\n clear(event: Event): void {\n this.editing.set(null);\n if (untracked(this.tags).length > 0) {\n this.selection.set([], { reason: \"clear-press\", event });\n }\n if (untracked(this.text) !== \"\") {\n this.typed.set(\"\", { reason: \"clear-press\", event });\n }\n this.flush();\n this.focusInput();\n }\n\n /** Leaving the TagsInput (spec/tags-input.md, \"API\": `blurBehavior`). */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget;\n if (next instanceof Node && this.host.contains(next)) {\n return;\n }\n const behavior = untracked(this.blurBehavior);\n const current = untracked(this.text);\n if (behavior === \"add\" && current.trim() !== \"\") {\n this.offer(current, true, \"input-blur\", event);\n } else if (behavior === \"clear\" && current !== \"\") {\n this.typed.set(\"\", { reason: \"input-blur\", event });\n }\n this.field.blurred();\n }\n}\n","import { computed, Directive } from \"@angular/core\";\nimport {\n dataValues,\n injectEnclosing,\n} from \"@fragiola/primitives-angular/internal\";\nimport { TagsInputRoot } from \"./tags-input-root.directive.ts\";\n\nexport interface TagsInputClearTriggerState {\n disabled: boolean;\n}\n\n/**\n * Removes every tag and the text, and focuses the Input (spec/tags-input.md):\n * `<button tagsInputClearTrigger aria-label=\"Clear tags\">`; hidden while there is nothing to clear.\n */\n@Directive({\n selector: \"[tagsInputClearTrigger]\",\n exportAs: \"tagsInputClearTrigger\",\n host: {\n type: \"button\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[attr.hidden]\": \"root.empty() && root.text() === '' ? '' : null\",\n \"data-primitives-part\": \"tags-input-clear-trigger\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(mousedown)\": \"$event.preventDefault()\",\n \"(click)\": \"root.clear($event)\",\n },\n})\nexport class TagsInputClearTrigger {\n protected readonly root = injectEnclosing(\n TagsInputRoot,\n \"tagsInputRoot\",\n \"tagsInputClearTrigger\",\n );\n readonly state = computed<TagsInputClearTriggerState>(() => ({\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n}\n","import { computed, Directive } from \"@angular/core\";\nimport {\n dataValues,\n injectEnclosing,\n} from \"@fragiola/primitives-angular/internal\";\nimport { TagsInputRoot } from \"./tags-input-root.directive.ts\";\n\nexport interface TagsInputControlState {\n disabled: boolean;\n empty: boolean;\n}\n\n/**\n * Holds the Tags and the Input (spec/tags-input.md): `<div tagsInputControl>`. A press on it,\n * outside them, focuses the Input.\n */\n@Directive({\n selector: \"[tagsInputControl]\",\n exportAs: \"tagsInputControl\",\n host: {\n \"data-primitives-part\": \"tags-input-control\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"[attr.data-empty]\": \"data().empty\",\n \"(mousedown)\": \"onMouseDown($event)\",\n },\n})\nexport class TagsInputControl {\n private readonly root = injectEnclosing(\n TagsInputRoot,\n \"tagsInputRoot\",\n \"tagsInputControl\",\n );\n readonly state = computed<TagsInputControlState>(() => ({\n disabled: this.root.isDisabled(),\n empty: this.root.empty(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onMouseDown(event: MouseEvent): void {\n if (event.target === event.currentTarget && !this.state().disabled) {\n event.preventDefault();\n this.root.focusInput();\n }\n }\n}\n","import { computed, Directive } from \"@angular/core\";\nimport { writeFieldAria } from \"@fragiola/primitives-angular/field\";\nimport {\n injectEnclosing,\n injectId,\n ownAttribute,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { TagsInputRoot } from \"./tags-input-root.directive.ts\";\n\nexport interface TagsInputInputState {\n disabled: boolean;\n empty: boolean;\n}\n\n/**\n * The text the next tag is typed in: the labelled control (spec/tags-input.md),\n * `<input tagsInputInput id=\"tags\">`, named by a `<label for>` or a `Field.Label`. Its id is the\n * consumer's, else its own.\n */\n@Directive({\n selector: \"input[tagsInputInput]\",\n exportAs: \"tagsInputInput\",\n host: {\n \"[attr.id]\": \"id\",\n \"[value]\": \"root.text()\",\n // the attribute follows the value, as React's controlled input: a server render writes\n // it, so the page rendered in the browser alone has it too\n \"[attr.value]\": \"root.text()\",\n \"[attr.disabled]\": \"state().disabled ? '' : null\",\n \"[attr.aria-required]\": \"root.required() ? 'true' : null\",\n \"data-primitives-part\": \"tags-input-input\",\n \"(input)\": \"root.inputChanged($event)\",\n \"(keydown)\": \"root.inputKeyDown($event)\",\n \"(paste)\": \"root.inputPasted($event)\",\n },\n})\nexport class TagsInputInput {\n protected readonly root = injectEnclosing(\n TagsInputRoot,\n \"tagsInputRoot\",\n \"tagsInputInput\",\n );\n protected readonly id =\n ownAttribute(\"id\") ?? injectId(\"primitives-tags-input-input\");\n private readonly element = registerHost<HTMLInputElement>(this.root.input);\n readonly state = computed<TagsInputInputState>(() => ({\n disabled: this.root.isDisabled(),\n empty: this.root.empty(),\n }));\n\n constructor() {\n const { field } = this.root;\n writeFieldAria(field, this.element, {\n \"aria-labelledby\": field.labelledBy,\n \"aria-describedby\": field.describedBy,\n \"aria-invalid\": field.ariaInvalid,\n });\n this.root.inputId.set(this.id);\n }\n}\n","import { computed, Directive, input, numberAttribute } from \"@angular/core\";\nimport {\n dataValues,\n injectEnclosing,\n} from \"@fragiola/primitives-angular/internal\";\nimport { TagsInputRoot } from \"./tags-input-root.directive.ts\";\n\nexport interface TagsInputTagState {\n disabled: boolean;\n editing: boolean;\n}\n\n/**\n * One tag, focusable out of the tab order (spec/tags-input.md, \"Keyboard\"):\n * `<div tagsInputTag [index]=\"$index\">`, one per value of the Root's `tags()`, in order.\n */\n@Directive({\n selector: \"[tagsInputTag]\",\n exportAs: \"tagsInputTag\",\n host: {\n \"[attr.tabindex]\": \"state().disabled ? null : '-1'\",\n \"data-primitives-part\": \"tags-input-tag\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"[attr.data-editing]\": \"data().editing\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"(dblclick)\": \"root.startEdit(index())\",\n },\n})\nexport class TagsInputTag {\n /** Its position in the value. */\n readonly index = input.required({ transform: numberAttribute });\n\n protected readonly root = injectEnclosing(\n TagsInputRoot,\n \"tagsInputRoot\",\n \"tagsInputTag\",\n );\n readonly state = computed<TagsInputTagState>(() => ({\n disabled: this.root.isDisabled(),\n editing: this.root.editing()?.index === this.index(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (!this.state().disabled) {\n this.root.tagKeyDown(event, this.index());\n }\n }\n}\n","import { afterRenderEffect, computed, Directive } from \"@angular/core\";\nimport {\n injectEnclosing,\n injectHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { composing } from \"../utils/composing.ts\";\nimport { TagsInputRoot } from \"./tags-input-root.directive.ts\";\nimport { TagsInputTag } from \"./tags-input-tag.directive.ts\";\n\nexport interface TagsInputTagInputState {\n editing: boolean;\n}\n\n/**\n * Edits its Tag in place (spec/tags-input.md, \"Editing a tag\"): `<input tagsInputTagInput\n * aria-label=\"Edit tag\">` inside the Tag, `hidden` until the tag is edited, then focused with its\n * text selected.\n */\n@Directive({\n selector: \"input[tagsInputTagInput]\",\n exportAs: \"tagsInputTagInput\",\n host: {\n tabindex: \"-1\",\n \"[attr.hidden]\": \"state().editing ? null : ''\",\n \"[attr.disabled]\": \"root.isDisabled() ? '' : null\",\n \"[value]\": \"text()\",\n // the attribute follows the value, as the Input's (a server render writes it)\n \"[attr.value]\": \"text()\",\n \"data-primitives-part\": \"tags-input-tag-input\",\n \"(input)\": \"onInput()\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"(blur)\": \"root.tagInputBlurred(tag.index(), $event)\",\n },\n})\nexport class TagsInputTagInput {\n protected readonly root = injectEnclosing(\n TagsInputRoot,\n \"tagsInputRoot\",\n \"tagsInputTagInput\",\n );\n protected readonly tag = injectEnclosing(\n TagsInputTag,\n \"tagsInputTag\",\n \"tagsInputTagInput\",\n );\n private readonly element = injectHost<HTMLInputElement>();\n // a boolean, so the text typed in the edit runs nothing that tracks it\n private readonly editing = computed(() => this.tag.state().editing);\n readonly state = computed<TagsInputTagInputState>(() => ({\n editing: this.editing(),\n }));\n protected readonly text = computed(() =>\n this.state().editing ? (this.root.editing()?.text ?? \"\") : \"\",\n );\n\n constructor() {\n // the edit starts: it takes the focus once shown\n afterRenderEffect(() => {\n if (this.editing()) {\n this.element.focus();\n this.element.select();\n }\n });\n }\n\n protected onInput(): void {\n this.root.setEditText(this.element.value);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (!this.state().editing || composing(event)) {\n return;\n }\n if (event.key === \"Enter\") {\n event.preventDefault();\n this.root.commitEdit(\"keyboard\", event, true);\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n this.root.cancelEdit();\n }\n }\n}\n","import { computed, Directive } from \"@angular/core\";\nimport {\n dataValues,\n injectEnclosing,\n} from \"@fragiola/primitives-angular/internal\";\nimport { TagsInputRoot } from \"./tags-input-root.directive.ts\";\nimport { TagsInputTag } from \"./tags-input-tag.directive.ts\";\n\nexport interface TagsInputTagRemoveState {\n disabled: boolean;\n}\n\n/**\n * Removes its Tag and focuses the Input (spec/tags-input.md, \"Pointer\"):\n * `<button tagsInputTagRemove aria-label=\"Remove react\">`; hidden while its Tag is edited.\n */\n@Directive({\n selector: \"[tagsInputTagRemove]\",\n exportAs: \"tagsInputTagRemove\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[attr.hidden]\": \"tag.state().editing ? '' : null\",\n \"data-primitives-part\": \"tags-input-tag-remove\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(mousedown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick($event)\",\n },\n})\nexport class TagsInputTagRemove {\n private readonly root = injectEnclosing(\n TagsInputRoot,\n \"tagsInputRoot\",\n \"tagsInputTagRemove\",\n );\n protected readonly tag = injectEnclosing(\n TagsInputTag,\n \"tagsInputTag\",\n \"tagsInputTagRemove\",\n );\n readonly state = computed<TagsInputTagRemoveState>(() => ({\n disabled: this.tag.state().disabled,\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onClick(event: MouseEvent): void {\n this.root.removeAt(this.tag.index(), \"chip-remove-press\", event);\n this.root.focusInput();\n }\n}\n","import { computed, Directive } from \"@angular/core\";\nimport { injectEnclosing } from \"@fragiola/primitives-angular/internal\";\nimport { TagsInputTag } from \"./tags-input-tag.directive.ts\";\n\n/** A Tag's text (the consumer's content): `<span tagsInputTagText>`; hidden while it is edited. */\n@Directive({\n selector: \"[tagsInputTagText]\",\n exportAs: \"tagsInputTagText\",\n host: {\n \"[attr.hidden]\": \"state().editing ? '' : null\",\n \"data-primitives-part\": \"tags-input-tag-text\",\n },\n})\nexport class TagsInputTagText {\n private readonly tag = injectEnclosing(\n TagsInputTag,\n \"tagsInputTag\",\n \"tagsInputTagText\",\n );\n readonly state = computed(() => ({ editing: this.tag.state().editing }));\n}\n"],"mappings":";;;;;;;AACA,SAAgB,UAAU,OAAoB;CAC1C,OAAO,MAAM,eAAe,MAAM,YAAY;AAClD;AC4DA,MAAM,OAA0B,CAAA;AAChC,MAAM,eAAe;AACrB,MAAM,cAAc;AA2BpB,IAAa,gBAAb,MAAa,cAAa;CAiFtB,cAAA;EA/ES,KAAA,QAAQ,MAAqC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACvD,KAAA,cAAc,OAAM;EACpB,KAAA,eAAe,MAAqC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EAC9D,KAAA,qBAAqB,OAAM;EAE3B,KAAA,aAAa,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,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;CAAkB,YAAA,CAAA;EAd9B,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;GACV,MAAM;IACF,MAAM;IACN,UAAU;IACV,mBAAmB;IACnB,iBAAiB;IACjB,wBAAwB;IACxB,wBAAwB;IACxB,eAAe;IACf,WAAW;GACd;EACJ,CAAA;;;AChBD,IAAa,mBAAb,MAAa,iBAAgB;CAR7B,cAAA;EASqB,KAAA,MAAM,gBACnB,cACA,gBACA,kBAAkB;EAEb,KAAA,QAAQ,gBAAgB,EAAE,SAAS,KAAK,IAAI,MAAK,CAAE,CAAC,QAAO,IAAI,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC3E;CAPY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAgB,cAAA;GAAA,UAAA;GAAA,MAAA;IAAA,YAAA,EAAA,wBAAA,sBAAA;IAAA,YAAA,EAAA,eAAA,8BAAA;GAAA;GAAA,UAAA,CAAA,kBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAR5B,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;GACV,MAAM;IACF,iBAAiB;IACjB,wBAAwB;GAC3B;EACJ,CAAA"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { DATE_FIELD, DateFieldInput, DateFieldRootBase, DateFieldRootState, DateFieldSegment } from "@fragiola/primitives-angular/date-field";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Directive, computed, forwardRef, inject, input, output } from "@angular/core";
|
|
4
|
+
const MIDNIGHT = {
|
|
5
|
+
hour: 0,
|
|
6
|
+
minute: 0,
|
|
7
|
+
second: 0,
|
|
8
|
+
millisecond: 0
|
|
9
|
+
};
|
|
10
|
+
var TimeFieldRoot = class TimeFieldRoot extends DateFieldRootBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.valueChange = output();
|
|
15
|
+
this.defaultValue = input(null, ...ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.valueChangeDetails = output();
|
|
17
|
+
this.granularity = input("minute", ...ngDevMode ? [{ debugName: "granularity" }] : /* istanbul ignore next */ []);
|
|
18
|
+
this.placeholderValue = input(MIDNIGHT, ...ngDevMode ? [{ debugName: "placeholderValue" }] : /* istanbul ignore next */ []);
|
|
19
|
+
this.min = input(void 0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
20
|
+
this.max = input(void 0, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
21
|
+
this.dateField = new DateFieldRootState("time-field", "time", this.stateInputs({
|
|
22
|
+
value: this.value,
|
|
23
|
+
valueChange: { emit: (value) => this.valueChange.emit(value) },
|
|
24
|
+
defaultValue: this.defaultValue,
|
|
25
|
+
granularity: this.granularity,
|
|
26
|
+
placeholderValue: this.placeholderValue,
|
|
27
|
+
min: this.min,
|
|
28
|
+
max: this.max,
|
|
29
|
+
isDateUnavailable: computed(() => void 0)
|
|
30
|
+
}), (value, details) => this.valueChangeDetails.emit({
|
|
31
|
+
value,
|
|
32
|
+
details
|
|
33
|
+
}), this.host);
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
37
|
+
minVersion: "12.0.0",
|
|
38
|
+
version: "22.2.6",
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
type: TimeFieldRoot,
|
|
41
|
+
deps: null,
|
|
42
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
47
|
+
minVersion: "17.1.0",
|
|
48
|
+
version: "22.2.6",
|
|
49
|
+
type: TimeFieldRoot,
|
|
50
|
+
isStandalone: true,
|
|
51
|
+
selector: "[timeFieldRoot]",
|
|
52
|
+
inputs: {
|
|
53
|
+
value: {
|
|
54
|
+
classPropertyName: "value",
|
|
55
|
+
publicName: "value",
|
|
56
|
+
isSignal: true,
|
|
57
|
+
isRequired: false,
|
|
58
|
+
transformFunction: null
|
|
59
|
+
},
|
|
60
|
+
defaultValue: {
|
|
61
|
+
classPropertyName: "defaultValue",
|
|
62
|
+
publicName: "defaultValue",
|
|
63
|
+
isSignal: true,
|
|
64
|
+
isRequired: false,
|
|
65
|
+
transformFunction: null
|
|
66
|
+
},
|
|
67
|
+
granularity: {
|
|
68
|
+
classPropertyName: "granularity",
|
|
69
|
+
publicName: "granularity",
|
|
70
|
+
isSignal: true,
|
|
71
|
+
isRequired: false,
|
|
72
|
+
transformFunction: null
|
|
73
|
+
},
|
|
74
|
+
placeholderValue: {
|
|
75
|
+
classPropertyName: "placeholderValue",
|
|
76
|
+
publicName: "placeholderValue",
|
|
77
|
+
isSignal: true,
|
|
78
|
+
isRequired: false,
|
|
79
|
+
transformFunction: null
|
|
80
|
+
},
|
|
81
|
+
min: {
|
|
82
|
+
classPropertyName: "min",
|
|
83
|
+
publicName: "min",
|
|
84
|
+
isSignal: true,
|
|
85
|
+
isRequired: false,
|
|
86
|
+
transformFunction: null
|
|
87
|
+
},
|
|
88
|
+
max: {
|
|
89
|
+
classPropertyName: "max",
|
|
90
|
+
publicName: "max",
|
|
91
|
+
isSignal: true,
|
|
92
|
+
isRequired: false,
|
|
93
|
+
transformFunction: null
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
outputs: {
|
|
97
|
+
valueChange: "valueChange",
|
|
98
|
+
valueChangeDetails: "valueChangeDetails"
|
|
99
|
+
},
|
|
100
|
+
providers: [{
|
|
101
|
+
provide: DATE_FIELD,
|
|
102
|
+
useFactory: () => inject(forwardRef(() => TimeFieldRoot)).dateField
|
|
103
|
+
}],
|
|
104
|
+
exportAs: ["timeFieldRoot"],
|
|
105
|
+
usesInheritance: true,
|
|
106
|
+
ngImport: i0
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
111
|
+
minVersion: "12.0.0",
|
|
112
|
+
version: "22.2.6",
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
type: TimeFieldRoot,
|
|
115
|
+
decorators: [{
|
|
116
|
+
type: Directive,
|
|
117
|
+
args: [{
|
|
118
|
+
selector: "[timeFieldRoot]",
|
|
119
|
+
exportAs: "timeFieldRoot",
|
|
120
|
+
providers: [{
|
|
121
|
+
provide: DATE_FIELD,
|
|
122
|
+
useFactory: () => inject(forwardRef(() => TimeFieldRoot)).dateField
|
|
123
|
+
}]
|
|
124
|
+
}]
|
|
125
|
+
}],
|
|
126
|
+
propDecorators: {
|
|
127
|
+
value: [{
|
|
128
|
+
type: i0.Input,
|
|
129
|
+
args: [{
|
|
130
|
+
isSignal: true,
|
|
131
|
+
alias: "value",
|
|
132
|
+
required: false
|
|
133
|
+
}]
|
|
134
|
+
}],
|
|
135
|
+
valueChange: [{
|
|
136
|
+
type: i0.Output,
|
|
137
|
+
args: ["valueChange"]
|
|
138
|
+
}],
|
|
139
|
+
defaultValue: [{
|
|
140
|
+
type: i0.Input,
|
|
141
|
+
args: [{
|
|
142
|
+
isSignal: true,
|
|
143
|
+
alias: "defaultValue",
|
|
144
|
+
required: false
|
|
145
|
+
}]
|
|
146
|
+
}],
|
|
147
|
+
valueChangeDetails: [{
|
|
148
|
+
type: i0.Output,
|
|
149
|
+
args: ["valueChangeDetails"]
|
|
150
|
+
}],
|
|
151
|
+
granularity: [{
|
|
152
|
+
type: i0.Input,
|
|
153
|
+
args: [{
|
|
154
|
+
isSignal: true,
|
|
155
|
+
alias: "granularity",
|
|
156
|
+
required: false
|
|
157
|
+
}]
|
|
158
|
+
}],
|
|
159
|
+
placeholderValue: [{
|
|
160
|
+
type: i0.Input,
|
|
161
|
+
args: [{
|
|
162
|
+
isSignal: true,
|
|
163
|
+
alias: "placeholderValue",
|
|
164
|
+
required: false
|
|
165
|
+
}]
|
|
166
|
+
}],
|
|
167
|
+
min: [{
|
|
168
|
+
type: i0.Input,
|
|
169
|
+
args: [{
|
|
170
|
+
isSignal: true,
|
|
171
|
+
alias: "min",
|
|
172
|
+
required: false
|
|
173
|
+
}]
|
|
174
|
+
}],
|
|
175
|
+
max: [{
|
|
176
|
+
type: i0.Input,
|
|
177
|
+
args: [{
|
|
178
|
+
isSignal: true,
|
|
179
|
+
alias: "max",
|
|
180
|
+
required: false
|
|
181
|
+
}]
|
|
182
|
+
}]
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
export { DateFieldInput, DateFieldSegment, TimeFieldRoot };
|
|
186
|
+
|
|
187
|
+
//# sourceMappingURL=fragiola-primitives-angular-time-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragiola-primitives-angular-time-field.mjs","names":[],"sources":["../../time-field/directives/time-field-root.directive.ts"],"sourcesContent":["import {\n computed,\n Directive,\n forwardRef,\n inject,\n input,\n output,\n} from \"@angular/core\";\nimport type { SegmentGranularity } from \"@fragiola/primitives/segments\";\nimport type { PlainTime } from \"@fragiola/primitives/time\";\nimport {\n DATE_FIELD,\n DateFieldRootBase,\n DateFieldRootState,\n} from \"@fragiola/primitives-angular/date-field\";\nimport type { ValueChangeEvent } from \"@fragiola/primitives-angular/internal\";\n\nconst MIDNIGHT: PlainTime = { hour: 0, minute: 0, second: 0, millisecond: 0 };\n\n/**\n * A time of day typed in segments (spec/date-field.md, TimeField): `<div timeFieldRoot\n * [(value)]=\"time\">` around a `[dateFieldInput]` (the DateField's parts, named `time-field-*`\n * inside it), its hidden form input rendered right after it.\n */\n@Directive({\n selector: \"[timeFieldRoot]\",\n exportAs: \"timeFieldRoot\",\n providers: [\n {\n provide: DATE_FIELD,\n useFactory: () => inject(forwardRef(() => TimeFieldRoot)).dateField,\n },\n ],\n})\nexport class TimeFieldRoot extends DateFieldRootBase {\n /** A `PlainTime`; `null` while a segment is a placeholder. */\n readonly value = input<PlainTime | null | undefined>(undefined);\n readonly valueChange = output<PlainTime | null>();\n readonly defaultValue = input<PlainTime | null>(null);\n readonly valueChangeDetails = output<ValueChangeEvent<PlainTime | null>>();\n /** `hour`, `minute` (the default) or `second`. */\n readonly granularity = input<Exclude<SegmentGranularity, \"day\">>(\"minute\");\n /** What a placeholder segment's first step gives; default: midnight. */\n readonly placeholderValue = input<PlainTime>(MIDNIGHT);\n /** Times before it are invalid. */\n readonly min = input<PlainTime | null | undefined>(undefined);\n /** Times after it are invalid. */\n readonly max = input<PlainTime | null | undefined>(undefined);\n readonly dateField = new DateFieldRootState(\n \"time-field\",\n \"time\",\n this.stateInputs({\n value: this.value,\n valueChange: {\n emit: (value) =>\n this.valueChange.emit(value as PlainTime | null),\n },\n defaultValue: this.defaultValue,\n granularity: this.granularity,\n placeholderValue: this.placeholderValue,\n min: this.min,\n max: this.max,\n isDateUnavailable: computed(() => undefined),\n }),\n (value, details) =>\n this.valueChangeDetails.emit({\n value: value as PlainTime | null,\n details,\n }),\n this.host,\n );\n}\n"],"mappings":";;;AAiBA,MAAM,WAAsB;CAAE,MAAM;CAAG,QAAQ;CAAG,QAAQ;CAAG,aAAa;AAAC;AAiB3E,IAAa,gBAAb,MAAa,sBAAsB,kBAAiB;CAVpD,cAAA;;EAYa,KAAA,QAAQ,MAAoC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACtD,KAAA,cAAc,OAA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A;KAAA,mBAAA;IAAA;IAAA,aAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,kBAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,KAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,KAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,aAAA;IAAA,oBAAA;GAAA;GAAA,WAPX,CACP;IACI,SAAS;IACT,kBAAkB,OAAO,iBAAiB,aAAa,CAAC,CAAC,CAAC;GAC7D,CACJ;GAAA,UAAA,CAAA,eAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAEQ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EAVzB,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;GACV,WAAW,CACP;IACI,SAAS;IACT,kBAAkB,OAAO,iBAAgB,aAAc,CAAC,CAAC,CAAC;GAC7D,CACJ;EACJ,CAAA"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { DateFieldSegment } from "@fragiola/primitives-angular/date-field";
|
|
2
|
+
import { DATE_RANGE_FIELD, DateRangeFieldInput, DateRangeFieldRootBase, DateRangeFieldRootState } from "@fragiola/primitives-angular/date-range-field";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Directive, computed, forwardRef, inject, input, output } from "@angular/core";
|
|
5
|
+
const MIDNIGHT = {
|
|
6
|
+
hour: 0,
|
|
7
|
+
minute: 0,
|
|
8
|
+
second: 0,
|
|
9
|
+
millisecond: 0
|
|
10
|
+
};
|
|
11
|
+
var TimeRangeFieldRoot = class TimeRangeFieldRoot extends DateRangeFieldRootBase {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.valueChange = output();
|
|
16
|
+
this.defaultValue = input(null, ...ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.valueChangeDetails = output();
|
|
18
|
+
this.granularity = input("minute", ...ngDevMode ? [{ debugName: "granularity" }] : /* istanbul ignore next */ []);
|
|
19
|
+
this.placeholderValue = input(MIDNIGHT, ...ngDevMode ? [{ debugName: "placeholderValue" }] : /* istanbul ignore next */ []);
|
|
20
|
+
this.min = input(void 0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
21
|
+
this.max = input(void 0, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
22
|
+
this.rangeField = new DateRangeFieldRootState("time-range-field", "time", this.stateInputs({
|
|
23
|
+
value: this.value,
|
|
24
|
+
valueChange: { emit: (value) => this.valueChange.emit(value) },
|
|
25
|
+
defaultValue: this.defaultValue,
|
|
26
|
+
granularity: this.granularity,
|
|
27
|
+
placeholderValue: this.placeholderValue,
|
|
28
|
+
min: this.min,
|
|
29
|
+
max: this.max,
|
|
30
|
+
isDateUnavailable: computed(() => void 0)
|
|
31
|
+
}), (value, details) => this.valueChangeDetails.emit({
|
|
32
|
+
value,
|
|
33
|
+
details
|
|
34
|
+
}), this.host);
|
|
35
|
+
}
|
|
36
|
+
static {
|
|
37
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
38
|
+
minVersion: "12.0.0",
|
|
39
|
+
version: "22.2.6",
|
|
40
|
+
ngImport: i0,
|
|
41
|
+
type: TimeRangeFieldRoot,
|
|
42
|
+
deps: null,
|
|
43
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
static {
|
|
47
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
48
|
+
minVersion: "17.1.0",
|
|
49
|
+
version: "22.2.6",
|
|
50
|
+
type: TimeRangeFieldRoot,
|
|
51
|
+
isStandalone: true,
|
|
52
|
+
selector: "[timeRangeFieldRoot]",
|
|
53
|
+
inputs: {
|
|
54
|
+
value: {
|
|
55
|
+
classPropertyName: "value",
|
|
56
|
+
publicName: "value",
|
|
57
|
+
isSignal: true,
|
|
58
|
+
isRequired: false,
|
|
59
|
+
transformFunction: null
|
|
60
|
+
},
|
|
61
|
+
defaultValue: {
|
|
62
|
+
classPropertyName: "defaultValue",
|
|
63
|
+
publicName: "defaultValue",
|
|
64
|
+
isSignal: true,
|
|
65
|
+
isRequired: false,
|
|
66
|
+
transformFunction: null
|
|
67
|
+
},
|
|
68
|
+
granularity: {
|
|
69
|
+
classPropertyName: "granularity",
|
|
70
|
+
publicName: "granularity",
|
|
71
|
+
isSignal: true,
|
|
72
|
+
isRequired: false,
|
|
73
|
+
transformFunction: null
|
|
74
|
+
},
|
|
75
|
+
placeholderValue: {
|
|
76
|
+
classPropertyName: "placeholderValue",
|
|
77
|
+
publicName: "placeholderValue",
|
|
78
|
+
isSignal: true,
|
|
79
|
+
isRequired: false,
|
|
80
|
+
transformFunction: null
|
|
81
|
+
},
|
|
82
|
+
min: {
|
|
83
|
+
classPropertyName: "min",
|
|
84
|
+
publicName: "min",
|
|
85
|
+
isSignal: true,
|
|
86
|
+
isRequired: false,
|
|
87
|
+
transformFunction: null
|
|
88
|
+
},
|
|
89
|
+
max: {
|
|
90
|
+
classPropertyName: "max",
|
|
91
|
+
publicName: "max",
|
|
92
|
+
isSignal: true,
|
|
93
|
+
isRequired: false,
|
|
94
|
+
transformFunction: null
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
outputs: {
|
|
98
|
+
valueChange: "valueChange",
|
|
99
|
+
valueChangeDetails: "valueChangeDetails"
|
|
100
|
+
},
|
|
101
|
+
providers: [{
|
|
102
|
+
provide: DATE_RANGE_FIELD,
|
|
103
|
+
useFactory: () => inject(forwardRef(() => TimeRangeFieldRoot)).rangeField
|
|
104
|
+
}],
|
|
105
|
+
exportAs: ["timeRangeFieldRoot"],
|
|
106
|
+
usesInheritance: true,
|
|
107
|
+
ngImport: i0
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
112
|
+
minVersion: "12.0.0",
|
|
113
|
+
version: "22.2.6",
|
|
114
|
+
ngImport: i0,
|
|
115
|
+
type: TimeRangeFieldRoot,
|
|
116
|
+
decorators: [{
|
|
117
|
+
type: Directive,
|
|
118
|
+
args: [{
|
|
119
|
+
selector: "[timeRangeFieldRoot]",
|
|
120
|
+
exportAs: "timeRangeFieldRoot",
|
|
121
|
+
providers: [{
|
|
122
|
+
provide: DATE_RANGE_FIELD,
|
|
123
|
+
useFactory: () => inject(forwardRef(() => TimeRangeFieldRoot)).rangeField
|
|
124
|
+
}]
|
|
125
|
+
}]
|
|
126
|
+
}],
|
|
127
|
+
propDecorators: {
|
|
128
|
+
value: [{
|
|
129
|
+
type: i0.Input,
|
|
130
|
+
args: [{
|
|
131
|
+
isSignal: true,
|
|
132
|
+
alias: "value",
|
|
133
|
+
required: false
|
|
134
|
+
}]
|
|
135
|
+
}],
|
|
136
|
+
valueChange: [{
|
|
137
|
+
type: i0.Output,
|
|
138
|
+
args: ["valueChange"]
|
|
139
|
+
}],
|
|
140
|
+
defaultValue: [{
|
|
141
|
+
type: i0.Input,
|
|
142
|
+
args: [{
|
|
143
|
+
isSignal: true,
|
|
144
|
+
alias: "defaultValue",
|
|
145
|
+
required: false
|
|
146
|
+
}]
|
|
147
|
+
}],
|
|
148
|
+
valueChangeDetails: [{
|
|
149
|
+
type: i0.Output,
|
|
150
|
+
args: ["valueChangeDetails"]
|
|
151
|
+
}],
|
|
152
|
+
granularity: [{
|
|
153
|
+
type: i0.Input,
|
|
154
|
+
args: [{
|
|
155
|
+
isSignal: true,
|
|
156
|
+
alias: "granularity",
|
|
157
|
+
required: false
|
|
158
|
+
}]
|
|
159
|
+
}],
|
|
160
|
+
placeholderValue: [{
|
|
161
|
+
type: i0.Input,
|
|
162
|
+
args: [{
|
|
163
|
+
isSignal: true,
|
|
164
|
+
alias: "placeholderValue",
|
|
165
|
+
required: false
|
|
166
|
+
}]
|
|
167
|
+
}],
|
|
168
|
+
min: [{
|
|
169
|
+
type: i0.Input,
|
|
170
|
+
args: [{
|
|
171
|
+
isSignal: true,
|
|
172
|
+
alias: "min",
|
|
173
|
+
required: false
|
|
174
|
+
}]
|
|
175
|
+
}],
|
|
176
|
+
max: [{
|
|
177
|
+
type: i0.Input,
|
|
178
|
+
args: [{
|
|
179
|
+
isSignal: true,
|
|
180
|
+
alias: "max",
|
|
181
|
+
required: false
|
|
182
|
+
}]
|
|
183
|
+
}]
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
export { DateFieldSegment, DateRangeFieldInput, TimeRangeFieldRoot };
|
|
187
|
+
|
|
188
|
+
//# sourceMappingURL=fragiola-primitives-angular-time-range-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragiola-primitives-angular-time-range-field.mjs","names":[],"sources":["../../time-range-field/directives/time-range-field-root.directive.ts"],"sourcesContent":["import {\n computed,\n Directive,\n forwardRef,\n inject,\n input,\n output,\n} from \"@angular/core\";\nimport type { SegmentGranularity } from \"@fragiola/primitives/segments\";\nimport type { PlainTime, TimeRange } from \"@fragiola/primitives/time\";\nimport {\n DATE_RANGE_FIELD,\n DateRangeFieldRootBase,\n DateRangeFieldRootState,\n} from \"@fragiola/primitives-angular/date-range-field\";\nimport type { ValueChangeEvent } from \"@fragiola/primitives-angular/internal\";\n\nconst MIDNIGHT: PlainTime = { hour: 0, minute: 0, second: 0, millisecond: 0 };\n\n/**\n * A start and an end time of day typed in segments (spec/date-range-field.md, TimeRangeField):\n * `<div timeRangeFieldRoot [(value)]=\"hours\">` around two `[dateRangeFieldInput]`s (the\n * DateRangeField's parts, named `time-range-field-*` inside it), its two hidden form inputs\n * rendered right after it.\n */\n@Directive({\n selector: \"[timeRangeFieldRoot]\",\n exportAs: \"timeRangeFieldRoot\",\n providers: [\n {\n provide: DATE_RANGE_FIELD,\n useFactory: () =>\n inject(forwardRef(() => TimeRangeFieldRoot)).rangeField,\n },\n ],\n})\nexport class TimeRangeFieldRoot extends DateRangeFieldRootBase {\n /** `{ start, end }` of `PlainTime`s; `null` while a segment of either end is a placeholder. */\n readonly value = input<TimeRange | null | undefined>(undefined);\n readonly valueChange = output<TimeRange | null>();\n readonly defaultValue = input<TimeRange | null>(null);\n readonly valueChangeDetails = output<ValueChangeEvent<TimeRange | null>>();\n /** `hour`, `minute` (the default) or `second`. */\n readonly granularity = input<Exclude<SegmentGranularity, \"day\">>(\"minute\");\n /** What a placeholder segment's first step gives; default: midnight. */\n readonly placeholderValue = input<PlainTime>(MIDNIGHT);\n /** Times before it are invalid. */\n readonly min = input<PlainTime | null | undefined>(undefined);\n /** Times after it are invalid. */\n readonly max = input<PlainTime | null | undefined>(undefined);\n readonly rangeField = new DateRangeFieldRootState(\n \"time-range-field\",\n \"time\",\n this.stateInputs({\n value: this.value,\n valueChange: {\n emit: (value) =>\n this.valueChange.emit(value as TimeRange | null),\n },\n defaultValue: this.defaultValue,\n granularity: this.granularity,\n placeholderValue: this.placeholderValue,\n min: this.min,\n max: this.max,\n isDateUnavailable: computed(() => undefined),\n }),\n (value, details) =>\n this.valueChangeDetails.emit({\n value: value as TimeRange | null,\n details,\n }),\n this.host,\n );\n}\n"],"mappings":";;;;AAiBA,MAAM,WAAsB;CAAE,MAAM;CAAG,QAAQ;CAAG,QAAQ;CAAG,aAAa;AAAC;AAmB3E,IAAa,qBAAb,MAAa,2BAA2B,uBAAsB;CAX9D,cAAA;;EAaa,KAAA,QAAQ,MAAoC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACtD,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