@angular/material 20.2.12 → 20.2.14
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-toggle/_m3-button-toggle.scss +1 -1
- package/fesm2022/animation.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +6 -6
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- 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.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- 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.map +1 -1
- 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.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.map +1 -1
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/form-field2.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button.mjs.map +1 -1
- package/fesm2022/icon-registry.mjs.map +1 -1
- 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.map +1 -1
- package/fesm2022/internal-form-field.mjs.map +1 -1
- package/fesm2022/line.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- 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.map +1 -1
- package/fesm2022/option-harness.mjs.map +1 -1
- package/fesm2022/option-module.mjs.map +1 -1
- package/fesm2022/option.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module.mjs.map +1 -1
- 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.map +1 -1
- package/fesm2022/ripple-loader.mjs.map +1 -1
- package/fesm2022/ripple-module.mjs.map +1 -1
- package/fesm2022/ripple.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- 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.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip-module.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tooltip2.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/stepper/_m3-stepper.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/tile-coordinator.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/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,CAAC;;;AAG5C,QAAA,OAAO,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ;;;AAIxE,IAAA,SAAS;AAET;;;;AAIG;IACH,MAAM,CAAC,UAAkB,EAAE,KAAa,EAAA;A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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
|
+
{"version":3,"file":"public-api.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/tile-coordinator.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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,CAAC;;;AAG5C,QAAA,OAAO,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ;;;AAIxE,IAAA,SAAS;AAET;;;;AAIG;IACH,MAAM,CAAC,UAAkB,EAAE,KAAa,EAAA;AACtC,QAAA,IAAI,CAAC,WAAW,GAAG,CAAC;AACpB,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC;QAEjB,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,CAAC,UAAU,CAAC;AACpC,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAA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a,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":["../../../../../../k8-fastbuild-ST-199a4f3c4e20/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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AAM,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-199a4f3c4e20/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,CAAC,sDAAsD,CAAC;;AAErE,QAAA,OAAO,UAAU,CAAC,CAAC,CAAE;;;AAIvB,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAgB,IAAI,CAAC;;;AAI7D,IAAA,MAAM,qBAAqB,GAAA;QACzB,KAAK,IAAI,WAAW,IAAI,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE;AAC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AA,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;;;;;;;"}
|
package/fesm2022/radio.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/radio.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/radio.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/radio-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 {_IdGenerator, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n DoCheck,\n ElementRef,\n EventEmitter,\n InjectionToken,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n forwardRef,\n inject,\n numberAttribute,\n HostAttributeToken,\n Renderer2,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n MatRipple,\n ThemePalette,\n _MatInternalFormField,\n _StructuralStylesLoader,\n _animationsDisabled,\n} from '../core';\nimport {Subscription} from 'rxjs';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\n\n/** Change event object emitted by radio button and radio group. */\nexport class MatRadioChange<T = any> {\n constructor(\n /** The radio button that emits the change event. */\n public source: MatRadioButton,\n /** The value of the radio button. */\n public value: T,\n ) {}\n}\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true,\n};\n\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_RADIO_GROUP = new InjectionToken<MatRadioGroup>('MatRadioGroup');\n\nexport interface MatRadioDefaultOptions {\n /**\n * Theme color of the radio button. 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/radio/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 /** Whether disabled radio buttons should be interactive. */\n disabledInteractive?: boolean;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken<MatRadioDefaultOptions>(\n 'mat-radio-default-options',\n {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent',\n disabledInteractive: false,\n };\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n {provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup},\n ],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-mdc-radio-group',\n },\n})\nexport class MatRadioGroup implements AfterContentInit, OnDestroy, ControlValueAccessor {\n private _changeDetector = inject(ChangeDetectorRef);\n\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = inject(_IdGenerator).getId('mat-radio-group-');\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** Subscription to changes in amount of radio buttons. */\n private _buttonChanges: Subscription;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), {descendants: true})\n _radios: QueryList<MatRadioButton>;\n\n /**\n * Theme color of the radio buttons in the group. This API is supported in M2\n * themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/radio/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() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string {\n return this._name;\n }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input({transform: booleanAttribute})\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = value;\n this._markRadiosForCheck();\n }\n\n /** Whether buttons in the group should be interactive while they're disabled. */\n @Input({transform: booleanAttribute})\n get disabledInteractive(): boolean {\n return this._disabledInteractive;\n }\n set disabledInteractive(value: boolean) {\n this._disabledInteractive = value;\n this._markRadiosForCheck();\n }\n private _disabledInteractive = false;\n\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n\n // Clear the `selected` button when it's destroyed since the tabindex of the rest of the\n // buttons depends on it. Note that we don't clear the `value`, because the radio button\n // may be swapped out with a similar one and there are some internal apps that depend on\n // that behavior.\n this._buttonChanges = this._radios.changes.subscribe(() => {\n if (this.selected && !this._radios.find(radio => radio === this.selected)) {\n this._selected = null;\n }\n });\n }\n\n ngOnDestroy() {\n this._buttonChanges?.unsubscribe();\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n@Component({\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrl: 'radio.css',\n host: {\n 'class': 'mat-mdc-radio-button',\n '[attr.id]': 'id',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-mdc-radio-checked]': 'checked',\n '[class.mat-mdc-radio-disabled]': 'disabled',\n '[class.mat-mdc-radio-disabled-interactive]': 'disabledInteractive',\n '[class._mat-animation-noopable]': '_noopAnimations',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n exportAs: 'matRadioButton',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatRipple, _MatInternalFormField],\n})\nexport class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy {\n protected _elementRef = inject(ElementRef);\n private _changeDetector = inject(ChangeDetectorRef);\n private _focusMonitor = inject(FocusMonitor);\n private _radioDispatcher = inject(UniqueSelectionDispatcher);\n private _defaultOptions = inject<MatRadioDefaultOptions>(MAT_RADIO_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n private _ngZone = inject(NgZone);\n private _renderer = inject(Renderer2);\n private _uniqueId = inject(_IdGenerator).getId('mat-radio-');\n private _cleanupClick: (() => void) | undefined;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether ripples are disabled inside the radio button */\n @Input({transform: booleanAttribute})\n disableRipple: boolean = false;\n\n /** Tabindex of the radio button. */\n @Input({\n transform: (value: unknown) => (value == null ? 0 : numberAttribute(value)),\n })\n tabIndex: number = 0;\n\n /** Whether this radio button is checked. */\n @Input({transform: booleanAttribute})\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: boolean) {\n if (this._checked !== value) {\n this._checked = value;\n if (value && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!value && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (value) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n this._setDisabled(value);\n }\n\n /** Whether the radio button is required. */\n @Input({transform: booleanAttribute})\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n if (value !== this._required) {\n this._changeDetector.markForCheck();\n }\n this._required = value;\n }\n\n /**\n * Theme color of the radio button. 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/radio/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(): ThemePalette {\n // As per M2 design specifications the selection control radio should use the accent color\n // palette by default. https://m2.material.io/components/radio-buttons#specs\n return (\n this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n (this._defaultOptions && this._defaultOptions.color) ||\n 'accent'\n );\n }\n set color(newValue: ThemePalette) {\n this._color = newValue;\n }\n private _color: ThemePalette;\n\n /** Whether the radio button should remain interactive when it is disabled. */\n @Input({transform: booleanAttribute})\n get disabledInteractive(): boolean {\n return (\n this._disabledInteractive || (this.radioGroup !== null && this.radioGroup.disabledInteractive)\n );\n }\n set disabledInteractive(value: boolean) {\n this._disabledInteractive = value;\n }\n private _disabledInteractive: boolean;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string {\n return `${this.id || this._uniqueId}-input`;\n }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** Previous value of the input's tabindex. */\n private _previousTabIndex: number | undefined;\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Trigger elements for the ripple events. */\n @ViewChild('formField', {read: ElementRef, static: true})\n _rippleTrigger: ElementRef<HTMLElement>;\n\n /** Whether animations are disabled. */\n _noopAnimations = _animationsDisabled();\n\n private _injector = inject(Injector);\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const radioGroup = inject<MatRadioGroup>(MAT_RADIO_GROUP, {optional: true})!;\n const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._disabledInteractive = this._defaultOptions?.disabledInteractive ?? false;\n\n if (tabIndex) {\n this.tabIndex = numberAttribute(tabIndex, 0);\n }\n }\n\n /** Focuses the radio button. */\n focus(options?: FocusOptions, origin?: FocusOrigin): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n\n this._removeUniqueSelectionListener = this._radioDispatcher.listen((id, name) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n ngDoCheck(): void {\n this._updateTabIndex();\n }\n\n ngAfterViewInit() {\n this._updateTabIndex();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n\n // We bind this outside of the zone, because:\n // 1. Its logic is completely DOM-related so we can avoid some change detections.\n // 2. There appear to be some internal tests that break when this triggers a change detection.\n this._ngZone.runOutsideAngular(() => {\n this._cleanupClick = this._renderer.listen(\n this._inputElement.nativeElement,\n 'click',\n this._onInputClick,\n );\n });\n }\n\n ngOnDestroy() {\n this._cleanupClick?.();\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n\n /** Triggered when the user clicks on the touch target. */\n _onTouchTargetClick(event: Event) {\n this._onInputInteraction(event);\n\n if (!this.disabled || this.disabledInteractive) {\n // Normally the input should be focused already, but if the click\n // comes from the touch target, then we might have to focus it ourselves.\n this._inputElement?.nativeElement.focus();\n }\n }\n\n /** Sets the disabled state and marks for check if a change occurred. */\n protected _setDisabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Called when the input is clicked. */\n private _onInputClick = (event: Event) => {\n // If the input is disabled while interactive, we need to prevent the\n // selection from happening in this event handler. Note that even though\n // this happens on `click` events, the logic applies when the user is\n // navigating with the keyboard as well. An alternative way of doing\n // this is by resetting the `checked` state in the `change` callback but\n // it isn't optimal, because it can allow a pre-checked disabled button\n // to be un-checked. This approach seems to cover everything.\n if (this.disabled && this.disabledInteractive) {\n event.preventDefault();\n }\n };\n\n /** Gets the tabindex for the underlying input element. */\n private _updateTabIndex() {\n const group = this.radioGroup;\n let value: number;\n\n // Implement a roving tabindex if the button is inside a group. For most cases this isn't\n // necessary, because the browser handles the tab order for inputs inside a group automatically,\n // but we need an explicitly higher tabindex for the selected button in order for things like\n // the focus trap to pick it up correctly.\n if (!group || !group.selected || this.disabled) {\n value = this.tabIndex;\n } else {\n value = group.selected === this ? this.tabIndex : -1;\n }\n\n if (value !== this._previousTabIndex) {\n // We have to set the tabindex directly on the DOM node, because it depends on\n // the selected state which is prone to \"changed after checked errors\".\n const input: HTMLInputElement | undefined = this._inputElement?.nativeElement;\n\n if (input) {\n input.setAttribute('tabindex', value + '');\n this._previousTabIndex = value;\n // Wait for any pending tabindex changes to be applied\n afterNextRender(\n () => {\n queueMicrotask(() => {\n // The radio group uses a \"selection follows focus\" pattern for tab management, so if this\n // radio button is currently focused and another radio button in the group becomes\n // selected, we should move focus to the newly selected radio button to maintain\n // consistency between the focused and selected states.\n if (\n group &&\n group.selected &&\n group.selected !== this &&\n document.activeElement === input\n ) {\n group.selected?._inputElement.nativeElement.focus();\n // If this radio button still has focus, the selected one must be disabled. In this\n // case the radio group as a whole should lose focus.\n if (document.activeElement === input) {\n this._inputElement.nativeElement.blur();\n }\n }\n });\n },\n {injector: this._injector},\n );\n }\n }\n }\n}\n","<div mat-internal-form-field [labelPosition]=\"labelPosition\" #formField>\n <div class=\"mdc-radio\" [class.mdc-radio--disabled]=\"disabled\">\n <!-- Render this element first so the input is on top. -->\n <div class=\"mat-mdc-radio-touch-target\" (click)=\"_onTouchTargetClick($event)\"></div>\n <!--\n Note that we set `aria-invalid=\"false\"` on the input, because otherwise some screen readers\n will read out \"required, invalid data\" for each radio button that hasn't been checked.\n An alternate approach is to use `aria-required` instead of `required`, however we have an\n internal check which enforces that elements marked as `aria-required` also have the `required`\n attribute which ends up re-introducing the issue for us.\n -->\n <input #input class=\"mdc-radio__native-control\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled && !disabledInteractive\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n aria-invalid=\"false\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (change)=\"_onInputInteraction($event)\">\n <div class=\"mdc-radio__background\">\n <div class=\"mdc-radio__outer-circle\"></div>\n <div class=\"mdc-radio__inner-circle\"></div>\n </div>\n <div mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"_rippleTrigger.nativeElement\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\">\n <div class=\"mat-ripple-element mat-radio-persistent-ripple\"></div>\n </div>\n </div>\n <label class=\"mdc-label\" [for]=\"inputId\">\n <ng-content></ng-content>\n </label>\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, MatRippleModule} from '../core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n@NgModule({\n imports: [MatCommonModule, MatRippleModule, MatRadioGroup, MatRadioButton],\n exports: [MatCommonModule, MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkDA;MACa,cAAc,CAAA;AAGhB,IAAA,MAAA;AAEA,IAAA,KAAA;AAJT,IAAA,WAAA;;IAES,MAAsB;;IAEtB,KAAQ,EAAA;QAFR,IAAM,CAAA,MAAA,GAAN,MAAM;QAEN,IAAK,CAAA,KAAA,GAAL,KAAK;;AAEf;AAED;;;;AAIG;AACU,MAAA,sCAAsC,GAAQ;AACzD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,aAAa,CAAC;AAC5C,IAAA,KAAK,EAAE,IAAI;;AAGb;;;;AAIG;MACU,eAAe,GAAG,IAAI,cAAc,CAAgB,eAAe;MAgBnE,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,iCAAiC;AAC3C,CAAA;AAGH;;;;AAIG;SACa,iCAAiC,GAAA;IAC/C,OAAO;AACL,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,mBAAmB,EAAE,KAAK;KAC3B;AACH;AAEA;;AAEG;MAaU,aAAa,CAAA;AAChB,IAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC;;IAG3C,MAAM,GAAQ,IAAI;;IAGlB,KAAK,GAAW,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;;IAG9D,SAAS,GAA0B,IAAI;;IAGvC,cAAc,GAAY,KAAK;;IAG/B,cAAc,GAAuB,OAAO;;IAG5C,SAAS,GAAY,KAAK;;IAG1B,SAA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AU,EAAE,MAAM,EAAE,IAAI,EAAC;;;ME3kB7C,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHf,OAAA,EAAA,CAAA,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAC/D,EAAA,OAAA,EAAA,CAAA,eAAe,EAAE,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA;AAE7C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,eAAe,EAAE,eAAe,EAAiB,cAAc,EAC/D,eAAe,CAAA,EAAA,CAAA;;kGAEd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;AAC1E,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;AAC1D,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"radio.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/radio.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/radio.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/radio-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 {_IdGenerator, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n DoCheck,\n ElementRef,\n EventEmitter,\n InjectionToken,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n forwardRef,\n inject,\n numberAttribute,\n HostAttributeToken,\n Renderer2,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n MatRipple,\n ThemePalette,\n _MatInternalFormField,\n _StructuralStylesLoader,\n _animationsDisabled,\n} from '../core';\nimport {Subscription} from 'rxjs';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\n\n/** Change event object emitted by radio button and radio group. */\nexport class MatRadioChange<T = any> {\n constructor(\n /** The radio button that emits the change event. */\n public source: MatRadioButton,\n /** The value of the radio button. */\n public value: T,\n ) {}\n}\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true,\n};\n\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_RADIO_GROUP = new InjectionToken<MatRadioGroup>('MatRadioGroup');\n\nexport interface MatRadioDefaultOptions {\n /**\n * Theme color of the radio button. 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/radio/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 /** Whether disabled radio buttons should be interactive. */\n disabledInteractive?: boolean;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken<MatRadioDefaultOptions>(\n 'mat-radio-default-options',\n {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent',\n disabledInteractive: false,\n };\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n {provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup},\n ],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-mdc-radio-group',\n },\n})\nexport class MatRadioGroup implements AfterContentInit, OnDestroy, ControlValueAccessor {\n private _changeDetector = inject(ChangeDetectorRef);\n\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = inject(_IdGenerator).getId('mat-radio-group-');\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** Subscription to changes in amount of radio buttons. */\n private _buttonChanges: Subscription;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), {descendants: true})\n _radios: QueryList<MatRadioButton>;\n\n /**\n * Theme color of the radio buttons in the group. This API is supported in M2\n * themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/radio/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() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string {\n return this._name;\n }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input({transform: booleanAttribute})\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = value;\n this._markRadiosForCheck();\n }\n\n /** Whether buttons in the group should be interactive while they're disabled. */\n @Input({transform: booleanAttribute})\n get disabledInteractive(): boolean {\n return this._disabledInteractive;\n }\n set disabledInteractive(value: boolean) {\n this._disabledInteractive = value;\n this._markRadiosForCheck();\n }\n private _disabledInteractive = false;\n\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n\n // Clear the `selected` button when it's destroyed since the tabindex of the rest of the\n // buttons depends on it. Note that we don't clear the `value`, because the radio button\n // may be swapped out with a similar one and there are some internal apps that depend on\n // that behavior.\n this._buttonChanges = this._radios.changes.subscribe(() => {\n if (this.selected && !this._radios.find(radio => radio === this.selected)) {\n this._selected = null;\n }\n });\n }\n\n ngOnDestroy() {\n this._buttonChanges?.unsubscribe();\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n@Component({\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrl: 'radio.css',\n host: {\n 'class': 'mat-mdc-radio-button',\n '[attr.id]': 'id',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-mdc-radio-checked]': 'checked',\n '[class.mat-mdc-radio-disabled]': 'disabled',\n '[class.mat-mdc-radio-disabled-interactive]': 'disabledInteractive',\n '[class._mat-animation-noopable]': '_noopAnimations',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n exportAs: 'matRadioButton',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatRipple, _MatInternalFormField],\n})\nexport class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy {\n protected _elementRef = inject(ElementRef);\n private _changeDetector = inject(ChangeDetectorRef);\n private _focusMonitor = inject(FocusMonitor);\n private _radioDispatcher = inject(UniqueSelectionDispatcher);\n private _defaultOptions = inject<MatRadioDefaultOptions>(MAT_RADIO_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n private _ngZone = inject(NgZone);\n private _renderer = inject(Renderer2);\n private _uniqueId = inject(_IdGenerator).getId('mat-radio-');\n private _cleanupClick: (() => void) | undefined;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether ripples are disabled inside the radio button */\n @Input({transform: booleanAttribute})\n disableRipple: boolean = false;\n\n /** Tabindex of the radio button. */\n @Input({\n transform: (value: unknown) => (value == null ? 0 : numberAttribute(value)),\n })\n tabIndex: number = 0;\n\n /** Whether this radio button is checked. */\n @Input({transform: booleanAttribute})\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: boolean) {\n if (this._checked !== value) {\n this._checked = value;\n if (value && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!value && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (value) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n this._setDisabled(value);\n }\n\n /** Whether the radio button is required. */\n @Input({transform: booleanAttribute})\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n if (value !== this._required) {\n this._changeDetector.markForCheck();\n }\n this._required = value;\n }\n\n /**\n * Theme color of the radio button. 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/radio/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(): ThemePalette {\n // As per M2 design specifications the selection control radio should use the accent color\n // palette by default. https://m2.material.io/components/radio-buttons#specs\n return (\n this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n (this._defaultOptions && this._defaultOptions.color) ||\n 'accent'\n );\n }\n set color(newValue: ThemePalette) {\n this._color = newValue;\n }\n private _color: ThemePalette;\n\n /** Whether the radio button should remain interactive when it is disabled. */\n @Input({transform: booleanAttribute})\n get disabledInteractive(): boolean {\n return (\n this._disabledInteractive || (this.radioGroup !== null && this.radioGroup.disabledInteractive)\n );\n }\n set disabledInteractive(value: boolean) {\n this._disabledInteractive = value;\n }\n private _disabledInteractive: boolean;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string {\n return `${this.id || this._uniqueId}-input`;\n }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** Previous value of the input's tabindex. */\n private _previousTabIndex: number | undefined;\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Trigger elements for the ripple events. */\n @ViewChild('formField', {read: ElementRef, static: true})\n _rippleTrigger: ElementRef<HTMLElement>;\n\n /** Whether animations are disabled. */\n _noopAnimations = _animationsDisabled();\n\n private _injector = inject(Injector);\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const radioGroup = inject<MatRadioGroup>(MAT_RADIO_GROUP, {optional: true})!;\n const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._disabledInteractive = this._defaultOptions?.disabledInteractive ?? false;\n\n if (tabIndex) {\n this.tabIndex = numberAttribute(tabIndex, 0);\n }\n }\n\n /** Focuses the radio button. */\n focus(options?: FocusOptions, origin?: FocusOrigin): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n\n this._removeUniqueSelectionListener = this._radioDispatcher.listen((id, name) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n ngDoCheck(): void {\n this._updateTabIndex();\n }\n\n ngAfterViewInit() {\n this._updateTabIndex();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n\n // We bind this outside of the zone, because:\n // 1. Its logic is completely DOM-related so we can avoid some change detections.\n // 2. There appear to be some internal tests that break when this triggers a change detection.\n this._ngZone.runOutsideAngular(() => {\n this._cleanupClick = this._renderer.listen(\n this._inputElement.nativeElement,\n 'click',\n this._onInputClick,\n );\n });\n }\n\n ngOnDestroy() {\n this._cleanupClick?.();\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n\n /** Triggered when the user clicks on the touch target. */\n _onTouchTargetClick(event: Event) {\n this._onInputInteraction(event);\n\n if (!this.disabled || this.disabledInteractive) {\n // Normally the input should be focused already, but if the click\n // comes from the touch target, then we might have to focus it ourselves.\n this._inputElement?.nativeElement.focus();\n }\n }\n\n /** Sets the disabled state and marks for check if a change occurred. */\n protected _setDisabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Called when the input is clicked. */\n private _onInputClick = (event: Event) => {\n // If the input is disabled while interactive, we need to prevent the\n // selection from happening in this event handler. Note that even though\n // this happens on `click` events, the logic applies when the user is\n // navigating with the keyboard as well. An alternative way of doing\n // this is by resetting the `checked` state in the `change` callback but\n // it isn't optimal, because it can allow a pre-checked disabled button\n // to be un-checked. This approach seems to cover everything.\n if (this.disabled && this.disabledInteractive) {\n event.preventDefault();\n }\n };\n\n /** Gets the tabindex for the underlying input element. */\n private _updateTabIndex() {\n const group = this.radioGroup;\n let value: number;\n\n // Implement a roving tabindex if the button is inside a group. For most cases this isn't\n // necessary, because the browser handles the tab order for inputs inside a group automatically,\n // but we need an explicitly higher tabindex for the selected button in order for things like\n // the focus trap to pick it up correctly.\n if (!group || !group.selected || this.disabled) {\n value = this.tabIndex;\n } else {\n value = group.selected === this ? this.tabIndex : -1;\n }\n\n if (value !== this._previousTabIndex) {\n // We have to set the tabindex directly on the DOM node, because it depends on\n // the selected state which is prone to \"changed after checked errors\".\n const input: HTMLInputElement | undefined = this._inputElement?.nativeElement;\n\n if (input) {\n input.setAttribute('tabindex', value + '');\n this._previousTabIndex = value;\n // Wait for any pending tabindex changes to be applied\n afterNextRender(\n () => {\n queueMicrotask(() => {\n // The radio group uses a \"selection follows focus\" pattern for tab management, so if this\n // radio button is currently focused and another radio button in the group becomes\n // selected, we should move focus to the newly selected radio button to maintain\n // consistency between the focused and selected states.\n if (\n group &&\n group.selected &&\n group.selected !== this &&\n document.activeElement === input\n ) {\n group.selected?._inputElement.nativeElement.focus();\n // If this radio button still has focus, the selected one must be disabled. In this\n // case the radio group as a whole should lose focus.\n if (document.activeElement === input) {\n this._inputElement.nativeElement.blur();\n }\n }\n });\n },\n {injector: this._injector},\n );\n }\n }\n }\n}\n","<div mat-internal-form-field [labelPosition]=\"labelPosition\" #formField>\n <div class=\"mdc-radio\" [class.mdc-radio--disabled]=\"disabled\">\n <!-- Render this element first so the input is on top. -->\n <div class=\"mat-mdc-radio-touch-target\" (click)=\"_onTouchTargetClick($event)\"></div>\n <!--\n Note that we set `aria-invalid=\"false\"` on the input, because otherwise some screen readers\n will read out \"required, invalid data\" for each radio button that hasn't been checked.\n An alternate approach is to use `aria-required` instead of `required`, however we have an\n internal check which enforces that elements marked as `aria-required` also have the `required`\n attribute which ends up re-introducing the issue for us.\n -->\n <input #input class=\"mdc-radio__native-control\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled && !disabledInteractive\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n aria-invalid=\"false\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (change)=\"_onInputInteraction($event)\">\n <div class=\"mdc-radio__background\">\n <div class=\"mdc-radio__outer-circle\"></div>\n <div class=\"mdc-radio__inner-circle\"></div>\n </div>\n <div mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"_rippleTrigger.nativeElement\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\">\n <div class=\"mat-ripple-element mat-radio-persistent-ripple\"></div>\n </div>\n </div>\n <label class=\"mdc-label\" [for]=\"inputId\">\n <ng-content></ng-content>\n </label>\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, MatRippleModule} from '../core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n@NgModule({\n imports: [MatCommonModule, MatRippleModule, MatRadioGroup, MatRadioButton],\n exports: [MatCommonModule, MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkDA;MACa,cAAc,CAAA;AAGhB,IAAA,MAAA;AAEA,IAAA,KAAA;AAJT,IAAA,WAAA;;IAES,MAAsB;;IAEtB,KAAQ,EAAA;QAFR,IAAM,CAAA,MAAA,GAAN,MAAM;QAEN,IAAK,CAAA,KAAA,GAAL,KAAK;;AAEf;AAED;;;;AAIG;AACU,MAAA,sCAAsC,GAAQ;AACzD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,aAAa,CAAC;AAC5C,IAAA,KAAK,EAAE,IAAI;;AAGb;;;;AAIG;MACU,eAAe,GAAG,IAAI,cAAc,CAAgB,eAAe;MAgBnE,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,iCAAiC;AAC3C,CAAA;AAGH;;;;AAIG;SACa,iCAAiC,GAAA;IAC/C,OAAO;AACL,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,mBAAmB,EAAE,KAAK;KAC3B;AACH;AAEA;;AAEG;MAaU,aAAa,CAAA;AAChB,IAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC;;IAG3C,MAAM,GAAQ,IAAI;;IAGlB,KAAK,GAAW,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;;IAG9D,SAAS,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sBAAhC,SAAS;uBAAC,OAAO;gBAIlB,cAAc,EAAA,CAAA;sBADb,SAAS;uBAAC,WAAW,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAC;;;ME3kB7C,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHf,OAAA,EAAA,CAAA,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAC/D,EAAA,OAAA,EAAA,CAAA,eAAe,EAAE,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA;AAE7C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,eAAe,EAAE,eAAe,EAAiB,cAAc,EAC/D,eAAe,CAAA,EAAA,CAAA;;kGAEd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;AAC1E,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;AAC1D,iBAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple-loader.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/core/private/ripple-loader.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 Injectable,\n Injector,\n NgZone,\n OnDestroy,\n RendererFactory2,\n inject,\n DOCUMENT,\n} from '@angular/core';\nimport {\n MAT_RIPPLE_GLOBAL_OPTIONS,\n RippleRenderer,\n RippleTarget,\n defaultRippleAnimationConfig,\n} from '../ripple';\nimport {Platform, _getEventTarget} from '@angular/cdk/platform';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\nimport {_animationsDisabled} from '../animation/animation';\n\n/** The options for the MatRippleLoader's event listeners. */\nconst eventListenerOptions = {capture: true};\n\n/**\n * The events that should trigger the initialization of the ripple.\n * Note that we use `mousedown`, rather than `click`, for mouse devices because\n * we can't rely on `mouseenter` in the shadow DOM and `click` happens too late.\n */\nconst rippleInteractionEvents = ['focus', 'mousedown', 'mouseenter', 'touchstart'];\n\n/** The attribute attached to a component whose ripple has not yet been initialized. */\nconst matRippleUninitialized = 'mat-ripple-loader-uninitialized';\n\n/** Additional classes that should be added to the ripple when it is rendered. */\nconst matRippleClassName = 'mat-ripple-loader-class-name';\n\n/** Whether the ripple should be centered. */\nconst matRippleCentered = 'mat-ripple-loader-centered';\n\n/** Whether the ripple should be disabled. */\nconst matRippleDisabled = 'mat-ripple-loader-disabled';\n\n/**\n * Handles attaching ripples on demand.\n *\n * This service allows us to avoid eagerly creating & attaching MatRipples.\n * It works by creating & attaching a ripple only when a component is first interacted with.\n *\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class MatRippleLoader implements OnDestroy {\n private _document = inject(DOCUMENT);\n private _animationsDisabled = _animationsDisabled();\n private _globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {optional: true});\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _injector = inject(Injector);\n private _eventCleanups: (() => void)[];\n private _hosts = new Map<\n HTMLElement,\n {renderer: RippleRenderer; target: RippleTarget; hasSetUpEvents: boolean}\n >();\n\n constructor() {\n const renderer = inject(RendererFactory2).createRenderer(null, null);\n\n this._eventCleanups = this._ngZone.runOutsideAngular(() =>\n rippleInteractionEvents.map(name =>\n renderer.listen(this._document, name, this._onInteraction, eventListenerOptions),\n ),\n );\n }\n\n ngOnDestroy(): void {\n const hosts = this._hosts.keys();\n\n for (const host of hosts) {\n this.destroyRipple(host);\n }\n\n this._eventCleanups.forEach(cleanup => cleanup());\n }\n\n /**\n * Configures the ripple that will be rendered by the ripple loader.\n *\n * Stores the given information about how the ripple should be configured on the host\n * element so that it can later be retrived & used when the ripple is actually created.\n */\n configureRipple(\n host: HTMLElement,\n config: {\n className?: string;\n centered?: boolean;\n disabled?: boolean;\n },\n ): void {\n // Indicates that the ripple has not yet been rendered for this component.\n host.setAttribute(matRippleUninitialized, this._globalRippleOptions?.namespace ?? '');\n\n // Store the additional class name(s) that should be added to the ripple element.\n if (config.className || !host.hasAttribute(matRippleClassName)) {\n host.setAttribute(matRippleClassName, config.className || '');\n }\n\n // Store whether the ripple should be centered.\n if (config.centered) {\n host.setAttribute(matRippleCentered, '');\n }\n\n if (config.disabled) {\n host.setAttribute(matRippleDisabled, '');\n }\n }\n\n /** Sets the disabled state on the ripple instance corresponding to the given host element. */\n setDisabled(host: HTMLElement, disabled: boolean): void {\n const ripple = this._hosts.get(host);\n\n // If the ripple has already been instantiated, just disable it.\n if (ripple) {\n ripple.target.rippleDisabled = disabled;\n\n if (!disabled && !ripple.hasSetUpEvents) {\n ripple.hasSetUpEvents = true;\n ripple.renderer.setupTriggerEvents(host);\n }\n } else if (disabled) {\n // Otherwise, set an attribute so we know what the\n // disabled state should be when the ripple is initialized.\n host.setAttribute(matRippleDisabled, '');\n } else {\n host.removeAttribute(matRippleDisabled);\n }\n }\n\n /**\n * Handles creating and attaching component internals\n * when a component is initially interacted with.\n */\n private _onInteraction = (event: Event) => {\n const eventTarget = _getEventTarget(event);\n\n if (eventTarget instanceof HTMLElement) {\n // TODO(wagnermaciel): Consider batching these events to improve runtime performance.\n const element = eventTarget.closest(\n `[${matRippleUninitialized}=\"${this._globalRippleOptions?.namespace ?? ''}\"]`,\n );\n\n if (element) {\n this._createRipple(element as HTMLElement);\n }\n }\n };\n\n /** Creates a MatRipple and appends it to the given element. */\n private _createRipple(host: HTMLElement): void {\n if (!this._document || this._hosts.has(host)) {\n return;\n }\n\n // Create the ripple element.\n host.querySelector('.mat-ripple')?.remove();\n const rippleEl = this._document.createElement('span');\n rippleEl.classList.add('mat-ripple', host.getAttribute(matRippleClassName)!);\n host.append(rippleEl);\n\n const globalOptions = this._globalRippleOptions;\n const enterDuration = this._animationsDisabled\n ? 0\n : (globalOptions?.animation?.enterDuration ?? defaultRippleAnimationConfig.enterDuration);\n const exitDuration = this._animationsDisabled\n ? 0\n : (globalOptions?.animation?.exitDuration ?? defaultRippleAnimationConfig.exitDuration);\n const target: RippleTarget = {\n rippleDisabled:\n this._animationsDisabled || globalOptions?.disabled || host.hasAttribute(matRippleDisabled),\n rippleConfig: {\n centered: host.hasAttribute(matRippleCentered),\n terminateOnPointerUp: globalOptions?.terminateOnPointerUp,\n animation: {\n enterDuration,\n exitDuration,\n },\n },\n };\n\n const renderer = new RippleRenderer(\n target,\n this._ngZone,\n rippleEl,\n this._platform,\n this._injector,\n );\n const hasSetUpEvents = !target.rippleDisabled;\n\n if (hasSetUpEvents) {\n renderer.setupTriggerEvents(host);\n }\n\n this._hosts.set(host, {\n target,\n renderer,\n hasSetUpEvents,\n });\n\n host.removeAttribute(matRippleUninitialized);\n }\n\n destroyRipple(host: HTMLElement): void {\n const ripple = this._hosts.get(host);\n\n if (ripple) {\n ripple.renderer._removeTriggerEvents();\n this._hosts.delete(host);\n }\n }\n}\n"],"names":[],"mappings":";;;;;;AA2BA;AACA,MAAM,oBAAoB,GAAG,EAAC,OAAO,EAAE,IAAI,EAAC;AAE5C;;;;AAIG;AACH,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,CAAC;AAElF;AACA,MAAM,sBAAsB,GAAG,iCAAiC;AA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T,aAAa;oBACb,YAAY;AACb,iBAAA;AACF,aAAA;SACF;QAED,MAAM,QAAQ,GAAG,IAAI,cAAc,CACjC,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,QAAQ,EACR,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,SAAS,CACf;AACD,QAAA,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,cAAc;QAE7C,IAAI,cAAc,EAAE;AAClB,YAAA,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC;;AAGnC,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;YACpB,MAAM;YACN,QAAQ;YACR,cAAc;AACf,SAAA,CAAC;AAEF,QAAA,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC;;AAG9C,IAAA,aAAa,CAAC,IAAiB,EAAA;QAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QAEpC,IAAI,MAAM,EAAE;AACV,YAAA,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE;AACtC,YAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;;;8GApKjB,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADH,MAAM,EAAA,CAAA;;kGAClB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"ripple-loader.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/private/ripple-loader.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 Injectable,\n Injector,\n NgZone,\n OnDestroy,\n RendererFactory2,\n inject,\n DOCUMENT,\n} from '@angular/core';\nimport {\n MAT_RIPPLE_GLOBAL_OPTIONS,\n RippleRenderer,\n RippleTarget,\n defaultRippleAnimationConfig,\n} from '../ripple';\nimport {Platform, _getEventTarget} from '@angular/cdk/platform';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\nimport {_animationsDisabled} from '../animation/animation';\n\n/** The options for the MatRippleLoader's event listeners. */\nconst eventListenerOptions = {capture: true};\n\n/**\n * The events that should trigger the initialization of the ripple.\n * Note that we use `mousedown`, rather than `click`, for mouse devices because\n * we can't rely on `mouseenter` in the shadow DOM and `click` happens too late.\n */\nconst rippleInteractionEvents = ['focus', 'mousedown', 'mouseenter', 'touchstart'];\n\n/** The attribute attached to a component whose ripple has not yet been initialized. */\nconst matRippleUninitialized = 'mat-ripple-loader-uninitialized';\n\n/** Additional classes that should be added to the ripple when it is rendered. */\nconst matRippleClassName = 'mat-ripple-loader-class-name';\n\n/** Whether the ripple should be centered. */\nconst matRippleCentered = 'mat-ripple-loader-centered';\n\n/** Whether the ripple should be disabled. */\nconst matRippleDisabled = 'mat-ripple-loader-disabled';\n\n/**\n * Handles attaching ripples on demand.\n *\n * This service allows us to avoid eagerly creating & attaching MatRipples.\n * It works by creating & attaching a ripple only when a component is first interacted with.\n *\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class MatRippleLoader implements OnDestroy {\n private _document = inject(DOCUMENT);\n private _animationsDisabled = _animationsDisabled();\n private _globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {optional: true});\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _injector = inject(Injector);\n private _eventCleanups: (() => void)[];\n private _hosts = new Map<\n HTMLElement,\n {renderer: RippleRenderer; target: RippleTarget; hasSetUpEvents: boolean}\n >();\n\n constructor() {\n const renderer = inject(RendererFactory2).createRenderer(null, null);\n\n this._eventCleanups = this._ngZone.runOutsideAngular(() =>\n rippleInteractionEvents.map(name =>\n renderer.listen(this._document, name, this._onInteraction, eventListenerOptions),\n ),\n );\n }\n\n ngOnDestroy(): void {\n const hosts = this._hosts.keys();\n\n for (const host of hosts) {\n this.destroyRipple(host);\n }\n\n this._eventCleanups.forEach(cleanup => cleanup());\n }\n\n /**\n * Configures the ripple that will be rendered by the ripple loader.\n *\n * Stores the given information about how the ripple should be configured on the host\n * element so that it can later be retrived & used when the ripple is actually created.\n */\n configureRipple(\n host: HTMLElement,\n config: {\n className?: string;\n centered?: boolean;\n disabled?: boolean;\n },\n ): void {\n // Indicates that the ripple has not yet been rendered for this component.\n host.setAttribute(matRippleUninitialized, this._globalRippleOptions?.namespace ?? '');\n\n // Store the additional class name(s) that should be added to the ripple element.\n if (config.className || !host.hasAttribute(matRippleClassName)) {\n host.setAttribute(matRippleClassName, config.className || '');\n }\n\n // Store whether the ripple should be centered.\n if (config.centered) {\n host.setAttribute(matRippleCentered, '');\n }\n\n if (config.disabled) {\n host.setAttribute(matRippleDisabled, '');\n }\n }\n\n /** Sets the disabled state on the ripple instance corresponding to the given host element. */\n setDisabled(host: HTMLElement, disabled: boolean): void {\n const ripple = this._hosts.get(host);\n\n // If the ripple has already been instantiated, just disable it.\n if (ripple) {\n ripple.target.rippleDisabled = disabled;\n\n if (!disabled && !ripple.hasSetUpEvents) {\n ripple.hasSetUpEvents = true;\n ripple.renderer.setupTriggerEvents(host);\n }\n } else if (disabled) {\n // Otherwise, set an attribute so we know what the\n // disabled state should be when the ripple is initialized.\n host.setAttribute(matRippleDisabled, '');\n } else {\n host.removeAttribute(matRippleDisabled);\n }\n }\n\n /**\n * Handles creating and attaching component internals\n * when a component is initially interacted with.\n */\n private _onInteraction = (event: Event) => {\n const eventTarget = _getEventTarget(event);\n\n if (eventTarget instanceof HTMLElement) {\n // TODO(wagnermaciel): Consider batching these events to improve runtime performance.\n const element = eventTarget.closest(\n `[${matRippleUninitialized}=\"${this._globalRippleOptions?.namespace ?? ''}\"]`,\n );\n\n if (element) {\n this._createRipple(element as HTMLElement);\n }\n }\n };\n\n /** Creates a MatRipple and appends it to the given element. */\n private _createRipple(host: HTMLElement): void {\n if (!this._document || this._hosts.has(host)) {\n return;\n }\n\n // Create the ripple element.\n host.querySelector('.mat-ripple')?.remove();\n const rippleEl = this._document.createElement('span');\n rippleEl.classList.add('mat-ripple', host.getAttribute(matRippleClassName)!);\n host.append(rippleEl);\n\n const globalOptions = this._globalRippleOptions;\n const enterDuration = this._animationsDisabled\n ? 0\n : (globalOptions?.animation?.enterDuration ?? defaultRippleAnimationConfig.enterDuration);\n const exitDuration = this._animationsDisabled\n ? 0\n : (globalOptions?.animation?.exitDuration ?? defaultRippleAnimationConfig.exitDuration);\n const target: RippleTarget = {\n rippleDisabled:\n this._animationsDisabled || globalOptions?.disabled || host.hasAttribute(matRippleDisabled),\n rippleConfig: {\n centered: host.hasAttribute(matRippleCentered),\n terminateOnPointerUp: globalOptions?.terminateOnPointerUp,\n animation: {\n enterDuration,\n exitDuration,\n },\n },\n };\n\n const renderer = new RippleRenderer(\n target,\n this._ngZone,\n rippleEl,\n this._platform,\n this._injector,\n );\n const hasSetUpEvents = !target.rippleDisabled;\n\n if (hasSetUpEvents) {\n renderer.setupTriggerEvents(host);\n }\n\n this._hosts.set(host, {\n target,\n renderer,\n hasSetUpEvents,\n });\n\n host.removeAttribute(matRippleUninitialized);\n }\n\n destroyRipple(host: HTMLElement): void {\n const ripple = this._hosts.get(host);\n\n if (ripple) {\n ripple.renderer._removeTriggerEvents();\n this._hosts.delete(host);\n }\n }\n}\n"],"names":[],"mappings":";;;;;;AA2BA;AACA,MAAM,oBAAoB,GAAG,EAAC,OAAO,EAAE,IAAI,EAAC;AAE5C;;;;AAIG;AACH,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAA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1
|
+
{"version":3,"file":"ripple-module.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/ripple/ripple-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 {MatCommonModule} from '../common-behaviors/common-module';\nimport {MatRipple} from './ripple';\n\n@NgModule({\n imports: [MatCommonModule, MatRipple],\n exports: [MatRipple, MatCommonModule],\n})\nexport class MatRippleModule {}\n"],"names":[],"mappings":";;;;;MAgBa,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,eAAe,EAAE,SAAS,CAC1B,EAAA,OAAA,EAAA,CAAA,SAAS,EAAE,eAAe,CAAA,EAAA,CAAA;+GAEzB,eAAe,EAAA,OAAA,EAAA,CAHhB,eAAe,EACJ,eAAe,CAAA,EAAA,CAAA;;kGAEzB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC;AACrC,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;AACtC,iBAAA;;;;;"}
|