@angular/material 13.2.0-next.0 → 13.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/core/focus-indicators/_focus-indicators.scss +4 -0
- package/core/option/index.d.ts +1 -1
- package/core/selection/index.d.ts +8 -8
- package/core/selection/pseudo-checkbox/pseudo-checkbox-module.d.ts +8 -0
- package/esm2020/core/common-behaviors/common-module.mjs +1 -1
- package/esm2020/core/selection/index.mjs +2 -18
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +25 -0
- package/esm2020/core/version.mjs +1 -1
- package/esm2020/datepicker/calendar-body.mjs +3 -3
- package/esm2020/menu/menu-content.mjs +2 -4
- package/esm2020/menu/menu-item.mjs +4 -17
- package/esm2020/menu/menu-trigger.mjs +3 -6
- package/esm2020/stepper/step-header.mjs +2 -2
- package/esm2020/table/table.mjs +2 -2
- package/esm2020/tabs/public-api.mjs +2 -2
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +89 -7
- package/esm2020/tabs/tabs-module.mjs +6 -2
- package/esm2020/tabs/testing/tab-harness-filters.mjs +1 -1
- package/esm2020/tabs/testing/tab-nav-bar-harness.mjs +13 -1
- package/esm2020/tabs/testing/tab-nav-panel-harness.mjs +27 -0
- package/fesm2015/core.mjs +10 -2
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/datepicker.mjs +2 -2
- package/fesm2015/datepicker.mjs.map +1 -1
- package/fesm2015/menu.mjs +7 -23
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/stepper.mjs +2 -2
- package/fesm2015/table.mjs +2 -2
- package/fesm2015/tabs/testing.mjs +34 -0
- package/fesm2015/tabs/testing.mjs.map +1 -1
- package/fesm2015/tabs.mjs +93 -7
- package/fesm2015/tabs.mjs.map +1 -1
- package/fesm2020/core.mjs +10 -2
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/datepicker.mjs +2 -2
- package/fesm2020/datepicker.mjs.map +1 -1
- package/fesm2020/menu.mjs +5 -23
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/stepper.mjs +2 -2
- package/fesm2020/table.mjs +2 -2
- package/fesm2020/tabs/testing.mjs +37 -0
- package/fesm2020/tabs/testing.mjs.map +1 -1
- package/fesm2020/tabs.mjs +92 -7
- package/fesm2020/tabs.mjs.map +1 -1
- package/menu/menu-content.d.ts +5 -1
- package/menu/menu-item.d.ts +3 -12
- package/menu/menu-trigger.d.ts +6 -2
- package/package.json +3 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +1 -2
- package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +1 -2
- package/table/_table-flex-styles.scss +0 -9
- package/tabs/public-api.d.ts +1 -1
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +29 -2
- package/tabs/tabs-module.d.ts +1 -1
- package/tabs/testing/tab-harness-filters.d.ts +3 -0
- package/tabs/testing/tab-nav-bar-harness.d.ts +3 -0
- package/tabs/testing/tab-nav-panel-harness.d.ts +23 -0
|
@@ -171,6 +171,27 @@ class MatTabLinkHarness extends ComponentHarness {
|
|
|
171
171
|
/** The selector for the host element of a `MatTabLink` instance. */
|
|
172
172
|
MatTabLinkHarness.hostSelector = '.mat-tab-link';
|
|
173
173
|
|
|
174
|
+
/** Harness for interacting with a standard mat-tab-nav-panel in tests. */
|
|
175
|
+
class MatTabNavPanelHarness extends ContentContainerComponentHarness {
|
|
176
|
+
/**
|
|
177
|
+
* Gets a `HarnessPredicate` that can be used to search for a `MatTabNavPanel` that meets
|
|
178
|
+
* certain criteria.
|
|
179
|
+
* @param options Options for filtering which tab nav panel instances are considered a match.
|
|
180
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
181
|
+
*/
|
|
182
|
+
static with(options = {}) {
|
|
183
|
+
return new HarnessPredicate(MatTabNavPanelHarness, options);
|
|
184
|
+
}
|
|
185
|
+
/** Gets the tab panel text content. */
|
|
186
|
+
getTextContent() {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
return (yield this.host()).text();
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/** The selector for the host element of a `MatTabNavPanel` instance. */
|
|
193
|
+
MatTabNavPanelHarness.hostSelector = '.mat-tab-nav-panel';
|
|
194
|
+
|
|
174
195
|
/** Harness for interacting with a standard mat-tab-nav-bar in tests. */
|
|
175
196
|
class MatTabNavBarHarness extends ComponentHarness {
|
|
176
197
|
/**
|
|
@@ -218,6 +239,19 @@ class MatTabNavBarHarness extends ComponentHarness {
|
|
|
218
239
|
yield tabs[0].click();
|
|
219
240
|
});
|
|
220
241
|
}
|
|
242
|
+
/** Gets the panel associated with the nav bar. */
|
|
243
|
+
getPanel() {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
const link = yield this.getActiveLink();
|
|
246
|
+
const host = yield link.host();
|
|
247
|
+
const panelId = yield host.getAttribute('aria-controls');
|
|
248
|
+
if (!panelId) {
|
|
249
|
+
throw Error('No panel is controlled by the nav bar.');
|
|
250
|
+
}
|
|
251
|
+
const filter = { selector: `#${panelId}` };
|
|
252
|
+
return yield this.documentRootLocatorFactory().locatorFor(MatTabNavPanelHarness.with(filter))();
|
|
253
|
+
});
|
|
254
|
+
}
|
|
221
255
|
}
|
|
222
256
|
/** The selector for the host element of a `MatTabNavBar` instance. */
|
|
223
257
|
MatTabNavBarHarness.hostSelector = '.mat-tab-nav-bar';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/tabs/testing/tab-harness.ts","../../../../../../../src/material/tabs/testing/tab-group-harness.ts","../../../../../../../src/material/tabs/testing/tab-link-harness.ts","../../../../../../../src/material/tabs/testing/tab-nav-bar-harness.ts","../../../../../../../src/material/tabs/testing/public-api.ts","../../../../../../../src/material/tabs/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {TabHarnessFilters} from './tab-harness-filters';\n\n/** Harness for interacting with a standard Angular Material tab-label in tests. */\nexport class MatTabHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatTab` instance. */\n static hostSelector = '.mat-tab-label';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabHarness` that meets\n * certain criteria.\n * @param options Options for filtering which tab instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabHarnessFilters = {}): HarnessPredicate<MatTabHarness> {\n return new HarnessPredicate(MatTabHarness, options).addOption(\n 'label',\n options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label),\n );\n }\n\n /** Gets the label of the tab. */\n async getLabel(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Gets the aria-label of the tab. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the \"aria-labelledby\" attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Whether the tab is selected. */\n async isSelected(): Promise<boolean> {\n const hostEl = await this.host();\n return (await hostEl.getAttribute('aria-selected')) === 'true';\n }\n\n /** Whether the tab is disabled. */\n async isDisabled(): Promise<boolean> {\n const hostEl = await this.host();\n return (await hostEl.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Selects the given tab by clicking on the label. Tab cannot be selected if disabled. */\n async select(): Promise<void> {\n await (await this.host()).click();\n }\n\n /** Gets the text content of the tab. */\n async getTextContent(): Promise<string> {\n const contentId = await this._getContentId();\n const contentEl = await this.documentRootLocatorFactory().locatorFor(`#${contentId}`)();\n return contentEl.text();\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const contentId = await this._getContentId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${contentId}`);\n }\n\n /** Gets the element id for the content of the current tab. */\n private async _getContentId(): Promise<string> {\n const hostEl = await this.host();\n // Tabs never have an empty \"aria-controls\" attribute.\n return (await hostEl.getAttribute('aria-controls'))!;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {TabGroupHarnessFilters, TabHarnessFilters} from './tab-harness-filters';\nimport {MatTabHarness} from './tab-harness';\n\n/** Harness for interacting with a standard mat-tab-group in tests. */\nexport class MatTabGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatTabGroup` instance. */\n static hostSelector = '.mat-tab-group';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which tab group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabGroupHarnessFilters = {}): HarnessPredicate<MatTabGroupHarness> {\n return new HarnessPredicate(MatTabGroupHarness, options).addOption(\n 'selectedTabLabel',\n options.selectedTabLabel,\n async (harness, label) => {\n const selectedTab = await harness.getSelectedTab();\n return HarnessPredicate.stringMatches(await selectedTab.getLabel(), label);\n },\n );\n }\n\n /**\n * Gets the list of tabs in the tab group.\n * @param filter Optionally filters which tabs are included.\n */\n async getTabs(filter: TabHarnessFilters = {}): Promise<MatTabHarness[]> {\n return this.locatorForAll(MatTabHarness.with(filter))();\n }\n\n /** Gets the selected tab of the tab group. */\n async getSelectedTab(): Promise<MatTabHarness> {\n const tabs = await this.getTabs();\n const isSelected = await parallel(() => tabs.map(t => t.isSelected()));\n for (let i = 0; i < tabs.length; i++) {\n if (isSelected[i]) {\n return tabs[i];\n }\n }\n throw new Error('No selected tab could be found.');\n }\n\n /**\n * Selects a tab in this tab group.\n * @param filter An optional filter to apply to the child tabs. The first tab matching the filter\n * will be selected.\n */\n async selectTab(filter: TabHarnessFilters = {}): Promise<void> {\n const tabs = await this.getTabs(filter);\n if (!tabs.length) {\n throw Error(`Cannot find mat-tab matching filter ${JSON.stringify(filter)}`);\n }\n await tabs[0].select();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {TabLinkHarnessFilters} from './tab-harness-filters';\n\n/** Harness for interacting with a standard Angular Material tab link in tests. */\nexport class MatTabLinkHarness extends ComponentHarness {\n /** The selector for the host element of a `MatTabLink` instance. */\n static hostSelector = '.mat-tab-link';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabLinkHarness` that meets\n * certain criteria.\n * @param options Options for filtering which tab link instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabLinkHarnessFilters = {}): HarnessPredicate<MatTabLinkHarness> {\n return new HarnessPredicate(MatTabLinkHarness, options).addOption(\n 'label',\n options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label),\n );\n }\n\n /** Gets the label of the link. */\n async getLabel(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the link is active. */\n async isActive(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('mat-tab-label-active');\n }\n\n /** Whether the link is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('mat-tab-disabled');\n }\n\n /** Clicks on the link. */\n async click(): Promise<void> {\n await (await this.host()).click();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {TabNavBarHarnessFilters, TabLinkHarnessFilters} from './tab-harness-filters';\nimport {MatTabLinkHarness} from './tab-link-harness';\n\n/** Harness for interacting with a standard mat-tab-nav-bar in tests. */\nexport class MatTabNavBarHarness extends ComponentHarness {\n /** The selector for the host element of a `MatTabNavBar` instance. */\n static hostSelector = '.mat-tab-nav-bar';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabNavBar` that meets\n * certain criteria.\n * @param options Options for filtering which tab nav bar instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabNavBarHarnessFilters = {}): HarnessPredicate<MatTabNavBarHarness> {\n return new HarnessPredicate(MatTabNavBarHarness, options);\n }\n\n /**\n * Gets the list of links in the nav bar.\n * @param filter Optionally filters which links are included.\n */\n async getLinks(filter: TabLinkHarnessFilters = {}): Promise<MatTabLinkHarness[]> {\n return this.locatorForAll(MatTabLinkHarness.with(filter))();\n }\n\n /** Gets the active link in the nav bar. */\n async getActiveLink(): Promise<MatTabLinkHarness> {\n const links = await this.getLinks();\n const isActive = await parallel(() => links.map(t => t.isActive()));\n for (let i = 0; i < links.length; i++) {\n if (isActive[i]) {\n return links[i];\n }\n }\n throw new Error('No active link could be found.');\n }\n\n /**\n * Clicks a link inside the nav bar.\n * @param filter An optional filter to apply to the child link. The first link matching the filter\n * will be clicked.\n */\n async clickLink(filter: TabLinkHarnessFilters = {}): Promise<void> {\n const tabs = await this.getLinks(filter);\n if (!tabs.length) {\n throw Error(`Cannot find mat-tab-link matching filter ${JSON.stringify(filter)}`);\n }\n await tabs[0].click();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './tab-group-harness';\nexport * from './tab-harness';\nexport * from './tab-harness-filters';\nexport * from './tab-nav-bar-harness';\nexport * from './tab-link-harness';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAeA;MACa,sBAAsB,gCAAwC;;;;;;;IAUzE,OAAO,IAAI,CAAC,UAA6B,EAAE;QACzC,OAAO,IAAI,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,CAC3D,OAAO,EACP,OAAO,CAAC,KAAK,EACb,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAC9E,CAAC;KACH;;IAGK,QAAQ;;YACZ,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;SACnC;KAAA;;IAGK,YAAY;;YAChB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;SACvD;KAAA;;IAGK,iBAAiB;;YACrB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;SAC5D;KAAA;;IAGK,UAAU;;YACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM,CAAC;SAChE;KAAA;;IAGK,UAAU;;YACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM,CAAC;SAChE;KAAA;;IAGK,MAAM;;YACV,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACnC;KAAA;;IAGK,cAAc;;YAClB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;YAC7C,MAAM,SAAS,GAAG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;YACD,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SACvB;KAAA;;AA5CD;AACO,gCAAY,GAAG,kBAAkB;;ACf1C;;;;;;;;ACAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/tabs/testing/tab-harness.ts","../../../../../../../src/material/tabs/testing/tab-group-harness.ts","../../../../../../../src/material/tabs/testing/tab-link-harness.ts","../../../../../../../src/material/tabs/testing/tab-nav-panel-harness.ts","../../../../../../../src/material/tabs/testing/tab-nav-bar-harness.ts","../../../../../../../src/material/tabs/testing/public-api.ts","../../../../../../../src/material/tabs/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {TabHarnessFilters} from './tab-harness-filters';\n\n/** Harness for interacting with a standard Angular Material tab-label in tests. */\nexport class MatTabHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatTab` instance. */\n static hostSelector = '.mat-tab-label';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabHarness` that meets\n * certain criteria.\n * @param options Options for filtering which tab instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabHarnessFilters = {}): HarnessPredicate<MatTabHarness> {\n return new HarnessPredicate(MatTabHarness, options).addOption(\n 'label',\n options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label),\n );\n }\n\n /** Gets the label of the tab. */\n async getLabel(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Gets the aria-label of the tab. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the \"aria-labelledby\" attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Whether the tab is selected. */\n async isSelected(): Promise<boolean> {\n const hostEl = await this.host();\n return (await hostEl.getAttribute('aria-selected')) === 'true';\n }\n\n /** Whether the tab is disabled. */\n async isDisabled(): Promise<boolean> {\n const hostEl = await this.host();\n return (await hostEl.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Selects the given tab by clicking on the label. Tab cannot be selected if disabled. */\n async select(): Promise<void> {\n await (await this.host()).click();\n }\n\n /** Gets the text content of the tab. */\n async getTextContent(): Promise<string> {\n const contentId = await this._getContentId();\n const contentEl = await this.documentRootLocatorFactory().locatorFor(`#${contentId}`)();\n return contentEl.text();\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const contentId = await this._getContentId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${contentId}`);\n }\n\n /** Gets the element id for the content of the current tab. */\n private async _getContentId(): Promise<string> {\n const hostEl = await this.host();\n // Tabs never have an empty \"aria-controls\" attribute.\n return (await hostEl.getAttribute('aria-controls'))!;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {TabGroupHarnessFilters, TabHarnessFilters} from './tab-harness-filters';\nimport {MatTabHarness} from './tab-harness';\n\n/** Harness for interacting with a standard mat-tab-group in tests. */\nexport class MatTabGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatTabGroup` instance. */\n static hostSelector = '.mat-tab-group';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which tab group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabGroupHarnessFilters = {}): HarnessPredicate<MatTabGroupHarness> {\n return new HarnessPredicate(MatTabGroupHarness, options).addOption(\n 'selectedTabLabel',\n options.selectedTabLabel,\n async (harness, label) => {\n const selectedTab = await harness.getSelectedTab();\n return HarnessPredicate.stringMatches(await selectedTab.getLabel(), label);\n },\n );\n }\n\n /**\n * Gets the list of tabs in the tab group.\n * @param filter Optionally filters which tabs are included.\n */\n async getTabs(filter: TabHarnessFilters = {}): Promise<MatTabHarness[]> {\n return this.locatorForAll(MatTabHarness.with(filter))();\n }\n\n /** Gets the selected tab of the tab group. */\n async getSelectedTab(): Promise<MatTabHarness> {\n const tabs = await this.getTabs();\n const isSelected = await parallel(() => tabs.map(t => t.isSelected()));\n for (let i = 0; i < tabs.length; i++) {\n if (isSelected[i]) {\n return tabs[i];\n }\n }\n throw new Error('No selected tab could be found.');\n }\n\n /**\n * Selects a tab in this tab group.\n * @param filter An optional filter to apply to the child tabs. The first tab matching the filter\n * will be selected.\n */\n async selectTab(filter: TabHarnessFilters = {}): Promise<void> {\n const tabs = await this.getTabs(filter);\n if (!tabs.length) {\n throw Error(`Cannot find mat-tab matching filter ${JSON.stringify(filter)}`);\n }\n await tabs[0].select();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {TabLinkHarnessFilters} from './tab-harness-filters';\n\n/** Harness for interacting with a standard Angular Material tab link in tests. */\nexport class MatTabLinkHarness extends ComponentHarness {\n /** The selector for the host element of a `MatTabLink` instance. */\n static hostSelector = '.mat-tab-link';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabLinkHarness` that meets\n * certain criteria.\n * @param options Options for filtering which tab link instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabLinkHarnessFilters = {}): HarnessPredicate<MatTabLinkHarness> {\n return new HarnessPredicate(MatTabLinkHarness, options).addOption(\n 'label',\n options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label),\n );\n }\n\n /** Gets the label of the link. */\n async getLabel(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the link is active. */\n async isActive(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('mat-tab-label-active');\n }\n\n /** Whether the link is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('mat-tab-disabled');\n }\n\n /** Clicks on the link. */\n async click(): Promise<void> {\n await (await this.host()).click();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {TabNavPanelHarnessFilters} from './tab-harness-filters';\n\n/** Harness for interacting with a standard mat-tab-nav-panel in tests. */\nexport class MatTabNavPanelHarness extends ContentContainerComponentHarness {\n /** The selector for the host element of a `MatTabNavPanel` instance. */\n static hostSelector = '.mat-tab-nav-panel';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabNavPanel` that meets\n * certain criteria.\n * @param options Options for filtering which tab nav panel instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabNavPanelHarnessFilters = {}): HarnessPredicate<MatTabNavPanelHarness> {\n return new HarnessPredicate(MatTabNavPanelHarness, options);\n }\n\n /** Gets the tab panel text content. */\n async getTextContent(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {\n TabNavBarHarnessFilters,\n TabNavPanelHarnessFilters,\n TabLinkHarnessFilters,\n} from './tab-harness-filters';\nimport {MatTabLinkHarness} from './tab-link-harness';\nimport {MatTabNavPanelHarness} from './tab-nav-panel-harness';\n\n/** Harness for interacting with a standard mat-tab-nav-bar in tests. */\nexport class MatTabNavBarHarness extends ComponentHarness {\n /** The selector for the host element of a `MatTabNavBar` instance. */\n static hostSelector = '.mat-tab-nav-bar';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTabNavBar` that meets\n * certain criteria.\n * @param options Options for filtering which tab nav bar instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TabNavBarHarnessFilters = {}): HarnessPredicate<MatTabNavBarHarness> {\n return new HarnessPredicate(MatTabNavBarHarness, options);\n }\n\n /**\n * Gets the list of links in the nav bar.\n * @param filter Optionally filters which links are included.\n */\n async getLinks(filter: TabLinkHarnessFilters = {}): Promise<MatTabLinkHarness[]> {\n return this.locatorForAll(MatTabLinkHarness.with(filter))();\n }\n\n /** Gets the active link in the nav bar. */\n async getActiveLink(): Promise<MatTabLinkHarness> {\n const links = await this.getLinks();\n const isActive = await parallel(() => links.map(t => t.isActive()));\n for (let i = 0; i < links.length; i++) {\n if (isActive[i]) {\n return links[i];\n }\n }\n throw new Error('No active link could be found.');\n }\n\n /**\n * Clicks a link inside the nav bar.\n * @param filter An optional filter to apply to the child link. The first link matching the filter\n * will be clicked.\n */\n async clickLink(filter: TabLinkHarnessFilters = {}): Promise<void> {\n const tabs = await this.getLinks(filter);\n if (!tabs.length) {\n throw Error(`Cannot find mat-tab-link matching filter ${JSON.stringify(filter)}`);\n }\n await tabs[0].click();\n }\n\n /** Gets the panel associated with the nav bar. */\n async getPanel(): Promise<MatTabNavPanelHarness> {\n const link = await this.getActiveLink();\n const host = await link.host();\n const panelId = await host.getAttribute('aria-controls');\n if (!panelId) {\n throw Error('No panel is controlled by the nav bar.');\n }\n\n const filter: TabNavPanelHarnessFilters = {selector: `#${panelId}`};\n return await this.documentRootLocatorFactory().locatorFor(MatTabNavPanelHarness.with(filter))();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './tab-group-harness';\nexport * from './tab-harness';\nexport * from './tab-harness-filters';\nexport * from './tab-nav-bar-harness';\nexport * from './tab-link-harness';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAeA;MACa,sBAAsB,gCAAwC;;;;;;;IAUzE,OAAO,IAAI,CAAC,UAA6B,EAAE;QACzC,OAAO,IAAI,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,CAC3D,OAAO,EACP,OAAO,CAAC,KAAK,EACb,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAC9E,CAAC;KACH;;IAGK,QAAQ;;YACZ,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;SACnC;KAAA;;IAGK,YAAY;;YAChB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;SACvD;KAAA;;IAGK,iBAAiB;;YACrB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;SAC5D;KAAA;;IAGK,UAAU;;YACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM,CAAC;SAChE;KAAA;;IAGK,UAAU;;YACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM,CAAC;SAChE;KAAA;;IAGK,MAAM;;YACV,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACn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,CAAC,CAAC,CAAC,EAAE;oBACf,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;iBACjB;aACF;YACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACnD;KAAA;;;;;;IAOK,SAAS,CAAC,SAAgC,EAAE;;YAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBAChB,MAAM,KAAK,CAAC,4CAA4C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aACnF;YACD,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SACvB;KAAA;;IAGK,QAAQ;;YACZ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;YACzD,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC;aACvD;YAED,MAAM,MAAM,GAA8B,EAAC,QAAQ,EAAE,IAAI,OAAO,EAAE,EAAC,CAAC;YACpE,OAAO,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;SACjG;KAAA;;AAzDD;AACO,gCAAY,GAAG,kBAAkB;;ACpB1C;;;;;;;;ACAA;;;;;;;;;;"}
|
package/fesm2015/tabs.mjs
CHANGED
|
@@ -1546,6 +1546,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1546
1546
|
args: ['tabHeader']
|
|
1547
1547
|
}] } });
|
|
1548
1548
|
|
|
1549
|
+
// Increasing integer for generating unique ids for tab nav components.
|
|
1550
|
+
let nextUniqueId = 0;
|
|
1549
1551
|
/**
|
|
1550
1552
|
* Base class with all of the `MatTabNav` functionality.
|
|
1551
1553
|
* @docs-private
|
|
@@ -1597,6 +1599,9 @@ class _MatTabNavBase extends MatPaginatedTabHeader {
|
|
|
1597
1599
|
if (items[i].active) {
|
|
1598
1600
|
this.selectedIndex = i;
|
|
1599
1601
|
this._changeDetectorRef.markForCheck();
|
|
1602
|
+
if (this.tabPanel) {
|
|
1603
|
+
this.tabPanel._activeTabId = items[i].id;
|
|
1604
|
+
}
|
|
1600
1605
|
return;
|
|
1601
1606
|
}
|
|
1602
1607
|
}
|
|
@@ -1604,9 +1609,12 @@ class _MatTabNavBase extends MatPaginatedTabHeader {
|
|
|
1604
1609
|
this.selectedIndex = -1;
|
|
1605
1610
|
this._inkBar.hide();
|
|
1606
1611
|
}
|
|
1612
|
+
_getRole() {
|
|
1613
|
+
return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');
|
|
1614
|
+
}
|
|
1607
1615
|
}
|
|
1608
1616
|
_MatTabNavBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: _MatTabNavBase, deps: [{ token: i0.ElementRef }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1609
|
-
_MatTabNavBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: _MatTabNavBase, inputs: { backgroundColor: "backgroundColor", disableRipple: "disableRipple", color: "color" }, usesInheritance: true, ngImport: i0 });
|
|
1617
|
+
_MatTabNavBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: _MatTabNavBase, inputs: { backgroundColor: "backgroundColor", disableRipple: "disableRipple", color: "color", tabPanel: "tabPanel" }, usesInheritance: true, ngImport: i0 });
|
|
1610
1618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: _MatTabNavBase, decorators: [{
|
|
1611
1619
|
type: Directive
|
|
1612
1620
|
}], ctorParameters: function () {
|
|
@@ -1624,6 +1632,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1624
1632
|
type: Input
|
|
1625
1633
|
}], color: [{
|
|
1626
1634
|
type: Input
|
|
1635
|
+
}], tabPanel: [{
|
|
1636
|
+
type: Input
|
|
1627
1637
|
}] } });
|
|
1628
1638
|
/**
|
|
1629
1639
|
* Navigation component matching the styles of the tab group header.
|
|
@@ -1635,10 +1645,11 @@ class MatTabNav extends _MatTabNavBase {
|
|
|
1635
1645
|
}
|
|
1636
1646
|
}
|
|
1637
1647
|
MatTabNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabNav, deps: [{ token: i0.ElementRef }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1638
|
-
MatTabNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: MatTabNav, selector: "[mat-tab-nav-bar]", inputs: { color: "color" }, host: { properties: { "class.mat-tab-header-pagination-controls-enabled": "_showPaginationControls", "class.mat-tab-header-rtl": "_getLayoutDirection() == 'rtl'", "class.mat-primary": "color !== \"warn\" && color !== \"accent\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"" }, classAttribute: "mat-tab-nav-bar mat-tab-header" }, queries: [{ propertyName: "_items", predicate: i0.forwardRef(function () { return MatTabLink; }), descendants: true }], viewQueries: [{ propertyName: "_inkBar", first: true, predicate: MatInkBar, descendants: true, static: true }, { propertyName: "_tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "_tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "_tabListInner", first: true, predicate: ["tabListInner"], descendants: true, static: true }, { propertyName: "_nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "_previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], exportAs: ["matTabNavBar", "matTabNav"], usesInheritance: true, ngImport: i0, template: "<div class=\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\"\n #previousPaginator\n aria-hidden=\"true\"\n mat-ripple [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div\n class=\"mat-tab-list\"\n [class._mat-animation-noopable]=\"_animationMode === 'NoopAnimations'\"\n #tabList\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n <mat-ink-bar></mat-ink-bar>\n </div>\n</div>\n\n<div class=\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\"\n #nextPaginator\n aria-hidden=\"true\"\n mat-ripple [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n"], directives: [{ type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { type: MatInkBar, selector: "mat-ink-bar" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
1648
|
+
MatTabNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: MatTabNav, selector: "[mat-tab-nav-bar]", inputs: { color: "color" }, host: { properties: { "attr.role": "_getRole()", "class.mat-tab-header-pagination-controls-enabled": "_showPaginationControls", "class.mat-tab-header-rtl": "_getLayoutDirection() == 'rtl'", "class.mat-primary": "color !== \"warn\" && color !== \"accent\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"" }, classAttribute: "mat-tab-nav-bar mat-tab-header" }, queries: [{ propertyName: "_items", predicate: i0.forwardRef(function () { return MatTabLink; }), descendants: true }], viewQueries: [{ propertyName: "_inkBar", first: true, predicate: MatInkBar, descendants: true, static: true }, { propertyName: "_tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "_tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "_tabListInner", first: true, predicate: ["tabListInner"], descendants: true, static: true }, { propertyName: "_nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "_previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], exportAs: ["matTabNavBar", "matTabNav"], usesInheritance: true, ngImport: i0, template: "<div class=\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\"\n #previousPaginator\n aria-hidden=\"true\"\n mat-ripple [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div\n class=\"mat-tab-list\"\n [class._mat-animation-noopable]=\"_animationMode === 'NoopAnimations'\"\n #tabList\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n <mat-ink-bar></mat-ink-bar>\n </div>\n</div>\n\n<div class=\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\"\n #nextPaginator\n aria-hidden=\"true\"\n mat-ripple [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n"], directives: [{ type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { type: MatInkBar, selector: "mat-ink-bar" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
1639
1649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabNav, decorators: [{
|
|
1640
1650
|
type: Component,
|
|
1641
1651
|
args: [{ selector: '[mat-tab-nav-bar]', exportAs: 'matTabNavBar, matTabNav', inputs: ['color'], host: {
|
|
1652
|
+
'[attr.role]': '_getRole()',
|
|
1642
1653
|
'class': 'mat-tab-nav-bar mat-tab-header',
|
|
1643
1654
|
'[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',
|
|
1644
1655
|
'[class.mat-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
|
|
@@ -1690,6 +1701,8 @@ class _MatTabLinkBase extends _MatTabLinkMixinBase {
|
|
|
1690
1701
|
this._focusMonitor = _focusMonitor;
|
|
1691
1702
|
/** Whether the tab link is active or not. */
|
|
1692
1703
|
this._isActive = false;
|
|
1704
|
+
/** Unique id for the tab. */
|
|
1705
|
+
this.id = `mat-tab-link-${nextUniqueId++}`;
|
|
1693
1706
|
this.rippleConfig = globalRippleOptions || {};
|
|
1694
1707
|
this.tabIndex = parseInt(tabIndex) || 0;
|
|
1695
1708
|
if (animationMode === 'NoopAnimations') {
|
|
@@ -1732,9 +1745,42 @@ class _MatTabLinkBase extends _MatTabLinkMixinBase {
|
|
|
1732
1745
|
// have to update the focused index whenever the link receives focus.
|
|
1733
1746
|
this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);
|
|
1734
1747
|
}
|
|
1748
|
+
_handleKeydown(event) {
|
|
1749
|
+
if (this._tabNavBar.tabPanel && event.keyCode === SPACE) {
|
|
1750
|
+
this.elementRef.nativeElement.click();
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
_getAriaControls() {
|
|
1754
|
+
var _a;
|
|
1755
|
+
return this._tabNavBar.tabPanel
|
|
1756
|
+
? (_a = this._tabNavBar.tabPanel) === null || _a === void 0 ? void 0 : _a.id
|
|
1757
|
+
: this.elementRef.nativeElement.getAttribute('aria-controls');
|
|
1758
|
+
}
|
|
1759
|
+
_getAriaSelected() {
|
|
1760
|
+
if (this._tabNavBar.tabPanel) {
|
|
1761
|
+
return this.active ? 'true' : 'false';
|
|
1762
|
+
}
|
|
1763
|
+
else {
|
|
1764
|
+
return this.elementRef.nativeElement.getAttribute('aria-selected');
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
_getAriaCurrent() {
|
|
1768
|
+
return this.active && !this._tabNavBar.tabPanel ? 'page' : null;
|
|
1769
|
+
}
|
|
1770
|
+
_getRole() {
|
|
1771
|
+
return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');
|
|
1772
|
+
}
|
|
1773
|
+
_getTabIndex() {
|
|
1774
|
+
if (this._tabNavBar.tabPanel) {
|
|
1775
|
+
return this._isActive ? 0 : -1;
|
|
1776
|
+
}
|
|
1777
|
+
else {
|
|
1778
|
+
return this.tabIndex;
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1735
1781
|
}
|
|
1736
1782
|
_MatTabLinkBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: _MatTabLinkBase, deps: [{ token: _MatTabNavBase }, { token: i0.ElementRef }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }, { token: i7.FocusMonitor }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1737
|
-
_MatTabLinkBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: _MatTabLinkBase, inputs: { active: "active" }, usesInheritance: true, ngImport: i0 });
|
|
1783
|
+
_MatTabLinkBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: _MatTabLinkBase, inputs: { active: "active", id: "id" }, usesInheritance: true, ngImport: i0 });
|
|
1738
1784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: _MatTabLinkBase, decorators: [{
|
|
1739
1785
|
type: Directive
|
|
1740
1786
|
}], ctorParameters: function () {
|
|
@@ -1754,6 +1800,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1754
1800
|
}] }];
|
|
1755
1801
|
}, propDecorators: { active: [{
|
|
1756
1802
|
type: Input
|
|
1803
|
+
}], id: [{
|
|
1804
|
+
type: Input
|
|
1757
1805
|
}] } });
|
|
1758
1806
|
/**
|
|
1759
1807
|
* Link inside of a `mat-tab-nav-bar`.
|
|
@@ -1770,7 +1818,7 @@ class MatTabLink extends _MatTabLinkBase {
|
|
|
1770
1818
|
}
|
|
1771
1819
|
}
|
|
1772
1820
|
MatTabLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabLink, deps: [{ token: MatTabNav }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.Platform }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }, { token: i7.FocusMonitor }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1773
|
-
MatTabLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: { disabled: "disabled", disableRipple: "disableRipple", tabIndex: "tabIndex" }, host: { listeners: { "focus": "_handleFocus()" }, properties: { "attr.aria-
|
|
1821
|
+
MatTabLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: { disabled: "disabled", disableRipple: "disableRipple", tabIndex: "tabIndex" }, host: { listeners: { "focus": "_handleFocus()", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-controls": "_getAriaControls()", "attr.aria-current": "_getAriaCurrent()", "attr.aria-disabled": "disabled", "attr.aria-selected": "_getAriaSelected()", "attr.id": "id", "attr.tabIndex": "_getTabIndex()", "attr.role": "_getRole()", "class.mat-tab-disabled": "disabled", "class.mat-tab-label-active": "active" }, classAttribute: "mat-tab-link mat-focus-indicator" }, exportAs: ["matTabLink"], usesInheritance: true, ngImport: i0 });
|
|
1774
1822
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabLink, decorators: [{
|
|
1775
1823
|
type: Directive,
|
|
1776
1824
|
args: [{
|
|
@@ -1779,12 +1827,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1779
1827
|
inputs: ['disabled', 'disableRipple', 'tabIndex'],
|
|
1780
1828
|
host: {
|
|
1781
1829
|
'class': 'mat-tab-link mat-focus-indicator',
|
|
1782
|
-
'[attr.aria-
|
|
1830
|
+
'[attr.aria-controls]': '_getAriaControls()',
|
|
1831
|
+
'[attr.aria-current]': '_getAriaCurrent()',
|
|
1783
1832
|
'[attr.aria-disabled]': 'disabled',
|
|
1784
|
-
'[attr.
|
|
1833
|
+
'[attr.aria-selected]': '_getAriaSelected()',
|
|
1834
|
+
'[attr.id]': 'id',
|
|
1835
|
+
'[attr.tabIndex]': '_getTabIndex()',
|
|
1836
|
+
'[attr.role]': '_getRole()',
|
|
1785
1837
|
'[class.mat-tab-disabled]': 'disabled',
|
|
1786
1838
|
'[class.mat-tab-label-active]': 'active',
|
|
1787
1839
|
'(focus)': '_handleFocus()',
|
|
1840
|
+
'(keydown)': '_handleKeydown($event)',
|
|
1788
1841
|
},
|
|
1789
1842
|
}]
|
|
1790
1843
|
}], ctorParameters: function () {
|
|
@@ -1803,6 +1856,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1803
1856
|
args: [ANIMATION_MODULE_TYPE]
|
|
1804
1857
|
}] }];
|
|
1805
1858
|
} });
|
|
1859
|
+
/**
|
|
1860
|
+
* Tab panel component associated with MatTabNav.
|
|
1861
|
+
*/
|
|
1862
|
+
class MatTabNavPanel {
|
|
1863
|
+
constructor() {
|
|
1864
|
+
/** Unique id for the tab panel. */
|
|
1865
|
+
this.id = `mat-tab-nav-panel-${nextUniqueId++}`;
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
MatTabNavPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabNavPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1869
|
+
MatTabNavPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: { id: "id" }, host: { attributes: { "role": "tabpanel" }, properties: { "attr.aria-labelledby": "_activeTabId", "attr.id": "id" }, classAttribute: "mat-tab-nav-panel" }, exportAs: ["matTabNavPanel"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabNavPanel, decorators: [{
|
|
1871
|
+
type: Component,
|
|
1872
|
+
args: [{
|
|
1873
|
+
selector: 'mat-tab-nav-panel',
|
|
1874
|
+
exportAs: 'matTabNavPanel',
|
|
1875
|
+
template: '<ng-content></ng-content>',
|
|
1876
|
+
host: {
|
|
1877
|
+
'[attr.aria-labelledby]': '_activeTabId',
|
|
1878
|
+
'[attr.id]': 'id',
|
|
1879
|
+
'class': 'mat-tab-nav-panel',
|
|
1880
|
+
'role': 'tabpanel',
|
|
1881
|
+
},
|
|
1882
|
+
encapsulation: ViewEncapsulation.None,
|
|
1883
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1884
|
+
}]
|
|
1885
|
+
}], propDecorators: { id: [{
|
|
1886
|
+
type: Input
|
|
1887
|
+
}] } });
|
|
1806
1888
|
|
|
1807
1889
|
/**
|
|
1808
1890
|
* @license
|
|
@@ -1820,6 +1902,7 @@ MatTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
1820
1902
|
MatInkBar,
|
|
1821
1903
|
MatTabLabelWrapper,
|
|
1822
1904
|
MatTabNav,
|
|
1905
|
+
MatTabNavPanel,
|
|
1823
1906
|
MatTabLink,
|
|
1824
1907
|
MatTabBody,
|
|
1825
1908
|
MatTabBodyPortal,
|
|
@@ -1834,6 +1917,7 @@ MatTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
1834
1917
|
MatTabLabel,
|
|
1835
1918
|
MatTab,
|
|
1836
1919
|
MatTabNav,
|
|
1920
|
+
MatTabNavPanel,
|
|
1837
1921
|
MatTabLink,
|
|
1838
1922
|
MatTabContent] });
|
|
1839
1923
|
MatTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatTabsModule, imports: [[
|
|
@@ -1862,6 +1946,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1862
1946
|
MatTabLabel,
|
|
1863
1947
|
MatTab,
|
|
1864
1948
|
MatTabNav,
|
|
1949
|
+
MatTabNavPanel,
|
|
1865
1950
|
MatTabLink,
|
|
1866
1951
|
MatTabContent,
|
|
1867
1952
|
],
|
|
@@ -1872,6 +1957,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1872
1957
|
MatInkBar,
|
|
1873
1958
|
MatTabLabelWrapper,
|
|
1874
1959
|
MatTabNav,
|
|
1960
|
+
MatTabNavPanel,
|
|
1875
1961
|
MatTabLink,
|
|
1876
1962
|
MatTabBody,
|
|
1877
1963
|
MatTabBodyPortal,
|
|
@@ -1909,5 +1995,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1909
1995
|
* Generated bundle index. Do not edit.
|
|
1910
1996
|
*/
|
|
1911
1997
|
|
|
1912
|
-
export { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_GROUP, MatInkBar, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MatTabBodyBase, _MatTabGroupBase, _MatTabHeaderBase, _MatTabLinkBase, _MatTabNavBase, matTabsAnimations };
|
|
1998
|
+
export { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_GROUP, MatInkBar, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabNavPanel, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MatTabBodyBase, _MatTabGroupBase, _MatTabHeaderBase, _MatTabLinkBase, _MatTabNavBase, matTabsAnimations };
|
|
1913
1999
|
//# sourceMappingURL=tabs.mjs.map
|