@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,242 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, model, output, viewChild, signal, computed, effect, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
3
|
+
export { DEFAULT_FILE_MANAGER_MESSAGES, mergeMessages } from '@mintplayer/web-components/file-manager';
|
|
4
|
+
|
|
5
|
+
class BsFileManagerComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
/** All file-system nodes. Consumer mutates this in response to operation events. */
|
|
8
|
+
this.nodes = input([], /* @ts-ignore */
|
|
9
|
+
...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
10
|
+
/** Restrict the tree to descendants of this folder. `null` = show everything. */
|
|
11
|
+
this.rootFolderId = input(null, /* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "rootFolderId" }] : /* istanbul ignore next */ []));
|
|
13
|
+
/** Two-way bound: the folder the user has navigated into. */
|
|
14
|
+
this.currentFolderId = model(null, /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "currentFolderId" }] : /* istanbul ignore next */ []));
|
|
16
|
+
/** Show the drag-drop upload overlay on the right pane. */
|
|
17
|
+
this.allowUpload = input(false, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "allowUpload" }] : /* istanbul ignore next */ []));
|
|
19
|
+
/** Enable / disable individual operations. `true` enables all. */
|
|
20
|
+
this.allowOperations = input(true, /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "allowOperations" }] : /* istanbul ignore next */ []));
|
|
22
|
+
/** Two-way bound list / icons view toggle. */
|
|
23
|
+
this.viewMode = model('list', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "viewMode" }] : /* istanbul ignore next */ []));
|
|
25
|
+
/** Selection mode (none / single / multiple). */
|
|
26
|
+
this.selectionMode = input('multiple', /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
28
|
+
/** Search input placeholder; falls back to the localised default. */
|
|
29
|
+
this.searchPlaceholder = input('', /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
31
|
+
/** Resolve a node's icon key to an SVG string. */
|
|
32
|
+
this.iconResolver = input(undefined, /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "iconResolver" }] : /* istanbul ignore next */ []));
|
|
34
|
+
/**
|
|
35
|
+
* Lazy-loaded tree: when set, every folder is treated as potentially
|
|
36
|
+
* expandable. The first expansion of each folder invokes this callback;
|
|
37
|
+
* the returned `FileSystemNode[]` is merged into `nodes` automatically.
|
|
38
|
+
*/
|
|
39
|
+
this.loadChildren = input(undefined, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "loadChildren" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/**
|
|
42
|
+
* Replaces `window.confirm` / `window.prompt` with consumer-provided
|
|
43
|
+
* dialogs (typically a `bs-modal`). When unset, the WC falls back to
|
|
44
|
+
* the native browser dialogs.
|
|
45
|
+
*/
|
|
46
|
+
this.dialogResolver = input(undefined, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "dialogResolver" }] : /* istanbul ignore next */ []));
|
|
48
|
+
/**
|
|
49
|
+
* Invoked when paste / upload would overwrite an existing entry. When
|
|
50
|
+
* unset, the WC silently replaces (preserving v1 behaviour).
|
|
51
|
+
*/
|
|
52
|
+
this.conflictResolver = input(undefined, /* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [{ debugName: "conflictResolver" }] : /* istanbul ignore next */ []));
|
|
54
|
+
/** Partial override of the visible-string set (i18n). */
|
|
55
|
+
this.messages = input(undefined, /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
57
|
+
/** Two-way bound array of selected node IDs. */
|
|
58
|
+
this.selectedIds = model([], /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
|
|
60
|
+
// Outputs
|
|
61
|
+
this.navigate = output();
|
|
62
|
+
this.nodeOpen = output();
|
|
63
|
+
this.selectionChange = output();
|
|
64
|
+
this.uploadRequest = output();
|
|
65
|
+
this.operation = output();
|
|
66
|
+
this.errorReported = output();
|
|
67
|
+
this.childrenLoaded = output();
|
|
68
|
+
this.fileManagerRef = viewChild('fileManager', /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "fileManagerRef" }] : /* istanbul ignore next */ []));
|
|
70
|
+
/**
|
|
71
|
+
* Read-only snapshot of in-flight uploads. Updated by the WC; consumers
|
|
72
|
+
* read it for progress UIs. Use `reportUploadProgress(id, pct, status?, error?)`
|
|
73
|
+
* to push progress from the upload-pipeline callback.
|
|
74
|
+
*/
|
|
75
|
+
this.uploads = signal([], /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "uploads" }] : /* istanbul ignore next */ []));
|
|
77
|
+
/** Node IDs currently marked pending by `markPending`. */
|
|
78
|
+
this.pendingOpIds = signal(new Set(), /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "pendingOpIds" }] : /* istanbul ignore next */ []));
|
|
80
|
+
/** Convenience: number of pending operations. */
|
|
81
|
+
this.pendingCount = computed(() => this.pendingOpIds().size, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "pendingCount" }] : /* istanbul ignore next */ []));
|
|
83
|
+
effect(() => {
|
|
84
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
85
|
+
if (!el)
|
|
86
|
+
return;
|
|
87
|
+
el.nodes = this.nodes();
|
|
88
|
+
});
|
|
89
|
+
effect(() => {
|
|
90
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
91
|
+
if (!el)
|
|
92
|
+
return;
|
|
93
|
+
el.rootFolderId = this.rootFolderId();
|
|
94
|
+
});
|
|
95
|
+
effect(() => {
|
|
96
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
97
|
+
if (!el)
|
|
98
|
+
return;
|
|
99
|
+
el.currentFolderId = this.currentFolderId();
|
|
100
|
+
});
|
|
101
|
+
effect(() => {
|
|
102
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
103
|
+
if (!el)
|
|
104
|
+
return;
|
|
105
|
+
el.allowUpload = this.allowUpload();
|
|
106
|
+
});
|
|
107
|
+
effect(() => {
|
|
108
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
109
|
+
if (!el)
|
|
110
|
+
return;
|
|
111
|
+
el.allowOperations = this.allowOperations();
|
|
112
|
+
});
|
|
113
|
+
effect(() => {
|
|
114
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
115
|
+
if (!el)
|
|
116
|
+
return;
|
|
117
|
+
el.viewMode = this.viewMode();
|
|
118
|
+
});
|
|
119
|
+
effect(() => {
|
|
120
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
121
|
+
if (!el)
|
|
122
|
+
return;
|
|
123
|
+
el.selectionMode = this.selectionMode();
|
|
124
|
+
});
|
|
125
|
+
effect(() => {
|
|
126
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
127
|
+
if (!el)
|
|
128
|
+
return;
|
|
129
|
+
const placeholder = this.searchPlaceholder();
|
|
130
|
+
if (placeholder)
|
|
131
|
+
el.searchPlaceholder = placeholder;
|
|
132
|
+
});
|
|
133
|
+
effect(() => {
|
|
134
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
135
|
+
if (!el)
|
|
136
|
+
return;
|
|
137
|
+
el.iconResolver = this.iconResolver();
|
|
138
|
+
});
|
|
139
|
+
effect(() => {
|
|
140
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
141
|
+
if (!el)
|
|
142
|
+
return;
|
|
143
|
+
el.loadChildren = this.loadChildren();
|
|
144
|
+
});
|
|
145
|
+
effect(() => {
|
|
146
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
147
|
+
if (!el)
|
|
148
|
+
return;
|
|
149
|
+
el.dialogResolver = this.dialogResolver();
|
|
150
|
+
});
|
|
151
|
+
effect(() => {
|
|
152
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
153
|
+
if (!el)
|
|
154
|
+
return;
|
|
155
|
+
el.conflictResolver = this.conflictResolver();
|
|
156
|
+
});
|
|
157
|
+
effect(() => {
|
|
158
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
159
|
+
if (!el)
|
|
160
|
+
return;
|
|
161
|
+
el.messages = this.messages();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
ngAfterViewInit() {
|
|
165
|
+
// Effects re-run after view init; nothing else required.
|
|
166
|
+
}
|
|
167
|
+
/** Mark a node as having an operation in flight (rows render busy). */
|
|
168
|
+
markPending(nodeId, op) {
|
|
169
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
170
|
+
el?.markPending(nodeId, op);
|
|
171
|
+
if (el)
|
|
172
|
+
this.pendingOpIds.set(el.pendingOpIds);
|
|
173
|
+
}
|
|
174
|
+
/** Clear the pending state on a node. */
|
|
175
|
+
clearPending(nodeId) {
|
|
176
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
177
|
+
el?.clearPending(nodeId);
|
|
178
|
+
if (el)
|
|
179
|
+
this.pendingOpIds.set(el.pendingOpIds);
|
|
180
|
+
}
|
|
181
|
+
/** Push progress for an in-flight upload (called from the upload pipeline). */
|
|
182
|
+
reportUploadProgress(uploadId, progress, status, error) {
|
|
183
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
184
|
+
el?.reportUploadProgress(uploadId, progress, status, error);
|
|
185
|
+
if (el)
|
|
186
|
+
this.uploads.set(el.uploads);
|
|
187
|
+
}
|
|
188
|
+
/** Remove a finished/aborted upload from the tracking list. */
|
|
189
|
+
clearUpload(uploadId) {
|
|
190
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
191
|
+
el?.clearUpload(uploadId);
|
|
192
|
+
if (el)
|
|
193
|
+
this.uploads.set(el.uploads);
|
|
194
|
+
}
|
|
195
|
+
/** Re-fire `(error)` from anywhere in the consumer's code. */
|
|
196
|
+
reportError(message, nodeId) {
|
|
197
|
+
this.fileManagerRef()?.nativeElement.reportError(message, nodeId);
|
|
198
|
+
}
|
|
199
|
+
onNavigate(event) {
|
|
200
|
+
const detail = event.detail;
|
|
201
|
+
this.currentFolderId.set(detail.folderId);
|
|
202
|
+
this.navigate.emit(detail);
|
|
203
|
+
}
|
|
204
|
+
onNodeOpen(event) {
|
|
205
|
+
this.nodeOpen.emit(event.detail);
|
|
206
|
+
}
|
|
207
|
+
onSelectionChange(event) {
|
|
208
|
+
const detail = event.detail;
|
|
209
|
+
this.selectedIds.set([...detail.selectedIds]);
|
|
210
|
+
this.selectionChange.emit(detail);
|
|
211
|
+
}
|
|
212
|
+
onUploadRequest(event) {
|
|
213
|
+
const detail = event.detail;
|
|
214
|
+
// Sync the wrapper's uploads signal to the WC's freshly-registered batch.
|
|
215
|
+
const el = this.fileManagerRef()?.nativeElement;
|
|
216
|
+
if (el)
|
|
217
|
+
this.uploads.set(el.uploads);
|
|
218
|
+
this.uploadRequest.emit(detail);
|
|
219
|
+
}
|
|
220
|
+
onOperation(event) {
|
|
221
|
+
this.operation.emit(event.detail);
|
|
222
|
+
}
|
|
223
|
+
onErrorReported(event) {
|
|
224
|
+
this.errorReported.emit(event.detail);
|
|
225
|
+
}
|
|
226
|
+
onChildrenLoaded(event) {
|
|
227
|
+
this.childrenLoaded.emit(event.detail);
|
|
228
|
+
}
|
|
229
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFileManagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
230
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", type: BsFileManagerComponent, isStandalone: true, selector: "bs-file-manager", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, rootFolderId: { classPropertyName: "rootFolderId", publicName: "rootFolderId", isSignal: true, isRequired: false, transformFunction: null }, currentFolderId: { classPropertyName: "currentFolderId", publicName: "currentFolderId", isSignal: true, isRequired: false, transformFunction: null }, allowUpload: { classPropertyName: "allowUpload", publicName: "allowUpload", isSignal: true, isRequired: false, transformFunction: null }, allowOperations: { classPropertyName: "allowOperations", publicName: "allowOperations", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, iconResolver: { classPropertyName: "iconResolver", publicName: "iconResolver", isSignal: true, isRequired: false, transformFunction: null }, loadChildren: { classPropertyName: "loadChildren", publicName: "loadChildren", isSignal: true, isRequired: false, transformFunction: null }, dialogResolver: { classPropertyName: "dialogResolver", publicName: "dialogResolver", isSignal: true, isRequired: false, transformFunction: null }, conflictResolver: { classPropertyName: "conflictResolver", publicName: "conflictResolver", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentFolderId: "currentFolderIdChange", viewMode: "viewModeChange", selectedIds: "selectedIdsChange", navigate: "navigate", nodeOpen: "nodeOpen", selectionChange: "selectionChange", uploadRequest: "uploadRequest", operation: "operation", errorReported: "errorReported", childrenLoaded: "childrenLoaded" }, viewQueries: [{ propertyName: "fileManagerRef", first: true, predicate: ["fileManager"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-file-manager\n #fileManager\n class=\"bs-file-manager\"\n (mp-navigate)=\"onNavigate($event)\"\n (mp-node-open)=\"onNodeOpen($event)\"\n (mp-selection-change)=\"onSelectionChange($event)\"\n (mp-upload-request)=\"onUploadRequest($event)\"\n (mp-operation)=\"onOperation($event)\"\n (mp-error)=\"onErrorReported($event)\"\n (mp-children-loaded)=\"onChildrenLoaded($event)\"\n></mp-file-manager>\n", styles: [":host{display:flex;width:100%;height:100%;min-height:24rem}.bs-file-manager{display:flex;width:100%;height:100%;flex-direction:column}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
231
|
+
}
|
|
232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFileManagerComponent, decorators: [{
|
|
233
|
+
type: Component,
|
|
234
|
+
args: [{ selector: 'bs-file-manager', schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-file-manager\n #fileManager\n class=\"bs-file-manager\"\n (mp-navigate)=\"onNavigate($event)\"\n (mp-node-open)=\"onNodeOpen($event)\"\n (mp-selection-change)=\"onSelectionChange($event)\"\n (mp-upload-request)=\"onUploadRequest($event)\"\n (mp-operation)=\"onOperation($event)\"\n (mp-error)=\"onErrorReported($event)\"\n (mp-children-loaded)=\"onChildrenLoaded($event)\"\n></mp-file-manager>\n", styles: [":host{display:flex;width:100%;height:100%;min-height:24rem}.bs-file-manager{display:flex;width:100%;height:100%;flex-direction:column}\n"] }]
|
|
235
|
+
}], ctorParameters: () => [], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], rootFolderId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootFolderId", required: false }] }], currentFolderId: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentFolderId", required: false }] }, { type: i0.Output, args: ["currentFolderIdChange"] }], allowUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowUpload", required: false }] }], allowOperations: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowOperations", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }, { type: i0.Output, args: ["viewModeChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], iconResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconResolver", required: false }] }], loadChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadChildren", required: false }] }], dialogResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogResolver", required: false }] }], conflictResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "conflictResolver", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], navigate: [{ type: i0.Output, args: ["navigate"] }], nodeOpen: [{ type: i0.Output, args: ["nodeOpen"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], uploadRequest: [{ type: i0.Output, args: ["uploadRequest"] }], operation: [{ type: i0.Output, args: ["operation"] }], errorReported: [{ type: i0.Output, args: ["errorReported"] }], childrenLoaded: [{ type: i0.Output, args: ["childrenLoaded"] }], fileManagerRef: [{ type: i0.ViewChild, args: ['fileManager', { isSignal: true }] }] } });
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Generated bundle index. Do not edit.
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
export { BsFileManagerComponent };
|
|
242
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-file-manager.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-file-manager.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/file-manager/src/file-manager/file-manager.component.ts","../../../../libs/mintplayer-ng-bootstrap/file-manager/src/file-manager/file-manager.component.html","../../../../libs/mintplayer-ng-bootstrap/file-manager/mintplayer-ng-bootstrap-file-manager.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport type {\n ConflictResolver,\n DialogResolver,\n FileManagerMessages,\n FileSystemNode,\n FileManagerSelectionMode,\n FileManagerViewMode,\n MpFileManager,\n NavigateEventDetail,\n NodeOpenEventDetail,\n OperationEventDetail,\n OperationFlags,\n OperationKind,\n SelectionChangeEventDetail,\n UploadEntry,\n UploadRequestEventDetail,\n} from '@mintplayer/web-components/file-manager';\n\n// Side-effect import: registers <mp-file-manager> and all the nested WCs.\nimport '@mintplayer/web-components/file-manager';\n\nexport type FileManagerIconResolver = (\n iconKey: string,\n node?: FileSystemNode,\n) => string | undefined;\n\nexport interface ChildrenLoadedEventDetail {\n parentId: string;\n children: FileSystemNode[];\n}\n\n@Component({\n selector: 'bs-file-manager',\n templateUrl: './file-manager.component.html',\n styleUrls: ['./file-manager.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsFileManagerComponent implements AfterViewInit {\n /** All file-system nodes. Consumer mutates this in response to operation events. */\n readonly nodes = input<FileSystemNode[]>([]);\n\n /** Restrict the tree to descendants of this folder. `null` = show everything. */\n readonly rootFolderId = input<string | null>(null);\n\n /** Two-way bound: the folder the user has navigated into. */\n readonly currentFolderId = model<string | null>(null);\n\n /** Show the drag-drop upload overlay on the right pane. */\n readonly allowUpload = input<boolean>(false);\n\n /** Enable / disable individual operations. `true` enables all. */\n readonly allowOperations = input<boolean | OperationFlags>(true);\n\n /** Two-way bound list / icons view toggle. */\n readonly viewMode = model<FileManagerViewMode>('list');\n\n /** Selection mode (none / single / multiple). */\n readonly selectionMode = input<FileManagerSelectionMode>('multiple');\n\n /** Search input placeholder; falls back to the localised default. */\n readonly searchPlaceholder = input<string>('');\n\n /** Resolve a node's icon key to an SVG string. */\n readonly iconResolver = input<FileManagerIconResolver | undefined>(undefined);\n\n /**\n * Lazy-loaded tree: when set, every folder is treated as potentially\n * expandable. The first expansion of each folder invokes this callback;\n * the returned `FileSystemNode[]` is merged into `nodes` automatically.\n */\n readonly loadChildren = input<((parentId: string) => Promise<FileSystemNode[]>) | undefined>(undefined);\n\n /**\n * Replaces `window.confirm` / `window.prompt` with consumer-provided\n * dialogs (typically a `bs-modal`). When unset, the WC falls back to\n * the native browser dialogs.\n */\n readonly dialogResolver = input<DialogResolver | undefined>(undefined);\n\n /**\n * Invoked when paste / upload would overwrite an existing entry. When\n * unset, the WC silently replaces (preserving v1 behaviour).\n */\n readonly conflictResolver = input<ConflictResolver | undefined>(undefined);\n\n /** Partial override of the visible-string set (i18n). */\n readonly messages = input<Partial<FileManagerMessages> | undefined>(undefined);\n\n /** Two-way bound array of selected node IDs. */\n readonly selectedIds = model<string[]>([]);\n\n // Outputs\n readonly navigate = output<NavigateEventDetail>();\n readonly nodeOpen = output<NodeOpenEventDetail>();\n readonly selectionChange = output<SelectionChangeEventDetail>();\n readonly uploadRequest = output<UploadRequestEventDetail>();\n readonly operation = output<OperationEventDetail>();\n readonly errorReported = output<{ kind: string; message: string; nodeId?: string }>();\n readonly childrenLoaded = output<ChildrenLoadedEventDetail>();\n\n readonly fileManagerRef = viewChild<ElementRef<MpFileManager>>('fileManager');\n\n /**\n * Read-only snapshot of in-flight uploads. Updated by the WC; consumers\n * read it for progress UIs. Use `reportUploadProgress(id, pct, status?, error?)`\n * to push progress from the upload-pipeline callback.\n */\n readonly uploads = signal<ReadonlyArray<UploadEntry>>([]);\n\n /** Node IDs currently marked pending by `markPending`. */\n readonly pendingOpIds = signal<ReadonlySet<string>>(new Set());\n\n /** Convenience: number of pending operations. */\n readonly pendingCount = computed(() => this.pendingOpIds().size);\n\n constructor() {\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.nodes = this.nodes();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.rootFolderId = this.rootFolderId();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.currentFolderId = this.currentFolderId();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.allowUpload = this.allowUpload();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.allowOperations = this.allowOperations();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.viewMode = this.viewMode();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.selectionMode = this.selectionMode();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n const placeholder = this.searchPlaceholder();\n if (placeholder) el.searchPlaceholder = placeholder;\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.iconResolver = this.iconResolver();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.loadChildren = this.loadChildren();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.dialogResolver = this.dialogResolver();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.conflictResolver = this.conflictResolver();\n });\n\n effect(() => {\n const el = this.fileManagerRef()?.nativeElement;\n if (!el) return;\n el.messages = this.messages();\n });\n }\n\n ngAfterViewInit(): void {\n // Effects re-run after view init; nothing else required.\n }\n\n /** Mark a node as having an operation in flight (rows render busy). */\n markPending(nodeId: string, op: OperationKind): void {\n const el = this.fileManagerRef()?.nativeElement;\n el?.markPending(nodeId, op);\n if (el) this.pendingOpIds.set(el.pendingOpIds);\n }\n\n /** Clear the pending state on a node. */\n clearPending(nodeId: string): void {\n const el = this.fileManagerRef()?.nativeElement;\n el?.clearPending(nodeId);\n if (el) this.pendingOpIds.set(el.pendingOpIds);\n }\n\n /** Push progress for an in-flight upload (called from the upload pipeline). */\n reportUploadProgress(\n uploadId: string,\n progress: number,\n status?: UploadEntry['status'],\n error?: string,\n ): void {\n const el = this.fileManagerRef()?.nativeElement;\n el?.reportUploadProgress(uploadId, progress, status, error);\n if (el) this.uploads.set(el.uploads);\n }\n\n /** Remove a finished/aborted upload from the tracking list. */\n clearUpload(uploadId: string): void {\n const el = this.fileManagerRef()?.nativeElement;\n el?.clearUpload(uploadId);\n if (el) this.uploads.set(el.uploads);\n }\n\n /** Re-fire `(error)` from anywhere in the consumer's code. */\n reportError(message: string, nodeId?: string): void {\n this.fileManagerRef()?.nativeElement.reportError(message, nodeId);\n }\n\n onNavigate(event: Event): void {\n const detail = (event as CustomEvent<NavigateEventDetail>).detail;\n this.currentFolderId.set(detail.folderId);\n this.navigate.emit(detail);\n }\n\n onNodeOpen(event: Event): void {\n this.nodeOpen.emit((event as CustomEvent<NodeOpenEventDetail>).detail);\n }\n\n onSelectionChange(event: Event): void {\n const detail = (event as CustomEvent<SelectionChangeEventDetail>).detail;\n this.selectedIds.set([...detail.selectedIds]);\n this.selectionChange.emit(detail);\n }\n\n onUploadRequest(event: Event): void {\n const detail = (event as CustomEvent<UploadRequestEventDetail>).detail;\n // Sync the wrapper's uploads signal to the WC's freshly-registered batch.\n const el = this.fileManagerRef()?.nativeElement;\n if (el) this.uploads.set(el.uploads);\n this.uploadRequest.emit(detail);\n }\n\n onOperation(event: Event): void {\n this.operation.emit((event as CustomEvent<OperationEventDetail>).detail);\n }\n\n onErrorReported(event: Event): void {\n this.errorReported.emit((event as CustomEvent<{ kind: string; message: string; nodeId?: string }>).detail);\n }\n\n onChildrenLoaded(event: Event): void {\n this.childrenLoaded.emit((event as CustomEvent<ChildrenLoadedEventDetail>).detail);\n }\n}\n","<mp-file-manager\n #fileManager\n class=\"bs-file-manager\"\n (mp-navigate)=\"onNavigate($event)\"\n (mp-node-open)=\"onNodeOpen($event)\"\n (mp-selection-change)=\"onSelectionChange($event)\"\n (mp-upload-request)=\"onUploadRequest($event)\"\n (mp-operation)=\"onOperation($event)\"\n (mp-error)=\"onErrorReported($event)\"\n (mp-children-loaded)=\"onChildrenLoaded($event)\"\n></mp-file-manager>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAoDa,sBAAsB,CAAA;AA8EjC,IAAA,WAAA,GAAA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EAAA,CAAA;;AEnH9E;;AAEG;;;;"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe, inject, input, signal, model, output, ChangeDetectionStrategy, Component, TemplateRef, Directive } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';
|
|
5
|
+
import { BsForDirective } from '@mintplayer/ng-bootstrap/for';
|
|
6
|
+
import { BsListGroupComponent, BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';
|
|
7
|
+
import { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';
|
|
8
|
+
import { Color } from '@mintplayer/ng-bootstrap';
|
|
9
|
+
|
|
10
|
+
class BsFormatBytesPipe {
|
|
11
|
+
transform(value, decimals = 2) {
|
|
12
|
+
if (value === 0) {
|
|
13
|
+
return "0 Bytes";
|
|
14
|
+
}
|
|
15
|
+
const k = 1024;
|
|
16
|
+
const dm = decimals <= 0 ? 0 : decimals;
|
|
17
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
18
|
+
const i = Math.floor(Math.log(value) / Math.log(k));
|
|
19
|
+
return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
20
|
+
}
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
22
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.0", ngImport: i0, type: BsFormatBytesPipe, isStandalone: true, name: "bsFormatBytes" }); }
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFormatBytesPipe, decorators: [{
|
|
25
|
+
type: Pipe,
|
|
26
|
+
args: [{
|
|
27
|
+
name: 'bsFormatBytes',
|
|
28
|
+
pure: true,
|
|
29
|
+
}]
|
|
30
|
+
}] });
|
|
31
|
+
|
|
32
|
+
class BsFileUploadComponent {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.announcer = inject(BsLiveAnnouncerService);
|
|
35
|
+
this.dropFilesCaption = input('Drop your files here', /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "dropFilesCaption" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.browseFilesCaption = input('Browse for files', /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "browseFilesCaption" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.placeholder = input('Drop files to upload', /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.ariaLabel = input('File upload drop zone', /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
43
|
+
this.inputAriaLabel = input('Choose files to upload', /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "inputAriaLabel" }] : /* istanbul ignore next */ []));
|
|
45
|
+
this.colors = Color;
|
|
46
|
+
this.isDraggingFile = signal(false, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "isDraggingFile" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.fileTemplate = signal(undefined, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "fileTemplate" }] : /* istanbul ignore next */ []));
|
|
50
|
+
this.files = model([], /* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
|
|
52
|
+
this.filesDropped = output();
|
|
53
|
+
}
|
|
54
|
+
onChange(event) {
|
|
55
|
+
if (!event.target)
|
|
56
|
+
return;
|
|
57
|
+
if (!('files' in event.target))
|
|
58
|
+
return;
|
|
59
|
+
if (!event.target['files'])
|
|
60
|
+
return;
|
|
61
|
+
const files = event.target.files;
|
|
62
|
+
if (!files)
|
|
63
|
+
return;
|
|
64
|
+
this.processDroppedFiles(files);
|
|
65
|
+
}
|
|
66
|
+
onDragOver(event) {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
event.stopPropagation();
|
|
69
|
+
if (event.dataTransfer) {
|
|
70
|
+
this.isDraggingFile.set(true);
|
|
71
|
+
event.dataTransfer.effectAllowed = "copy";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
onDragLeave(event) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
event.stopPropagation();
|
|
77
|
+
this.isDraggingFile.set(false);
|
|
78
|
+
}
|
|
79
|
+
onDrop(event) {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
event.stopPropagation();
|
|
82
|
+
this.isDraggingFile.set(false);
|
|
83
|
+
if (event.dataTransfer && event.dataTransfer.files) {
|
|
84
|
+
this.processDroppedFiles(event.dataTransfer.files);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
processDroppedFiles(fileList) {
|
|
88
|
+
const newFiles = [...Array(fileList.length).keys()]
|
|
89
|
+
.map(i => fileList.item(i))
|
|
90
|
+
.filter(f => !!f)
|
|
91
|
+
.map((file, index) => ({ file, progress: 0, index: this.files().length + index }));
|
|
92
|
+
this.files.update(f => [...f, ...newFiles]);
|
|
93
|
+
this.filesDropped.emit(newFiles);
|
|
94
|
+
if (newFiles.length === 1) {
|
|
95
|
+
this.announcer.announce(`Added ${newFiles[0].file.name}`);
|
|
96
|
+
}
|
|
97
|
+
else if (newFiles.length > 1) {
|
|
98
|
+
this.announcer.announce(`Added ${newFiles.length} files`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: BsFileUploadComponent, isStandalone: true, selector: "bs-file-upload", inputs: { dropFilesCaption: { classPropertyName: "dropFilesCaption", publicName: "dropFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, browseFilesCaption: { classPropertyName: "browseFilesCaption", publicName: "browseFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inputAriaLabel: { classPropertyName: "inputAriaLabel", publicName: "inputAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<div class=\"dropzone border position-relative p-5\" role=\"region\" [attr.aria-label]=\"ariaLabel()\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" [attr.aria-label]=\"inputAriaLabel()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\" aria-hidden=\"true\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\" aria-hidden=\"true\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\" [ariaLabel]=\"'Upload progress for ' + upload.file.name\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>\n", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid var(--bs-danger)!important;background:var(--bs-danger-bg-subtle);margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:var(--bs-secondary-color)}.list-group span{margin:-5px auto}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsForDirective, selector: "label[bsFor]", inputs: ["bsFor"] }, { kind: "component", type: BsListGroupComponent, selector: "bs-list-group" }, { kind: "component", type: BsListGroupItemComponent, selector: "bs-list-group-item" }, { kind: "component", type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate", "ariaLabel"] }, { kind: "component", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: ["minimum", "maximum", "value", "color", "striped", "animated", "ariaLabel"] }, { kind: "pipe", type: BsFormatBytesPipe, name: "bsFormatBytes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFileUploadComponent, decorators: [{
|
|
105
|
+
type: Component,
|
|
106
|
+
args: [{ selector: 'bs-file-upload', imports: [NgTemplateOutlet, BsForDirective, BsListGroupComponent, BsListGroupItemComponent, BsProgressComponent, BsProgressBarComponent, BsFormatBytesPipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
107
|
+
'(dragover)': 'onDragOver($event)',
|
|
108
|
+
'(dragleave)': 'onDragLeave($event)',
|
|
109
|
+
'(drop)': 'onDrop($event)',
|
|
110
|
+
}, template: "<div class=\"dropzone border position-relative p-5\" role=\"region\" [attr.aria-label]=\"ariaLabel()\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" [attr.aria-label]=\"inputAriaLabel()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\" aria-hidden=\"true\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\" aria-hidden=\"true\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\" [ariaLabel]=\"'Upload progress for ' + upload.file.name\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>\n", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid var(--bs-danger)!important;background:var(--bs-danger-bg-subtle);margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:var(--bs-secondary-color)}.list-group span{margin:-5px auto}\n"] }]
|
|
111
|
+
}], propDecorators: { dropFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropFilesCaption", required: false }] }], browseFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseFilesCaption", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inputAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAriaLabel", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], filesDropped: [{ type: i0.Output, args: ["filesDropped"] }] } });
|
|
112
|
+
|
|
113
|
+
class BsFileUploadTemplateDirective {
|
|
114
|
+
constructor() {
|
|
115
|
+
this.fileUploadComponent = inject(BsFileUploadComponent);
|
|
116
|
+
this.bsFileUploadTemplateOf = input(undefined, /* @ts-ignore */
|
|
117
|
+
...(ngDevMode ? [{ debugName: "bsFileUploadTemplateOf" }] : /* istanbul ignore next */ []));
|
|
118
|
+
const templateRef = inject(TemplateRef);
|
|
119
|
+
this.fileUploadComponent.fileTemplate.set(templateRef);
|
|
120
|
+
}
|
|
121
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFileUploadTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
125
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: BsFileUploadTemplateDirective, isStandalone: true, selector: "[bsFileUploadTemplate]", inputs: { bsFileUploadTemplateOf: { classPropertyName: "bsFileUploadTemplateOf", publicName: "bsFileUploadTemplateOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
126
|
+
}
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFileUploadTemplateDirective, decorators: [{
|
|
128
|
+
type: Directive,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: '[bsFileUploadTemplate]',
|
|
131
|
+
}]
|
|
132
|
+
}], ctorParameters: () => [], propDecorators: { bsFileUploadTemplateOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsFileUploadTemplateOf", required: false }] }] } });
|
|
133
|
+
class BsFileUploadTemplateContext {
|
|
134
|
+
constructor() {
|
|
135
|
+
this.$implicit = null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Generated bundle index. Do not edit.
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
export { BsFileUploadComponent, BsFileUploadTemplateContext, BsFileUploadTemplateDirective, BsFormatBytesPipe };
|
|
144
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-file-upload.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-file-upload.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/file-upload/src/pipes/format-bytes/format-bytes.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.html","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/directive/file-upload-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/mintplayer-ng-bootstrap-file-upload.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFormatBytes',\n pure: true,\n})\nexport class BsFormatBytesPipe implements PipeTransform {\n\n transform(value: number, decimals = 2) {\n if (value === 0) {\n return \"0 Bytes\";\n }\n\n const k = 1024;\n const dm = decimals <= 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(value) / Math.log(k));\n\n return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n }\n\n}\n","import { Component, inject, input, model, output, signal, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsForDirective } from '@mintplayer/ng-bootstrap/for';\nimport { BsListGroupComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { FileUpload } from '../file-upload';\nimport { BsFormatBytesPipe } from '../pipes/format-bytes/format-bytes.pipe';\n\n@Component({\n selector: 'bs-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n imports: [NgTemplateOutlet, BsForDirective, BsListGroupComponent, BsListGroupItemComponent, BsProgressComponent, BsProgressBarComponent, BsFormatBytesPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)',\n '(drop)': 'onDrop($event)',\n },\n})\nexport class BsFileUploadComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n readonly dropFilesCaption = input('Drop your files here');\n readonly browseFilesCaption = input('Browse for files');\n readonly placeholder = input('Drop files to upload');\n readonly ariaLabel = input<string>('File upload drop zone');\n readonly inputAriaLabel = input<string>('Choose files to upload');\n\n readonly colors = Color;\n isDraggingFile = signal(false);\n readonly fileTemplate = signal<TemplateRef<FileUpload> | undefined>(undefined);\n readonly files = model<FileUpload[]>([]);\n readonly filesDropped = output<FileUpload[]>();\n\n onChange(event: Event) {\n if (!event.target) return;\n if (!('files' in event.target)) return;\n if (!event.target['files']) return;\n\n const files = (<HTMLInputElement>event.target).files;\n if (!files) return;\n\n this.processDroppedFiles(files);\n }\n\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n if (event.dataTransfer) {\n this.isDraggingFile.set(true);\n event.dataTransfer.effectAllowed = \"copy\";\n }\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n }\n\n onDrop(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n if (event.dataTransfer && event.dataTransfer.files) {\n this.processDroppedFiles(event.dataTransfer.files);\n }\n }\n\n private processDroppedFiles(fileList: FileList) {\n const newFiles = [...Array(fileList.length).keys()]\n .map(i => fileList.item(i))\n .filter(f => !!f)\n .map((file, index) => <FileUpload>{ file, progress: 0, index: this.files().length + index });\n\n this.files.update(f => [...f, ...newFiles]);\n this.filesDropped.emit(newFiles);\n\n if (newFiles.length === 1) {\n this.announcer.announce(`Added ${newFiles[0].file.name}`);\n } else if (newFiles.length > 1) {\n this.announcer.announce(`Added ${newFiles.length} files`);\n }\n }\n}\n","<div class=\"dropzone border position-relative p-5\" role=\"region\" [attr.aria-label]=\"ariaLabel()\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" [attr.aria-label]=\"inputAriaLabel()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\" aria-hidden=\"true\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\" aria-hidden=\"true\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\" [ariaLabel]=\"'Upload progress for ' + upload.file.name\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { BsFileUploadComponent } from '../component/file-upload.component';\nimport { FileUpload } from '../file-upload';\n\n@Directive({\n selector: '[bsFileUploadTemplate]',\n})\nexport class BsFileUploadTemplateDirective {\n private fileUploadComponent = inject(BsFileUploadComponent);\n\n constructor() {\n const templateRef = inject(TemplateRef);\n this.fileUploadComponent.fileTemplate.set(templateRef);\n }\n\n readonly bsFileUploadTemplateOf = input<FileUpload[] | undefined>(undefined);\n\n static ngTemplateContextGuard(dir: BsFileUploadTemplateDirective, ctx: any): ctx is BsFileUploadTemplateContext {\n return true;\n }\n\n}\n\nexport class BsFileUploadTemplateContext {\n $implicit: FileUpload = null!;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAA;AACnC,QAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,YAAA,OAAO,SAAS;QAClB;QAEA,MAAM,CA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ayer/ng-bootstrap/form';
|
|
4
|
+
|
|
5
|
+
class BsFloatingLabelComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
const bsForm = inject(BsFormComponent, { optional: true });
|
|
8
|
+
if (!bsForm) {
|
|
9
|
+
throw '<bs-floating-label> must be inside a <bs-form>';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFloatingLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.0", type: BsFloatingLabelComponent, isStandalone: true, selector: "bs-floating-label", ngImport: i0, template: "<div class=\"form-floating\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n</div>", styles: [":host ::ng-deep .form-floating{position:relative}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext,:host ::ng-deep .form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}:host ::ng-deep .form-floating>label{position:absolute;top:0;left:0;z-index:2;max-width:100%;height:100%;padding:1rem .75rem;overflow:hidden;color:rgba(var(--bs-body-color-rgb),.65);text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-floating>label{transition:none}}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext{padding:1rem .75rem}:host ::ng-deep .form-floating>.form-control::placeholder,:host ::ng-deep .form-floating>.form-control-plaintext::placeholder{color:transparent}:host ::ng-deep .form-floating>.form-control:focus,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown),:host ::ng-deep .form-floating>.form-control-plaintext:focus,:host ::ng-deep .form-floating>.form-control-plaintext:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-control:-webkit-autofill,:host ::ng-deep .form-floating>.form-control-plaintext:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem;padding-left:.75rem}:host ::ng-deep .form-floating>.form-control:focus~label,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown)~label,:host ::ng-deep .form-floating>.form-control-plaintext~label,:host ::ng-deep .form-floating>.form-select~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>.form-control:-webkit-autofill~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>textarea:focus~label:after,:host ::ng-deep .form-floating>textarea:not(:placeholder-shown)~label:after{position:absolute;inset:1rem .375rem;z-index:-1;height:1.5em;content:\"\";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}:host ::ng-deep .form-floating>textarea:disabled~label:after{background-color:var(--bs-secondary-bg)}:host ::ng-deep .form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}:host ::ng-deep .form-floating>:disabled~label,:host ::ng-deep .form-floating>.form-control:disabled~label{color:#6c757d}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFloatingLabelComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'bs-floating-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-floating\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n</div>", styles: [":host ::ng-deep .form-floating{position:relative}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext,:host ::ng-deep .form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}:host ::ng-deep .form-floating>label{position:absolute;top:0;left:0;z-index:2;max-width:100%;height:100%;padding:1rem .75rem;overflow:hidden;color:rgba(var(--bs-body-color-rgb),.65);text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-floating>label{transition:none}}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext{padding:1rem .75rem}:host ::ng-deep .form-floating>.form-control::placeholder,:host ::ng-deep .form-floating>.form-control-plaintext::placeholder{color:transparent}:host ::ng-deep .form-floating>.form-control:focus,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown),:host ::ng-deep .form-floating>.form-control-plaintext:focus,:host ::ng-deep .form-floating>.form-control-plaintext:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-control:-webkit-autofill,:host ::ng-deep .form-floating>.form-control-plaintext:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem;padding-left:.75rem}:host ::ng-deep .form-floating>.form-control:focus~label,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown)~label,:host ::ng-deep .form-floating>.form-control-plaintext~label,:host ::ng-deep .form-floating>.form-select~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>.form-control:-webkit-autofill~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>textarea:focus~label:after,:host ::ng-deep .form-floating>textarea:not(:placeholder-shown)~label:after{position:absolute;inset:1rem .375rem;z-index:-1;height:1.5em;content:\"\";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}:host ::ng-deep .form-floating>textarea:disabled~label:after{background-color:var(--bs-secondary-bg)}:host ::ng-deep .form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}:host ::ng-deep .form-floating>:disabled~label,:host ::ng-deep .form-floating>.form-control:disabled~label{color:#6c757d}\n"] }]
|
|
18
|
+
}], ctorParameters: () => [] });
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Generated bundle index. Do not edit.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export { BsFloatingLabelComponent };
|
|
25
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-floating-labels.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-floating-labels.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/floating-labels/src/floating-label/floating-label.component.ts","../../../../libs/mintplayer-ng-bootstrap/floating-labels/src/floating-label/floating-label.component.html","../../../../libs/mintplayer-ng-bootstrap/floating-labels/mintplayer-ng-bootstrap-floating-labels.ts"],"sourcesContent":["import { Component, inject, ChangeDetectionStrategy} from '@angular/core';\nimport { BsFormComponent } from '@mintplayer/ng-bootstrap/form';\n\n@Component({\n selector: 'bs-floating-label',\n templateUrl: './floating-label.component.html',\n styleUrls: ['./floating-label.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsFloatingLabelComponent {\n constructor() {\n const bsForm = inject(BsFormComponent, { optional: true });\n if (!bsForm) {\n throw '<bs-floating-label> must be inside a <bs-form>';\n }\n }\n}\n","<div class=\"form-floating\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,wBAAwB,CAAA;AACnC,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,MAAM,gDAAgD;QACxD;IACF;8GANW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6ECTrC,uIAGM,EAAA,MAAA,EAAA,CAAA,soFAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDMO,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACE,mBAAmB,EAAA,eAAA,EAGZ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uIAAA,EAAA,MAAA,EAAA,CAAA,soFAAA,CAAA,EAAA;;;AEPjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class BsFontColorPipe {
|
|
5
|
+
transform(color_hex, defaultColor = '#FFFFFF') {
|
|
6
|
+
if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {
|
|
7
|
+
return defaultColor;
|
|
8
|
+
}
|
|
9
|
+
const R_HEX = color_hex.substr(1, 2);
|
|
10
|
+
const G_HEX = color_hex.substr(3, 2);
|
|
11
|
+
const B_HEX = color_hex.substr(5, 2);
|
|
12
|
+
const R_DEC = parseInt(R_HEX, 16);
|
|
13
|
+
const G_DEC = parseInt(G_HEX, 16);
|
|
14
|
+
const B_DEC = parseInt(B_HEX, 16);
|
|
15
|
+
const CONTRAST_HEX = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';
|
|
16
|
+
return CONTRAST_HEX;
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFontColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
19
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.0", ngImport: i0, type: BsFontColorPipe, isStandalone: true, name: "bsFontColor" }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsFontColorPipe, decorators: [{
|
|
22
|
+
type: Pipe,
|
|
23
|
+
args: [{
|
|
24
|
+
name: 'bsFontColor',
|
|
25
|
+
pure: true,
|
|
26
|
+
}]
|
|
27
|
+
}] });
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { BsFontColorPipe };
|
|
34
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-font-color.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-font-color.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/font-color/src/font-color.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/font-color/mintplayer-ng-bootstrap-font-color.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFontColor',\n pure: true,\n})\nexport class BsFontColorPipe implements PipeTransform {\n\n transform(color_hex: any, defaultColor = '#FFFFFF'): any {\n if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {\n return defaultColor;\n }\n const R_HEX: string = color_hex.substr(1, 2);\n const G_HEX: string = color_hex.substr(3, 2);\n const B_HEX: string = color_hex.substr(5, 2);\n const R_DEC: number = parseInt(R_HEX, 16);\n const G_DEC: number = parseInt(G_HEX, 16);\n const B_DEC: number = parseInt(B_HEX, 16);\n const CONTRAST_HEX: string = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';\n return CONTRAST_HEX;\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,eAAe,CAAA;AAE1B,IAAA,SAAS,CAAC,SAAc,EAAE,YAAY,GAAG,SAAS,EAAA;QAChD,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,SAAS,CAAC,KAAK,QAAQ,EAAE;AAC5G,YAAA,OAAO,YAAY;QACrB;QACA,MAAM,KAAK,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QACzC,MAAM,KAAK,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QACzC,MAAM,KAAK,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QACzC,MAAM,YAAY,GAAW,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,SAAS,GAAG,SAAS;AACxG,QAAA,OAAO,YAAY;IACrB;8GAdW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACnB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, effect, Directive } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class BsForDirective {
|
|
5
|
+
static { this.counter = 1; }
|
|
6
|
+
constructor() {
|
|
7
|
+
this.bsFor = input(undefined, /* @ts-ignore */
|
|
8
|
+
...(ngDevMode ? [{ debugName: "bsFor" }] : /* istanbul ignore next */ []));
|
|
9
|
+
effect(() => {
|
|
10
|
+
const value = this.bsFor();
|
|
11
|
+
if (value !== undefined) {
|
|
12
|
+
this.target = value;
|
|
13
|
+
if (this.target instanceof HTMLElement) {
|
|
14
|
+
if (!this.target.id) {
|
|
15
|
+
const count = BsForDirective.counter++;
|
|
16
|
+
this.target.id = `for-target-${count}`;
|
|
17
|
+
}
|
|
18
|
+
this.forValue = this.target.id;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
24
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: BsForDirective, isStandalone: true, selector: "label[bsFor]", inputs: { bsFor: { classPropertyName: "bsFor", publicName: "bsFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cursor-default": "true", "attr.for": "forValue" } }, ngImport: i0 }); }
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsForDirective, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
selector: 'label[bsFor]',
|
|
30
|
+
host: {
|
|
31
|
+
'[class.cursor-default]': 'true',
|
|
32
|
+
'[attr.for]': 'forValue',
|
|
33
|
+
},
|
|
34
|
+
}]
|
|
35
|
+
}], ctorParameters: () => [], propDecorators: { bsFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsFor", required: false }] }] } });
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Generated bundle index. Do not edit.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
export { BsForDirective };
|
|
42
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-for.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-for.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/for/src/for.directive.ts","../../../../libs/mintplayer-ng-bootstrap/for/mintplayer-ng-bootstrap-for.ts"],"sourcesContent":["import { Directive, effect, input } from '@angular/core';\n\n@Directive({\n selector: 'label[bsFor]',\n host: {\n '[class.cursor-default]': 'true',\n '[attr.for]': 'forValue',\n },\n})\nexport class BsForDirective {\n\n static counter = 1;\n private target: any;\n readonly bsFor = input<any>(undefined);\n\n constructor() {\n effect(() => {\n const value = this.bsFor();\n if (value !== undefined) {\n this.target = value;\n if (this.target instanceof HTMLElement) {\n if (!this.target.id) {\n const count = BsForDirective.counter++;\n this.target.id = `for-target-${count}`;\n }\n this.forValue = this.target.id;\n }\n }\n });\n }\n\n forValue?: string;\n\n // @HostListener('click') onMouseClick() {\n // if (!('tagName' in this.target)) {\n // // Not a form-control, let's just assume the class has some \"focus\" method\n // this.target.focus();\n // } else if (this.target.tagName.toLowerCase() !== 'input') {\n // // HTML element, but not an input, probably a textarea\n // this.target.focus();\n // } else if (this.target.type.toLowerCase() === 'file') {\n // // HtmlInputElement for a file\n // this.target.click();\n // } else {\n // // HtmlInputElement\n // this.target.focus();\n // }\n // }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":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