1 | (function (global, factory) {
|
---|
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/material/core'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/a11y'), require('@angular/cdk/collections'), require('@angular/cdk/keycodes'), require('@angular/forms'), require('@angular/material/divider')) :
|
---|
3 | typeof define === 'function' && define.amd ? define('@angular/material/list', ['exports', '@angular/common', '@angular/core', '@angular/material/core', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/cdk/a11y', '@angular/cdk/collections', '@angular/cdk/keycodes', '@angular/forms', '@angular/material/divider'], factory) :
|
---|
4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.list = {}), global.ng.common, global.ng.core, global.ng.material.core, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.cdk.a11y, global.ng.cdk.collections, global.ng.cdk.keycodes, global.ng.forms, global.ng.material.divider));
|
---|
5 | }(this, (function (exports, common, core$1, core, coercion, rxjs, operators, a11y, collections, keycodes, forms, divider) { 'use strict';
|
---|
6 |
|
---|
7 | /*! *****************************************************************************
|
---|
8 | Copyright (c) Microsoft Corporation.
|
---|
9 |
|
---|
10 | Permission to use, copy, modify, and/or distribute this software for any
|
---|
11 | purpose with or without fee is hereby granted.
|
---|
12 |
|
---|
13 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
---|
14 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
---|
15 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
---|
16 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
---|
17 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
---|
18 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
---|
19 | PERFORMANCE OF THIS SOFTWARE.
|
---|
20 | ***************************************************************************** */
|
---|
21 | /* global Reflect, Promise */
|
---|
22 | var extendStatics = function (d, b) {
|
---|
23 | extendStatics = Object.setPrototypeOf ||
|
---|
24 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
---|
25 | function (d, b) { for (var p in b)
|
---|
26 | if (Object.prototype.hasOwnProperty.call(b, p))
|
---|
27 | d[p] = b[p]; };
|
---|
28 | return extendStatics(d, b);
|
---|
29 | };
|
---|
30 | function __extends(d, b) {
|
---|
31 | if (typeof b !== "function" && b !== null)
|
---|
32 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
---|
33 | extendStatics(d, b);
|
---|
34 | function __() { this.constructor = d; }
|
---|
35 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
---|
36 | }
|
---|
37 | var __assign = function () {
|
---|
38 | __assign = Object.assign || function __assign(t) {
|
---|
39 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
---|
40 | s = arguments[i];
|
---|
41 | for (var p in s)
|
---|
42 | if (Object.prototype.hasOwnProperty.call(s, p))
|
---|
43 | t[p] = s[p];
|
---|
44 | }
|
---|
45 | return t;
|
---|
46 | };
|
---|
47 | return __assign.apply(this, arguments);
|
---|
48 | };
|
---|
49 | function __rest(s, e) {
|
---|
50 | var t = {};
|
---|
51 | for (var p in s)
|
---|
52 | if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
---|
53 | t[p] = s[p];
|
---|
54 | if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
---|
55 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
---|
56 | if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
---|
57 | t[p[i]] = s[p[i]];
|
---|
58 | }
|
---|
59 | return t;
|
---|
60 | }
|
---|
61 | function __decorate(decorators, target, key, desc) {
|
---|
62 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
---|
63 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
---|
64 | r = Reflect.decorate(decorators, target, key, desc);
|
---|
65 | else
|
---|
66 | for (var i = decorators.length - 1; i >= 0; i--)
|
---|
67 | if (d = decorators[i])
|
---|
68 | r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
---|
69 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
---|
70 | }
|
---|
71 | function __param(paramIndex, decorator) {
|
---|
72 | return function (target, key) { decorator(target, key, paramIndex); };
|
---|
73 | }
|
---|
74 | function __metadata(metadataKey, metadataValue) {
|
---|
75 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
---|
76 | return Reflect.metadata(metadataKey, metadataValue);
|
---|
77 | }
|
---|
78 | function __awaiter(thisArg, _arguments, P, generator) {
|
---|
79 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
---|
80 | return new (P || (P = Promise))(function (resolve, reject) {
|
---|
81 | function fulfilled(value) { try {
|
---|
82 | step(generator.next(value));
|
---|
83 | }
|
---|
84 | catch (e) {
|
---|
85 | reject(e);
|
---|
86 | } }
|
---|
87 | function rejected(value) { try {
|
---|
88 | step(generator["throw"](value));
|
---|
89 | }
|
---|
90 | catch (e) {
|
---|
91 | reject(e);
|
---|
92 | } }
|
---|
93 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
---|
94 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
---|
95 | });
|
---|
96 | }
|
---|
97 | function __generator(thisArg, body) {
|
---|
98 | var _ = { label: 0, sent: function () { if (t[0] & 1)
|
---|
99 | throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
---|
100 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
---|
101 | function verb(n) { return function (v) { return step([n, v]); }; }
|
---|
102 | function step(op) {
|
---|
103 | if (f)
|
---|
104 | throw new TypeError("Generator is already executing.");
|
---|
105 | while (_)
|
---|
106 | try {
|
---|
107 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
---|
108 | return t;
|
---|
109 | if (y = 0, t)
|
---|
110 | op = [op[0] & 2, t.value];
|
---|
111 | switch (op[0]) {
|
---|
112 | case 0:
|
---|
113 | case 1:
|
---|
114 | t = op;
|
---|
115 | break;
|
---|
116 | case 4:
|
---|
117 | _.label++;
|
---|
118 | return { value: op[1], done: false };
|
---|
119 | case 5:
|
---|
120 | _.label++;
|
---|
121 | y = op[1];
|
---|
122 | op = [0];
|
---|
123 | continue;
|
---|
124 | case 7:
|
---|
125 | op = _.ops.pop();
|
---|
126 | _.trys.pop();
|
---|
127 | continue;
|
---|
128 | default:
|
---|
129 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
---|
130 | _ = 0;
|
---|
131 | continue;
|
---|
132 | }
|
---|
133 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
---|
134 | _.label = op[1];
|
---|
135 | break;
|
---|
136 | }
|
---|
137 | if (op[0] === 6 && _.label < t[1]) {
|
---|
138 | _.label = t[1];
|
---|
139 | t = op;
|
---|
140 | break;
|
---|
141 | }
|
---|
142 | if (t && _.label < t[2]) {
|
---|
143 | _.label = t[2];
|
---|
144 | _.ops.push(op);
|
---|
145 | break;
|
---|
146 | }
|
---|
147 | if (t[2])
|
---|
148 | _.ops.pop();
|
---|
149 | _.trys.pop();
|
---|
150 | continue;
|
---|
151 | }
|
---|
152 | op = body.call(thisArg, _);
|
---|
153 | }
|
---|
154 | catch (e) {
|
---|
155 | op = [6, e];
|
---|
156 | y = 0;
|
---|
157 | }
|
---|
158 | finally {
|
---|
159 | f = t = 0;
|
---|
160 | }
|
---|
161 | if (op[0] & 5)
|
---|
162 | throw op[1];
|
---|
163 | return { value: op[0] ? op[1] : void 0, done: true };
|
---|
164 | }
|
---|
165 | }
|
---|
166 | var __createBinding = Object.create ? (function (o, m, k, k2) {
|
---|
167 | if (k2 === undefined)
|
---|
168 | k2 = k;
|
---|
169 | Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
---|
170 | }) : (function (o, m, k, k2) {
|
---|
171 | if (k2 === undefined)
|
---|
172 | k2 = k;
|
---|
173 | o[k2] = m[k];
|
---|
174 | });
|
---|
175 | function __exportStar(m, o) {
|
---|
176 | for (var p in m)
|
---|
177 | if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
---|
178 | __createBinding(o, m, p);
|
---|
179 | }
|
---|
180 | function __values(o) {
|
---|
181 | var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
---|
182 | if (m)
|
---|
183 | return m.call(o);
|
---|
184 | if (o && typeof o.length === "number")
|
---|
185 | return {
|
---|
186 | next: function () {
|
---|
187 | if (o && i >= o.length)
|
---|
188 | o = void 0;
|
---|
189 | return { value: o && o[i++], done: !o };
|
---|
190 | }
|
---|
191 | };
|
---|
192 | throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
---|
193 | }
|
---|
194 | function __read(o, n) {
|
---|
195 | var m = typeof Symbol === "function" && o[Symbol.iterator];
|
---|
196 | if (!m)
|
---|
197 | return o;
|
---|
198 | var i = m.call(o), r, ar = [], e;
|
---|
199 | try {
|
---|
200 | while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
---|
201 | ar.push(r.value);
|
---|
202 | }
|
---|
203 | catch (error) {
|
---|
204 | e = { error: error };
|
---|
205 | }
|
---|
206 | finally {
|
---|
207 | try {
|
---|
208 | if (r && !r.done && (m = i["return"]))
|
---|
209 | m.call(i);
|
---|
210 | }
|
---|
211 | finally {
|
---|
212 | if (e)
|
---|
213 | throw e.error;
|
---|
214 | }
|
---|
215 | }
|
---|
216 | return ar;
|
---|
217 | }
|
---|
218 | /** @deprecated */
|
---|
219 | function __spread() {
|
---|
220 | for (var ar = [], i = 0; i < arguments.length; i++)
|
---|
221 | ar = ar.concat(__read(arguments[i]));
|
---|
222 | return ar;
|
---|
223 | }
|
---|
224 | /** @deprecated */
|
---|
225 | function __spreadArrays() {
|
---|
226 | for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
---|
227 | s += arguments[i].length;
|
---|
228 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
---|
229 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
---|
230 | r[k] = a[j];
|
---|
231 | return r;
|
---|
232 | }
|
---|
233 | function __spreadArray(to, from, pack) {
|
---|
234 | if (pack || arguments.length === 2)
|
---|
235 | for (var i = 0, l = from.length, ar; i < l; i++) {
|
---|
236 | if (ar || !(i in from)) {
|
---|
237 | if (!ar)
|
---|
238 | ar = Array.prototype.slice.call(from, 0, i);
|
---|
239 | ar[i] = from[i];
|
---|
240 | }
|
---|
241 | }
|
---|
242 | return to.concat(ar || from);
|
---|
243 | }
|
---|
244 | function __await(v) {
|
---|
245 | return this instanceof __await ? (this.v = v, this) : new __await(v);
|
---|
246 | }
|
---|
247 | function __asyncGenerator(thisArg, _arguments, generator) {
|
---|
248 | if (!Symbol.asyncIterator)
|
---|
249 | throw new TypeError("Symbol.asyncIterator is not defined.");
|
---|
250 | var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
---|
251 | return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
---|
252 | function verb(n) { if (g[n])
|
---|
253 | i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
---|
254 | function resume(n, v) { try {
|
---|
255 | step(g[n](v));
|
---|
256 | }
|
---|
257 | catch (e) {
|
---|
258 | settle(q[0][3], e);
|
---|
259 | } }
|
---|
260 | function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
---|
261 | function fulfill(value) { resume("next", value); }
|
---|
262 | function reject(value) { resume("throw", value); }
|
---|
263 | function settle(f, v) { if (f(v), q.shift(), q.length)
|
---|
264 | resume(q[0][0], q[0][1]); }
|
---|
265 | }
|
---|
266 | function __asyncDelegator(o) {
|
---|
267 | var i, p;
|
---|
268 | return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
---|
269 | function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
---|
270 | }
|
---|
271 | function __asyncValues(o) {
|
---|
272 | if (!Symbol.asyncIterator)
|
---|
273 | throw new TypeError("Symbol.asyncIterator is not defined.");
|
---|
274 | var m = o[Symbol.asyncIterator], i;
|
---|
275 | return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
---|
276 | function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
---|
277 | function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
---|
278 | }
|
---|
279 | function __makeTemplateObject(cooked, raw) {
|
---|
280 | if (Object.defineProperty) {
|
---|
281 | Object.defineProperty(cooked, "raw", { value: raw });
|
---|
282 | }
|
---|
283 | else {
|
---|
284 | cooked.raw = raw;
|
---|
285 | }
|
---|
286 | return cooked;
|
---|
287 | }
|
---|
288 | ;
|
---|
289 | var __setModuleDefault = Object.create ? (function (o, v) {
|
---|
290 | Object.defineProperty(o, "default", { enumerable: true, value: v });
|
---|
291 | }) : function (o, v) {
|
---|
292 | o["default"] = v;
|
---|
293 | };
|
---|
294 | function __importStar(mod) {
|
---|
295 | if (mod && mod.__esModule)
|
---|
296 | return mod;
|
---|
297 | var result = {};
|
---|
298 | if (mod != null)
|
---|
299 | for (var k in mod)
|
---|
300 | if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
---|
301 | __createBinding(result, mod, k);
|
---|
302 | __setModuleDefault(result, mod);
|
---|
303 | return result;
|
---|
304 | }
|
---|
305 | function __importDefault(mod) {
|
---|
306 | return (mod && mod.__esModule) ? mod : { default: mod };
|
---|
307 | }
|
---|
308 | function __classPrivateFieldGet(receiver, state, kind, f) {
|
---|
309 | if (kind === "a" && !f)
|
---|
310 | throw new TypeError("Private accessor was defined without a getter");
|
---|
311 | if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
---|
312 | throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
---|
313 | return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
---|
314 | }
|
---|
315 | function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
---|
316 | if (kind === "m")
|
---|
317 | throw new TypeError("Private method is not writable");
|
---|
318 | if (kind === "a" && !f)
|
---|
319 | throw new TypeError("Private accessor was defined without a setter");
|
---|
320 | if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
---|
321 | throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
---|
322 | return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
---|
323 | }
|
---|
324 |
|
---|
325 | // Boilerplate for applying mixins to MatList.
|
---|
326 | /** @docs-private */
|
---|
327 | var _MatListBase = core.mixinDisabled(core.mixinDisableRipple(/** @class */ (function () {
|
---|
328 | function class_1() {
|
---|
329 | }
|
---|
330 | return class_1;
|
---|
331 | }())));
|
---|
332 | // Boilerplate for applying mixins to MatListItem.
|
---|
333 | /** @docs-private */
|
---|
334 | var _MatListItemMixinBase = core.mixinDisableRipple(/** @class */ (function () {
|
---|
335 | function class_2() {
|
---|
336 | }
|
---|
337 | return class_2;
|
---|
338 | }()));
|
---|
339 | /**
|
---|
340 | * Injection token that can be used to inject instances of `MatList`. It serves as
|
---|
341 | * alternative token to the actual `MatList` class which could cause unnecessary
|
---|
342 | * retention of the class and its component metadata.
|
---|
343 | */
|
---|
344 | var MAT_LIST = new core$1.InjectionToken('MatList');
|
---|
345 | /**
|
---|
346 | * Injection token that can be used to inject instances of `MatNavList`. It serves as
|
---|
347 | * alternative token to the actual `MatNavList` class which could cause unnecessary
|
---|
348 | * retention of the class and its component metadata.
|
---|
349 | */
|
---|
350 | var MAT_NAV_LIST = new core$1.InjectionToken('MatNavList');
|
---|
351 | var MatNavList = /** @class */ (function (_super) {
|
---|
352 | __extends(MatNavList, _super);
|
---|
353 | function MatNavList() {
|
---|
354 | var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
---|
355 | /** Emits when the state of the list changes. */
|
---|
356 | _this._stateChanges = new rxjs.Subject();
|
---|
357 | return _this;
|
---|
358 | }
|
---|
359 | MatNavList.prototype.ngOnChanges = function () {
|
---|
360 | this._stateChanges.next();
|
---|
361 | };
|
---|
362 | MatNavList.prototype.ngOnDestroy = function () {
|
---|
363 | this._stateChanges.complete();
|
---|
364 | };
|
---|
365 | return MatNavList;
|
---|
366 | }(_MatListBase));
|
---|
367 | MatNavList.decorators = [
|
---|
368 | { type: core$1.Component, args: [{
|
---|
369 | selector: 'mat-nav-list',
|
---|
370 | exportAs: 'matNavList',
|
---|
371 | host: {
|
---|
372 | 'role': 'navigation',
|
---|
373 | 'class': 'mat-nav-list mat-list-base'
|
---|
374 | },
|
---|
375 | template: "<ng-content></ng-content>\n\n",
|
---|
376 | inputs: ['disableRipple', 'disabled'],
|
---|
377 | encapsulation: core$1.ViewEncapsulation.None,
|
---|
378 | changeDetection: core$1.ChangeDetectionStrategy.OnPush,
|
---|
379 | providers: [{ provide: MAT_NAV_LIST, useExisting: MatNavList }],
|
---|
380 | styles: [".mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px;z-index:1}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n"]
|
---|
381 | },] }
|
---|
382 | ];
|
---|
383 | var MatList = /** @class */ (function (_super) {
|
---|
384 | __extends(MatList, _super);
|
---|
385 | function MatList(_elementRef) {
|
---|
386 | var _this = _super.call(this) || this;
|
---|
387 | _this._elementRef = _elementRef;
|
---|
388 | /** Emits when the state of the list changes. */
|
---|
389 | _this._stateChanges = new rxjs.Subject();
|
---|
390 | if (_this._getListType() === 'action-list') {
|
---|
391 | _elementRef.nativeElement.classList.add('mat-action-list');
|
---|
392 | }
|
---|
393 | return _this;
|
---|
394 | }
|
---|
395 | MatList.prototype._getListType = function () {
|
---|
396 | var nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();
|
---|
397 | if (nodeName === 'mat-list') {
|
---|
398 | return 'list';
|
---|
399 | }
|
---|
400 | if (nodeName === 'mat-action-list') {
|
---|
401 | return 'action-list';
|
---|
402 | }
|
---|
403 | return null;
|
---|
404 | };
|
---|
405 | MatList.prototype.ngOnChanges = function () {
|
---|
406 | this._stateChanges.next();
|
---|
407 | };
|
---|
408 | MatList.prototype.ngOnDestroy = function () {
|
---|
409 | this._stateChanges.complete();
|
---|
410 | };
|
---|
411 | return MatList;
|
---|
412 | }(_MatListBase));
|
---|
413 | MatList.decorators = [
|
---|
414 | { type: core$1.Component, args: [{
|
---|
415 | selector: 'mat-list, mat-action-list',
|
---|
416 | exportAs: 'matList',
|
---|
417 | template: "<ng-content></ng-content>\n\n",
|
---|
418 | host: {
|
---|
419 | 'class': 'mat-list mat-list-base'
|
---|
420 | },
|
---|
421 | inputs: ['disableRipple', 'disabled'],
|
---|
422 | encapsulation: core$1.ViewEncapsulation.None,
|
---|
423 | changeDetection: core$1.ChangeDetectionStrategy.OnPush,
|
---|
424 | providers: [{ provide: MAT_LIST, useExisting: MatList }],
|
---|
425 | styles: [".mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px;z-index:1}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n"]
|
---|
426 | },] }
|
---|
427 | ];
|
---|
428 | MatList.ctorParameters = function () { return [
|
---|
429 | { type: core$1.ElementRef }
|
---|
430 | ]; };
|
---|
431 | /**
|
---|
432 | * Directive whose purpose is to add the mat- CSS styling to this selector.
|
---|
433 | * @docs-private
|
---|
434 | */
|
---|
435 | var MatListAvatarCssMatStyler = /** @class */ (function () {
|
---|
436 | function MatListAvatarCssMatStyler() {
|
---|
437 | }
|
---|
438 | return MatListAvatarCssMatStyler;
|
---|
439 | }());
|
---|
440 | MatListAvatarCssMatStyler.decorators = [
|
---|
441 | { type: core$1.Directive, args: [{
|
---|
442 | selector: '[mat-list-avatar], [matListAvatar]',
|
---|
443 | host: { 'class': 'mat-list-avatar' }
|
---|
444 | },] }
|
---|
445 | ];
|
---|
446 | /**
|
---|
447 | * Directive whose purpose is to add the mat- CSS styling to this selector.
|
---|
448 | * @docs-private
|
---|
449 | */
|
---|
450 | var MatListIconCssMatStyler = /** @class */ (function () {
|
---|
451 | function MatListIconCssMatStyler() {
|
---|
452 | }
|
---|
453 | return MatListIconCssMatStyler;
|
---|
454 | }());
|
---|
455 | MatListIconCssMatStyler.decorators = [
|
---|
456 | { type: core$1.Directive, args: [{
|
---|
457 | selector: '[mat-list-icon], [matListIcon]',
|
---|
458 | host: { 'class': 'mat-list-icon' }
|
---|
459 | },] }
|
---|
460 | ];
|
---|
461 | /**
|
---|
462 | * Directive whose purpose is to add the mat- CSS styling to this selector.
|
---|
463 | * @docs-private
|
---|
464 | */
|
---|
465 | var MatListSubheaderCssMatStyler = /** @class */ (function () {
|
---|
466 | function MatListSubheaderCssMatStyler() {
|
---|
467 | }
|
---|
468 | return MatListSubheaderCssMatStyler;
|
---|
469 | }());
|
---|
470 | MatListSubheaderCssMatStyler.decorators = [
|
---|
471 | { type: core$1.Directive, args: [{
|
---|
472 | selector: '[mat-subheader], [matSubheader]',
|
---|
473 | host: { 'class': 'mat-subheader' }
|
---|
474 | },] }
|
---|
475 | ];
|
---|
476 | /** An item within a Material Design list. */
|
---|
477 | var MatListItem = /** @class */ (function (_super) {
|
---|
478 | __extends(MatListItem, _super);
|
---|
479 | function MatListItem(_element, _changeDetectorRef, navList, list) {
|
---|
480 | var _this = _super.call(this) || this;
|
---|
481 | _this._element = _element;
|
---|
482 | _this._isInteractiveList = false;
|
---|
483 | _this._destroyed = new rxjs.Subject();
|
---|
484 | _this._disabled = false;
|
---|
485 | _this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));
|
---|
486 | _this._list = navList || list;
|
---|
487 | // If no type attribute is specified for <button>, set it to "button".
|
---|
488 | // If a type attribute is already specified, do nothing.
|
---|
489 | var element = _this._getHostElement();
|
---|
490 | if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {
|
---|
491 | element.setAttribute('type', 'button');
|
---|
492 | }
|
---|
493 | if (_this._list) {
|
---|
494 | // React to changes in the state of the parent list since
|
---|
495 | // some of the item's properties depend on it (e.g. `disableRipple`).
|
---|
496 | _this._list._stateChanges.pipe(operators.takeUntil(_this._destroyed)).subscribe(function () {
|
---|
497 | _changeDetectorRef.markForCheck();
|
---|
498 | });
|
---|
499 | }
|
---|
500 | return _this;
|
---|
501 | }
|
---|
502 | Object.defineProperty(MatListItem.prototype, "disabled", {
|
---|
503 | /** Whether the option is disabled. */
|
---|
504 | get: function () { return this._disabled || !!(this._list && this._list.disabled); },
|
---|
505 | set: function (value) {
|
---|
506 | this._disabled = coercion.coerceBooleanProperty(value);
|
---|
507 | },
|
---|
508 | enumerable: false,
|
---|
509 | configurable: true
|
---|
510 | });
|
---|
511 | MatListItem.prototype.ngAfterContentInit = function () {
|
---|
512 | core.setLines(this._lines, this._element);
|
---|
513 | };
|
---|
514 | MatListItem.prototype.ngOnDestroy = function () {
|
---|
515 | this._destroyed.next();
|
---|
516 | this._destroyed.complete();
|
---|
517 | };
|
---|
518 | /** Whether this list item should show a ripple effect when clicked. */
|
---|
519 | MatListItem.prototype._isRippleDisabled = function () {
|
---|
520 | return !this._isInteractiveList || this.disableRipple ||
|
---|
521 | !!(this._list && this._list.disableRipple);
|
---|
522 | };
|
---|
523 | /** Retrieves the DOM element of the component host. */
|
---|
524 | MatListItem.prototype._getHostElement = function () {
|
---|
525 | return this._element.nativeElement;
|
---|
526 | };
|
---|
527 | return MatListItem;
|
---|
528 | }(_MatListItemMixinBase));
|
---|
529 | MatListItem.decorators = [
|
---|
530 | { type: core$1.Component, args: [{
|
---|
531 | selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',
|
---|
532 | exportAs: 'matListItem',
|
---|
533 | host: {
|
---|
534 | 'class': 'mat-list-item mat-focus-indicator',
|
---|
535 | '[class.mat-list-item-disabled]': 'disabled',
|
---|
536 | // @breaking-change 8.0.0 Remove `mat-list-item-avatar` in favor of `mat-list-item-with-avatar`.
|
---|
537 | '[class.mat-list-item-avatar]': '_avatar || _icon',
|
---|
538 | '[class.mat-list-item-with-avatar]': '_avatar || _icon',
|
---|
539 | },
|
---|
540 | inputs: ['disableRipple'],
|
---|
541 | template: "<div class=\"mat-list-item-content\">\n <div class=\"mat-list-item-ripple\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"_isRippleDisabled()\">\n </div>\n\n <ng-content select=\"[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]\">\n </ng-content>\n\n <div class=\"mat-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n\n <ng-content></ng-content>\n</div>\n",
|
---|
542 | encapsulation: core$1.ViewEncapsulation.None,
|
---|
543 | changeDetection: core$1.ChangeDetectionStrategy.OnPush
|
---|
544 | },] }
|
---|
545 | ];
|
---|
546 | MatListItem.ctorParameters = function () { return [
|
---|
547 | { type: core$1.ElementRef },
|
---|
548 | { type: core$1.ChangeDetectorRef },
|
---|
549 | { type: MatNavList, decorators: [{ type: core$1.Optional }, { type: core$1.Inject, args: [MAT_NAV_LIST,] }] },
|
---|
550 | { type: MatList, decorators: [{ type: core$1.Optional }, { type: core$1.Inject, args: [MAT_LIST,] }] }
|
---|
551 | ]; };
|
---|
552 | MatListItem.propDecorators = {
|
---|
553 | _lines: [{ type: core$1.ContentChildren, args: [core.MatLine, { descendants: true },] }],
|
---|
554 | _avatar: [{ type: core$1.ContentChild, args: [MatListAvatarCssMatStyler,] }],
|
---|
555 | _icon: [{ type: core$1.ContentChild, args: [MatListIconCssMatStyler,] }],
|
---|
556 | disabled: [{ type: core$1.Input }]
|
---|
557 | };
|
---|
558 |
|
---|
559 | var _MatSelectionListBase = core.mixinDisableRipple(/** @class */ (function () {
|
---|
560 | function class_1() {
|
---|
561 | }
|
---|
562 | return class_1;
|
---|
563 | }()));
|
---|
564 | var _MatListOptionBase = core.mixinDisableRipple(/** @class */ (function () {
|
---|
565 | function class_2() {
|
---|
566 | }
|
---|
567 | return class_2;
|
---|
568 | }()));
|
---|
569 | /** @docs-private */
|
---|
570 | var MAT_SELECTION_LIST_VALUE_ACCESSOR = {
|
---|
571 | provide: forms.NG_VALUE_ACCESSOR,
|
---|
572 | useExisting: core$1.forwardRef(function () { return MatSelectionList; }),
|
---|
573 | multi: true
|
---|
574 | };
|
---|
575 | /** Change event that is being fired whenever the selected state of an option changes. */
|
---|
576 | var MatSelectionListChange = /** @class */ (function () {
|
---|
577 | function MatSelectionListChange(
|
---|
578 | /** Reference to the selection list that emitted the event. */
|
---|
579 | source,
|
---|
580 | /**
|
---|
581 | * Reference to the option that has been changed.
|
---|
582 | * @deprecated Use `options` instead, because some events may change more than one option.
|
---|
583 | * @breaking-change 12.0.0
|
---|
584 | */
|
---|
585 | option,
|
---|
586 | /** Reference to the options that have been changed. */
|
---|
587 | options) {
|
---|
588 | this.source = source;
|
---|
589 | this.option = option;
|
---|
590 | this.options = options;
|
---|
591 | }
|
---|
592 | return MatSelectionListChange;
|
---|
593 | }());
|
---|
594 | /**
|
---|
595 | * Component for list-options of selection-list. Each list-option can automatically
|
---|
596 | * generate a checkbox and can put current item into the selectionModel of selection-list
|
---|
597 | * if the current item is selected.
|
---|
598 | */
|
---|
599 | var MatListOption = /** @class */ (function (_super) {
|
---|
600 | __extends(MatListOption, _super);
|
---|
601 | function MatListOption(_element, _changeDetector,
|
---|
602 | /** @docs-private */
|
---|
603 | selectionList) {
|
---|
604 | var _this = _super.call(this) || this;
|
---|
605 | _this._element = _element;
|
---|
606 | _this._changeDetector = _changeDetector;
|
---|
607 | _this.selectionList = selectionList;
|
---|
608 | _this._selected = false;
|
---|
609 | _this._disabled = false;
|
---|
610 | _this._hasFocus = false;
|
---|
611 | /**
|
---|
612 | * Emits when the selected state of the option has changed.
|
---|
613 | * Use to facilitate two-data binding to the `selected` property.
|
---|
614 | * @docs-private
|
---|
615 | */
|
---|
616 | _this.selectedChange = new core$1.EventEmitter();
|
---|
617 | /** Whether the label should appear before or after the checkbox. Defaults to 'after' */
|
---|
618 | _this.checkboxPosition = 'after';
|
---|
619 | /**
|
---|
620 | * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`
|
---|
621 | * in the first cycle.
|
---|
622 | */
|
---|
623 | _this._inputsInitialized = false;
|
---|
624 | return _this;
|
---|
625 | }
|
---|
626 | Object.defineProperty(MatListOption.prototype, "color", {
|
---|
627 | /** Theme color of the list option. This sets the color of the checkbox. */
|
---|
628 | get: function () { return this._color || this.selectionList.color; },
|
---|
629 | set: function (newValue) { this._color = newValue; },
|
---|
630 | enumerable: false,
|
---|
631 | configurable: true
|
---|
632 | });
|
---|
633 | Object.defineProperty(MatListOption.prototype, "value", {
|
---|
634 | /** Value of the option */
|
---|
635 | get: function () { return this._value; },
|
---|
636 | set: function (newValue) {
|
---|
637 | if (this.selected &&
|
---|
638 | !this.selectionList.compareWith(newValue, this.value) &&
|
---|
639 | this._inputsInitialized) {
|
---|
640 | this.selected = false;
|
---|
641 | }
|
---|
642 | this._value = newValue;
|
---|
643 | },
|
---|
644 | enumerable: false,
|
---|
645 | configurable: true
|
---|
646 | });
|
---|
647 | Object.defineProperty(MatListOption.prototype, "disabled", {
|
---|
648 | /** Whether the option is disabled. */
|
---|
649 | get: function () { return this._disabled || (this.selectionList && this.selectionList.disabled); },
|
---|
650 | set: function (value) {
|
---|
651 | var newValue = coercion.coerceBooleanProperty(value);
|
---|
652 | if (newValue !== this._disabled) {
|
---|
653 | this._disabled = newValue;
|
---|
654 | this._changeDetector.markForCheck();
|
---|
655 | }
|
---|
656 | },
|
---|
657 | enumerable: false,
|
---|
658 | configurable: true
|
---|
659 | });
|
---|
660 | Object.defineProperty(MatListOption.prototype, "selected", {
|
---|
661 | /** Whether the option is selected. */
|
---|
662 | get: function () { return this.selectionList.selectedOptions.isSelected(this); },
|
---|
663 | set: function (value) {
|
---|
664 | var isSelected = coercion.coerceBooleanProperty(value);
|
---|
665 | if (isSelected !== this._selected) {
|
---|
666 | this._setSelected(isSelected);
|
---|
667 | if (isSelected || this.selectionList.multiple) {
|
---|
668 | this.selectionList._reportValueChange();
|
---|
669 | }
|
---|
670 | }
|
---|
671 | },
|
---|
672 | enumerable: false,
|
---|
673 | configurable: true
|
---|
674 | });
|
---|
675 | MatListOption.prototype.ngOnInit = function () {
|
---|
676 | var _this = this;
|
---|
677 | var list = this.selectionList;
|
---|
678 | if (list._value && list._value.some(function (value) { return list.compareWith(value, _this._value); })) {
|
---|
679 | this._setSelected(true);
|
---|
680 | }
|
---|
681 | var wasSelected = this._selected;
|
---|
682 | // List options that are selected at initialization can't be reported properly to the form
|
---|
683 | // control. This is because it takes some time until the selection-list knows about all
|
---|
684 | // available options. Also it can happen that the ControlValueAccessor has an initial value
|
---|
685 | // that should be used instead. Deferring the value change report to the next tick ensures
|
---|
686 | // that the form control value is not being overwritten.
|
---|
687 | Promise.resolve().then(function () {
|
---|
688 | if (_this._selected || wasSelected) {
|
---|
689 | _this.selected = true;
|
---|
690 | _this._changeDetector.markForCheck();
|
---|
691 | }
|
---|
692 | });
|
---|
693 | this._inputsInitialized = true;
|
---|
694 | };
|
---|
695 | MatListOption.prototype.ngAfterContentInit = function () {
|
---|
696 | core.setLines(this._lines, this._element);
|
---|
697 | };
|
---|
698 | MatListOption.prototype.ngOnDestroy = function () {
|
---|
699 | var _this = this;
|
---|
700 | if (this.selected) {
|
---|
701 | // We have to delay this until the next tick in order
|
---|
702 | // to avoid changed after checked errors.
|
---|
703 | Promise.resolve().then(function () {
|
---|
704 | _this.selected = false;
|
---|
705 | });
|
---|
706 | }
|
---|
707 | var hadFocus = this._hasFocus;
|
---|
708 | var newActiveItem = this.selectionList._removeOptionFromList(this);
|
---|
709 | // Only move focus if this option was focused at the time it was destroyed.
|
---|
710 | if (hadFocus && newActiveItem) {
|
---|
711 | newActiveItem.focus();
|
---|
712 | }
|
---|
713 | };
|
---|
714 | /** Toggles the selection state of the option. */
|
---|
715 | MatListOption.prototype.toggle = function () {
|
---|
716 | this.selected = !this.selected;
|
---|
717 | };
|
---|
718 | /** Allows for programmatic focusing of the option. */
|
---|
719 | MatListOption.prototype.focus = function () {
|
---|
720 | this._element.nativeElement.focus();
|
---|
721 | };
|
---|
722 | /**
|
---|
723 | * Returns the list item's text label. Implemented as a part of the FocusKeyManager.
|
---|
724 | * @docs-private
|
---|
725 | */
|
---|
726 | MatListOption.prototype.getLabel = function () {
|
---|
727 | return this._text ? (this._text.nativeElement.textContent || '') : '';
|
---|
728 | };
|
---|
729 | /** Whether this list item should show a ripple effect when clicked. */
|
---|
730 | MatListOption.prototype._isRippleDisabled = function () {
|
---|
731 | return this.disabled || this.disableRipple || this.selectionList.disableRipple;
|
---|
732 | };
|
---|
733 | MatListOption.prototype._handleClick = function () {
|
---|
734 | if (!this.disabled && (this.selectionList.multiple || !this.selected)) {
|
---|
735 | this.toggle();
|
---|
736 | // Emit a change event if the selected state of the option changed through user interaction.
|
---|
737 | this.selectionList._emitChangeEvent([this]);
|
---|
738 | }
|
---|
739 | };
|
---|
740 | MatListOption.prototype._handleFocus = function () {
|
---|
741 | this.selectionList._setFocusedOption(this);
|
---|
742 | this._hasFocus = true;
|
---|
743 | };
|
---|
744 | MatListOption.prototype._handleBlur = function () {
|
---|
745 | this.selectionList._onTouched();
|
---|
746 | this._hasFocus = false;
|
---|
747 | };
|
---|
748 | /** Retrieves the DOM element of the component host. */
|
---|
749 | MatListOption.prototype._getHostElement = function () {
|
---|
750 | return this._element.nativeElement;
|
---|
751 | };
|
---|
752 | /** Sets the selected state of the option. Returns whether the value has changed. */
|
---|
753 | MatListOption.prototype._setSelected = function (selected) {
|
---|
754 | if (selected === this._selected) {
|
---|
755 | return false;
|
---|
756 | }
|
---|
757 | this._selected = selected;
|
---|
758 | if (selected) {
|
---|
759 | this.selectionList.selectedOptions.select(this);
|
---|
760 | }
|
---|
761 | else {
|
---|
762 | this.selectionList.selectedOptions.deselect(this);
|
---|
763 | }
|
---|
764 | this.selectedChange.emit(selected);
|
---|
765 | this._changeDetector.markForCheck();
|
---|
766 | return true;
|
---|
767 | };
|
---|
768 | /**
|
---|
769 | * Notifies Angular that the option needs to be checked in the next change detection run. Mainly
|
---|
770 | * used to trigger an update of the list option if the disabled state of the selection list
|
---|
771 | * changed.
|
---|
772 | */
|
---|
773 | MatListOption.prototype._markForCheck = function () {
|
---|
774 | this._changeDetector.markForCheck();
|
---|
775 | };
|
---|
776 | return MatListOption;
|
---|
777 | }(_MatListOptionBase));
|
---|
778 | MatListOption.decorators = [
|
---|
779 | { type: core$1.Component, args: [{
|
---|
780 | selector: 'mat-list-option',
|
---|
781 | exportAs: 'matListOption',
|
---|
782 | inputs: ['disableRipple'],
|
---|
783 | host: {
|
---|
784 | 'role': 'option',
|
---|
785 | 'class': 'mat-list-item mat-list-option mat-focus-indicator',
|
---|
786 | '(focus)': '_handleFocus()',
|
---|
787 | '(blur)': '_handleBlur()',
|
---|
788 | '(click)': '_handleClick()',
|
---|
789 | '[class.mat-list-item-disabled]': 'disabled',
|
---|
790 | '[class.mat-list-item-with-avatar]': '_avatar || _icon',
|
---|
791 | // Manually set the "primary" or "warn" class if the color has been explicitly
|
---|
792 | // set to "primary" or "warn". The pseudo checkbox picks up these classes for
|
---|
793 | // its theme.
|
---|
794 | '[class.mat-primary]': 'color === "primary"',
|
---|
795 | // Even though accent is the default, we need to set this class anyway, because the list might
|
---|
796 | // be placed inside a parent that has one of the other colors with a higher specificity.
|
---|
797 | '[class.mat-accent]': 'color !== "primary" && color !== "warn"',
|
---|
798 | '[class.mat-warn]': 'color === "warn"',
|
---|
799 | '[class.mat-list-single-selected-option]': 'selected && !selectionList.multiple',
|
---|
800 | '[attr.aria-selected]': 'selected',
|
---|
801 | '[attr.aria-disabled]': 'disabled',
|
---|
802 | '[attr.tabindex]': '-1',
|
---|
803 | },
|
---|
804 | template: "<div class=\"mat-list-item-content\"\n [class.mat-list-item-content-reverse]=\"checkboxPosition == 'after'\">\n\n <div mat-ripple\n class=\"mat-list-item-ripple\"\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"_isRippleDisabled()\"></div>\n\n <mat-pseudo-checkbox\n *ngIf=\"selectionList.multiple\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\"></mat-pseudo-checkbox>\n\n <div class=\"mat-list-text\" #text><ng-content></ng-content></div>\n\n <ng-content select=\"[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]\">\n </ng-content>\n\n</div>\n",
|
---|
805 | encapsulation: core$1.ViewEncapsulation.None,
|
---|
806 | changeDetection: core$1.ChangeDetectionStrategy.OnPush
|
---|
807 | },] }
|
---|
808 | ];
|
---|
809 | MatListOption.ctorParameters = function () { return [
|
---|
810 | { type: core$1.ElementRef },
|
---|
811 | { type: core$1.ChangeDetectorRef },
|
---|
812 | { type: MatSelectionList, decorators: [{ type: core$1.Inject, args: [core$1.forwardRef(function () { return MatSelectionList; }),] }] }
|
---|
813 | ]; };
|
---|
814 | MatListOption.propDecorators = {
|
---|
815 | _avatar: [{ type: core$1.ContentChild, args: [MatListAvatarCssMatStyler,] }],
|
---|
816 | _icon: [{ type: core$1.ContentChild, args: [MatListIconCssMatStyler,] }],
|
---|
817 | _lines: [{ type: core$1.ContentChildren, args: [core.MatLine, { descendants: true },] }],
|
---|
818 | selectedChange: [{ type: core$1.Output }],
|
---|
819 | _text: [{ type: core$1.ViewChild, args: ['text',] }],
|
---|
820 | checkboxPosition: [{ type: core$1.Input }],
|
---|
821 | color: [{ type: core$1.Input }],
|
---|
822 | value: [{ type: core$1.Input }],
|
---|
823 | disabled: [{ type: core$1.Input }],
|
---|
824 | selected: [{ type: core$1.Input }]
|
---|
825 | };
|
---|
826 | /**
|
---|
827 | * Material Design list component where each item is a selectable option. Behaves as a listbox.
|
---|
828 | */
|
---|
829 | var MatSelectionList = /** @class */ (function (_super) {
|
---|
830 | __extends(MatSelectionList, _super);
|
---|
831 | function MatSelectionList(_element,
|
---|
832 | // @breaking-change 11.0.0 Remove `tabIndex` parameter.
|
---|
833 | tabIndex, _changeDetector,
|
---|
834 | // @breaking-change 11.0.0 `_focusMonitor` parameter to become required.
|
---|
835 | _focusMonitor) {
|
---|
836 | var _this = _super.call(this) || this;
|
---|
837 | _this._element = _element;
|
---|
838 | _this._changeDetector = _changeDetector;
|
---|
839 | _this._focusMonitor = _focusMonitor;
|
---|
840 | _this._multiple = true;
|
---|
841 | _this._contentInitialized = false;
|
---|
842 | /** Emits a change event whenever the selected state of an option changes. */
|
---|
843 | _this.selectionChange = new core$1.EventEmitter();
|
---|
844 | /**
|
---|
845 | * Tabindex of the selection list.
|
---|
846 | * @breaking-change 11.0.0 Remove `tabIndex` input.
|
---|
847 | */
|
---|
848 | _this.tabIndex = 0;
|
---|
849 | /** Theme color of the selection list. This sets the checkbox color for all list options. */
|
---|
850 | _this.color = 'accent';
|
---|
851 | /**
|
---|
852 | * Function used for comparing an option against the selected value when determining which
|
---|
853 | * options should appear as selected. The first argument is the value of an options. The second
|
---|
854 | * one is a value from the selected value. A boolean must be returned.
|
---|
855 | */
|
---|
856 | _this.compareWith = function (a1, a2) { return a1 === a2; };
|
---|
857 | _this._disabled = false;
|
---|
858 | /** The currently selected options. */
|
---|
859 | _this.selectedOptions = new collections.SelectionModel(_this._multiple);
|
---|
860 | /** The tabindex of the selection list. */
|
---|
861 | _this._tabIndex = -1;
|
---|
862 | /** View to model callback that should be called whenever the selected options change. */
|
---|
863 | _this._onChange = function (_) { };
|
---|
864 | /** Emits when the list has been destroyed. */
|
---|
865 | _this._destroyed = new rxjs.Subject();
|
---|
866 | /** View to model callback that should be called if the list or its options lost focus. */
|
---|
867 | _this._onTouched = function () { };
|
---|
868 | return _this;
|
---|
869 | }
|
---|
870 | Object.defineProperty(MatSelectionList.prototype, "disabled", {
|
---|
871 | /** Whether the selection list is disabled. */
|
---|
872 | get: function () { return this._disabled; },
|
---|
873 | set: function (value) {
|
---|
874 | this._disabled = coercion.coerceBooleanProperty(value);
|
---|
875 | // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection
|
---|
876 | // strategy. Therefore the options will not check for any changes if the `MatSelectionList`
|
---|
877 | // changed its state. Since we know that a change to `disabled` property of the list affects
|
---|
878 | // the state of the options, we manually mark each option for check.
|
---|
879 | this._markOptionsForCheck();
|
---|
880 | },
|
---|
881 | enumerable: false,
|
---|
882 | configurable: true
|
---|
883 | });
|
---|
884 | Object.defineProperty(MatSelectionList.prototype, "multiple", {
|
---|
885 | /** Whether selection is limited to one or multiple items (default multiple). */
|
---|
886 | get: function () { return this._multiple; },
|
---|
887 | set: function (value) {
|
---|
888 | var newValue = coercion.coerceBooleanProperty(value);
|
---|
889 | if (newValue !== this._multiple) {
|
---|
890 | if (this._contentInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
---|
891 | throw new Error('Cannot change `multiple` mode of mat-selection-list after initialization.');
|
---|
892 | }
|
---|
893 | this._multiple = newValue;
|
---|
894 | this.selectedOptions = new collections.SelectionModel(this._multiple, this.selectedOptions.selected);
|
---|
895 | }
|
---|
896 | },
|
---|
897 | enumerable: false,
|
---|
898 | configurable: true
|
---|
899 | });
|
---|
900 | MatSelectionList.prototype.ngAfterContentInit = function () {
|
---|
901 | var _this = this;
|
---|
902 | var _a;
|
---|
903 | this._contentInitialized = true;
|
---|
904 | this._keyManager = new a11y.FocusKeyManager(this.options)
|
---|
905 | .withWrap()
|
---|
906 | .withTypeAhead()
|
---|
907 | .withHomeAndEnd()
|
---|
908 | // Allow disabled items to be focusable. For accessibility reasons, there must be a way for
|
---|
909 | // screenreader users, that allows reading the different options of the list.
|
---|
910 | .skipPredicate(function () { return false; })
|
---|
911 | .withAllowedModifierKeys(['shiftKey']);
|
---|
912 | if (this._value) {
|
---|
913 | this._setOptionsFromValues(this._value);
|
---|
914 | }
|
---|
915 | // If the user attempts to tab out of the selection list, allow focus to escape.
|
---|
916 | this._keyManager.tabOut.pipe(operators.takeUntil(this._destroyed)).subscribe(function () {
|
---|
917 | _this._allowFocusEscape();
|
---|
918 | });
|
---|
919 | // When the number of options change, update the tabindex of the selection list.
|
---|
920 | this.options.changes.pipe(operators.startWith(null), operators.takeUntil(this._destroyed)).subscribe(function () {
|
---|
921 | _this._updateTabIndex();
|
---|
922 | });
|
---|
923 | // Sync external changes to the model back to the options.
|
---|
924 | this.selectedOptions.changed.pipe(operators.takeUntil(this._destroyed)).subscribe(function (event) {
|
---|
925 | var e_1, _b, e_2, _c;
|
---|
926 | if (event.added) {
|
---|
927 | try {
|
---|
928 | for (var _d = __values(event.added), _e = _d.next(); !_e.done; _e = _d.next()) {
|
---|
929 | var item = _e.value;
|
---|
930 | item.selected = true;
|
---|
931 | }
|
---|
932 | }
|
---|
933 | catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
---|
934 | finally {
|
---|
935 | try {
|
---|
936 | if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
|
---|
937 | }
|
---|
938 | finally { if (e_1) throw e_1.error; }
|
---|
939 | }
|
---|
940 | }
|
---|
941 | if (event.removed) {
|
---|
942 | try {
|
---|
943 | for (var _f = __values(event.removed), _g = _f.next(); !_g.done; _g = _f.next()) {
|
---|
944 | var item = _g.value;
|
---|
945 | item.selected = false;
|
---|
946 | }
|
---|
947 | }
|
---|
948 | catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
---|
949 | finally {
|
---|
950 | try {
|
---|
951 | if (_g && !_g.done && (_c = _f.return)) _c.call(_f);
|
---|
952 | }
|
---|
953 | finally { if (e_2) throw e_2.error; }
|
---|
954 | }
|
---|
955 | }
|
---|
956 | });
|
---|
957 | // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.
|
---|
958 | (_a = this._focusMonitor) === null || _a === void 0 ? void 0 : _a.monitor(this._element).pipe(operators.takeUntil(this._destroyed)).subscribe(function (origin) {
|
---|
959 | var _a;
|
---|
960 | if (origin === 'keyboard' || origin === 'program') {
|
---|
961 | var toFocus = 0;
|
---|
962 | for (var i = 0; i < _this.options.length; i++) {
|
---|
963 | if ((_a = _this.options.get(i)) === null || _a === void 0 ? void 0 : _a.selected) {
|
---|
964 | toFocus = i;
|
---|
965 | break;
|
---|
966 | }
|
---|
967 | }
|
---|
968 | _this._keyManager.setActiveItem(toFocus);
|
---|
969 | }
|
---|
970 | });
|
---|
971 | };
|
---|
972 | MatSelectionList.prototype.ngOnChanges = function (changes) {
|
---|
973 | var disableRippleChanges = changes['disableRipple'];
|
---|
974 | var colorChanges = changes['color'];
|
---|
975 | if ((disableRippleChanges && !disableRippleChanges.firstChange) ||
|
---|
976 | (colorChanges && !colorChanges.firstChange)) {
|
---|
977 | this._markOptionsForCheck();
|
---|
978 | }
|
---|
979 | };
|
---|
980 | MatSelectionList.prototype.ngOnDestroy = function () {
|
---|
981 | var _a;
|
---|
982 | // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.
|
---|
983 | (_a = this._focusMonitor) === null || _a === void 0 ? void 0 : _a.stopMonitoring(this._element);
|
---|
984 | this._destroyed.next();
|
---|
985 | this._destroyed.complete();
|
---|
986 | this._isDestroyed = true;
|
---|
987 | };
|
---|
988 | /** Focuses the selection list. */
|
---|
989 | MatSelectionList.prototype.focus = function (options) {
|
---|
990 | this._element.nativeElement.focus(options);
|
---|
991 | };
|
---|
992 | /** Selects all of the options. Returns the options that changed as a result. */
|
---|
993 | MatSelectionList.prototype.selectAll = function () {
|
---|
994 | return this._setAllOptionsSelected(true);
|
---|
995 | };
|
---|
996 | /** Deselects all of the options. Returns the options that changed as a result. */
|
---|
997 | MatSelectionList.prototype.deselectAll = function () {
|
---|
998 | return this._setAllOptionsSelected(false);
|
---|
999 | };
|
---|
1000 | /** Sets the focused option of the selection-list. */
|
---|
1001 | MatSelectionList.prototype._setFocusedOption = function (option) {
|
---|
1002 | this._keyManager.updateActiveItem(option);
|
---|
1003 | };
|
---|
1004 | /**
|
---|
1005 | * Removes an option from the selection list and updates the active item.
|
---|
1006 | * @returns Currently-active item.
|
---|
1007 | */
|
---|
1008 | MatSelectionList.prototype._removeOptionFromList = function (option) {
|
---|
1009 | var optionIndex = this._getOptionIndex(option);
|
---|
1010 | if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {
|
---|
1011 | // Check whether the option is the last item
|
---|
1012 | if (optionIndex > 0) {
|
---|
1013 | this._keyManager.updateActiveItem(optionIndex - 1);
|
---|
1014 | }
|
---|
1015 | else if (optionIndex === 0 && this.options.length > 1) {
|
---|
1016 | this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));
|
---|
1017 | }
|
---|
1018 | }
|
---|
1019 | return this._keyManager.activeItem;
|
---|
1020 | };
|
---|
1021 | /** Passes relevant key presses to our key manager. */
|
---|
1022 | MatSelectionList.prototype._keydown = function (event) {
|
---|
1023 | var keyCode = event.keyCode;
|
---|
1024 | var manager = this._keyManager;
|
---|
1025 | var previousFocusIndex = manager.activeItemIndex;
|
---|
1026 | var hasModifier = keycodes.hasModifierKey(event);
|
---|
1027 | switch (keyCode) {
|
---|
1028 | case keycodes.SPACE:
|
---|
1029 | case keycodes.ENTER:
|
---|
1030 | if (!hasModifier && !manager.isTyping()) {
|
---|
1031 | this._toggleFocusedOption();
|
---|
1032 | // Always prevent space from scrolling the page since the list has focus
|
---|
1033 | event.preventDefault();
|
---|
1034 | }
|
---|
1035 | break;
|
---|
1036 | default:
|
---|
1037 | // The "A" key gets special treatment, because it's used for the "select all" functionality.
|
---|
1038 | if (keyCode === keycodes.A && this.multiple && keycodes.hasModifierKey(event, 'ctrlKey') &&
|
---|
1039 | !manager.isTyping()) {
|
---|
1040 | var shouldSelect = this.options.some(function (option) { return !option.disabled && !option.selected; });
|
---|
1041 | this._setAllOptionsSelected(shouldSelect, true, true);
|
---|
1042 | event.preventDefault();
|
---|
1043 | }
|
---|
1044 | else {
|
---|
1045 | manager.onKeydown(event);
|
---|
1046 | }
|
---|
1047 | }
|
---|
1048 | if (this.multiple && (keyCode === keycodes.UP_ARROW || keyCode === keycodes.DOWN_ARROW) && event.shiftKey &&
|
---|
1049 | manager.activeItemIndex !== previousFocusIndex) {
|
---|
1050 | this._toggleFocusedOption();
|
---|
1051 | }
|
---|
1052 | };
|
---|
1053 | /** Reports a value change to the ControlValueAccessor */
|
---|
1054 | MatSelectionList.prototype._reportValueChange = function () {
|
---|
1055 | // Stop reporting value changes after the list has been destroyed. This avoids
|
---|
1056 | // cases where the list might wrongly reset its value once it is removed, but
|
---|
1057 | // the form control is still live.
|
---|
1058 | if (this.options && !this._isDestroyed) {
|
---|
1059 | var value = this._getSelectedOptionValues();
|
---|
1060 | this._onChange(value);
|
---|
1061 | this._value = value;
|
---|
1062 | }
|
---|
1063 | };
|
---|
1064 | /** Emits a change event if the selected state of an option changed. */
|
---|
1065 | MatSelectionList.prototype._emitChangeEvent = function (options) {
|
---|
1066 | this.selectionChange.emit(new MatSelectionListChange(this, options[0], options));
|
---|
1067 | };
|
---|
1068 | /** Implemented as part of ControlValueAccessor. */
|
---|
1069 | MatSelectionList.prototype.writeValue = function (values) {
|
---|
1070 | this._value = values;
|
---|
1071 | if (this.options) {
|
---|
1072 | this._setOptionsFromValues(values || []);
|
---|
1073 | }
|
---|
1074 | };
|
---|
1075 | /** Implemented as a part of ControlValueAccessor. */
|
---|
1076 | MatSelectionList.prototype.setDisabledState = function (isDisabled) {
|
---|
1077 | this.disabled = isDisabled;
|
---|
1078 | };
|
---|
1079 | /** Implemented as part of ControlValueAccessor. */
|
---|
1080 | MatSelectionList.prototype.registerOnChange = function (fn) {
|
---|
1081 | this._onChange = fn;
|
---|
1082 | };
|
---|
1083 | /** Implemented as part of ControlValueAccessor. */
|
---|
1084 | MatSelectionList.prototype.registerOnTouched = function (fn) {
|
---|
1085 | this._onTouched = fn;
|
---|
1086 | };
|
---|
1087 | /** Sets the selected options based on the specified values. */
|
---|
1088 | MatSelectionList.prototype._setOptionsFromValues = function (values) {
|
---|
1089 | var _this = this;
|
---|
1090 | this.options.forEach(function (option) { return option._setSelected(false); });
|
---|
1091 | values.forEach(function (value) {
|
---|
1092 | var correspondingOption = _this.options.find(function (option) {
|
---|
1093 | // Skip options that are already in the model. This allows us to handle cases
|
---|
1094 | // where the same primitive value is selected multiple times.
|
---|
1095 | return option.selected ? false : _this.compareWith(option.value, value);
|
---|
1096 | });
|
---|
1097 | if (correspondingOption) {
|
---|
1098 | correspondingOption._setSelected(true);
|
---|
1099 | }
|
---|
1100 | });
|
---|
1101 | };
|
---|
1102 | /** Returns the values of the selected options. */
|
---|
1103 | MatSelectionList.prototype._getSelectedOptionValues = function () {
|
---|
1104 | return this.options.filter(function (option) { return option.selected; }).map(function (option) { return option.value; });
|
---|
1105 | };
|
---|
1106 | /** Toggles the state of the currently focused option if enabled. */
|
---|
1107 | MatSelectionList.prototype._toggleFocusedOption = function () {
|
---|
1108 | var focusedIndex = this._keyManager.activeItemIndex;
|
---|
1109 | if (focusedIndex != null && this._isValidIndex(focusedIndex)) {
|
---|
1110 | var focusedOption = this.options.toArray()[focusedIndex];
|
---|
1111 | if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {
|
---|
1112 | focusedOption.toggle();
|
---|
1113 | // Emit a change event because the focused option changed its state through user
|
---|
1114 | // interaction.
|
---|
1115 | this._emitChangeEvent([focusedOption]);
|
---|
1116 | }
|
---|
1117 | }
|
---|
1118 | };
|
---|
1119 | /**
|
---|
1120 | * Sets the selected state on all of the options
|
---|
1121 | * and emits an event if anything changed.
|
---|
1122 | */
|
---|
1123 | MatSelectionList.prototype._setAllOptionsSelected = function (isSelected, skipDisabled, isUserInput) {
|
---|
1124 | // Keep track of whether anything changed, because we only want to
|
---|
1125 | // emit the changed event when something actually changed.
|
---|
1126 | var changedOptions = [];
|
---|
1127 | this.options.forEach(function (option) {
|
---|
1128 | if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {
|
---|
1129 | changedOptions.push(option);
|
---|
1130 | }
|
---|
1131 | });
|
---|
1132 | if (changedOptions.length) {
|
---|
1133 | this._reportValueChange();
|
---|
1134 | if (isUserInput) {
|
---|
1135 | this._emitChangeEvent(changedOptions);
|
---|
1136 | }
|
---|
1137 | }
|
---|
1138 | return changedOptions;
|
---|
1139 | };
|
---|
1140 | /**
|
---|
1141 | * Utility to ensure all indexes are valid.
|
---|
1142 | * @param index The index to be checked.
|
---|
1143 | * @returns True if the index is valid for our list of options.
|
---|
1144 | */
|
---|
1145 | MatSelectionList.prototype._isValidIndex = function (index) {
|
---|
1146 | return index >= 0 && index < this.options.length;
|
---|
1147 | };
|
---|
1148 | /** Returns the index of the specified list option. */
|
---|
1149 | MatSelectionList.prototype._getOptionIndex = function (option) {
|
---|
1150 | return this.options.toArray().indexOf(option);
|
---|
1151 | };
|
---|
1152 | /** Marks all the options to be checked in the next change detection run. */
|
---|
1153 | MatSelectionList.prototype._markOptionsForCheck = function () {
|
---|
1154 | if (this.options) {
|
---|
1155 | this.options.forEach(function (option) { return option._markForCheck(); });
|
---|
1156 | }
|
---|
1157 | };
|
---|
1158 | /**
|
---|
1159 | * Removes the tabindex from the selection list and resets it back afterwards, allowing the user
|
---|
1160 | * to tab out of it. This prevents the list from capturing focus and redirecting it back within
|
---|
1161 | * the list, creating a focus trap if it user tries to tab away.
|
---|
1162 | */
|
---|
1163 | MatSelectionList.prototype._allowFocusEscape = function () {
|
---|
1164 | var _this = this;
|
---|
1165 | this._tabIndex = -1;
|
---|
1166 | setTimeout(function () {
|
---|
1167 | _this._tabIndex = 0;
|
---|
1168 | _this._changeDetector.markForCheck();
|
---|
1169 | });
|
---|
1170 | };
|
---|
1171 | /** Updates the tabindex based upon if the selection list is empty. */
|
---|
1172 | MatSelectionList.prototype._updateTabIndex = function () {
|
---|
1173 | this._tabIndex = (this.options.length === 0) ? -1 : 0;
|
---|
1174 | };
|
---|
1175 | return MatSelectionList;
|
---|
1176 | }(_MatSelectionListBase));
|
---|
1177 | MatSelectionList.decorators = [
|
---|
1178 | { type: core$1.Component, args: [{
|
---|
1179 | selector: 'mat-selection-list',
|
---|
1180 | exportAs: 'matSelectionList',
|
---|
1181 | inputs: ['disableRipple'],
|
---|
1182 | host: {
|
---|
1183 | 'role': 'listbox',
|
---|
1184 | 'class': 'mat-selection-list mat-list-base',
|
---|
1185 | '(keydown)': '_keydown($event)',
|
---|
1186 | '[attr.aria-multiselectable]': 'multiple',
|
---|
1187 | '[attr.aria-disabled]': 'disabled.toString()',
|
---|
1188 | '[attr.tabindex]': '_tabIndex',
|
---|
1189 | },
|
---|
1190 | template: '<ng-content></ng-content>',
|
---|
1191 | encapsulation: core$1.ViewEncapsulation.None,
|
---|
1192 | providers: [MAT_SELECTION_LIST_VALUE_ACCESSOR],
|
---|
1193 | changeDetection: core$1.ChangeDetectionStrategy.OnPush,
|
---|
1194 | styles: [".mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px;z-index:1}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n"]
|
---|
1195 | },] }
|
---|
1196 | ];
|
---|
1197 | MatSelectionList.ctorParameters = function () { return [
|
---|
1198 | { type: core$1.ElementRef },
|
---|
1199 | { type: String, decorators: [{ type: core$1.Attribute, args: ['tabindex',] }] },
|
---|
1200 | { type: core$1.ChangeDetectorRef },
|
---|
1201 | { type: a11y.FocusMonitor }
|
---|
1202 | ]; };
|
---|
1203 | MatSelectionList.propDecorators = {
|
---|
1204 | options: [{ type: core$1.ContentChildren, args: [MatListOption, { descendants: true },] }],
|
---|
1205 | selectionChange: [{ type: core$1.Output }],
|
---|
1206 | tabIndex: [{ type: core$1.Input }],
|
---|
1207 | color: [{ type: core$1.Input }],
|
---|
1208 | compareWith: [{ type: core$1.Input }],
|
---|
1209 | disabled: [{ type: core$1.Input }],
|
---|
1210 | multiple: [{ type: core$1.Input }]
|
---|
1211 | };
|
---|
1212 |
|
---|
1213 | /**
|
---|
1214 | * @license
|
---|
1215 | * Copyright Google LLC All Rights Reserved.
|
---|
1216 | *
|
---|
1217 | * Use of this source code is governed by an MIT-style license that can be
|
---|
1218 | * found in the LICENSE file at https://angular.io/license
|
---|
1219 | */
|
---|
1220 | var MatListModule = /** @class */ (function () {
|
---|
1221 | function MatListModule() {
|
---|
1222 | }
|
---|
1223 | return MatListModule;
|
---|
1224 | }());
|
---|
1225 | MatListModule.decorators = [
|
---|
1226 | { type: core$1.NgModule, args: [{
|
---|
1227 | imports: [core.MatLineModule, core.MatRippleModule, core.MatCommonModule, core.MatPseudoCheckboxModule, common.CommonModule],
|
---|
1228 | exports: [
|
---|
1229 | MatList,
|
---|
1230 | MatNavList,
|
---|
1231 | MatListItem,
|
---|
1232 | MatListAvatarCssMatStyler,
|
---|
1233 | core.MatLineModule,
|
---|
1234 | core.MatCommonModule,
|
---|
1235 | MatListIconCssMatStyler,
|
---|
1236 | MatListSubheaderCssMatStyler,
|
---|
1237 | core.MatPseudoCheckboxModule,
|
---|
1238 | MatSelectionList,
|
---|
1239 | MatListOption,
|
---|
1240 | divider.MatDividerModule
|
---|
1241 | ],
|
---|
1242 | declarations: [
|
---|
1243 | MatList,
|
---|
1244 | MatNavList,
|
---|
1245 | MatListItem,
|
---|
1246 | MatListAvatarCssMatStyler,
|
---|
1247 | MatListIconCssMatStyler,
|
---|
1248 | MatListSubheaderCssMatStyler,
|
---|
1249 | MatSelectionList,
|
---|
1250 | MatListOption
|
---|
1251 | ],
|
---|
1252 | },] }
|
---|
1253 | ];
|
---|
1254 |
|
---|
1255 | /**
|
---|
1256 | * @license
|
---|
1257 | * Copyright Google LLC All Rights Reserved.
|
---|
1258 | *
|
---|
1259 | * Use of this source code is governed by an MIT-style license that can be
|
---|
1260 | * found in the LICENSE file at https://angular.io/license
|
---|
1261 | */
|
---|
1262 |
|
---|
1263 | /**
|
---|
1264 | * Generated bundle index. Do not edit.
|
---|
1265 | */
|
---|
1266 |
|
---|
1267 | exports.MAT_LIST = MAT_LIST;
|
---|
1268 | exports.MAT_NAV_LIST = MAT_NAV_LIST;
|
---|
1269 | exports.MAT_SELECTION_LIST_VALUE_ACCESSOR = MAT_SELECTION_LIST_VALUE_ACCESSOR;
|
---|
1270 | exports.MatList = MatList;
|
---|
1271 | exports.MatListAvatarCssMatStyler = MatListAvatarCssMatStyler;
|
---|
1272 | exports.MatListIconCssMatStyler = MatListIconCssMatStyler;
|
---|
1273 | exports.MatListItem = MatListItem;
|
---|
1274 | exports.MatListModule = MatListModule;
|
---|
1275 | exports.MatListOption = MatListOption;
|
---|
1276 | exports.MatListSubheaderCssMatStyler = MatListSubheaderCssMatStyler;
|
---|
1277 | exports.MatNavList = MatNavList;
|
---|
1278 | exports.MatSelectionList = MatSelectionList;
|
---|
1279 | exports.MatSelectionListChange = MatSelectionListChange;
|
---|
1280 |
|
---|
1281 | Object.defineProperty(exports, '__esModule', { value: true });
|
---|
1282 |
|
---|
1283 | })));
|
---|
1284 | //# sourceMappingURL=material-list.umd.js.map
|
---|