@angular/material 20.2.0-next.3 → 20.2.0-rc.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/button/testing/index.d.ts +9 -1
- package/chips/index.d.ts +3 -3
- package/fesm2022/animation.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +13 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +13 -13
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +7 -7
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +52 -49
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module.mjs +4 -4
- package/fesm2022/common-module.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +12 -12
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats.mjs.map +1 -1
- package/fesm2022/date-range-input-harness.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +82 -82
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog-module.mjs +25 -25
- package/fesm2022/dialog-module.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options.mjs +6 -6
- package/fesm2022/error-options.mjs.map +1 -1
- package/fesm2022/error-state.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field-module.mjs +4 -4
- package/fesm2022/form-field-module.mjs.map +1 -1
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/form-field2.mjs +30 -30
- package/fesm2022/form-field2.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button.mjs +6 -6
- package/fesm2022/icon-button.mjs.map +1 -1
- package/fesm2022/icon-registry.mjs +3 -3
- package/fesm2022/icon-registry.mjs.map +1 -1
- package/fesm2022/icon.mjs +7 -7
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness.mjs.map +1 -1
- package/fesm2022/input-value-accessor.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field.mjs +3 -3
- package/fesm2022/internal-form-field.mjs.map +1 -1
- package/fesm2022/line.mjs +7 -7
- package/fesm2022/line.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +22 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/option-harness.mjs.map +1 -1
- package/fesm2022/option-module.mjs +4 -4
- package/fesm2022/option-module.mjs.map +1 -1
- package/fesm2022/option.mjs +6 -6
- package/fesm2022/option.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module.mjs +4 -4
- package/fesm2022/pseudo-checkbox-module.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox.mjs +3 -3
- package/fesm2022/pseudo-checkbox.mjs.map +1 -1
- package/fesm2022/public-api.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-loader.mjs +3 -3
- package/fesm2022/ripple-loader.mjs.map +1 -1
- package/fesm2022/ripple-module.mjs +4 -4
- package/fesm2022/ripple-module.mjs.map +1 -1
- package/fesm2022/ripple.mjs +6 -6
- package/fesm2022/ripple.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select-module.mjs +10 -10
- package/fesm2022/select-module.mjs.map +1 -1
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +7 -7
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +46 -33
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles.mjs +3 -3
- package/fesm2022/structural-styles.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +43 -43
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +13 -13
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip-module.mjs +10 -10
- package/fesm2022/tooltip-module.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/stepper/index.d.ts +3 -0
|
@@ -142,10 +142,10 @@ class MatProgressBar {
|
|
|
142
142
|
this._ngZone.run(() => this.animationEnd.next({ value: this.value }));
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
146
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-rc.1", type: MatProgressBar, isStandalone: true, selector: "mat-progress-bar", inputs: { color: "color", value: ["value", "value", numberAttribute], bufferValue: ["bufferValue", "bufferValue", numberAttribute], mode: "mode" }, outputs: { animationEnd: "animationEnd" }, host: { attributes: { "role": "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "tabindex": "-1" }, properties: { "attr.aria-valuenow": "_isIndeterminate() ? null : value", "attr.mode": "mode", "class": "\"mat-\" + color", "class._mat-animation-noopable": "_isNoopAnimation", "class.mdc-linear-progress--animation-ready": "!_isNoopAnimation", "class.mdc-linear-progress--indeterminate": "_isIndeterminate()" }, classAttribute: "mat-mdc-progress-bar mdc-linear-progress" }, exportAs: ["matProgressBar"], ngImport: i0, template: "<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-linear-progress__buffer\" aria-hidden=\"true\">\n <div\n class=\"mdc-linear-progress__buffer-bar\"\n [style.flex-basis]=\"_getBufferBarFlexBasis()\"></div>\n <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\n @if (mode === 'buffer') {\n <div class=\"mdc-linear-progress__buffer-dots\"></div>\n }\n</div>\n<div\n class=\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\"\n aria-hidden=\"true\"\n [style.transform]=\"_getPrimaryBarTransform()\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n<div class=\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\" aria-hidden=\"true\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n", styles: [".mat-mdc-progress-bar{--mat-progress-bar-animation-multiplier: 1;display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mat-progress-bar-reduced-motion{--mat-progress-bar-animation-multiplier: 2}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mat-progress-bar-track-height, 4px),var(--mat-progress-bar-active-indicator-height, 4px))}@media(forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mat-progress-bar-active-indicator-height, 4px)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mat-progress-bar-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-progress-bar-active-indicator-height, 4px)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mat-progress-bar-track-height, 4px);border-radius:var(--mat-progress-bar-track-shape, var(--mat-sys-corner-none))}.mdc-linear-progress__buffer-dots{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering calc(250ms*var(--mat-progress-bar-animation-multiplier)) infinite linear;background-color:var(--mat-progress-bar-track-color, var(--mat-sys-surface-variant))}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse calc(250ms*var(--mat-progress-bar-animation-multiplier)) infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mat-progress-bar-track-color, var(--mat-sys-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mat-progress-bar-track-height, 4px) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
147
147
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressBar, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
150
|
args: [{ selector: 'mat-progress-bar', exportAs: 'matProgressBar', host: {
|
|
151
151
|
'role': 'progressbar',
|
|
@@ -181,11 +181,11 @@ function clamp(v, min = 0, max = 100) {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
class MatProgressBarModule {
|
|
184
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
185
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-
|
|
186
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
185
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressBarModule, imports: [MatProgressBar], exports: [MatProgressBar, MatCommonModule] });
|
|
186
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressBarModule, imports: [MatCommonModule] });
|
|
187
187
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressBarModule, decorators: [{
|
|
189
189
|
type: NgModule,
|
|
190
190
|
args: [{
|
|
191
191
|
imports: [MatProgressBar],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/progress-bar/progress-bar.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/progress-bar/progress-bar.html","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/progress-bar/progress-bar-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterViewInit,\n OnDestroy,\n ChangeDetectorRef,\n InjectionToken,\n inject,\n numberAttribute,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {_getAnimationsState, ThemePalette} from '../core';\n\n/** Last animation end data. */\nexport interface ProgressAnimationEnd {\n value: number;\n}\n\n/** Default `mat-progress-bar` options that can be overridden. */\nexport interface MatProgressBarDefaultOptions {\n /**\n * Default theme color of the progress bar. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n\n /** Default mode of the progress bar. */\n mode?: ProgressBarMode;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-bar`. */\nexport const MAT_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken<MatProgressBarDefaultOptions>(\n 'MAT_PROGRESS_BAR_DEFAULT_OPTIONS',\n);\n\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_PROGRESS_BAR_LOCATION = new InjectionToken<MatProgressBarLocation>(\n 'mat-progress-bar-location',\n {providedIn: 'root', factory: MAT_PROGRESS_BAR_LOCATION_FACTORY},\n);\n\n/**\n * Stubbed out location for `MatProgressBar`.\n * @docs-private\n */\nexport interface MatProgressBarLocation {\n getPathname: () => string;\n}\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => (_location ? _location.pathname + _location.search : ''),\n };\n}\n\nexport type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';\n\n@Component({\n selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[attr.aria-valuenow]': '_isIndeterminate() ? null : value',\n '[attr.mode]': 'mode',\n 'class': 'mat-mdc-progress-bar mdc-linear-progress',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': '_isNoopAnimation',\n '[class.mdc-linear-progress--animation-ready]': '!_isNoopAnimation',\n '[class.mdc-linear-progress--indeterminate]': '_isIndeterminate()',\n },\n templateUrl: 'progress-bar.html',\n styleUrl: 'progress-bar.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressBar implements AfterViewInit, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ngZone = inject(NgZone);\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _renderer = inject(Renderer2);\n private _cleanupTransitionEnd: (() => void) | undefined;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const animationsState = _getAnimationsState();\n\n const defaults = inject<MatProgressBarDefaultOptions>(MAT_PROGRESS_BAR_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n this._isNoopAnimation = animationsState === 'di-disabled';\n\n if (animationsState === 'reduced-motion') {\n this._elementRef.nativeElement.classList.add('mat-progress-bar-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n this.mode = defaults.mode || this.mode;\n }\n }\n\n /** Flag that indicates whether NoopAnimations mode is set to true. */\n _isNoopAnimation: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress bar. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this._value;\n }\n set value(v: number) {\n this._value = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _value = 0;\n\n /** Buffer value of the progress bar. Defaults to zero. */\n @Input({transform: numberAttribute})\n get bufferValue(): number {\n return this._bufferValue || 0;\n }\n set bufferValue(v: number) {\n this._bufferValue = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _bufferValue = 0;\n\n /**\n * Event emitted when animation of the primary progress bar completes. This event will not\n * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n * animations (indeterminate and query).\n */\n @Output() readonly animationEnd = new EventEmitter<ProgressAnimationEnd>();\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input()\n get mode(): ProgressBarMode {\n return this._mode;\n }\n set mode(value: ProgressBarMode) {\n // Note that we don't technically need a getter and a setter here,\n // but we use it to match the behavior of the existing mat-progress-bar.\n this._mode = value;\n this._changeDetectorRef.markForCheck();\n }\n private _mode: ProgressBarMode = 'determinate';\n\n ngAfterViewInit() {\n // Run outside angular so change detection didn't get triggered on every transition end\n // instead only on the animation that we care about (primary value bar's transitionend)\n this._ngZone.runOutsideAngular(() => {\n this._cleanupTransitionEnd = this._renderer.listen(\n this._elementRef.nativeElement,\n 'transitionend',\n this._transitionendHandler,\n );\n });\n }\n\n ngOnDestroy() {\n this._cleanupTransitionEnd?.();\n }\n\n /** Gets the transform style that should be applied to the primary bar. */\n _getPrimaryBarTransform(): string {\n return `scaleX(${this._isIndeterminate() ? 1 : this.value / 100})`;\n }\n\n /** Gets the `flex-basis` value that should be applied to the buffer bar. */\n _getBufferBarFlexBasis(): string {\n return `${this.mode === 'buffer' ? this.bufferValue : 100}%`;\n }\n\n /** Returns whether the progress bar is indeterminate. */\n _isIndeterminate(): boolean {\n return this.mode === 'indeterminate' || this.mode === 'query';\n }\n\n /** Event handler for `transitionend` events. */\n private _transitionendHandler = (event: TransitionEvent) => {\n if (\n this.animationEnd.observers.length === 0 ||\n !event.target ||\n !(event.target as HTMLElement).classList.contains('mdc-linear-progress__primary-bar')\n ) {\n return;\n }\n\n if (this.mode === 'determinate' || this.mode === 'buffer') {\n this._ngZone.run(() => this.animationEnd.next({value: this.value}));\n }\n };\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n","<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-linear-progress__buffer\" aria-hidden=\"true\">\n <div\n class=\"mdc-linear-progress__buffer-bar\"\n [style.flex-basis]=\"_getBufferBarFlexBasis()\"></div>\n <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\n @if (mode === 'buffer') {\n <div class=\"mdc-linear-progress__buffer-dots\"></div>\n }\n</div>\n<div\n class=\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\"\n aria-hidden=\"true\"\n [style.transform]=\"_getPrimaryBarTransform()\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n<div class=\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\" aria-hidden=\"true\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatProgressBar} from './progress-bar';\n\n@NgModule({\n imports: [MatProgressBar],\n exports: [MatProgressBar, MatCommonModule],\n})\nexport class MatProgressBarModule {}\n"],"names":[],"mappings":";;;;;;;;AAiDA;MACa,gCAAgC,GAAG,IAAI,cAAc,CAChE,kCAAkC;AAGpC;;;;AAIG;AACU,MAAA,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iCAAiC,EAAC;AAWlE;;;;AAIG;SACa,iCAAiC,GAAA;AAC/C,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAClC,IAAA,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,IAAI;IAEvD,OAAO;;;QAGL,WAAW,EAAE,OAAO,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,GAAG,EAAE,CAAC;KAC5E;AACH;MA2Ba,cAAc,CAAA;AAChB,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AAC1D,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9C,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,qBAAqB;AAI7B,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,eAAe,GAAG,mBAAmB,EAAE;AAE7C,QAAA,MAAM,QAAQ,GAAG,MAAM,CAA+B,gCAAgC,EAAE;AACtF,YAAA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CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;AAC3C,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-bar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-bar/progress-bar.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-bar/progress-bar.html","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-bar/progress-bar-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterViewInit,\n OnDestroy,\n ChangeDetectorRef,\n InjectionToken,\n inject,\n numberAttribute,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {_getAnimationsState, ThemePalette} from '../core';\n\n/** Last animation end data. */\nexport interface ProgressAnimationEnd {\n value: number;\n}\n\n/** Default `mat-progress-bar` options that can be overridden. */\nexport interface MatProgressBarDefaultOptions {\n /**\n * Default theme color of the progress bar. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n\n /** Default mode of the progress bar. */\n mode?: ProgressBarMode;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-bar`. */\nexport const MAT_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken<MatProgressBarDefaultOptions>(\n 'MAT_PROGRESS_BAR_DEFAULT_OPTIONS',\n);\n\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_PROGRESS_BAR_LOCATION = new InjectionToken<MatProgressBarLocation>(\n 'mat-progress-bar-location',\n {providedIn: 'root', factory: MAT_PROGRESS_BAR_LOCATION_FACTORY},\n);\n\n/**\n * Stubbed out location for `MatProgressBar`.\n * @docs-private\n */\nexport interface MatProgressBarLocation {\n getPathname: () => string;\n}\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => (_location ? _location.pathname + _location.search : ''),\n };\n}\n\nexport type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';\n\n@Component({\n selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[attr.aria-valuenow]': '_isIndeterminate() ? null : value',\n '[attr.mode]': 'mode',\n 'class': 'mat-mdc-progress-bar mdc-linear-progress',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': '_isNoopAnimation',\n '[class.mdc-linear-progress--animation-ready]': '!_isNoopAnimation',\n '[class.mdc-linear-progress--indeterminate]': '_isIndeterminate()',\n },\n templateUrl: 'progress-bar.html',\n styleUrl: 'progress-bar.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressBar implements AfterViewInit, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ngZone = inject(NgZone);\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _renderer = inject(Renderer2);\n private _cleanupTransitionEnd: (() => void) | undefined;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const animationsState = _getAnimationsState();\n\n const defaults = inject<MatProgressBarDefaultOptions>(MAT_PROGRESS_BAR_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n this._isNoopAnimation = animationsState === 'di-disabled';\n\n if (animationsState === 'reduced-motion') {\n this._elementRef.nativeElement.classList.add('mat-progress-bar-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n this.mode = defaults.mode || this.mode;\n }\n }\n\n /** Flag that indicates whether NoopAnimations mode is set to true. */\n _isNoopAnimation: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress bar. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this._value;\n }\n set value(v: number) {\n this._value = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _value = 0;\n\n /** Buffer value of the progress bar. Defaults to zero. */\n @Input({transform: numberAttribute})\n get bufferValue(): number {\n return this._bufferValue || 0;\n }\n set bufferValue(v: number) {\n this._bufferValue = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _bufferValue = 0;\n\n /**\n * Event emitted when animation of the primary progress bar completes. This event will not\n * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n * animations (indeterminate and query).\n */\n @Output() readonly animationEnd = new EventEmitter<ProgressAnimationEnd>();\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input()\n get mode(): ProgressBarMode {\n return this._mode;\n }\n set mode(value: ProgressBarMode) {\n // Note that we don't technically need a getter and a setter here,\n // but we use it to match the behavior of the existing mat-progress-bar.\n this._mode = value;\n this._changeDetectorRef.markForCheck();\n }\n private _mode: ProgressBarMode = 'determinate';\n\n ngAfterViewInit() {\n // Run outside angular so change detection didn't get triggered on every transition end\n // instead only on the animation that we care about (primary value bar's transitionend)\n this._ngZone.runOutsideAngular(() => {\n this._cleanupTransitionEnd = this._renderer.listen(\n this._elementRef.nativeElement,\n 'transitionend',\n this._transitionendHandler,\n );\n });\n }\n\n ngOnDestroy() {\n this._cleanupTransitionEnd?.();\n }\n\n /** Gets the transform style that should be applied to the primary bar. */\n _getPrimaryBarTransform(): string {\n return `scaleX(${this._isIndeterminate() ? 1 : this.value / 100})`;\n }\n\n /** Gets the `flex-basis` value that should be applied to the buffer bar. */\n _getBufferBarFlexBasis(): string {\n return `${this.mode === 'buffer' ? this.bufferValue : 100}%`;\n }\n\n /** Returns whether the progress bar is indeterminate. */\n _isIndeterminate(): boolean {\n return this.mode === 'indeterminate' || this.mode === 'query';\n }\n\n /** Event handler for `transitionend` events. */\n private _transitionendHandler = (event: TransitionEvent) => {\n if (\n this.animationEnd.observers.length === 0 ||\n !event.target ||\n !(event.target as HTMLElement).classList.contains('mdc-linear-progress__primary-bar')\n ) {\n return;\n }\n\n if (this.mode === 'determinate' || this.mode === 'buffer') {\n this._ngZone.run(() => this.animationEnd.next({value: this.value}));\n }\n };\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n","<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-linear-progress__buffer\" aria-hidden=\"true\">\n <div\n class=\"mdc-linear-progress__buffer-bar\"\n [style.flex-basis]=\"_getBufferBarFlexBasis()\"></div>\n <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\n @if (mode === 'buffer') {\n <div class=\"mdc-linear-progress__buffer-dots\"></div>\n }\n</div>\n<div\n class=\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\"\n aria-hidden=\"true\"\n [style.transform]=\"_getPrimaryBarTransform()\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n<div class=\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\" aria-hidden=\"true\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatProgressBar} from './progress-bar';\n\n@NgModule({\n imports: [MatProgressBar],\n exports: [MatProgressBar, MatCommonModule],\n})\nexport class MatProgressBarModule {}\n"],"names":[],"mappings":";;;;;;;;AAiDA;MACa,gCAAgC,GAAG,IAAI,cAAc,CAChE,kCAAkC;AAGpC;;;;AAIG;AACU,MAAA,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iCAAiC,EAAC;AAWlE;;;;AAIG;SACa,iCAAiC,GAAA;AAC/C,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAClC,IAAA,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,IAAI;IAEvD,OAAO;;;QAGL,WAAW,EAAE,OAAO,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,GAAG,EAAE,CAAC;KAC5E;AACH;MA2Ba,cAAc,CAAA;AAChB,IAAA,WAAW,GAAG,MAAM,CAA0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,oBAAoB,EAHrB,OAAA,EAAA,CAAA,cAAc,CACd,EAAA,OAAA,EAAA,CAAA,cAAc,EAAE,eAAe,CAAA,EAAA,CAAA;AAE9B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAFL,eAAe,CAAA,EAAA,CAAA;;gGAE9B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;AAC3C,iBAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-spinner/testing/progress-spinner-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {ProgressSpinnerMode} from '../progress-spinner';\nimport {ProgressSpinnerHarnessFilters} from './progress-spinner-harness-filters';\n\n/** Harness for interacting with a MDC based mat-progress-spinner in tests. */\nexport class MatProgressSpinnerHarness extends ComponentHarness {\n /** The selector for the host element of a `MatProgressSpinner` instance. */\n static hostSelector = '.mat-mdc-progress-spinner';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a progress spinnner with specific\n * attributes.\n * @param options Options for filtering which progress spinner instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatProgressSpinnerHarness>(\n this: ComponentHarnessConstructor<T>,\n options: ProgressSpinnerHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Gets the progress spinner's value. */\n async getValue(): Promise<number | null> {\n const host = await this.host();\n const ariaValue = await host.getAttribute('aria-valuenow');\n return ariaValue ? coerceNumberProperty(ariaValue) : null;\n }\n\n /** Gets the progress spinner's mode. */\n async getMode(): Promise<ProgressSpinnerMode> {\n const modeAttr = (await this.host()).getAttribute('mode');\n return (await modeAttr) as ProgressSpinnerMode;\n }\n}\n"],"names":[],"mappings":";;;AAiBA;AACM,MAAO,yBAA0B,SAAQ,gBAAgB,CAAA;;AAE7D,IAAA,OAAO,YAAY,GAAG,2BAA2B;AAEjD;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAyC,EAAE,EAAA;AAE3C,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC;;;AAI5C,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;QAC9B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;AAC1D,QAAA,OAAO,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,GAAG,IAAI;;;AAI3D,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC;AACzD,QAAA,QAAQ,MAAM,QAAQ;;;;;;"}
|
|
@@ -128,10 +128,10 @@ class MatProgressSpinner {
|
|
|
128
128
|
_circleStrokeWidth() {
|
|
129
129
|
return (this.strokeWidth / this.diameter) * 100;
|
|
130
130
|
}
|
|
131
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
132
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-rc.1", type: MatProgressSpinner, isStandalone: true, selector: "mat-progress-spinner, mat-spinner", inputs: { color: "color", mode: "mode", value: ["value", "value", numberAttribute], diameter: ["diameter", "diameter", numberAttribute], strokeWidth: ["strokeWidth", "strokeWidth", numberAttribute] }, host: { attributes: { "role": "progressbar", "tabindex": "-1" }, properties: { "class": "\"mat-\" + color", "class._mat-animation-noopable": "_noopAnimations", "class.mdc-circular-progress--indeterminate": "mode === \"indeterminate\"", "style.width.px": "diameter", "style.height.px": "diameter", "style.--mat-progress-spinner-size": "diameter + \"px\"", "style.--mat-progress-spinner-active-indicator-width": "diameter + \"px\"", "attr.aria-valuemin": "0", "attr.aria-valuemax": "100", "attr.aria-valuenow": "mode === \"determinate\" ? value : null", "attr.mode": "mode" }, classAttribute: "mat-mdc-progress-spinner mdc-circular-progress" }, viewQueries: [{ propertyName: "_determinateCircle", first: true, predicate: ["determinateSpinner"], descendants: true }], exportAs: ["matProgressSpinner"], ngImport: i0, template: "<ng-template #circle>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__indeterminate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeCircumference() / 2\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</ng-template>\n\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-circular-progress__determinate-container\" aria-hidden=\"true\" #determinateSpinner>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__determinate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeDashOffset()\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n class=\"mdc-circular-progress__determinate-circle\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</div>\n<!--TODO: figure out why there are 3 separate svgs-->\n<div class=\"mdc-circular-progress__indeterminate-container\" aria-hidden=\"true\">\n <div class=\"mdc-circular-progress__spinner-layer\">\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__gap-patch\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n </div>\n</div>\n", styles: [".mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
133
133
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressSpinner, decorators: [{
|
|
135
135
|
type: Component,
|
|
136
136
|
args: [{ selector: 'mat-progress-spinner, mat-spinner', exportAs: 'matProgressSpinner', host: {
|
|
137
137
|
'role': 'progressbar',
|
|
@@ -177,11 +177,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
|
|
|
177
177
|
const MatSpinner = MatProgressSpinner;
|
|
178
178
|
|
|
179
179
|
class MatProgressSpinnerModule {
|
|
180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
181
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-
|
|
182
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
181
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressSpinnerModule, imports: [MatProgressSpinner, MatSpinner], exports: [MatProgressSpinner, MatSpinner, MatCommonModule] });
|
|
182
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressSpinnerModule, imports: [MatCommonModule] });
|
|
183
183
|
}
|
|
184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatProgressSpinnerModule, decorators: [{
|
|
185
185
|
type: NgModule,
|
|
186
186
|
args: [{
|
|
187
187
|
imports: [MatProgressSpinner, MatSpinner],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-spinner.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/progress-spinner/progress-spinner.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/progress-spinner/progress-spinner.html","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/progress-spinner/progress-spinner-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n InjectionToken,\n Input,\n ViewChild,\n ViewEncapsulation,\n numberAttribute,\n inject,\n} from '@angular/core';\nimport {_getAnimationsState, ThemePalette} from '../core';\nimport {NgTemplateOutlet} from '@angular/common';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /**\n * Default theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n/**\n * Base reference size of the spinner.\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n */\nconst BASE_STROKE_WIDTH = 10;\n\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-mdc-progress-spinner mdc-circular-progress',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[class.mdc-circular-progress--indeterminate]': 'mode === \"indeterminate\"',\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[style.--mat-progress-spinner-size]': 'diameter + \"px\"',\n '[style.--mat-progress-spinner-active-indicator-width]': 'diameter + \"px\"',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n templateUrl: 'progress-spinner.html',\n styleUrl: 'progress-spinner.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet],\n})\nexport class MatProgressSpinner {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** The element of the determinate spinner. */\n @ViewChild('determinateSpinner') _determinateCircle: ElementRef<HTMLElement>;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const defaults = inject<MatProgressSpinnerDefaultOptions>(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS);\n const animationsState = _getAnimationsState();\n const element = this._elementRef.nativeElement;\n\n this._noopAnimations =\n animationsState === 'di-disabled' && !!defaults && !defaults._forceAnimations;\n this.mode = element.nodeName.toLowerCase() === 'mat-spinner' ? 'indeterminate' : 'determinate';\n\n if (!this._noopAnimations && animationsState === 'reduced-motion') {\n element.classList.add('mat-progress-spinner-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n }\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input() mode: ProgressSpinnerMode;\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(v: number) {\n this._value = Math.max(0, Math.min(100, v || 0));\n }\n private _value = 0;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input({transform: numberAttribute})\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: number) {\n this._diameter = size || 0;\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input({transform: numberAttribute})\n get strokeWidth(): number {\n return this._strokeWidth ?? this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = value || 0;\n }\n private _strokeWidth: number;\n\n /** The radius of the spinner, adjusted for stroke width. */\n _circleRadius(): number {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _viewBox() {\n const viewBox = this._circleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._strokeCircumference() * (100 - this._value)) / 100;\n }\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _circleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n}\n\n/**\n * @deprecated Import Progress Spinner instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 16.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","<ng-template #circle>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__indeterminate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeCircumference() / 2\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</ng-template>\n\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-circular-progress__determinate-container\" aria-hidden=\"true\" #determinateSpinner>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__determinate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeDashOffset()\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n class=\"mdc-circular-progress__determinate-circle\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</div>\n<!--TODO: figure out why there are 3 separate svgs-->\n<div class=\"mdc-circular-progress__indeterminate-container\" aria-hidden=\"true\">\n <div class=\"mdc-circular-progress__spinner-layer\">\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__gap-patch\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n </div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatProgressSpinner, MatSpinner],\n exports: [MatProgressSpinner, MatSpinner, MatCommonModule],\n})\nexport class MatProgressSpinnerModule {}\n"],"names":[],"mappings":";;;;;;;;;AA8CA;MACa,oCAAoC,GAC/C,IAAI,cAAc,CAAmC,sCAAsC,EAAE;AAC3F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,4CAA4C;AACtD,CAAA;AAEH;;;;AAIG;SACa,4CAA4C,GAAA;AAC1D,IAAA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC;AAC9B;AAEA;;AAEG;AACH,MAAM,SAAS,GAAG,GAAG;AAErB;;AAEG;AACH,MAAM,iBAAiB,GAAG,EAAE;MA6Bf,kBAAkB,CAAA;AACpB,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;;AAGlE,IAAA,eAAe;;AAGf;;;;;;AAMG;AACH,IAAA,IACI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa;;IAE1C,IAAI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A;sBADd,KAAK;uBAAC,EAAC,SAAS,EAAE,eAAe,EAAC;;AAuCrC;;;;AAIG;AACH;AACO,MAAM,UAAU,GAAG;;MEvNb,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;+GAAxB,wBAAwB,EAAA,OAAA,EAAA,CAHzB,kBAAkB,EAAE,UAAU,aAC9B,kBAAkB,EAAE,UAAU,EAAE,eAAe,CAAA,EAAA,CAAA;AAE9C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAFO,eAAe,CAAA,EAAA,CAAA;;kGAE9C,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,UAAU,CAAC;AACzC,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,UAAU,EAAE,eAAe,CAAC;AAC3D,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-spinner.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-spinner/progress-spinner.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-spinner/progress-spinner.html","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/progress-spinner/progress-spinner-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n InjectionToken,\n Input,\n ViewChild,\n ViewEncapsulation,\n numberAttribute,\n inject,\n} from '@angular/core';\nimport {_getAnimationsState, ThemePalette} from '../core';\nimport {NgTemplateOutlet} from '@angular/common';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /**\n * Default theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n/**\n * Base reference size of the spinner.\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n */\nconst BASE_STROKE_WIDTH = 10;\n\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-mdc-progress-spinner mdc-circular-progress',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[class.mdc-circular-progress--indeterminate]': 'mode === \"indeterminate\"',\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[style.--mat-progress-spinner-size]': 'diameter + \"px\"',\n '[style.--mat-progress-spinner-active-indicator-width]': 'diameter + \"px\"',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n templateUrl: 'progress-spinner.html',\n styleUrl: 'progress-spinner.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet],\n})\nexport class MatProgressSpinner {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** The element of the determinate spinner. */\n @ViewChild('determinateSpinner') _determinateCircle: ElementRef<HTMLElement>;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const defaults = inject<MatProgressSpinnerDefaultOptions>(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS);\n const animationsState = _getAnimationsState();\n const element = this._elementRef.nativeElement;\n\n this._noopAnimations =\n animationsState === 'di-disabled' && !!defaults && !defaults._forceAnimations;\n this.mode = element.nodeName.toLowerCase() === 'mat-spinner' ? 'indeterminate' : 'determinate';\n\n if (!this._noopAnimations && animationsState === 'reduced-motion') {\n element.classList.add('mat-progress-spinner-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n }\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input() mode: ProgressSpinnerMode;\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(v: number) {\n this._value = Math.max(0, Math.min(100, v || 0));\n }\n private _value = 0;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input({transform: numberAttribute})\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: number) {\n this._diameter = size || 0;\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input({transform: numberAttribute})\n get strokeWidth(): number {\n return this._strokeWidth ?? this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = value || 0;\n }\n private _strokeWidth: number;\n\n /** The radius of the spinner, adjusted for stroke width. */\n _circleRadius(): number {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _viewBox() {\n const viewBox = this._circleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._strokeCircumference() * (100 - this._value)) / 100;\n }\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _circleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n}\n\n/**\n * @deprecated Import Progress Spinner instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 16.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","<ng-template #circle>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__indeterminate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeCircumference() / 2\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</ng-template>\n\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-circular-progress__determinate-container\" aria-hidden=\"true\" #determinateSpinner>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__determinate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeDashOffset()\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n class=\"mdc-circular-progress__determinate-circle\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</div>\n<!--TODO: figure out why there are 3 separate svgs-->\n<div class=\"mdc-circular-progress__indeterminate-container\" aria-hidden=\"true\">\n <div class=\"mdc-circular-progress__spinner-layer\">\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__gap-patch\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n </div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatProgressSpinner, MatSpinner],\n exports: [MatProgressSpinner, MatSpinner, MatCommonModule],\n})\nexport class MatProgressSpinnerModule {}\n"],"names":[],"mappings":";;;;;;;;;AA8CA;MACa,oCAAoC,GAC/C,IAAI,cAAc,CAAmC,sCAAsC,EAAE;AAC3F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,4CAA4C;AACtD,CAAA;AAEH;;;;AAIG;SACa,4CAA4C,GAAA;AAC1D,IAAA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC;AAC9B;AAEA;;AAEG;AACH,MAAM,SAAS,GAAG,GAAG;AAErB;;AAEG;AACH,MAAM,iBAAiB,GAAG,EAAE;MA6Bf,kBAAkB,CAAA;AACpB,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;;AAGlE,IAAA,eAAe;;AAGf;;;;;;AAMG;AACH,IAAA,IACI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa;;IAE1C,IAAI,KAAK,CAAC,KAAgC,EAAA;AACxC,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK;;AAEb,IAAA,MAAM;IACN,aAAa,GAAiB,SAAS;;AAGd,IAAA,kBAAkB;AAInD,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAmC,oCAAoC,CAAC;AAC/F,QAAA,MAAM,eAAe,GAAG,mBAAmB,EAAE;AAC7C,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa;AAE9C,QAAA,IAAI,CAAC,eAAe;YAClB,eAAe,KAAK,aAAa,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,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A,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAFO,eAAe,CAAA,EAAA,CAAA;;gGAE9C,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,UAAU,CAAC;AACzC,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,UAAU,EAAE,eAAe,CAAC;AAC3D,iBAAA;;;;;"}
|
|
@@ -4,11 +4,11 @@ import { MatPseudoCheckbox } from './pseudo-checkbox.mjs';
|
|
|
4
4
|
import { MatCommonModule } from './common-module.mjs';
|
|
5
5
|
|
|
6
6
|
class MatPseudoCheckboxModule {
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
8
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-
|
|
9
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatPseudoCheckboxModule, imports: [MatCommonModule, MatPseudoCheckbox], exports: [MatPseudoCheckbox] });
|
|
9
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatPseudoCheckboxModule, imports: [MatCommonModule] });
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatPseudoCheckboxModule, decorators: [{
|
|
12
12
|
type: NgModule,
|
|
13
13
|
args: [{
|
|
14
14
|
imports: [MatCommonModule, MatPseudoCheckbox],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pseudo-checkbox-module.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-
|
|
1
|
+
{"version":3,"file":"pseudo-checkbox-module.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/core/selection/pseudo-checkbox/pseudo-checkbox-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatPseudoCheckbox} from './pseudo-checkbox';\nimport {MatCommonModule} from '../../common-behaviors/common-module';\n\n@NgModule({\n imports: [MatCommonModule, MatPseudoCheckbox],\n exports: [MatPseudoCheckbox],\n})\nexport class MatPseudoCheckboxModule {}\n"],"names":[],"mappings":";;;;;MAgBa,uBAAuB,CAAA;4GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EAHxB,OAAA,EAAA,CAAA,eAAe,EAAE,iBAAiB,aAClC,iBAAiB,CAAA,EAAA,CAAA;AAEhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAHxB,eAAe,CAAA,EAAA,CAAA;;gGAGd,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,iBAAiB,CAAC;oBAC7C,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA;;;;;"}
|
|
@@ -27,10 +27,10 @@ class MatPseudoCheckbox {
|
|
|
27
27
|
*/
|
|
28
28
|
appearance = 'full';
|
|
29
29
|
constructor() { }
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatPseudoCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-rc.1", type: MatPseudoCheckbox, isStandalone: true, selector: "mat-pseudo-checkbox", inputs: { state: "state", disabled: "disabled", appearance: "appearance" }, host: { properties: { "class.mat-pseudo-checkbox-indeterminate": "state === \"indeterminate\"", "class.mat-pseudo-checkbox-checked": "state === \"checked\"", "class.mat-pseudo-checkbox-disabled": "disabled", "class.mat-pseudo-checkbox-minimal": "appearance === \"minimal\"", "class.mat-pseudo-checkbox-full": "appearance === \"full\"", "class._mat-animation-noopable": "_animationsDisabled" }, classAttribute: "mat-pseudo-checkbox" }, ngImport: i0, template: '', isInline: true, styles: [".mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:\"\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: MatPseudoCheckbox, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'mat-pseudo-checkbox', template: '', host: {
|
|
36
36
|
'class': 'mat-pseudo-checkbox',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pseudo-checkbox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-
|
|
1
|
+
{"version":3,"file":"pseudo-checkbox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Component, ViewEncapsulation, Input, ChangeDetectionStrategy} from '@angular/core';\nimport {_animationsDisabled} from '../../animation/animation';\n\n/**\n * Possible states for a pseudo checkbox.\n * @docs-private\n */\nexport type MatPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate';\n\n/**\n * Component that shows a simplified checkbox without including any kind of \"real\" checkbox.\n * Meant to be used when the checkbox is purely decorative and a large number of them will be\n * included, such as for the options in a multi-select. Uses no SVGs or complex animations.\n * Note that theming is meant to be handled by the parent element, e.g.\n * `mat-primary .mat-pseudo-checkbox`.\n *\n * Note that this component will be completely invisible to screen-reader users. This is *not*\n * interchangeable with `<mat-checkbox>` and should *not* be used if the user would directly\n * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail\n * of more complex components that appropriately handle selected / checked state.\n * @docs-private\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'mat-pseudo-checkbox',\n styleUrl: 'pseudo-checkbox.css',\n template: '',\n host: {\n 'class': 'mat-pseudo-checkbox',\n '[class.mat-pseudo-checkbox-indeterminate]': 'state === \"indeterminate\"',\n '[class.mat-pseudo-checkbox-checked]': 'state === \"checked\"',\n '[class.mat-pseudo-checkbox-disabled]': 'disabled',\n '[class.mat-pseudo-checkbox-minimal]': 'appearance === \"minimal\"',\n '[class.mat-pseudo-checkbox-full]': 'appearance === \"full\"',\n '[class._mat-animation-noopable]': '_animationsDisabled',\n },\n})\nexport class MatPseudoCheckbox {\n _animationsDisabled = _animationsDisabled();\n\n /** Display state of the checkbox. */\n @Input() state: MatPseudoCheckboxState = 'unchecked';\n\n /** Whether the checkbox is disabled. */\n @Input() disabled: boolean = false;\n\n /**\n * Appearance of the pseudo checkbox. Default appearance of 'full' renders a checkmark/mixedmark\n * indicator inside a square box. 'minimal' appearance only renders the checkmark/mixedmark.\n */\n @Input() appearance: 'minimal' | 'full' = 'full';\n\n constructor(...args: unknown[]);\n constructor() {}\n}\n"],"names":[],"mappings":";;;;AAiBA;;;;;;;;;;;;AAYG;MAiBU,iBAAiB,CAAA;IAC5B,mBAAmB,GAAG,mBAAmB,EAAE;;IAGlC,KAAK,GAA2B,WAAW;;IAG3C,QAAQ,GAAY,KAAK;AAElC;;;AAGG;IACM,UAAU,GAAuB,MAAM;AAGhD,IAAA,WAAA,GAAA;4GAhBW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,IAAA,EAAA,iBAAiB,8kBAXlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,iyGAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;gGAWD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,SAAS;oCACO,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EACrC,QAAA,EAAA,qBAAqB,EAErB,QAAA,EAAA,EAAE,EACN,IAAA,EAAA;AACJ,wBAAA,OAAO,EAAE,qBAAqB;AAC9B,wBAAA,2CAA2C,EAAE,2BAA2B;AACxE,wBAAA,qCAAqC,EAAE,qBAAqB;AAC5D,wBAAA,sCAAsC,EAAE,UAAU;AAClD,wBAAA,qCAAqC,EAAE,0BAA0B;AACjE,wBAAA,kCAAkC,EAAE,uBAAuB;AAC3D,wBAAA,iCAAiC,EAAE,qBAAqB;AACzD,qBAAA,EAAA,MAAA,EAAA,CAAA,iyGAAA,CAAA,EAAA;wDAMQ,KAAK,EAAA,CAAA;sBAAb;gBAGQ,QAAQ,EAAA,CAAA;sBAAhB;gBAMQ,UAAU,EAAA,CAAA;sBAAlB;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/grid-list/tile-coordinator.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/grid-list/public-api.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Interface describing a tile.\n * @docs-private\n */\nexport interface Tile {\n /** Amount of rows that the tile takes up. */\n rowspan: number;\n /** Amount of columns that the tile takes up. */\n colspan: number;\n}\n\n/**\n * Class for determining, from a list of tiles, the (row, col) position of each of those tiles\n * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)\n * because the tiles can have a rowspan.\n *\n * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid\n * large enough to accommodate it so that the tiles still render in the same order in which they\n * are given.\n *\n * The basis of the algorithm is the use of an array to track the already placed tiles. Each\n * element of the array corresponds to a column, and the value indicates how many cells in that\n * column are already occupied; zero indicates an empty cell. Moving \"down\" to the next row\n * decrements each value in the tracking array (indicating that the column is one cell closer to\n * being free).\n *\n * @docs-private\n */\nexport class TileCoordinator {\n /** Tracking array (see class description). */\n tracker: number[];\n\n /** Index at which the search for the next gap will start. */\n columnIndex: number = 0;\n\n /** The current row index. */\n rowIndex: number = 0;\n\n /** Gets the total number of rows occupied by tiles */\n get rowCount(): number {\n return this.rowIndex + 1;\n }\n\n /**\n * Gets the total span of rows occupied by tiles.\n * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.\n */\n get rowspan() {\n const lastRowMax = Math.max(...this.tracker);\n // if any of the tiles has a rowspan that pushes it beyond the total row count,\n // add the difference to the rowcount\n return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;\n }\n\n /** The computed (row, col) position of each tile (the output). */\n positions: TilePosition[];\n\n /**\n * Updates the tile positions.\n * @param numColumns Amount of columns in the grid.\n * @param tiles Tiles to be positioned.\n */\n update(numColumns: number, tiles: Tile[]) {\n this.columnIndex = 0;\n this.rowIndex = 0;\n\n this.tracker = new Array(numColumns);\n this.tracker.fill(0, 0, this.tracker.length);\n this.positions = tiles.map(tile => this._trackTile(tile));\n }\n\n /** Calculates the row and col position of a tile. */\n private _trackTile(tile: Tile): TilePosition {\n // Find a gap large enough for this tile.\n const gapStartIndex = this._findMatchingGap(tile.colspan);\n\n // Place tile in the resulting gap.\n this._markTilePosition(gapStartIndex, tile);\n\n // The next time we look for a gap, the search will start at columnIndex, which should be\n // immediately after the tile that has just been placed.\n this.columnIndex = gapStartIndex + tile.colspan;\n\n return new TilePosition(this.rowIndex, gapStartIndex);\n }\n\n /** Finds the next available space large enough to fit the tile. */\n private _findMatchingGap(tileCols: number): number {\n if (tileCols > this.tracker.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(\n `mat-grid-list: tile with colspan ${tileCols} is wider than ` +\n `grid with cols=\"${this.tracker.length}\".`,\n );\n }\n\n // Start index is inclusive, end index is exclusive.\n let gapStartIndex = -1;\n let gapEndIndex = -1;\n\n // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.\n do {\n // If we've reached the end of the row, go to the next row.\n if (this.columnIndex + tileCols > this.tracker.length) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n\n // If there are no more empty spaces in this row at all, move on to the next row.\n if (gapStartIndex == -1) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n\n // If a gap large enough isn't found, we want to start looking immediately after the current\n // gap on the next iteration.\n this.columnIndex = gapStartIndex + 1;\n\n // Continue iterating until we find a gap wide enough for this tile. Since gapEndIndex is\n // exclusive, gapEndIndex is 0 means we didn't find a gap and should continue.\n } while (gapEndIndex - gapStartIndex < tileCols || gapEndIndex == 0);\n\n // If we still didn't manage to find a gap, ensure that the index is\n // at least zero so the tile doesn't get pulled out of the grid.\n return Math.max(gapStartIndex, 0);\n }\n\n /** Move \"down\" to the next row. */\n private _nextRow(): void {\n this.columnIndex = 0;\n this.rowIndex++;\n\n // Decrement all spaces by one to reflect moving down one row.\n for (let i = 0; i < this.tracker.length; i++) {\n this.tracker[i] = Math.max(0, this.tracker[i] - 1);\n }\n }\n\n /**\n * Finds the end index (exclusive) of a gap given the index from which to start looking.\n * The gap ends when a non-zero value is found.\n */\n private _findGapEndIndex(gapStartIndex: number): number {\n for (let i = gapStartIndex + 1; i < this.tracker.length; i++) {\n if (this.tracker[i] != 0) {\n return i;\n }\n }\n\n // The gap ends with the end of the row.\n return this.tracker.length;\n }\n\n /** Update the tile tracker to account for the given tile in the given space. */\n private _markTilePosition(start: number, tile: Tile): void {\n for (let i = 0; i < tile.colspan; i++) {\n this.tracker[start + i] = tile.rowspan;\n }\n }\n}\n\n/**\n * Simple data structure for tile position (row, col).\n * @docs-private\n */\nexport class TilePosition {\n constructor(\n public row: number,\n public col: number,\n ) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {TileCoordinator} from './tile-coordinator';\n\nexport * from './grid-list-module';\nexport * from './grid-list';\nexport * from './grid-tile';\n\n// Privately exported for the grid-list harness.\nexport const ɵTileCoordinator = TileCoordinator;\n"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;AAgBG;MACU,eAAe,CAAA;;AAE1B,IAAA,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ile-coordinator.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/grid-list/public-api.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Interface describing a tile.\n * @docs-private\n */\nexport interface Tile {\n /** Amount of rows that the tile takes up. */\n rowspan: number;\n /** Amount of columns that the tile takes up. */\n colspan: number;\n}\n\n/**\n * Class for determining, from a list of tiles, the (row, col) position of each of those tiles\n * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)\n * because the tiles can have a rowspan.\n *\n * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid\n * large enough to accommodate it so that the tiles still render in the same order in which they\n * are given.\n *\n * The basis of the algorithm is the use of an array to track the already placed tiles. Each\n * element of the array corresponds to a column, and the value indicates how many cells in that\n * column are already occupied; zero indicates an empty cell. Moving \"down\" to the next row\n * decrements each value in the tracking array (indicating that the column is one cell closer to\n * being free).\n *\n * @docs-private\n */\nexport class TileCoordinator {\n /** Tracking array (see class description). */\n tracker: number[];\n\n /** Index at which the search for the next gap will start. */\n columnIndex: number = 0;\n\n /** The current row index. */\n rowIndex: number = 0;\n\n /** Gets the total number of rows occupied by tiles */\n get rowCount(): number {\n return this.rowIndex + 1;\n }\n\n /**\n * Gets the total span of rows occupied by tiles.\n * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.\n */\n get rowspan() {\n const lastRowMax = Math.max(...this.tracker);\n // if any of the tiles has a rowspan that pushes it beyond the total row count,\n // add the difference to the rowcount\n return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;\n }\n\n /** The computed (row, col) position of each tile (the output). */\n positions: TilePosition[];\n\n /**\n * Updates the tile positions.\n * @param numColumns Amount of columns in the grid.\n * @param tiles Tiles to be positioned.\n */\n update(numColumns: number, tiles: Tile[]) {\n this.columnIndex = 0;\n this.rowIndex = 0;\n\n this.tracker = new Array(numColumns);\n this.tracker.fill(0, 0, this.tracker.length);\n this.positions = tiles.map(tile => this._trackTile(tile));\n }\n\n /** Calculates the row and col position of a tile. */\n private _trackTile(tile: Tile): TilePosition {\n // Find a gap large enough for this tile.\n const gapStartIndex = this._findMatchingGap(tile.colspan);\n\n // Place tile in the resulting gap.\n this._markTilePosition(gapStartIndex, tile);\n\n // The next time we look for a gap, the search will start at columnIndex, which should be\n // immediately after the tile that has just been placed.\n this.columnIndex = gapStartIndex + tile.colspan;\n\n return new TilePosition(this.rowIndex, gapStartIndex);\n }\n\n /** Finds the next available space large enough to fit the tile. */\n private _findMatchingGap(tileCols: number): number {\n if (tileCols > this.tracker.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(\n `mat-grid-list: tile with colspan ${tileCols} is wider than ` +\n `grid with cols=\"${this.tracker.length}\".`,\n );\n }\n\n // Start index is inclusive, end index is exclusive.\n let gapStartIndex = -1;\n let gapEndIndex = -1;\n\n // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.\n do {\n // If we've reached the end of the row, go to the next row.\n if (this.columnIndex + tileCols > this.tracker.length) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n\n // If there are no more empty spaces in this row at all, move on to the next row.\n if (gapStartIndex == -1) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n\n // If a gap large enough isn't found, we want to start looking immediately after the current\n // gap on the next iteration.\n this.columnIndex = gapStartIndex + 1;\n\n // Continue iterating until we find a gap wide enough for this tile. Since gapEndIndex is\n // exclusive, gapEndIndex is 0 means we didn't find a gap and should continue.\n } while (gapEndIndex - gapStartIndex < tileCols || gapEndIndex == 0);\n\n // If we still didn't manage to find a gap, ensure that the index is\n // at least zero so the tile doesn't get pulled out of the grid.\n return Math.max(gapStartIndex, 0);\n }\n\n /** Move \"down\" to the next row. */\n private _nextRow(): void {\n this.columnIndex = 0;\n this.rowIndex++;\n\n // Decrement all spaces by one to reflect moving down one row.\n for (let i = 0; i < this.tracker.length; i++) {\n this.tracker[i] = Math.max(0, this.tracker[i] - 1);\n }\n }\n\n /**\n * Finds the end index (exclusive) of a gap given the index from which to start looking.\n * The gap ends when a non-zero value is found.\n */\n private _findGapEndIndex(gapStartIndex: number): number {\n for (let i = gapStartIndex + 1; i < this.tracker.length; i++) {\n if (this.tracker[i] != 0) {\n return i;\n }\n }\n\n // The gap ends with the end of the row.\n return this.tracker.length;\n }\n\n /** Update the tile tracker to account for the given tile in the given space. */\n private _markTilePosition(start: number, tile: Tile): void {\n for (let i = 0; i < tile.colspan; i++) {\n this.tracker[start + i] = tile.rowspan;\n }\n }\n}\n\n/**\n * Simple data structure for tile position (row, col).\n * @docs-private\n */\nexport class TilePosition {\n constructor(\n public row: number,\n public col: number,\n ) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {TileCoordinator} from './tile-coordinator';\n\nexport * from './grid-list-module';\nexport * from './grid-list';\nexport * from './grid-tile';\n\n// Privately exported for the grid-list harness.\nexport const ɵTileCoordinator = TileCoordinator;\n"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;AAgBG;MACU,eAAe,CAAA;;AAE1B,IAAA,OAAO;;IAGP,WAAW,GAAW,CAAC;;IAGvB,QAAQ,GAAW,CAAC;;AAGpB,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC;;AAG1B;;;AAGG;AACH,IAAA,IAAI,OAAO,GAAA;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO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GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;;;AAItD;;;AAGG;AACK,IAAA,gBAAgB,CAAC,aAAqB,EAAA;AAC5C,QAAA,KAAK,IAAI,CAAC,GAAG,aAAa,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC5D,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;AACxB,gBAAA,OAAO,CAAC;;;;AAKZ,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;;;IAIpB,iBAAiB,CAAC,KAAa,EAAE,IAAU,EAAA;AACjD,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE;YACrC,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO;;;AAG3C;AAED;;;AAGG;MACU,YAAY,CAAA;AAEd,IAAA,GAAA;AACA,IAAA,GAAA;IAFT,WACS,CAAA,GAAW,EACX,GAAW,EAAA;QADX,IAAG,CAAA,GAAA,GAAH,GAAG;QACH,IAAG,CAAA,GAAA,GAAH,GAAG;;AAEb;;AC5KD;AACO,MAAM,gBAAgB,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/radio/testing/radio-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\n/** Harness for interacting with a mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-mdc-radio-group';\n\n private _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio group with specific\n * attributes.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioGroupHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioGroupHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'name',\n options.name,\n MatRadioGroupHarness._checkRadioGroupName,\n );\n }\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string | null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string | null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<MatRadioButtonHarness | null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string | null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: RadioButtonHarnessFilters): Promise<MatRadioButtonHarness[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: RadioButtonHarnessFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string | null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(harness: MatRadioGroupHarness, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if ((await harness._getGroupNameFromHost()) === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`,\n );\n }\n return true;\n }\n}\n\n/** Harness for interacting with a mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-mdc-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\n * attributes.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioButtonHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioButtonHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), label),\n )\n .addOption('name', options.name, async (harness, name) => (await harness.getName()) === name)\n .addOption(\n 'checked',\n options.checked,\n async (harness, checked) => (await harness.isChecked()) == checked,\n );\n }\n\n protected _textLabel = this.locatorFor('label');\n protected _clickLabel = this._textLabel;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const input = await this._input();\n const disabled = await input.getAttribute('disabled');\n\n if (disabled !== null) {\n return coerceBooleanProperty(disabled);\n }\n\n return (await input.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string | null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string | null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n"],"names":[],"mappings":";;;AAgBA;AACM,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;;AAExD,IAAA,OAAO,YAAY,GAAG,sBAAsB;IAEpC,YAAY,GAAG,qBAAqB;AAE5C;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAoC,EAAE,EAAA;QAEtC,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,CAClD,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,oBAAoB,CAAC,oBAAoB,CAC1C;;;AAIH,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE;;;;AAInD,QAAA,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,YAAA,OAAO,QAAQ;;;;;AAKjB,QAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,EAAE;AACzD,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;AACtB,YAAA,OAAO,IAAI;;QAEb,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE;AAClD,YAAA,MAAM,KAAK,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AQ,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,UAAU,CAAC;AAC/D,QAAA,OAAO,qBAAqB,CAAC,MAAM,QAAQ,CAAC;;;AAI9C,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC;;;AAInD,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAS,IAAI,CAAC;;AAGtD;;;;;AAKG;AACH,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC;;;AAInD,IAAA,MAAM,YAAY,GAAA;QAChB,OAAO,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE;;;AAIzC,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE;;;AAItC,IAAA,MAAM,IAAI,GAAA;QACR,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE;;;AAIrC,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE;;AAG1C;;;AAGG;AACH,IAAA,MAAM,KAAK,GAAA;QACT,IAAI,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE;YAC7B,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/material/radio/testing/radio-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\n/** Harness for interacting with a mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-mdc-radio-group';\n\n private _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio group with specific\n * attributes.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioGroupHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioGroupHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'name',\n options.name,\n MatRadioGroupHarness._checkRadioGroupName,\n );\n }\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string | null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string | null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<MatRadioButtonHarness | null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string | null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: RadioButtonHarnessFilters): Promise<MatRadioButtonHarness[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: RadioButtonHarnessFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string | null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(harness: MatRadioGroupHarness, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if ((await harness._getGroupNameFromHost()) === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`,\n );\n }\n return true;\n }\n}\n\n/** Harness for interacting with a mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-mdc-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\n * attributes.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioButtonHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioButtonHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), label),\n )\n .addOption('name', options.name, async (harness, name) => (await harness.getName()) === name)\n .addOption(\n 'checked',\n options.checked,\n async (harness, checked) => (await harness.isChecked()) == checked,\n );\n }\n\n protected _textLabel = this.locatorFor('label');\n protected _clickLabel = this._textLabel;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const input = await this._input();\n const disabled = await input.getAttribute('disabled');\n\n if (disabled !== null) {\n return coerceBooleanProperty(disabled);\n }\n\n return (await input.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string | null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string | null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n"],"names":[],"mappings":";;;AAgBA;AACM,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;;AAExD,IAAA,OAAO,YAAY,GAAG,sBAAsB;IAEpC,YAAY,GAAG,qBAAqB;AAE5C;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAoC,EAAE,EAAA;QAEtC,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,CAClD,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,oBAAoB,CAAC,oBAAoB,CAC1C;;;AAIH,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE;;;;AAInD,QAAA,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,YAAA,OAAO,QAAQ;;;;;AAKjB,QAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,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