@mintplayer/ng-bootstrap 22.32.0 → 22.33.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 +3 -166
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -140
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +33 -63
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +23 -30
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +37 -22
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +25 -9
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +4 -8
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +157 -219
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +313 -212
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -15
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +12 -24
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +5 -9
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +9 -19
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +18 -32
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +52 -38
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +64 -119
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -38
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +44 -44
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +199 -16
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -261
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +30 -18
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +20 -90
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +52 -401
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +27 -50
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -10
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +26 -54
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +56 -267
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +47 -63
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +7 -15
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +232 -169
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +85 -47
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +47 -63
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +14 -22
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -181
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +8 -8
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +35 -40
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -101
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +29 -23
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +9 -13
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +103 -152
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +50 -157
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +159 -234
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +2 -22
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -81
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
- package/types/mintplayer-ng-bootstrap-alert.d.ts +20 -28
- package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -12
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +29 -8
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
- package/types/mintplayer-ng-bootstrap-card.d.ts +93 -78
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +143 -91
- package/types/mintplayer-ng-bootstrap-close.d.ts +16 -5
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +2 -6
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +2 -4
- package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
- package/types/mintplayer-ng-bootstrap-form.d.ts +32 -11
- package/types/mintplayer-ng-bootstrap-grid.d.ts +38 -31
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +28 -14
- package/types/mintplayer-ng-bootstrap-machine.d.ts +95 -4
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
- package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -86
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-nav.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +21 -6
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +15 -42
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +4 -3
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -35
- package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +5 -6
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +17 -16
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-popover.d.ts +35 -61
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +34 -19
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
- package/types/mintplayer-ng-bootstrap-range.d.ts +35 -13
- package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -51
- package/types/mintplayer-ng-bootstrap-select.d.ts +8 -7
- package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -19
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
- package/types/mintplayer-ng-bootstrap-table.d.ts +21 -12
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -7
- package/types/mintplayer-ng-bootstrap-toast.d.ts +92 -55
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
- package/calendar-month/package.json +0 -4
- package/dropdown-divider/package.json +0 -4
- package/dropdown-menu/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -30
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -169
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
- package/has-overlay/package.json +0 -4
- package/no-noscript/package.json +0 -4
- package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -9
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
|
@@ -1,82 +1,120 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, forwardRef, Directive,
|
|
3
|
-
import {
|
|
2
|
+
import { inject, ElementRef, signal, forwardRef, Directive, computed, model, input, numberAttribute, booleanAttribute, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { useHostAttrs, useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { rangeCore, rangeScopedStyles } from '@mintplayer/ui-core/range';
|
|
4
5
|
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
5
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The `ControlValueAccessor` of `bs-range` (a host directive of the generated
|
|
10
|
+
* component). The value is the slider's number.
|
|
11
|
+
*/
|
|
7
12
|
class BsRangeValueAccessor {
|
|
8
13
|
constructor() {
|
|
9
|
-
this.host = inject(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
14
|
+
this.host = inject(ElementRef).nativeElement;
|
|
15
|
+
/** A form control is bound: its value drives the slider, over the `value` input. */
|
|
16
|
+
this.bound = signal(false, /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []));
|
|
18
|
+
/** The value as the form control or the user last set it. */
|
|
19
|
+
this.viewValue = signal(0, /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
|
|
21
|
+
this.disabled = signal(false, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.onChange = () => undefined;
|
|
24
|
+
this.onTouched = () => undefined;
|
|
16
25
|
}
|
|
17
|
-
//#region ControlValueAccessor implementation
|
|
18
26
|
registerOnChange(fn) {
|
|
19
|
-
this.
|
|
27
|
+
this.bound.set(true);
|
|
28
|
+
this.onChange = fn;
|
|
20
29
|
}
|
|
21
30
|
registerOnTouched(fn) {
|
|
22
31
|
this.onTouched = fn;
|
|
23
32
|
}
|
|
33
|
+
setDisabledState(isDisabled) {
|
|
34
|
+
this.disabled.set(isDisabled);
|
|
35
|
+
}
|
|
24
36
|
writeValue(value) {
|
|
25
|
-
|
|
26
|
-
this.host.slider().nativeElement.value = value.toString();
|
|
27
|
-
}
|
|
37
|
+
this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);
|
|
28
38
|
}
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
onNativeInput(event) {
|
|
40
|
+
const target = event.target;
|
|
41
|
+
if (!(target instanceof HTMLInputElement) || target.type !== 'range' || !this.host.contains(target))
|
|
42
|
+
return;
|
|
43
|
+
const value = parseFloat(target.value);
|
|
44
|
+
if (Number.isNaN(value))
|
|
45
|
+
return;
|
|
46
|
+
this.viewValue.set(value);
|
|
47
|
+
this.onChange(value);
|
|
31
48
|
}
|
|
32
49
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRangeValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
33
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsRangeValueAccessor, isStandalone: true, selector: "
|
|
34
|
-
provide: NG_VALUE_ACCESSOR,
|
|
35
|
-
useExisting: forwardRef(() => BsRangeValueAccessor),
|
|
36
|
-
multi: true,
|
|
37
|
-
}], ngImport: i0 }); }
|
|
50
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsRangeValueAccessor, isStandalone: true, selector: "[bsRangeAccessor]", host: { listeners: { "input": "onNativeInput($event)", "focusout": "onTouched()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRangeValueAccessor), multi: true }], ngImport: i0 }); }
|
|
38
51
|
}
|
|
39
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRangeValueAccessor, decorators: [{
|
|
40
53
|
type: Directive,
|
|
41
54
|
args: [{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
useExisting: forwardRef(() => BsRangeValueAccessor),
|
|
46
|
-
multi: true,
|
|
47
|
-
}],
|
|
55
|
+
// Applied as a host directive only.
|
|
56
|
+
selector: '[bsRangeAccessor]',
|
|
57
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRangeValueAccessor), multi: true }],
|
|
48
58
|
host: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// invalid-after-touched mirror dead (audit 4.9 prerequisite).
|
|
53
|
-
'(focusout)': 'onTouched?.()',
|
|
59
|
+
// The native input's input and blur events bubble to the host.
|
|
60
|
+
'(input)': 'onNativeInput($event)',
|
|
61
|
+
'(focusout)': 'onTouched()',
|
|
54
62
|
},
|
|
55
63
|
}]
|
|
56
64
|
}] });
|
|
57
65
|
|
|
66
|
+
/*
|
|
67
|
+
* The Angular extension of the generated `bs-range` (#458 D10 escape hatch):
|
|
68
|
+
* Angular forms. A bound form control drives the value, and a disabled
|
|
69
|
+
* control disables the slider.
|
|
70
|
+
*/
|
|
71
|
+
const hostDirectives = [BsRangeValueAccessor];
|
|
72
|
+
function extendInputs(inputs) {
|
|
73
|
+
const accessor = inject(BsRangeValueAccessor, { self: true });
|
|
74
|
+
return computed(() => {
|
|
75
|
+
const value = inputs();
|
|
76
|
+
return {
|
|
77
|
+
...value,
|
|
78
|
+
value: accessor.bound() ? accessor.viewValue() : value.value,
|
|
79
|
+
disabled: value.disabled || accessor.disabled(),
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// GENERATED from the range manifest (range) by @mintplayer/nx-component-compiler. Do not edit.
|
|
85
|
+
/** Bootstrap's `.form-range`: a native slider from `min` to `max` in `step`s. `value` is two-way; `label` names it when no `<label for>` does. */
|
|
58
86
|
class BsRangeComponent {
|
|
87
|
+
#core;
|
|
59
88
|
constructor() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
...(ngDevMode ? [{ debugName: "
|
|
66
|
-
this.
|
|
67
|
-
...(ngDevMode ?
|
|
68
|
-
this.
|
|
69
|
-
...(ngDevMode ?
|
|
70
|
-
|
|
71
|
-
|
|
89
|
+
/** The host element. */
|
|
90
|
+
this.elementRef = inject(ElementRef);
|
|
91
|
+
/** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */
|
|
92
|
+
this.hostAttrs = useHostAttrs();
|
|
93
|
+
this.value = model(0, /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
95
|
+
this.min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
96
|
+
this.max = input(10, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
97
|
+
this.step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
98
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
99
|
+
this.label = input(null, /* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
101
|
+
this.#core = useCore(rangeCore, { inputs: extendInputs(() => ({ value: this.value(), min: this.min(), max: this.max(), step: this.step(), disabled: this.disabled(), label: this.label() })), idPrefix: 'bs-range', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'range' }), models: { value: this.value } });
|
|
102
|
+
/** The template's props. */
|
|
103
|
+
this.props = this.#core.props;
|
|
104
|
+
useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
|
|
105
|
+
useScopedStyles('range', rangeScopedStyles);
|
|
72
106
|
}
|
|
73
107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsRangeComponent, isStandalone: true, selector: "bs-range", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, hostDirectives: [{ directive: BsRangeValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/range/src/templates/range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"range\" [mpProps]=\"p_view.input\" [value]=\"p_view.value\" [mpHostAttrs]=\"hostAttrs\">\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
109
|
}
|
|
76
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRangeComponent, decorators: [{
|
|
77
111
|
type: Component,
|
|
78
|
-
args: [{ selector: 'bs-range', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives:
|
|
79
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
112
|
+
args: [{ selector: 'bs-range', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/range/src/templates/range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"range\" [mpProps]=\"p_view.input\" [value]=\"p_view.value\" [mpHostAttrs]=\"hostAttrs\">\n" }]
|
|
113
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
114
|
+
|
|
115
|
+
// GENERATED from the range manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
116
|
+
|
|
117
|
+
// Generated from @mintplayer/ui-core/range (#458 D10), plus the Angular forms accessor.
|
|
80
118
|
|
|
81
119
|
/**
|
|
82
120
|
* 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 // focusout is composed: the shadow input's blur reaches the host. The\n // stored onTouched was never CALLED before, which kept every\n // invalid-after-touched mirror dead (audit 4.9 prerequisite).\n '(focusout)': 'onTouched?.()',\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 (typeof value === 'number') {\n this.host.slider().nativeElement.value = value.toString();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n this.host.slider().nativeElement.disabled = isDisabled;\n }\n //#endregion\n\n}\n","import { Component, ElementRef, input, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { BsRangeValueAccessor } from '../value-accessor/range-value-accessor';\n\n@Component({\n selector: 'bs-range',\n templateUrl: './range.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsRangeValueAccessor],\n})\nexport class BsRangeComponent {\n constructor() {\n // #452: the forms partial ships with this component, scoped to the elements it stamps (data-mps=\"range\").\n useBootstrap(bootstrapForms);\n }\n\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 data-mps=\"range\" #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":";;;;;;MAmBa,oBAAoB,CAAA;AAfjC,IAAA,WAAA,GAAA;AAgBU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAgCxC,IAAA;AA3BC,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,OAAO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A,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjB7E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/range.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/range.angular.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/range.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/range.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, ElementRef, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * The `ControlValueAccessor` of `bs-range` (a host directive of the generated\n * component). The value is the slider's number.\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRangeAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRangeValueAccessor), multi: true }],\n host: {\n // The native input's input and blur events bubble to the host.\n '(input)': 'onNativeInput($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the slider, over the `value` input. */\n readonly bound = signal(false);\n /** The value as the form control or the user last set it. */\n readonly viewValue = signal(0);\n readonly disabled = signal(false);\n\n private onChange: (value: number) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: number) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: number | null): void {\n this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);\n }\n\n onNativeInput(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement) || target.type !== 'range' || !this.host.contains(target)) return;\n const value = parseFloat(target.value);\n if (Number.isNaN(value)) return;\n this.viewValue.set(value);\n this.onChange(value);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RangeInputs } from '@mintplayer/ui-core/range';\nimport { BsRangeValueAccessor } from './range.accessor';\n\n/*\n * The Angular extension of the generated `bs-range` (#458 D10 escape hatch):\n * Angular forms. A bound form control drives the value, and a disabled\n * control disables the slider.\n */\n\nexport const hostDirectives = [BsRangeValueAccessor];\n\nexport function extendInputs(inputs: () => RangeInputs): () => RangeInputs {\n const accessor = inject(BsRangeValueAccessor, { self: true });\n return computed<RangeInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the range manifest (range) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute } from '@angular/core';\nimport { MpPropsDirective, useCore, useHostAttrs, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { rangeCore, type RangeInputs, rangeScopedStyles } from '@mintplayer/ui-core/range';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../range.angular';\n\n/** Bootstrap's `.form-range`: a native slider from `min` to `max` in `step`s. `value` is two-way; `label` names it when no `<label for>` does. */\n@Component({\n selector: 'bs-range',\n templateUrl: './range.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRangeComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */\n protected readonly hostAttrs = useHostAttrs();\n\n readonly value = model<RangeInputs['value']>(0);\n readonly min = input<RangeInputs['min'], unknown>(0, { transform: (v: unknown) => numberAttribute(v) as RangeInputs['min'] });\n readonly max = input<RangeInputs['max'], unknown>(10, { transform: (v: unknown) => numberAttribute(v) as RangeInputs['max'] });\n readonly step = input<RangeInputs['step'], unknown>(1, { transform: (v: unknown) => numberAttribute(v) as RangeInputs['step'] });\n readonly disabled = input<RangeInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly label = input<RangeInputs['label']>(null);\n\n readonly #core = useCore(rangeCore, { inputs: ext_extendInputs(() => ({ value: this.value(), min: this.min(), max: this.max(), step: this.step(), disabled: this.disabled(), label: this.label() })), idPrefix: 'bs-range', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'range' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('range', rangeScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/range/src/templates/range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"range\" [mpProps]=\"p_view.input\" [value]=\"p_view.value\" [mpHostAttrs]=\"hostAttrs\">\n","// GENERATED from the range manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRangeComponent } from './range.component.generated';\n","// Generated from @mintplayer/ui-core/range (#458 D10), plus the Angular forms accessor.\nexport * from './generated';\nexport { BsRangeValueAccessor } from './range.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsRangeValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;AAGA;;;AAGG;MAWU,oBAAoB,CAAA;AAVjC,IAAA,WAAA,GAAA;AAWmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;;QAGxE,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;;QAErB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,SAAS;AAC3D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA2BxC,IAAA;AAzBC,IAAA,gBAAgB,CAAC,EAA2B,EAAA;AAC1C,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;AACpB,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;IACpB;AAEA,IAAA,iBAAiB,CAAC,EAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;AAEA,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC;IAC/B;AAEA,IAAA,UAAU,CAAC,KAAoB,EAAA;QAC7B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IACnF;AAEA,IAAA,aAAa,CAAC,KAAY,EAAA;AACxB,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM;QAC3B,IAAI,EAAE,MAAM,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,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;+BACE,UAAU,EAAA,OAAA,EAEX,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,kRAAA,EAAA;;;AEbpC;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -1,178 +1,121 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, forwardRef, Directive,
|
|
2
|
+
import { inject, ElementRef, signal, forwardRef, Directive, computed, model, input, numberAttribute, booleanAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { RATING_VALUE_ATTR, ratingCore, ratingScopedStyles } from '@mintplayer/ui-core/rating';
|
|
3
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* component reads `written` and `disabled`, and reports user picks through
|
|
9
|
-
* `changed`; a form write never echoes back as a change.
|
|
8
|
+
* The `ControlValueAccessor` of `bs-rating` (a host directive of the generated
|
|
9
|
+
* component). The value is the picked star, 0 for none.
|
|
10
10
|
*/
|
|
11
11
|
class BsRatingValueAccessor {
|
|
12
12
|
constructor() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
this.host = inject(ElementRef).nativeElement;
|
|
14
|
+
/** A form control is bound: its value drives the stars, over the `value` input. */
|
|
15
|
+
this.bound = signal(false, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []));
|
|
17
|
+
/** The value as the form control or the user last set it. */
|
|
18
|
+
this.viewValue = signal(0, /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
|
|
16
20
|
this.disabled = signal(false, /* @ts-ignore */
|
|
17
21
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
22
|
+
this.onChange = () => undefined;
|
|
23
|
+
this.onTouched = () => undefined;
|
|
18
24
|
}
|
|
19
|
-
changed(value) {
|
|
20
|
-
this.onChange?.(value);
|
|
21
|
-
}
|
|
22
|
-
//#region ControlValueAccessor implementation
|
|
23
25
|
registerOnChange(fn) {
|
|
26
|
+
this.bound.set(true);
|
|
24
27
|
this.onChange = fn;
|
|
25
28
|
}
|
|
26
29
|
registerOnTouched(fn) {
|
|
27
30
|
this.onTouched = fn;
|
|
28
31
|
}
|
|
29
|
-
writeValue(value) {
|
|
30
|
-
this.written.set(typeof value === 'number' ? value : 0);
|
|
31
|
-
}
|
|
32
32
|
setDisabledState(isDisabled) {
|
|
33
33
|
this.disabled.set(isDisabled);
|
|
34
34
|
}
|
|
35
|
+
writeValue(value) {
|
|
36
|
+
this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);
|
|
37
|
+
}
|
|
38
|
+
onNativeChange(event) {
|
|
39
|
+
const target = event.target;
|
|
40
|
+
if (!(target instanceof HTMLInputElement) || !target.hasAttribute(RATING_VALUE_ATTR) || !this.host.contains(target))
|
|
41
|
+
return;
|
|
42
|
+
const value = Number(target.value);
|
|
43
|
+
this.viewValue.set(value);
|
|
44
|
+
this.onChange(value);
|
|
45
|
+
}
|
|
35
46
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRatingValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
36
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsRatingValueAccessor, isStandalone: true, host: { listeners: { "focusout": "onTouched
|
|
37
|
-
provide: NG_VALUE_ACCESSOR,
|
|
38
|
-
useExisting: forwardRef(() => BsRatingValueAccessor),
|
|
39
|
-
multi: true,
|
|
40
|
-
}], ngImport: i0 }); }
|
|
47
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsRatingValueAccessor, isStandalone: true, selector: "[bsRatingAccessor]", host: { listeners: { "change": "onNativeChange($event)", "focusout": "onTouched()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRatingValueAccessor), multi: true }], ngImport: i0 }); }
|
|
41
48
|
}
|
|
42
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRatingValueAccessor, decorators: [{
|
|
43
50
|
type: Directive,
|
|
44
51
|
args: [{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
multi: true,
|
|
49
|
-
}],
|
|
52
|
+
// Applied as a host directive only.
|
|
53
|
+
selector: '[bsRatingAccessor]',
|
|
54
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRatingValueAccessor), multi: true }],
|
|
50
55
|
host: {
|
|
51
|
-
'
|
|
56
|
+
// The radios' change and blur events bubble to the host.
|
|
57
|
+
'(change)': 'onNativeChange($event)',
|
|
58
|
+
'(focusout)': 'onTouched()',
|
|
52
59
|
},
|
|
53
60
|
}]
|
|
54
61
|
}] });
|
|
55
62
|
|
|
63
|
+
/*
|
|
64
|
+
* The Angular extension of the generated `bs-rating` (#458 D10 escape hatch):
|
|
65
|
+
* Angular forms. A bound form control drives the value, and a disabled
|
|
66
|
+
* control disables the stars.
|
|
67
|
+
*/
|
|
68
|
+
const hostDirectives = [BsRatingValueAccessor];
|
|
69
|
+
function extendInputs(inputs) {
|
|
70
|
+
const accessor = inject(BsRatingValueAccessor, { self: true });
|
|
71
|
+
return computed(() => {
|
|
72
|
+
const value = inputs();
|
|
73
|
+
return {
|
|
74
|
+
...value,
|
|
75
|
+
value: accessor.bound() ? accessor.viewValue() : value.value,
|
|
76
|
+
disabled: value.disabled || accessor.disabled(),
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// GENERATED from the rating manifest (rating) by @mintplayer/nx-component-compiler. Do not edit.
|
|
82
|
+
/** A star rating as native radios in a radiogroup: `value` (two-way, 0 for none) out of `maximum`. Works without JavaScript. */
|
|
56
83
|
class BsRatingComponent {
|
|
84
|
+
#core;
|
|
57
85
|
constructor() {
|
|
58
|
-
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
...(ngDevMode ?
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
/** The host element. */
|
|
87
|
+
this.elementRef = inject(ElementRef);
|
|
88
|
+
this.value = model(0, /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
90
|
+
this.maximum = input(5, { ...(ngDevMode ? { debugName: "maximum" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
91
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
92
|
+
/** The radios' form name; null derives one from the id. */
|
|
93
|
+
this.name = input(null, /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
95
|
+
/** Names the radiogroup; a consumer `aria-label` wins. */
|
|
96
|
+
this.label = input('Rating', /* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
98
|
+
/** Each star's accessible name, as a formatter (word order differs across languages). */
|
|
68
99
|
this.starLabel = input((star, maximum) => `Rate ${star} out of ${maximum} stars`, /* @ts-ignore */
|
|
69
100
|
...(ngDevMode ? [{ debugName: "starLabel" }] : /* istanbul ignore next */ []));
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.value
|
|
73
|
-
|
|
74
|
-
this.
|
|
75
|
-
|
|
76
|
-
this.starsChange = output();
|
|
77
|
-
this.starButtons = viewChildren('star', /* @ts-ignore */
|
|
78
|
-
...(ngDevMode ? [{ debugName: "starButtons" }] : /* istanbul ignore next */ []));
|
|
79
|
-
/**
|
|
80
|
-
* Exactly one star must stay tabbable or the whole widget leaves the tab
|
|
81
|
-
* order: with no value set, the old binding gave EVERY star tabindex="-1"
|
|
82
|
-
* and the rating could never be entered by keyboard (the audit's bs-rating
|
|
83
|
-
* Critical, and the reason RovingFocus's first-enabled fallback exists).
|
|
84
|
-
*/
|
|
85
|
-
this.starTabIndexes = computed(() => {
|
|
86
|
-
const v = this.value();
|
|
87
|
-
const max = this.maximum();
|
|
88
|
-
return [...Array(max).keys()].map((i) => (v ? v === i + 1 : i === 0) ? 0 : -1);
|
|
89
|
-
}, /* @ts-ignore */
|
|
90
|
-
...(ngDevMode ? [{ debugName: "starTabIndexes" }] : /* istanbul ignore next */ []));
|
|
91
|
-
/** Hoisted per the computed-over-inline-expression rule. */
|
|
92
|
-
this.starLabels = computed(() => {
|
|
93
|
-
const format = this.starLabel();
|
|
94
|
-
const max = this.maximum();
|
|
95
|
-
return [...Array(max).keys()].map((i) => format(i + 1, max));
|
|
96
|
-
}, /* @ts-ignore */
|
|
97
|
-
...(ngDevMode ? [{ debugName: "starLabels" }] : /* istanbul ignore next */ []));
|
|
98
|
-
this.stars = computed(() => {
|
|
99
|
-
const v = this.previewValue() ?? this.value();
|
|
100
|
-
const max = this.maximum();
|
|
101
|
-
return [
|
|
102
|
-
...[...Array(v).keys()].map(() => true),
|
|
103
|
-
...[...Array(max - v).keys()].map(() => false)
|
|
104
|
-
];
|
|
105
|
-
}, /* @ts-ignore */
|
|
106
|
-
...(ngDevMode ? [{ debugName: "stars" }] : /* istanbul ignore next */ []));
|
|
107
|
-
// A form write lands in the model without echoing back to the form.
|
|
108
|
-
effect(() => {
|
|
109
|
-
const written = this.accessor.written();
|
|
110
|
-
if (written !== undefined)
|
|
111
|
-
untracked(() => this.value.set(written));
|
|
112
|
-
});
|
|
113
|
-
effect(() => {
|
|
114
|
-
const v = this.previewValue() ?? this.value();
|
|
115
|
-
this.starsChange.emit(v);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
hoverValue(index) {
|
|
119
|
-
if (this.disabled())
|
|
120
|
-
return;
|
|
121
|
-
this.previewValue.set(index + 1);
|
|
122
|
-
}
|
|
123
|
-
selectValue(index) {
|
|
124
|
-
this.pick(index + 1);
|
|
125
|
-
}
|
|
126
|
-
pick(value) {
|
|
127
|
-
this.value.set(value);
|
|
128
|
-
this.accessor.changed(value);
|
|
129
|
-
}
|
|
130
|
-
onMouseLeave() {
|
|
131
|
-
this.previewValue.set(null);
|
|
132
|
-
}
|
|
133
|
-
onKeydown(event) {
|
|
134
|
-
if (this.disabled())
|
|
135
|
-
return;
|
|
136
|
-
const max = this.maximum();
|
|
137
|
-
const cur = this.value();
|
|
138
|
-
let next = null;
|
|
139
|
-
switch (event.key) {
|
|
140
|
-
case 'ArrowRight':
|
|
141
|
-
case 'ArrowDown':
|
|
142
|
-
next = Math.min(cur + 1, max);
|
|
143
|
-
break;
|
|
144
|
-
case 'ArrowLeft':
|
|
145
|
-
case 'ArrowUp':
|
|
146
|
-
next = Math.max(cur - 1, 1);
|
|
147
|
-
break;
|
|
148
|
-
case 'Home':
|
|
149
|
-
next = 1;
|
|
150
|
-
break;
|
|
151
|
-
case 'End':
|
|
152
|
-
next = max;
|
|
153
|
-
break;
|
|
154
|
-
default:
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
event.preventDefault();
|
|
158
|
-
if (next !== cur) {
|
|
159
|
-
this.pick(next);
|
|
160
|
-
}
|
|
161
|
-
this.starButtons()[next - 1]?.nativeElement.focus();
|
|
101
|
+
/** The star under the pointer; null when it leaves. */
|
|
102
|
+
this.previewChange = output();
|
|
103
|
+
this.#core = useCore(ratingCore, { inputs: extendInputs(() => ({ value: this.value(), maximum: this.maximum(), disabled: this.disabled(), name: this.name(), label: this.label(), starLabel: this.starLabel() })), idPrefix: 'bs-rating', outputs: { previewChange: this.previewChange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'rating' }), models: { value: this.value } });
|
|
104
|
+
/** The template's props. */
|
|
105
|
+
this.props = this.#core.props;
|
|
106
|
+
useScopedStyles('rating', ratingScopedStyles);
|
|
162
107
|
}
|
|
163
108
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsRatingComponent, isStandalone: true, selector: "bs-rating", inputs: {
|
|
109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsRatingComponent, isStandalone: true, selector: "bs-rating", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, starLabel: { classPropertyName: "starLabel", publicName: "starLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", previewChange: "previewChange" }, hostDirectives: [{ directive: BsRatingValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/rating/src/templates/rating.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@for (star of p_view.stars; track star.key) {\n <label data-mps=\"rating\" [mpProps]=\"star.star\">\n <input data-mps=\"rating\" [mpProps]=\"star.input\" [checked]=\"star.checked\">\n <span data-mps=\"rating\" aria-hidden=\"true\">\n \u2605\n </span>\n </label>\n}\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
165
110
|
}
|
|
166
111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRatingComponent, decorators: [{
|
|
167
112
|
type: Component,
|
|
168
|
-
args: [{ selector: 'bs-rating', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}, 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 [disabled]=\"disabled()\"\n [attr.tabindex]=\"starTabIndexes()[i]\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"starLabels()[i]\"\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"] }]
|
|
175
|
-
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], starLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "starLabel", required: false }] }], 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 }] }] } });
|
|
113
|
+
args: [{ selector: 'bs-rating', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/rating/src/templates/rating.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@for (star of p_view.stars; track star.key) {\n <label data-mps=\"rating\" [mpProps]=\"star.star\">\n <input data-mps=\"rating\" [mpProps]=\"star.input\" [checked]=\"star.checked\">\n <span data-mps=\"rating\" aria-hidden=\"true\">\n \u2605\n </span>\n </label>\n}\n" }]
|
|
114
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], starLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "starLabel", required: false }] }], previewChange: [{ type: i0.Output, args: ["previewChange"] }] } });
|
|
115
|
+
|
|
116
|
+
// GENERATED from the rating manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
117
|
+
|
|
118
|
+
// Generated from @mintplayer/ui-core/rating (#458 D10), plus the Angular forms accessor.
|
|
176
119
|
|
|
177
120
|
/**
|
|
178
121
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-rating.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/rating/src/value-accessor/rating-value-accessor.ts","../../../../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 { Directive, forwardRef, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * Angular forms for `bs-rating`, attached as a host directive so `ngModel`,\n * `formControl` and `formControlName` work without an extra import. The\n * component reads `written` and `disabled`, and reports user picks through\n * `changed`; a form write never echoes back as a change.\n */\n@Directive({\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRatingValueAccessor),\n multi: true,\n }],\n host: {\n '(focusout)': 'onTouched?.()',\n },\n})\nexport class BsRatingValueAccessor implements ControlValueAccessor {\n /** The last value a form wrote; `undefined` until one does. */\n readonly written = signal<number | undefined>(undefined);\n readonly disabled = signal(false);\n\n private onChange?: (value: number) => void;\n onTouched?: () => void;\n\n changed(value: number) {\n this.onChange?.(value);\n }\n\n //#region ControlValueAccessor implementation\n registerOnChange(fn: (value: number) => void) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value: number | null | undefined) {\n this.written.set(typeof value === 'number' ? value : 0);\n }\n\n setDisabledState(isDisabled: boolean) {\n this.disabled.set(isDisabled);\n }\n //#endregion\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, output, signal, untracked, viewChildren } from '@angular/core';\nimport { BsRatingValueAccessor } from '../value-accessor/rating-value-accessor';\n\n@Component({\n selector: 'bs-rating',\n templateUrl: './rating.component.html',\n styleUrls: ['./rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsRatingValueAccessor],\n host: {\n '[attr.aria-disabled]': 'disabled() || null',\n 'role': 'radiogroup',\n '[attr.aria-label]': 'ariaLabel()',\n '(mouseleave)': 'onMouseLeave()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class BsRatingComponent {\n\n private readonly accessor = inject(BsRatingValueAccessor, { self: true });\n readonly disabled = this.accessor.disabled.asReadonly();\n\n constructor() {\n // A form write lands in the model without echoing back to the form.\n effect(() => {\n const written = this.accessor.written();\n if (written !== undefined) untracked(() => this.value.set(written));\n });\n effect(() => {\n const v = this.previewValue() ?? this.value();\n this.starsChange.emit(v);\n });\n }\n\n /** Accessible name for the radiogroup. Override for localisation. */\n ariaLabel = input<string>('Rating');\n /**\n * Per-star accessible name. A formatter, not a prefix/suffix pair, because\n * word order differs across languages and an interpolated middle cannot be\n * expressed any other way.\n */\n starLabel = input<(star: number, maximum: number) => string>(\n (star, maximum) => `Rate ${star} out of ${maximum} stars`,\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 /**\n * Exactly one star must stay tabbable or the whole widget leaves the tab\n * order: with no value set, the old binding gave EVERY star tabindex=\"-1\"\n * and the rating could never be entered by keyboard (the audit's bs-rating\n * Critical, and the reason RovingFocus's first-enabled fallback exists).\n */\n readonly starTabIndexes = computed(() => {\n const v = this.value();\n const max = this.maximum();\n return [...Array(max).keys()].map((i) => (v ? v === i + 1 : i === 0) ? 0 : -1);\n });\n\n /** Hoisted per the computed-over-inline-expression rule. */\n readonly starLabels = computed(() => {\n const format = this.starLabel();\n const max = this.maximum();\n return [...Array(max).keys()].map((i) => format(i + 1, max));\n });\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 if (this.disabled()) return;\n this.previewValue.set(index + 1);\n }\n\n selectValue(index: number) {\n this.pick(index + 1);\n }\n\n private pick(value: number) {\n this.value.set(value);\n this.accessor.changed(value);\n }\n\n onMouseLeave() {\n this.previewValue.set(null);\n }\n\n onKeydown(event: KeyboardEvent) {\n if (this.disabled()) return;\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.pick(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 [disabled]=\"disabled()\"\n [attr.tabindex]=\"starTabIndexes()[i]\"\n (mouseenter)=\"hoverValue(i)\"\n (click)=\"selectValue(i)\"\n [attr.aria-label]=\"starLabels()[i]\"\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":";;;;AAGA;;;;;AAKG;MAWU,qBAAqB,CAAA;AAVlC,IAAA,WAAA,GAAA;;QAYW,IAAA,CAAA,OAAO,GAAG,MAAM,CAAqB,SAAS;oFAAC;QAC/C,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AA0BlC,IAAA;AArBC,IAAA,OAAO,CAAC,KAAa,EAAA;AACnB,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB;;AAGA,IAAA,gBAAgB,CAAC,EAA2B,EAAA;AAC1C,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;IACpB;AAEA,IAAA,iBAAiB,CAAC,EAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;AAEA,IAAA,UAAU,CAAC,KAAgC,EAAA;AACzC,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;IACzD;AAEA,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,CAAC,QAAQ,CAAC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;2FDGa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;+BACE,WAAW,EAAA,eAAA,EAGJ,uBAAuB,CAAC,MAAM,kBAC/B,CAAC,qBAAqB,CAAC,EAAA,IAAA,EACjC;AACJ,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,MAAM,EAAE,YAAY;AACpB,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,QAAA,EAAA,ygBAAA,EAAA,MAAA,EAAA,CAAA,kLAAA,CAAA,EAAA;ykBAmCkE,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElD3E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-rating.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/rating/src/rating.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/rating.angular.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/rating.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/rating.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/rating/mintplayer-ng-bootstrap-rating.ts"],"sourcesContent":["import { Directive, ElementRef, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RATING_VALUE_ATTR } from '@mintplayer/ui-core/rating';\n\n/**\n * The `ControlValueAccessor` of `bs-rating` (a host directive of the generated\n * component). The value is the picked star, 0 for none.\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRatingAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRatingValueAccessor), multi: true }],\n host: {\n // The radios' change and blur events bubble to the host.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRatingValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the stars, over the `value` input. */\n readonly bound = signal(false);\n /** The value as the form control or the user last set it. */\n readonly viewValue = signal(0);\n readonly disabled = signal(false);\n\n private onChange: (value: number) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: number) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: number | null): void {\n this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);\n }\n\n onNativeChange(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement) || !target.hasAttribute(RATING_VALUE_ATTR) || !this.host.contains(target)) return;\n const value = Number(target.value);\n this.viewValue.set(value);\n this.onChange(value);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RatingInputs } from '@mintplayer/ui-core/rating';\nimport { BsRatingValueAccessor } from './rating.accessor';\n\n/*\n * The Angular extension of the generated `bs-rating` (#458 D10 escape hatch):\n * Angular forms. A bound form control drives the value, and a disabled\n * control disables the stars.\n */\n\nexport const hostDirectives = [BsRatingValueAccessor];\n\nexport function extendInputs(inputs: () => RatingInputs): () => RatingInputs {\n const accessor = inject(BsRatingValueAccessor, { self: true });\n return computed<RatingInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the rating manifest (rating) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { ratingCore, type RatingInputs, ratingScopedStyles } from '@mintplayer/ui-core/rating';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../rating.angular';\n\n/** A star rating as native radios in a radiogroup: `value` (two-way, 0 for none) out of `maximum`. Works without JavaScript. */\n@Component({\n selector: 'bs-rating',\n templateUrl: './rating.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRatingComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<RatingInputs['value']>(0);\n readonly maximum = input<RatingInputs['maximum'], unknown>(5, { transform: (v: unknown) => numberAttribute(v) as RatingInputs['maximum'] });\n readonly disabled = input<RatingInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n /** The radios' form name; null derives one from the id. */\n readonly name = input<RatingInputs['name']>(null);\n /** Names the radiogroup; a consumer `aria-label` wins. */\n readonly label = input<RatingInputs['label']>('Rating');\n /** Each star's accessible name, as a formatter (word order differs across languages). */\n readonly starLabel = input<RatingInputs['starLabel']>((star: number, maximum: number) => `Rate ${star} out of ${maximum} stars`);\n /** The star under the pointer; null when it leaves. */\n readonly previewChange = output<number | null>();\n\n readonly #core = useCore(ratingCore, { inputs: ext_extendInputs(() => ({ value: this.value(), maximum: this.maximum(), disabled: this.disabled(), name: this.name(), label: this.label(), starLabel: this.starLabel() })), idPrefix: 'bs-rating', outputs: { previewChange: this.previewChange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'rating' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('rating', ratingScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/rating/src/templates/rating.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@for (star of p_view.stars; track star.key) {\n <label data-mps=\"rating\" [mpProps]=\"star.star\">\n <input data-mps=\"rating\" [mpProps]=\"star.input\" [checked]=\"star.checked\">\n <span data-mps=\"rating\" aria-hidden=\"true\">\n ★\n </span>\n </label>\n}\n","// GENERATED from the rating manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRatingComponent } from './rating.component.generated';\n","// Generated from @mintplayer/ui-core/rating (#458 D10), plus the Angular forms accessor.\nexport * from './generated';\nexport { BsRatingValueAccessor } from './rating.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsRatingValueAccessor","ext_hostDirectives"],"mappings":";;;;;;AAIA;;;AAGG;MAWU,qBAAqB,CAAA;AAVlC,IAAA,WAAA,GAAA;AAWmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;;QAGxE,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;;QAErB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,SAAS;AAC3D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA0BxC,IAAA;AAxBC,IAAA,gBAAgB,CAAC,EAA2B,EAAA;AAC1C,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;AACpB,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;IACpB;AAEA,IAAA,iBAAiB,CAAC,EAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;AAEA,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC;IAC/B;AAEA,IAAA,UAAU,CAAC,KAAoB,EAAA;QAC7B,IAAI,CAAC,SAAS,C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