@mintplayer/ng-bootstrap 21.47.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/package.json +4 -0
- package/accordion/package.json +4 -0
- package/alert/package.json +4 -0
- package/badge/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button-group/package.json +4 -0
- package/button-type/package.json +4 -0
- package/calendar/package.json +4 -0
- package/calendar-month/package.json +4 -0
- package/card/package.json +4 -0
- package/carousel/package.json +4 -0
- package/checkbox/package.json +4 -0
- package/close/package.json +4 -0
- package/code-snippet/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/container/package.json +4 -0
- package/context-menu/package.json +4 -0
- package/copy/package.json +4 -0
- package/datatable/package.json +4 -0
- package/datepicker/package.json +4 -0
- package/datetime-picker/package.json +4 -0
- package/dock/package.json +4 -0
- package/dropdown/package.json +4 -0
- package/dropdown-divider/package.json +4 -0
- package/dropdown-menu/package.json +4 -0
- package/enhanced-paste/package.json +4 -0
- package/enum/package.json +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +470 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +105 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +53 -0
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +26 -0
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +36 -0
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +22 -0
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +37 -0
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +136 -0
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +71 -0
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +338 -0
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +290 -0
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +240 -0
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -0
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +45 -0
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +703 -0
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +18 -0
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +88 -0
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +47 -0
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +659 -0
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +153 -0
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +166 -0
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +135 -0
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +23 -0
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +206 -0
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +338 -0
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +62 -0
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +38 -0
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +242 -0
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +144 -0
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +25 -0
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs +34 -0
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +42 -0
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +61 -0
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +133 -0
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-id.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-id.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +32 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs +23 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs +23 -0
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +18 -0
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs +185 -0
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs +47 -0
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs +28 -0
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +34 -0
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs +118 -0
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +22 -0
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +254 -0
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +174 -0
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +33 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +751 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs +234 -0
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +31 -0
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +386 -0
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs +36 -0
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +264 -0
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +61 -0
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +29 -0
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +66 -0
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +33 -0
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +256 -0
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +272 -0
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +81 -0
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +278 -0
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +189 -0
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +79 -0
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +84 -0
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +60 -0
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +408 -0
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +1028 -0
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +248 -0
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +186 -0
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +215 -0
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +90 -0
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +81 -0
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs +30 -0
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +30 -0
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs +25 -0
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +46 -0
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +142 -0
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +46 -0
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +124 -0
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +215 -0
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +233 -0
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +132 -0
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +168 -0
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +178 -0
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +324 -0
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +189 -0
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs +28 -0
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +121 -0
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs +24 -0
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +102 -0
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs +48 -0
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs +34 -0
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs.map +1 -0
- package/file-manager/package.json +4 -0
- package/file-upload/package.json +4 -0
- package/floating-labels/package.json +4 -0
- package/font-color/package.json +4 -0
- package/for/package.json +4 -0
- package/form/package.json +4 -0
- package/grid/package.json +4 -0
- package/has-id/package.json +4 -0
- package/has-overlay/package.json +4 -0
- package/has-property/package.json +4 -0
- package/in-list/package.json +4 -0
- package/input-group/package.json +4 -0
- package/instance-of/package.json +4 -0
- package/let/package.json +4 -0
- package/linify/package.json +4 -0
- package/list-group/package.json +4 -0
- package/markdown/package.json +4 -0
- package/marquee/package.json +4 -0
- package/modal/package.json +4 -0
- package/multi-range/package.json +4 -0
- package/navbar/package.json +4 -0
- package/navbar-toggler/package.json +4 -0
- package/navigation-lock/package.json +4 -0
- package/no-noscript/package.json +4 -0
- package/offcanvas/package.json +4 -0
- package/ordinal-number/package.json +4 -0
- package/otp-input/package.json +4 -0
- package/package.json +383 -11
- package/pagination/package.json +4 -0
- package/parallax/package.json +4 -0
- package/placeholder/package.json +4 -0
- package/playlist-toggler/package.json +4 -0
- package/popover/package.json +4 -0
- package/priority-nav/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/query-builder/package.json +4 -0
- package/radio/package.json +4 -0
- package/range/package.json +4 -0
- package/rating/package.json +4 -0
- package/reduced-motion/package.json +4 -0
- package/resizable/package.json +4 -0
- package/ribbon/package.json +4 -0
- package/scheduler/package.json +4 -0
- package/scrollspy/package.json +4 -0
- package/select/package.json +4 -0
- package/shell/package.json +4 -0
- package/signature-pad/package.json +4 -0
- package/slugify/package.json +4 -0
- package/spinner/package.json +4 -0
- package/split-string/package.json +4 -0
- package/sticky-footer/package.json +4 -0
- package/tab-control/package.json +4 -0
- package/table/package.json +4 -0
- package/theming/package.json +4 -0
- package/tile-manager/package.json +4 -0
- package/timeline/package.json +4 -0
- package/timepicker/package.json +4 -0
- package/toast/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/tree-select/package.json +4 -0
- package/treeview/package.json +4 -0
- package/trust-html/package.json +4 -0
- package/typeahead/package.json +4 -0
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +39 -0
- package/types/mintplayer-ng-bootstrap-alert.d.ts +22 -0
- package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -0
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +9 -0
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +12 -0
- package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +54 -0
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +23 -0
- package/types/mintplayer-ng-bootstrap-card.d.ts +124 -0
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +121 -0
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +94 -0
- package/types/mintplayer-ng-bootstrap-close.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +27 -0
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +234 -0
- package/types/mintplayer-ng-bootstrap-container.d.ts +8 -0
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +21 -0
- package/types/mintplayer-ng-bootstrap-copy.d.ts +12 -0
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +234 -0
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +41 -0
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +55 -0
- package/types/mintplayer-ng-bootstrap-dock.d.ts +45 -0
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +8 -0
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +66 -0
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +102 -0
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +20 -0
- package/types/mintplayer-ng-bootstrap-enum.d.ts +17 -0
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +97 -0
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +51 -0
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +9 -0
- package/types/mintplayer-ng-bootstrap-font-color.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-for.d.ts +13 -0
- package/types/mintplayer-ng-bootstrap-form.d.ts +24 -0
- package/types/mintplayer-ng-bootstrap-grid.d.ts +50 -0
- package/types/mintplayer-ng-bootstrap-has-id.d.ts +5 -0
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +22 -0
- package/types/mintplayer-ng-bootstrap-has-property.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-in-list.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +8 -0
- package/types/mintplayer-ng-bootstrap-instance-of.d.ts +74 -0
- package/types/mintplayer-ng-bootstrap-let.d.ts +44 -0
- package/types/mintplayer-ng-bootstrap-linify.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-markdown.d.ts +33 -0
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +9 -0
- package/types/mintplayer-ng-bootstrap-modal.d.ts +83 -0
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +43 -0
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +13 -0
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +238 -0
- package/types/mintplayer-ng-bootstrap-navigation-lock.d.ts +128 -0
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +106 -0
- package/types/mintplayer-ng-bootstrap-ordinal-number.d.ts +12 -0
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +50 -0
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +34 -0
- package/types/mintplayer-ng-bootstrap-parallax.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +23 -0
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +13 -0
- package/types/mintplayer-ng-bootstrap-popover.d.ts +67 -0
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +27 -0
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +113 -0
- package/types/mintplayer-ng-bootstrap-radio.d.ts +80 -0
- package/types/mintplayer-ng-bootstrap-range.d.ts +28 -0
- package/types/mintplayer-ng-bootstrap-rating.d.ts +20 -0
- package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +89 -0
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +279 -0
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +171 -0
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +40 -0
- package/types/mintplayer-ng-bootstrap-select.d.ts +67 -0
- package/types/mintplayer-ng-bootstrap-shell.d.ts +54 -0
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-slugify.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-split-string.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +21 -0
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +50 -0
- package/types/mintplayer-ng-bootstrap-table.d.ts +25 -0
- package/types/mintplayer-ng-bootstrap-theming.d.ts +81 -0
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +58 -0
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +112 -0
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +39 -0
- package/types/mintplayer-ng-bootstrap-toast.d.ts +67 -0
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +29 -0
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +117 -0
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +60 -0
- package/types/mintplayer-ng-bootstrap-trust-html.d.ts +12 -0
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +34 -0
- package/types/mintplayer-ng-bootstrap-uc-first.d.ts +10 -0
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +28 -0
- package/types/mintplayer-ng-bootstrap-viewport.d.ts +16 -0
- package/types/mintplayer-ng-bootstrap-word-count.d.ts +10 -0
- package/uc-first/package.json +4 -0
- package/user-agent/package.json +4 -0
- package/viewport/package.json +4 -0
- package/word-count/package.json +4 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, TemplateRef, Directive, input, model, output, viewChild, contentChild, computed, effect, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { resolveSides } from '@mintplayer/web-components/timeline';
|
|
5
|
+
export { resolveSides } from '@mintplayer/web-components/timeline-core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Context for the per-item template directives. The `$implicit` is the item, so
|
|
9
|
+
* `*bsTimelineContent="let item"` binds the item; named context vars expose the
|
|
10
|
+
* resolved layout state.
|
|
11
|
+
*/
|
|
12
|
+
class BsTimelineItemContext {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.index = 0;
|
|
15
|
+
this.visualIndex = 0;
|
|
16
|
+
this.isFirst = false;
|
|
17
|
+
this.isLast = false;
|
|
18
|
+
this.orientation = 'vertical';
|
|
19
|
+
this.side = 'start';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** Context for the connector template (the segment trailing this item). */
|
|
23
|
+
class BsTimelineConnectorContext {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.index = 0;
|
|
26
|
+
this.orientation = 'vertical';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Custom bullet / marker template. */
|
|
30
|
+
class BsTimelineMarkerDirective {
|
|
31
|
+
constructor() {
|
|
32
|
+
this.templateRef = inject(TemplateRef);
|
|
33
|
+
}
|
|
34
|
+
static ngTemplateContextGuard(_d, ctx) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineMarkerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsTimelineMarkerDirective, isStandalone: true, selector: "[bsTimelineMarker]", ngImport: i0 }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineMarkerDirective, decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{ selector: '[bsTimelineMarker]' }]
|
|
43
|
+
}] });
|
|
44
|
+
/** Custom title template. */
|
|
45
|
+
class BsTimelineTitleDirective {
|
|
46
|
+
constructor() {
|
|
47
|
+
this.templateRef = inject(TemplateRef);
|
|
48
|
+
}
|
|
49
|
+
static ngTemplateContextGuard(_d, ctx) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
53
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsTimelineTitleDirective, isStandalone: true, selector: "[bsTimelineTitle]", ngImport: i0 }); }
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineTitleDirective, decorators: [{
|
|
56
|
+
type: Directive,
|
|
57
|
+
args: [{ selector: '[bsTimelineTitle]' }]
|
|
58
|
+
}] });
|
|
59
|
+
/** Custom timestamp template (rendered in the opposite region). */
|
|
60
|
+
class BsTimelineTimestampDirective {
|
|
61
|
+
constructor() {
|
|
62
|
+
this.templateRef = inject(TemplateRef);
|
|
63
|
+
}
|
|
64
|
+
static ngTemplateContextGuard(_d, ctx) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineTimestampDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
68
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsTimelineTimestampDirective, isStandalone: true, selector: "[bsTimelineTimestamp]", ngImport: i0 }); }
|
|
69
|
+
}
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineTimestampDirective, decorators: [{
|
|
71
|
+
type: Directive,
|
|
72
|
+
args: [{ selector: '[bsTimelineTimestamp]' }]
|
|
73
|
+
}] });
|
|
74
|
+
/** Custom content / body template. */
|
|
75
|
+
class BsTimelineContentDirective {
|
|
76
|
+
constructor() {
|
|
77
|
+
this.templateRef = inject(TemplateRef);
|
|
78
|
+
}
|
|
79
|
+
static ngTemplateContextGuard(_d, ctx) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsTimelineContentDirective, isStandalone: true, selector: "[bsTimelineContent]", ngImport: i0 }); }
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineContentDirective, decorators: [{
|
|
86
|
+
type: Directive,
|
|
87
|
+
args: [{ selector: '[bsTimelineContent]' }]
|
|
88
|
+
}] });
|
|
89
|
+
/** Custom opposite-region template. */
|
|
90
|
+
class BsTimelineOppositeDirective {
|
|
91
|
+
constructor() {
|
|
92
|
+
this.templateRef = inject(TemplateRef);
|
|
93
|
+
}
|
|
94
|
+
static ngTemplateContextGuard(_d, ctx) {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineOppositeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
98
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsTimelineOppositeDirective, isStandalone: true, selector: "[bsTimelineOpposite]", ngImport: i0 }); }
|
|
99
|
+
}
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineOppositeDirective, decorators: [{
|
|
101
|
+
type: Directive,
|
|
102
|
+
args: [{ selector: '[bsTimelineOpposite]' }]
|
|
103
|
+
}] });
|
|
104
|
+
/** Custom connector template. */
|
|
105
|
+
class BsTimelineConnectorDirective {
|
|
106
|
+
constructor() {
|
|
107
|
+
this.templateRef = inject(TemplateRef);
|
|
108
|
+
}
|
|
109
|
+
static ngTemplateContextGuard(_d, ctx) {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineConnectorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
113
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsTimelineConnectorDirective, isStandalone: true, selector: "[bsTimelineConnector]", ngImport: i0 }); }
|
|
114
|
+
}
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineConnectorDirective, decorators: [{
|
|
116
|
+
type: Directive,
|
|
117
|
+
args: [{ selector: '[bsTimelineConnector]' }]
|
|
118
|
+
}] });
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* `<bs-timeline>` — Angular wrapper around `<mp-timeline>`.
|
|
122
|
+
*
|
|
123
|
+
* Data-driven: bind `[items]` and supply any of the `*bsTimeline*` template
|
|
124
|
+
* directives; the wrapper lowers each into a `<mp-timeline-item>` child with the
|
|
125
|
+
* template projected into the matching slot. Declarative: drop
|
|
126
|
+
* `<mp-timeline-item>` elements directly inside `<bs-timeline>` (no items).
|
|
127
|
+
*/
|
|
128
|
+
class BsTimelineComponent {
|
|
129
|
+
constructor() {
|
|
130
|
+
this.items = input([], /* @ts-ignore */
|
|
131
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
132
|
+
this.orientation = input('vertical', /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
134
|
+
this.align = input('start', /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
136
|
+
this.reverse = input(false, /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "reverse" }] : /* istanbul ignore next */ []));
|
|
138
|
+
this.selectable = input('none', /* @ts-ignore */
|
|
139
|
+
...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
|
|
140
|
+
/** Two-way bound array of selected items (identity via `id`). */
|
|
141
|
+
this.selection = model([], /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
143
|
+
/** Emitted when a non-disabled item is activated. */
|
|
144
|
+
this.itemClick = output();
|
|
145
|
+
this.timelineRef = viewChild('timeline', /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "timelineRef" }] : /* istanbul ignore next */ []));
|
|
147
|
+
this.markerTpl = contentChild(BsTimelineMarkerDirective, /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "markerTpl" }] : /* istanbul ignore next */ []));
|
|
149
|
+
this.titleTpl = contentChild(BsTimelineTitleDirective, /* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [{ debugName: "titleTpl" }] : /* istanbul ignore next */ []));
|
|
151
|
+
this.timestampTpl = contentChild(BsTimelineTimestampDirective, /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "timestampTpl" }] : /* istanbul ignore next */ []));
|
|
153
|
+
this.contentTpl = contentChild(BsTimelineContentDirective, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []));
|
|
155
|
+
this.oppositeTpl = contentChild(BsTimelineOppositeDirective, /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "oppositeTpl" }] : /* istanbul ignore next */ []));
|
|
157
|
+
this.connectorTpl = contentChild(BsTimelineConnectorDirective, /* @ts-ignore */
|
|
158
|
+
...(ngDevMode ? [{ debugName: "connectorTpl" }] : /* istanbul ignore next */ []));
|
|
159
|
+
this.sides = computed(() => resolveSides(this.items().length, this.align(), this.reverse()), /* @ts-ignore */
|
|
160
|
+
...(ngDevMode ? [{ debugName: "sides" }] : /* istanbul ignore next */ []));
|
|
161
|
+
// Push the selection model into the WC (identity via id).
|
|
162
|
+
effect(() => {
|
|
163
|
+
const el = this.timelineRef()?.nativeElement;
|
|
164
|
+
if (!el)
|
|
165
|
+
return;
|
|
166
|
+
el.selectedIds = this.selection().map((item, i) => this.idForItem(item, i));
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
// ----- template helpers --------------------------------------------------
|
|
170
|
+
idForItem(item, index) {
|
|
171
|
+
return item.id ?? index;
|
|
172
|
+
}
|
|
173
|
+
idAttr(item) {
|
|
174
|
+
return item.id ?? null;
|
|
175
|
+
}
|
|
176
|
+
timeAttr(item) {
|
|
177
|
+
if (item.time == null)
|
|
178
|
+
return null;
|
|
179
|
+
return item.time instanceof Date ? item.time.toLocaleDateString() : item.time;
|
|
180
|
+
}
|
|
181
|
+
ctx(item, index) {
|
|
182
|
+
const len = this.items().length;
|
|
183
|
+
const visualIndex = this.reverse() ? len - 1 - index : index;
|
|
184
|
+
return {
|
|
185
|
+
$implicit: item,
|
|
186
|
+
index,
|
|
187
|
+
visualIndex,
|
|
188
|
+
isFirst: visualIndex === 0,
|
|
189
|
+
isLast: visualIndex === len - 1,
|
|
190
|
+
orientation: this.orientation(),
|
|
191
|
+
side: this.sides()[index] ?? 'start',
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
connectorCtx(item, index) {
|
|
195
|
+
return {
|
|
196
|
+
$implicit: item,
|
|
197
|
+
toItem: this.items()[index + 1],
|
|
198
|
+
index,
|
|
199
|
+
orientation: this.orientation(),
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// ----- WC event handlers -------------------------------------------------
|
|
203
|
+
onItemClick(event) {
|
|
204
|
+
this.itemClick.emit(event.detail);
|
|
205
|
+
}
|
|
206
|
+
onSelectionChange(event) {
|
|
207
|
+
const detail = event.detail;
|
|
208
|
+
const items = this.items();
|
|
209
|
+
if (items.length) {
|
|
210
|
+
const byId = new Map(items.map((it, i) => [this.idForItem(it, i), it]));
|
|
211
|
+
const el = this.timelineRef()?.nativeElement;
|
|
212
|
+
const ids = el?.selectedIds ?? detail.selected.map((m, i) => m.id ?? i);
|
|
213
|
+
this.selection.set(ids.map((id) => byId.get(id)).filter((it) => it !== undefined));
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
// Declarative mode: surface the attribute-derived models from the event.
|
|
217
|
+
this.selection.set(detail.selected);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
221
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: BsTimelineComponent, isStandalone: true, selector: "bs-timeline", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", itemClick: "itemClick" }, queries: [{ propertyName: "markerTpl", first: true, predicate: BsTimelineMarkerDirective, descendants: true, isSignal: true }, { propertyName: "titleTpl", first: true, predicate: BsTimelineTitleDirective, descendants: true, isSignal: true }, { propertyName: "timestampTpl", first: true, predicate: BsTimelineTimestampDirective, descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: BsTimelineContentDirective, descendants: true, isSignal: true }, { propertyName: "oppositeTpl", first: true, predicate: BsTimelineOppositeDirective, descendants: true, isSignal: true }, { propertyName: "connectorTpl", first: true, predicate: BsTimelineConnectorDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "timelineRef", first: true, predicate: ["timeline"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-timeline\n #timeline\n [attr.orientation]=\"orientation()\"\n [attr.align]=\"align()\"\n [attr.reverse]=\"reverse() ? '' : null\"\n [attr.selectable]=\"selectable()\"\n (item-click)=\"onItemClick($event)\"\n (selection-change)=\"onSelectionChange($event)\"\n>\n @if (items().length) {\n @for (item of items(); track item.id ?? $index; let i = $index) {\n <mp-timeline-item\n [attr.item-id]=\"idAttr(item)\"\n [attr.title]=\"item.title ?? null\"\n [attr.description]=\"item.description ?? null\"\n [attr.time]=\"timeAttr(item)\"\n [attr.icon]=\"item.icon ?? null\"\n [attr.color]=\"item.color ?? null\"\n [attr.item-class]=\"item.cssClass ?? null\"\n [attr.disabled]=\"item.disabled ? '' : null\"\n >\n @if (markerTpl()) {\n <span slot=\"marker\">\n <ng-container [ngTemplateOutlet]=\"markerTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (titleTpl()) {\n <span slot=\"title\">\n <ng-container [ngTemplateOutlet]=\"titleTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (timestampTpl()) {\n <span slot=\"opposite\">\n <ng-container [ngTemplateOutlet]=\"timestampTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (oppositeTpl()) {\n <span slot=\"opposite\">\n <ng-container [ngTemplateOutlet]=\"oppositeTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (contentTpl()) {\n <div slot=\"content\">\n <ng-container [ngTemplateOutlet]=\"contentTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </div>\n }\n @if (connectorTpl()) {\n <span slot=\"connector\">\n <ng-container [ngTemplateOutlet]=\"connectorTpl()!.templateRef\" [ngTemplateOutletContext]=\"connectorCtx(item, i)\"></ng-container>\n </span>\n }\n </mp-timeline-item>\n }\n } @else {\n <ng-content></ng-content>\n }\n</mp-timeline>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
222
|
+
}
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimelineComponent, decorators: [{
|
|
224
|
+
type: Component,
|
|
225
|
+
args: [{ selector: 'bs-timeline', imports: [NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-timeline\n #timeline\n [attr.orientation]=\"orientation()\"\n [attr.align]=\"align()\"\n [attr.reverse]=\"reverse() ? '' : null\"\n [attr.selectable]=\"selectable()\"\n (item-click)=\"onItemClick($event)\"\n (selection-change)=\"onSelectionChange($event)\"\n>\n @if (items().length) {\n @for (item of items(); track item.id ?? $index; let i = $index) {\n <mp-timeline-item\n [attr.item-id]=\"idAttr(item)\"\n [attr.title]=\"item.title ?? null\"\n [attr.description]=\"item.description ?? null\"\n [attr.time]=\"timeAttr(item)\"\n [attr.icon]=\"item.icon ?? null\"\n [attr.color]=\"item.color ?? null\"\n [attr.item-class]=\"item.cssClass ?? null\"\n [attr.disabled]=\"item.disabled ? '' : null\"\n >\n @if (markerTpl()) {\n <span slot=\"marker\">\n <ng-container [ngTemplateOutlet]=\"markerTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (titleTpl()) {\n <span slot=\"title\">\n <ng-container [ngTemplateOutlet]=\"titleTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (timestampTpl()) {\n <span slot=\"opposite\">\n <ng-container [ngTemplateOutlet]=\"timestampTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (oppositeTpl()) {\n <span slot=\"opposite\">\n <ng-container [ngTemplateOutlet]=\"oppositeTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (contentTpl()) {\n <div slot=\"content\">\n <ng-container [ngTemplateOutlet]=\"contentTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </div>\n }\n @if (connectorTpl()) {\n <span slot=\"connector\">\n <ng-container [ngTemplateOutlet]=\"connectorTpl()!.templateRef\" [ngTemplateOutletContext]=\"connectorCtx(item, i)\"></ng-container>\n </span>\n }\n </mp-timeline-item>\n }\n } @else {\n <ng-content></ng-content>\n }\n</mp-timeline>\n", styles: [":host{display:block}\n"] }]
|
|
226
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], reverse: [{ type: i0.Input, args: [{ isSignal: true, alias: "reverse", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], timelineRef: [{ type: i0.ViewChild, args: ['timeline', { isSignal: true }] }], markerTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTimelineMarkerDirective), { isSignal: true }] }], titleTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTimelineTitleDirective), { isSignal: true }] }], timestampTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTimelineTimestampDirective), { isSignal: true }] }], contentTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTimelineContentDirective), { isSignal: true }] }], oppositeTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTimelineOppositeDirective), { isSignal: true }] }], connectorTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTimelineConnectorDirective), { isSignal: true }] }] } });
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Generated bundle index. Do not edit.
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
export { BsTimelineComponent, BsTimelineConnectorContext, BsTimelineConnectorDirective, BsTimelineContentDirective, BsTimelineItemContext, BsTimelineMarkerDirective, BsTimelineOppositeDirective, BsTimelineTimestampDirective, BsTimelineTitleDirective };
|
|
233
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-timeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-timeline.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/timeline/src/directives/timeline-template.directives.ts","../../../../libs/mintplayer-ng-bootstrap/timeline/src/timeline/timeline.component.ts","../../../../libs/mintplayer-ng-bootstrap/timeline/src/timeline/timeline.component.html","../../../../libs/mintplayer-ng-bootstrap/timeline/mintplayer-ng-bootstrap-timeline.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { TimelineItem, TimelineOrientation, TimelineSide } from '@mintplayer/web-components/timeline-core';\n\n/**\n * Context for the per-item template directives. The `$implicit` is the item, so\n * `*bsTimelineContent=\"let item\"` binds the item; named context vars expose the\n * resolved layout state.\n */\nexport class BsTimelineItemContext {\n $implicit!: TimelineItem;\n index = 0;\n visualIndex = 0;\n isFirst = false;\n isLast = false;\n orientation: TimelineOrientation = 'vertical';\n side: TimelineSide = 'start';\n}\n\n/** Context for the connector template (the segment trailing this item). */\nexport class BsTimelineConnectorContext {\n /** The item the connector trails. */\n $implicit!: TimelineItem;\n /** The next item (undefined for the last). */\n toItem?: TimelineItem;\n index = 0;\n orientation: TimelineOrientation = 'vertical';\n}\n\n/** Custom bullet / marker template. */\n@Directive({ selector: '[bsTimelineMarker]' })\nexport class BsTimelineMarkerDirective {\n readonly templateRef = inject<TemplateRef<BsTimelineItemContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTimelineMarkerDirective,\n ctx: unknown,\n ): ctx is BsTimelineItemContext {\n return true;\n }\n}\n\n/** Custom title template. */\n@Directive({ selector: '[bsTimelineTitle]' })\nexport class BsTimelineTitleDirective {\n readonly templateRef = inject<TemplateRef<BsTimelineItemContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTimelineTitleDirective,\n ctx: unknown,\n ): ctx is BsTimelineItemContext {\n return true;\n }\n}\n\n/** Custom timestamp template (rendered in the opposite region). */\n@Directive({ selector: '[bsTimelineTimestamp]' })\nexport class BsTimelineTimestampDirective {\n readonly templateRef = inject<TemplateRef<BsTimelineItemContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTimelineTimestampDirective,\n ctx: unknown,\n ): ctx is BsTimelineItemContext {\n return true;\n }\n}\n\n/** Custom content / body template. */\n@Directive({ selector: '[bsTimelineContent]' })\nexport class BsTimelineContentDirective {\n readonly templateRef = inject<TemplateRef<BsTimelineItemContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTimelineContentDirective,\n ctx: unknown,\n ): ctx is BsTimelineItemContext {\n return true;\n }\n}\n\n/** Custom opposite-region template. */\n@Directive({ selector: '[bsTimelineOpposite]' })\nexport class BsTimelineOppositeDirective {\n readonly templateRef = inject<TemplateRef<BsTimelineItemContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTimelineOppositeDirective,\n ctx: unknown,\n ): ctx is BsTimelineItemContext {\n return true;\n }\n}\n\n/** Custom connector template. */\n@Directive({ selector: '[bsTimelineConnector]' })\nexport class BsTimelineConnectorDirective {\n readonly templateRef = inject<TemplateRef<BsTimelineConnectorContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTimelineConnectorDirective,\n ctx: unknown,\n ): ctx is BsTimelineConnectorContext {\n return true;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n resolveSides,\n type MpTimeline,\n} from '@mintplayer/web-components/timeline';\nimport type {\n TimelineAlign,\n TimelineItem,\n TimelineItemClickDetail,\n TimelineOrientation,\n TimelineSelectable,\n TimelineSelectionChangeDetail,\n} from '@mintplayer/web-components/timeline-core';\n\n// Side-effect import: registers <mp-timeline> + <mp-timeline-item>.\nimport '@mintplayer/web-components/timeline';\n\nimport {\n BsTimelineConnectorContext,\n BsTimelineConnectorDirective,\n BsTimelineContentDirective,\n BsTimelineItemContext,\n BsTimelineMarkerDirective,\n BsTimelineOppositeDirective,\n BsTimelineTimestampDirective,\n BsTimelineTitleDirective,\n} from '../directives/timeline-template.directives';\n\n/**\n * `<bs-timeline>` — Angular wrapper around `<mp-timeline>`.\n *\n * Data-driven: bind `[items]` and supply any of the `*bsTimeline*` template\n * directives; the wrapper lowers each into a `<mp-timeline-item>` child with the\n * template projected into the matching slot. Declarative: drop\n * `<mp-timeline-item>` elements directly inside `<bs-timeline>` (no items).\n */\n@Component({\n selector: 'bs-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n imports: [NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTimelineComponent {\n readonly items = input<TimelineItem[]>([]);\n readonly orientation = input<TimelineOrientation>('vertical');\n readonly align = input<TimelineAlign>('start');\n readonly reverse = input<boolean>(false);\n readonly selectable = input<TimelineSelectable>('none');\n\n /** Two-way bound array of selected items (identity via `id`). */\n readonly selection = model<TimelineItem[]>([]);\n\n /** Emitted when a non-disabled item is activated. */\n readonly itemClick = output<TimelineItemClickDetail>();\n\n readonly timelineRef = viewChild<ElementRef<MpTimeline>>('timeline');\n\n protected readonly markerTpl = contentChild(BsTimelineMarkerDirective);\n protected readonly titleTpl = contentChild(BsTimelineTitleDirective);\n protected readonly timestampTpl = contentChild(BsTimelineTimestampDirective);\n protected readonly contentTpl = contentChild(BsTimelineContentDirective);\n protected readonly oppositeTpl = contentChild(BsTimelineOppositeDirective);\n protected readonly connectorTpl = contentChild(BsTimelineConnectorDirective);\n\n protected readonly sides = computed(() =>\n resolveSides(this.items().length, this.align(), this.reverse()),\n );\n\n constructor() {\n // Push the selection model into the WC (identity via id).\n effect(() => {\n const el = this.timelineRef()?.nativeElement;\n if (!el) return;\n el.selectedIds = this.selection().map((item, i) => this.idForItem(item, i));\n });\n }\n\n // ----- template helpers --------------------------------------------------\n\n protected idForItem(item: TimelineItem, index: number): string | number {\n return item.id ?? index;\n }\n\n protected idAttr(item: TimelineItem): string | number | null {\n return item.id ?? null;\n }\n\n protected timeAttr(item: TimelineItem): string | null {\n if (item.time == null) return null;\n return item.time instanceof Date ? item.time.toLocaleDateString() : item.time;\n }\n\n protected ctx(item: TimelineItem, index: number): BsTimelineItemContext {\n const len = this.items().length;\n const visualIndex = this.reverse() ? len - 1 - index : index;\n return {\n $implicit: item,\n index,\n visualIndex,\n isFirst: visualIndex === 0,\n isLast: visualIndex === len - 1,\n orientation: this.orientation(),\n side: this.sides()[index] ?? 'start',\n };\n }\n\n protected connectorCtx(item: TimelineItem, index: number): BsTimelineConnectorContext {\n return {\n $implicit: item,\n toItem: this.items()[index + 1],\n index,\n orientation: this.orientation(),\n };\n }\n\n // ----- WC event handlers -------------------------------------------------\n\n protected onItemClick(event: Event): void {\n this.itemClick.emit((event as CustomEvent<TimelineItemClickDetail>).detail);\n }\n\n protected onSelectionChange(event: Event): void {\n const detail = (event as CustomEvent<TimelineSelectionChangeDetail>).detail;\n const items = this.items();\n if (items.length) {\n const byId = new Map(items.map((it, i) => [this.idForItem(it, i), it] as const));\n const el = this.timelineRef()?.nativeElement;\n const ids = el?.selectedIds ?? detail.selected.map((m, i) => m.id ?? i);\n this.selection.set(ids.map((id) => byId.get(id)).filter((it): it is TimelineItem => it !== undefined));\n } else {\n // Declarative mode: surface the attribute-derived models from the event.\n this.selection.set(detail.selected);\n }\n }\n}\n","<mp-timeline\n #timeline\n [attr.orientation]=\"orientation()\"\n [attr.align]=\"align()\"\n [attr.reverse]=\"reverse() ? '' : null\"\n [attr.selectable]=\"selectable()\"\n (item-click)=\"onItemClick($event)\"\n (selection-change)=\"onSelectionChange($event)\"\n>\n @if (items().length) {\n @for (item of items(); track item.id ?? $index; let i = $index) {\n <mp-timeline-item\n [attr.item-id]=\"idAttr(item)\"\n [attr.title]=\"item.title ?? null\"\n [attr.description]=\"item.description ?? null\"\n [attr.time]=\"timeAttr(item)\"\n [attr.icon]=\"item.icon ?? null\"\n [attr.color]=\"item.color ?? null\"\n [attr.item-class]=\"item.cssClass ?? null\"\n [attr.disabled]=\"item.disabled ? '' : null\"\n >\n @if (markerTpl()) {\n <span slot=\"marker\">\n <ng-container [ngTemplateOutlet]=\"markerTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (titleTpl()) {\n <span slot=\"title\">\n <ng-container [ngTemplateOutlet]=\"titleTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (timestampTpl()) {\n <span slot=\"opposite\">\n <ng-container [ngTemplateOutlet]=\"timestampTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (oppositeTpl()) {\n <span slot=\"opposite\">\n <ng-container [ngTemplateOutlet]=\"oppositeTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </span>\n }\n @if (contentTpl()) {\n <div slot=\"content\">\n <ng-container [ngTemplateOutlet]=\"contentTpl()!.templateRef\" [ngTemplateOutletContext]=\"ctx(item, i)\"></ng-container>\n </div>\n }\n @if (connectorTpl()) {\n <span slot=\"connector\">\n <ng-container [ngTemplateOutlet]=\"connectorTpl()!.templateRef\" [ngTemplateOutletContext]=\"connectorCtx(item, i)\"></ng-container>\n </span>\n }\n </mp-timeline-item>\n }\n } @else {\n <ng-content></ng-content>\n }\n</mp-timeline>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;AAIG;MACU,qBAAqB,CAAA;AAAlC,IAAA,WAAA,GAAA;QAEE,IAAA,CAAA,KAAK,GAAG,CAAC;QACT,IAAA,CAAA,WAAW,GAAG,CAAC;QACf,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,MAAM,GAAG,KAAK;QACd,IAAA,CAAA,WAAW,GAAwB,UAAU;QAC7C,IAAA,CAAA,IAAI,GAAiB,OAAO;IAC9B;AAAC;AAED;MACa,0BAA0B,CAAA;AAAvC,IAAA,WAAA,GAAA;QAKE,IAAA,CAAA,KAAK,GAAG,CAAC;QACT,IAAA,CAAA,WAAW,GAAwB,UAAU;IAC/C;AAAC;AAED;MAEa,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAqC,WAAW,CAAC;AAO/E,IAAA;AANC,IAAA,OAAO,sBAAsB,CAC3B,EAA6B,EAC7B,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;8GAPW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA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EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACzB,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAC1B,4BAA4B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7E7E;;AAEG;;;;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { model, input, signal, viewChild, effect, forwardRef, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
4
|
+
import { MpTimepickerElement } from '@mintplayer/web-components/timepicker';
|
|
5
|
+
export * from '@mintplayer/web-components/timepicker';
|
|
6
|
+
|
|
7
|
+
void MpTimepickerElement;
|
|
8
|
+
function timeMinutes(d) {
|
|
9
|
+
return d.getHours() * 60 + d.getMinutes();
|
|
10
|
+
}
|
|
11
|
+
class BsTimepickerComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.selectedTime = model(new Date(), /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "selectedTime" }] : /* istanbul ignore next */ []));
|
|
15
|
+
this.isOpen = model(false, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
17
|
+
this.min = input(undefined, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
19
|
+
this.max = input(undefined, /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
21
|
+
this.step = input(15, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.hour12 = input('auto', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "hour12" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.locale = input(undefined, /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
27
|
+
this.placeholder = input('', /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
29
|
+
this.triggerLabel = input('Choose time', /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
31
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
33
|
+
this.formDisabled = signal(false, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.effectiveDisabled = signal(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.wcRef = viewChild('wc', /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "wcRef" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.onChange = () => { };
|
|
40
|
+
this.onTouched = () => { };
|
|
41
|
+
this.onValidatorChange = () => { };
|
|
42
|
+
effect(() => {
|
|
43
|
+
const wc = this.wcRef()?.nativeElement;
|
|
44
|
+
if (!wc)
|
|
45
|
+
return;
|
|
46
|
+
wc.selectedTime = this.selectedTime();
|
|
47
|
+
wc.step = this.step();
|
|
48
|
+
wc.min = this.min() ?? null;
|
|
49
|
+
wc.max = this.max() ?? null;
|
|
50
|
+
wc.hour12 = this.hour12();
|
|
51
|
+
wc.locale = this.locale();
|
|
52
|
+
wc.placeholder = this.placeholder();
|
|
53
|
+
wc.triggerLabel = this.triggerLabel();
|
|
54
|
+
wc.disabled = this.effectiveDisabled();
|
|
55
|
+
wc.requestUpdate?.();
|
|
56
|
+
});
|
|
57
|
+
effect(() => {
|
|
58
|
+
this.effectiveDisabled.set(this.disabled() || this.formDisabled());
|
|
59
|
+
});
|
|
60
|
+
effect(() => {
|
|
61
|
+
this.min();
|
|
62
|
+
this.max();
|
|
63
|
+
this.onValidatorChange();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
ngAfterViewInit() { }
|
|
67
|
+
onSelectedTimeChange(event) {
|
|
68
|
+
const detail = event.detail;
|
|
69
|
+
if (!(detail instanceof Date))
|
|
70
|
+
return;
|
|
71
|
+
this.selectedTime.set(detail);
|
|
72
|
+
this.onChange(detail);
|
|
73
|
+
}
|
|
74
|
+
onOpened() {
|
|
75
|
+
this.isOpen.set(true);
|
|
76
|
+
}
|
|
77
|
+
onClosed() {
|
|
78
|
+
this.isOpen.set(false);
|
|
79
|
+
this.onTouched();
|
|
80
|
+
}
|
|
81
|
+
/* ---- ControlValueAccessor ---- */
|
|
82
|
+
writeValue(value) {
|
|
83
|
+
if (value instanceof Date)
|
|
84
|
+
this.selectedTime.set(value);
|
|
85
|
+
}
|
|
86
|
+
registerOnChange(fn) {
|
|
87
|
+
this.onChange = fn;
|
|
88
|
+
}
|
|
89
|
+
registerOnTouched(fn) {
|
|
90
|
+
this.onTouched = fn;
|
|
91
|
+
}
|
|
92
|
+
setDisabledState(isDisabled) {
|
|
93
|
+
this.formDisabled.set(isDisabled);
|
|
94
|
+
}
|
|
95
|
+
/* ---- Validator ---- */
|
|
96
|
+
validate(control) {
|
|
97
|
+
const value = control.value;
|
|
98
|
+
if (!(value instanceof Date))
|
|
99
|
+
return null;
|
|
100
|
+
const errors = {};
|
|
101
|
+
const min = this.min();
|
|
102
|
+
const max = this.max();
|
|
103
|
+
const minutes = timeMinutes(value);
|
|
104
|
+
if (min && minutes < timeMinutes(min))
|
|
105
|
+
errors['min'] = { min, actual: value };
|
|
106
|
+
if (max && minutes > timeMinutes(max))
|
|
107
|
+
errors['max'] = { max, actual: value };
|
|
108
|
+
return Object.keys(errors).length ? errors : null;
|
|
109
|
+
}
|
|
110
|
+
registerOnValidatorChange(fn) {
|
|
111
|
+
this.onValidatorChange = fn;
|
|
112
|
+
}
|
|
113
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", type: BsTimepickerComponent, isStandalone: true, selector: "bs-timepicker", inputs: { selectedTime: { classPropertyName: "selectedTime", publicName: "selectedTime", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, hour12: { classPropertyName: "hour12", publicName: "hour12", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedTime: "selectedTimeChange", isOpen: "isOpenChange" }, providers: [
|
|
115
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTimepickerComponent), multi: true },
|
|
116
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => BsTimepickerComponent), multi: true },
|
|
117
|
+
], viewQueries: [{ propertyName: "wcRef", first: true, predicate: ["wc"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-timepicker\n #wc\n (selected-time-change)=\"onSelectedTimeChange($event)\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\">\n</mp-timepicker>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
118
|
+
}
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsTimepickerComponent, decorators: [{
|
|
120
|
+
type: Component,
|
|
121
|
+
args: [{ selector: 'bs-timepicker', schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
122
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTimepickerComponent), multi: true },
|
|
123
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => BsTimepickerComponent), multi: true },
|
|
124
|
+
], template: "<mp-timepicker\n #wc\n (selected-time-change)=\"onSelectedTimeChange($event)\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\">\n</mp-timepicker>\n" }]
|
|
125
|
+
}], ctorParameters: () => [], propDecorators: { selectedTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTime", required: false }] }, { type: i0.Output, args: ["selectedTimeChange"] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], hour12: [{ type: i0.Input, args: [{ isSignal: true, alias: "hour12", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], wcRef: [{ type: i0.ViewChild, args: ['wc', { isSignal: true }] }] } });
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Generated bundle index. Do not edit.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
export { BsTimepickerComponent };
|
|
132
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-timepicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-timepicker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/timepicker/src/timepicker.component.ts","../../../../libs/mintplayer-ng-bootstrap/timepicker/src/timepicker.component.html","../../../../libs/mintplayer-ng-bootstrap/timepicker/mintplayer-ng-bootstrap-timepicker.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n forwardRef,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport { MpTimepickerElement, type Hour12Mode, type TimeStep } from '@mintplayer/web-components/timepicker';\n\nvoid MpTimepickerElement;\n\nfunction timeMinutes(d: Date): number {\n return d.getHours() * 60 + d.getMinutes();\n}\n\n@Component({\n selector: 'bs-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTimepickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => BsTimepickerComponent), multi: true },\n ],\n})\nexport class BsTimepickerComponent implements AfterViewInit, ControlValueAccessor, Validator {\n selectedTime = model<Date>(new Date());\n isOpen = model(false);\n min = input<Date | undefined>(undefined);\n max = input<Date | undefined>(undefined);\n step = input<TimeStep>(15);\n hour12 = input<Hour12Mode>('auto');\n locale = input<string | undefined>(undefined);\n placeholder = input<string>('');\n triggerLabel = input<string>('Choose time');\n\n disabled = input<boolean>(false);\n protected readonly formDisabled = signal(false);\n protected readonly effectiveDisabled = signal(false);\n\n readonly wcRef = viewChild<ElementRef<MpTimepickerElement>>('wc');\n\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n private onValidatorChange: () => void = () => {};\n\n constructor() {\n effect(() => {\n const wc = this.wcRef()?.nativeElement;\n if (!wc) return;\n wc.selectedTime = this.selectedTime();\n wc.step = this.step();\n wc.min = this.min() ?? null;\n wc.max = this.max() ?? null;\n wc.hour12 = this.hour12();\n wc.locale = this.locale();\n wc.placeholder = this.placeholder();\n wc.triggerLabel = this.triggerLabel();\n wc.disabled = this.effectiveDisabled();\n wc.requestUpdate?.();\n });\n\n effect(() => {\n this.effectiveDisabled.set(this.disabled() || this.formDisabled());\n });\n\n effect(() => {\n this.min();\n this.max();\n this.onValidatorChange();\n });\n }\n\n ngAfterViewInit(): void {}\n\n onSelectedTimeChange(event: Event): void {\n const detail = (event as CustomEvent<Date>).detail;\n if (!(detail instanceof Date)) return;\n this.selectedTime.set(detail);\n this.onChange(detail);\n }\n\n onOpened(): void {\n this.isOpen.set(true);\n }\n\n onClosed(): void {\n this.isOpen.set(false);\n this.onTouched();\n }\n\n /* ---- ControlValueAccessor ---- */\n\n writeValue(value: Date | null | undefined): void {\n if (value instanceof Date) this.selectedTime.set(value);\n }\n\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /* ---- Validator ---- */\n\n validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n if (!(value instanceof Date)) return null;\n const errors: ValidationErrors = {};\n const min = this.min();\n const max = this.max();\n const minutes = timeMinutes(value);\n if (min && minutes < timeMinutes(min)) errors['min'] = { min, actual: value };\n if (max && minutes > timeMinutes(max)) errors['max'] = { max, actual: value };\n return Object.keys(errors).length ? errors : null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn;\n }\n}\n","<mp-timepicker\n #wc\n (selected-time-change)=\"onSelectedTimeChange($event)\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\">\n</mp-timepicker>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAuBA,KAAK,mBAAmB;AAExB,SAAS,WAAW,CAAC,CAAO,EAAA;IAC1B,OAAO,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,EAAE;AAC3C;MAaa,qBAAqB,CAAA;AAqBhC,IAAA,WAAA,GAAA;AApBA,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAO,IAAI,IAAI,EAAE;yFAAC;QACtC,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK;mFAAC;QACrB,IAAA,CAAA,GAAG,GAAG,KAAK,CAAmB,SAAS;gFAAC;QACxC,IAAA,CAAA,GAAG,GAAG,KAAK,CAAmB,SAAS;gFAAC;QACxC,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,EAAE;iFAAC;QAC1B,IAAA,CAAA,MAAM,GAAG,KAAK,CAAa,MAAM;mFAAC;QAClC,IAAA,CAAA,MAAM,GAAG,KAAK,CAAqB,SAAS;mFAAC;QAC7C,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE;wFAAC;QAC/B,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,aAAa;yFAAC;QAE3C,IAAA,CAA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