@ngstarter-ui/components 22.3.6 → 22.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/ai/component-registry.json +186 -101
- package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
- package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
- package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
- package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
- package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
- package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
- package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
- package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
- package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
- package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
- package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
- package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
- package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
- package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
- package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
- package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
- package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
- package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
- package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
- package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
- package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
- package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
- package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
- package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
- package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
- package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
- package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
- package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
- package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
- package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
- package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
- package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
- package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
- package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
- package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
- package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
- package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
- package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
- package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
- package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
- package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
- package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
- package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
- package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
- package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
- package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
- package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
- package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
- package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
- package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
- package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
- package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
- package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
- package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
- package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
- package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
- package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
- package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
- package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
- package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
- package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
- package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
- package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
- package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
- package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
- package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
- package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
- package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
- package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
- package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
- package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
- package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
- package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
- package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
- package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
- package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
- package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
- package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
- package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
- package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
- package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
- package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
- package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
- package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
- package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
- package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
- package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
- package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
- package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
- package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
- package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
- package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
- package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
- package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
- package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
- package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
- package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
- package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
- package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
- package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
- package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components.mjs +3 -5
- package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
- package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
- package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
- package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
- package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
- package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
- package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
- package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
- package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
- package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
- package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
- package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
- package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
- package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
- package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
- package/package.json +11 -10
- package/styles/_tokens.scss +1 -0
- package/types/ngstarter-ui-components-action-required.d.ts +34 -14
- package/types/ngstarter-ui-components-alert.d.ts +53 -44
- package/types/ngstarter-ui-components-announcement.d.ts +74 -53
- package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
- package/types/ngstarter-ui-components-avatar.d.ts +113 -66
- package/types/ngstarter-ui-components-badge.d.ts +73 -37
- package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
- package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
- package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
- package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
- package/types/ngstarter-ui-components-button.d.ts +69 -27
- package/types/ngstarter-ui-components-calendar.d.ts +123 -71
- package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
- package/types/ngstarter-ui-components-card.d.ts +75 -71
- package/types/ngstarter-ui-components-carousel.d.ts +115 -69
- package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
- package/types/ngstarter-ui-components-chips.d.ts +288 -195
- package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
- package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
- package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
- package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
- package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
- package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
- package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
- package/types/ngstarter-ui-components-confirm.d.ts +24 -29
- package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
- package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
- package/types/ngstarter-ui-components-core.d.ts +513 -467
- package/types/ngstarter-ui-components-country-select.d.ts +170 -97
- package/types/ngstarter-ui-components-crop.d.ts +67 -52
- package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
- package/types/ngstarter-ui-components-data-view.d.ts +811 -567
- package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
- package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
- package/types/ngstarter-ui-components-dialog.d.ts +138 -116
- package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
- package/types/ngstarter-ui-components-divider.d.ts +29 -17
- package/types/ngstarter-ui-components-drawer.d.ts +39 -30
- package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
- package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
- package/types/ngstarter-ui-components-events.d.ts +73 -57
- package/types/ngstarter-ui-components-expand.d.ts +55 -25
- package/types/ngstarter-ui-components-expansion.d.ts +93 -64
- package/types/ngstarter-ui-components-file-type.d.ts +53 -27
- package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
- package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
- package/types/ngstarter-ui-components-form-field.d.ts +116 -105
- package/types/ngstarter-ui-components-gauge.d.ts +32 -20
- package/types/ngstarter-ui-components-grid.d.ts +66 -50
- package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
- package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
- package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
- package/types/ngstarter-ui-components-icon.d.ts +39 -38
- package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
- package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
- package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
- package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
- package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
- package/types/ngstarter-ui-components-incidents.d.ts +97 -104
- package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
- package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
- package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
- package/types/ngstarter-ui-components-input.d.ts +82 -54
- package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
- package/types/ngstarter-ui-components-kbd.d.ts +8 -12
- package/types/ngstarter-ui-components-layout.d.ts +131 -87
- package/types/ngstarter-ui-components-list.d.ts +123 -88
- package/types/ngstarter-ui-components-logo.d.ts +21 -21
- package/types/ngstarter-ui-components-marquee.d.ts +41 -34
- package/types/ngstarter-ui-components-menu.d.ts +329 -221
- package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
- package/types/ngstarter-ui-components-navigation.d.ts +186 -125
- package/types/ngstarter-ui-components-notifications.d.ts +104 -89
- package/types/ngstarter-ui-components-number-input.d.ts +138 -96
- package/types/ngstarter-ui-components-option.d.ts +102 -68
- package/types/ngstarter-ui-components-overlay.d.ts +7 -12
- package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
- package/types/ngstarter-ui-components-paginator.d.ts +171 -129
- package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
- package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
- package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
- package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
- package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
- package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
- package/types/ngstarter-ui-components-popover.d.ts +128 -89
- package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
- package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
- package/types/ngstarter-ui-components-radio.d.ts +100 -47
- package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
- package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
- package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
- package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
- package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
- package/types/ngstarter-ui-components-segmented.d.ts +93 -61
- package/types/ngstarter-ui-components-select.d.ts +366 -266
- package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
- package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
- package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
- package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
- package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
- package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
- package/types/ngstarter-ui-components-slider.d.ts +123 -82
- package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
- package/types/ngstarter-ui-components-sort.d.ts +99 -63
- package/types/ngstarter-ui-components-spinner.d.ts +49 -27
- package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
- package/types/ngstarter-ui-components-split.d.ts +276 -195
- package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
- package/types/ngstarter-ui-components-stepper.d.ts +57 -43
- package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
- package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
- package/types/ngstarter-ui-components-table.d.ts +256 -228
- package/types/ngstarter-ui-components-tabs.d.ts +231 -138
- package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
- package/types/ngstarter-ui-components-tiles.d.ts +166 -104
- package/types/ngstarter-ui-components-timeline.d.ts +45 -57
- package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
- package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
- package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
- package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
- package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
- package/types/ngstarter-ui-components-tree.d.ts +355 -229
- package/types/ngstarter-ui-components-upload.d.ts +216 -131
- package/types/ngstarter-ui-components-video-player.d.ts +130 -67
- package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
- package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
- package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
- package/types/ngstarter-ui-components.d.ts +2 -2
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs +0 -35
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs +0 -26
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs +0 -220
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs +0 -375
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs +0 -80
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs +0 -65
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs +0 -137
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs +0 -113
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs +0 -188
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs +0 -117
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs +0 -4464
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs +0 -132
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs +0 -171
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs +0 -1653
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs +0 -20
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs +0 -134
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
|
@@ -1,1278 +1,2601 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { FormField, FormFieldControl
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const MAT_DATE_LOCALE = new InjectionToken(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, Injectable, InjectionToken, LOCALE_ID, ViewContainerRef, ViewEncapsulation, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { Icon } from "@ngstarter-ui/components/icon";
|
|
4
|
+
import { Button } from "@ngstarter-ui/components/button";
|
|
5
|
+
import { NgComponentOutlet } from "@angular/common";
|
|
6
|
+
import { connectLegacyNativeFormControl } from "@ngstarter-ui/components/core";
|
|
7
|
+
import { Overlay, OverlayModule } from "@angular/cdk/overlay";
|
|
8
|
+
import { TemplatePortal } from "@angular/cdk/portal";
|
|
9
|
+
import { Subject } from "rxjs";
|
|
10
|
+
import { FORM_FIELD, FormField, FormFieldControl } from "@ngstarter-ui/components/form-field";
|
|
11
|
+
import { NgControl } from "@angular/forms";
|
|
12
|
+
import { FormField as FormField$1, transformedValue } from "@angular/forms/signals";
|
|
13
|
+
const MAT_DATE_LOCALE = new InjectionToken("MAT_DATE_LOCALE");
|
|
14
|
+
const MAT_DATE_FORMATS = new InjectionToken("MAT_DATE_FORMATS");
|
|
15
|
+
var DateAdapter = class {
|
|
16
|
+
_localeChanges = new Subject();
|
|
17
|
+
localeChanges = this._localeChanges;
|
|
18
|
+
setLocale(locale) {
|
|
19
|
+
this.locale = locale;
|
|
20
|
+
this._localeChanges.next();
|
|
21
|
+
}
|
|
22
|
+
locale = inject(LOCALE_ID);
|
|
23
|
+
compareDate(first, second) {
|
|
24
|
+
return this.getYear(first) - this.getYear(second) || this.getMonth(first) - this.getMonth(second) || this.getDate(first) - this.getDate(second);
|
|
25
|
+
}
|
|
26
|
+
sameDate(first, second) {
|
|
27
|
+
if (first && second) {
|
|
28
|
+
let firstValid = this.isValid(first);
|
|
29
|
+
let secondValid = this.isValid(second);
|
|
30
|
+
if (firstValid && secondValid) return !this.compareDate(first, second);
|
|
31
|
+
return firstValid === secondValid;
|
|
32
|
+
}
|
|
33
|
+
return first === second;
|
|
34
|
+
}
|
|
35
|
+
clampDate(date, min, max) {
|
|
36
|
+
if (min && this.compareDate(date, min) < 0) return min;
|
|
37
|
+
if (max && this.compareDate(date, max) > 0) return max;
|
|
38
|
+
return date;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var DatepickerIntl = class DatepickerIntl {
|
|
42
|
+
changes = new Subject();
|
|
43
|
+
calendarLabel = "Calendar";
|
|
44
|
+
openCalendarLabel = "Open calendar";
|
|
45
|
+
prevMonthLabel = "Previous month";
|
|
46
|
+
nextMonthLabel = "Next month";
|
|
47
|
+
prevYearLabel = "Previous year";
|
|
48
|
+
nextYearLabel = "Next year";
|
|
49
|
+
prevMultiYearLabel = "Previous 24 years";
|
|
50
|
+
nextMultiYearLabel = "Next 24 years";
|
|
51
|
+
switchToMonthViewLabel = "Choose date";
|
|
52
|
+
switchToMultiYearViewLabel = "Choose month and year";
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.3.0",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: DatepickerIntl,
|
|
58
|
+
deps: [],
|
|
59
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
60
|
+
});
|
|
61
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
62
|
+
minVersion: "12.0.0",
|
|
63
|
+
version: "22.3.0",
|
|
64
|
+
ngImport: i0,
|
|
65
|
+
type: DatepickerIntl,
|
|
66
|
+
providedIn: "root"
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
70
|
+
minVersion: "12.0.0",
|
|
71
|
+
version: "22.3.0",
|
|
72
|
+
ngImport: i0,
|
|
73
|
+
type: DatepickerIntl,
|
|
74
|
+
decorators: [{
|
|
75
|
+
type: Injectable,
|
|
76
|
+
args: [{ providedIn: "root" }]
|
|
77
|
+
}]
|
|
78
|
+
});
|
|
79
|
+
var DateRange = class {
|
|
80
|
+
start;
|
|
81
|
+
end;
|
|
82
|
+
constructor(start, end) {
|
|
83
|
+
this.start = start;
|
|
84
|
+
this.end = end;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
var MonthView = class MonthView {
|
|
88
|
+
_dateAdapter = inject(DateAdapter);
|
|
89
|
+
activeDate = input.required(...ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []);
|
|
90
|
+
selected = input(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
91
|
+
minDate = input(null, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
|
|
92
|
+
maxDate = input(null, ...ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []);
|
|
93
|
+
rangePreviewDate = input(null, ...ngDevMode ? [{ debugName: "rangePreviewDate" }] : /* istanbul ignore next */ []);
|
|
94
|
+
sharedRangePreview = input(false, ...ngDevMode ? [{ debugName: "sharedRangePreview" }] : /* istanbul ignore next */ []);
|
|
95
|
+
selectedChange = output();
|
|
96
|
+
rangePreviewDateChange = output();
|
|
97
|
+
_hoveredDate = signal(null, ...ngDevMode ? [{ debugName: "_hoveredDate" }] : /* istanbul ignore next */ []);
|
|
98
|
+
hoveredDate = this._hoveredDate;
|
|
99
|
+
weekdays = computed(() => {
|
|
100
|
+
return this._dateAdapter.getDayOfWeekNames("short");
|
|
101
|
+
}, ...ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []);
|
|
102
|
+
weeks = computed(() => {
|
|
103
|
+
const activeDate = this.activeDate();
|
|
104
|
+
const hoveredDate = this.sharedRangePreview() ? this.rangePreviewDate() : this._hoveredDate();
|
|
105
|
+
const firstDayOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(activeDate), this._dateAdapter.getMonth(activeDate), 1);
|
|
106
|
+
const daysInMonth = this._dateAdapter.getNumDaysInMonth(activeDate);
|
|
107
|
+
const firstDayOfWeek = this._dateAdapter.getDayOfWeek(firstDayOfMonth);
|
|
108
|
+
const weeks = [];
|
|
109
|
+
let currentWeek = [];
|
|
110
|
+
for (let i = 0; i < firstDayOfWeek; i++) currentWeek.push({
|
|
111
|
+
date: null,
|
|
112
|
+
label: "",
|
|
113
|
+
selected: false,
|
|
114
|
+
current: false,
|
|
115
|
+
inRange: false,
|
|
116
|
+
rangeStart: false,
|
|
117
|
+
rangeEnd: false
|
|
118
|
+
});
|
|
119
|
+
const today = this._dateAdapter.today();
|
|
120
|
+
const selected = this.selected();
|
|
121
|
+
for (let i = 1; i <= daysInMonth; i++) {
|
|
122
|
+
const date = this._dateAdapter.createDate(this._dateAdapter.getYear(activeDate), this._dateAdapter.getMonth(activeDate), i);
|
|
123
|
+
let isSelected = false;
|
|
124
|
+
let inRange = false;
|
|
125
|
+
let rangeStart = false;
|
|
126
|
+
let rangeEnd = false;
|
|
127
|
+
if (selected instanceof DateRange) {
|
|
128
|
+
if (selected.start && selected.end) {
|
|
129
|
+
inRange = this._dateAdapter.compareDate(date, selected.start) >= 0 && this._dateAdapter.compareDate(date, selected.end) <= 0;
|
|
130
|
+
rangeStart = this._dateAdapter.sameDate(date, selected.start);
|
|
131
|
+
rangeEnd = this._dateAdapter.sameDate(date, selected.end);
|
|
132
|
+
} else if (selected.start) {
|
|
133
|
+
isSelected = this._dateAdapter.sameDate(date, selected.start);
|
|
134
|
+
rangeStart = isSelected;
|
|
135
|
+
if (hoveredDate) {
|
|
136
|
+
const comparison = this._dateAdapter.compareDate(date, selected.start);
|
|
137
|
+
const hoverComparison = this._dateAdapter.compareDate(date, hoveredDate);
|
|
138
|
+
if (this._dateAdapter.compareDate(hoveredDate, selected.start) >= 0) {
|
|
139
|
+
inRange = comparison >= 0 && hoverComparison <= 0;
|
|
140
|
+
rangeEnd = this._dateAdapter.sameDate(date, hoveredDate);
|
|
141
|
+
} else {
|
|
142
|
+
inRange = comparison <= 0 && hoverComparison >= 0;
|
|
143
|
+
rangeStart = this._dateAdapter.sameDate(date, hoveredDate);
|
|
144
|
+
rangeEnd = isSelected;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
} else if (selected.end) {
|
|
148
|
+
isSelected = this._dateAdapter.sameDate(date, selected.end);
|
|
149
|
+
rangeEnd = isSelected;
|
|
150
|
+
}
|
|
151
|
+
} else isSelected = this._dateAdapter.sameDate(date, selected);
|
|
152
|
+
currentWeek.push({
|
|
153
|
+
date,
|
|
154
|
+
label: i.toString(),
|
|
155
|
+
selected: isSelected,
|
|
156
|
+
current: this._dateAdapter.sameDate(date, today),
|
|
157
|
+
inRange,
|
|
158
|
+
rangeStart,
|
|
159
|
+
rangeEnd
|
|
160
|
+
});
|
|
161
|
+
if (currentWeek.length === 7) {
|
|
162
|
+
weeks.push(currentWeek);
|
|
163
|
+
currentWeek = [];
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (currentWeek.length > 0) {
|
|
167
|
+
while (currentWeek.length < 7) currentWeek.push({
|
|
168
|
+
date: null,
|
|
169
|
+
label: "",
|
|
170
|
+
selected: false,
|
|
171
|
+
current: false,
|
|
172
|
+
inRange: false,
|
|
173
|
+
rangeStart: false,
|
|
174
|
+
rangeEnd: false
|
|
175
|
+
});
|
|
176
|
+
weeks.push(currentWeek);
|
|
177
|
+
}
|
|
178
|
+
return weeks;
|
|
179
|
+
}, ...ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []);
|
|
180
|
+
selectDate(date) {
|
|
181
|
+
if (date) this.selectedChange.emit(date);
|
|
182
|
+
}
|
|
183
|
+
handleHover(date) {
|
|
184
|
+
this._hoveredDate.set(date);
|
|
185
|
+
this.rangePreviewDateChange.emit(date);
|
|
186
|
+
}
|
|
187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
188
|
+
minVersion: "12.0.0",
|
|
189
|
+
version: "22.3.0",
|
|
190
|
+
ngImport: i0,
|
|
191
|
+
type: MonthView,
|
|
192
|
+
deps: [],
|
|
193
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
194
|
+
});
|
|
195
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
196
|
+
minVersion: "17.0.0",
|
|
197
|
+
version: "22.3.0",
|
|
198
|
+
type: MonthView,
|
|
199
|
+
isStandalone: true,
|
|
200
|
+
selector: "ngs-month-view",
|
|
201
|
+
inputs: {
|
|
202
|
+
activeDate: {
|
|
203
|
+
classPropertyName: "activeDate",
|
|
204
|
+
publicName: "activeDate",
|
|
205
|
+
isSignal: true,
|
|
206
|
+
isRequired: true,
|
|
207
|
+
transformFunction: null
|
|
208
|
+
},
|
|
209
|
+
selected: {
|
|
210
|
+
classPropertyName: "selected",
|
|
211
|
+
publicName: "selected",
|
|
212
|
+
isSignal: true,
|
|
213
|
+
isRequired: false,
|
|
214
|
+
transformFunction: null
|
|
215
|
+
},
|
|
216
|
+
minDate: {
|
|
217
|
+
classPropertyName: "minDate",
|
|
218
|
+
publicName: "minDate",
|
|
219
|
+
isSignal: true,
|
|
220
|
+
isRequired: false,
|
|
221
|
+
transformFunction: null
|
|
222
|
+
},
|
|
223
|
+
maxDate: {
|
|
224
|
+
classPropertyName: "maxDate",
|
|
225
|
+
publicName: "maxDate",
|
|
226
|
+
isSignal: true,
|
|
227
|
+
isRequired: false,
|
|
228
|
+
transformFunction: null
|
|
229
|
+
},
|
|
230
|
+
rangePreviewDate: {
|
|
231
|
+
classPropertyName: "rangePreviewDate",
|
|
232
|
+
publicName: "rangePreviewDate",
|
|
233
|
+
isSignal: true,
|
|
234
|
+
isRequired: false,
|
|
235
|
+
transformFunction: null
|
|
236
|
+
},
|
|
237
|
+
sharedRangePreview: {
|
|
238
|
+
classPropertyName: "sharedRangePreview",
|
|
239
|
+
publicName: "sharedRangePreview",
|
|
240
|
+
isSignal: true,
|
|
241
|
+
isRequired: false,
|
|
242
|
+
transformFunction: null
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
outputs: {
|
|
246
|
+
selectedChange: "selectedChange",
|
|
247
|
+
rangePreviewDateChange: "rangePreviewDateChange"
|
|
248
|
+
},
|
|
249
|
+
host: {
|
|
250
|
+
listeners: { "mouseleave": "handleHover(null)" },
|
|
251
|
+
classAttribute: "ngs-month-view"
|
|
252
|
+
},
|
|
253
|
+
exportAs: ["ngsMonthView"],
|
|
254
|
+
ngImport: i0,
|
|
255
|
+
template: "<table class=\"ngs-calendar-table\">\n <thead class=\"ngs-calendar-table-header\">\n <tr>\n @for (day of weekdays(); track $index) {\n <th scope=\"col\">{{ day }}</th>\n }\n </tr>\n </thead>\n <tbody class=\"ngs-calendar-table-body\">\n @for (week of weeks(); track $index) {\n @if (week[0].date || week[6].date) {\n <tr>\n @for (day of week; track $index) {\n <td\n class=\"ngs-calendar-cell\"\n [class.ngs-calendar-cell-selected]=\"day.selected\"\n [class.ngs-calendar-cell-today]=\"day.current\"\n [class.ngs-calendar-cell-empty]=\"!day.date\"\n [class.ngs-calendar-cell-in-range]=\"day.inRange\"\n [class.ngs-calendar-cell-range-start]=\"day.rangeStart\"\n [class.ngs-calendar-cell-range-end]=\"day.rangeEnd\"\n (click)=\"selectDate(day.date)\"\n (mouseenter)=\"handleHover(day.date)\"\n >\n <div class=\"ngs-calendar-cell-content\">\n {{ day.label }}\n </div>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n</table>\n",
|
|
256
|
+
styles: [":host{display:block;height:100%;min-height:calc(var(--ngs-calendar-cell-size) * 6 + calc(var(--spacing, .25rem) * 2))}:host .ngs-calendar-table{width:100%;border-collapse:collapse;border-spacing:0}:host .ngs-calendar-table th{padding:8px 0;font-weight:600;font-size:var(--ngs-font-size-xs);color:var(--ngs-color-on-surface-variant);text-align:center}:host .ngs-calendar-cell{width:var(--ngs-calendar-cell-size);height:var(--ngs-calendar-cell-size);border-radius:var(--ngs-calendar-cell-radius);text-align:center;cursor:pointer;position:relative;box-sizing:border-box}:host .ngs-calendar-cell.ngs-calendar-cell-selected{background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell.ngs-calendar-cell-in-range{background:var(--ngs-calendar-cell-in-range-bg);border-radius:0}:host .ngs-calendar-cell.ngs-calendar-cell-range-start{border-top-left-radius:var(--ngs-calendar-cell-radius);border-bottom-left-radius:var(--ngs-calendar-cell-radius);background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell.ngs-calendar-cell-range-end{border-top-right-radius:var(--ngs-calendar-cell-radius);border-bottom-right-radius:var(--ngs-calendar-cell-radius);background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell.ngs-calendar-cell-range-start.ngs-calendar-cell-range-end{border-radius:var(--ngs-calendar-cell-radius)}:host .ngs-calendar-cell:not(.ngs-calendar-cell-empty):not(.ngs-calendar-cell-selected):not(.ngs-calendar-cell-range-start):not(.ngs-calendar-cell-range-end):hover{background:var(--ngs-calendar-cell-hover-bg)}:host .ngs-calendar-cell-empty{cursor:default}:host .ngs-calendar-cell-today{z-index:1}:host .ngs-calendar-cell-today .ngs-calendar-cell-content{outline:var(--ngs-calendar-cell-today-border);border-radius:inherit}:host .ngs-calendar-cell-content{display:flex;align-items:center;justify-content:center;height:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
257
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
261
|
+
minVersion: "12.0.0",
|
|
262
|
+
version: "22.3.0",
|
|
263
|
+
ngImport: i0,
|
|
264
|
+
type: MonthView,
|
|
265
|
+
decorators: [{
|
|
266
|
+
type: Component,
|
|
267
|
+
args: [{
|
|
268
|
+
selector: "ngs-month-view",
|
|
269
|
+
exportAs: "ngsMonthView",
|
|
270
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
271
|
+
host: {
|
|
272
|
+
"class": "ngs-month-view",
|
|
273
|
+
"(mouseleave)": "handleHover(null)"
|
|
274
|
+
},
|
|
275
|
+
template: "<table class=\"ngs-calendar-table\">\n <thead class=\"ngs-calendar-table-header\">\n <tr>\n @for (day of weekdays(); track $index) {\n <th scope=\"col\">{{ day }}</th>\n }\n </tr>\n </thead>\n <tbody class=\"ngs-calendar-table-body\">\n @for (week of weeks(); track $index) {\n @if (week[0].date || week[6].date) {\n <tr>\n @for (day of week; track $index) {\n <td\n class=\"ngs-calendar-cell\"\n [class.ngs-calendar-cell-selected]=\"day.selected\"\n [class.ngs-calendar-cell-today]=\"day.current\"\n [class.ngs-calendar-cell-empty]=\"!day.date\"\n [class.ngs-calendar-cell-in-range]=\"day.inRange\"\n [class.ngs-calendar-cell-range-start]=\"day.rangeStart\"\n [class.ngs-calendar-cell-range-end]=\"day.rangeEnd\"\n (click)=\"selectDate(day.date)\"\n (mouseenter)=\"handleHover(day.date)\"\n >\n <div class=\"ngs-calendar-cell-content\">\n {{ day.label }}\n </div>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n</table>\n",
|
|
276
|
+
styles: [":host{display:block;height:100%;min-height:calc(var(--ngs-calendar-cell-size) * 6 + calc(var(--spacing, .25rem) * 2))}:host .ngs-calendar-table{width:100%;border-collapse:collapse;border-spacing:0}:host .ngs-calendar-table th{padding:8px 0;font-weight:600;font-size:var(--ngs-font-size-xs);color:var(--ngs-color-on-surface-variant);text-align:center}:host .ngs-calendar-cell{width:var(--ngs-calendar-cell-size);height:var(--ngs-calendar-cell-size);border-radius:var(--ngs-calendar-cell-radius);text-align:center;cursor:pointer;position:relative;box-sizing:border-box}:host .ngs-calendar-cell.ngs-calendar-cell-selected{background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell.ngs-calendar-cell-in-range{background:var(--ngs-calendar-cell-in-range-bg);border-radius:0}:host .ngs-calendar-cell.ngs-calendar-cell-range-start{border-top-left-radius:var(--ngs-calendar-cell-radius);border-bottom-left-radius:var(--ngs-calendar-cell-radius);background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell.ngs-calendar-cell-range-end{border-top-right-radius:var(--ngs-calendar-cell-radius);border-bottom-right-radius:var(--ngs-calendar-cell-radius);background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell.ngs-calendar-cell-range-start.ngs-calendar-cell-range-end{border-radius:var(--ngs-calendar-cell-radius)}:host .ngs-calendar-cell:not(.ngs-calendar-cell-empty):not(.ngs-calendar-cell-selected):not(.ngs-calendar-cell-range-start):not(.ngs-calendar-cell-range-end):hover{background:var(--ngs-calendar-cell-hover-bg)}:host .ngs-calendar-cell-empty{cursor:default}:host .ngs-calendar-cell-today{z-index:1}:host .ngs-calendar-cell-today .ngs-calendar-cell-content{outline:var(--ngs-calendar-cell-today-border);border-radius:inherit}:host .ngs-calendar-cell-content{display:flex;align-items:center;justify-content:center;height:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
277
|
+
}]
|
|
278
|
+
}],
|
|
279
|
+
propDecorators: {
|
|
280
|
+
activeDate: [{
|
|
281
|
+
type: i0.Input,
|
|
282
|
+
args: [{
|
|
283
|
+
isSignal: true,
|
|
284
|
+
alias: "activeDate",
|
|
285
|
+
required: true
|
|
286
|
+
}]
|
|
287
|
+
}],
|
|
288
|
+
selected: [{
|
|
289
|
+
type: i0.Input,
|
|
290
|
+
args: [{
|
|
291
|
+
isSignal: true,
|
|
292
|
+
alias: "selected",
|
|
293
|
+
required: false
|
|
294
|
+
}]
|
|
295
|
+
}],
|
|
296
|
+
minDate: [{
|
|
297
|
+
type: i0.Input,
|
|
298
|
+
args: [{
|
|
299
|
+
isSignal: true,
|
|
300
|
+
alias: "minDate",
|
|
301
|
+
required: false
|
|
302
|
+
}]
|
|
303
|
+
}],
|
|
304
|
+
maxDate: [{
|
|
305
|
+
type: i0.Input,
|
|
306
|
+
args: [{
|
|
307
|
+
isSignal: true,
|
|
308
|
+
alias: "maxDate",
|
|
309
|
+
required: false
|
|
310
|
+
}]
|
|
311
|
+
}],
|
|
312
|
+
rangePreviewDate: [{
|
|
313
|
+
type: i0.Input,
|
|
314
|
+
args: [{
|
|
315
|
+
isSignal: true,
|
|
316
|
+
alias: "rangePreviewDate",
|
|
317
|
+
required: false
|
|
318
|
+
}]
|
|
319
|
+
}],
|
|
320
|
+
sharedRangePreview: [{
|
|
321
|
+
type: i0.Input,
|
|
322
|
+
args: [{
|
|
323
|
+
isSignal: true,
|
|
324
|
+
alias: "sharedRangePreview",
|
|
325
|
+
required: false
|
|
326
|
+
}]
|
|
327
|
+
}],
|
|
328
|
+
selectedChange: [{
|
|
329
|
+
type: i0.Output,
|
|
330
|
+
args: ["selectedChange"]
|
|
331
|
+
}],
|
|
332
|
+
rangePreviewDateChange: [{
|
|
333
|
+
type: i0.Output,
|
|
334
|
+
args: ["rangePreviewDateChange"]
|
|
335
|
+
}]
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
var YearView = class YearView {
|
|
339
|
+
_dateAdapter = inject(DateAdapter);
|
|
340
|
+
activeDate = input.required(...ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []);
|
|
341
|
+
selected = input(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
342
|
+
monthSelected = output();
|
|
343
|
+
months = computed(() => {
|
|
344
|
+
const activeDate = this.activeDate();
|
|
345
|
+
const monthNames = this._dateAdapter.getMonthNames("short");
|
|
346
|
+
const today = this._dateAdapter.today();
|
|
347
|
+
const currentYear = this._dateAdapter.getYear(activeDate);
|
|
348
|
+
const selectedYear = this.selected() ? this._dateAdapter.getYear(this.selected()) : null;
|
|
349
|
+
const selectedMonth = this.selected() ? this._dateAdapter.getMonth(this.selected()) : null;
|
|
350
|
+
const todayYear = this._dateAdapter.getYear(today);
|
|
351
|
+
const todayMonth = this._dateAdapter.getMonth(today);
|
|
352
|
+
const months = [];
|
|
353
|
+
let currentRow = [];
|
|
354
|
+
for (let i = 0; i < 12; i++) {
|
|
355
|
+
currentRow.push({
|
|
356
|
+
index: i,
|
|
357
|
+
label: monthNames[i],
|
|
358
|
+
selected: currentYear === selectedYear && i === selectedMonth,
|
|
359
|
+
current: currentYear === todayYear && i === todayMonth
|
|
360
|
+
});
|
|
361
|
+
if (currentRow.length === 4) {
|
|
362
|
+
months.push(currentRow);
|
|
363
|
+
currentRow = [];
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return months;
|
|
367
|
+
}, ...ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []);
|
|
368
|
+
selectMonth(month) {
|
|
369
|
+
const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate()), month, 1);
|
|
370
|
+
this.monthSelected.emit(date);
|
|
371
|
+
}
|
|
372
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
373
|
+
minVersion: "12.0.0",
|
|
374
|
+
version: "22.3.0",
|
|
375
|
+
ngImport: i0,
|
|
376
|
+
type: YearView,
|
|
377
|
+
deps: [],
|
|
378
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
379
|
+
});
|
|
380
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
381
|
+
minVersion: "17.0.0",
|
|
382
|
+
version: "22.3.0",
|
|
383
|
+
type: YearView,
|
|
384
|
+
isStandalone: true,
|
|
385
|
+
selector: "ngs-year-view",
|
|
386
|
+
inputs: {
|
|
387
|
+
activeDate: {
|
|
388
|
+
classPropertyName: "activeDate",
|
|
389
|
+
publicName: "activeDate",
|
|
390
|
+
isSignal: true,
|
|
391
|
+
isRequired: true,
|
|
392
|
+
transformFunction: null
|
|
393
|
+
},
|
|
394
|
+
selected: {
|
|
395
|
+
classPropertyName: "selected",
|
|
396
|
+
publicName: "selected",
|
|
397
|
+
isSignal: true,
|
|
398
|
+
isRequired: false,
|
|
399
|
+
transformFunction: null
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
outputs: { monthSelected: "monthSelected" },
|
|
403
|
+
host: { classAttribute: "ngs-year-view" },
|
|
404
|
+
exportAs: ["ngsYearView"],
|
|
405
|
+
ngImport: i0,
|
|
406
|
+
template: "<table class=\"ngs-calendar-table\">\n <tbody class=\"ngs-calendar-table-body\">\n @for (row of months(); track row) {\n <tr>\n @for (month of row; track month.index) {\n <td\n class=\"ngs-calendar-cell\"\n [class.ngs-calendar-cell-selected]=\"month.selected\"\n [class.ngs-calendar-cell-today]=\"month.current\"\n (click)=\"selectMonth(month.index)\"\n >\n <div class=\"ngs-calendar-cell-content\">\n {{ month.label }}\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
407
|
+
styles: [":host{display:block;height:100%}:host .ngs-calendar-table{width:100%;border-collapse:collapse;border-spacing:0}:host .ngs-calendar-cell{width:var(--ngs-calendar-cell-size);height:var(--ngs-calendar-cell-size);text-align:center;cursor:pointer;border-radius:var(--ngs-calendar-cell-radius);position:relative;box-sizing:border-box}:host .ngs-calendar-cell.ngs-calendar-cell-selected{background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell:not(.ngs-calendar-cell-empty):not(.ngs-calendar-cell-selected):hover{background:var(--ngs-calendar-cell-hover-bg)}:host .ngs-calendar-cell-today{z-index:1}:host .ngs-calendar-cell-today .ngs-calendar-cell-content{outline:var(--ngs-calendar-cell-today-border);border-radius:inherit}:host .ngs-calendar-cell-content{display:flex;align-items:center;justify-content:center;height:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
408
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
412
|
+
minVersion: "12.0.0",
|
|
413
|
+
version: "22.3.0",
|
|
414
|
+
ngImport: i0,
|
|
415
|
+
type: YearView,
|
|
416
|
+
decorators: [{
|
|
417
|
+
type: Component,
|
|
418
|
+
args: [{
|
|
419
|
+
selector: "ngs-year-view",
|
|
420
|
+
exportAs: "ngsYearView",
|
|
421
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
422
|
+
host: { "class": "ngs-year-view" },
|
|
423
|
+
template: "<table class=\"ngs-calendar-table\">\n <tbody class=\"ngs-calendar-table-body\">\n @for (row of months(); track row) {\n <tr>\n @for (month of row; track month.index) {\n <td\n class=\"ngs-calendar-cell\"\n [class.ngs-calendar-cell-selected]=\"month.selected\"\n [class.ngs-calendar-cell-today]=\"month.current\"\n (click)=\"selectMonth(month.index)\"\n >\n <div class=\"ngs-calendar-cell-content\">\n {{ month.label }}\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
424
|
+
styles: [":host{display:block;height:100%}:host .ngs-calendar-table{width:100%;border-collapse:collapse;border-spacing:0}:host .ngs-calendar-cell{width:var(--ngs-calendar-cell-size);height:var(--ngs-calendar-cell-size);text-align:center;cursor:pointer;border-radius:var(--ngs-calendar-cell-radius);position:relative;box-sizing:border-box}:host .ngs-calendar-cell.ngs-calendar-cell-selected{background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell:not(.ngs-calendar-cell-empty):not(.ngs-calendar-cell-selected):hover{background:var(--ngs-calendar-cell-hover-bg)}:host .ngs-calendar-cell-today{z-index:1}:host .ngs-calendar-cell-today .ngs-calendar-cell-content{outline:var(--ngs-calendar-cell-today-border);border-radius:inherit}:host .ngs-calendar-cell-content{display:flex;align-items:center;justify-content:center;height:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
425
|
+
}]
|
|
426
|
+
}],
|
|
427
|
+
propDecorators: {
|
|
428
|
+
activeDate: [{
|
|
429
|
+
type: i0.Input,
|
|
430
|
+
args: [{
|
|
431
|
+
isSignal: true,
|
|
432
|
+
alias: "activeDate",
|
|
433
|
+
required: true
|
|
434
|
+
}]
|
|
435
|
+
}],
|
|
436
|
+
selected: [{
|
|
437
|
+
type: i0.Input,
|
|
438
|
+
args: [{
|
|
439
|
+
isSignal: true,
|
|
440
|
+
alias: "selected",
|
|
441
|
+
required: false
|
|
442
|
+
}]
|
|
443
|
+
}],
|
|
444
|
+
monthSelected: [{
|
|
445
|
+
type: i0.Output,
|
|
446
|
+
args: ["monthSelected"]
|
|
447
|
+
}]
|
|
448
|
+
}
|
|
449
|
+
});
|
|
251
450
|
const YEARS_PER_ROW = 4;
|
|
252
451
|
const YEARS_PER_PAGE = 24;
|
|
253
|
-
class MultiYearView {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
i0.ɵɵ
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
452
|
+
var MultiYearView = class MultiYearView {
|
|
453
|
+
_dateAdapter = inject(DateAdapter);
|
|
454
|
+
activeDate = input.required(...ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []);
|
|
455
|
+
selected = input(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
456
|
+
yearSelected = output();
|
|
457
|
+
years = computed(() => {
|
|
458
|
+
const activeDate = this.activeDate();
|
|
459
|
+
const today = this._dateAdapter.today();
|
|
460
|
+
const currentYear = this._dateAdapter.getYear(activeDate);
|
|
461
|
+
const selectedYear = this.selected() ? this._dateAdapter.getYear(this.selected()) : null;
|
|
462
|
+
const todayYear = this._dateAdapter.getYear(today);
|
|
463
|
+
const startYear = Math.floor(currentYear / YEARS_PER_PAGE) * YEARS_PER_PAGE;
|
|
464
|
+
const years = [];
|
|
465
|
+
let currentRow = [];
|
|
466
|
+
for (let i = 0; i < YEARS_PER_PAGE; i++) {
|
|
467
|
+
const yearValue = startYear + i;
|
|
468
|
+
const date = this._dateAdapter.createDate(yearValue, 0, 1);
|
|
469
|
+
currentRow.push({
|
|
470
|
+
value: yearValue,
|
|
471
|
+
label: this._dateAdapter.getYearName(date),
|
|
472
|
+
selected: yearValue === selectedYear,
|
|
473
|
+
current: yearValue === todayYear
|
|
474
|
+
});
|
|
475
|
+
if (currentRow.length === YEARS_PER_ROW) {
|
|
476
|
+
years.push(currentRow);
|
|
477
|
+
currentRow = [];
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return years;
|
|
481
|
+
}, ...ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []);
|
|
482
|
+
selectYear(year) {
|
|
483
|
+
const date = this._dateAdapter.createDate(year, 0, 1);
|
|
484
|
+
this.yearSelected.emit(date);
|
|
485
|
+
}
|
|
486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
487
|
+
minVersion: "12.0.0",
|
|
488
|
+
version: "22.3.0",
|
|
489
|
+
ngImport: i0,
|
|
490
|
+
type: MultiYearView,
|
|
491
|
+
deps: [],
|
|
492
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
493
|
+
});
|
|
494
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
495
|
+
minVersion: "17.0.0",
|
|
496
|
+
version: "22.3.0",
|
|
497
|
+
type: MultiYearView,
|
|
498
|
+
isStandalone: true,
|
|
499
|
+
selector: "ngs-multi-year-view",
|
|
500
|
+
inputs: {
|
|
501
|
+
activeDate: {
|
|
502
|
+
classPropertyName: "activeDate",
|
|
503
|
+
publicName: "activeDate",
|
|
504
|
+
isSignal: true,
|
|
505
|
+
isRequired: true,
|
|
506
|
+
transformFunction: null
|
|
507
|
+
},
|
|
508
|
+
selected: {
|
|
509
|
+
classPropertyName: "selected",
|
|
510
|
+
publicName: "selected",
|
|
511
|
+
isSignal: true,
|
|
512
|
+
isRequired: false,
|
|
513
|
+
transformFunction: null
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
outputs: { yearSelected: "yearSelected" },
|
|
517
|
+
host: { classAttribute: "ngs-multi-year-view" },
|
|
518
|
+
exportAs: ["ngsMultiYearView"],
|
|
519
|
+
ngImport: i0,
|
|
520
|
+
template: "<table class=\"ngs-calendar-table\">\n <tbody class=\"ngs-calendar-table-body\">\n @for (row of years(); track row) {\n <tr>\n @for (year of row; track year.label) {\n <td\n class=\"ngs-calendar-cell\"\n [class.ngs-calendar-cell-selected]=\"year.selected\"\n [class.ngs-calendar-cell-today]=\"year.current\"\n (click)=\"selectYear(year.value)\"\n >\n <div class=\"ngs-calendar-cell-content\">\n {{ year.label }}\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
521
|
+
styles: [":host{display:block;height:100%}:host .ngs-calendar-table{width:100%;border-collapse:collapse;border-spacing:0}:host .ngs-calendar-cell{width:var(--ngs-calendar-cell-size);height:var(--ngs-calendar-cell-size);text-align:center;cursor:pointer;border-radius:var(--ngs-calendar-cell-radius);position:relative;box-sizing:border-box}:host .ngs-calendar-cell.ngs-calendar-cell-selected{background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell:not(.ngs-calendar-cell-empty):not(.ngs-calendar-cell-selected):hover{background:var(--ngs-calendar-cell-hover-bg)}:host .ngs-calendar-cell-today{z-index:1}:host .ngs-calendar-cell-today .ngs-calendar-cell-content{outline:var(--ngs-calendar-cell-today-border);border-radius:inherit}:host .ngs-calendar-cell-content{display:flex;align-items:center;justify-content:center;height:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
522
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
523
|
+
});
|
|
524
|
+
};
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
526
|
+
minVersion: "12.0.0",
|
|
527
|
+
version: "22.3.0",
|
|
528
|
+
ngImport: i0,
|
|
529
|
+
type: MultiYearView,
|
|
530
|
+
decorators: [{
|
|
531
|
+
type: Component,
|
|
532
|
+
args: [{
|
|
533
|
+
selector: "ngs-multi-year-view",
|
|
534
|
+
exportAs: "ngsMultiYearView",
|
|
535
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
536
|
+
host: { "class": "ngs-multi-year-view" },
|
|
537
|
+
template: "<table class=\"ngs-calendar-table\">\n <tbody class=\"ngs-calendar-table-body\">\n @for (row of years(); track row) {\n <tr>\n @for (year of row; track year.label) {\n <td\n class=\"ngs-calendar-cell\"\n [class.ngs-calendar-cell-selected]=\"year.selected\"\n [class.ngs-calendar-cell-today]=\"year.current\"\n (click)=\"selectYear(year.value)\"\n >\n <div class=\"ngs-calendar-cell-content\">\n {{ year.label }}\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
538
|
+
styles: [":host{display:block;height:100%}:host .ngs-calendar-table{width:100%;border-collapse:collapse;border-spacing:0}:host .ngs-calendar-cell{width:var(--ngs-calendar-cell-size);height:var(--ngs-calendar-cell-size);text-align:center;cursor:pointer;border-radius:var(--ngs-calendar-cell-radius);position:relative;box-sizing:border-box}:host .ngs-calendar-cell.ngs-calendar-cell-selected{background:var(--ngs-calendar-cell-selected-bg);color:var(--ngs-calendar-cell-selected-color);z-index:1}:host .ngs-calendar-cell:not(.ngs-calendar-cell-empty):not(.ngs-calendar-cell-selected):hover{background:var(--ngs-calendar-cell-hover-bg)}:host .ngs-calendar-cell-today{z-index:1}:host .ngs-calendar-cell-today .ngs-calendar-cell-content{outline:var(--ngs-calendar-cell-today-border);border-radius:inherit}:host .ngs-calendar-cell-content{display:flex;align-items:center;justify-content:center;height:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
539
|
+
}]
|
|
540
|
+
}],
|
|
541
|
+
propDecorators: {
|
|
542
|
+
activeDate: [{
|
|
543
|
+
type: i0.Input,
|
|
544
|
+
args: [{
|
|
545
|
+
isSignal: true,
|
|
546
|
+
alias: "activeDate",
|
|
547
|
+
required: true
|
|
548
|
+
}]
|
|
549
|
+
}],
|
|
550
|
+
selected: [{
|
|
551
|
+
type: i0.Input,
|
|
552
|
+
args: [{
|
|
553
|
+
isSignal: true,
|
|
554
|
+
alias: "selected",
|
|
555
|
+
required: false
|
|
556
|
+
}]
|
|
557
|
+
}],
|
|
558
|
+
yearSelected: [{
|
|
559
|
+
type: i0.Output,
|
|
560
|
+
args: ["yearSelected"]
|
|
561
|
+
}]
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
var Calendar = class Calendar {
|
|
565
|
+
_dateAdapter = inject(DateAdapter);
|
|
566
|
+
_intl = inject(DatepickerIntl);
|
|
567
|
+
startAt = input(null, ...ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []);
|
|
568
|
+
selected = input(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
569
|
+
minDate = input(null, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
|
|
570
|
+
maxDate = input(null, ...ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []);
|
|
571
|
+
headerComponent = input(null, ...ngDevMode ? [{ debugName: "headerComponent" }] : /* istanbul ignore next */ []);
|
|
572
|
+
visibleCalendars = input(1, {
|
|
573
|
+
...ngDevMode ? { debugName: "visibleCalendars" } : /* istanbul ignore next */ {},
|
|
574
|
+
transform: (value) => numberAttribute(value, 1) === 2 ? 2 : 1
|
|
575
|
+
});
|
|
576
|
+
selectedChange = output();
|
|
577
|
+
yearSelected = output();
|
|
578
|
+
monthSelected = output();
|
|
579
|
+
activeDate = signal(this.startAt() || this._dateAdapter.today(), ...ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []);
|
|
580
|
+
_rangePreviewDate = signal(null, ...ngDevMode ? [{ debugName: "_rangePreviewDate" }] : /* istanbul ignore next */ []);
|
|
581
|
+
constructor() {
|
|
582
|
+
effect(() => {
|
|
583
|
+
const selected = this.selected();
|
|
584
|
+
if (selected instanceof DateRange) {
|
|
585
|
+
if (selected.start) this.activeDate.set(selected.start);
|
|
586
|
+
} else if (selected) this.activeDate.set(selected);
|
|
587
|
+
});
|
|
588
|
+
effect(() => {
|
|
589
|
+
const startAt = this.startAt();
|
|
590
|
+
if (startAt) this.activeDate.set(startAt);
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
currentView = signal("month", ...ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []);
|
|
594
|
+
_selectedDate = computed(() => {
|
|
595
|
+
const selected = this.selected();
|
|
596
|
+
if (selected instanceof DateRange) return selected.start;
|
|
597
|
+
return selected;
|
|
598
|
+
}, ...ngDevMode ? [{ debugName: "_selectedDate" }] : /* istanbul ignore next */ []);
|
|
599
|
+
periodButtonText = computed(() => {
|
|
600
|
+
const activeDate = this.activeDate();
|
|
601
|
+
const visibleCalendars = this.visibleCalendars();
|
|
602
|
+
if (!activeDate || !this._dateAdapter.isValid(activeDate)) return "";
|
|
603
|
+
if (this.currentView() === "month") {
|
|
604
|
+
if (visibleCalendars === 2) {
|
|
605
|
+
const endDate = this._dateAdapter.addCalendarMonths(activeDate, 1);
|
|
606
|
+
return `${this._dateAdapter.format(activeDate, {
|
|
607
|
+
month: "long",
|
|
608
|
+
year: "numeric"
|
|
609
|
+
})} - ${this._dateAdapter.format(endDate, {
|
|
610
|
+
month: "long",
|
|
611
|
+
year: "numeric"
|
|
612
|
+
})}`;
|
|
613
|
+
}
|
|
614
|
+
return this._dateAdapter.format(activeDate, {
|
|
615
|
+
month: "long",
|
|
616
|
+
year: "numeric"
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
if (this.currentView() === "year") return this._dateAdapter.getYearName(activeDate);
|
|
620
|
+
if (this.currentView() === "multi-year") {
|
|
621
|
+
const currentYear = this._dateAdapter.getYear(activeDate);
|
|
622
|
+
const startYear = Math.floor(currentYear / 24) * 24;
|
|
623
|
+
const endYear = startYear + 23;
|
|
624
|
+
const startDate = this._dateAdapter.createDate(startYear, 0, 1);
|
|
625
|
+
const endDate = this._dateAdapter.createDate(endYear, 0, 1);
|
|
626
|
+
return `${this._dateAdapter.getYearName(startDate)} - ${this._dateAdapter.getYearName(endDate)}`;
|
|
627
|
+
}
|
|
628
|
+
return "";
|
|
629
|
+
}, ...ngDevMode ? [{ debugName: "periodButtonText" }] : /* istanbul ignore next */ []);
|
|
630
|
+
_monthViewActiveDates = computed(() => {
|
|
631
|
+
const activeDate = this.activeDate();
|
|
632
|
+
const count = this.visibleCalendars();
|
|
633
|
+
return Array.from({ length: count }, (_, index) => this._dateAdapter.addCalendarMonths(activeDate, index));
|
|
634
|
+
}, ...ngDevMode ? [{ debugName: "_monthViewActiveDates" }] : /* istanbul ignore next */ []);
|
|
635
|
+
prevPage() {
|
|
636
|
+
this.activeDate.update((date) => {
|
|
637
|
+
if (this.currentView() === "month") return this._dateAdapter.addCalendarMonths(date, -1);
|
|
638
|
+
if (this.currentView() === "year") return this._dateAdapter.addCalendarYears(date, -1);
|
|
639
|
+
if (this.currentView() === "multi-year") return this._dateAdapter.addCalendarYears(date, -24);
|
|
640
|
+
return date;
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
nextPage() {
|
|
644
|
+
this.activeDate.update((date) => {
|
|
645
|
+
if (this.currentView() === "month") return this._dateAdapter.addCalendarMonths(date, 1);
|
|
646
|
+
if (this.currentView() === "year") return this._dateAdapter.addCalendarYears(date, 1);
|
|
647
|
+
if (this.currentView() === "multi-year") return this._dateAdapter.addCalendarYears(date, 24);
|
|
648
|
+
return date;
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
toggleView() {
|
|
652
|
+
this.currentView.update((view) => {
|
|
653
|
+
if (view === "month") return "multi-year";
|
|
654
|
+
if (view === "year") return "multi-year";
|
|
655
|
+
return "month";
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
_monthSelectedInYearView(date) {
|
|
659
|
+
this.activeDate.set(date);
|
|
660
|
+
this.currentView.set("month");
|
|
661
|
+
this.monthSelected.emit(date);
|
|
662
|
+
}
|
|
663
|
+
_yearSelectedInMultiYearView(date) {
|
|
664
|
+
this.activeDate.set(date);
|
|
665
|
+
this.currentView.set("year");
|
|
666
|
+
this.yearSelected.emit(date);
|
|
667
|
+
}
|
|
668
|
+
_trackMonth(index, date) {
|
|
669
|
+
return `${this._dateAdapter.getYear(date)}-${this._dateAdapter.getMonth(date)}-${index}`;
|
|
670
|
+
}
|
|
671
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
672
|
+
minVersion: "12.0.0",
|
|
673
|
+
version: "22.3.0",
|
|
674
|
+
ngImport: i0,
|
|
675
|
+
type: Calendar,
|
|
676
|
+
deps: [],
|
|
677
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
678
|
+
});
|
|
679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
680
|
+
minVersion: "17.0.0",
|
|
681
|
+
version: "22.3.0",
|
|
682
|
+
type: Calendar,
|
|
683
|
+
isStandalone: true,
|
|
684
|
+
selector: "ngs-calendar",
|
|
685
|
+
inputs: {
|
|
686
|
+
startAt: {
|
|
687
|
+
classPropertyName: "startAt",
|
|
688
|
+
publicName: "startAt",
|
|
689
|
+
isSignal: true,
|
|
690
|
+
isRequired: false,
|
|
691
|
+
transformFunction: null
|
|
692
|
+
},
|
|
693
|
+
selected: {
|
|
694
|
+
classPropertyName: "selected",
|
|
695
|
+
publicName: "selected",
|
|
696
|
+
isSignal: true,
|
|
697
|
+
isRequired: false,
|
|
698
|
+
transformFunction: null
|
|
699
|
+
},
|
|
700
|
+
minDate: {
|
|
701
|
+
classPropertyName: "minDate",
|
|
702
|
+
publicName: "minDate",
|
|
703
|
+
isSignal: true,
|
|
704
|
+
isRequired: false,
|
|
705
|
+
transformFunction: null
|
|
706
|
+
},
|
|
707
|
+
maxDate: {
|
|
708
|
+
classPropertyName: "maxDate",
|
|
709
|
+
publicName: "maxDate",
|
|
710
|
+
isSignal: true,
|
|
711
|
+
isRequired: false,
|
|
712
|
+
transformFunction: null
|
|
713
|
+
},
|
|
714
|
+
headerComponent: {
|
|
715
|
+
classPropertyName: "headerComponent",
|
|
716
|
+
publicName: "headerComponent",
|
|
717
|
+
isSignal: true,
|
|
718
|
+
isRequired: false,
|
|
719
|
+
transformFunction: null
|
|
720
|
+
},
|
|
721
|
+
visibleCalendars: {
|
|
722
|
+
classPropertyName: "visibleCalendars",
|
|
723
|
+
publicName: "visibleCalendars",
|
|
724
|
+
isSignal: true,
|
|
725
|
+
isRequired: false,
|
|
726
|
+
transformFunction: null
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
outputs: {
|
|
730
|
+
selectedChange: "selectedChange",
|
|
731
|
+
yearSelected: "yearSelected",
|
|
732
|
+
monthSelected: "monthSelected"
|
|
733
|
+
},
|
|
734
|
+
host: {
|
|
735
|
+
properties: { "class.ngs-calendar-multiple-months": "currentView() === \"month\" && visibleCalendars() === 2" },
|
|
736
|
+
classAttribute: "ngs-calendar"
|
|
737
|
+
},
|
|
738
|
+
exportAs: ["ngsCalendar"],
|
|
739
|
+
ngImport: i0,
|
|
740
|
+
template: "@if (headerComponent()) {\n <ng-container *ngComponentOutlet=\"headerComponent()\" />\n} @else {\n <div class=\"ngs-calendar-header\">\n <button type=\"button\" (click)=\"toggleView()\" class=\"ngs-calendar-period-button\">\n {{ periodButtonText() }}\n </button>\n <div class=\"ngs-calendar-header-actions\">\n <button type=\"button\" ngsIconButton (click)=\"prevPage()\" class=\"ngs-calendar-previous-button\">\n <ngs-icon name=\"fluent:chevron-left-24-regular\" />\n </button>\n <button type=\"button\" ngsIconButton (click)=\"nextPage()\" class=\"ngs-calendar-next-button\">\n <ngs-icon name=\"fluent:chevron-right-24-regular\" />\n </button>\n </div>\n </div>\n}\n\n<div class=\"ngs-calendar-content\" [class.ngs-calendar-content-multiple]=\"currentView() === 'month' && visibleCalendars() === 2\">\n @if (currentView() === 'month') {\n @for (monthActiveDate of _monthViewActiveDates(); track _trackMonth($index, monthActiveDate)) {\n <ngs-month-view [activeDate]=\"monthActiveDate\"\n [selected]=\"selected()\"\n [rangePreviewDate]=\"_rangePreviewDate()\"\n [sharedRangePreview]=\"true\"\n (rangePreviewDateChange)=\"_rangePreviewDate.set($event)\"\n (selectedChange)=\"selectedChange.emit($event)\"\n />\n }\n } @else if (currentView() === 'year') {\n <ngs-year-view [activeDate]=\"activeDate()\"\n [selected]=\"_selectedDate()\"\n (monthSelected)=\"_monthSelectedInYearView($event)\"\n />\n } @else if (currentView() === 'multi-year') {\n <ngs-multi-year-view [activeDate]=\"activeDate()\"\n [selected]=\"_selectedDate()\"\n (yearSelected)=\"_yearSelectedInMultiYearView($event)\"\n />\n }\n</div>\n",
|
|
741
|
+
styles: [":host{display:flex;flex-direction:column;width:calc(var(--ngs-calendar-cell-size) * 7 + var(--ngs-calendar-padding) * 2 + calc(var(--spacing, .25rem) * 2));min-height:calc(var(--ngs-calendar-cell-size) * 5 + calc(var(--spacing, .25rem) * 2));padding:calc(var(--spacing, .25rem) * 2)}:host.ngs-calendar-multiple-months{width:auto}:host .ngs-calendar-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:var(--ngs-calendar-header-padding);flex-shrink:0;margin-inline-start:calc(var(--spacing, .25rem) * 2)}:host .ngs-calendar-period-button{background:transparent;border:none;cursor:pointer;font-weight:700}:host .ngs-calendar-period-button:hover{color:var(--ngs-color-primary)}:host .ngs-calendar-content-multiple{display:flex;gap:calc(var(--spacing, .25rem) * 2)}:host .ngs-calendar-content-multiple ngs-month-view{flex:0 0 calc(var(--ngs-calendar-cell-size) * 7)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
742
|
+
dependencies: [
|
|
743
|
+
{
|
|
744
|
+
kind: "component",
|
|
745
|
+
type: MonthView,
|
|
746
|
+
selector: "ngs-month-view",
|
|
747
|
+
inputs: [
|
|
748
|
+
"activeDate",
|
|
749
|
+
"selected",
|
|
750
|
+
"minDate",
|
|
751
|
+
"maxDate",
|
|
752
|
+
"rangePreviewDate",
|
|
753
|
+
"sharedRangePreview"
|
|
754
|
+
],
|
|
755
|
+
outputs: ["selectedChange", "rangePreviewDateChange"],
|
|
756
|
+
exportAs: ["ngsMonthView"]
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
kind: "component",
|
|
760
|
+
type: YearView,
|
|
761
|
+
selector: "ngs-year-view",
|
|
762
|
+
inputs: ["activeDate", "selected"],
|
|
763
|
+
outputs: ["monthSelected"],
|
|
764
|
+
exportAs: ["ngsYearView"]
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
kind: "component",
|
|
768
|
+
type: MultiYearView,
|
|
769
|
+
selector: "ngs-multi-year-view",
|
|
770
|
+
inputs: ["activeDate", "selected"],
|
|
771
|
+
outputs: ["yearSelected"],
|
|
772
|
+
exportAs: ["ngsMultiYearView"]
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
kind: "component",
|
|
776
|
+
type: Button,
|
|
777
|
+
selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ",
|
|
778
|
+
inputs: [
|
|
779
|
+
"ngsButton",
|
|
780
|
+
"ngsIconButton",
|
|
781
|
+
"loading",
|
|
782
|
+
"disabled",
|
|
783
|
+
"disabledInteractive",
|
|
784
|
+
"disableRipple",
|
|
785
|
+
"reverse",
|
|
786
|
+
"fullWidth",
|
|
787
|
+
"hideTextOnMobile"
|
|
788
|
+
],
|
|
789
|
+
exportAs: ["ngsButton"]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
kind: "component",
|
|
793
|
+
type: Icon,
|
|
794
|
+
selector: "ngs-icon",
|
|
795
|
+
inputs: ["name"],
|
|
796
|
+
exportAs: ["ngsIcon"]
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
kind: "directive",
|
|
800
|
+
type: NgComponentOutlet,
|
|
801
|
+
selector: "[ngComponentOutlet]",
|
|
802
|
+
inputs: [
|
|
803
|
+
"ngComponentOutlet",
|
|
804
|
+
"ngComponentOutletInputs",
|
|
805
|
+
"ngComponentOutletInjector",
|
|
806
|
+
"ngComponentOutletEnvironmentInjector",
|
|
807
|
+
"ngComponentOutletContent",
|
|
808
|
+
"ngComponentOutletNgModule"
|
|
809
|
+
],
|
|
810
|
+
exportAs: ["ngComponentOutlet"]
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
814
|
+
});
|
|
815
|
+
};
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
817
|
+
minVersion: "12.0.0",
|
|
818
|
+
version: "22.3.0",
|
|
819
|
+
ngImport: i0,
|
|
820
|
+
type: Calendar,
|
|
821
|
+
decorators: [{
|
|
822
|
+
type: Component,
|
|
823
|
+
args: [{
|
|
824
|
+
selector: "ngs-calendar",
|
|
825
|
+
exportAs: "ngsCalendar",
|
|
826
|
+
imports: [
|
|
827
|
+
MonthView,
|
|
828
|
+
YearView,
|
|
829
|
+
MultiYearView,
|
|
830
|
+
Button,
|
|
831
|
+
Icon,
|
|
832
|
+
NgComponentOutlet
|
|
833
|
+
],
|
|
834
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
835
|
+
host: {
|
|
836
|
+
"class": "ngs-calendar",
|
|
837
|
+
"[class.ngs-calendar-multiple-months]": "currentView() === \"month\" && visibleCalendars() === 2"
|
|
838
|
+
},
|
|
839
|
+
template: "@if (headerComponent()) {\n <ng-container *ngComponentOutlet=\"headerComponent()\" />\n} @else {\n <div class=\"ngs-calendar-header\">\n <button type=\"button\" (click)=\"toggleView()\" class=\"ngs-calendar-period-button\">\n {{ periodButtonText() }}\n </button>\n <div class=\"ngs-calendar-header-actions\">\n <button type=\"button\" ngsIconButton (click)=\"prevPage()\" class=\"ngs-calendar-previous-button\">\n <ngs-icon name=\"fluent:chevron-left-24-regular\" />\n </button>\n <button type=\"button\" ngsIconButton (click)=\"nextPage()\" class=\"ngs-calendar-next-button\">\n <ngs-icon name=\"fluent:chevron-right-24-regular\" />\n </button>\n </div>\n </div>\n}\n\n<div class=\"ngs-calendar-content\" [class.ngs-calendar-content-multiple]=\"currentView() === 'month' && visibleCalendars() === 2\">\n @if (currentView() === 'month') {\n @for (monthActiveDate of _monthViewActiveDates(); track _trackMonth($index, monthActiveDate)) {\n <ngs-month-view [activeDate]=\"monthActiveDate\"\n [selected]=\"selected()\"\n [rangePreviewDate]=\"_rangePreviewDate()\"\n [sharedRangePreview]=\"true\"\n (rangePreviewDateChange)=\"_rangePreviewDate.set($event)\"\n (selectedChange)=\"selectedChange.emit($event)\"\n />\n }\n } @else if (currentView() === 'year') {\n <ngs-year-view [activeDate]=\"activeDate()\"\n [selected]=\"_selectedDate()\"\n (monthSelected)=\"_monthSelectedInYearView($event)\"\n />\n } @else if (currentView() === 'multi-year') {\n <ngs-multi-year-view [activeDate]=\"activeDate()\"\n [selected]=\"_selectedDate()\"\n (yearSelected)=\"_yearSelectedInMultiYearView($event)\"\n />\n }\n</div>\n",
|
|
840
|
+
styles: [":host{display:flex;flex-direction:column;width:calc(var(--ngs-calendar-cell-size) * 7 + var(--ngs-calendar-padding) * 2 + calc(var(--spacing, .25rem) * 2));min-height:calc(var(--ngs-calendar-cell-size) * 5 + calc(var(--spacing, .25rem) * 2));padding:calc(var(--spacing, .25rem) * 2)}:host.ngs-calendar-multiple-months{width:auto}:host .ngs-calendar-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:var(--ngs-calendar-header-padding);flex-shrink:0;margin-inline-start:calc(var(--spacing, .25rem) * 2)}:host .ngs-calendar-period-button{background:transparent;border:none;cursor:pointer;font-weight:700}:host .ngs-calendar-period-button:hover{color:var(--ngs-color-primary)}:host .ngs-calendar-content-multiple{display:flex;gap:calc(var(--spacing, .25rem) * 2)}:host .ngs-calendar-content-multiple ngs-month-view{flex:0 0 calc(var(--ngs-calendar-cell-size) * 7)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
841
|
+
}]
|
|
842
|
+
}],
|
|
843
|
+
ctorParameters: () => [],
|
|
844
|
+
propDecorators: {
|
|
845
|
+
startAt: [{
|
|
846
|
+
type: i0.Input,
|
|
847
|
+
args: [{
|
|
848
|
+
isSignal: true,
|
|
849
|
+
alias: "startAt",
|
|
850
|
+
required: false
|
|
851
|
+
}]
|
|
852
|
+
}],
|
|
853
|
+
selected: [{
|
|
854
|
+
type: i0.Input,
|
|
855
|
+
args: [{
|
|
856
|
+
isSignal: true,
|
|
857
|
+
alias: "selected",
|
|
858
|
+
required: false
|
|
859
|
+
}]
|
|
860
|
+
}],
|
|
861
|
+
minDate: [{
|
|
862
|
+
type: i0.Input,
|
|
863
|
+
args: [{
|
|
864
|
+
isSignal: true,
|
|
865
|
+
alias: "minDate",
|
|
866
|
+
required: false
|
|
867
|
+
}]
|
|
868
|
+
}],
|
|
869
|
+
maxDate: [{
|
|
870
|
+
type: i0.Input,
|
|
871
|
+
args: [{
|
|
872
|
+
isSignal: true,
|
|
873
|
+
alias: "maxDate",
|
|
874
|
+
required: false
|
|
875
|
+
}]
|
|
876
|
+
}],
|
|
877
|
+
headerComponent: [{
|
|
878
|
+
type: i0.Input,
|
|
879
|
+
args: [{
|
|
880
|
+
isSignal: true,
|
|
881
|
+
alias: "headerComponent",
|
|
882
|
+
required: false
|
|
883
|
+
}]
|
|
884
|
+
}],
|
|
885
|
+
visibleCalendars: [{
|
|
886
|
+
type: i0.Input,
|
|
887
|
+
args: [{
|
|
888
|
+
isSignal: true,
|
|
889
|
+
alias: "visibleCalendars",
|
|
890
|
+
required: false
|
|
891
|
+
}]
|
|
892
|
+
}],
|
|
893
|
+
selectedChange: [{
|
|
894
|
+
type: i0.Output,
|
|
895
|
+
args: ["selectedChange"]
|
|
896
|
+
}],
|
|
897
|
+
yearSelected: [{
|
|
898
|
+
type: i0.Output,
|
|
899
|
+
args: ["yearSelected"]
|
|
900
|
+
}],
|
|
901
|
+
monthSelected: [{
|
|
902
|
+
type: i0.Output,
|
|
903
|
+
args: ["monthSelected"]
|
|
904
|
+
}]
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
var DatepickerActions = class DatepickerActions {
|
|
908
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
909
|
+
minVersion: "12.0.0",
|
|
910
|
+
version: "22.3.0",
|
|
911
|
+
ngImport: i0,
|
|
912
|
+
type: DatepickerActions,
|
|
913
|
+
deps: [],
|
|
914
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
915
|
+
});
|
|
916
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
917
|
+
minVersion: "14.0.0",
|
|
918
|
+
version: "22.3.0",
|
|
919
|
+
type: DatepickerActions,
|
|
920
|
+
isStandalone: true,
|
|
921
|
+
selector: "ngs-datepicker-actions",
|
|
922
|
+
exportAs: ["ngsDatepickerActions"],
|
|
923
|
+
ngImport: i0,
|
|
924
|
+
template: `
|
|
458
925
|
<div class="ngs-datepicker-actions">
|
|
459
926
|
<ng-content />
|
|
460
927
|
</div>
|
|
461
|
-
`,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
928
|
+
`,
|
|
929
|
+
isInline: true,
|
|
930
|
+
styles: [".ngs-datepicker-actions{display:flex;justify-content:flex-end;gap:8px;padding:8px;border-top:1px solid var(--ngs-datepicker-divider-color, rgba(0, 0, 0, .12))}\n"],
|
|
931
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
932
|
+
});
|
|
933
|
+
};
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
935
|
+
minVersion: "12.0.0",
|
|
936
|
+
version: "22.3.0",
|
|
937
|
+
ngImport: i0,
|
|
938
|
+
type: DatepickerActions,
|
|
939
|
+
decorators: [{
|
|
940
|
+
type: Component,
|
|
941
|
+
args: [{
|
|
942
|
+
selector: "ngs-datepicker-actions",
|
|
943
|
+
exportAs: "ngsDatepickerActions",
|
|
944
|
+
template: `
|
|
466
945
|
<div class="ngs-datepicker-actions">
|
|
467
946
|
<ng-content />
|
|
468
947
|
</div>
|
|
469
|
-
`,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
948
|
+
`,
|
|
949
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
950
|
+
styles: [".ngs-datepicker-actions{display:flex;justify-content:flex-end;gap:8px;padding:8px;border-top:1px solid var(--ngs-datepicker-divider-color, rgba(0, 0, 0, .12))}\n"]
|
|
951
|
+
}]
|
|
952
|
+
}]
|
|
953
|
+
});
|
|
954
|
+
const DATEPICKER_ACTION_TARGET = new InjectionToken("NgStarter datepicker action target");
|
|
955
|
+
var Datepicker = class Datepicker {
|
|
956
|
+
_overlay = inject(Overlay);
|
|
957
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
958
|
+
_portalTemplate = viewChild.required("portal", ...ngDevMode ? [{ debugName: "_portalTemplate" }] : /* istanbul ignore next */ []);
|
|
959
|
+
actions = contentChild(DatepickerActions, ...ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []);
|
|
960
|
+
startAt = input(null, ...ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []);
|
|
961
|
+
calendarHeaderComponent = input(null, ...ngDevMode ? [{ debugName: "calendarHeaderComponent" }] : /* istanbul ignore next */ []);
|
|
962
|
+
quickPresets = input([], ...ngDevMode ? [{ debugName: "quickPresets" }] : /* istanbul ignore next */ []);
|
|
963
|
+
showQuickPresets = input(false, ...ngDevMode ? [{ debugName: "showQuickPresets" }] : /* istanbul ignore next */ []);
|
|
964
|
+
_datepickerInput;
|
|
965
|
+
_selected = signal(null, ...ngDevMode ? [{ debugName: "_selected" }] : /* istanbul ignore next */ []);
|
|
966
|
+
_isAbove = signal(false, ...ngDevMode ? [{ debugName: "_isAbove" }] : /* istanbul ignore next */ []);
|
|
967
|
+
_overlayRef = null;
|
|
968
|
+
ngOnDestroy() {
|
|
969
|
+
this.close();
|
|
970
|
+
}
|
|
971
|
+
_registerInput(input) {
|
|
972
|
+
this._datepickerInput = input;
|
|
973
|
+
}
|
|
974
|
+
_unregisterInput(input) {
|
|
975
|
+
if (this._datepickerInput !== input) return;
|
|
976
|
+
this._datepickerInput = void 0;
|
|
977
|
+
this.close();
|
|
978
|
+
}
|
|
979
|
+
open() {
|
|
980
|
+
if (this._overlayRef || !this._datepickerInput || !this._datepickerInput.canSelectDate()) return;
|
|
981
|
+
this._selected.set(this._datepickerInput.value());
|
|
982
|
+
const strategy = this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withPositions([{
|
|
983
|
+
originX: "start",
|
|
984
|
+
originY: "bottom",
|
|
985
|
+
overlayX: "start",
|
|
986
|
+
overlayY: "top"
|
|
987
|
+
}, {
|
|
988
|
+
originX: "start",
|
|
989
|
+
originY: "top",
|
|
990
|
+
overlayX: "start",
|
|
991
|
+
overlayY: "bottom"
|
|
992
|
+
}]);
|
|
993
|
+
strategy.positionChanges.subscribe((change) => {
|
|
994
|
+
this._isAbove.set(change.connectionPair.overlayY === "bottom");
|
|
995
|
+
});
|
|
996
|
+
this._overlayRef = this._overlay.create({
|
|
997
|
+
positionStrategy: strategy,
|
|
998
|
+
hasBackdrop: true,
|
|
999
|
+
backdropClass: "cdk-overlay-transparent-backdrop"
|
|
1000
|
+
});
|
|
1001
|
+
this._overlayRef.backdropClick().subscribe(() => this.close());
|
|
1002
|
+
const portal = new TemplatePortal(this._portalTemplate(), this._viewContainerRef);
|
|
1003
|
+
this._overlayRef.attach(portal);
|
|
1004
|
+
}
|
|
1005
|
+
close() {
|
|
1006
|
+
if (this._overlayRef) {
|
|
1007
|
+
this._overlayRef.detach();
|
|
1008
|
+
this._overlayRef.dispose();
|
|
1009
|
+
this._overlayRef = null;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
_select(date) {
|
|
1013
|
+
this._selected.set(date);
|
|
1014
|
+
if (!this.actions()) this.apply();
|
|
1015
|
+
}
|
|
1016
|
+
_selectPreset(preset) {
|
|
1017
|
+
const value = preset.value;
|
|
1018
|
+
if (value instanceof DateRange) this._selected.set(value.start);
|
|
1019
|
+
else this._selected.set(value);
|
|
1020
|
+
if (!this.actions()) this.apply();
|
|
1021
|
+
}
|
|
1022
|
+
apply() {
|
|
1023
|
+
const date = this._selected();
|
|
1024
|
+
if (this._datepickerInput && date) this._datepickerInput.selectDate(date);
|
|
1025
|
+
this.close();
|
|
1026
|
+
}
|
|
1027
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1028
|
+
minVersion: "12.0.0",
|
|
1029
|
+
version: "22.3.0",
|
|
1030
|
+
ngImport: i0,
|
|
1031
|
+
type: Datepicker,
|
|
1032
|
+
deps: [],
|
|
1033
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1034
|
+
});
|
|
1035
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1036
|
+
minVersion: "17.0.0",
|
|
1037
|
+
version: "22.3.0",
|
|
1038
|
+
type: Datepicker,
|
|
1039
|
+
isStandalone: true,
|
|
1040
|
+
selector: "ngs-datepicker",
|
|
1041
|
+
inputs: {
|
|
1042
|
+
startAt: {
|
|
1043
|
+
classPropertyName: "startAt",
|
|
1044
|
+
publicName: "startAt",
|
|
1045
|
+
isSignal: true,
|
|
1046
|
+
isRequired: false,
|
|
1047
|
+
transformFunction: null
|
|
1048
|
+
},
|
|
1049
|
+
calendarHeaderComponent: {
|
|
1050
|
+
classPropertyName: "calendarHeaderComponent",
|
|
1051
|
+
publicName: "calendarHeaderComponent",
|
|
1052
|
+
isSignal: true,
|
|
1053
|
+
isRequired: false,
|
|
1054
|
+
transformFunction: null
|
|
1055
|
+
},
|
|
1056
|
+
quickPresets: {
|
|
1057
|
+
classPropertyName: "quickPresets",
|
|
1058
|
+
publicName: "quickPresets",
|
|
1059
|
+
isSignal: true,
|
|
1060
|
+
isRequired: false,
|
|
1061
|
+
transformFunction: null
|
|
1062
|
+
},
|
|
1063
|
+
showQuickPresets: {
|
|
1064
|
+
classPropertyName: "showQuickPresets",
|
|
1065
|
+
publicName: "showQuickPresets",
|
|
1066
|
+
isSignal: true,
|
|
1067
|
+
isRequired: false,
|
|
1068
|
+
transformFunction: null
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
host: { classAttribute: "ngs-datepicker" },
|
|
1072
|
+
providers: [{
|
|
1073
|
+
provide: DATEPICKER_ACTION_TARGET,
|
|
1074
|
+
useExisting: forwardRef(() => Datepicker)
|
|
1075
|
+
}],
|
|
1076
|
+
queries: [{
|
|
1077
|
+
propertyName: "actions",
|
|
1078
|
+
first: true,
|
|
1079
|
+
predicate: DatepickerActions,
|
|
1080
|
+
descendants: true,
|
|
1081
|
+
isSignal: true
|
|
1082
|
+
}],
|
|
1083
|
+
viewQueries: [{
|
|
1084
|
+
propertyName: "_portalTemplate",
|
|
1085
|
+
first: true,
|
|
1086
|
+
predicate: ["portal"],
|
|
1087
|
+
descendants: true,
|
|
1088
|
+
isSignal: true
|
|
1089
|
+
}],
|
|
1090
|
+
exportAs: ["ngsDatepicker"],
|
|
1091
|
+
ngImport: i0,
|
|
1092
|
+
template: "<ng-template #portal>\n <div class=\"ngs-datepicker-content\" [class.ngs-datepicker-above]=\"_isAbove()\" [class.ngs-datepicker-below]=\"!_isAbove()\">\n <div class=\"ngs-datepicker-inner-container\">\n @if (showQuickPresets() && quickPresets().length > 0) {\n <div class=\"ngs-datepicker-presets\">\n @for (preset of quickPresets(); track preset.label) {\n <button type=\"button\" class=\"ngs-datepicker-preset\" (click)=\"_selectPreset(preset)\">\n {{ preset.label }}\n </button>\n }\n </div>\n }\n\n <ngs-calendar\n [startAt]=\"startAt()\"\n [selected]=\"_selected()\"\n [headerComponent]=\"calendarHeaderComponent()\"\n (selectedChange)=\"_select($event)\"\n />\n </div>\n\n @if (actions()) {\n <ng-content select=\"ngs-datepicker-actions\"/>\n }\n </div>\n</ng-template>\n",
|
|
1093
|
+
styles: [".ngs-datepicker-content{--ngs-datepicker-bg: var(--ngs-dropdown-bg);--ngs-datepicker-color: var(--ngs-color-on-surface);--ngs-datepicker-shadow: var(--ngs-dropdown-shadow);--ngs-datepicker-radius: var(--ngs-dropdown-radius);--ngs-datepicker-border: var(--ngs-dropdown-border);--ngs-calendar-padding: calc(var(--spacing, .25rem) * 2);--ngs-calendar-cell-size: calc(var(--spacing, .25rem) * 9);--ngs-calendar-cell-radius: var(--ngs-radius-lg);--ngs-calendar-cell-hover-bg: var(--ngs-color-surface-container-high);--ngs-calendar-cell-selected-bg: var(--ngs-color-primary);--ngs-calendar-cell-selected-color: var(--ngs-color-on-primary);--ngs-calendar-cell-today-border: 1px solid var(--ngs-color-outline);--ngs-calendar-header-padding: 8px;--ngs-calendar-cell-in-range-bg: var(--ngs-color-primary-container);--ngs-datepicker-preset-hover-bg: var(--ngs-color-surface-container-high);--ngs-datepicker-preset-padding: 8px 16px;--ngs-datepicker-presets-border: 1px solid var(--ngs-color-border);background:var(--ngs-datepicker-bg);color:var(--ngs-datepicker-color);box-shadow:var(--ngs-datepicker-shadow);border-radius:var(--ngs-datepicker-radius);border:var(--ngs-datepicker-border);animation:ngs-datepicker-panel-showing .15s cubic-bezier(0,0,.2,1)}.ngs-datepicker-content.ngs-datepicker-below{transform-origin:top}.ngs-datepicker-content.ngs-datepicker-above{transform-origin:bottom}@keyframes ngs-datepicker-panel-showing{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scaleY(1)}}.ngs-datepicker-content .ngs-datepicker-inner-container{display:flex}.ngs-datepicker-content .ngs-datepicker-presets{display:flex;flex-direction:column;padding:8px 0;border-inline-end:var(--ngs-datepicker-presets-border);min-width:120px}.ngs-datepicker-content .ngs-datepicker-preset{background:transparent;border:none;cursor:pointer;padding:var(--ngs-datepicker-preset-padding);text-align:start;font-size:var(--ngs-font-size-sm);white-space:nowrap}.ngs-datepicker-content .ngs-datepicker-preset:hover{background:var(--ngs-datepicker-preset-hover-bg)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
1094
|
+
dependencies: [{
|
|
1095
|
+
kind: "ngmodule",
|
|
1096
|
+
type: OverlayModule
|
|
1097
|
+
}, {
|
|
1098
|
+
kind: "component",
|
|
1099
|
+
type: Calendar,
|
|
1100
|
+
selector: "ngs-calendar",
|
|
1101
|
+
inputs: [
|
|
1102
|
+
"startAt",
|
|
1103
|
+
"selected",
|
|
1104
|
+
"minDate",
|
|
1105
|
+
"maxDate",
|
|
1106
|
+
"headerComponent",
|
|
1107
|
+
"visibleCalendars"
|
|
1108
|
+
],
|
|
1109
|
+
outputs: [
|
|
1110
|
+
"selectedChange",
|
|
1111
|
+
"yearSelected",
|
|
1112
|
+
"monthSelected"
|
|
1113
|
+
],
|
|
1114
|
+
exportAs: ["ngsCalendar"]
|
|
1115
|
+
}],
|
|
1116
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1117
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1118
|
+
});
|
|
1119
|
+
};
|
|
1120
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1121
|
+
minVersion: "12.0.0",
|
|
1122
|
+
version: "22.3.0",
|
|
1123
|
+
ngImport: i0,
|
|
1124
|
+
type: Datepicker,
|
|
1125
|
+
decorators: [{
|
|
1126
|
+
type: Component,
|
|
1127
|
+
args: [{
|
|
1128
|
+
selector: "ngs-datepicker",
|
|
1129
|
+
exportAs: "ngsDatepicker",
|
|
1130
|
+
imports: [OverlayModule, Calendar],
|
|
1131
|
+
providers: [{
|
|
1132
|
+
provide: DATEPICKER_ACTION_TARGET,
|
|
1133
|
+
useExisting: forwardRef(() => Datepicker)
|
|
1134
|
+
}],
|
|
1135
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1136
|
+
encapsulation: ViewEncapsulation.None,
|
|
1137
|
+
host: { "class": "ngs-datepicker" },
|
|
1138
|
+
template: "<ng-template #portal>\n <div class=\"ngs-datepicker-content\" [class.ngs-datepicker-above]=\"_isAbove()\" [class.ngs-datepicker-below]=\"!_isAbove()\">\n <div class=\"ngs-datepicker-inner-container\">\n @if (showQuickPresets() && quickPresets().length > 0) {\n <div class=\"ngs-datepicker-presets\">\n @for (preset of quickPresets(); track preset.label) {\n <button type=\"button\" class=\"ngs-datepicker-preset\" (click)=\"_selectPreset(preset)\">\n {{ preset.label }}\n </button>\n }\n </div>\n }\n\n <ngs-calendar\n [startAt]=\"startAt()\"\n [selected]=\"_selected()\"\n [headerComponent]=\"calendarHeaderComponent()\"\n (selectedChange)=\"_select($event)\"\n />\n </div>\n\n @if (actions()) {\n <ng-content select=\"ngs-datepicker-actions\"/>\n }\n </div>\n</ng-template>\n",
|
|
1139
|
+
styles: [".ngs-datepicker-content{--ngs-datepicker-bg: var(--ngs-dropdown-bg);--ngs-datepicker-color: var(--ngs-color-on-surface);--ngs-datepicker-shadow: var(--ngs-dropdown-shadow);--ngs-datepicker-radius: var(--ngs-dropdown-radius);--ngs-datepicker-border: var(--ngs-dropdown-border);--ngs-calendar-padding: calc(var(--spacing, .25rem) * 2);--ngs-calendar-cell-size: calc(var(--spacing, .25rem) * 9);--ngs-calendar-cell-radius: var(--ngs-radius-lg);--ngs-calendar-cell-hover-bg: var(--ngs-color-surface-container-high);--ngs-calendar-cell-selected-bg: var(--ngs-color-primary);--ngs-calendar-cell-selected-color: var(--ngs-color-on-primary);--ngs-calendar-cell-today-border: 1px solid var(--ngs-color-outline);--ngs-calendar-header-padding: 8px;--ngs-calendar-cell-in-range-bg: var(--ngs-color-primary-container);--ngs-datepicker-preset-hover-bg: var(--ngs-color-surface-container-high);--ngs-datepicker-preset-padding: 8px 16px;--ngs-datepicker-presets-border: 1px solid var(--ngs-color-border);background:var(--ngs-datepicker-bg);color:var(--ngs-datepicker-color);box-shadow:var(--ngs-datepicker-shadow);border-radius:var(--ngs-datepicker-radius);border:var(--ngs-datepicker-border);animation:ngs-datepicker-panel-showing .15s cubic-bezier(0,0,.2,1)}.ngs-datepicker-content.ngs-datepicker-below{transform-origin:top}.ngs-datepicker-content.ngs-datepicker-above{transform-origin:bottom}@keyframes ngs-datepicker-panel-showing{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scaleY(1)}}.ngs-datepicker-content .ngs-datepicker-inner-container{display:flex}.ngs-datepicker-content .ngs-datepicker-presets{display:flex;flex-direction:column;padding:8px 0;border-inline-end:var(--ngs-datepicker-presets-border);min-width:120px}.ngs-datepicker-content .ngs-datepicker-preset{background:transparent;border:none;cursor:pointer;padding:var(--ngs-datepicker-preset-padding);text-align:start;font-size:var(--ngs-font-size-sm);white-space:nowrap}.ngs-datepicker-content .ngs-datepicker-preset:hover{background:var(--ngs-datepicker-preset-hover-bg)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
1140
|
+
}]
|
|
1141
|
+
}],
|
|
1142
|
+
propDecorators: {
|
|
1143
|
+
_portalTemplate: [{
|
|
1144
|
+
type: i0.ViewChild,
|
|
1145
|
+
args: ["portal", { isSignal: true }]
|
|
1146
|
+
}],
|
|
1147
|
+
actions: [{
|
|
1148
|
+
type: i0.ContentChild,
|
|
1149
|
+
args: [i0.forwardRef(() => DatepickerActions), { isSignal: true }]
|
|
1150
|
+
}],
|
|
1151
|
+
startAt: [{
|
|
1152
|
+
type: i0.Input,
|
|
1153
|
+
args: [{
|
|
1154
|
+
isSignal: true,
|
|
1155
|
+
alias: "startAt",
|
|
1156
|
+
required: false
|
|
1157
|
+
}]
|
|
1158
|
+
}],
|
|
1159
|
+
calendarHeaderComponent: [{
|
|
1160
|
+
type: i0.Input,
|
|
1161
|
+
args: [{
|
|
1162
|
+
isSignal: true,
|
|
1163
|
+
alias: "calendarHeaderComponent",
|
|
1164
|
+
required: false
|
|
1165
|
+
}]
|
|
1166
|
+
}],
|
|
1167
|
+
quickPresets: [{
|
|
1168
|
+
type: i0.Input,
|
|
1169
|
+
args: [{
|
|
1170
|
+
isSignal: true,
|
|
1171
|
+
alias: "quickPresets",
|
|
1172
|
+
required: false
|
|
1173
|
+
}]
|
|
1174
|
+
}],
|
|
1175
|
+
showQuickPresets: [{
|
|
1176
|
+
type: i0.Input,
|
|
1177
|
+
args: [{
|
|
1178
|
+
isSignal: true,
|
|
1179
|
+
alias: "showQuickPresets",
|
|
1180
|
+
required: false
|
|
1181
|
+
}]
|
|
1182
|
+
}]
|
|
1183
|
+
}
|
|
1184
|
+
});
|
|
1185
|
+
var DatepickerApply = class DatepickerApply {
|
|
1186
|
+
_datepicker = inject(DATEPICKER_ACTION_TARGET);
|
|
1187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1188
|
+
minVersion: "12.0.0",
|
|
1189
|
+
version: "22.3.0",
|
|
1190
|
+
ngImport: i0,
|
|
1191
|
+
type: DatepickerApply,
|
|
1192
|
+
deps: [],
|
|
1193
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1194
|
+
});
|
|
1195
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1196
|
+
minVersion: "14.0.0",
|
|
1197
|
+
version: "22.3.0",
|
|
1198
|
+
type: DatepickerApply,
|
|
1199
|
+
isStandalone: true,
|
|
1200
|
+
selector: "[ngsDatepickerApply]",
|
|
1201
|
+
host: { listeners: { "click": "_datepicker.apply()" } },
|
|
1202
|
+
ngImport: i0
|
|
1203
|
+
});
|
|
1204
|
+
};
|
|
1205
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1206
|
+
minVersion: "12.0.0",
|
|
1207
|
+
version: "22.3.0",
|
|
1208
|
+
ngImport: i0,
|
|
1209
|
+
type: DatepickerApply,
|
|
1210
|
+
decorators: [{
|
|
1211
|
+
type: Directive,
|
|
1212
|
+
args: [{
|
|
1213
|
+
selector: "[ngsDatepickerApply]",
|
|
1214
|
+
host: { "(click)": "_datepicker.apply()" }
|
|
1215
|
+
}]
|
|
1216
|
+
}]
|
|
1217
|
+
});
|
|
1218
|
+
var DatepickerCancel = class DatepickerCancel {
|
|
1219
|
+
_datepicker = inject(DATEPICKER_ACTION_TARGET);
|
|
1220
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1221
|
+
minVersion: "12.0.0",
|
|
1222
|
+
version: "22.3.0",
|
|
1223
|
+
ngImport: i0,
|
|
1224
|
+
type: DatepickerCancel,
|
|
1225
|
+
deps: [],
|
|
1226
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1227
|
+
});
|
|
1228
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1229
|
+
minVersion: "14.0.0",
|
|
1230
|
+
version: "22.3.0",
|
|
1231
|
+
type: DatepickerCancel,
|
|
1232
|
+
isStandalone: true,
|
|
1233
|
+
selector: "[ngsDatepickerCancel]",
|
|
1234
|
+
host: { listeners: { "click": "_datepicker.close()" } },
|
|
1235
|
+
ngImport: i0
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
1238
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1239
|
+
minVersion: "12.0.0",
|
|
1240
|
+
version: "22.3.0",
|
|
1241
|
+
ngImport: i0,
|
|
1242
|
+
type: DatepickerCancel,
|
|
1243
|
+
decorators: [{
|
|
1244
|
+
type: Directive,
|
|
1245
|
+
args: [{
|
|
1246
|
+
selector: "[ngsDatepickerCancel]",
|
|
1247
|
+
host: { "(click)": "_datepicker.close()" }
|
|
1248
|
+
}]
|
|
1249
|
+
}]
|
|
1250
|
+
});
|
|
1251
|
+
var DateRangePicker = class DateRangePicker {
|
|
1252
|
+
_overlay = inject(Overlay);
|
|
1253
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
1254
|
+
_dateAdapter = inject(DateAdapter);
|
|
1255
|
+
startAt = input(null, ...ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []);
|
|
1256
|
+
calendarHeaderComponent = input(null, ...ngDevMode ? [{ debugName: "calendarHeaderComponent" }] : /* istanbul ignore next */ []);
|
|
1257
|
+
quickPresets = input(null, ...ngDevMode ? [{ debugName: "quickPresets" }] : /* istanbul ignore next */ []);
|
|
1258
|
+
showQuickPresets = input(false, ...ngDevMode ? [{ debugName: "showQuickPresets" }] : /* istanbul ignore next */ []);
|
|
1259
|
+
calendarCount = input(1, {
|
|
1260
|
+
...ngDevMode ? { debugName: "calendarCount" } : /* istanbul ignore next */ {},
|
|
1261
|
+
transform: (value) => numberAttribute(value, 1) === 2 ? 2 : 1
|
|
1262
|
+
});
|
|
1263
|
+
extended = input(false, {
|
|
1264
|
+
...ngDevMode ? { debugName: "extended" } : /* istanbul ignore next */ {},
|
|
1265
|
+
transform: booleanAttribute
|
|
1266
|
+
});
|
|
1267
|
+
_portalTemplate = viewChild.required("portal", ...ngDevMode ? [{ debugName: "_portalTemplate" }] : /* istanbul ignore next */ []);
|
|
1268
|
+
actions = contentChild(DatepickerActions, ...ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []);
|
|
1269
|
+
_datepickerInput;
|
|
1270
|
+
_selectedRange = signal(new DateRange(null, null), ...ngDevMode ? [{ debugName: "_selectedRange" }] : /* istanbul ignore next */ []);
|
|
1271
|
+
_isAbove = signal(false, ...ngDevMode ? [{ debugName: "_isAbove" }] : /* istanbul ignore next */ []);
|
|
1272
|
+
_visibleCalendars = computed(() => this.extended() ? 2 : this.calendarCount(), ...ngDevMode ? [{ debugName: "_visibleCalendars" }] : /* istanbul ignore next */ []);
|
|
1273
|
+
_effectivePresets = computed(() => {
|
|
1274
|
+
const userPresets = this.quickPresets();
|
|
1275
|
+
if (userPresets) return userPresets;
|
|
1276
|
+
const today = this._dateAdapter.today();
|
|
1277
|
+
return [
|
|
1278
|
+
{
|
|
1279
|
+
label: "Today",
|
|
1280
|
+
value: new DateRange(today, today)
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
label: "Last 7 Days",
|
|
1284
|
+
value: new DateRange(this._dateAdapter.addCalendarDays(today, -6), today)
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
label: "Last 30 Days",
|
|
1288
|
+
value: new DateRange(this._dateAdapter.addCalendarDays(today, -29), today)
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
label: "This Month",
|
|
1292
|
+
value: () => {
|
|
1293
|
+
const year = this._dateAdapter.getYear(today);
|
|
1294
|
+
const month = this._dateAdapter.getMonth(today);
|
|
1295
|
+
const start = this._dateAdapter.createDate(year, month, 1);
|
|
1296
|
+
const daysInMonth = this._dateAdapter.getNumDaysInMonth(start);
|
|
1297
|
+
return new DateRange(start, this._dateAdapter.createDate(year, month, daysInMonth));
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
].map((p) => ({
|
|
1301
|
+
...p,
|
|
1302
|
+
value: typeof p.value === "function" ? p.value() : p.value
|
|
1303
|
+
}));
|
|
1304
|
+
}, ...ngDevMode ? [{ debugName: "_effectivePresets" }] : /* istanbul ignore next */ []);
|
|
1305
|
+
_overlayRef = null;
|
|
1306
|
+
ngOnDestroy() {
|
|
1307
|
+
this.close();
|
|
1308
|
+
}
|
|
1309
|
+
_registerInput(input) {
|
|
1310
|
+
this._datepickerInput = input;
|
|
1311
|
+
}
|
|
1312
|
+
open() {
|
|
1313
|
+
if (this._overlayRef || !this._datepickerInput || this._datepickerInput.disabled() || this._datepickerInput.readonly()) return;
|
|
1314
|
+
this._selectedRange.set(this._datepickerInput._value ?? new DateRange(null, null));
|
|
1315
|
+
const strategy = this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withPositions([{
|
|
1316
|
+
originX: "start",
|
|
1317
|
+
originY: "bottom",
|
|
1318
|
+
overlayX: "start",
|
|
1319
|
+
overlayY: "top"
|
|
1320
|
+
}, {
|
|
1321
|
+
originX: "start",
|
|
1322
|
+
originY: "top",
|
|
1323
|
+
overlayX: "start",
|
|
1324
|
+
overlayY: "bottom"
|
|
1325
|
+
}]);
|
|
1326
|
+
strategy.positionChanges.subscribe((change) => {
|
|
1327
|
+
this._isAbove.set(change.connectionPair.overlayY === "bottom");
|
|
1328
|
+
});
|
|
1329
|
+
this._overlayRef = this._overlay.create({
|
|
1330
|
+
positionStrategy: strategy,
|
|
1331
|
+
hasBackdrop: true,
|
|
1332
|
+
backdropClass: "cdk-overlay-transparent-backdrop"
|
|
1333
|
+
});
|
|
1334
|
+
this._overlayRef.backdropClick().subscribe(() => this.close());
|
|
1335
|
+
const portal = new TemplatePortal(this._portalTemplate(), this._viewContainerRef);
|
|
1336
|
+
this._overlayRef.attach(portal);
|
|
1337
|
+
}
|
|
1338
|
+
close() {
|
|
1339
|
+
if (this._overlayRef) {
|
|
1340
|
+
this._overlayRef.detach();
|
|
1341
|
+
this._overlayRef.dispose();
|
|
1342
|
+
this._overlayRef = null;
|
|
1343
|
+
this._selectedRange.set(this._datepickerInput?._value ?? new DateRange(null, null));
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
_select(date) {
|
|
1347
|
+
const currentRange = this._selectedRange();
|
|
1348
|
+
let newRange;
|
|
1349
|
+
if (!currentRange.start || currentRange.start && currentRange.end) newRange = new DateRange(date, null);
|
|
1350
|
+
else if (this._dateAdapter.compareDate(date, currentRange.start) < 0) newRange = new DateRange(date, currentRange.start);
|
|
1351
|
+
else newRange = new DateRange(currentRange.start, date);
|
|
1352
|
+
this._updateSelectedRange(newRange);
|
|
1353
|
+
}
|
|
1354
|
+
_selectPreset(preset) {
|
|
1355
|
+
const value = preset.value;
|
|
1356
|
+
if (value instanceof DateRange) this._updateSelectedRange(value);
|
|
1357
|
+
else if (value) this._updateSelectedRange(new DateRange(value, null));
|
|
1358
|
+
else this._updateSelectedRange(new DateRange(null, null));
|
|
1359
|
+
}
|
|
1360
|
+
_updateSelectedRange(newRange) {
|
|
1361
|
+
this._selectedRange.set(newRange);
|
|
1362
|
+
if (this.actions()) return;
|
|
1363
|
+
this._datepickerInput?._rangeUpdated(newRange);
|
|
1364
|
+
if (newRange.start && newRange.end) this.close();
|
|
1365
|
+
}
|
|
1366
|
+
apply() {
|
|
1367
|
+
const range = this._selectedRange();
|
|
1368
|
+
const input = this._datepickerInput;
|
|
1369
|
+
const previous = input?._value;
|
|
1370
|
+
if (input && (!this._dateAdapter.sameDate(range.start, previous?.start ?? null) || !this._dateAdapter.sameDate(range.end, previous?.end ?? null))) input._rangeUpdated(range);
|
|
1371
|
+
this.close();
|
|
1372
|
+
}
|
|
1373
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1374
|
+
minVersion: "12.0.0",
|
|
1375
|
+
version: "22.3.0",
|
|
1376
|
+
ngImport: i0,
|
|
1377
|
+
type: DateRangePicker,
|
|
1378
|
+
deps: [],
|
|
1379
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1380
|
+
});
|
|
1381
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1382
|
+
minVersion: "17.0.0",
|
|
1383
|
+
version: "22.3.0",
|
|
1384
|
+
type: DateRangePicker,
|
|
1385
|
+
isStandalone: true,
|
|
1386
|
+
selector: "ngs-date-range-picker",
|
|
1387
|
+
inputs: {
|
|
1388
|
+
startAt: {
|
|
1389
|
+
classPropertyName: "startAt",
|
|
1390
|
+
publicName: "startAt",
|
|
1391
|
+
isSignal: true,
|
|
1392
|
+
isRequired: false,
|
|
1393
|
+
transformFunction: null
|
|
1394
|
+
},
|
|
1395
|
+
calendarHeaderComponent: {
|
|
1396
|
+
classPropertyName: "calendarHeaderComponent",
|
|
1397
|
+
publicName: "calendarHeaderComponent",
|
|
1398
|
+
isSignal: true,
|
|
1399
|
+
isRequired: false,
|
|
1400
|
+
transformFunction: null
|
|
1401
|
+
},
|
|
1402
|
+
quickPresets: {
|
|
1403
|
+
classPropertyName: "quickPresets",
|
|
1404
|
+
publicName: "quickPresets",
|
|
1405
|
+
isSignal: true,
|
|
1406
|
+
isRequired: false,
|
|
1407
|
+
transformFunction: null
|
|
1408
|
+
},
|
|
1409
|
+
showQuickPresets: {
|
|
1410
|
+
classPropertyName: "showQuickPresets",
|
|
1411
|
+
publicName: "showQuickPresets",
|
|
1412
|
+
isSignal: true,
|
|
1413
|
+
isRequired: false,
|
|
1414
|
+
transformFunction: null
|
|
1415
|
+
},
|
|
1416
|
+
calendarCount: {
|
|
1417
|
+
classPropertyName: "calendarCount",
|
|
1418
|
+
publicName: "calendarCount",
|
|
1419
|
+
isSignal: true,
|
|
1420
|
+
isRequired: false,
|
|
1421
|
+
transformFunction: null
|
|
1422
|
+
},
|
|
1423
|
+
extended: {
|
|
1424
|
+
classPropertyName: "extended",
|
|
1425
|
+
publicName: "extended",
|
|
1426
|
+
isSignal: true,
|
|
1427
|
+
isRequired: false,
|
|
1428
|
+
transformFunction: null
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
host: { classAttribute: "ngs-date-range-picker" },
|
|
1432
|
+
providers: [{
|
|
1433
|
+
provide: DATEPICKER_ACTION_TARGET,
|
|
1434
|
+
useExisting: forwardRef(() => DateRangePicker)
|
|
1435
|
+
}],
|
|
1436
|
+
queries: [{
|
|
1437
|
+
propertyName: "actions",
|
|
1438
|
+
first: true,
|
|
1439
|
+
predicate: DatepickerActions,
|
|
1440
|
+
descendants: true,
|
|
1441
|
+
isSignal: true
|
|
1442
|
+
}],
|
|
1443
|
+
viewQueries: [{
|
|
1444
|
+
propertyName: "_portalTemplate",
|
|
1445
|
+
first: true,
|
|
1446
|
+
predicate: ["portal"],
|
|
1447
|
+
descendants: true,
|
|
1448
|
+
isSignal: true
|
|
1449
|
+
}],
|
|
1450
|
+
exportAs: ["ngsDateRangePicker"],
|
|
1451
|
+
ngImport: i0,
|
|
1452
|
+
template: "<ng-template #portal>\n <div class=\"ngs-datepicker-content\" [class.ngs-datepicker-above]=\"_isAbove()\" [class.ngs-datepicker-below]=\"!_isAbove()\">\n <div class=\"ngs-datepicker-inner-container\">\n @if (showQuickPresets() && _effectivePresets().length > 0) {\n <div class=\"ngs-datepicker-presets\">\n @for (preset of _effectivePresets(); track preset.label) {\n <button type=\"button\" class=\"ngs-datepicker-preset\" (click)=\"_selectPreset(preset)\">\n {{ preset.label }}\n </button>\n }\n </div>\n }\n\n <ngs-calendar [startAt]=\"startAt()\"\n [selected]=\"_selectedRange()\"\n [headerComponent]=\"calendarHeaderComponent()\"\n [visibleCalendars]=\"_visibleCalendars()\"\n (selectedChange)=\"_select($event)\"\n />\n </div>\n\n @if (actions()) {\n <ng-content select=\"ngs-datepicker-actions\" />\n }\n </div>\n</ng-template>\n",
|
|
1453
|
+
styles: [":host .ngs-datepicker-content{--ngs-datepicker-bg: var(--ngs-dropdown-bg);--ngs-datepicker-color: var(--ngs-color-on-surface);--ngs-datepicker-shadow: var(--ngs-dropdown-shadow);--ngs-datepicker-radius: var(--ngs-dropdown-radius);--ngs-datepicker-border: var(--ngs-dropdown-border);--ngs-calendar-padding: calc(var(--spacing, .25rem) * 2);--ngs-calendar-cell-size: calc(var(--spacing, .25rem) * 9);--ngs-calendar-cell-radius: var(--ngs-radius-lg);--ngs-calendar-cell-hover-bg: var(--ngs-color-surface-container-high);--ngs-calendar-cell-selected-bg: var(--ngs-color-primary);--ngs-calendar-cell-selected-color: var(--ngs-color-on-primary);--ngs-calendar-cell-today-border: 1px solid var(--ngs-color-outline);--ngs-calendar-header-padding: 8px;--ngs-calendar-cell-in-range-bg: var(--ngs-color-primary-container);--ngs-datepicker-preset-hover-bg: var(--ngs-color-surface-container-high);--ngs-datepicker-preset-padding: 8px 16px;--ngs-datepicker-presets-border: 1px solid var(--ngs-color-border);background:var(--ngs-datepicker-bg);color:var(--ngs-datepicker-color);box-shadow:var(--ngs-datepicker-shadow);border-radius:var(--ngs-datepicker-radius);border:var(--ngs-datepicker-border);animation:ngs-date-range-picker-panel-showing .15s cubic-bezier(0,0,.2,1)}:host .ngs-datepicker-content.ngs-datepicker-below{transform-origin:top}:host .ngs-datepicker-content.ngs-datepicker-above{transform-origin:bottom}:host .ngs-datepicker-inner-container{display:flex}:host .ngs-datepicker-presets{display:flex;flex-direction:column;padding:8px 0;border-inline-end:var(--ngs-datepicker-presets-border);min-width:120px}:host .ngs-datepicker-preset{background:transparent;border:none;cursor:pointer;padding:var(--ngs-datepicker-preset-padding);text-align:start;font-size:var(--ngs-font-size-sm);white-space:nowrap}:host .ngs-datepicker-preset:hover{background:var(--ngs-datepicker-preset-hover-bg)}@keyframes ngs-date-range-picker-panel-showing{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scaleY(1)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
1454
|
+
dependencies: [{
|
|
1455
|
+
kind: "ngmodule",
|
|
1456
|
+
type: OverlayModule
|
|
1457
|
+
}, {
|
|
1458
|
+
kind: "component",
|
|
1459
|
+
type: Calendar,
|
|
1460
|
+
selector: "ngs-calendar",
|
|
1461
|
+
inputs: [
|
|
1462
|
+
"startAt",
|
|
1463
|
+
"selected",
|
|
1464
|
+
"minDate",
|
|
1465
|
+
"maxDate",
|
|
1466
|
+
"headerComponent",
|
|
1467
|
+
"visibleCalendars"
|
|
1468
|
+
],
|
|
1469
|
+
outputs: [
|
|
1470
|
+
"selectedChange",
|
|
1471
|
+
"yearSelected",
|
|
1472
|
+
"monthSelected"
|
|
1473
|
+
],
|
|
1474
|
+
exportAs: ["ngsCalendar"]
|
|
1475
|
+
}],
|
|
1476
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1477
|
+
});
|
|
1478
|
+
};
|
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1480
|
+
minVersion: "12.0.0",
|
|
1481
|
+
version: "22.3.0",
|
|
1482
|
+
ngImport: i0,
|
|
1483
|
+
type: DateRangePicker,
|
|
1484
|
+
decorators: [{
|
|
1485
|
+
type: Component,
|
|
1486
|
+
args: [{
|
|
1487
|
+
selector: "ngs-date-range-picker",
|
|
1488
|
+
exportAs: "ngsDateRangePicker",
|
|
1489
|
+
imports: [OverlayModule, Calendar],
|
|
1490
|
+
providers: [{
|
|
1491
|
+
provide: DATEPICKER_ACTION_TARGET,
|
|
1492
|
+
useExisting: forwardRef(() => DateRangePicker)
|
|
1493
|
+
}],
|
|
1494
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1495
|
+
host: { "class": "ngs-date-range-picker" },
|
|
1496
|
+
template: "<ng-template #portal>\n <div class=\"ngs-datepicker-content\" [class.ngs-datepicker-above]=\"_isAbove()\" [class.ngs-datepicker-below]=\"!_isAbove()\">\n <div class=\"ngs-datepicker-inner-container\">\n @if (showQuickPresets() && _effectivePresets().length > 0) {\n <div class=\"ngs-datepicker-presets\">\n @for (preset of _effectivePresets(); track preset.label) {\n <button type=\"button\" class=\"ngs-datepicker-preset\" (click)=\"_selectPreset(preset)\">\n {{ preset.label }}\n </button>\n }\n </div>\n }\n\n <ngs-calendar [startAt]=\"startAt()\"\n [selected]=\"_selectedRange()\"\n [headerComponent]=\"calendarHeaderComponent()\"\n [visibleCalendars]=\"_visibleCalendars()\"\n (selectedChange)=\"_select($event)\"\n />\n </div>\n\n @if (actions()) {\n <ng-content select=\"ngs-datepicker-actions\" />\n }\n </div>\n</ng-template>\n",
|
|
1497
|
+
styles: [":host .ngs-datepicker-content{--ngs-datepicker-bg: var(--ngs-dropdown-bg);--ngs-datepicker-color: var(--ngs-color-on-surface);--ngs-datepicker-shadow: var(--ngs-dropdown-shadow);--ngs-datepicker-radius: var(--ngs-dropdown-radius);--ngs-datepicker-border: var(--ngs-dropdown-border);--ngs-calendar-padding: calc(var(--spacing, .25rem) * 2);--ngs-calendar-cell-size: calc(var(--spacing, .25rem) * 9);--ngs-calendar-cell-radius: var(--ngs-radius-lg);--ngs-calendar-cell-hover-bg: var(--ngs-color-surface-container-high);--ngs-calendar-cell-selected-bg: var(--ngs-color-primary);--ngs-calendar-cell-selected-color: var(--ngs-color-on-primary);--ngs-calendar-cell-today-border: 1px solid var(--ngs-color-outline);--ngs-calendar-header-padding: 8px;--ngs-calendar-cell-in-range-bg: var(--ngs-color-primary-container);--ngs-datepicker-preset-hover-bg: var(--ngs-color-surface-container-high);--ngs-datepicker-preset-padding: 8px 16px;--ngs-datepicker-presets-border: 1px solid var(--ngs-color-border);background:var(--ngs-datepicker-bg);color:var(--ngs-datepicker-color);box-shadow:var(--ngs-datepicker-shadow);border-radius:var(--ngs-datepicker-radius);border:var(--ngs-datepicker-border);animation:ngs-date-range-picker-panel-showing .15s cubic-bezier(0,0,.2,1)}:host .ngs-datepicker-content.ngs-datepicker-below{transform-origin:top}:host .ngs-datepicker-content.ngs-datepicker-above{transform-origin:bottom}:host .ngs-datepicker-inner-container{display:flex}:host .ngs-datepicker-presets{display:flex;flex-direction:column;padding:8px 0;border-inline-end:var(--ngs-datepicker-presets-border);min-width:120px}:host .ngs-datepicker-preset{background:transparent;border:none;cursor:pointer;padding:var(--ngs-datepicker-preset-padding);text-align:start;font-size:var(--ngs-font-size-sm);white-space:nowrap}:host .ngs-datepicker-preset:hover{background:var(--ngs-datepicker-preset-hover-bg)}@keyframes ngs-date-range-picker-panel-showing{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scaleY(1)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
1498
|
+
}]
|
|
1499
|
+
}],
|
|
1500
|
+
propDecorators: {
|
|
1501
|
+
startAt: [{
|
|
1502
|
+
type: i0.Input,
|
|
1503
|
+
args: [{
|
|
1504
|
+
isSignal: true,
|
|
1505
|
+
alias: "startAt",
|
|
1506
|
+
required: false
|
|
1507
|
+
}]
|
|
1508
|
+
}],
|
|
1509
|
+
calendarHeaderComponent: [{
|
|
1510
|
+
type: i0.Input,
|
|
1511
|
+
args: [{
|
|
1512
|
+
isSignal: true,
|
|
1513
|
+
alias: "calendarHeaderComponent",
|
|
1514
|
+
required: false
|
|
1515
|
+
}]
|
|
1516
|
+
}],
|
|
1517
|
+
quickPresets: [{
|
|
1518
|
+
type: i0.Input,
|
|
1519
|
+
args: [{
|
|
1520
|
+
isSignal: true,
|
|
1521
|
+
alias: "quickPresets",
|
|
1522
|
+
required: false
|
|
1523
|
+
}]
|
|
1524
|
+
}],
|
|
1525
|
+
showQuickPresets: [{
|
|
1526
|
+
type: i0.Input,
|
|
1527
|
+
args: [{
|
|
1528
|
+
isSignal: true,
|
|
1529
|
+
alias: "showQuickPresets",
|
|
1530
|
+
required: false
|
|
1531
|
+
}]
|
|
1532
|
+
}],
|
|
1533
|
+
calendarCount: [{
|
|
1534
|
+
type: i0.Input,
|
|
1535
|
+
args: [{
|
|
1536
|
+
isSignal: true,
|
|
1537
|
+
alias: "calendarCount",
|
|
1538
|
+
required: false
|
|
1539
|
+
}]
|
|
1540
|
+
}],
|
|
1541
|
+
extended: [{
|
|
1542
|
+
type: i0.Input,
|
|
1543
|
+
args: [{
|
|
1544
|
+
isSignal: true,
|
|
1545
|
+
alias: "extended",
|
|
1546
|
+
required: false
|
|
1547
|
+
}]
|
|
1548
|
+
}],
|
|
1549
|
+
_portalTemplate: [{
|
|
1550
|
+
type: i0.ViewChild,
|
|
1551
|
+
args: ["portal", { isSignal: true }]
|
|
1552
|
+
}],
|
|
1553
|
+
actions: [{
|
|
1554
|
+
type: i0.ContentChild,
|
|
1555
|
+
args: [i0.forwardRef(() => DatepickerActions), { isSignal: true }]
|
|
1556
|
+
}]
|
|
1557
|
+
}
|
|
1558
|
+
});
|
|
1559
|
+
var DatepickerInput = class DatepickerInput {
|
|
1560
|
+
elementRef = inject(ElementRef);
|
|
1561
|
+
formField = inject(FormField, { optional: true });
|
|
1562
|
+
signalField = inject(FormField$1, {
|
|
1563
|
+
self: true,
|
|
1564
|
+
optional: true
|
|
1565
|
+
});
|
|
1566
|
+
dateAdapter = inject(DateAdapter);
|
|
1567
|
+
legacyDisabled = signal(false, ...ngDevMode ? [{ debugName: "legacyDisabled" }] : /* istanbul ignore next */ []);
|
|
1568
|
+
ngsDatepicker = input.required(...ngDevMode ? [{ debugName: "ngsDatepicker" }] : /* istanbul ignore next */ []);
|
|
1569
|
+
value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1570
|
+
touch = output();
|
|
1571
|
+
disabled = input(false, {
|
|
1572
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
1573
|
+
transform: booleanAttribute
|
|
1574
|
+
});
|
|
1575
|
+
readonly = input(false, {
|
|
1576
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
1577
|
+
transform: booleanAttribute
|
|
1578
|
+
});
|
|
1579
|
+
rawValue = transformedValue(this.value, {
|
|
1580
|
+
parse: (raw) => {
|
|
1581
|
+
if (!raw.trim()) return { value: null };
|
|
1582
|
+
const date = this.dateAdapter.parse(raw, null);
|
|
1583
|
+
return date && this.dateAdapter.isValid(date) ? { value: date } : {
|
|
1584
|
+
value: null,
|
|
1585
|
+
error: {
|
|
1586
|
+
kind: "parse",
|
|
1587
|
+
message: "Enter a valid date."
|
|
1588
|
+
}
|
|
1589
|
+
};
|
|
1590
|
+
},
|
|
1591
|
+
format: (date) => date && this.dateAdapter.isDateInstance(date) && this.dateAdapter.isValid(date) ? this.dateAdapter.format(date, {
|
|
1592
|
+
year: "numeric",
|
|
1593
|
+
month: "2-digit",
|
|
1594
|
+
day: "2-digit"
|
|
1595
|
+
}) : ""
|
|
1596
|
+
});
|
|
1597
|
+
constructor() {
|
|
1598
|
+
connectLegacyNativeFormControl(this.value, this.touch, (value) => this.value.set(value), this.legacyDisabled.set);
|
|
1599
|
+
effect((onCleanup) => {
|
|
1600
|
+
const picker = this.ngsDatepicker();
|
|
1601
|
+
picker._registerInput(this);
|
|
1602
|
+
onCleanup(() => picker._unregisterInput(this));
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
onInput(raw) {
|
|
1606
|
+
if (!this.isDisabled() && !this.readonly()) this.rawValue.set(raw);
|
|
1607
|
+
}
|
|
1608
|
+
isDisabled() {
|
|
1609
|
+
return this.disabled() || this.legacyDisabled();
|
|
1610
|
+
}
|
|
1611
|
+
canSelectDate() {
|
|
1612
|
+
return !this.isDisabled() && !(this.signalField && this.readonly());
|
|
1613
|
+
}
|
|
1614
|
+
selectDate(date) {
|
|
1615
|
+
if (!this.canSelectDate()) return;
|
|
1616
|
+
this.value.set(date);
|
|
1617
|
+
this.elementRef.nativeElement.value = this.rawValue();
|
|
1618
|
+
}
|
|
1619
|
+
getConnectedOverlayOrigin() {
|
|
1620
|
+
return this.formField?.container() ?? this.elementRef;
|
|
1621
|
+
}
|
|
1622
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1623
|
+
minVersion: "12.0.0",
|
|
1624
|
+
version: "22.3.0",
|
|
1625
|
+
ngImport: i0,
|
|
1626
|
+
type: DatepickerInput,
|
|
1627
|
+
deps: [],
|
|
1628
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1629
|
+
});
|
|
1630
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1631
|
+
minVersion: "17.1.0",
|
|
1632
|
+
version: "22.3.0",
|
|
1633
|
+
type: DatepickerInput,
|
|
1634
|
+
isStandalone: true,
|
|
1635
|
+
selector: "input[ngsDatepicker]",
|
|
1636
|
+
inputs: {
|
|
1637
|
+
ngsDatepicker: {
|
|
1638
|
+
classPropertyName: "ngsDatepicker",
|
|
1639
|
+
publicName: "ngsDatepicker",
|
|
1640
|
+
isSignal: true,
|
|
1641
|
+
isRequired: true,
|
|
1642
|
+
transformFunction: null
|
|
1643
|
+
},
|
|
1644
|
+
value: {
|
|
1645
|
+
classPropertyName: "value",
|
|
1646
|
+
publicName: "value",
|
|
1647
|
+
isSignal: true,
|
|
1648
|
+
isRequired: false,
|
|
1649
|
+
transformFunction: null
|
|
1650
|
+
},
|
|
1651
|
+
disabled: {
|
|
1652
|
+
classPropertyName: "disabled",
|
|
1653
|
+
publicName: "disabled",
|
|
1654
|
+
isSignal: true,
|
|
1655
|
+
isRequired: false,
|
|
1656
|
+
transformFunction: null
|
|
1657
|
+
},
|
|
1658
|
+
readonly: {
|
|
1659
|
+
classPropertyName: "readonly",
|
|
1660
|
+
publicName: "readonly",
|
|
1661
|
+
isSignal: true,
|
|
1662
|
+
isRequired: false,
|
|
1663
|
+
transformFunction: null
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
outputs: {
|
|
1667
|
+
value: "valueChange",
|
|
1668
|
+
touch: "touch"
|
|
1669
|
+
},
|
|
1670
|
+
host: {
|
|
1671
|
+
listeners: {
|
|
1672
|
+
"input": "onInput($any($event.target).value)",
|
|
1673
|
+
"blur": "touch.emit()"
|
|
1674
|
+
},
|
|
1675
|
+
properties: {
|
|
1676
|
+
"value": "rawValue()",
|
|
1677
|
+
"disabled": "isDisabled()",
|
|
1678
|
+
"readOnly": "readonly()"
|
|
1679
|
+
},
|
|
1680
|
+
classAttribute: "ngs-datepicker-input"
|
|
1681
|
+
},
|
|
1682
|
+
exportAs: ["ngsDatepickerInput"],
|
|
1683
|
+
ngImport: i0
|
|
1684
|
+
});
|
|
1685
|
+
};
|
|
1686
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1687
|
+
minVersion: "12.0.0",
|
|
1688
|
+
version: "22.3.0",
|
|
1689
|
+
ngImport: i0,
|
|
1690
|
+
type: DatepickerInput,
|
|
1691
|
+
decorators: [{
|
|
1692
|
+
type: Directive,
|
|
1693
|
+
args: [{
|
|
1694
|
+
selector: "input[ngsDatepicker]",
|
|
1695
|
+
exportAs: "ngsDatepickerInput",
|
|
1696
|
+
host: {
|
|
1697
|
+
"class": "ngs-datepicker-input",
|
|
1698
|
+
"[value]": "rawValue()",
|
|
1699
|
+
"[disabled]": "isDisabled()",
|
|
1700
|
+
"[readOnly]": "readonly()",
|
|
1701
|
+
"(input)": "onInput($any($event.target).value)",
|
|
1702
|
+
"(blur)": "touch.emit()"
|
|
1703
|
+
}
|
|
1704
|
+
}]
|
|
1705
|
+
}],
|
|
1706
|
+
ctorParameters: () => [],
|
|
1707
|
+
propDecorators: {
|
|
1708
|
+
ngsDatepicker: [{
|
|
1709
|
+
type: i0.Input,
|
|
1710
|
+
args: [{
|
|
1711
|
+
isSignal: true,
|
|
1712
|
+
alias: "ngsDatepicker",
|
|
1713
|
+
required: true
|
|
1714
|
+
}]
|
|
1715
|
+
}],
|
|
1716
|
+
value: [{
|
|
1717
|
+
type: i0.Input,
|
|
1718
|
+
args: [{
|
|
1719
|
+
isSignal: true,
|
|
1720
|
+
alias: "value",
|
|
1721
|
+
required: false
|
|
1722
|
+
}]
|
|
1723
|
+
}, {
|
|
1724
|
+
type: i0.Output,
|
|
1725
|
+
args: ["valueChange"]
|
|
1726
|
+
}],
|
|
1727
|
+
touch: [{
|
|
1728
|
+
type: i0.Output,
|
|
1729
|
+
args: ["touch"]
|
|
1730
|
+
}],
|
|
1731
|
+
disabled: [{
|
|
1732
|
+
type: i0.Input,
|
|
1733
|
+
args: [{
|
|
1734
|
+
isSignal: true,
|
|
1735
|
+
alias: "disabled",
|
|
1736
|
+
required: false
|
|
1737
|
+
}]
|
|
1738
|
+
}],
|
|
1739
|
+
readonly: [{
|
|
1740
|
+
type: i0.Input,
|
|
1741
|
+
args: [{
|
|
1742
|
+
isSignal: true,
|
|
1743
|
+
alias: "readonly",
|
|
1744
|
+
required: false
|
|
1745
|
+
}]
|
|
1746
|
+
}]
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1749
|
+
var StartDate = class StartDate {
|
|
1750
|
+
_elementRef = inject(ElementRef);
|
|
1751
|
+
_dateAdapter = inject(DateAdapter);
|
|
1752
|
+
_rangeInput = inject(DateRangeInput);
|
|
1753
|
+
_onInput(value) {
|
|
1754
|
+
if (this._rangeInput.disabled() || this._rangeInput.readonly()) return;
|
|
1755
|
+
let date;
|
|
1756
|
+
try {
|
|
1757
|
+
date = this._dateAdapter.parse(value, null);
|
|
1758
|
+
} catch {
|
|
1759
|
+
date = this._dateAdapter.invalid();
|
|
1760
|
+
}
|
|
1761
|
+
this._rangeInput._startUpdated(date);
|
|
1762
|
+
this._rangeInput._inputUpdated();
|
|
1763
|
+
}
|
|
1764
|
+
_formatValue(value) {
|
|
1765
|
+
this._elementRef.nativeElement.value = value && this._dateAdapter.isValid(value) ? this._dateAdapter.format(value, {
|
|
1766
|
+
year: "numeric",
|
|
1767
|
+
month: "2-digit",
|
|
1768
|
+
day: "2-digit"
|
|
1769
|
+
}) : "";
|
|
1770
|
+
this._rangeInput._inputUpdated();
|
|
1771
|
+
}
|
|
1772
|
+
_onFocus() {
|
|
1773
|
+
this._rangeInput._handleFocus();
|
|
1774
|
+
}
|
|
1775
|
+
_onBlur(event) {
|
|
1776
|
+
this._rangeInput._handleBlur(event);
|
|
1777
|
+
}
|
|
1778
|
+
isEmpty() {
|
|
1779
|
+
return !this._elementRef.nativeElement.value;
|
|
1780
|
+
}
|
|
1781
|
+
focus() {
|
|
1782
|
+
this._elementRef.nativeElement.focus();
|
|
1783
|
+
}
|
|
1784
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1785
|
+
minVersion: "12.0.0",
|
|
1786
|
+
version: "22.3.0",
|
|
1787
|
+
ngImport: i0,
|
|
1788
|
+
type: StartDate,
|
|
1789
|
+
deps: [],
|
|
1790
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1791
|
+
});
|
|
1792
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1793
|
+
minVersion: "14.0.0",
|
|
1794
|
+
version: "22.3.0",
|
|
1795
|
+
type: StartDate,
|
|
1796
|
+
isStandalone: true,
|
|
1797
|
+
selector: "input[ngsStartDate]",
|
|
1798
|
+
host: {
|
|
1799
|
+
listeners: {
|
|
1800
|
+
"input": "_onInput($any($event).target.value)",
|
|
1801
|
+
"focus": "_onFocus()",
|
|
1802
|
+
"blur": "_onBlur($event)"
|
|
1803
|
+
},
|
|
1804
|
+
properties: {
|
|
1805
|
+
"disabled": "_rangeInput.disabled()",
|
|
1806
|
+
"readOnly": "_rangeInput.readonly()",
|
|
1807
|
+
"required": "_rangeInput.required()"
|
|
1808
|
+
},
|
|
1809
|
+
classAttribute: "ngs-date-range-input-start"
|
|
1810
|
+
},
|
|
1811
|
+
ngImport: i0
|
|
1812
|
+
});
|
|
1813
|
+
};
|
|
1814
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1815
|
+
minVersion: "12.0.0",
|
|
1816
|
+
version: "22.3.0",
|
|
1817
|
+
ngImport: i0,
|
|
1818
|
+
type: StartDate,
|
|
1819
|
+
decorators: [{
|
|
1820
|
+
type: Directive,
|
|
1821
|
+
args: [{
|
|
1822
|
+
selector: "input[ngsStartDate]",
|
|
1823
|
+
host: {
|
|
1824
|
+
"class": "ngs-date-range-input-start",
|
|
1825
|
+
"(input)": "_onInput($any($event).target.value)",
|
|
1826
|
+
"(focus)": "_onFocus()",
|
|
1827
|
+
"(blur)": "_onBlur($event)",
|
|
1828
|
+
"[disabled]": "_rangeInput.disabled()",
|
|
1829
|
+
"[readOnly]": "_rangeInput.readonly()",
|
|
1830
|
+
"[required]": "_rangeInput.required()"
|
|
1831
|
+
}
|
|
1832
|
+
}]
|
|
1833
|
+
}]
|
|
1834
|
+
});
|
|
1835
|
+
var EndDate = class EndDate {
|
|
1836
|
+
_elementRef = inject(ElementRef);
|
|
1837
|
+
_dateAdapter = inject(DateAdapter);
|
|
1838
|
+
_rangeInput = inject(DateRangeInput);
|
|
1839
|
+
_onInput(value) {
|
|
1840
|
+
if (this._rangeInput.disabled() || this._rangeInput.readonly()) return;
|
|
1841
|
+
let date;
|
|
1842
|
+
try {
|
|
1843
|
+
date = this._dateAdapter.parse(value, null);
|
|
1844
|
+
} catch {
|
|
1845
|
+
date = this._dateAdapter.invalid();
|
|
1846
|
+
}
|
|
1847
|
+
this._rangeInput._endUpdated(date);
|
|
1848
|
+
this._rangeInput._inputUpdated();
|
|
1849
|
+
}
|
|
1850
|
+
_formatValue(value) {
|
|
1851
|
+
this._elementRef.nativeElement.value = value && this._dateAdapter.isValid(value) ? this._dateAdapter.format(value, {
|
|
1852
|
+
year: "numeric",
|
|
1853
|
+
month: "2-digit",
|
|
1854
|
+
day: "2-digit"
|
|
1855
|
+
}) : "";
|
|
1856
|
+
this._rangeInput._inputUpdated();
|
|
1857
|
+
}
|
|
1858
|
+
_onFocus() {
|
|
1859
|
+
this._rangeInput._handleFocus();
|
|
1860
|
+
}
|
|
1861
|
+
_onBlur(event) {
|
|
1862
|
+
this._rangeInput._handleBlur(event);
|
|
1863
|
+
}
|
|
1864
|
+
isEmpty() {
|
|
1865
|
+
return !this._elementRef.nativeElement.value;
|
|
1866
|
+
}
|
|
1867
|
+
focus() {
|
|
1868
|
+
this._elementRef.nativeElement.focus();
|
|
1869
|
+
}
|
|
1870
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1871
|
+
minVersion: "12.0.0",
|
|
1872
|
+
version: "22.3.0",
|
|
1873
|
+
ngImport: i0,
|
|
1874
|
+
type: EndDate,
|
|
1875
|
+
deps: [],
|
|
1876
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1877
|
+
});
|
|
1878
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1879
|
+
minVersion: "14.0.0",
|
|
1880
|
+
version: "22.3.0",
|
|
1881
|
+
type: EndDate,
|
|
1882
|
+
isStandalone: true,
|
|
1883
|
+
selector: "input[ngsEndDate]",
|
|
1884
|
+
host: {
|
|
1885
|
+
listeners: {
|
|
1886
|
+
"input": "_onInput($any($event).target.value)",
|
|
1887
|
+
"focus": "_onFocus()",
|
|
1888
|
+
"blur": "_onBlur($event)"
|
|
1889
|
+
},
|
|
1890
|
+
properties: {
|
|
1891
|
+
"disabled": "_rangeInput.disabled()",
|
|
1892
|
+
"readOnly": "_rangeInput.readonly()",
|
|
1893
|
+
"required": "_rangeInput.required()"
|
|
1894
|
+
},
|
|
1895
|
+
classAttribute: "ngs-date-range-input-end"
|
|
1896
|
+
},
|
|
1897
|
+
ngImport: i0
|
|
1898
|
+
});
|
|
1899
|
+
};
|
|
1900
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1901
|
+
minVersion: "12.0.0",
|
|
1902
|
+
version: "22.3.0",
|
|
1903
|
+
ngImport: i0,
|
|
1904
|
+
type: EndDate,
|
|
1905
|
+
decorators: [{
|
|
1906
|
+
type: Directive,
|
|
1907
|
+
args: [{
|
|
1908
|
+
selector: "input[ngsEndDate]",
|
|
1909
|
+
host: {
|
|
1910
|
+
"class": "ngs-date-range-input-end",
|
|
1911
|
+
"(input)": "_onInput($any($event).target.value)",
|
|
1912
|
+
"(focus)": "_onFocus()",
|
|
1913
|
+
"(blur)": "_onBlur($event)",
|
|
1914
|
+
"[disabled]": "_rangeInput.disabled()",
|
|
1915
|
+
"[readOnly]": "_rangeInput.readonly()",
|
|
1916
|
+
"[required]": "_rangeInput.required()"
|
|
1917
|
+
}
|
|
1918
|
+
}]
|
|
1919
|
+
}]
|
|
1920
|
+
});
|
|
1921
|
+
var DateRangeInput = class DateRangeInput {
|
|
1922
|
+
_elementRef = inject(ElementRef);
|
|
1923
|
+
_formField = inject(FormField, { optional: true });
|
|
1924
|
+
rangePicker = input.required(...ngDevMode ? [{ debugName: "rangePicker" }] : /* istanbul ignore next */ []);
|
|
1925
|
+
separator = input("–", ...ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []);
|
|
1926
|
+
value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1927
|
+
range = input(...ngDevMode ? [void 0, { debugName: "range" }] : /* istanbul ignore next */ []);
|
|
1928
|
+
rangeChange = output();
|
|
1929
|
+
touch = output();
|
|
1930
|
+
ngControl = inject(NgControl, {
|
|
1931
|
+
optional: true,
|
|
1932
|
+
self: true
|
|
1933
|
+
});
|
|
1934
|
+
_startInput = contentChild(StartDate, ...ngDevMode ? [{ debugName: "_startInput" }] : /* istanbul ignore next */ []);
|
|
1935
|
+
_endInput = contentChild(EndDate, ...ngDevMode ? [{ debugName: "_endInput" }] : /* istanbul ignore next */ []);
|
|
1936
|
+
_value = null;
|
|
1937
|
+
_focused = signal(false, ...ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []);
|
|
1938
|
+
get focused() {
|
|
1939
|
+
return this._focused();
|
|
1940
|
+
}
|
|
1941
|
+
_empty = computed(() => {
|
|
1942
|
+
this._inputStateChanges();
|
|
1943
|
+
const startInput = this._startInput();
|
|
1944
|
+
const endInput = this._endInput();
|
|
1945
|
+
return (!this._value || !this._value.start && !this._value.end) && (!startInput || startInput.isEmpty()) && (!endInput || endInput.isEmpty());
|
|
1946
|
+
}, ...ngDevMode ? [{ debugName: "_empty" }] : /* istanbul ignore next */ []);
|
|
1947
|
+
get empty() {
|
|
1948
|
+
return this._empty();
|
|
1949
|
+
}
|
|
1950
|
+
_shouldLabelFloat = computed(() => {
|
|
1951
|
+
return this.focused || !this.empty;
|
|
1952
|
+
}, ...ngDevMode ? [{ debugName: "_shouldLabelFloat" }] : /* istanbul ignore next */ []);
|
|
1953
|
+
get shouldLabelFloat() {
|
|
1954
|
+
return this._shouldLabelFloat();
|
|
1955
|
+
}
|
|
1956
|
+
stateChanges = new Subject();
|
|
1957
|
+
_inputStateChanges = signal(0, ...ngDevMode ? [{ debugName: "_inputStateChanges" }] : /* istanbul ignore next */ []);
|
|
1958
|
+
id = `ngs-date-range-input-${nextUniqueId++}`;
|
|
1959
|
+
placeholder = "";
|
|
1960
|
+
required = input(false, {
|
|
1961
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
1962
|
+
transform: booleanAttribute
|
|
1963
|
+
});
|
|
1964
|
+
disabled = input(false, {
|
|
1965
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
1966
|
+
transform: booleanAttribute
|
|
1967
|
+
});
|
|
1968
|
+
readonly = input(false, {
|
|
1969
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
1970
|
+
transform: booleanAttribute
|
|
1971
|
+
});
|
|
1972
|
+
invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
1973
|
+
touched = input(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
1974
|
+
get errorState() {
|
|
1975
|
+
return this.invalid() && this.touched();
|
|
1976
|
+
}
|
|
1977
|
+
constructor() {
|
|
1978
|
+
let previousValue;
|
|
1979
|
+
let previousRange;
|
|
1980
|
+
let previousStart;
|
|
1981
|
+
let previousEnd;
|
|
1982
|
+
effect(() => {
|
|
1983
|
+
const value = this.value();
|
|
1984
|
+
const range = this.range();
|
|
1985
|
+
const start = this._startInput();
|
|
1986
|
+
const end = this._endInput();
|
|
1987
|
+
untracked(() => {
|
|
1988
|
+
let next = this._value;
|
|
1989
|
+
if (value !== previousValue) next = previousValue === void 0 ? value ?? range ?? null : value;
|
|
1990
|
+
else if (range !== previousRange) next = range ?? value;
|
|
1991
|
+
previousValue = value;
|
|
1992
|
+
previousRange = range;
|
|
1993
|
+
const inputsChanged = start !== previousStart || end !== previousEnd;
|
|
1994
|
+
previousStart = start;
|
|
1995
|
+
previousEnd = end;
|
|
1996
|
+
if (next === this._value && !inputsChanged) return;
|
|
1997
|
+
this._value = next;
|
|
1998
|
+
start?._formatValue(next?.start ?? null);
|
|
1999
|
+
end?._formatValue(next?.end ?? null);
|
|
2000
|
+
this.rangePicker()._selectedRange.set(next ?? new DateRange(null, null));
|
|
2001
|
+
});
|
|
2002
|
+
});
|
|
2003
|
+
effect(() => {
|
|
2004
|
+
const picker = this.rangePicker();
|
|
2005
|
+
untracked(() => {
|
|
2006
|
+
if (picker) picker._registerInput(this);
|
|
2007
|
+
});
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
ngOnDestroy() {
|
|
2011
|
+
this.stateChanges.complete();
|
|
2012
|
+
}
|
|
2013
|
+
_startUpdated(date) {
|
|
2014
|
+
this._value = new DateRange(date, this._value?.end || null);
|
|
2015
|
+
this.value.set(this._value);
|
|
2016
|
+
this.rangeChange.emit(this._value);
|
|
2017
|
+
this.rangePicker()._selectedRange.set(this._value);
|
|
2018
|
+
this.stateChanges.next();
|
|
2019
|
+
}
|
|
2020
|
+
_endUpdated(date) {
|
|
2021
|
+
this._value = new DateRange(this._value?.start || null, date);
|
|
2022
|
+
this.value.set(this._value);
|
|
2023
|
+
this.rangeChange.emit(this._value);
|
|
2024
|
+
this.rangePicker()._selectedRange.set(this._value);
|
|
2025
|
+
this.stateChanges.next();
|
|
2026
|
+
}
|
|
2027
|
+
_rangeUpdated(range) {
|
|
2028
|
+
if (this.disabled() || this.readonly()) return;
|
|
2029
|
+
const prevStart = this._value?.start;
|
|
2030
|
+
this._value = range;
|
|
2031
|
+
this.value.set(range);
|
|
2032
|
+
this.rangeChange.emit(range);
|
|
2033
|
+
this._startInput()?._formatValue(range.start);
|
|
2034
|
+
this._endInput()?._formatValue(range.end);
|
|
2035
|
+
this.stateChanges.next();
|
|
2036
|
+
if (range.start && !range.end && range.start !== prevStart) this._endInput()?.focus();
|
|
2037
|
+
}
|
|
2038
|
+
_handleFocus() {
|
|
2039
|
+
if (!this._focused()) {
|
|
2040
|
+
this._focused.set(true);
|
|
2041
|
+
this.stateChanges.next();
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
_handleBlur(event) {
|
|
2045
|
+
if (!this._elementRef.nativeElement.contains(event.relatedTarget)) {
|
|
2046
|
+
this._focused.set(false);
|
|
2047
|
+
this.touch.emit();
|
|
2048
|
+
this.stateChanges.next();
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
_inputUpdated() {
|
|
2052
|
+
this._inputStateChanges.update((v) => v + 1);
|
|
2053
|
+
this.stateChanges.next();
|
|
2054
|
+
}
|
|
2055
|
+
getConnectedOverlayOrigin() {
|
|
2056
|
+
if (this._formField) return this._formField.container();
|
|
2057
|
+
return this._elementRef;
|
|
2058
|
+
}
|
|
2059
|
+
focus() {
|
|
2060
|
+
const startInput = this._startInput();
|
|
2061
|
+
if (startInput && !this.focused && !this.disabled()) startInput.focus();
|
|
2062
|
+
}
|
|
2063
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2064
|
+
minVersion: "12.0.0",
|
|
2065
|
+
version: "22.3.0",
|
|
2066
|
+
ngImport: i0,
|
|
2067
|
+
type: DateRangeInput,
|
|
2068
|
+
deps: [],
|
|
2069
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2070
|
+
});
|
|
2071
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2072
|
+
minVersion: "17.2.0",
|
|
2073
|
+
version: "22.3.0",
|
|
2074
|
+
type: DateRangeInput,
|
|
2075
|
+
isStandalone: true,
|
|
2076
|
+
selector: "ngs-date-range-input",
|
|
2077
|
+
inputs: {
|
|
2078
|
+
rangePicker: {
|
|
2079
|
+
classPropertyName: "rangePicker",
|
|
2080
|
+
publicName: "rangePicker",
|
|
2081
|
+
isSignal: true,
|
|
2082
|
+
isRequired: true,
|
|
2083
|
+
transformFunction: null
|
|
2084
|
+
},
|
|
2085
|
+
separator: {
|
|
2086
|
+
classPropertyName: "separator",
|
|
2087
|
+
publicName: "separator",
|
|
2088
|
+
isSignal: true,
|
|
2089
|
+
isRequired: false,
|
|
2090
|
+
transformFunction: null
|
|
2091
|
+
},
|
|
2092
|
+
value: {
|
|
2093
|
+
classPropertyName: "value",
|
|
2094
|
+
publicName: "value",
|
|
2095
|
+
isSignal: true,
|
|
2096
|
+
isRequired: false,
|
|
2097
|
+
transformFunction: null
|
|
2098
|
+
},
|
|
2099
|
+
range: {
|
|
2100
|
+
classPropertyName: "range",
|
|
2101
|
+
publicName: "range",
|
|
2102
|
+
isSignal: true,
|
|
2103
|
+
isRequired: false,
|
|
2104
|
+
transformFunction: null
|
|
2105
|
+
},
|
|
2106
|
+
required: {
|
|
2107
|
+
classPropertyName: "required",
|
|
2108
|
+
publicName: "required",
|
|
2109
|
+
isSignal: true,
|
|
2110
|
+
isRequired: false,
|
|
2111
|
+
transformFunction: null
|
|
2112
|
+
},
|
|
2113
|
+
disabled: {
|
|
2114
|
+
classPropertyName: "disabled",
|
|
2115
|
+
publicName: "disabled",
|
|
2116
|
+
isSignal: true,
|
|
2117
|
+
isRequired: false,
|
|
2118
|
+
transformFunction: null
|
|
2119
|
+
},
|
|
2120
|
+
readonly: {
|
|
2121
|
+
classPropertyName: "readonly",
|
|
2122
|
+
publicName: "readonly",
|
|
2123
|
+
isSignal: true,
|
|
2124
|
+
isRequired: false,
|
|
2125
|
+
transformFunction: null
|
|
2126
|
+
},
|
|
2127
|
+
invalid: {
|
|
2128
|
+
classPropertyName: "invalid",
|
|
2129
|
+
publicName: "invalid",
|
|
2130
|
+
isSignal: true,
|
|
2131
|
+
isRequired: false,
|
|
2132
|
+
transformFunction: null
|
|
2133
|
+
},
|
|
2134
|
+
touched: {
|
|
2135
|
+
classPropertyName: "touched",
|
|
2136
|
+
publicName: "touched",
|
|
2137
|
+
isSignal: true,
|
|
2138
|
+
isRequired: false,
|
|
2139
|
+
transformFunction: null
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
outputs: {
|
|
2143
|
+
value: "valueChange",
|
|
2144
|
+
rangeChange: "rangeChange",
|
|
2145
|
+
touch: "touch"
|
|
2146
|
+
},
|
|
2147
|
+
host: {
|
|
2148
|
+
listeners: { "click": "focus()" },
|
|
2149
|
+
properties: {
|
|
2150
|
+
"attr.id": "id",
|
|
2151
|
+
"class.ngs-date-range-input-floating": "shouldLabelFloat"
|
|
2152
|
+
},
|
|
2153
|
+
classAttribute: "ngs-date-range-input"
|
|
2154
|
+
},
|
|
2155
|
+
providers: [{
|
|
2156
|
+
provide: FormFieldControl,
|
|
2157
|
+
useExisting: forwardRef(() => DateRangeInput)
|
|
2158
|
+
}],
|
|
2159
|
+
queries: [{
|
|
2160
|
+
propertyName: "_startInput",
|
|
2161
|
+
first: true,
|
|
2162
|
+
predicate: StartDate,
|
|
2163
|
+
descendants: true,
|
|
2164
|
+
isSignal: true
|
|
2165
|
+
}, {
|
|
2166
|
+
propertyName: "_endInput",
|
|
2167
|
+
first: true,
|
|
2168
|
+
predicate: EndDate,
|
|
2169
|
+
descendants: true,
|
|
2170
|
+
isSignal: true
|
|
2171
|
+
}],
|
|
2172
|
+
exportAs: ["ngsDateRangeInput"],
|
|
2173
|
+
ngImport: i0,
|
|
2174
|
+
template: "<div class=\"ngs-date-range-input-container\">\n <div class=\"ngs-date-range-input-start-wrapper\">\n <ng-content select=\"input[ngsStartDate]\"/>\n </div>\n <span class=\"ngs-date-range-input-separator\">{{ separator() }}</span>\n <div class=\"ngs-date-range-input-end-wrapper\">\n <ng-content select=\"input[ngsEndDate]\"/>\n </div>\n</div>\n",
|
|
2175
|
+
styles: [":host{display:flex;width:100%}:host.ngs-date-range-input-floating .ngs-date-range-input-container{opacity:1}:host:not(.ngs-date-range-input-floating) .ngs-date-range-input-container{opacity:0}:host .ngs-date-range-input-container{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);width:100%;transition:opacity .2s,visibility .2s}:host .ngs-date-range-input-separator{flex-shrink:0}:host ::ng-deep .ngs-date-range-input-start,:host ::ng-deep .ngs-date-range-input-end{background:transparent;border:none;outline:none;width:86px}:host ::ng-deep .ngs-date-range-input-start::placeholder,:host ::ng-deep .ngs-date-range-input-end::placeholder{color:var(--ngs-field-label-color)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
2176
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2177
|
+
});
|
|
2178
|
+
};
|
|
2179
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2180
|
+
minVersion: "12.0.0",
|
|
2181
|
+
version: "22.3.0",
|
|
2182
|
+
ngImport: i0,
|
|
2183
|
+
type: DateRangeInput,
|
|
2184
|
+
decorators: [{
|
|
2185
|
+
type: Component,
|
|
2186
|
+
args: [{
|
|
2187
|
+
selector: "ngs-date-range-input",
|
|
2188
|
+
exportAs: "ngsDateRangeInput",
|
|
2189
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2190
|
+
host: {
|
|
2191
|
+
"class": "ngs-date-range-input",
|
|
2192
|
+
"[attr.id]": "id",
|
|
2193
|
+
"[class.ngs-date-range-input-floating]": "shouldLabelFloat",
|
|
2194
|
+
"(click)": "focus()"
|
|
2195
|
+
},
|
|
2196
|
+
providers: [{
|
|
2197
|
+
provide: FormFieldControl,
|
|
2198
|
+
useExisting: forwardRef(() => DateRangeInput)
|
|
2199
|
+
}],
|
|
2200
|
+
template: "<div class=\"ngs-date-range-input-container\">\n <div class=\"ngs-date-range-input-start-wrapper\">\n <ng-content select=\"input[ngsStartDate]\"/>\n </div>\n <span class=\"ngs-date-range-input-separator\">{{ separator() }}</span>\n <div class=\"ngs-date-range-input-end-wrapper\">\n <ng-content select=\"input[ngsEndDate]\"/>\n </div>\n</div>\n",
|
|
2201
|
+
styles: [":host{display:flex;width:100%}:host.ngs-date-range-input-floating .ngs-date-range-input-container{opacity:1}:host:not(.ngs-date-range-input-floating) .ngs-date-range-input-container{opacity:0}:host .ngs-date-range-input-container{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);width:100%;transition:opacity .2s,visibility .2s}:host .ngs-date-range-input-separator{flex-shrink:0}:host ::ng-deep .ngs-date-range-input-start,:host ::ng-deep .ngs-date-range-input-end{background:transparent;border:none;outline:none;width:86px}:host ::ng-deep .ngs-date-range-input-start::placeholder,:host ::ng-deep .ngs-date-range-input-end::placeholder{color:var(--ngs-field-label-color)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
2202
|
+
}]
|
|
2203
|
+
}],
|
|
2204
|
+
ctorParameters: () => [],
|
|
2205
|
+
propDecorators: {
|
|
2206
|
+
rangePicker: [{
|
|
2207
|
+
type: i0.Input,
|
|
2208
|
+
args: [{
|
|
2209
|
+
isSignal: true,
|
|
2210
|
+
alias: "rangePicker",
|
|
2211
|
+
required: true
|
|
2212
|
+
}]
|
|
2213
|
+
}],
|
|
2214
|
+
separator: [{
|
|
2215
|
+
type: i0.Input,
|
|
2216
|
+
args: [{
|
|
2217
|
+
isSignal: true,
|
|
2218
|
+
alias: "separator",
|
|
2219
|
+
required: false
|
|
2220
|
+
}]
|
|
2221
|
+
}],
|
|
2222
|
+
value: [{
|
|
2223
|
+
type: i0.Input,
|
|
2224
|
+
args: [{
|
|
2225
|
+
isSignal: true,
|
|
2226
|
+
alias: "value",
|
|
2227
|
+
required: false
|
|
2228
|
+
}]
|
|
2229
|
+
}, {
|
|
2230
|
+
type: i0.Output,
|
|
2231
|
+
args: ["valueChange"]
|
|
2232
|
+
}],
|
|
2233
|
+
range: [{
|
|
2234
|
+
type: i0.Input,
|
|
2235
|
+
args: [{
|
|
2236
|
+
isSignal: true,
|
|
2237
|
+
alias: "range",
|
|
2238
|
+
required: false
|
|
2239
|
+
}]
|
|
2240
|
+
}],
|
|
2241
|
+
rangeChange: [{
|
|
2242
|
+
type: i0.Output,
|
|
2243
|
+
args: ["rangeChange"]
|
|
2244
|
+
}],
|
|
2245
|
+
touch: [{
|
|
2246
|
+
type: i0.Output,
|
|
2247
|
+
args: ["touch"]
|
|
2248
|
+
}],
|
|
2249
|
+
_startInput: [{
|
|
2250
|
+
type: i0.ContentChild,
|
|
2251
|
+
args: [i0.forwardRef(() => StartDate), { isSignal: true }]
|
|
2252
|
+
}],
|
|
2253
|
+
_endInput: [{
|
|
2254
|
+
type: i0.ContentChild,
|
|
2255
|
+
args: [i0.forwardRef(() => EndDate), { isSignal: true }]
|
|
2256
|
+
}],
|
|
2257
|
+
required: [{
|
|
2258
|
+
type: i0.Input,
|
|
2259
|
+
args: [{
|
|
2260
|
+
isSignal: true,
|
|
2261
|
+
alias: "required",
|
|
2262
|
+
required: false
|
|
2263
|
+
}]
|
|
2264
|
+
}],
|
|
2265
|
+
disabled: [{
|
|
2266
|
+
type: i0.Input,
|
|
2267
|
+
args: [{
|
|
2268
|
+
isSignal: true,
|
|
2269
|
+
alias: "disabled",
|
|
2270
|
+
required: false
|
|
2271
|
+
}]
|
|
2272
|
+
}],
|
|
2273
|
+
readonly: [{
|
|
2274
|
+
type: i0.Input,
|
|
2275
|
+
args: [{
|
|
2276
|
+
isSignal: true,
|
|
2277
|
+
alias: "readonly",
|
|
2278
|
+
required: false
|
|
2279
|
+
}]
|
|
2280
|
+
}],
|
|
2281
|
+
invalid: [{
|
|
2282
|
+
type: i0.Input,
|
|
2283
|
+
args: [{
|
|
2284
|
+
isSignal: true,
|
|
2285
|
+
alias: "invalid",
|
|
2286
|
+
required: false
|
|
2287
|
+
}]
|
|
2288
|
+
}],
|
|
2289
|
+
touched: [{
|
|
2290
|
+
type: i0.Input,
|
|
2291
|
+
args: [{
|
|
2292
|
+
isSignal: true,
|
|
2293
|
+
alias: "touched",
|
|
2294
|
+
required: false
|
|
2295
|
+
}]
|
|
2296
|
+
}]
|
|
2297
|
+
}
|
|
2298
|
+
});
|
|
1092
2299
|
let nextUniqueId = 0;
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
2300
|
+
var DatepickerToggleIcon = class DatepickerToggleIcon {
|
|
2301
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2302
|
+
minVersion: "12.0.0",
|
|
2303
|
+
version: "22.3.0",
|
|
2304
|
+
ngImport: i0,
|
|
2305
|
+
type: DatepickerToggleIcon,
|
|
2306
|
+
deps: [],
|
|
2307
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2308
|
+
});
|
|
2309
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2310
|
+
minVersion: "14.0.0",
|
|
2311
|
+
version: "22.3.0",
|
|
2312
|
+
type: DatepickerToggleIcon,
|
|
2313
|
+
isStandalone: true,
|
|
2314
|
+
selector: "[ngsDatepickerToggleIcon]",
|
|
2315
|
+
ngImport: i0
|
|
2316
|
+
});
|
|
2317
|
+
};
|
|
2318
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2319
|
+
minVersion: "12.0.0",
|
|
2320
|
+
version: "22.3.0",
|
|
2321
|
+
ngImport: i0,
|
|
2322
|
+
type: DatepickerToggleIcon,
|
|
2323
|
+
decorators: [{
|
|
2324
|
+
type: Directive,
|
|
2325
|
+
args: [{ selector: "[ngsDatepickerToggleIcon]" }]
|
|
2326
|
+
}]
|
|
2327
|
+
});
|
|
2328
|
+
var DatepickerToggle = class DatepickerToggle {
|
|
2329
|
+
_intl = inject(DatepickerIntl);
|
|
2330
|
+
_formField = inject(FORM_FIELD, { optional: true });
|
|
2331
|
+
for = input(null, ...ngDevMode ? [{ debugName: "for" }] : /* istanbul ignore next */ []);
|
|
2332
|
+
customIcon = contentChild(DatepickerToggleIcon, ...ngDevMode ? [{ debugName: "customIcon" }] : /* istanbul ignore next */ []);
|
|
2333
|
+
_open(event) {
|
|
2334
|
+
const datepicker = this.for();
|
|
2335
|
+
if (datepicker) {
|
|
2336
|
+
datepicker.open();
|
|
2337
|
+
event.stopPropagation();
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2341
|
+
minVersion: "12.0.0",
|
|
2342
|
+
version: "22.3.0",
|
|
2343
|
+
ngImport: i0,
|
|
2344
|
+
type: DatepickerToggle,
|
|
2345
|
+
deps: [],
|
|
2346
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2347
|
+
});
|
|
2348
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2349
|
+
minVersion: "17.0.0",
|
|
2350
|
+
version: "22.3.0",
|
|
2351
|
+
type: DatepickerToggle,
|
|
2352
|
+
isStandalone: true,
|
|
2353
|
+
selector: "ngs-datepicker-toggle",
|
|
2354
|
+
inputs: { for: {
|
|
2355
|
+
classPropertyName: "for",
|
|
2356
|
+
publicName: "for",
|
|
2357
|
+
isSignal: true,
|
|
2358
|
+
isRequired: false,
|
|
2359
|
+
transformFunction: null
|
|
2360
|
+
} },
|
|
2361
|
+
host: { classAttribute: "ngs-datepicker-toggle" },
|
|
2362
|
+
queries: [{
|
|
2363
|
+
propertyName: "customIcon",
|
|
2364
|
+
first: true,
|
|
2365
|
+
predicate: DatepickerToggleIcon,
|
|
2366
|
+
descendants: true,
|
|
2367
|
+
isSignal: true
|
|
2368
|
+
}],
|
|
2369
|
+
exportAs: ["ngsDatepickerToggle"],
|
|
2370
|
+
ngImport: i0,
|
|
2371
|
+
template: "<button ngsIconButton type=\"button\" (click)=\"_open($event)\" class=\"ngs-datepicker-toggle-button\">\n @if (customIcon()) {\n <ng-content select=\"[ngsDatepickerToggleIcon]\"/>\n } @else {\n <svg viewBox=\"0 0 24 24\" class=\"size-6\">\n <path fill=\"currentColor\"\n d=\"M17.75 3A3.25 3.25 0 0 1 21 6.25v11.5A3.25 3.25 0 0 1 17.75 21H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3zm1.75 5.5h-15v9.25c0 .966.784 1.75 1.75 1.75h11.5a1.75 1.75 0 0 0 1.75-1.75zm-11.75 6a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m4.25 0a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m-4.25-4a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m4.25 0a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m4.25 0a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m1.5-6H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75\"></path>\n </svg>\n }\n</button>\n",
|
|
2372
|
+
styles: ["/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
2373
|
+
dependencies: [{
|
|
2374
|
+
kind: "component",
|
|
2375
|
+
type: Button,
|
|
2376
|
+
selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ",
|
|
2377
|
+
inputs: [
|
|
2378
|
+
"ngsButton",
|
|
2379
|
+
"ngsIconButton",
|
|
2380
|
+
"loading",
|
|
2381
|
+
"disabled",
|
|
2382
|
+
"disabledInteractive",
|
|
2383
|
+
"disableRipple",
|
|
2384
|
+
"reverse",
|
|
2385
|
+
"fullWidth",
|
|
2386
|
+
"hideTextOnMobile"
|
|
2387
|
+
],
|
|
2388
|
+
exportAs: ["ngsButton"]
|
|
2389
|
+
}],
|
|
2390
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2391
|
+
});
|
|
2392
|
+
};
|
|
2393
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2394
|
+
minVersion: "12.0.0",
|
|
2395
|
+
version: "22.3.0",
|
|
2396
|
+
ngImport: i0,
|
|
2397
|
+
type: DatepickerToggle,
|
|
2398
|
+
decorators: [{
|
|
2399
|
+
type: Component,
|
|
2400
|
+
args: [{
|
|
2401
|
+
selector: "ngs-datepicker-toggle",
|
|
2402
|
+
exportAs: "ngsDatepickerToggle",
|
|
2403
|
+
imports: [Button],
|
|
2404
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2405
|
+
host: { "class": "ngs-datepicker-toggle" },
|
|
2406
|
+
template: "<button ngsIconButton type=\"button\" (click)=\"_open($event)\" class=\"ngs-datepicker-toggle-button\">\n @if (customIcon()) {\n <ng-content select=\"[ngsDatepickerToggleIcon]\"/>\n } @else {\n <svg viewBox=\"0 0 24 24\" class=\"size-6\">\n <path fill=\"currentColor\"\n d=\"M17.75 3A3.25 3.25 0 0 1 21 6.25v11.5A3.25 3.25 0 0 1 17.75 21H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3zm1.75 5.5h-15v9.25c0 .966.784 1.75 1.75 1.75h11.5a1.75 1.75 0 0 0 1.75-1.75zm-11.75 6a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m4.25 0a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m-4.25-4a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m4.25 0a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m4.25 0a1.25 1.25 0 1 1 0 2.5a1.25 1.25 0 0 1 0-2.5m1.5-6H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75\"></path>\n </svg>\n }\n</button>\n",
|
|
2407
|
+
styles: ["/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
2408
|
+
}]
|
|
2409
|
+
}],
|
|
2410
|
+
propDecorators: {
|
|
2411
|
+
for: [{
|
|
2412
|
+
type: i0.Input,
|
|
2413
|
+
args: [{
|
|
2414
|
+
isSignal: true,
|
|
2415
|
+
alias: "for",
|
|
2416
|
+
required: false
|
|
2417
|
+
}]
|
|
2418
|
+
}],
|
|
2419
|
+
customIcon: [{
|
|
2420
|
+
type: i0.ContentChild,
|
|
2421
|
+
args: [i0.forwardRef(() => DatepickerToggleIcon), { isSignal: true }]
|
|
2422
|
+
}]
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
var NativeDateAdapter = class NativeDateAdapter extends DateAdapter {
|
|
2426
|
+
getYear(date) {
|
|
2427
|
+
return date.getFullYear();
|
|
2428
|
+
}
|
|
2429
|
+
getMonth(date) {
|
|
2430
|
+
return date.getMonth();
|
|
2431
|
+
}
|
|
2432
|
+
getDate(date) {
|
|
2433
|
+
return date.getDate();
|
|
2434
|
+
}
|
|
2435
|
+
getDayOfWeek(date) {
|
|
2436
|
+
return date.getDay();
|
|
2437
|
+
}
|
|
2438
|
+
getMonthNames(style) {
|
|
2439
|
+
const dtf = new Intl.DateTimeFormat(this.locale, {
|
|
2440
|
+
month: style,
|
|
2441
|
+
timeZone: "UTC"
|
|
2442
|
+
});
|
|
2443
|
+
return Array.from({ length: 12 }, (_, i) => this._stripDirectionMarkers(dtf.format(new Date(Date.UTC(2017, i, 1)))));
|
|
2444
|
+
}
|
|
2445
|
+
getDateNames() {
|
|
2446
|
+
const dtf = new Intl.DateTimeFormat(this.locale, {
|
|
2447
|
+
day: "numeric",
|
|
2448
|
+
timeZone: "UTC"
|
|
2449
|
+
});
|
|
2450
|
+
return Array.from({ length: 31 }, (_, i) => this._stripDirectionMarkers(dtf.format(new Date(Date.UTC(2017, 0, i + 1)))));
|
|
2451
|
+
}
|
|
2452
|
+
getDayOfWeekNames(style) {
|
|
2453
|
+
const dtf = new Intl.DateTimeFormat(this.locale, {
|
|
2454
|
+
weekday: style,
|
|
2455
|
+
timeZone: "UTC"
|
|
2456
|
+
});
|
|
2457
|
+
return Array.from({ length: 7 }, (_, i) => this._stripDirectionMarkers(dtf.format(new Date(Date.UTC(2017, 0, i + 8)))));
|
|
2458
|
+
}
|
|
2459
|
+
getYearName(date) {
|
|
2460
|
+
const dtf = new Intl.DateTimeFormat(this.locale, {
|
|
2461
|
+
year: "numeric",
|
|
2462
|
+
timeZone: "UTC"
|
|
2463
|
+
});
|
|
2464
|
+
return this._stripDirectionMarkers(dtf.format(new Date(Date.UTC(date.getFullYear(), 0, 1))));
|
|
2465
|
+
}
|
|
2466
|
+
getFirstDayOfWeek() {
|
|
2467
|
+
return 0;
|
|
2468
|
+
}
|
|
2469
|
+
getNumDaysInMonth(date) {
|
|
2470
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0).getDate();
|
|
2471
|
+
}
|
|
2472
|
+
clone(date) {
|
|
2473
|
+
return new Date(date.getTime());
|
|
2474
|
+
}
|
|
2475
|
+
createDate(year, month, date) {
|
|
2476
|
+
if (month < 0 || month > 11) throw Error(`Invalid month index "${month}". Month index must be between 0 and 11.`);
|
|
2477
|
+
if (date < 1) throw Error(`Invalid date "${date}". Date must be greater than 0.`);
|
|
2478
|
+
const result = this._createDateWithOverflow(year, month, date);
|
|
2479
|
+
if (result.getMonth() !== month) throw Error(`Invalid date "${date}" for month with index "${month}".`);
|
|
2480
|
+
return result;
|
|
2481
|
+
}
|
|
2482
|
+
today() {
|
|
2483
|
+
return /* @__PURE__ */ new Date();
|
|
2484
|
+
}
|
|
2485
|
+
parse(value) {
|
|
2486
|
+
if (typeof value === "number") return new Date(value);
|
|
2487
|
+
if (value && typeof value === "string") {
|
|
2488
|
+
const parts = value.split("/");
|
|
2489
|
+
if (parts.length === 3) {
|
|
2490
|
+
const month = parseInt(parts[0], 10) - 1;
|
|
2491
|
+
const day = parseInt(parts[1], 10);
|
|
2492
|
+
const year = parseInt(parts[2], 10);
|
|
2493
|
+
if (!isNaN(month) && !isNaN(day) && !isNaN(year)) return this.createDate(year, month, day);
|
|
2494
|
+
}
|
|
2495
|
+
return new Date(Date.parse(value));
|
|
2496
|
+
}
|
|
2497
|
+
return value ? new Date(Date.parse(value)) : null;
|
|
2498
|
+
}
|
|
2499
|
+
format(date, displayFormat) {
|
|
2500
|
+
if (!this.isValid(date)) throw Error("NativeDateAdapter: Cannot format invalid date.");
|
|
2501
|
+
const dtf = new Intl.DateTimeFormat(this.locale, {
|
|
2502
|
+
...displayFormat,
|
|
2503
|
+
timeZone: "UTC"
|
|
2504
|
+
});
|
|
2505
|
+
return this._stripDirectionMarkers(dtf.format(new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))));
|
|
2506
|
+
}
|
|
2507
|
+
addCalendarYears(date, years) {
|
|
2508
|
+
return this.addCalendarMonths(date, years * 12);
|
|
2509
|
+
}
|
|
2510
|
+
addCalendarMonths(date, months) {
|
|
2511
|
+
let newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date));
|
|
2512
|
+
if (this.getMonth(newDate) !== (this.getMonth(date) + months) % 12) newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);
|
|
2513
|
+
return newDate;
|
|
2514
|
+
}
|
|
2515
|
+
addCalendarDays(date, days) {
|
|
2516
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days);
|
|
2517
|
+
}
|
|
2518
|
+
toIso8601(date) {
|
|
2519
|
+
return [
|
|
2520
|
+
date.getUTCFullYear(),
|
|
2521
|
+
this._2digit(date.getUTCMonth() + 1),
|
|
2522
|
+
this._2digit(date.getUTCDate())
|
|
2523
|
+
].join("-");
|
|
2524
|
+
}
|
|
2525
|
+
isDateInstance(obj) {
|
|
2526
|
+
return obj instanceof Date;
|
|
2527
|
+
}
|
|
2528
|
+
isValid(date) {
|
|
2529
|
+
return this.isDateInstance(date) && !isNaN(date.getTime());
|
|
2530
|
+
}
|
|
2531
|
+
invalid() {
|
|
2532
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
2533
|
+
}
|
|
2534
|
+
_2digit(n) {
|
|
2535
|
+
return ("00" + n).slice(-2);
|
|
2536
|
+
}
|
|
2537
|
+
_stripDirectionMarkers(str) {
|
|
2538
|
+
return str.replace(/[\u200e\u200f]/g, "");
|
|
2539
|
+
}
|
|
2540
|
+
_createDateWithOverflow(year, month, date) {
|
|
2541
|
+
const result = new Date(year, month, date);
|
|
2542
|
+
if (year >= 0 && year < 100) result.setFullYear(year);
|
|
2543
|
+
return result;
|
|
2544
|
+
}
|
|
2545
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2546
|
+
minVersion: "12.0.0",
|
|
2547
|
+
version: "22.3.0",
|
|
2548
|
+
ngImport: i0,
|
|
2549
|
+
type: NativeDateAdapter,
|
|
2550
|
+
deps: null,
|
|
2551
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
2552
|
+
});
|
|
2553
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
2554
|
+
minVersion: "12.0.0",
|
|
2555
|
+
version: "22.3.0",
|
|
2556
|
+
ngImport: i0,
|
|
2557
|
+
type: NativeDateAdapter
|
|
2558
|
+
});
|
|
2559
|
+
};
|
|
2560
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2561
|
+
minVersion: "12.0.0",
|
|
2562
|
+
version: "22.3.0",
|
|
2563
|
+
ngImport: i0,
|
|
2564
|
+
type: NativeDateAdapter,
|
|
2565
|
+
decorators: [{ type: Injectable }]
|
|
2566
|
+
});
|
|
1255
2567
|
const MAT_NATIVE_DATE_FORMATS = {
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
2568
|
+
parse: { dateInput: null },
|
|
2569
|
+
display: {
|
|
2570
|
+
dateInput: {
|
|
2571
|
+
month: "short",
|
|
2572
|
+
year: "numeric",
|
|
2573
|
+
day: "numeric"
|
|
2574
|
+
},
|
|
2575
|
+
monthYearLabel: {
|
|
2576
|
+
month: "short",
|
|
2577
|
+
year: "numeric"
|
|
2578
|
+
},
|
|
2579
|
+
dateA11yLabel: {
|
|
2580
|
+
month: "long",
|
|
2581
|
+
year: "numeric",
|
|
2582
|
+
day: "numeric"
|
|
2583
|
+
},
|
|
2584
|
+
monthYearA11yLabel: {
|
|
2585
|
+
month: "long",
|
|
2586
|
+
year: "numeric"
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
1265
2589
|
};
|
|
1266
2590
|
function provideNativeDateAdapter() {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
2591
|
+
return [{
|
|
2592
|
+
provide: DateAdapter,
|
|
2593
|
+
useClass: NativeDateAdapter
|
|
2594
|
+
}, {
|
|
2595
|
+
provide: MAT_DATE_FORMATS,
|
|
2596
|
+
useValue: MAT_NATIVE_DATE_FORMATS
|
|
2597
|
+
}];
|
|
1271
2598
|
}
|
|
1272
|
-
|
|
1273
|
-
/**
|
|
1274
|
-
* Generated bundle index. Do not edit.
|
|
1275
|
-
*/
|
|
1276
|
-
|
|
1277
2599
|
export { Calendar, DateAdapter, DateRange, DateRangeInput, DateRangePicker, Datepicker, DatepickerActions, DatepickerApply, DatepickerCancel, DatepickerInput, DatepickerIntl, DatepickerToggle, DatepickerToggleIcon, EndDate, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_NATIVE_DATE_FORMATS, MonthView, MultiYearView, NativeDateAdapter, StartDate, YearView, provideNativeDateAdapter };
|
|
1278
|
-
|
|
2600
|
+
|
|
2601
|
+
//# sourceMappingURL=ngstarter-ui-components-datepicker.mjs.map
|