@mintplayer/ng-bootstrap 20.6.3 → 21.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/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +41 -54
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +20 -38
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +8 -20
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -10
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +32 -66
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +11 -11
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +207 -138
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +16 -19
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +252 -368
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +53 -49
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +9 -37
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +12 -11
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +12 -12
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +59 -98
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +19 -18
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +14 -14
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +48 -90
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs +16 -16
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +11 -11
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs +26 -26
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +44 -45
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +29 -23
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +10 -30
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +224 -285
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs +17 -30
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +64 -59
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs +8 -8
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +61 -122
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +4 -5
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +19 -33
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +10 -30
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +80 -116
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +44 -73
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +16 -16
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +21 -49
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +43 -49
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +208 -782
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +43 -48
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +85 -111
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +48 -90
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +88 -55
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +24 -34
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +16 -42
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +10 -34
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +79 -85
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +20 -20
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -107
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +9 -40
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +24 -50
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +53 -58
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +56 -109
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +21 -33
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +27 -49
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs +8 -8
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +31 -51
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs.map +1 -1
- package/package.json +96 -96
- package/{accordion/index.d.ts → types/mintplayer-ng-bootstrap-accordion.d.ts} +11 -15
- package/{alert/index.d.ts → types/mintplayer-ng-bootstrap-alert.d.ts} +4 -9
- package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -0
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +25 -0
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +73 -0
- package/{close/index.d.ts → types/mintplayer-ng-bootstrap-close.d.ts} +1 -2
- package/{code-snippet/index.d.ts → types/mintplayer-ng-bootstrap-code-snippet.d.ts} +4 -5
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +170 -0
- package/{context-menu/index.d.ts → types/mintplayer-ng-bootstrap-context-menu.d.ts} +1 -1
- package/{datatable/index.d.ts → types/mintplayer-ng-bootstrap-datatable.d.ts} +11 -11
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +13 -0
- package/{dropdown/index.d.ts → types/mintplayer-ng-bootstrap-dropdown.d.ts} +17 -23
- package/{enhanced-paste/index.d.ts → types/mintplayer-ng-bootstrap-enhanced-paste.d.ts} +1 -3
- package/{file-upload/index.d.ts → types/mintplayer-ng-bootstrap-file-upload.d.ts} +1 -1
- package/{grid/index.d.ts → types/mintplayer-ng-bootstrap-grid.d.ts} +14 -26
- package/{let/index.d.ts → types/mintplayer-ng-bootstrap-let.d.ts} +0 -2
- package/{markdown/index.d.ts → types/mintplayer-ng-bootstrap-markdown.d.ts} +1 -5
- package/{modal/index.d.ts → types/mintplayer-ng-bootstrap-modal.d.ts} +4 -7
- package/{multiselect/index.d.ts → types/mintplayer-ng-bootstrap-multiselect.d.ts} +6 -6
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +148 -0
- package/{navigation-lock/index.d.ts → types/mintplayer-ng-bootstrap-navigation-lock.d.ts} +2 -4
- package/{offcanvas/index.d.ts → types/mintplayer-ng-bootstrap-offcanvas.d.ts} +12 -14
- package/{ordinal-number/index.d.ts → types/mintplayer-ng-bootstrap-ordinal-number.d.ts} +1 -2
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +42 -0
- package/{placeholder/index.d.ts → types/mintplayer-ng-bootstrap-placeholder.d.ts} +3 -8
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +11 -0
- package/{popover/index.d.ts → types/mintplayer-ng-bootstrap-popover.d.ts} +15 -23
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +43 -0
- package/{range/index.d.ts → types/mintplayer-ng-bootstrap-range.d.ts} +1 -2
- package/types/mintplayer-ng-bootstrap-rating.d.ts +17 -0
- package/{resizable/index.d.ts → types/mintplayer-ng-bootstrap-resizable.d.ts} +7 -11
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +144 -0
- package/{scrollspy/index.d.ts → types/mintplayer-ng-bootstrap-scrollspy.d.ts} +14 -15
- package/{searchbox/index.d.ts → types/mintplayer-ng-bootstrap-searchbox.d.ts} +20 -27
- package/{select/index.d.ts → types/mintplayer-ng-bootstrap-select.d.ts} +14 -24
- package/{select2/index.d.ts → types/mintplayer-ng-bootstrap-select2.d.ts} +16 -14
- package/{shell/index.d.ts → types/mintplayer-ng-bootstrap-shell.d.ts} +6 -12
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +76 -0
- package/{sticky-footer/index.d.ts → types/mintplayer-ng-bootstrap-sticky-footer.d.ts} +3 -3
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-table.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +26 -0
- package/{toast/index.d.ts → types/mintplayer-ng-bootstrap-toast.d.ts} +5 -10
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +55 -0
- package/{tooltip/index.d.ts → types/mintplayer-ng-bootstrap-tooltip.d.ts} +5 -8
- package/{treeview/index.d.ts → types/mintplayer-ng-bootstrap-treeview.d.ts} +10 -15
- package/{trust-html/index.d.ts → types/mintplayer-ng-bootstrap-trust-html.d.ts} +0 -2
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +25 -0
- package/badge/index.d.ts +0 -16
- package/calendar/index.d.ts +0 -33
- package/carousel/index.d.ts +0 -67
- package/color-picker/index.d.ts +0 -197
- package/datepicker/index.d.ts +0 -20
- package/navbar/index.d.ts +0 -154
- package/navbar-toggler/index.d.ts +0 -17
- package/pagination/index.d.ts +0 -56
- package/playlist-toggler/index.d.ts +0 -17
- package/progress-bar/index.d.ts +0 -46
- package/rating/index.d.ts +0 -23
- package/scheduler/index.d.ts +0 -232
- package/signature-pad/index.d.ts +0 -41
- package/spinner/index.d.ts +0 -22
- package/splitter/index.d.ts +0 -82
- package/tab-control/index.d.ts +0 -72
- package/table/index.d.ts +0 -18
- package/timepicker/index.d.ts +0 -33
- package/toggle-button/index.d.ts +0 -69
- package/typeahead/index.d.ts +0 -28
- /package/{async-host-binding/index.d.ts → types/mintplayer-ng-bootstrap-async-host-binding.d.ts} +0 -0
- /package/{breadcrumb/index.d.ts → types/mintplayer-ng-bootstrap-breadcrumb.d.ts} +0 -0
- /package/{button-group/index.d.ts → types/mintplayer-ng-bootstrap-button-group.d.ts} +0 -0
- /package/{button-type/index.d.ts → types/mintplayer-ng-bootstrap-button-type.d.ts} +0 -0
- /package/{calendar-month/index.d.ts → types/mintplayer-ng-bootstrap-calendar-month.d.ts} +0 -0
- /package/{card/index.d.ts → types/mintplayer-ng-bootstrap-card.d.ts} +0 -0
- /package/{container/index.d.ts → types/mintplayer-ng-bootstrap-container.d.ts} +0 -0
- /package/{copy/index.d.ts → types/mintplayer-ng-bootstrap-copy.d.ts} +0 -0
- /package/{dock/index.d.ts → types/mintplayer-ng-bootstrap-dock.d.ts} +0 -0
- /package/{dropdown-divider/index.d.ts → types/mintplayer-ng-bootstrap-dropdown-divider.d.ts} +0 -0
- /package/{dropdown-menu/index.d.ts → types/mintplayer-ng-bootstrap-dropdown-menu.d.ts} +0 -0
- /package/{enum/index.d.ts → types/mintplayer-ng-bootstrap-enum.d.ts} +0 -0
- /package/{floating-labels/index.d.ts → types/mintplayer-ng-bootstrap-floating-labels.d.ts} +0 -0
- /package/{font-color/index.d.ts → types/mintplayer-ng-bootstrap-font-color.d.ts} +0 -0
- /package/{for/index.d.ts → types/mintplayer-ng-bootstrap-for.d.ts} +0 -0
- /package/{form/index.d.ts → types/mintplayer-ng-bootstrap-form.d.ts} +0 -0
- /package/{has-id/index.d.ts → types/mintplayer-ng-bootstrap-has-id.d.ts} +0 -0
- /package/{has-overlay/index.d.ts → types/mintplayer-ng-bootstrap-has-overlay.d.ts} +0 -0
- /package/{has-property/index.d.ts → types/mintplayer-ng-bootstrap-has-property.d.ts} +0 -0
- /package/{in-list/index.d.ts → types/mintplayer-ng-bootstrap-in-list.d.ts} +0 -0
- /package/{input-group/index.d.ts → types/mintplayer-ng-bootstrap-input-group.d.ts} +0 -0
- /package/{instance-of/index.d.ts → types/mintplayer-ng-bootstrap-instance-of.d.ts} +0 -0
- /package/{linify/index.d.ts → types/mintplayer-ng-bootstrap-linify.d.ts} +0 -0
- /package/{list-group/index.d.ts → types/mintplayer-ng-bootstrap-list-group.d.ts} +0 -0
- /package/{marquee/index.d.ts → types/mintplayer-ng-bootstrap-marquee.d.ts} +0 -0
- /package/{no-noscript/index.d.ts → types/mintplayer-ng-bootstrap-no-noscript.d.ts} +0 -0
- /package/{parallax/index.d.ts → types/mintplayer-ng-bootstrap-parallax.d.ts} +0 -0
- /package/{slugify/index.d.ts → types/mintplayer-ng-bootstrap-slugify.d.ts} +0 -0
- /package/{split-string/index.d.ts → types/mintplayer-ng-bootstrap-split-string.d.ts} +0 -0
- /package/{uc-first/index.d.ts → types/mintplayer-ng-bootstrap-uc-first.d.ts} +0 -0
- /package/{user-agent/index.d.ts → types/mintplayer-ng-bootstrap-user-agent.d.ts} +0 -0
- /package/{word-count/index.d.ts → types/mintplayer-ng-bootstrap-word-count.d.ts} +0 -0
- /package/{index.d.ts → types/mintplayer-ng-bootstrap.d.ts} +0 -0
|
@@ -1,52 +1,38 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
2
|
+
import { inject, ElementRef, model, output, signal, computed, effect, HostListener, ViewChild, HostBinding, ChangeDetectionStrategy, Component, NgZone, Directive, input, forwardRef, NgModule } from '@angular/core';
|
|
4
3
|
import { AsyncPipe } from '@angular/common';
|
|
5
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
6
|
-
import { BehaviorSubject, combineLatest, map, debounceTime, switchMap, take } from 'rxjs';
|
|
7
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
5
|
|
|
9
6
|
class BsColorWheelComponent {
|
|
10
|
-
constructor(
|
|
11
|
-
|
|
12
|
-
// for (const entry of entries) {
|
|
13
|
-
// if (entry.target === this.element.nativeElement) {
|
|
14
|
-
// console.log(entry.contentRect);
|
|
15
|
-
// this.width$.next(entry.contentRect.width);
|
|
16
|
-
// this.height$.next(entry.contentRect.height);
|
|
17
|
-
// break;
|
|
18
|
-
// }
|
|
19
|
-
// }
|
|
20
|
-
// });
|
|
21
|
-
this.element = element;
|
|
22
|
-
this.destroy = destroy;
|
|
7
|
+
constructor() {
|
|
8
|
+
this.element = inject((ElementRef));
|
|
23
9
|
this.positionRelative = true;
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
// Inputs
|
|
11
|
+
this.width = model(150, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
12
|
+
this.height = model(150, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
13
|
+
this.diameterRatio = model(0, ...(ngDevMode ? [{ debugName: "diameterRatio" }] : []));
|
|
14
|
+
this.luminosity = model(0, ...(ngDevMode ? [{ debugName: "luminosity" }] : []));
|
|
15
|
+
// HS model with output
|
|
16
|
+
this.hs = model({ hue: 0, saturation: 0 }, ...(ngDevMode ? [{ debugName: "hs" }] : []));
|
|
17
|
+
this.hsChange = output();
|
|
18
|
+
// Internal state
|
|
19
|
+
this.disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
20
|
+
this.viewInited = signal(false, ...(ngDevMode ? [{ debugName: "viewInited" }] : []));
|
|
33
21
|
this.isPointerDown = false;
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
.pipe(map(([width, height]) => {
|
|
41
|
-
if ((width === null) || (height === null)) {
|
|
22
|
+
this.canvasContext = null;
|
|
23
|
+
// Computed values
|
|
24
|
+
this.squareSize = computed(() => {
|
|
25
|
+
const width = this.width();
|
|
26
|
+
const height = this.height();
|
|
27
|
+
if (width === null || height === null) {
|
|
42
28
|
return null;
|
|
43
29
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (
|
|
30
|
+
return Math.min(width, height);
|
|
31
|
+
}, ...(ngDevMode ? [{ debugName: "squareSize" }] : []));
|
|
32
|
+
this.shiftX = computed(() => {
|
|
33
|
+
const width = this.width();
|
|
34
|
+
const height = this.height();
|
|
35
|
+
if (width === null || height === null) {
|
|
50
36
|
return null;
|
|
51
37
|
}
|
|
52
38
|
else if (width < height) {
|
|
@@ -55,10 +41,11 @@ class BsColorWheelComponent {
|
|
|
55
41
|
else {
|
|
56
42
|
return (width - height) / 2;
|
|
57
43
|
}
|
|
58
|
-
}));
|
|
59
|
-
this.shiftY
|
|
60
|
-
.
|
|
61
|
-
|
|
44
|
+
}, ...(ngDevMode ? [{ debugName: "shiftX" }] : []));
|
|
45
|
+
this.shiftY = computed(() => {
|
|
46
|
+
const width = this.width();
|
|
47
|
+
const height = this.height();
|
|
48
|
+
if (width === null || height === null) {
|
|
62
49
|
return null;
|
|
63
50
|
}
|
|
64
51
|
else if (width < height) {
|
|
@@ -67,88 +54,76 @@ class BsColorWheelComponent {
|
|
|
67
54
|
else {
|
|
68
55
|
return 0;
|
|
69
56
|
}
|
|
70
|
-
}));
|
|
71
|
-
this.innerRadius
|
|
72
|
-
.
|
|
57
|
+
}, ...(ngDevMode ? [{ debugName: "shiftY" }] : []));
|
|
58
|
+
this.innerRadius = computed(() => {
|
|
59
|
+
const squareSize = this.squareSize();
|
|
60
|
+
const diameterRatio = this.diameterRatio();
|
|
73
61
|
if (squareSize) {
|
|
74
62
|
return squareSize / 2 * diameterRatio;
|
|
75
63
|
}
|
|
76
64
|
else {
|
|
77
65
|
return 0;
|
|
78
66
|
}
|
|
79
|
-
}));
|
|
80
|
-
this.outerRadius
|
|
81
|
-
.
|
|
67
|
+
}, ...(ngDevMode ? [{ debugName: "innerRadius" }] : []));
|
|
68
|
+
this.outerRadius = computed(() => {
|
|
69
|
+
const squareSize = this.squareSize();
|
|
82
70
|
if (squareSize) {
|
|
83
71
|
return squareSize / 2;
|
|
84
72
|
}
|
|
85
73
|
else {
|
|
86
74
|
return 150;
|
|
87
75
|
}
|
|
88
|
-
}));
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.canvasContext.save();
|
|
95
|
-
this.canvasContext.translate(shiftX + outerRadius, shiftY + outerRadius);
|
|
96
|
-
for (let x = 0; x < 360; x++) {
|
|
97
|
-
this.canvasContext.rotate(1 * Math.PI / 180);
|
|
98
|
-
const gradient = this.canvasContext.createLinearGradient(innerRadius, 0, outerRadius, 0);
|
|
99
|
-
gradient.addColorStop(0, `hsl(${x}, 0%, 50%)`);
|
|
100
|
-
gradient.addColorStop(1, `hsl(${x}, 100%, 50%)`);
|
|
101
|
-
this.canvasContext.fillStyle = gradient;
|
|
102
|
-
this.canvasContext.fillRect(innerRadius, 0, outerRadius - innerRadius, outerRadius / 50);
|
|
103
|
-
}
|
|
104
|
-
this.canvasContext.restore();
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
this.markerPosition$ = combineLatest([this.hs$, this.shiftX$, this.shiftY$])
|
|
108
|
-
.pipe(switchMap(([hs, shiftX, shiftY]) => {
|
|
109
|
-
return this.color2position(hs)
|
|
110
|
-
.pipe(map((position) => ({ position, shiftX: (shiftX ?? 0), shiftY: (shiftY ?? 0) })));
|
|
111
|
-
}))
|
|
112
|
-
.pipe(map(({ position, shiftX, shiftY }) => {
|
|
76
|
+
}, ...(ngDevMode ? [{ debugName: "outerRadius" }] : []));
|
|
77
|
+
this.markerPosition = computed(() => {
|
|
78
|
+
const hs = this.hs();
|
|
79
|
+
const shiftX = this.shiftX() ?? 0;
|
|
80
|
+
const shiftY = this.shiftY() ?? 0;
|
|
81
|
+
const position = this.color2position(hs);
|
|
113
82
|
return {
|
|
114
83
|
x: position.x + shiftX,
|
|
115
84
|
y: position.y + shiftY,
|
|
116
85
|
};
|
|
117
|
-
}));
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
86
|
+
}, ...(ngDevMode ? [{ debugName: "markerPosition" }] : []));
|
|
87
|
+
// Draw color wheel when dimensions change
|
|
88
|
+
effect(() => {
|
|
89
|
+
const innerRadius = this.innerRadius();
|
|
90
|
+
const outerRadius = this.outerRadius();
|
|
91
|
+
const shiftX = this.shiftX();
|
|
92
|
+
const shiftY = this.shiftY();
|
|
93
|
+
// Use setTimeout to debounce slightly
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
if (this.canvasContext && innerRadius !== null && outerRadius !== null && shiftX !== null && shiftY !== null) {
|
|
96
|
+
this.canvasContext.clearRect(0, 0, this.canvas.nativeElement.width, this.canvas.nativeElement.height);
|
|
97
|
+
this.canvasContext.save();
|
|
98
|
+
this.canvasContext.translate(shiftX + outerRadius, shiftY + outerRadius);
|
|
99
|
+
for (let x = 0; x < 360; x++) {
|
|
100
|
+
this.canvasContext.rotate(1 * Math.PI / 180);
|
|
101
|
+
const gradient = this.canvasContext.createLinearGradient(innerRadius, 0, outerRadius, 0);
|
|
102
|
+
gradient.addColorStop(0, `hsl(${x}, 0%, 50%)`);
|
|
103
|
+
gradient.addColorStop(1, `hsl(${x}, 100%, 50%)`);
|
|
104
|
+
this.canvasContext.fillStyle = gradient;
|
|
105
|
+
this.canvasContext.fillRect(innerRadius, 0, outerRadius - innerRadius, outerRadius / 50);
|
|
106
|
+
}
|
|
107
|
+
this.canvasContext.restore();
|
|
108
|
+
}
|
|
109
|
+
}, 20);
|
|
110
|
+
});
|
|
111
|
+
// Emit HS changes
|
|
112
|
+
effect(() => {
|
|
113
|
+
const hs = this.hs();
|
|
114
|
+
this.hsChange.emit(hs);
|
|
115
|
+
});
|
|
141
116
|
}
|
|
142
117
|
ngAfterViewInit() {
|
|
143
|
-
|
|
144
|
-
this.viewInited$.next(true);
|
|
118
|
+
this.viewInited.set(true);
|
|
145
119
|
if (typeof window !== 'undefined') {
|
|
146
120
|
this.canvasContext = this.canvas.nativeElement.getContext('2d', { willReadFrequently: true });
|
|
147
121
|
}
|
|
148
122
|
}
|
|
149
123
|
onPointerDown(ev) {
|
|
150
|
-
if (!this.disabled
|
|
124
|
+
if (!this.disabled()) {
|
|
151
125
|
ev.preventDefault();
|
|
126
|
+
ev.stopPropagation();
|
|
152
127
|
this.isPointerDown = true;
|
|
153
128
|
this.updateColor(ev, !('touches' in ev));
|
|
154
129
|
}
|
|
@@ -181,65 +156,62 @@ class BsColorWheelComponent {
|
|
|
181
156
|
y: ev.clientY - (subtract ? rect.top : 0),
|
|
182
157
|
};
|
|
183
158
|
}
|
|
184
|
-
this.position2color(co.x, co.y)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
});
|
|
159
|
+
const color = this.position2color(co.x, co.y);
|
|
160
|
+
if (color) {
|
|
161
|
+
this.hs.set({ hue: color.hue, saturation: color.saturation });
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
console.warn('Color is null');
|
|
165
|
+
}
|
|
192
166
|
}
|
|
193
167
|
isInsideCircle(x, y) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
168
|
+
const squareSize = this.squareSize();
|
|
169
|
+
const shiftX = this.shiftX();
|
|
170
|
+
const shiftY = this.shiftY();
|
|
171
|
+
// Position to the square
|
|
172
|
+
const sx = x - (shiftX ?? 0);
|
|
173
|
+
const sy = y - (shiftY ?? 0);
|
|
174
|
+
// Square radius
|
|
175
|
+
const sr = (squareSize ?? 0) / 2;
|
|
176
|
+
const radius = Math.sqrt(Math.pow(sx - sr, 2) + Math.pow(sy - sr, 2));
|
|
177
|
+
const angle = (Math.atan2(sr - sy, sr - sx) + Math.PI) % 360;
|
|
178
|
+
return {
|
|
179
|
+
inside: radius <= sr,
|
|
180
|
+
angle
|
|
181
|
+
};
|
|
208
182
|
}
|
|
209
183
|
position2color(x, y) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}));
|
|
184
|
+
if (!this.canvasContext) {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
const result = this.isInsideCircle(x, y);
|
|
188
|
+
if (result.inside) {
|
|
189
|
+
const imageData = this.canvasContext.getImageData(x, y, 1, 1).data;
|
|
190
|
+
const hsl = this.rgb2Hsl({ r: imageData[0], g: imageData[1], b: imageData[2] });
|
|
191
|
+
return hsl;
|
|
192
|
+
}
|
|
193
|
+
return { hue: result.angle * 180 / Math.PI, saturation: 1, luminosity: 0.5 };
|
|
221
194
|
}
|
|
222
195
|
color2position(hs) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}));
|
|
196
|
+
let innerRadius = this.innerRadius();
|
|
197
|
+
let outerRadius = this.outerRadius();
|
|
198
|
+
if (innerRadius === null) {
|
|
199
|
+
innerRadius = 0;
|
|
200
|
+
}
|
|
201
|
+
if (!outerRadius) {
|
|
202
|
+
outerRadius = 100;
|
|
203
|
+
}
|
|
204
|
+
const theta = hs.hue * Math.PI / 180;
|
|
205
|
+
const c = {
|
|
206
|
+
x: -outerRadius * Math.cos(theta),
|
|
207
|
+
y: -outerRadius * Math.sin(theta)
|
|
208
|
+
};
|
|
209
|
+
const d = hs.saturation * (outerRadius - innerRadius) + innerRadius;
|
|
210
|
+
const o = { x: outerRadius, y: outerRadius };
|
|
211
|
+
return {
|
|
212
|
+
x: o.x - d * (c.x / outerRadius),
|
|
213
|
+
y: o.y - d * (c.y / outerRadius),
|
|
214
|
+
};
|
|
243
215
|
}
|
|
244
216
|
rgb2Hsl(color) {
|
|
245
217
|
const r01 = this.bound01(color.r, 255);
|
|
@@ -293,31 +265,19 @@ class BsColorWheelComponent {
|
|
|
293
265
|
return (n % max) / max;
|
|
294
266
|
}
|
|
295
267
|
}
|
|
296
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
297
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorWheelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
269
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsColorWheelComponent, isStandalone: false, selector: "bs-color-wheel", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, diameterRatio: { classPropertyName: "diameterRatio", publicName: "diameterRatio", isSignal: true, isRequired: false, transformFunction: null }, luminosity: { classPropertyName: "luminosity", publicName: "luminosity", isSignal: true, isRequired: false, transformFunction: null }, hs: { classPropertyName: "hs", publicName: "hs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { width: "widthChange", height: "heightChange", diameterRatio: "diameterRatioChange", luminosity: "luminosityChange", hs: "hsChange", hsChange: "hsChange" }, host: { listeners: { "document:mousemove": "onMouseMove($event)", "document:mouseup": "onPointerUp($event)" }, properties: { "class.position-relative": "this.positionRelative" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], ngImport: i0, template: "<canvas\n class=\"d-block\"\n [width]=\"width()\"\n [height]=\"height()\"\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\"\n #canvas></canvas>\n\n@if (markerPosition(); as markerPosition) {\n <div class=\"thumb position-absolute pe-none\" [style.left.px]=\"markerPosition.x\" [style.top.px]=\"markerPosition.y\"></div>\n}\n", styles: [".thumb{width:30px;height:30px;border-radius:15px;margin-top:-15px;margin-left:-15px;box-sizing:border-box;border:2px solid white;box-shadow:#0000001a 0 0 10px 5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
298
270
|
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorWheelComponent, decorators: [{
|
|
300
272
|
type: Component,
|
|
301
|
-
args: [{ selector: 'bs-color-wheel', standalone: false, template: "<canvas\n class=\"d-block\"\n [width]=\"width
|
|
302
|
-
}], ctorParameters: () => [
|
|
273
|
+
args: [{ selector: 'bs-color-wheel', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<canvas\n class=\"d-block\"\n [width]=\"width()\"\n [height]=\"height()\"\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\"\n #canvas></canvas>\n\n@if (markerPosition(); as markerPosition) {\n <div class=\"thumb position-absolute pe-none\" [style.left.px]=\"markerPosition.x\" [style.top.px]=\"markerPosition.y\"></div>\n}\n", styles: [".thumb{width:30px;height:30px;border-radius:15px;margin-top:-15px;margin-left:-15px;box-sizing:border-box;border:2px solid white;box-shadow:#0000001a 0 0 10px 5px}\n"] }]
|
|
274
|
+
}], ctorParameters: () => [], propDecorators: { positionRelative: [{
|
|
303
275
|
type: HostBinding,
|
|
304
276
|
args: ['class.position-relative']
|
|
305
|
-
}], diameterRatio: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], width: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}], height: [{
|
|
310
|
-
type: Input
|
|
311
277
|
}], canvas: [{
|
|
312
278
|
type: ViewChild,
|
|
313
279
|
args: ['canvas']
|
|
314
|
-
}], hsChange: [{
|
|
315
|
-
type: Output
|
|
316
|
-
}], hs: [{
|
|
317
|
-
type: Input
|
|
318
|
-
}], luminosity: [{
|
|
319
|
-
type: Input
|
|
320
|
-
}], onMouseMove: [{
|
|
280
|
+
}], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }, { type: i0.Output, args: ["heightChange"] }], diameterRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameterRatio", required: false }] }, { type: i0.Output, args: ["diameterRatioChange"] }], luminosity: [{ type: i0.Input, args: [{ isSignal: true, alias: "luminosity", required: false }] }, { type: i0.Output, args: ["luminosityChange"] }], hs: [{ type: i0.Input, args: [{ isSignal: true, alias: "hs", required: false }] }, { type: i0.Output, args: ["hsChange"] }], hsChange: [{ type: i0.Output, args: ["hsChange"] }], onMouseMove: [{
|
|
321
281
|
type: HostListener,
|
|
322
282
|
args: ['document:mousemove', ['$event']]
|
|
323
283
|
}], onPointerUp: [{
|
|
@@ -326,46 +286,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImpo
|
|
|
326
286
|
}] } });
|
|
327
287
|
|
|
328
288
|
class BsSliderComponent {
|
|
329
|
-
constructor(
|
|
330
|
-
this.element =
|
|
331
|
-
this.zone =
|
|
289
|
+
constructor() {
|
|
290
|
+
this.element = inject((ElementRef));
|
|
291
|
+
this.zone = inject(NgZone);
|
|
332
292
|
this.dBlock = true;
|
|
333
293
|
this.positionRelative = true;
|
|
334
|
-
|
|
335
|
-
this.
|
|
336
|
-
this.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
.subscribe((value) => this.valueChange.emit(value));
|
|
341
|
-
this.thumbMarginLeft$ = this.value$.pipe(map((value) => {
|
|
342
|
-
const res = value * element.nativeElement.clientWidth - 12;
|
|
294
|
+
this.value = model(0.5, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
295
|
+
this.valueChange = output();
|
|
296
|
+
this.isPointerDown = signal(false, ...(ngDevMode ? [{ debugName: "isPointerDown" }] : []));
|
|
297
|
+
this.thumbMarginLeft = computed(() => {
|
|
298
|
+
const value = this.value();
|
|
299
|
+
const res = value * this.element.nativeElement.clientWidth - 12;
|
|
343
300
|
return res;
|
|
344
|
-
}));
|
|
345
|
-
this.cursorClass
|
|
346
|
-
return isPointerDown ? 'cursor-grabbing' : 'cursor-grab';
|
|
347
|
-
}));
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
set value(value) {
|
|
353
|
-
this.value$.next(value);
|
|
301
|
+
}, ...(ngDevMode ? [{ debugName: "thumbMarginLeft" }] : []));
|
|
302
|
+
this.cursorClass = computed(() => {
|
|
303
|
+
return this.isPointerDown() ? 'cursor-grabbing' : 'cursor-grab';
|
|
304
|
+
}, ...(ngDevMode ? [{ debugName: "cursorClass" }] : []));
|
|
305
|
+
effect(() => {
|
|
306
|
+
const value = this.value();
|
|
307
|
+
this.valueChange.emit(value);
|
|
308
|
+
});
|
|
354
309
|
}
|
|
355
310
|
onPointerDown(ev) {
|
|
356
311
|
ev.preventDefault();
|
|
357
|
-
|
|
312
|
+
ev.stopPropagation();
|
|
313
|
+
this.zone.run(() => this.isPointerDown.set(true));
|
|
358
314
|
this.updateColor(ev);
|
|
359
315
|
}
|
|
360
316
|
onPointerMove(ev) {
|
|
361
|
-
if (this.isPointerDown
|
|
317
|
+
if (this.isPointerDown()) {
|
|
362
318
|
ev.preventDefault();
|
|
363
319
|
ev.stopPropagation();
|
|
364
320
|
this.updateColor(ev);
|
|
365
321
|
}
|
|
366
322
|
}
|
|
367
323
|
onPointerUp(ev) {
|
|
368
|
-
this.isPointerDown
|
|
324
|
+
this.isPointerDown.set(false);
|
|
369
325
|
}
|
|
370
326
|
updateColor(ev) {
|
|
371
327
|
let co;
|
|
@@ -382,15 +338,15 @@ class BsSliderComponent {
|
|
|
382
338
|
}
|
|
383
339
|
const percent = co.x / this.track.nativeElement.clientWidth;
|
|
384
340
|
const limited = Math.max(0, Math.min(1, percent));
|
|
385
|
-
this.value
|
|
341
|
+
this.value.set(limited);
|
|
386
342
|
}
|
|
387
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
388
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
344
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: BsSliderComponent, isStandalone: false, selector: "bs-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange" }, host: { listeners: { "document:mousemove": "onPointerMove($event)", "document:mouseup": "onPointerUp($event)" }, properties: { "class.d-block": "this.dBlock", "class.position-relative": "this.positionRelative" } }, viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true }, { propertyName: "thumb", first: true, predicate: ["thumb"], descendants: true }], ngImport: i0, template: "<div class=\"wrapper d-block position-relative\">\n <div #track class=\"track2\"\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\">\n <ng-content select=\"[bsTrack]\"></ng-content>\n </div>\n <div #thumb\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\"\n [class]=\"cursorClass()\"\n [style.margin-left.px]=\"thumbMarginLeft()\">\n <ng-content select=\"[bsThumb]\"></ng-content>\n </div>\n</div>\n", styles: [".track2{height:8px}.wrapper{padding-top:8px;padding-bottom:8px}::ng-deep .thumb{width:24px;height:24px;top:0;border-radius:50%;box-shadow:0 0 0 .1rem #646b7240}::ng-deep .track{height:8px;border-radius:8px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
389
345
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSliderComponent, decorators: [{
|
|
391
347
|
type: Component,
|
|
392
|
-
args: [{ selector: 'bs-slider', standalone: false, template: "<div class=\"wrapper d-block position-relative\">\n <div #track class=\"track2\"\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\">\n <ng-content select=\"[bsTrack]\"></ng-content>\n </div>\n <div #thumb\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\"\n [class]=\"cursorClass
|
|
393
|
-
}], ctorParameters: () => [
|
|
348
|
+
args: [{ selector: 'bs-slider', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wrapper d-block position-relative\">\n <div #track class=\"track2\"\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\">\n <ng-content select=\"[bsTrack]\"></ng-content>\n </div>\n <div #thumb\n (mousedown)=\"onPointerDown($event)\"\n (touchstart)=\"onPointerDown($event)\"\n (touchmove)=\"onPointerMove($event)\"\n (touchend)=\"onPointerUp($event)\"\n [class]=\"cursorClass()\"\n [style.margin-left.px]=\"thumbMarginLeft()\">\n <ng-content select=\"[bsThumb]\"></ng-content>\n </div>\n</div>\n", styles: [".track2{height:8px}.wrapper{padding-top:8px;padding-bottom:8px}::ng-deep .thumb{width:24px;height:24px;top:0;border-radius:50%;box-shadow:0 0 0 .1rem #646b7240}::ng-deep .track{height:8px;border-radius:8px}\n"] }]
|
|
349
|
+
}], ctorParameters: () => [], propDecorators: { dBlock: [{
|
|
394
350
|
type: HostBinding,
|
|
395
351
|
args: ['class.d-block']
|
|
396
352
|
}], positionRelative: [{
|
|
@@ -402,11 +358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImpo
|
|
|
402
358
|
}], thumb: [{
|
|
403
359
|
type: ViewChild,
|
|
404
360
|
args: ['thumb']
|
|
405
|
-
}], valueChange: [{
|
|
406
|
-
type: Output
|
|
407
|
-
}], value: [{
|
|
408
|
-
type: Input
|
|
409
|
-
}], onPointerMove: [{
|
|
361
|
+
}], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], onPointerMove: [{
|
|
410
362
|
type: HostListener,
|
|
411
363
|
args: ['document:mousemove', ['$event']]
|
|
412
364
|
}], onPointerUp: [{
|
|
@@ -417,10 +369,10 @@ class BsThumbDirective {
|
|
|
417
369
|
constructor() {
|
|
418
370
|
this.thumbClass = true;
|
|
419
371
|
}
|
|
420
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
421
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
372
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
373
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsThumbDirective, isStandalone: false, selector: "[bsThumb]", host: { properties: { "class.thumb": "this.thumbClass", "class.position-absolute": "this.thumbClass" } }, ngImport: i0 }); }
|
|
422
374
|
}
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsThumbDirective, decorators: [{
|
|
424
376
|
type: Directive,
|
|
425
377
|
args: [{
|
|
426
378
|
selector: '[bsThumb]',
|
|
@@ -437,10 +389,10 @@ class BsTrackDirective {
|
|
|
437
389
|
constructor() {
|
|
438
390
|
this.trackClass = true;
|
|
439
391
|
}
|
|
440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
441
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTrackDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
393
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsTrackDirective, isStandalone: false, selector: "[bsTrack]", host: { properties: { "class.track": "this.trackClass" } }, ngImport: i0 }); }
|
|
442
394
|
}
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTrackDirective, decorators: [{
|
|
444
396
|
type: Directive,
|
|
445
397
|
args: [{
|
|
446
398
|
selector: '[bsTrack]',
|
|
@@ -453,23 +405,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImpo
|
|
|
453
405
|
|
|
454
406
|
class BsLuminosityStripComponent {
|
|
455
407
|
constructor() {
|
|
456
|
-
|
|
457
|
-
this.
|
|
458
|
-
|
|
459
|
-
//#region Luminosity
|
|
460
|
-
this.luminosity$ = new BehaviorSubject(0.5);
|
|
461
|
-
this.luminosityChange = new EventEmitter();
|
|
462
|
-
//#endregion
|
|
408
|
+
this.hs = model({ hue: 0, saturation: 0 }, ...(ngDevMode ? [{ debugName: "hs" }] : []));
|
|
409
|
+
this.luminosity = model(0.5, ...(ngDevMode ? [{ debugName: "luminosity" }] : []));
|
|
410
|
+
this.luminosityChange = output();
|
|
463
411
|
this.canvasContext = null;
|
|
464
|
-
this.
|
|
412
|
+
this.resultBackground = computed(() => {
|
|
413
|
+
const hs = this.hs();
|
|
414
|
+
const luminosity = this.luminosity();
|
|
415
|
+
return `hsl(${hs.hue}, ${hs.saturation * 100}%, ${luminosity * 100}%)`;
|
|
416
|
+
}, ...(ngDevMode ? [{ debugName: "resultBackground" }] : []));
|
|
417
|
+
// Draw gradient when HS changes
|
|
418
|
+
effect(() => {
|
|
419
|
+
const hs = this.hs();
|
|
465
420
|
if (this.canvasContext) {
|
|
466
|
-
const width = this.canvas.nativeElement.width
|
|
421
|
+
const width = this.canvas.nativeElement.width;
|
|
422
|
+
const height = this.canvas.nativeElement.height;
|
|
467
423
|
this.canvasContext.clearRect(0, 0, width, height);
|
|
468
424
|
this.canvasContext.save();
|
|
469
|
-
// HSL
|
|
470
|
-
// - H: 0 - 359
|
|
471
|
-
// - S: "0%" - "100%"
|
|
472
|
-
// - L: "0%" - "50%" - "100%"
|
|
473
425
|
const gradient = this.canvasContext.createLinearGradient(0, 0, width, 0);
|
|
474
426
|
gradient.addColorStop(0, `hsl(${hs.hue}, ${hs.saturation * 100}%, 0%)`);
|
|
475
427
|
gradient.addColorStop(0.5, `hsl(${hs.hue}, ${hs.saturation * 100}%, 50%)`);
|
|
@@ -478,64 +430,49 @@ class BsLuminosityStripComponent {
|
|
|
478
430
|
this.canvasContext.fillRect(0, 0, width, height);
|
|
479
431
|
}
|
|
480
432
|
});
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
.subscribe(luminosity => this.luminosityChange.emit(luminosity));
|
|
487
|
-
}
|
|
488
|
-
get hs() {
|
|
489
|
-
return this.hs$.value;
|
|
490
|
-
}
|
|
491
|
-
set hs(value) {
|
|
492
|
-
this.hs$.next(value);
|
|
493
|
-
}
|
|
494
|
-
get luminosity() {
|
|
495
|
-
return this.luminosity$.value;
|
|
496
|
-
}
|
|
497
|
-
set luminosity(value) {
|
|
498
|
-
this.luminosity$.next(value);
|
|
433
|
+
// Emit luminosity changes
|
|
434
|
+
effect(() => {
|
|
435
|
+
const luminosity = this.luminosity();
|
|
436
|
+
this.luminosityChange.emit(luminosity);
|
|
437
|
+
});
|
|
499
438
|
}
|
|
500
439
|
ngAfterViewInit() {
|
|
501
440
|
if (typeof window !== 'undefined') {
|
|
502
441
|
this.canvasContext = this.canvas.nativeElement.getContext('2d', { willReadFrequently: true });
|
|
503
442
|
}
|
|
504
443
|
}
|
|
505
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
506
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsLuminosityStripComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: BsLuminosityStripComponent, isStandalone: false, selector: "bs-luminosity-strip", inputs: { hs: { classPropertyName: "hs", publicName: "hs", isSignal: true, isRequired: false, transformFunction: null }, luminosity: { classPropertyName: "luminosity", publicName: "luminosity", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hs: "hsChange", luminosity: "luminosityChange", luminosityChange: "luminosityChange" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], ngImport: i0, template: "<bs-slider [value]=\"luminosity()\" (valueChange)=\"luminosityChange.emit($event)\">\n <canvas bsTrack class=\"position-absolute w-100\" #canvas></canvas>\n <div bsThumb [style.background]=\"resultBackground()\"></div>\n</bs-slider>\n", styles: [""], dependencies: [{ kind: "component", type: BsSliderComponent, selector: "bs-slider", inputs: ["value"], outputs: ["valueChange"] }, { kind: "directive", type: BsThumbDirective, selector: "[bsThumb]" }, { kind: "directive", type: BsTrackDirective, selector: "[bsTrack]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
507
446
|
}
|
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsLuminosityStripComponent, decorators: [{
|
|
509
448
|
type: Component,
|
|
510
|
-
args: [{ selector: 'bs-luminosity-strip', standalone: false, template: "<bs-slider [value]=\"(
|
|
511
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
512
|
-
type: Input
|
|
513
|
-
}], luminosityChange: [{
|
|
514
|
-
type: Output
|
|
515
|
-
}], luminosity: [{
|
|
516
|
-
type: Input
|
|
517
|
-
}], canvas: [{
|
|
449
|
+
args: [{ selector: 'bs-luminosity-strip', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-slider [value]=\"luminosity()\" (valueChange)=\"luminosityChange.emit($event)\">\n <canvas bsTrack class=\"position-absolute w-100\" #canvas></canvas>\n <div bsThumb [style.background]=\"resultBackground()\"></div>\n</bs-slider>\n" }]
|
|
450
|
+
}], ctorParameters: () => [], propDecorators: { canvas: [{
|
|
518
451
|
type: ViewChild,
|
|
519
452
|
args: ['canvas']
|
|
520
|
-
}] } });
|
|
453
|
+
}], hs: [{ type: i0.Input, args: [{ isSignal: true, alias: "hs", required: false }] }, { type: i0.Output, args: ["hsChange"] }], luminosity: [{ type: i0.Input, args: [{ isSignal: true, alias: "luminosity", required: false }] }, { type: i0.Output, args: ["luminosityChange"] }], luminosityChange: [{ type: i0.Output, args: ["luminosityChange"] }] } });
|
|
521
454
|
|
|
522
455
|
class BsAlphaStripComponent {
|
|
523
456
|
constructor() {
|
|
524
|
-
|
|
525
|
-
this.
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
this.luminosity$ = new BehaviorSubject(0.5);
|
|
529
|
-
//#endregion
|
|
530
|
-
//#region Alpha
|
|
531
|
-
this.alpha$ = new BehaviorSubject(1);
|
|
532
|
-
this.alphaChange = new EventEmitter();
|
|
533
|
-
//#endregion
|
|
457
|
+
this.hs = model({ hue: 0, saturation: 0 }, ...(ngDevMode ? [{ debugName: "hs" }] : []));
|
|
458
|
+
this.luminosity = model(0.5, ...(ngDevMode ? [{ debugName: "luminosity" }] : []));
|
|
459
|
+
this.alpha = model(1, ...(ngDevMode ? [{ debugName: "alpha" }] : []));
|
|
460
|
+
this.alphaChange = output();
|
|
534
461
|
this.canvasContext = null;
|
|
535
|
-
|
|
462
|
+
this.resultBackground = computed(() => {
|
|
463
|
+
const hs = this.hs();
|
|
464
|
+
const luminosity = this.luminosity();
|
|
465
|
+
const alpha = this.alpha();
|
|
466
|
+
return `hsla(${hs.hue}, ${hs.saturation * 100}%, ${luminosity * 100}%, ${alpha})`;
|
|
467
|
+
}, ...(ngDevMode ? [{ debugName: "resultBackground" }] : []));
|
|
468
|
+
// Draw gradient when HS or luminosity changes
|
|
469
|
+
effect(() => {
|
|
470
|
+
const hs = this.hs();
|
|
471
|
+
const luminosity = this.luminosity();
|
|
536
472
|
setTimeout(() => {
|
|
537
473
|
if (this.canvasContext) {
|
|
538
|
-
const width = this.canvas.nativeElement.width
|
|
474
|
+
const width = this.canvas.nativeElement.width;
|
|
475
|
+
const height = this.canvas.nativeElement.height;
|
|
539
476
|
this.canvasContext.clearRect(0, 0, width, height);
|
|
540
477
|
this.canvasContext.save();
|
|
541
478
|
const gradient = this.canvasContext.createLinearGradient(0, 0, width, 0);
|
|
@@ -546,108 +483,60 @@ class BsAlphaStripComponent {
|
|
|
546
483
|
}
|
|
547
484
|
});
|
|
548
485
|
});
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
.subscribe((alpha) => this.alphaChange.emit(alpha));
|
|
555
|
-
}
|
|
556
|
-
get hs() {
|
|
557
|
-
return this.hs$.value;
|
|
558
|
-
}
|
|
559
|
-
set hs(value) {
|
|
560
|
-
this.hs$.next(value);
|
|
561
|
-
}
|
|
562
|
-
get luminosity() {
|
|
563
|
-
return this.luminosity$.value;
|
|
564
|
-
}
|
|
565
|
-
set luminosity(value) {
|
|
566
|
-
this.luminosity$.next(value);
|
|
567
|
-
}
|
|
568
|
-
get alpha() {
|
|
569
|
-
return this.alpha$.value;
|
|
570
|
-
}
|
|
571
|
-
set alpha(value) {
|
|
572
|
-
this.alpha$.next(value);
|
|
486
|
+
// Emit alpha changes
|
|
487
|
+
effect(() => {
|
|
488
|
+
const alpha = this.alpha();
|
|
489
|
+
this.alphaChange.emit(alpha);
|
|
490
|
+
});
|
|
573
491
|
}
|
|
574
492
|
ngAfterViewInit() {
|
|
575
493
|
if (typeof window !== 'undefined') {
|
|
576
494
|
this.canvasContext = this.canvas.nativeElement.getContext('2d', { willReadFrequently: true });
|
|
577
495
|
}
|
|
578
496
|
}
|
|
579
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
580
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
497
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsAlphaStripComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
498
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: BsAlphaStripComponent, isStandalone: false, selector: "bs-alpha-strip", inputs: { hs: { classPropertyName: "hs", publicName: "hs", isSignal: true, isRequired: false, transformFunction: null }, luminosity: { classPropertyName: "luminosity", publicName: "luminosity", isSignal: true, isRequired: false, transformFunction: null }, alpha: { classPropertyName: "alpha", publicName: "alpha", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hs: "hsChange", luminosity: "luminosityChange", alpha: "alphaChange", alphaChange: "alphaChange" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["track"], descendants: true }], ngImport: i0, template: "<bs-slider [value]=\"alpha()\" (valueChange)=\"alphaChange.emit($event)\">\n <canvas bsTrack class=\" track position-absolute w-100\" #track></canvas>\n\n <!-- [style.background]=\"resultBackground()\" -->\n <div bsThumb [style.background]=\"resultBackground()\"></div>\n</bs-slider>\n", styles: [".track{background-image:linear-gradient(45deg,#C0C0C0 25%,transparent 25%),linear-gradient(-45deg,#C0C0C0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#C0C0C0 75%),linear-gradient(-45deg,transparent 75%,#C0C0C0 75%);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0px}\n"], dependencies: [{ kind: "component", type: BsSliderComponent, selector: "bs-slider", inputs: ["value"], outputs: ["valueChange"] }, { kind: "directive", type: BsThumbDirective, selector: "[bsThumb]" }, { kind: "directive", type: BsTrackDirective, selector: "[bsTrack]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
581
499
|
}
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsAlphaStripComponent, decorators: [{
|
|
583
501
|
type: Component,
|
|
584
|
-
args: [{ selector: 'bs-alpha-strip', standalone: false, template: "<bs-slider [value]=\"(
|
|
585
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
586
|
-
type: Input
|
|
587
|
-
}], luminosity: [{
|
|
588
|
-
type: Input
|
|
589
|
-
}], alphaChange: [{
|
|
590
|
-
type: Output
|
|
591
|
-
}], alpha: [{
|
|
592
|
-
type: Input
|
|
593
|
-
}], canvas: [{
|
|
502
|
+
args: [{ selector: 'bs-alpha-strip', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-slider [value]=\"alpha()\" (valueChange)=\"alphaChange.emit($event)\">\n <canvas bsTrack class=\" track position-absolute w-100\" #track></canvas>\n\n <!-- [style.background]=\"resultBackground()\" -->\n <div bsThumb [style.background]=\"resultBackground()\"></div>\n</bs-slider>\n", styles: [".track{background-image:linear-gradient(45deg,#C0C0C0 25%,transparent 25%),linear-gradient(-45deg,#C0C0C0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#C0C0C0 75%),linear-gradient(-45deg,transparent 75%,#C0C0C0 75%);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0px}\n"] }]
|
|
503
|
+
}], ctorParameters: () => [], propDecorators: { canvas: [{
|
|
594
504
|
type: ViewChild,
|
|
595
505
|
args: ['track']
|
|
596
|
-
}] } });
|
|
506
|
+
}], hs: [{ type: i0.Input, args: [{ isSignal: true, alias: "hs", required: false }] }, { type: i0.Output, args: ["hsChange"] }], luminosity: [{ type: i0.Input, args: [{ isSignal: true, alias: "luminosity", required: false }] }, { type: i0.Output, args: ["luminosityChange"] }], alpha: [{ type: i0.Input, args: [{ isSignal: true, alias: "alpha", required: false }] }, { type: i0.Output, args: ["alphaChange"] }], alphaChange: [{ type: i0.Output, args: ["alphaChange"] }] } });
|
|
597
507
|
|
|
598
508
|
class BsColorPickerComponent {
|
|
599
509
|
constructor() {
|
|
600
|
-
this.size
|
|
601
|
-
this.disabled
|
|
602
|
-
this.allowAlpha
|
|
603
|
-
this.hs
|
|
604
|
-
this.luminosity
|
|
605
|
-
|
|
606
|
-
this.
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
set allowAlpha(value) {
|
|
615
|
-
this.allowAlpha$.next(value);
|
|
616
|
-
}
|
|
617
|
-
get alpha() {
|
|
618
|
-
return this.alpha$.value;
|
|
619
|
-
}
|
|
620
|
-
set alpha(value) {
|
|
621
|
-
this.alpha$.next(value);
|
|
622
|
-
}
|
|
623
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: BsColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
624
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: BsColorPickerComponent, isStandalone: false, selector: "bs-color-picker", inputs: { size: "size", allowAlpha: "allowAlpha", alpha: "alpha" }, outputs: { alphaChange: "alphaChange" }, viewQueries: [{ propertyName: "colorWheel", first: true, predicate: ["wheel"], descendants: true }], ngImport: i0, template: "@let letDisabled = (disabled$ | async)!;\n@let letHS = (hs$ | async)!;\n@let letLuminosity = (luminosity$ | async)!;\n@let letAlpha = (alpha$ | async)!;\n\n<bs-color-wheel [hs]=\"letHS\" (hsChange)=\"hs$.next($event)\" [luminosity]=\"letLuminosity\" [width]=\"(size$ | async) ?? 150\" [height]=\"(size$ | async) ?? 150\" #wheel></bs-color-wheel>\n<bs-luminosity-strip [hs]=\"letHS\" [luminosity]=\"letLuminosity\" (luminosityChange)=\"luminosity$.next($event)\" class=\"d-block mt-2\" [style.width.px]=\"size$ | async\" #strip></bs-luminosity-strip>\n@if (allowAlpha$ | async) {\n <bs-alpha-strip [hs]=\"letHS\" [luminosity]=\"letLuminosity\" [alpha]=\"letAlpha\" (alphaChange)=\"alpha$.next($event)\" class=\"d-block mt-2\" [style.width.px]=\"size$ | async\" #alpha></bs-alpha-strip>\n}", styles: [""], dependencies: [{ kind: "component", type: BsColorWheelComponent, selector: "bs-color-wheel", inputs: ["diameterRatio", "width", "height", "hs", "luminosity"], outputs: ["hsChange"] }, { kind: "component", type: BsLuminosityStripComponent, selector: "bs-luminosity-strip", inputs: ["hs", "luminosity"], outputs: ["luminosityChange"] }, { kind: "component", type: BsAlphaStripComponent, selector: "bs-alpha-strip", inputs: ["hs", "luminosity", "alpha"], outputs: ["alphaChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
510
|
+
this.size = input(150, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
511
|
+
this.disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
512
|
+
this.allowAlpha = input(true, ...(ngDevMode ? [{ debugName: "allowAlpha" }] : []));
|
|
513
|
+
this.hs = signal({ hue: 0, saturation: 0 }, ...(ngDevMode ? [{ debugName: "hs" }] : []));
|
|
514
|
+
this.luminosity = signal(0, ...(ngDevMode ? [{ debugName: "luminosity" }] : []));
|
|
515
|
+
this.alpha = model(1, ...(ngDevMode ? [{ debugName: "alpha" }] : []));
|
|
516
|
+
this.alphaChange = output();
|
|
517
|
+
effect(() => {
|
|
518
|
+
const alpha = this.alpha();
|
|
519
|
+
this.alphaChange.emit(alpha);
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
523
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsColorPickerComponent, isStandalone: false, selector: "bs-color-picker", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, allowAlpha: { classPropertyName: "allowAlpha", publicName: "allowAlpha", isSignal: true, isRequired: false, transformFunction: null }, alpha: { classPropertyName: "alpha", publicName: "alpha", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { alpha: "alphaChange", alphaChange: "alphaChange" }, viewQueries: [{ propertyName: "colorWheel", first: true, predicate: ["wheel"], descendants: true }], ngImport: i0, template: "@let letDisabled = disabled();\n@let letHS = hs();\n@let letLuminosity = luminosity();\n@let letAlpha = alpha();\n\n<bs-color-wheel [hs]=\"letHS\" (hsChange)=\"hs.set($event)\" [luminosity]=\"letLuminosity\" [width]=\"size()\" [height]=\"size()\" #wheel></bs-color-wheel>\n<bs-luminosity-strip [hs]=\"letHS\" [luminosity]=\"letLuminosity\" (luminosityChange)=\"luminosity.set($event)\" class=\"d-block mt-2\" [style.width.px]=\"size()\" #strip></bs-luminosity-strip>\n@if (allowAlpha()) {\n <bs-alpha-strip [hs]=\"letHS\" [luminosity]=\"letLuminosity\" [alpha]=\"letAlpha\" (alphaChange)=\"alpha.set($event)\" class=\"d-block mt-2\" [style.width.px]=\"size()\" #alphaStrip></bs-alpha-strip>\n}\n", styles: [""], dependencies: [{ kind: "component", type: BsColorWheelComponent, selector: "bs-color-wheel", inputs: ["width", "height", "diameterRatio", "luminosity", "hs"], outputs: ["widthChange", "heightChange", "diameterRatioChange", "luminosityChange", "hsChange"] }, { kind: "component", type: BsLuminosityStripComponent, selector: "bs-luminosity-strip", inputs: ["hs", "luminosity"], outputs: ["hsChange", "luminosityChange"] }, { kind: "component", type: BsAlphaStripComponent, selector: "bs-alpha-strip", inputs: ["hs", "luminosity", "alpha"], outputs: ["hsChange", "luminosityChange", "alphaChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
625
524
|
}
|
|
626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerComponent, decorators: [{
|
|
627
526
|
type: Component,
|
|
628
|
-
args: [{ selector: 'bs-color-picker', standalone: false, template: "@let letDisabled = (
|
|
527
|
+
args: [{ selector: 'bs-color-picker', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let letDisabled = disabled();\n@let letHS = hs();\n@let letLuminosity = luminosity();\n@let letAlpha = alpha();\n\n<bs-color-wheel [hs]=\"letHS\" (hsChange)=\"hs.set($event)\" [luminosity]=\"letLuminosity\" [width]=\"size()\" [height]=\"size()\" #wheel></bs-color-wheel>\n<bs-luminosity-strip [hs]=\"letHS\" [luminosity]=\"letLuminosity\" (luminosityChange)=\"luminosity.set($event)\" class=\"d-block mt-2\" [style.width.px]=\"size()\" #strip></bs-luminosity-strip>\n@if (allowAlpha()) {\n <bs-alpha-strip [hs]=\"letHS\" [luminosity]=\"letLuminosity\" [alpha]=\"letAlpha\" (alphaChange)=\"alpha.set($event)\" class=\"d-block mt-2\" [style.width.px]=\"size()\" #alphaStrip></bs-alpha-strip>\n}\n" }]
|
|
629
528
|
}], ctorParameters: () => [], propDecorators: { colorWheel: [{
|
|
630
529
|
type: ViewChild,
|
|
631
530
|
args: ['wheel']
|
|
632
|
-
}], size: [{
|
|
633
|
-
type: Input
|
|
634
|
-
}], allowAlpha: [{
|
|
635
|
-
type: Input
|
|
636
|
-
}], alphaChange: [{
|
|
637
|
-
type: Output
|
|
638
|
-
}], alpha: [{
|
|
639
|
-
type: Input
|
|
640
|
-
}] } });
|
|
531
|
+
}], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], allowAlpha: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowAlpha", required: false }] }], alpha: [{ type: i0.Input, args: [{ isSignal: true, alias: "alpha", required: false }] }, { type: i0.Output, args: ["alphaChange"] }], alphaChange: [{ type: i0.Output, args: ["alphaChange"] }] } });
|
|
641
532
|
|
|
642
533
|
class BsColorPickerValueAccessor {
|
|
643
|
-
constructor(
|
|
644
|
-
this.host =
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
.pipe(takeUntilDestroyed(this.destroy))
|
|
650
|
-
.subscribe(([hs, luminosity]) => {
|
|
534
|
+
constructor() {
|
|
535
|
+
this.host = inject(BsColorPickerComponent);
|
|
536
|
+
// Effect to emit value changes
|
|
537
|
+
effect(() => {
|
|
538
|
+
const hs = this.host.hs();
|
|
539
|
+
const luminosity = this.host.luminosity();
|
|
651
540
|
const rgb = this.hsl2rgb(hs.hue, hs.saturation, luminosity);
|
|
652
541
|
const hex = this.rgb2hex(rgb);
|
|
653
542
|
setTimeout(() => this.onValueChange && this.onValueChange(hex), 10);
|
|
@@ -672,14 +561,14 @@ class BsColorPickerValueAccessor {
|
|
|
672
561
|
if (value) {
|
|
673
562
|
const rgb = this.hex2rgb(value);
|
|
674
563
|
const hsl = this.rgb2Hsl(rgb);
|
|
675
|
-
this.host.hs
|
|
676
|
-
this.host.luminosity
|
|
564
|
+
this.host.hs.set({ hue: hsl.h, saturation: hsl.s });
|
|
565
|
+
this.host.luminosity.set(hsl.l);
|
|
677
566
|
}
|
|
678
567
|
}
|
|
679
568
|
}
|
|
680
569
|
setDisabledState(isDisabled) {
|
|
681
570
|
if (this.host && this.host.colorWheel) {
|
|
682
|
-
this.host.colorWheel.disabled
|
|
571
|
+
this.host.colorWheel.disabled.set(isDisabled);
|
|
683
572
|
}
|
|
684
573
|
}
|
|
685
574
|
//#endregion
|
|
@@ -737,35 +626,30 @@ class BsColorPickerValueAccessor {
|
|
|
737
626
|
h *= 360;
|
|
738
627
|
return { h, s, l };
|
|
739
628
|
}
|
|
740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
741
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
629
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
630
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsColorPickerValueAccessor, isStandalone: false, selector: "bs-color-picker", providers: [{
|
|
742
631
|
provide: NG_VALUE_ACCESSOR,
|
|
743
|
-
// useExisting: BsColorPickerValueAccessor,
|
|
744
632
|
useExisting: forwardRef(() => BsColorPickerValueAccessor),
|
|
745
633
|
multi: true
|
|
746
634
|
}], exportAs: ["bsColorPicker"], ngImport: i0 }); }
|
|
747
635
|
}
|
|
748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerValueAccessor, decorators: [{
|
|
749
637
|
type: Directive,
|
|
750
638
|
args: [{
|
|
751
639
|
selector: 'bs-color-picker',
|
|
752
640
|
standalone: false,
|
|
753
641
|
providers: [{
|
|
754
642
|
provide: NG_VALUE_ACCESSOR,
|
|
755
|
-
// useExisting: BsColorPickerValueAccessor,
|
|
756
643
|
useExisting: forwardRef(() => BsColorPickerValueAccessor),
|
|
757
644
|
multi: true
|
|
758
645
|
}],
|
|
759
646
|
exportAs: 'bsColorPicker'
|
|
760
647
|
}]
|
|
761
|
-
}], ctorParameters: () => [
|
|
762
|
-
type: Inject,
|
|
763
|
-
args: [forwardRef(() => BsColorPickerComponent)]
|
|
764
|
-
}] }, { type: i0.DestroyRef }] });
|
|
648
|
+
}], ctorParameters: () => [] });
|
|
765
649
|
|
|
766
650
|
class BsColorPickerModule {
|
|
767
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
768
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
651
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
652
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerModule, declarations: [BsColorPickerComponent,
|
|
769
653
|
BsColorPickerValueAccessor,
|
|
770
654
|
BsColorWheelComponent,
|
|
771
655
|
BsLuminosityStripComponent,
|
|
@@ -781,9 +665,9 @@ class BsColorPickerModule {
|
|
|
781
665
|
BsThumbDirective,
|
|
782
666
|
BsTrackDirective,
|
|
783
667
|
BsAlphaStripComponent] }); }
|
|
784
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
668
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerModule, imports: [FormsModule] }); }
|
|
785
669
|
}
|
|
786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsColorPickerModule, decorators: [{
|
|
787
671
|
type: NgModule,
|
|
788
672
|
args: [{
|
|
789
673
|
declarations: [
|