@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,1222 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DOCUMENT, DestroyRef, Directive, InjectionToken, PLATFORM_ID, afterEveryRender, afterNextRender, booleanAttribute, computed, effect, forwardRef, inject, input, numberAttribute, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { addMonths, calendarKeyTarget, clampDate, compareDates, endOfMonth, firstDayOfWeek, formatDayNumber, formatFullDate, formatMonthYear, isBetween, isSameDate, isSameMonth, isWithinBounds, monthGrid, monthsBetween, startOfMonth, toIsoDate, today, watchDocumentLanguage, weekdays } from "@fragiola/primitives/date";
|
|
4
|
+
import { controllable, dataValues, injectFlush, injectHost, injectId, injectProvidedDirection, ownAttribute } from "@fragiola/primitives-angular/internal";
|
|
5
|
+
import { getDirection } from "@fragiola/primitives/direction";
|
|
6
|
+
import { interceptEscape } from "@fragiola/primitives/layers";
|
|
7
|
+
const ISO_MATH = {
|
|
8
|
+
addMonths,
|
|
9
|
+
startOfMonth,
|
|
10
|
+
endOfMonth,
|
|
11
|
+
monthsBetween,
|
|
12
|
+
isSameMonth,
|
|
13
|
+
monthGrid: (date, firstDay) => monthGrid(date.year, date.month, firstDay),
|
|
14
|
+
keyTarget: calendarKeyTarget,
|
|
15
|
+
fullDate: formatFullDate
|
|
16
|
+
};
|
|
17
|
+
function isRange(value) {
|
|
18
|
+
return value !== null && "start" in value;
|
|
19
|
+
}
|
|
20
|
+
const PICKER_BINDING = new InjectionToken("PICKER_BINDING");
|
|
21
|
+
const CALENDAR = new InjectionToken("CALENDAR");
|
|
22
|
+
function documentLocale(doc, browser) {
|
|
23
|
+
if (doc.documentElement.lang) return doc.documentElement.lang;
|
|
24
|
+
return browser && typeof navigator !== "undefined" ? navigator.language : "en-US";
|
|
25
|
+
}
|
|
26
|
+
var CalendarState = class {
|
|
27
|
+
constructor(component, mode, inputs, emit) {
|
|
28
|
+
this.component = component;
|
|
29
|
+
this.mode = mode;
|
|
30
|
+
this.inputs = inputs;
|
|
31
|
+
this.emit = emit;
|
|
32
|
+
this.picker = inject(PICKER_BINDING, { optional: true });
|
|
33
|
+
this.bound = computed(() => this.picker !== null && this.picker.mode === this.mode && this.inputs.value() === void 0 && this.inputs.defaultValue() === void 0, ...ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.own = controllable(this.inputs.value, this.inputs.valueChange, () => this.inputs.defaultValue() ?? null, (value, details) => this.emit(value, details));
|
|
35
|
+
this.value = computed(() => this.bound() && this.picker ? this.picker.value() : this.own.value(), ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.options = computed(() => {
|
|
37
|
+
const own = {
|
|
38
|
+
min: this.inputs.min(),
|
|
39
|
+
max: this.inputs.max(),
|
|
40
|
+
isDateUnavailable: this.inputs.isDateUnavailable(),
|
|
41
|
+
locale: this.inputs.locale(),
|
|
42
|
+
firstDayOfWeek: this.inputs.firstDayOfWeek(),
|
|
43
|
+
visibleMonths: this.inputs.visibleMonths(),
|
|
44
|
+
calendar: this.inputs.calendar()
|
|
45
|
+
};
|
|
46
|
+
if (!this.bound() || this.picker === null) return own;
|
|
47
|
+
const merged = { ...this.picker.options() };
|
|
48
|
+
for (const [key, value] of Object.entries(own)) if (value !== void 0) merged[key] = value;
|
|
49
|
+
return merged;
|
|
50
|
+
}, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
51
|
+
this.min = computed(() => this.options().min ?? null, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
52
|
+
this.max = computed(() => this.options().max ?? null, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.document = inject(DOCUMENT);
|
|
54
|
+
this.browser = inject(PLATFORM_ID) === "browser";
|
|
55
|
+
this.language = signal(0, ...ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []);
|
|
56
|
+
this.baseLocale = computed(() => {
|
|
57
|
+
const own = this.options().locale;
|
|
58
|
+
if (own !== void 0) return own;
|
|
59
|
+
this.language();
|
|
60
|
+
return documentLocale(this.document, this.browser);
|
|
61
|
+
}, ...ngDevMode ? [{ debugName: "baseLocale" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.system = () => this.options().calendar;
|
|
63
|
+
this.math = () => this.system() ?? ISO_MATH;
|
|
64
|
+
this.locale = computed(() => this.system()?.locale(this.baseLocale()) ?? this.baseLocale(), ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
65
|
+
this.firstDay = computed(() => this.options().firstDayOfWeek ?? firstDayOfWeek(this.baseLocale()), ...ngDevMode ? [{ debugName: "firstDay" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.visibleMonths = computed(() => Math.max(1, this.options().visibleMonths ?? 1), ...ngDevMode ? [{ debugName: "visibleMonths" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.disabled = computed(() => this.inputs.disabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.readOnly = computed(() => this.inputs.readOnly() ?? (this.bound() && (this.picker?.readOnly() ?? false)), ...ngDevMode ? [{ debugName: "readOnly" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.todayDate = today();
|
|
70
|
+
this.seed = null;
|
|
71
|
+
this.focusedOwn = signal(null, ...ngDevMode ? [{ debugName: "focusedOwn" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.visibleOwn = signal(null, ...ngDevMode ? [{ debugName: "visibleOwn" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.focusedDate = computed(() => this.focusedOwn() ?? this.initialFocus(), ...ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []);
|
|
74
|
+
this.visibleStart = computed(() => this.visibleOwn() ?? this.math().startOfMonth(this.initialFocus()), ...ngDevMode ? [{ debugName: "visibleStart" }] : /* istanbul ignore next */ []);
|
|
75
|
+
this.anchor = signal(null, ...ngDevMode ? [{ debugName: "anchor" }] : /* istanbul ignore next */ []);
|
|
76
|
+
this.hovered = signal(null, ...ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []);
|
|
77
|
+
this.rangeValue = computed(() => {
|
|
78
|
+
const value = this.value();
|
|
79
|
+
return isRange(value) ? value : null;
|
|
80
|
+
}, ...ngDevMode ? [{ debugName: "rangeValue" }] : /* istanbul ignore next */ []);
|
|
81
|
+
this.cells = /* @__PURE__ */ new Map();
|
|
82
|
+
this.baseId = injectId("primitives-calendar");
|
|
83
|
+
this.focusPending = null;
|
|
84
|
+
afterEveryRender(() => this.applyPendingFocus());
|
|
85
|
+
if (this.browser) {
|
|
86
|
+
const stop = watchDocumentLanguage(this.document, () => this.language.update((count) => count + 1));
|
|
87
|
+
inject(DestroyRef).onDestroy(stop);
|
|
88
|
+
}
|
|
89
|
+
let wasOpen = null;
|
|
90
|
+
effect(() => {
|
|
91
|
+
const open = this.bound() && (this.picker?.open() ?? false);
|
|
92
|
+
untracked(() => {
|
|
93
|
+
if (wasOpen !== null && wasOpen !== open) {
|
|
94
|
+
this.anchor.set(null);
|
|
95
|
+
this.hovered.set(null);
|
|
96
|
+
if (open) {
|
|
97
|
+
this.seed = null;
|
|
98
|
+
this.focusedOwn.set(null);
|
|
99
|
+
this.visibleOwn.set(null);
|
|
100
|
+
this.focusPending = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
wasOpen = open;
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
initialFocus() {
|
|
108
|
+
this.seed ??= untracked(() => {
|
|
109
|
+
const value = this.value();
|
|
110
|
+
return clampDate((isRange(value) ? value.start : value) ?? this.todayDate, this.min(), this.max());
|
|
111
|
+
});
|
|
112
|
+
return this.seed;
|
|
113
|
+
}
|
|
114
|
+
part(name) {
|
|
115
|
+
return `${this.component}-${name}`;
|
|
116
|
+
}
|
|
117
|
+
headingId(offset) {
|
|
118
|
+
return `${this.baseId}-heading-${offset}`;
|
|
119
|
+
}
|
|
120
|
+
gridId(offset) {
|
|
121
|
+
return `${this.baseId}-grid-${offset}`;
|
|
122
|
+
}
|
|
123
|
+
isOutOfBounds(date) {
|
|
124
|
+
return this.disabled() || !isWithinBounds(date, this.min(), this.max());
|
|
125
|
+
}
|
|
126
|
+
isUnavailable(date) {
|
|
127
|
+
return this.options().isDateUnavailable?.(date) ?? false;
|
|
128
|
+
}
|
|
129
|
+
moveFocus(date) {
|
|
130
|
+
if (this.isOutOfBounds(date)) return false;
|
|
131
|
+
const math = this.math();
|
|
132
|
+
const visibleMonths = this.visibleMonths();
|
|
133
|
+
const start = this.visibleStart();
|
|
134
|
+
const offset = math.monthsBetween(start, date);
|
|
135
|
+
this.hovered.set(null);
|
|
136
|
+
this.focusedOwn.set(date);
|
|
137
|
+
if (offset < 0) this.visibleOwn.set(math.startOfMonth(date));
|
|
138
|
+
else if (offset >= visibleMonths) this.visibleOwn.set(math.addMonths(math.startOfMonth(date), -(visibleMonths - 1)));
|
|
139
|
+
else this.visibleOwn.set(start);
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
canPage(delta) {
|
|
143
|
+
const math = this.math();
|
|
144
|
+
const visibleMonths = this.visibleMonths();
|
|
145
|
+
const start = math.addMonths(this.visibleStart(), delta * visibleMonths);
|
|
146
|
+
const end = math.endOfMonth(math.addMonths(start, visibleMonths - 1));
|
|
147
|
+
const min = this.min();
|
|
148
|
+
const max = this.max();
|
|
149
|
+
return (max === null || compareDates(start, max) <= 0) && (min === null || compareDates(end, min) >= 0);
|
|
150
|
+
}
|
|
151
|
+
page(delta) {
|
|
152
|
+
this.focusPending = false;
|
|
153
|
+
if (!this.canPage(delta)) return;
|
|
154
|
+
const math = this.math();
|
|
155
|
+
const step = delta * this.visibleMonths();
|
|
156
|
+
this.visibleOwn.set(math.addMonths(this.visibleStart(), step));
|
|
157
|
+
this.focusedOwn.set(clampDate(math.addMonths(this.focusedDate(), step), this.min(), this.max()));
|
|
158
|
+
}
|
|
159
|
+
commit(next) {
|
|
160
|
+
if (this.bound() && this.picker) this.picker.choose(next);
|
|
161
|
+
else this.own.set(next, { reason: "item-press" });
|
|
162
|
+
}
|
|
163
|
+
select(date) {
|
|
164
|
+
if (this.isOutOfBounds(date) || this.isUnavailable(date) || this.readOnly()) return;
|
|
165
|
+
this.focusedOwn.set(date);
|
|
166
|
+
if (this.mode === "single") {
|
|
167
|
+
this.commit(date);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const anchor = this.anchor();
|
|
171
|
+
if (anchor === null) {
|
|
172
|
+
this.anchor.set(date);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const [start, end] = compareDates(anchor, date) <= 0 ? [anchor, date] : [date, anchor];
|
|
176
|
+
this.anchor.set(null);
|
|
177
|
+
this.hovered.set(null);
|
|
178
|
+
this.commit({
|
|
179
|
+
start,
|
|
180
|
+
end
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
cancelRange() {
|
|
184
|
+
this.anchor.set(null);
|
|
185
|
+
this.hovered.set(null);
|
|
186
|
+
}
|
|
187
|
+
cellState(date, month) {
|
|
188
|
+
const value = this.value();
|
|
189
|
+
const rangeValue = this.rangeValue();
|
|
190
|
+
const anchor = this.anchor();
|
|
191
|
+
const outsideMonth = !this.math().isSameMonth(date, month);
|
|
192
|
+
const inRange = rangeValue !== null && isBetween(date, rangeValue.start, rangeValue.end);
|
|
193
|
+
const selected = this.mode === "single" ? !isRange(value) && isSameDate(value, date) : inRange;
|
|
194
|
+
return {
|
|
195
|
+
today: isSameDate(date, this.todayDate),
|
|
196
|
+
selected,
|
|
197
|
+
disabled: this.isOutOfBounds(date),
|
|
198
|
+
unavailable: this.isUnavailable(date),
|
|
199
|
+
outsideMonth,
|
|
200
|
+
focused: !outsideMonth && isSameDate(date, this.focusedDate()),
|
|
201
|
+
rangeStart: rangeValue !== null && isSameDate(date, rangeValue.start),
|
|
202
|
+
rangeEnd: rangeValue !== null && isSameDate(date, rangeValue.end),
|
|
203
|
+
inRange,
|
|
204
|
+
rangePreview: anchor !== null && isBetween(date, anchor, this.hovered() ?? this.focusedDate())
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
requestFocus() {
|
|
208
|
+
this.focusPending = true;
|
|
209
|
+
}
|
|
210
|
+
applyPendingFocus() {
|
|
211
|
+
untracked(() => {
|
|
212
|
+
this.focusPending ??= this.bound();
|
|
213
|
+
if (!this.focusPending) return;
|
|
214
|
+
if (this.picker !== null && this.bound() && !this.picker.open()) {
|
|
215
|
+
this.focusPending = false;
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const cell = this.cells.get(toIsoDate(this.focusedDate()));
|
|
219
|
+
if (cell?.isConnected) {
|
|
220
|
+
this.focusPending = false;
|
|
221
|
+
cell.focus({ preventScroll: true });
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
var CalendarGrid = class CalendarGrid {
|
|
227
|
+
constructor() {
|
|
228
|
+
this.direction = injectProvidedDirection();
|
|
229
|
+
this.calendar = inject(CALENDAR);
|
|
230
|
+
this.offset = input(0, {
|
|
231
|
+
...ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {},
|
|
232
|
+
transform: numberAttribute
|
|
233
|
+
});
|
|
234
|
+
this.month = computed(() => this.calendar.math().addMonths(this.calendar.visibleStart(), this.offset()), ...ngDevMode ? [{ debugName: "month" }] : /* istanbul ignore next */ []);
|
|
235
|
+
this.flush = injectFlush();
|
|
236
|
+
const grid = injectHost();
|
|
237
|
+
const calendar = this.calendar;
|
|
238
|
+
let stop = null;
|
|
239
|
+
afterNextRender(() => {
|
|
240
|
+
stop = interceptEscape(grid.ownerDocument, () => {
|
|
241
|
+
calendar.cancelRange();
|
|
242
|
+
this.flush();
|
|
243
|
+
}, { when: (event) => untracked(calendar.anchor) !== null && event.target instanceof Node && grid.contains(event.target) });
|
|
244
|
+
});
|
|
245
|
+
inject(DestroyRef).onDestroy(() => stop?.());
|
|
246
|
+
}
|
|
247
|
+
onKeyDown(event) {
|
|
248
|
+
const calendar = this.calendar;
|
|
249
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
250
|
+
event.preventDefault();
|
|
251
|
+
calendar.select(calendar.focusedDate());
|
|
252
|
+
this.flush();
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const target = calendar.math().keyTarget(event.key, calendar.focusedDate(), {
|
|
256
|
+
rtl: getDirection(event.currentTarget, this.direction()) === "rtl",
|
|
257
|
+
firstDayOfWeek: calendar.firstDay(),
|
|
258
|
+
shiftKey: event.shiftKey
|
|
259
|
+
});
|
|
260
|
+
if (target === null) return;
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
if (calendar.moveFocus(target)) {
|
|
263
|
+
calendar.requestFocus();
|
|
264
|
+
this.flush();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
static {
|
|
268
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
269
|
+
minVersion: "12.0.0",
|
|
270
|
+
version: "22.2.6",
|
|
271
|
+
ngImport: i0,
|
|
272
|
+
type: CalendarGrid,
|
|
273
|
+
deps: [],
|
|
274
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
static {
|
|
278
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
279
|
+
minVersion: "17.1.0",
|
|
280
|
+
version: "22.2.6",
|
|
281
|
+
type: CalendarGrid,
|
|
282
|
+
isStandalone: true,
|
|
283
|
+
selector: "[calendarGrid]",
|
|
284
|
+
inputs: { offset: {
|
|
285
|
+
classPropertyName: "offset",
|
|
286
|
+
publicName: "offset",
|
|
287
|
+
isSignal: true,
|
|
288
|
+
isRequired: false,
|
|
289
|
+
transformFunction: null
|
|
290
|
+
} },
|
|
291
|
+
host: {
|
|
292
|
+
attributes: { "role": "grid" },
|
|
293
|
+
listeners: { "keydown": "onKeyDown($event)" },
|
|
294
|
+
properties: {
|
|
295
|
+
"attr.data-primitives-part": "calendar.part('grid')",
|
|
296
|
+
"attr.id": "calendar.gridId(offset())",
|
|
297
|
+
"attr.aria-labelledby": "calendar.headingId(offset())",
|
|
298
|
+
"attr.aria-multiselectable": "calendar.mode === 'range' ? 'true' : null",
|
|
299
|
+
"attr.aria-readonly": "calendar.readOnly() ? 'true' : null",
|
|
300
|
+
"attr.aria-disabled": "calendar.disabled() ? 'true' : null"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
exportAs: ["calendarGrid"],
|
|
304
|
+
ngImport: i0
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
309
|
+
minVersion: "12.0.0",
|
|
310
|
+
version: "22.2.6",
|
|
311
|
+
ngImport: i0,
|
|
312
|
+
type: CalendarGrid,
|
|
313
|
+
decorators: [{
|
|
314
|
+
type: Directive,
|
|
315
|
+
args: [{
|
|
316
|
+
selector: "[calendarGrid]",
|
|
317
|
+
exportAs: "calendarGrid",
|
|
318
|
+
host: {
|
|
319
|
+
role: "grid",
|
|
320
|
+
"[attr.data-primitives-part]": "calendar.part('grid')",
|
|
321
|
+
"[attr.id]": "calendar.gridId(offset())",
|
|
322
|
+
"[attr.aria-labelledby]": "calendar.headingId(offset())",
|
|
323
|
+
"[attr.aria-multiselectable]": "calendar.mode === 'range' ? 'true' : null",
|
|
324
|
+
"[attr.aria-readonly]": "calendar.readOnly() ? 'true' : null",
|
|
325
|
+
"[attr.aria-disabled]": "calendar.disabled() ? 'true' : null",
|
|
326
|
+
"(keydown)": "onKeyDown($event)"
|
|
327
|
+
}
|
|
328
|
+
}]
|
|
329
|
+
}],
|
|
330
|
+
ctorParameters: () => [],
|
|
331
|
+
propDecorators: { offset: [{
|
|
332
|
+
type: i0.Input,
|
|
333
|
+
args: [{
|
|
334
|
+
isSignal: true,
|
|
335
|
+
alias: "offset",
|
|
336
|
+
required: false
|
|
337
|
+
}]
|
|
338
|
+
}] }
|
|
339
|
+
});
|
|
340
|
+
var CalendarCell = class CalendarCell {
|
|
341
|
+
constructor() {
|
|
342
|
+
this.calendar = inject(CALENDAR);
|
|
343
|
+
this.grid = inject(CalendarGrid);
|
|
344
|
+
this.date = input.required(...ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []);
|
|
345
|
+
this.state = computed(() => this.calendar.cellState(this.date(), this.grid.month()), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
346
|
+
this.dayNumber = computed(() => formatDayNumber(this.calendar.locale(), this.date()), ...ngDevMode ? [{ debugName: "dayNumber" }] : /* istanbul ignore next */ []);
|
|
347
|
+
this.ownLabel = ownAttribute("aria-label");
|
|
348
|
+
this.label = computed(() => this.ownLabel ?? this.calendar.math().fullDate(this.calendar.locale(), this.date()), ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
349
|
+
this.data = computed(() => {
|
|
350
|
+
const state = this.state();
|
|
351
|
+
return dataValues({
|
|
352
|
+
today: state.today,
|
|
353
|
+
selected: state.selected,
|
|
354
|
+
disabled: state.disabled,
|
|
355
|
+
unavailable: state.unavailable,
|
|
356
|
+
"outside-month": state.outsideMonth,
|
|
357
|
+
"range-start": state.rangeStart,
|
|
358
|
+
"range-end": state.rangeEnd,
|
|
359
|
+
"in-range": state.inRange,
|
|
360
|
+
"range-preview": state.rangePreview
|
|
361
|
+
});
|
|
362
|
+
}, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
363
|
+
const host = injectHost();
|
|
364
|
+
const cells = this.calendar.cells;
|
|
365
|
+
let key = null;
|
|
366
|
+
const release = () => {
|
|
367
|
+
if (key !== null && cells.get(key) === host) cells.delete(key);
|
|
368
|
+
};
|
|
369
|
+
effect(() => {
|
|
370
|
+
release();
|
|
371
|
+
key = this.state().outsideMonth ? null : toIsoDate(this.date());
|
|
372
|
+
if (key !== null) cells.set(key, host);
|
|
373
|
+
});
|
|
374
|
+
inject(DestroyRef).onDestroy(release);
|
|
375
|
+
}
|
|
376
|
+
onMouseDown(event) {
|
|
377
|
+
if (this.state().disabled) event.preventDefault();
|
|
378
|
+
}
|
|
379
|
+
onClick() {
|
|
380
|
+
const state = this.state();
|
|
381
|
+
if (!state.outsideMonth && !state.disabled) {
|
|
382
|
+
this.calendar.select(this.date());
|
|
383
|
+
this.calendar.requestFocus();
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
onPointerEnter() {
|
|
387
|
+
if (this.calendar.anchor() !== null && !this.state().outsideMonth) this.calendar.hovered.set(this.date());
|
|
388
|
+
}
|
|
389
|
+
onFocus() {
|
|
390
|
+
const state = this.state();
|
|
391
|
+
if (!state.outsideMonth && !state.focused) this.calendar.moveFocus(this.date());
|
|
392
|
+
}
|
|
393
|
+
static {
|
|
394
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
395
|
+
minVersion: "12.0.0",
|
|
396
|
+
version: "22.2.6",
|
|
397
|
+
ngImport: i0,
|
|
398
|
+
type: CalendarCell,
|
|
399
|
+
deps: [],
|
|
400
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
static {
|
|
404
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
405
|
+
minVersion: "17.1.0",
|
|
406
|
+
version: "22.2.6",
|
|
407
|
+
type: CalendarCell,
|
|
408
|
+
isStandalone: true,
|
|
409
|
+
selector: "[calendarCell]",
|
|
410
|
+
inputs: { date: {
|
|
411
|
+
classPropertyName: "date",
|
|
412
|
+
publicName: "date",
|
|
413
|
+
isSignal: true,
|
|
414
|
+
isRequired: true,
|
|
415
|
+
transformFunction: null
|
|
416
|
+
} },
|
|
417
|
+
host: {
|
|
418
|
+
attributes: { "role": "gridcell" },
|
|
419
|
+
listeners: {
|
|
420
|
+
"mousedown": "onMouseDown($event)",
|
|
421
|
+
"click": "onClick()",
|
|
422
|
+
"pointerenter": "onPointerEnter()",
|
|
423
|
+
"focus": "onFocus()"
|
|
424
|
+
},
|
|
425
|
+
properties: {
|
|
426
|
+
"attr.data-primitives-part": "calendar.part('cell')",
|
|
427
|
+
"attr.aria-label": "label()",
|
|
428
|
+
"attr.tabindex": "state().outsideMonth ? null : state().focused && !state().disabled ? 0 : -1",
|
|
429
|
+
"attr.aria-selected": "state().selected ? 'true' : null",
|
|
430
|
+
"attr.aria-disabled": "state().disabled || state().unavailable || state().outsideMonth ? 'true' : null",
|
|
431
|
+
"attr.aria-current": "state().today ? 'date' : null",
|
|
432
|
+
"attr.data-today": "data().today",
|
|
433
|
+
"attr.data-selected": "data().selected",
|
|
434
|
+
"attr.data-disabled": "data().disabled",
|
|
435
|
+
"attr.data-unavailable": "data().unavailable",
|
|
436
|
+
"attr.data-outside-month": "data()['outside-month']",
|
|
437
|
+
"attr.data-range-start": "data()['range-start']",
|
|
438
|
+
"attr.data-range-end": "data()['range-end']",
|
|
439
|
+
"attr.data-in-range": "data()['in-range']",
|
|
440
|
+
"attr.data-range-preview": "data()['range-preview']"
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
exportAs: ["calendarCell"],
|
|
444
|
+
ngImport: i0
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
449
|
+
minVersion: "12.0.0",
|
|
450
|
+
version: "22.2.6",
|
|
451
|
+
ngImport: i0,
|
|
452
|
+
type: CalendarCell,
|
|
453
|
+
decorators: [{
|
|
454
|
+
type: Directive,
|
|
455
|
+
args: [{
|
|
456
|
+
selector: "[calendarCell]",
|
|
457
|
+
exportAs: "calendarCell",
|
|
458
|
+
host: {
|
|
459
|
+
role: "gridcell",
|
|
460
|
+
"[attr.data-primitives-part]": "calendar.part('cell')",
|
|
461
|
+
"[attr.aria-label]": "label()",
|
|
462
|
+
"[attr.tabindex]": "state().outsideMonth ? null : state().focused && !state().disabled ? 0 : -1",
|
|
463
|
+
"[attr.aria-selected]": "state().selected ? 'true' : null",
|
|
464
|
+
"[attr.aria-disabled]": "state().disabled || state().unavailable || state().outsideMonth ? 'true' : null",
|
|
465
|
+
"[attr.aria-current]": "state().today ? 'date' : null",
|
|
466
|
+
"[attr.data-today]": "data().today",
|
|
467
|
+
"[attr.data-selected]": "data().selected",
|
|
468
|
+
"[attr.data-disabled]": "data().disabled",
|
|
469
|
+
"[attr.data-unavailable]": "data().unavailable",
|
|
470
|
+
"[attr.data-outside-month]": "data()['outside-month']",
|
|
471
|
+
"[attr.data-range-start]": "data()['range-start']",
|
|
472
|
+
"[attr.data-range-end]": "data()['range-end']",
|
|
473
|
+
"[attr.data-in-range]": "data()['in-range']",
|
|
474
|
+
"[attr.data-range-preview]": "data()['range-preview']",
|
|
475
|
+
"(mousedown)": "onMouseDown($event)",
|
|
476
|
+
"(click)": "onClick()",
|
|
477
|
+
"(pointerenter)": "onPointerEnter()",
|
|
478
|
+
"(focus)": "onFocus()"
|
|
479
|
+
}
|
|
480
|
+
}]
|
|
481
|
+
}],
|
|
482
|
+
ctorParameters: () => [],
|
|
483
|
+
propDecorators: { date: [{
|
|
484
|
+
type: i0.Input,
|
|
485
|
+
args: [{
|
|
486
|
+
isSignal: true,
|
|
487
|
+
alias: "date",
|
|
488
|
+
required: true
|
|
489
|
+
}]
|
|
490
|
+
}] }
|
|
491
|
+
});
|
|
492
|
+
var CalendarGridBody = class CalendarGridBody {
|
|
493
|
+
constructor() {
|
|
494
|
+
this.calendar = inject(CALENDAR);
|
|
495
|
+
this.grid = inject(CalendarGrid);
|
|
496
|
+
this.weeks = computed(() => this.calendar.math().monthGrid(this.grid.month(), this.calendar.firstDay()), ...ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []);
|
|
497
|
+
}
|
|
498
|
+
static {
|
|
499
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
500
|
+
minVersion: "12.0.0",
|
|
501
|
+
version: "22.2.6",
|
|
502
|
+
ngImport: i0,
|
|
503
|
+
type: CalendarGridBody,
|
|
504
|
+
deps: [],
|
|
505
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
static {
|
|
509
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
510
|
+
minVersion: "14.0.0",
|
|
511
|
+
version: "22.2.6",
|
|
512
|
+
type: CalendarGridBody,
|
|
513
|
+
isStandalone: true,
|
|
514
|
+
selector: "[calendarGridBody]",
|
|
515
|
+
host: { properties: { "attr.data-primitives-part": "calendar.part('grid-body')" } },
|
|
516
|
+
exportAs: ["calendarGridBody"],
|
|
517
|
+
ngImport: i0
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
522
|
+
minVersion: "12.0.0",
|
|
523
|
+
version: "22.2.6",
|
|
524
|
+
ngImport: i0,
|
|
525
|
+
type: CalendarGridBody,
|
|
526
|
+
decorators: [{
|
|
527
|
+
type: Directive,
|
|
528
|
+
args: [{
|
|
529
|
+
selector: "[calendarGridBody]",
|
|
530
|
+
exportAs: "calendarGridBody",
|
|
531
|
+
host: { "[attr.data-primitives-part]": "calendar.part('grid-body')" }
|
|
532
|
+
}]
|
|
533
|
+
}]
|
|
534
|
+
});
|
|
535
|
+
var CalendarGridHeader = class CalendarGridHeader {
|
|
536
|
+
constructor() {
|
|
537
|
+
this.calendar = inject(CALENDAR);
|
|
538
|
+
this.weekdays = computed(() => weekdays(this.calendar.locale(), this.calendar.firstDay()), ...ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []);
|
|
539
|
+
}
|
|
540
|
+
static {
|
|
541
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
542
|
+
minVersion: "12.0.0",
|
|
543
|
+
version: "22.2.6",
|
|
544
|
+
ngImport: i0,
|
|
545
|
+
type: CalendarGridHeader,
|
|
546
|
+
deps: [],
|
|
547
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
static {
|
|
551
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
552
|
+
minVersion: "14.0.0",
|
|
553
|
+
version: "22.2.6",
|
|
554
|
+
type: CalendarGridHeader,
|
|
555
|
+
isStandalone: true,
|
|
556
|
+
selector: "[calendarGridHeader]",
|
|
557
|
+
host: { properties: { "attr.data-primitives-part": "calendar.part('grid-header')" } },
|
|
558
|
+
exportAs: ["calendarGridHeader"],
|
|
559
|
+
ngImport: i0
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
564
|
+
minVersion: "12.0.0",
|
|
565
|
+
version: "22.2.6",
|
|
566
|
+
ngImport: i0,
|
|
567
|
+
type: CalendarGridHeader,
|
|
568
|
+
decorators: [{
|
|
569
|
+
type: Directive,
|
|
570
|
+
args: [{
|
|
571
|
+
selector: "[calendarGridHeader]",
|
|
572
|
+
exportAs: "calendarGridHeader",
|
|
573
|
+
host: { "[attr.data-primitives-part]": "calendar.part('grid-header')" }
|
|
574
|
+
}]
|
|
575
|
+
}]
|
|
576
|
+
});
|
|
577
|
+
var CalendarHeaderCell = class CalendarHeaderCell {
|
|
578
|
+
constructor() {
|
|
579
|
+
this.calendar = inject(CALENDAR);
|
|
580
|
+
this.weekday = input.required(...ngDevMode ? [{ debugName: "weekday" }] : /* istanbul ignore next */ []);
|
|
581
|
+
}
|
|
582
|
+
static {
|
|
583
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
584
|
+
minVersion: "12.0.0",
|
|
585
|
+
version: "22.2.6",
|
|
586
|
+
ngImport: i0,
|
|
587
|
+
type: CalendarHeaderCell,
|
|
588
|
+
deps: [],
|
|
589
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
static {
|
|
593
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
594
|
+
minVersion: "17.1.0",
|
|
595
|
+
version: "22.2.6",
|
|
596
|
+
type: CalendarHeaderCell,
|
|
597
|
+
isStandalone: true,
|
|
598
|
+
selector: "[calendarHeaderCell]",
|
|
599
|
+
inputs: { weekday: {
|
|
600
|
+
classPropertyName: "weekday",
|
|
601
|
+
publicName: "weekday",
|
|
602
|
+
isSignal: true,
|
|
603
|
+
isRequired: true,
|
|
604
|
+
transformFunction: null
|
|
605
|
+
} },
|
|
606
|
+
host: {
|
|
607
|
+
attributes: { "scope": "col" },
|
|
608
|
+
properties: {
|
|
609
|
+
"attr.data-primitives-part": "calendar.part('header-cell')",
|
|
610
|
+
"attr.abbr": "weekday().long"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
exportAs: ["calendarHeaderCell"],
|
|
614
|
+
ngImport: i0
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
619
|
+
minVersion: "12.0.0",
|
|
620
|
+
version: "22.2.6",
|
|
621
|
+
ngImport: i0,
|
|
622
|
+
type: CalendarHeaderCell,
|
|
623
|
+
decorators: [{
|
|
624
|
+
type: Directive,
|
|
625
|
+
args: [{
|
|
626
|
+
selector: "[calendarHeaderCell]",
|
|
627
|
+
exportAs: "calendarHeaderCell",
|
|
628
|
+
host: {
|
|
629
|
+
scope: "col",
|
|
630
|
+
"[attr.data-primitives-part]": "calendar.part('header-cell')",
|
|
631
|
+
"[attr.abbr]": "weekday().long"
|
|
632
|
+
}
|
|
633
|
+
}]
|
|
634
|
+
}],
|
|
635
|
+
propDecorators: { weekday: [{
|
|
636
|
+
type: i0.Input,
|
|
637
|
+
args: [{
|
|
638
|
+
isSignal: true,
|
|
639
|
+
alias: "weekday",
|
|
640
|
+
required: true
|
|
641
|
+
}]
|
|
642
|
+
}] }
|
|
643
|
+
});
|
|
644
|
+
var CalendarHeading = class CalendarHeading {
|
|
645
|
+
constructor() {
|
|
646
|
+
this.calendar = inject(CALENDAR);
|
|
647
|
+
this.offset = input(0, {
|
|
648
|
+
...ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {},
|
|
649
|
+
transform: numberAttribute
|
|
650
|
+
});
|
|
651
|
+
this.month = computed(() => formatMonthYear(this.calendar.locale(), this.calendar.math().addMonths(this.calendar.visibleStart(), this.offset())), ...ngDevMode ? [{ debugName: "month" }] : /* istanbul ignore next */ []);
|
|
652
|
+
}
|
|
653
|
+
static {
|
|
654
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
655
|
+
minVersion: "12.0.0",
|
|
656
|
+
version: "22.2.6",
|
|
657
|
+
ngImport: i0,
|
|
658
|
+
type: CalendarHeading,
|
|
659
|
+
deps: [],
|
|
660
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
static {
|
|
664
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
665
|
+
minVersion: "17.1.0",
|
|
666
|
+
version: "22.2.6",
|
|
667
|
+
type: CalendarHeading,
|
|
668
|
+
isStandalone: true,
|
|
669
|
+
selector: "[calendarHeading]",
|
|
670
|
+
inputs: { offset: {
|
|
671
|
+
classPropertyName: "offset",
|
|
672
|
+
publicName: "offset",
|
|
673
|
+
isSignal: true,
|
|
674
|
+
isRequired: false,
|
|
675
|
+
transformFunction: null
|
|
676
|
+
} },
|
|
677
|
+
host: { properties: {
|
|
678
|
+
"attr.data-primitives-part": "calendar.part('heading')",
|
|
679
|
+
"attr.id": "calendar.headingId(offset())",
|
|
680
|
+
"attr.aria-live": "offset() === 0 ? 'polite' : null"
|
|
681
|
+
} },
|
|
682
|
+
exportAs: ["calendarHeading"],
|
|
683
|
+
ngImport: i0
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
688
|
+
minVersion: "12.0.0",
|
|
689
|
+
version: "22.2.6",
|
|
690
|
+
ngImport: i0,
|
|
691
|
+
type: CalendarHeading,
|
|
692
|
+
decorators: [{
|
|
693
|
+
type: Directive,
|
|
694
|
+
args: [{
|
|
695
|
+
selector: "[calendarHeading]",
|
|
696
|
+
exportAs: "calendarHeading",
|
|
697
|
+
host: {
|
|
698
|
+
"[attr.data-primitives-part]": "calendar.part('heading')",
|
|
699
|
+
"[attr.id]": "calendar.headingId(offset())",
|
|
700
|
+
"[attr.aria-live]": "offset() === 0 ? 'polite' : null"
|
|
701
|
+
}
|
|
702
|
+
}]
|
|
703
|
+
}],
|
|
704
|
+
propDecorators: { offset: [{
|
|
705
|
+
type: i0.Input,
|
|
706
|
+
args: [{
|
|
707
|
+
isSignal: true,
|
|
708
|
+
alias: "offset",
|
|
709
|
+
required: false
|
|
710
|
+
}]
|
|
711
|
+
}] }
|
|
712
|
+
});
|
|
713
|
+
function pageButton(delta) {
|
|
714
|
+
const calendar = inject(CALENDAR);
|
|
715
|
+
const disabled = computed(() => calendar.disabled() || !calendar.canPage(delta), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
716
|
+
return {
|
|
717
|
+
part: calendar.part(delta < 0 ? "prev-button" : "next-button"),
|
|
718
|
+
disabled,
|
|
719
|
+
data: computed(() => dataValues({ disabled: disabled() })),
|
|
720
|
+
controls: computed(() => Array.from({ length: calendar.visibleMonths() }, (_, offset) => calendar.gridId(offset)).join(" ")),
|
|
721
|
+
press: () => calendar.page(delta)
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
var CalendarNextButton = class CalendarNextButton {
|
|
725
|
+
constructor() {
|
|
726
|
+
this.button = pageButton(1);
|
|
727
|
+
this.state = computed(() => ({ disabled: this.button.disabled() }), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
728
|
+
}
|
|
729
|
+
static {
|
|
730
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
731
|
+
minVersion: "12.0.0",
|
|
732
|
+
version: "22.2.6",
|
|
733
|
+
ngImport: i0,
|
|
734
|
+
type: CalendarNextButton,
|
|
735
|
+
deps: [],
|
|
736
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
static {
|
|
740
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
741
|
+
minVersion: "14.0.0",
|
|
742
|
+
version: "22.2.6",
|
|
743
|
+
type: CalendarNextButton,
|
|
744
|
+
isStandalone: true,
|
|
745
|
+
selector: "[calendarNextButton]",
|
|
746
|
+
host: {
|
|
747
|
+
attributes: { "type": "button" },
|
|
748
|
+
listeners: { "click": "button.press()" },
|
|
749
|
+
properties: {
|
|
750
|
+
"attr.data-primitives-part": "button.part",
|
|
751
|
+
"attr.disabled": "button.data().disabled",
|
|
752
|
+
"attr.data-disabled": "button.data().disabled",
|
|
753
|
+
"attr.aria-controls": "button.controls()"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
exportAs: ["calendarNextButton"],
|
|
757
|
+
ngImport: i0
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
762
|
+
minVersion: "12.0.0",
|
|
763
|
+
version: "22.2.6",
|
|
764
|
+
ngImport: i0,
|
|
765
|
+
type: CalendarNextButton,
|
|
766
|
+
decorators: [{
|
|
767
|
+
type: Directive,
|
|
768
|
+
args: [{
|
|
769
|
+
selector: "[calendarNextButton]",
|
|
770
|
+
exportAs: "calendarNextButton",
|
|
771
|
+
host: {
|
|
772
|
+
type: "button",
|
|
773
|
+
"[attr.data-primitives-part]": "button.part",
|
|
774
|
+
"[attr.disabled]": "button.data().disabled",
|
|
775
|
+
"[attr.data-disabled]": "button.data().disabled",
|
|
776
|
+
"[attr.aria-controls]": "button.controls()",
|
|
777
|
+
"(click)": "button.press()"
|
|
778
|
+
}
|
|
779
|
+
}]
|
|
780
|
+
}]
|
|
781
|
+
});
|
|
782
|
+
var CalendarPrevButton = class CalendarPrevButton {
|
|
783
|
+
constructor() {
|
|
784
|
+
this.button = pageButton(-1);
|
|
785
|
+
this.state = computed(() => ({ disabled: this.button.disabled() }), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
786
|
+
}
|
|
787
|
+
static {
|
|
788
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
789
|
+
minVersion: "12.0.0",
|
|
790
|
+
version: "22.2.6",
|
|
791
|
+
ngImport: i0,
|
|
792
|
+
type: CalendarPrevButton,
|
|
793
|
+
deps: [],
|
|
794
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
static {
|
|
798
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
799
|
+
minVersion: "14.0.0",
|
|
800
|
+
version: "22.2.6",
|
|
801
|
+
type: CalendarPrevButton,
|
|
802
|
+
isStandalone: true,
|
|
803
|
+
selector: "[calendarPrevButton]",
|
|
804
|
+
host: {
|
|
805
|
+
attributes: { "type": "button" },
|
|
806
|
+
listeners: { "click": "button.press()" },
|
|
807
|
+
properties: {
|
|
808
|
+
"attr.data-primitives-part": "button.part",
|
|
809
|
+
"attr.disabled": "button.data().disabled",
|
|
810
|
+
"attr.data-disabled": "button.data().disabled",
|
|
811
|
+
"attr.aria-controls": "button.controls()"
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
exportAs: ["calendarPrevButton"],
|
|
815
|
+
ngImport: i0
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
820
|
+
minVersion: "12.0.0",
|
|
821
|
+
version: "22.2.6",
|
|
822
|
+
ngImport: i0,
|
|
823
|
+
type: CalendarPrevButton,
|
|
824
|
+
decorators: [{
|
|
825
|
+
type: Directive,
|
|
826
|
+
args: [{
|
|
827
|
+
selector: "[calendarPrevButton]",
|
|
828
|
+
exportAs: "calendarPrevButton",
|
|
829
|
+
host: {
|
|
830
|
+
type: "button",
|
|
831
|
+
"[attr.data-primitives-part]": "button.part",
|
|
832
|
+
"[attr.disabled]": "button.data().disabled",
|
|
833
|
+
"[attr.data-disabled]": "button.data().disabled",
|
|
834
|
+
"[attr.aria-controls]": "button.controls()",
|
|
835
|
+
"(click)": "button.press()"
|
|
836
|
+
}
|
|
837
|
+
}]
|
|
838
|
+
}]
|
|
839
|
+
});
|
|
840
|
+
const optionalNumber = (value) => value === void 0 || value === null ? void 0 : numberAttribute(value);
|
|
841
|
+
var CalendarRootBase = class CalendarRootBase {
|
|
842
|
+
constructor() {
|
|
843
|
+
this.min = input(void 0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
844
|
+
this.max = input(void 0, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
845
|
+
this.isDateUnavailable = input(void 0, ...ngDevMode ? [{ debugName: "isDateUnavailable" }] : /* istanbul ignore next */ []);
|
|
846
|
+
this.locale = input(void 0, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
847
|
+
this.firstDayOfWeek = input(void 0, {
|
|
848
|
+
...ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {},
|
|
849
|
+
transform: optionalNumber
|
|
850
|
+
});
|
|
851
|
+
this.visibleMonths = input(void 0, {
|
|
852
|
+
...ngDevMode ? { debugName: "visibleMonths" } : /* istanbul ignore next */ {},
|
|
853
|
+
transform: optionalNumber
|
|
854
|
+
});
|
|
855
|
+
this.calendarSystem = input(void 0, {
|
|
856
|
+
...ngDevMode ? { debugName: "calendarSystem" } : /* istanbul ignore next */ {},
|
|
857
|
+
alias: "calendar"
|
|
858
|
+
});
|
|
859
|
+
this.disabled = input(false, {
|
|
860
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
861
|
+
transform: booleanAttribute
|
|
862
|
+
});
|
|
863
|
+
this.readOnly = input(void 0, {
|
|
864
|
+
...ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {},
|
|
865
|
+
transform: (value) => value === void 0 ? void 0 : booleanAttribute(value)
|
|
866
|
+
});
|
|
867
|
+
this.data = computed(() => dataValues({
|
|
868
|
+
disabled: this.disabled(),
|
|
869
|
+
readonly: this.calendar.readOnly()
|
|
870
|
+
}), ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
871
|
+
}
|
|
872
|
+
stateInputs(value, valueChange, defaultValue) {
|
|
873
|
+
return {
|
|
874
|
+
value,
|
|
875
|
+
valueChange,
|
|
876
|
+
defaultValue,
|
|
877
|
+
min: this.min,
|
|
878
|
+
max: this.max,
|
|
879
|
+
isDateUnavailable: this.isDateUnavailable,
|
|
880
|
+
locale: this.locale,
|
|
881
|
+
firstDayOfWeek: this.firstDayOfWeek,
|
|
882
|
+
visibleMonths: this.visibleMonths,
|
|
883
|
+
calendar: this.calendarSystem,
|
|
884
|
+
disabled: this.disabled,
|
|
885
|
+
readOnly: this.readOnly
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
static {
|
|
889
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
890
|
+
minVersion: "12.0.0",
|
|
891
|
+
version: "22.2.6",
|
|
892
|
+
ngImport: i0,
|
|
893
|
+
type: CalendarRootBase,
|
|
894
|
+
deps: [],
|
|
895
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
static {
|
|
899
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
900
|
+
minVersion: "17.1.0",
|
|
901
|
+
version: "22.2.6",
|
|
902
|
+
type: CalendarRootBase,
|
|
903
|
+
isStandalone: true,
|
|
904
|
+
inputs: {
|
|
905
|
+
min: {
|
|
906
|
+
classPropertyName: "min",
|
|
907
|
+
publicName: "min",
|
|
908
|
+
isSignal: true,
|
|
909
|
+
isRequired: false,
|
|
910
|
+
transformFunction: null
|
|
911
|
+
},
|
|
912
|
+
max: {
|
|
913
|
+
classPropertyName: "max",
|
|
914
|
+
publicName: "max",
|
|
915
|
+
isSignal: true,
|
|
916
|
+
isRequired: false,
|
|
917
|
+
transformFunction: null
|
|
918
|
+
},
|
|
919
|
+
isDateUnavailable: {
|
|
920
|
+
classPropertyName: "isDateUnavailable",
|
|
921
|
+
publicName: "isDateUnavailable",
|
|
922
|
+
isSignal: true,
|
|
923
|
+
isRequired: false,
|
|
924
|
+
transformFunction: null
|
|
925
|
+
},
|
|
926
|
+
locale: {
|
|
927
|
+
classPropertyName: "locale",
|
|
928
|
+
publicName: "locale",
|
|
929
|
+
isSignal: true,
|
|
930
|
+
isRequired: false,
|
|
931
|
+
transformFunction: null
|
|
932
|
+
},
|
|
933
|
+
firstDayOfWeek: {
|
|
934
|
+
classPropertyName: "firstDayOfWeek",
|
|
935
|
+
publicName: "firstDayOfWeek",
|
|
936
|
+
isSignal: true,
|
|
937
|
+
isRequired: false,
|
|
938
|
+
transformFunction: null
|
|
939
|
+
},
|
|
940
|
+
visibleMonths: {
|
|
941
|
+
classPropertyName: "visibleMonths",
|
|
942
|
+
publicName: "visibleMonths",
|
|
943
|
+
isSignal: true,
|
|
944
|
+
isRequired: false,
|
|
945
|
+
transformFunction: null
|
|
946
|
+
},
|
|
947
|
+
calendarSystem: {
|
|
948
|
+
classPropertyName: "calendarSystem",
|
|
949
|
+
publicName: "calendar",
|
|
950
|
+
isSignal: true,
|
|
951
|
+
isRequired: false,
|
|
952
|
+
transformFunction: null
|
|
953
|
+
},
|
|
954
|
+
disabled: {
|
|
955
|
+
classPropertyName: "disabled",
|
|
956
|
+
publicName: "disabled",
|
|
957
|
+
isSignal: true,
|
|
958
|
+
isRequired: false,
|
|
959
|
+
transformFunction: null
|
|
960
|
+
},
|
|
961
|
+
readOnly: {
|
|
962
|
+
classPropertyName: "readOnly",
|
|
963
|
+
publicName: "readOnly",
|
|
964
|
+
isSignal: true,
|
|
965
|
+
isRequired: false,
|
|
966
|
+
transformFunction: null
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
host: { properties: {
|
|
970
|
+
"attr.data-primitives-part": "calendar.part('root')",
|
|
971
|
+
"attr.data-disabled": "data().disabled",
|
|
972
|
+
"attr.data-readonly": "data().readonly"
|
|
973
|
+
} },
|
|
974
|
+
ngImport: i0
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
979
|
+
minVersion: "12.0.0",
|
|
980
|
+
version: "22.2.6",
|
|
981
|
+
ngImport: i0,
|
|
982
|
+
type: CalendarRootBase,
|
|
983
|
+
decorators: [{
|
|
984
|
+
type: Directive,
|
|
985
|
+
args: [{ host: {
|
|
986
|
+
"[attr.data-primitives-part]": "calendar.part('root')",
|
|
987
|
+
"[attr.data-disabled]": "data().disabled",
|
|
988
|
+
"[attr.data-readonly]": "data().readonly"
|
|
989
|
+
} }]
|
|
990
|
+
}],
|
|
991
|
+
propDecorators: {
|
|
992
|
+
min: [{
|
|
993
|
+
type: i0.Input,
|
|
994
|
+
args: [{
|
|
995
|
+
isSignal: true,
|
|
996
|
+
alias: "min",
|
|
997
|
+
required: false
|
|
998
|
+
}]
|
|
999
|
+
}],
|
|
1000
|
+
max: [{
|
|
1001
|
+
type: i0.Input,
|
|
1002
|
+
args: [{
|
|
1003
|
+
isSignal: true,
|
|
1004
|
+
alias: "max",
|
|
1005
|
+
required: false
|
|
1006
|
+
}]
|
|
1007
|
+
}],
|
|
1008
|
+
isDateUnavailable: [{
|
|
1009
|
+
type: i0.Input,
|
|
1010
|
+
args: [{
|
|
1011
|
+
isSignal: true,
|
|
1012
|
+
alias: "isDateUnavailable",
|
|
1013
|
+
required: false
|
|
1014
|
+
}]
|
|
1015
|
+
}],
|
|
1016
|
+
locale: [{
|
|
1017
|
+
type: i0.Input,
|
|
1018
|
+
args: [{
|
|
1019
|
+
isSignal: true,
|
|
1020
|
+
alias: "locale",
|
|
1021
|
+
required: false
|
|
1022
|
+
}]
|
|
1023
|
+
}],
|
|
1024
|
+
firstDayOfWeek: [{
|
|
1025
|
+
type: i0.Input,
|
|
1026
|
+
args: [{
|
|
1027
|
+
isSignal: true,
|
|
1028
|
+
alias: "firstDayOfWeek",
|
|
1029
|
+
required: false
|
|
1030
|
+
}]
|
|
1031
|
+
}],
|
|
1032
|
+
visibleMonths: [{
|
|
1033
|
+
type: i0.Input,
|
|
1034
|
+
args: [{
|
|
1035
|
+
isSignal: true,
|
|
1036
|
+
alias: "visibleMonths",
|
|
1037
|
+
required: false
|
|
1038
|
+
}]
|
|
1039
|
+
}],
|
|
1040
|
+
calendarSystem: [{
|
|
1041
|
+
type: i0.Input,
|
|
1042
|
+
args: [{
|
|
1043
|
+
isSignal: true,
|
|
1044
|
+
alias: "calendar",
|
|
1045
|
+
required: false
|
|
1046
|
+
}]
|
|
1047
|
+
}],
|
|
1048
|
+
disabled: [{
|
|
1049
|
+
type: i0.Input,
|
|
1050
|
+
args: [{
|
|
1051
|
+
isSignal: true,
|
|
1052
|
+
alias: "disabled",
|
|
1053
|
+
required: false
|
|
1054
|
+
}]
|
|
1055
|
+
}],
|
|
1056
|
+
readOnly: [{
|
|
1057
|
+
type: i0.Input,
|
|
1058
|
+
args: [{
|
|
1059
|
+
isSignal: true,
|
|
1060
|
+
alias: "readOnly",
|
|
1061
|
+
required: false
|
|
1062
|
+
}]
|
|
1063
|
+
}]
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
var CalendarRoot = class CalendarRoot extends CalendarRootBase {
|
|
1067
|
+
constructor() {
|
|
1068
|
+
super(...arguments);
|
|
1069
|
+
this.value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1070
|
+
this.valueChange = output();
|
|
1071
|
+
this.defaultValue = input(void 0, ...ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []);
|
|
1072
|
+
this.valueChangeDetails = output();
|
|
1073
|
+
this.calendar = new CalendarState("calendar", "single", this.stateInputs(this.value, { emit: (value) => this.valueChange.emit(value) }, this.defaultValue), (value, details) => this.valueChangeDetails.emit({
|
|
1074
|
+
value,
|
|
1075
|
+
details
|
|
1076
|
+
}));
|
|
1077
|
+
}
|
|
1078
|
+
static {
|
|
1079
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1080
|
+
minVersion: "12.0.0",
|
|
1081
|
+
version: "22.2.6",
|
|
1082
|
+
ngImport: i0,
|
|
1083
|
+
type: CalendarRoot,
|
|
1084
|
+
deps: null,
|
|
1085
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
static {
|
|
1089
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1090
|
+
minVersion: "17.1.0",
|
|
1091
|
+
version: "22.2.6",
|
|
1092
|
+
type: CalendarRoot,
|
|
1093
|
+
isStandalone: true,
|
|
1094
|
+
selector: "[calendarRoot]",
|
|
1095
|
+
inputs: {
|
|
1096
|
+
value: {
|
|
1097
|
+
classPropertyName: "value",
|
|
1098
|
+
publicName: "value",
|
|
1099
|
+
isSignal: true,
|
|
1100
|
+
isRequired: false,
|
|
1101
|
+
transformFunction: null
|
|
1102
|
+
},
|
|
1103
|
+
defaultValue: {
|
|
1104
|
+
classPropertyName: "defaultValue",
|
|
1105
|
+
publicName: "defaultValue",
|
|
1106
|
+
isSignal: true,
|
|
1107
|
+
isRequired: false,
|
|
1108
|
+
transformFunction: null
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
outputs: {
|
|
1112
|
+
valueChange: "valueChange",
|
|
1113
|
+
valueChangeDetails: "valueChangeDetails"
|
|
1114
|
+
},
|
|
1115
|
+
providers: [{
|
|
1116
|
+
provide: CALENDAR,
|
|
1117
|
+
useFactory: () => inject(forwardRef(() => CalendarRoot)).calendar
|
|
1118
|
+
}],
|
|
1119
|
+
exportAs: ["calendarRoot"],
|
|
1120
|
+
usesInheritance: true,
|
|
1121
|
+
ngImport: i0
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1126
|
+
minVersion: "12.0.0",
|
|
1127
|
+
version: "22.2.6",
|
|
1128
|
+
ngImport: i0,
|
|
1129
|
+
type: CalendarRoot,
|
|
1130
|
+
decorators: [{
|
|
1131
|
+
type: Directive,
|
|
1132
|
+
args: [{
|
|
1133
|
+
selector: "[calendarRoot]",
|
|
1134
|
+
exportAs: "calendarRoot",
|
|
1135
|
+
providers: [{
|
|
1136
|
+
provide: CALENDAR,
|
|
1137
|
+
useFactory: () => inject(forwardRef(() => CalendarRoot)).calendar
|
|
1138
|
+
}]
|
|
1139
|
+
}]
|
|
1140
|
+
}],
|
|
1141
|
+
propDecorators: {
|
|
1142
|
+
value: [{
|
|
1143
|
+
type: i0.Input,
|
|
1144
|
+
args: [{
|
|
1145
|
+
isSignal: true,
|
|
1146
|
+
alias: "value",
|
|
1147
|
+
required: false
|
|
1148
|
+
}]
|
|
1149
|
+
}],
|
|
1150
|
+
valueChange: [{
|
|
1151
|
+
type: i0.Output,
|
|
1152
|
+
args: ["valueChange"]
|
|
1153
|
+
}],
|
|
1154
|
+
defaultValue: [{
|
|
1155
|
+
type: i0.Input,
|
|
1156
|
+
args: [{
|
|
1157
|
+
isSignal: true,
|
|
1158
|
+
alias: "defaultValue",
|
|
1159
|
+
required: false
|
|
1160
|
+
}]
|
|
1161
|
+
}],
|
|
1162
|
+
valueChangeDetails: [{
|
|
1163
|
+
type: i0.Output,
|
|
1164
|
+
args: ["valueChangeDetails"]
|
|
1165
|
+
}]
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
var CalendarRow = class CalendarRow {
|
|
1169
|
+
constructor() {
|
|
1170
|
+
this.calendar = inject(CALENDAR);
|
|
1171
|
+
}
|
|
1172
|
+
static {
|
|
1173
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1174
|
+
minVersion: "12.0.0",
|
|
1175
|
+
version: "22.2.6",
|
|
1176
|
+
ngImport: i0,
|
|
1177
|
+
type: CalendarRow,
|
|
1178
|
+
deps: [],
|
|
1179
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
static {
|
|
1183
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1184
|
+
minVersion: "14.0.0",
|
|
1185
|
+
version: "22.2.6",
|
|
1186
|
+
type: CalendarRow,
|
|
1187
|
+
isStandalone: true,
|
|
1188
|
+
selector: "[calendarRow]",
|
|
1189
|
+
host: { properties: { "attr.data-primitives-part": "calendar.part('row')" } },
|
|
1190
|
+
ngImport: i0
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1195
|
+
minVersion: "12.0.0",
|
|
1196
|
+
version: "22.2.6",
|
|
1197
|
+
ngImport: i0,
|
|
1198
|
+
type: CalendarRow,
|
|
1199
|
+
decorators: [{
|
|
1200
|
+
type: Directive,
|
|
1201
|
+
args: [{
|
|
1202
|
+
selector: "[calendarRow]",
|
|
1203
|
+
host: { "[attr.data-primitives-part]": "calendar.part('row')" }
|
|
1204
|
+
}]
|
|
1205
|
+
}]
|
|
1206
|
+
});
|
|
1207
|
+
function injectCalendar() {
|
|
1208
|
+
const calendar = inject(CALENDAR, { optional: true });
|
|
1209
|
+
if (calendar === null) throw new Error("injectCalendar() must be used inside [calendarRoot] or [rangeCalendarRoot]");
|
|
1210
|
+
return {
|
|
1211
|
+
state: computed(() => ({
|
|
1212
|
+
value: calendar.value(),
|
|
1213
|
+
focusedDate: calendar.focusedDate(),
|
|
1214
|
+
visibleStart: calendar.visibleStart()
|
|
1215
|
+
})),
|
|
1216
|
+
select: (date) => calendar.select(date),
|
|
1217
|
+
page: (delta) => calendar.page(delta)
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
export { CALENDAR, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, CalendarHeading, CalendarNextButton, CalendarPrevButton, CalendarRoot, CalendarRootBase, CalendarRow, CalendarState, PICKER_BINDING, injectCalendar };
|
|
1221
|
+
|
|
1222
|
+
//# sourceMappingURL=fragiola-primitives-angular-calendar.mjs.map
|