@mintplayer/ng-bootstrap 21.30.0 → 21.31.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-a11y.mjs +455 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -4
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +131 -3
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +80 -48
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +218 -14
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +294 -3
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +163 -18
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +179 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +14 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +2 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +70 -6
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +5 -4
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +45 -13
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +51 -5
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +5 -3
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +61 -6
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +19 -4
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +34 -4
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +59 -0
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +91 -2
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -5
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +28 -5
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +10 -3
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +143 -29
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +42 -21
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +33 -4
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +17 -7
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +50 -8
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +34 -12
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs +74 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs +1476 -71
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs +194 -2
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs.map +1 -1
- package/package.json +14 -2
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +32 -0
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +56 -3
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +75 -4
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dock.d.ts +51 -0
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +54 -9
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +57 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +23 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +5 -1
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-popover.d.ts +21 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-range.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-rating.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +4 -0
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +42 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-select.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-select2.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +21 -2
- package/types/mintplayer-ng-bootstrap-toast.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +5 -0
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -1
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +11 -3
- package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +14 -1
- package/types/mintplayer-ng-bootstrap-web-components-a11y.d.ts +34 -0
- package/types/mintplayer-ng-bootstrap-web-components-scheduler-core.d.ts +35 -11
- package/types/mintplayer-ng-bootstrap-web-components-scheduler.d.ts +246 -0
- package/types/mintplayer-ng-bootstrap-web-components-splitter.d.ts +95 -37
|
@@ -6,9 +6,10 @@ class BsProgressComponent {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.height = input(null, ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
8
8
|
this.isIndeterminate = input(false, ...(ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []));
|
|
9
|
+
this.ariaLabel = input('Loading', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
9
10
|
}
|
|
10
11
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsProgressComponent, isStandalone: true, selector: "bs-progress", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, isIndeterminate: { classPropertyName: "isIndeterminate", publicName: "isIndeterminate", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.height.px": "height()", "class.d-block": "true", "class.overflow-hidden": "true" } }, ngImport: i0, template: "<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" aria-
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsProgressComponent, isStandalone: true, selector: "bs-progress", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, isIndeterminate: { classPropertyName: "isIndeterminate", publicName: "isIndeterminate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.height.px": "height()", "class.d-block": "true", "class.overflow-hidden": "true" } }, ngImport: i0, template: "<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n", styles: ["@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}:host .progress,:host .progress-stacked{--bs-progress-height: 1rem;--bs-progress-font-size: .75rem;--bs-progress-bg: var(--bs-secondary-bg);--bs-progress-border-radius: var(--bs-border-radius);--bs-progress-box-shadow: var(--bs-box-shadow-inset);--bs-progress-bar-color: #fff;--bs-progress-bar-bg: #0d6efd;--bs-progress-bar-transition: width .6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}:host .progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media(prefers-reduced-motion:reduce){:host .progress-bar{transition:none}}:host .progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}:host .progress-stacked>.progress{overflow:visible}:host .progress-stacked>.progress>.progress-bar{width:100%}:host .progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media(prefers-reduced-motion:reduce){:host .progress-bar-animated{animation:none}}:host .progress-bar-infinite{animation:progress-infinite 1.5s infinite}@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
13
|
}
|
|
13
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsProgressComponent, decorators: [{
|
|
14
15
|
type: Component,
|
|
@@ -16,8 +17,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
16
17
|
'[style.height.px]': 'height()',
|
|
17
18
|
'[class.d-block]': 'true',
|
|
18
19
|
'[class.overflow-hidden]': 'true',
|
|
19
|
-
}, template: "<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" aria-
|
|
20
|
-
}], propDecorators: { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], isIndeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isIndeterminate", required: false }] }] } });
|
|
20
|
+
}, template: "<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n", styles: ["@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}:host .progress,:host .progress-stacked{--bs-progress-height: 1rem;--bs-progress-font-size: .75rem;--bs-progress-bg: var(--bs-secondary-bg);--bs-progress-border-radius: var(--bs-border-radius);--bs-progress-box-shadow: var(--bs-box-shadow-inset);--bs-progress-bar-color: #fff;--bs-progress-bar-bg: #0d6efd;--bs-progress-bar-transition: width .6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}:host .progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media(prefers-reduced-motion:reduce){:host .progress-bar{transition:none}}:host .progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}:host .progress-stacked>.progress{overflow:visible}:host .progress-stacked>.progress>.progress-bar{width:100%}:host .progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media(prefers-reduced-motion:reduce){:host .progress-bar-animated{animation:none}}:host .progress-bar-infinite{animation:progress-infinite 1.5s infinite}@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}\n"] }]
|
|
21
|
+
}], propDecorators: { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], isIndeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isIndeterminate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
21
22
|
|
|
22
23
|
class BsProgressBarComponent {
|
|
23
24
|
constructor() {
|
|
@@ -27,6 +28,7 @@ class BsProgressBarComponent {
|
|
|
27
28
|
this.color = input(Color.primary, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
28
29
|
this.striped = input(false, ...(ngDevMode ? [{ debugName: "striped" }] : /* istanbul ignore next */ []));
|
|
29
30
|
this.animated = input(false, ...(ngDevMode ? [{ debugName: "animated" }] : /* istanbul ignore next */ []));
|
|
31
|
+
this.ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
30
32
|
this.percentage = computed(() => {
|
|
31
33
|
const min = this.minimum();
|
|
32
34
|
const max = this.maximum();
|
|
@@ -40,7 +42,7 @@ class BsProgressBarComponent {
|
|
|
40
42
|
}, ...(ngDevMode ? [{ debugName: "colorClassComputed" }] : /* istanbul ignore next */ []));
|
|
41
43
|
}
|
|
42
44
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: BsProgressBarComponent, isStandalone: true, selector: "bs-progress-bar", inputs: { minimum: { classPropertyName: "minimum", publicName: "minimum", isSignal: true, isRequired: false, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.progress-bar": "true", "class.progress-bar-striped": "striped()", "class.progress-bar-animated": "animated()", "class": "colorClassComputed()", "style.width": "width()", "attr.role": "\"progressbar\"", "attr.aria-valuenow": "value()", "attr.aria-valuemin": "minimum()", "attr.aria-valuemax": "maximum()" } }, ngImport: i0, template: "", styles: ["@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}:host ::ng-deep .progress,:host ::ng-deep .progress-stacked{--bs-progress-height: 1rem;--bs-progress-font-size: .75rem;--bs-progress-bg: var(--bs-secondary-bg);--bs-progress-border-radius: var(--bs-border-radius);--bs-progress-box-shadow: var(--bs-box-shadow-inset);--bs-progress-bar-color: #fff;--bs-progress-bar-bg: #0d6efd;--bs-progress-bar-transition: width .6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}:host ::ng-deep .progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media(prefers-reduced-motion:reduce){:host ::ng-deep .progress-bar{transition:none}}:host ::ng-deep .progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}:host ::ng-deep .progress-stacked>.progress{overflow:visible}:host ::ng-deep .progress-stacked>.progress>.progress-bar{width:100%}:host ::ng-deep .progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media(prefers-reduced-motion:reduce){:host ::ng-deep .progress-bar-animated{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: BsProgressBarComponent, isStandalone: true, selector: "bs-progress-bar", inputs: { minimum: { classPropertyName: "minimum", publicName: "minimum", isSignal: true, isRequired: false, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.progress-bar": "true", "class.progress-bar-striped": "striped()", "class.progress-bar-animated": "animated()", "class": "colorClassComputed()", "style.width": "width()", "attr.role": "\"progressbar\"", "attr.aria-valuenow": "value()", "attr.aria-valuemin": "minimum()", "attr.aria-valuemax": "maximum()", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: "", styles: ["@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}:host ::ng-deep .progress,:host ::ng-deep .progress-stacked{--bs-progress-height: 1rem;--bs-progress-font-size: .75rem;--bs-progress-bg: var(--bs-secondary-bg);--bs-progress-border-radius: var(--bs-border-radius);--bs-progress-box-shadow: var(--bs-box-shadow-inset);--bs-progress-bar-color: #fff;--bs-progress-bar-bg: #0d6efd;--bs-progress-bar-transition: width .6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}:host ::ng-deep .progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media(prefers-reduced-motion:reduce){:host ::ng-deep .progress-bar{transition:none}}:host ::ng-deep .progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}:host ::ng-deep .progress-stacked>.progress{overflow:visible}:host ::ng-deep .progress-stacked>.progress>.progress-bar{width:100%}:host ::ng-deep .progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media(prefers-reduced-motion:reduce){:host ::ng-deep .progress-bar-animated{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
46
|
}
|
|
45
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsProgressBarComponent, decorators: [{
|
|
46
48
|
type: Component,
|
|
@@ -54,8 +56,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
54
56
|
'[attr.aria-valuenow]': 'value()',
|
|
55
57
|
'[attr.aria-valuemin]': 'minimum()',
|
|
56
58
|
'[attr.aria-valuemax]': 'maximum()',
|
|
59
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
57
60
|
}, template: "", styles: ["@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}:host ::ng-deep .progress,:host ::ng-deep .progress-stacked{--bs-progress-height: 1rem;--bs-progress-font-size: .75rem;--bs-progress-bg: var(--bs-secondary-bg);--bs-progress-border-radius: var(--bs-border-radius);--bs-progress-box-shadow: var(--bs-box-shadow-inset);--bs-progress-bar-color: #fff;--bs-progress-bar-bg: #0d6efd;--bs-progress-bar-transition: width .6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}:host ::ng-deep .progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media(prefers-reduced-motion:reduce){:host ::ng-deep .progress-bar{transition:none}}:host ::ng-deep .progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}:host ::ng-deep .progress-stacked>.progress{overflow:visible}:host ::ng-deep .progress-stacked>.progress>.progress-bar{width:100%}:host ::ng-deep .progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media(prefers-reduced-motion:reduce){:host ::ng-deep .progress-bar-animated{animation:none}}\n"] }]
|
|
58
|
-
}], propDecorators: { minimum: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimum", required: false }] }], maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }] } });
|
|
61
|
+
}], propDecorators: { minimum: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimum", required: false }] }], maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
59
62
|
|
|
60
63
|
/**
|
|
61
64
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-progress-bar.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/mintplayer-ng-bootstrap-progress-bar.ts"],"sourcesContent":["import { Component, input, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-progress',\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.height.px]': 'height()',\n '[class.d-block]': 'true',\n '[class.overflow-hidden]': 'true',\n },\n})\nexport class BsProgressComponent {\n readonly height = input<number | null>(null);\n readonly isIndeterminate = input(false);\n}\n","<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" aria-
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-progress-bar.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/mintplayer-ng-bootstrap-progress-bar.ts"],"sourcesContent":["import { Component, input, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-progress',\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.height.px]': 'height()',\n '[class.d-block]': 'true',\n '[class.overflow-hidden]': 'true',\n },\n})\nexport class BsProgressComponent {\n readonly height = input<number | null>(null);\n readonly isIndeterminate = input(false);\n readonly ariaLabel = input<string>('Loading');\n}\n","<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\n\n@Component({\n selector: 'bs-progress-bar',\n templateUrl: './progress-bar.component.html',\n styleUrls: ['./progress-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.progress-bar]': 'true',\n '[class.progress-bar-striped]': 'striped()',\n '[class.progress-bar-animated]': 'animated()',\n '[class]': 'colorClassComputed()',\n '[style.width]': 'width()',\n '[attr.role]': '\"progressbar\"',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-valuemin]': 'minimum()',\n '[attr.aria-valuemax]': 'maximum()',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class BsProgressBarComponent {\n\n minimum = input<number>(0);\n maximum = input<number>(100);\n value = input<number>(50);\n color = input<Color>(Color.primary);\n striped = input(false);\n animated = input(false);\n ariaLabel = input<string | null>(null);\n\n percentage = computed(() => {\n const min = this.minimum();\n const max = this.maximum();\n const val = this.value();\n return (val - min) / (max - min) * 100;\n });\n\n width = computed(() => `${this.percentage()}%`);\n\n colorClassComputed = computed(() => {\n const name = Color[this.color()];\n return `bg-${name}`;\n });\n}\n","","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,mBAAmB,CAAA;AAXhC,IAAA,WAAA,GAAA;AAYW,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAgB,IAAI,6EAAC;AACnC,QAAA,IAAA,CAA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AA,iBAAiB,EAAA,eAAA,EAGV,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,sBAAsB,EAAE,MAAM;AAC9B,wBAAA,8BAA8B,EAAE,WAAW;AAC3C,wBAAA,+BAA+B,EAAE,YAAY;AAC7C,wBAAA,SAAS,EAAE,sBAAsB;AACjC,wBAAA,eAAe,EAAE,SAAS;AAC1B,wBAAA,aAAa,EAAE,eAAe;AAC9B,wBAAA,sBAAsB,EAAE,SAAS;AACjC,wBAAA,sBAAsB,EAAE,WAAW;AACnC,wBAAA,sBAAsB,EAAE,WAAW;AACnC,wBAAA,mBAAmB,EAAE,aAAa;AACnC,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,MAAA,EAAA,CAAA,ujDAAA,CAAA,EAAA;;;AEnBH;;AAEG;;;;"}
|
|
@@ -57,14 +57,15 @@ class BsRangeComponent {
|
|
|
57
57
|
this.min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
58
58
|
this.max = input(10, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
59
59
|
this.step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
60
|
+
this.ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
60
61
|
}
|
|
61
62
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
62
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.11", type: BsRangeComponent, isStandalone: true, selector: "bs-range", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "slider", first: true, predicate: ["slider"], descendants: true, isSignal: true }], hostDirectives: [{ directive: BsRangeValueAccessor }], ngImport: i0, template: "<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" class=\"form-range\">\n", styles: [":host ::ng-deep .form-range{width:100%;height:1.5rem;padding:0;appearance:none;background-color:transparent}:host ::ng-deep .form-range:focus{outline:0}:host ::ng-deep .form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range::-moz-focus-outer{border:0}:host ::ng-deep .form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-webkit-slider-thumb{transition:none}}:host ::ng-deep .form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range::-moz-range-thumb{width:1rem;height:1rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-moz-range-thumb{transition:none}}:host ::ng-deep .form-range::-moz-range-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range:disabled{pointer-events:none}:host ::ng-deep .form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}:host ::ng-deep .form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
63
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.11", type: BsRangeComponent, isStandalone: true, selector: "bs-range", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "slider", first: true, predicate: ["slider"], descendants: true, isSignal: true }], hostDirectives: [{ directive: BsRangeValueAccessor }], ngImport: i0, template: "<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n", styles: [":host ::ng-deep .form-range{width:100%;height:1.5rem;padding:0;appearance:none;background-color:transparent}:host ::ng-deep .form-range:focus{outline:0}:host ::ng-deep .form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range::-moz-focus-outer{border:0}:host ::ng-deep .form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-webkit-slider-thumb{transition:none}}:host ::ng-deep .form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range::-moz-range-thumb{width:1rem;height:1rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-moz-range-thumb{transition:none}}:host ::ng-deep .form-range::-moz-range-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range:disabled{pointer-events:none}:host ::ng-deep .form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}:host ::ng-deep .form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
63
64
|
}
|
|
64
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRangeComponent, decorators: [{
|
|
65
66
|
type: Component,
|
|
66
|
-
args: [{ selector: 'bs-range', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsRangeValueAccessor], template: "<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" class=\"form-range\">\n", styles: [":host ::ng-deep .form-range{width:100%;height:1.5rem;padding:0;appearance:none;background-color:transparent}:host ::ng-deep .form-range:focus{outline:0}:host ::ng-deep .form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range::-moz-focus-outer{border:0}:host ::ng-deep .form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-webkit-slider-thumb{transition:none}}:host ::ng-deep .form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range::-moz-range-thumb{width:1rem;height:1rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-moz-range-thumb{transition:none}}:host ::ng-deep .form-range::-moz-range-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range:disabled{pointer-events:none}:host ::ng-deep .form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}:host ::ng-deep .form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}\n"] }]
|
|
67
|
-
}], propDecorators: { slider: [{ type: i0.ViewChild, args: ['slider', { isSignal: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }] } });
|
|
67
|
+
args: [{ selector: 'bs-range', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsRangeValueAccessor], template: "<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n", styles: [":host ::ng-deep .form-range{width:100%;height:1.5rem;padding:0;appearance:none;background-color:transparent}:host ::ng-deep .form-range:focus{outline:0}:host ::ng-deep .form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem #0d6efd40}:host ::ng-deep .form-range::-moz-focus-outer{border:0}:host ::ng-deep .form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-webkit-slider-thumb{transition:none}}:host ::ng-deep .form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range::-moz-range-thumb{width:1rem;height:1rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-range::-moz-range-thumb{transition:none}}:host ::ng-deep .form-range::-moz-range-thumb:active{background-color:#b6d4fe}:host ::ng-deep .form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}:host ::ng-deep .form-range:disabled{pointer-events:none}:host ::ng-deep .form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}:host ::ng-deep .form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}\n"] }]
|
|
68
|
+
}], propDecorators: { slider: [{ type: i0.ViewChild, args: ['slider', { isSignal: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/value-accessor/range-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.html","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsRangeComponent } from '../component/range.component';\n\n@Directive({\n selector: 'bs-range',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRangeValueAccessor),\n multi: true,\n }],\n host: {\n '(input)': 'onInputEvent($event)',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private host = inject(BsRangeComponent);\n\n onValueChange?: (value: number) => void;\n onTouched?: () => void;\n\n onInputEvent(ev: Event) {\n if (this.onValueChange) {\n const val = parseFloat((<HTMLInputElement>ev.target).value);\n this.onValueChange(val);\n }\n }\n\n //#region ControlValueAccessor implementation\n registerOnChange(fn: (_: any) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value?: number) {\n if (this.host.slider() && (typeof value === 'number')) {\n this.host.slider().nativeElement.value = value.toString();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n if (this.host.slider()) {\n this.host.slider().nativeElement.disabled = isDisabled;\n }\n }\n //#endregion\n\n}\n","import { Component, ElementRef, input, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { BsRangeValueAccessor } from '../value-accessor/range-value-accessor';\n\n@Component({\n selector: 'bs-range',\n templateUrl: './range.component.html',\n styleUrls: ['./range.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsRangeValueAccessor],\n})\nexport class BsRangeComponent {\n readonly slider = viewChild.required<ElementRef<HTMLInputElement>>('slider');\n\n readonly min = input(0);\n readonly max = input(10);\n readonly step = input(1);\n}\n","<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" class=\"form-range\">\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,oBAAoB,CAAA;AAXjC,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAkCxC,IAAA;AA7BC,IAAA,YAAY,CAAC,EAAS,EAAA;AACpB,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,MAAM,GAAG,GAAG,UAAU,CAAoB,EAAE,CAAC,MAAO,CAAC,KAAK,CAAC;AAC3D,YAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;QACzB;IACF;;AAGA,IAAA,gBAAgB,CAAC,EAAoB,EAAA;AACnC,QAAA,IAAI,CAAC,aAAa,GAAG,EAAE;IACzB;AAEA,IAAA,iBAAiB,CAAC,EAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;AAEA,IAAA,UAAU,CAAC,KAAc,EAAA;AACvB,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE;AACrD,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE;QAC3D;IACF;AAEA,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,QAAQ,GAAG,UAAU;QACxD;IACF;+GAhCW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,iHATpB,CAAC;AACV,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACnD,gBAAA,KAAK,EAAE,IAAI;aACZ,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAKS,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,SAAS,EAAE,CAAC;AACV,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE,IAAI;yBACZ,CAAC;AACF,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,sBAAsB;AAClC,qBAAA;AACF,iBAAA;;;MCJY,gBAAgB,CAAA;AAP7B,IAAA,WAAA,GAAA;AAQW,QAAA,IAAA,CAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAA+B,QAAQ,CAAC;AAEnE,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,CAAC,0EAAC;AACd,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,EAAE,0EAAC;AACf,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,CAAC,2EAAC;
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/value-accessor/range-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.html","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsRangeComponent } from '../component/range.component';\n\n@Directive({\n selector: 'bs-range',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRangeValueAccessor),\n multi: true,\n }],\n host: {\n '(input)': 'onInputEvent($event)',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private host = inject(BsRangeComponent);\n\n onValueChange?: (value: number) => void;\n onTouched?: () => void;\n\n onInputEvent(ev: Event) {\n if (this.onValueChange) {\n const val = parseFloat((<HTMLInputElement>ev.target).value);\n this.onValueChange(val);\n }\n }\n\n //#region ControlValueAccessor implementation\n registerOnChange(fn: (_: any) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value?: number) {\n if (this.host.slider() && (typeof value === 'number')) {\n this.host.slider().nativeElement.value = value.toString();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n if (this.host.slider()) {\n this.host.slider().nativeElement.disabled = isDisabled;\n }\n }\n //#endregion\n\n}\n","import { Component, ElementRef, input, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { BsRangeValueAccessor } from '../value-accessor/range-value-accessor';\n\n@Component({\n selector: 'bs-range',\n templateUrl: './range.component.html',\n styleUrls: ['./range.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsRangeValueAccessor],\n})\nexport class BsRangeComponent {\n readonly slider = viewChild.required<ElementRef<HTMLInputElement>>('slider');\n\n readonly min = input(0);\n readonly max = input(10);\n readonly step = input(1);\n readonly ariaLabel = input<string | null>(null);\n}\n","<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,oBAAoB,CAAA;AAXjC,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAkCxC,IAAA;AA7BC,IAAA,YAAY,CAAC,EAAS,EAAA;AACpB,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,MAAM,GAAG,GAAG,UAAU,CAAoB,EAAE,CAAC,MAAO,CAAC,KAAK,CAAC;AAC3D,YAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;QACzB;IACF;;AAGA,IAAA,gBAAgB,CAAC,EAAoB,EAAA;AACnC,QAAA,IAAI,CAAC,aAAa,GAAG,EAAE;IACzB;AAEA,IAAA,iBAAiB,CAAC,EAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;AAEA,IAAA,UAAU,CAAC,KAAc,EAAA;AACvB,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE;AACrD,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE;QAC3D;IACF;AAEA,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,QAAQ,GAAG,UAAU;QACxD;IACF;+GAhCW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,C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;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, signal, output, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, model, signal, output, viewChildren, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class BsRatingComponent {
|
|
5
5
|
constructor() {
|
|
@@ -7,6 +7,7 @@ class BsRatingComponent {
|
|
|
7
7
|
this.value = model(3, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
8
8
|
this.previewValue = signal(null, ...(ngDevMode ? [{ debugName: "previewValue" }] : /* istanbul ignore next */ []));
|
|
9
9
|
this.starsChange = output();
|
|
10
|
+
this.starButtons = viewChildren('star', ...(ngDevMode ? [{ debugName: "starButtons" }] : /* istanbul ignore next */ []));
|
|
10
11
|
this.stars = computed(() => {
|
|
11
12
|
const v = this.previewValue() ?? this.value();
|
|
12
13
|
const max = this.maximum();
|
|
@@ -29,8 +30,36 @@ class BsRatingComponent {
|
|
|
29
30
|
onMouseLeave() {
|
|
30
31
|
this.previewValue.set(null);
|
|
31
32
|
}
|
|
33
|
+
onKeydown(event) {
|
|
34
|
+
const max = this.maximum();
|
|
35
|
+
const cur = this.value();
|
|
36
|
+
let next = null;
|
|
37
|
+
switch (event.key) {
|
|
38
|
+
case 'ArrowRight':
|
|
39
|
+
case 'ArrowDown':
|
|
40
|
+
next = Math.min(cur + 1, max);
|
|
41
|
+
break;
|
|
42
|
+
case 'ArrowLeft':
|
|
43
|
+
case 'ArrowUp':
|
|
44
|
+
next = Math.max(cur - 1, 1);
|
|
45
|
+
break;
|
|
46
|
+
case 'Home':
|
|
47
|
+
next = 1;
|
|
48
|
+
break;
|
|
49
|
+
case 'End':
|
|
50
|
+
next = max;
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
if (next !== cur) {
|
|
57
|
+
this.value.set(next);
|
|
58
|
+
}
|
|
59
|
+
this.starButtons()[next - 1]?.nativeElement.focus();
|
|
60
|
+
}
|
|
32
61
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsRatingComponent, isStandalone: true, selector: "bs-rating", inputs: { maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", starsChange: "starsChange" }, host: { attributes: { "role": "radiogroup", "aria-label": "Rating" }, listeners: { "mouseleave": "onMouseLeave()" } }, ngImport: i0, template: "@for (star of stars(); let i = $index; track i) {\n <button type=\"button\"\n class=\"cursor-pointer btn-star\"\n role=\"radio\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"'Rate ' + (i + 1) + ' out of ' + maximum() + ' stars'\"\n [attr.aria-checked]=\"value() === (i + 1)\">\n <span aria-hidden=\"true\">{{ star ? '★' : '☆' }}</span>\n </button>\n}\n", styles: [".btn-star{background:none;border:none;padding:0;font-size:inherit;color:inherit;line-height:1}.btn-star:focus{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:2px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
62
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsRatingComponent, isStandalone: true, selector: "bs-rating", inputs: { maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", starsChange: "starsChange" }, host: { attributes: { "role": "radiogroup", "aria-label": "Rating" }, listeners: { "mouseleave": "onMouseLeave()", "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "starButtons", predicate: ["star"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (star of stars(); let i = $index; track i) {\n <button type=\"button\"\n #star\n class=\"cursor-pointer btn-star\"\n role=\"radio\"\n [attr.tabindex]=\"value() === (i + 1) ? 0 : -1\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"'Rate ' + (i + 1) + ' out of ' + maximum() + ' stars'\"\n [attr.aria-checked]=\"value() === (i + 1)\">\n <span aria-hidden=\"true\">{{ star ? '★' : '☆' }}</span>\n </button>\n}\n", styles: [".btn-star{background:none;border:none;padding:0;font-size:inherit;color:inherit;line-height:1}.btn-star:focus{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:2px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
34
63
|
}
|
|
35
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRatingComponent, decorators: [{
|
|
36
65
|
type: Component,
|
|
@@ -38,8 +67,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
38
67
|
'role': 'radiogroup',
|
|
39
68
|
'aria-label': 'Rating',
|
|
40
69
|
'(mouseleave)': 'onMouseLeave()',
|
|
41
|
-
|
|
42
|
-
|
|
70
|
+
'(keydown)': 'onKeydown($event)',
|
|
71
|
+
}, template: "@for (star of stars(); let i = $index; track i) {\n <button type=\"button\"\n #star\n class=\"cursor-pointer btn-star\"\n role=\"radio\"\n [attr.tabindex]=\"value() === (i + 1) ? 0 : -1\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"'Rate ' + (i + 1) + ' out of ' + maximum() + ' stars'\"\n [attr.aria-checked]=\"value() === (i + 1)\">\n <span aria-hidden=\"true\">{{ star ? '★' : '☆' }}</span>\n </button>\n}\n", styles: [".btn-star{background:none;border:none;padding:0;font-size:inherit;color:inherit;line-height:1}.btn-star:focus{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:2px}\n"] }]
|
|
72
|
+
}], ctorParameters: () => [], propDecorators: { maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], starsChange: [{ type: i0.Output, args: ["starsChange"] }], starButtons: [{ type: i0.ViewChildren, args: ['star', { isSignal: true }] }] } });
|
|
43
73
|
|
|
44
74
|
/**
|
|
45
75
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-rating.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/rating/src/component/rating.component.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/component/rating.component.html","../../../../libs/mintplayer-ng-bootstrap/rating/mintplayer-ng-bootstrap-rating.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, input, model, output, signal } from '@angular/core';\n\n@Component({\n selector: 'bs-rating',\n templateUrl: './rating.component.html',\n styleUrls: ['./rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'radiogroup',\n 'aria-label': 'Rating',\n '(mouseleave)': 'onMouseLeave()',\n },\n})\nexport class BsRatingComponent {\n\n constructor() {\n effect(() => {\n const v = this.previewValue() ?? this.value();\n this.starsChange.emit(v);\n });\n }\n\n maximum = input<number>(5);\n value = model<number>(3);\n previewValue = signal<number | null>(null);\n starsChange = output<number>();\n\n stars = computed(() => {\n const v = this.previewValue() ?? this.value();\n const max = this.maximum();\n return [\n ...[...Array(v).keys()].map(() => true),\n ...[...Array(max - v).keys()].map(() => false)\n ];\n });\n\n hoverValue(index: number) {\n this.previewValue.set(index + 1);\n }\n\n selectValue(index: number) {\n this.value.set(index + 1);\n }\n\n onMouseLeave() {\n this.previewValue.set(null);\n }\n}\n","@for (star of stars(); let i = $index; track i) {\n <button type=\"button\"\n class=\"cursor-pointer btn-star\"\n role=\"radio\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"'Rate ' + (i + 1) + ' out of ' + maximum() + ' stars'\"\n [attr.aria-checked]=\"value() === (i + 1)\">\n <span aria-hidden=\"true\">{{ star ? '★' : '☆' }}</span>\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-rating.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/rating/src/component/rating.component.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/component/rating.component.html","../../../../libs/mintplayer-ng-bootstrap/rating/mintplayer-ng-bootstrap-rating.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, input, model, output, signal, viewChildren } from '@angular/core';\n\n@Component({\n selector: 'bs-rating',\n templateUrl: './rating.component.html',\n styleUrls: ['./rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'radiogroup',\n 'aria-label': 'Rating',\n '(mouseleave)': 'onMouseLeave()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class BsRatingComponent {\n\n constructor() {\n effect(() => {\n const v = this.previewValue() ?? this.value();\n this.starsChange.emit(v);\n });\n }\n\n maximum = input<number>(5);\n value = model<number>(3);\n previewValue = signal<number | null>(null);\n starsChange = output<number>();\n\n readonly starButtons = viewChildren<ElementRef<HTMLButtonElement>>('star');\n\n stars = computed(() => {\n const v = this.previewValue() ?? this.value();\n const max = this.maximum();\n return [\n ...[...Array(v).keys()].map(() => true),\n ...[...Array(max - v).keys()].map(() => false)\n ];\n });\n\n hoverValue(index: number) {\n this.previewValue.set(index + 1);\n }\n\n selectValue(index: number) {\n this.value.set(index + 1);\n }\n\n onMouseLeave() {\n this.previewValue.set(null);\n }\n\n onKeydown(event: KeyboardEvent) {\n const max = this.maximum();\n const cur = this.value();\n let next: number | null = null;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n next = Math.min(cur + 1, max);\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n next = Math.max(cur - 1, 1);\n break;\n case 'Home':\n next = 1;\n break;\n case 'End':\n next = max;\n break;\n default:\n return;\n }\n event.preventDefault();\n if (next !== cur) {\n this.value.set(next);\n }\n this.starButtons()[next - 1]?.nativeElement.focus();\n }\n}\n","@for (star of stars(); let i = $index; track i) {\n <button type=\"button\"\n #star\n class=\"cursor-pointer btn-star\"\n role=\"radio\"\n [attr.tabindex]=\"value() === (i + 1) ? 0 : -1\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"'Rate ' + (i + 1) + ' out of ' + maximum() + ' stars'\"\n [attr.aria-checked]=\"value() === (i + 1)\">\n <span aria-hidden=\"true\">{{ star ? '★' : '☆' }}</span>\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAca,iBAAiB,CAAA;AAE5B,IAAA,WAAA,GAAA;AAOA,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,CAAC,8EAAC;AAC1B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,CAAC,4EAAC;AACxB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAgB,IAAI,mFAAC;QAC1C,IAAA,CAAA,WAAW,GAAG,MAAM,EAAU;AAErB,QAAA,IAAA,CAAA,WAAW,GAAG,YAAY,CAAgC,MAAM,kFAAC;AAE1E,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAK;YACpB,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAC7C,YAAA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,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5B3E;;AAEG;;;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, PLATFORM_ID, DestroyRef, signal, Directive } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Tracks `(prefers-reduced-motion: reduce)` live and exposes the result as a
|
|
7
|
+
* signal. Designed to be composed onto a host component via `hostDirectives`
|
|
8
|
+
* so the host can `inject(BsReducedMotionDirective)` and read `matches()` to
|
|
9
|
+
* gate animations / auto-advance / non-essential motion. SSR-safe — on the
|
|
10
|
+
* server (or in environments without `matchMedia`) the signal stays `false`.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* @Component({
|
|
14
|
+
* // ...
|
|
15
|
+
* hostDirectives: [BsReducedMotionDirective],
|
|
16
|
+
* })
|
|
17
|
+
* export class MyComponent {
|
|
18
|
+
* private readonly reducedMotion = inject(BsReducedMotionDirective);
|
|
19
|
+
* readonly animationsDisabled = computed(() => this.reducedMotion.matches());
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* Or attach as a template attribute and read via a template reference:
|
|
23
|
+
* <div bsReducedMotion #rm="bsReducedMotion">
|
|
24
|
+
* <span *ngIf="!rm.matches()">animated content</span>
|
|
25
|
+
* </div>
|
|
26
|
+
*/
|
|
27
|
+
class BsReducedMotionDirective {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.platformId = inject(PLATFORM_ID);
|
|
30
|
+
this.destroyRef = inject(DestroyRef);
|
|
31
|
+
this._matches = signal(false, ...(ngDevMode ? [{ debugName: "_matches" }] : /* istanbul ignore next */ []));
|
|
32
|
+
this.matches = this._matches.asReadonly();
|
|
33
|
+
if (isPlatformBrowser(this.platformId) &&
|
|
34
|
+
typeof window !== 'undefined' &&
|
|
35
|
+
typeof window.matchMedia === 'function') {
|
|
36
|
+
const mql = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
37
|
+
this._matches.set(mql.matches);
|
|
38
|
+
const listener = (e) => this._matches.set(e.matches);
|
|
39
|
+
mql.addEventListener('change', listener);
|
|
40
|
+
this.destroyRef.onDestroy(() => mql.removeEventListener('change', listener));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsReducedMotionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
44
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: BsReducedMotionDirective, isStandalone: true, selector: "[bsReducedMotion]", exportAs: ["bsReducedMotion"], ngImport: i0 }); }
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsReducedMotionDirective, decorators: [{
|
|
47
|
+
type: Directive,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: '[bsReducedMotion]',
|
|
50
|
+
exportAs: 'bsReducedMotion',
|
|
51
|
+
}]
|
|
52
|
+
}], ctorParameters: () => [] });
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Generated bundle index. Do not edit.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
export { BsReducedMotionDirective };
|
|
59
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-reduced-motion.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-reduced-motion.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/reduced-motion/src/reduced-motion.directive.ts","../../../../libs/mintplayer-ng-bootstrap/reduced-motion/mintplayer-ng-bootstrap-reduced-motion.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Directive, inject, PLATFORM_ID, signal, type Signal } from '@angular/core';\n\n/**\n * Tracks `(prefers-reduced-motion: reduce)` live and exposes the result as a\n * signal. Designed to be composed onto a host component via `hostDirectives`\n * so the host can `inject(BsReducedMotionDirective)` and read `matches()` to\n * gate animations / auto-advance / non-essential motion. SSR-safe — on the\n * server (or in environments without `matchMedia`) the signal stays `false`.\n *\n * Usage:\n * @Component({\n * // ...\n * hostDirectives: [BsReducedMotionDirective],\n * })\n * export class MyComponent {\n * private readonly reducedMotion = inject(BsReducedMotionDirective);\n * readonly animationsDisabled = computed(() => this.reducedMotion.matches());\n * }\n *\n * Or attach as a template attribute and read via a template reference:\n * <div bsReducedMotion #rm=\"bsReducedMotion\">\n * <span *ngIf=\"!rm.matches()\">animated content</span>\n * </div>\n */\n@Directive({\n selector: '[bsReducedMotion]',\n exportAs: 'bsReducedMotion',\n})\nexport class BsReducedMotionDirective {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n private readonly _matches = signal(false);\n\n readonly matches: Signal<boolean> = this._matches.asReadonly();\n\n constructor() {\n if (\n isPlatformBrowser(this.platformId) &&\n typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function'\n ) {\n const mql = window.matchMedia('(prefers-reduced-motion: reduce)');\n this._matches.set(mql.matches);\n const listener = (e: MediaQueryListEvent) => this._matches.set(e.matches);\n mql.addEventListener('change', listener);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', listener));\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;;;;;AAqBG;MAKU,wBAAwB,CAAA;AAOnC,IAAA,WAAA,GAAA;AANiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AAEhC,QAAA,IAAA,CAAA,OAAO,GAAoB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AAG5D,QAAA,IACE,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC;YAClC,OAAO,MAAM,KAAK,WAAW;AAC7B,YAAA,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EACvC;YACA,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC;YACjE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;AAC9B,YAAA,MAAM,QAAQ,GAAG,CAAC,CAAsB,KAAK,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;AACzE,YAAA,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC;AACxC,YAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC9E;IACF;+GAnBW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,iBAAiB;AAC5B,iBAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, signal, input, effect, Directive, ElementRef,
|
|
2
|
+
import { InjectionToken, inject, signal, input, computed, effect, Directive, ElementRef, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
const RESIZABLE = new InjectionToken('Resizable');
|
|
5
5
|
|
|
@@ -10,6 +10,30 @@ class BsResizeGlyphDirective {
|
|
|
10
10
|
this.positions = signal('', ...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
|
|
11
11
|
this.activeClass = signal(false, ...(ngDevMode ? [{ debugName: "activeClass" }] : /* istanbul ignore next */ []));
|
|
12
12
|
this.bsResizeGlyph = input([], ...(ngDevMode ? [{ debugName: "bsResizeGlyph" }] : /* istanbul ignore next */ []));
|
|
13
|
+
this.ariaOrientation = computed(() => {
|
|
14
|
+
const p = this.bsResizeGlyph();
|
|
15
|
+
if (p.length !== 1)
|
|
16
|
+
return null;
|
|
17
|
+
if (p[0] === 'top' || p[0] === 'bottom')
|
|
18
|
+
return 'horizontal';
|
|
19
|
+
if (p[0] === 'start' || p[0] === 'end')
|
|
20
|
+
return 'vertical';
|
|
21
|
+
return null;
|
|
22
|
+
}, ...(ngDevMode ? [{ debugName: "ariaOrientation" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.ariaLabel = computed(() => {
|
|
24
|
+
const p = [...this.bsResizeGlyph()].sort().join(' ');
|
|
25
|
+
switch (p) {
|
|
26
|
+
case 'top': return 'Resize from top edge';
|
|
27
|
+
case 'bottom': return 'Resize from bottom edge';
|
|
28
|
+
case 'start': return 'Resize from left edge';
|
|
29
|
+
case 'end': return 'Resize from right edge';
|
|
30
|
+
case 'start top': return 'Resize from top-left corner';
|
|
31
|
+
case 'end top': return 'Resize from top-right corner';
|
|
32
|
+
case 'bottom start': return 'Resize from bottom-left corner';
|
|
33
|
+
case 'bottom end': return 'Resize from bottom-right corner';
|
|
34
|
+
default: return 'Resize';
|
|
35
|
+
}
|
|
36
|
+
}, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
13
37
|
this.isBusy = false;
|
|
14
38
|
effect(() => {
|
|
15
39
|
const value = this.bsResizeGlyph();
|
|
@@ -197,8 +221,68 @@ class BsResizeGlyphDirective {
|
|
|
197
221
|
this.resizable.resizeAction = undefined;
|
|
198
222
|
this.activeClass.set(false);
|
|
199
223
|
}
|
|
224
|
+
/** Keyboard alternative to drag. Arrow keys resize by 10px from the corresponding edge. */
|
|
225
|
+
onKeydown(event) {
|
|
226
|
+
const positions = this.bsResizeGlyph();
|
|
227
|
+
const step = event.shiftKey ? 1 : 10;
|
|
228
|
+
let consumed = false;
|
|
229
|
+
const adjustWidth = (dx) => {
|
|
230
|
+
const el = this.resizable.element.nativeElement;
|
|
231
|
+
const rect = el.getBoundingClientRect();
|
|
232
|
+
this.resizable.width.set(Math.max(20, rect.width + dx));
|
|
233
|
+
};
|
|
234
|
+
const adjustHeight = (dy) => {
|
|
235
|
+
const el = this.resizable.element.nativeElement;
|
|
236
|
+
const rect = el.getBoundingClientRect();
|
|
237
|
+
this.resizable.height.set(Math.max(20, rect.height + dy));
|
|
238
|
+
};
|
|
239
|
+
switch (event.key) {
|
|
240
|
+
case 'ArrowRight':
|
|
241
|
+
if (positions.includes('end')) {
|
|
242
|
+
adjustWidth(step);
|
|
243
|
+
consumed = true;
|
|
244
|
+
}
|
|
245
|
+
else if (positions.includes('start')) {
|
|
246
|
+
adjustWidth(-step);
|
|
247
|
+
consumed = true;
|
|
248
|
+
}
|
|
249
|
+
break;
|
|
250
|
+
case 'ArrowLeft':
|
|
251
|
+
if (positions.includes('end')) {
|
|
252
|
+
adjustWidth(-step);
|
|
253
|
+
consumed = true;
|
|
254
|
+
}
|
|
255
|
+
else if (positions.includes('start')) {
|
|
256
|
+
adjustWidth(step);
|
|
257
|
+
consumed = true;
|
|
258
|
+
}
|
|
259
|
+
break;
|
|
260
|
+
case 'ArrowDown':
|
|
261
|
+
if (positions.includes('bottom')) {
|
|
262
|
+
adjustHeight(step);
|
|
263
|
+
consumed = true;
|
|
264
|
+
}
|
|
265
|
+
else if (positions.includes('top')) {
|
|
266
|
+
adjustHeight(-step);
|
|
267
|
+
consumed = true;
|
|
268
|
+
}
|
|
269
|
+
break;
|
|
270
|
+
case 'ArrowUp':
|
|
271
|
+
if (positions.includes('bottom')) {
|
|
272
|
+
adjustHeight(-step);
|
|
273
|
+
consumed = true;
|
|
274
|
+
}
|
|
275
|
+
else if (positions.includes('top')) {
|
|
276
|
+
adjustHeight(step);
|
|
277
|
+
consumed = true;
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
if (consumed)
|
|
282
|
+
event.preventDefault();
|
|
283
|
+
}
|
|
200
284
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsResizeGlyphDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
201
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: BsResizeGlyphDirective, isStandalone: true, selector: "[bsResizeGlyph]", inputs: { bsResizeGlyph: { classPropertyName: "bsResizeGlyph", publicName: "bsResizeGlyph", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "onMouseDown($event)", "touchstart": "onTouchStart($event)", "document:mousemove": "onMouseMove($event)", "touchmove": "onTouchMove($event)", "document:mouseup": "onMouseUp($event)", "touchend": "onTouchEnd($event)" }, properties: { "class": "positions()", "class.glyph": "true", "class.active": "activeClass()" } }, ngImport: i0 }); }
|
|
285
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: BsResizeGlyphDirective, isStandalone: true, selector: "[bsResizeGlyph]", inputs: { bsResizeGlyph: { classPropertyName: "bsResizeGlyph", publicName: "bsResizeGlyph", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "onMouseDown($event)", "touchstart": "onTouchStart($event)", "document:mousemove": "onMouseMove($event)", "touchmove": "onTouchMove($event)", "document:mouseup": "onMouseUp($event)", "touchend": "onTouchEnd($event)", "keydown": "onKeydown($event)" }, properties: { "class": "positions()", "class.glyph": "true", "class.active": "activeClass()", "attr.role": "\"separator\"", "attr.aria-label": "ariaLabel()", "attr.aria-orientation": "ariaOrientation()", "attr.tabindex": "\"0\"" } }, ngImport: i0 }); }
|
|
202
286
|
}
|
|
203
287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsResizeGlyphDirective, decorators: [{
|
|
204
288
|
type: Directive,
|
|
@@ -208,12 +292,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
208
292
|
'[class]': 'positions()',
|
|
209
293
|
'[class.glyph]': 'true',
|
|
210
294
|
'[class.active]': 'activeClass()',
|
|
295
|
+
'[attr.role]': '"separator"',
|
|
296
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
297
|
+
'[attr.aria-orientation]': 'ariaOrientation()',
|
|
298
|
+
'[attr.tabindex]': '"0"',
|
|
211
299
|
'(mousedown)': 'onMouseDown($event)',
|
|
212
300
|
'(touchstart)': 'onTouchStart($event)',
|
|
213
301
|
'(document:mousemove)': 'onMouseMove($event)',
|
|
214
302
|
'(touchmove)': 'onTouchMove($event)',
|
|
215
303
|
'(document:mouseup)': 'onMouseUp($event)',
|
|
216
304
|
'(touchend)': 'onTouchEnd($event)',
|
|
305
|
+
'(keydown)': 'onKeydown($event)',
|
|
217
306
|
},
|
|
218
307
|
}]
|
|
219
308
|
}], ctorParameters: () => [], propDecorators: { bsResizeGlyph: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsResizeGlyph", required: false }] }] } });
|