carbon-components-angular
Version:
Next generation components
517 lines (452 loc) • 23.3 kB
HTML
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>carbon-components-angular documentation</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../styles/style.css">
<link rel="stylesheet" href="../styles/dark.css">
<style>
footer.carbon {
position: absolute;
bottom: 0;
width: 100%;
z-index: 9999;
}
#root > div {
/*
* Subtracting the height of the footer to prevent
* overlaying the footer ontop of content
*/
height: calc(100vh - 48px);
}
</style>
</head>
<body>
<script>
// Blocking script to avoid flickering dark mode
// Dark mode toggle button
var useDark = window.matchMedia('(prefers-color-scheme: dark)');
var darkModeState = useDark.matches;
var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
function checkToggle(check) {
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
$darkModeToggleSwitchers[i].checked = check;
}
}
function toggleDarkMode(state) {
if (window.localStorage) {
localStorage.setItem('compodoc_darkmode-state', state);
}
checkToggle(state);
const hasClass = document.body.classList.contains('dark');
if (state) {
for (var i = 0; i < $darkModeToggles.length; i++) {
$darkModeToggles[i].classList.add('dark');
}
if (!hasClass) {
document.body.classList.add('dark');
}
} else {
for (var i = 0; i < $darkModeToggles.length; i++) {
$darkModeToggles[i].classList.remove('dark');
}
if (hasClass) {
document.body.classList.remove('dark');
}
}
}
useDark.addEventListener('change', function (evt) {
toggleDarkMode(evt.matches);
});
if (darkModeStateLocal) {
darkModeState = darkModeStateLocal === 'true';
}
toggleDarkMode(darkModeState);
</script>
<div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
<div class="d-flex">
<a href="../" class="navbar-brand">carbon-components-angular documentation</a>
<button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
</div>
</div>
<div class="xs-menu menu" id="mobile-menu">
<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu>
</div>
<div class="container-fluid main">
<div class="row main">
<div class="d-none d-md-block menu">
<compodoc-menu mode="normal"></compodoc-menu>
</div>
<!-- START CONTENT -->
<div class="content module">
<div class="content-data">
<ol class="breadcrumb">
<li class="breadcrumb-item">Modules</li>
<li class="breadcrumb-item" >ContextMenuModule</li>
</ol>
<div class="text-center module-graph-container">
<div id="module-graph-svg">
<!-- Generated by graphviz version 2.47.0 (20210316.0004)
-->
<!-- Title: dependencies Pages: 1 -->
<svg width="956pt" height="349pt"
viewBox="0.00 0.00 956.00 349.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 345)">
<title>dependencies</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-345 952,-345 952,4 -4,4"/>
<text text-anchor="start" x="453.01" y="-42.4" font-family="Times-12" font-weight="bold" font-size="14.00">Legend</text>
<polygon fill="#ffffb3" stroke="transparent" points="240,-10 240,-30 260,-30 260,-10 240,-10"/>
<text text-anchor="start" x="263.63" y="-15.4" font-family="Times-12" font-size="14.00">  Declarations</text>
<polygon fill="#8dd3c7" stroke="transparent" points="353,-10 353,-30 373,-30 373,-10 353,-10"/>
<text text-anchor="start" x="376.73" y="-15.4" font-family="Times-12" font-size="14.00">  Module</text>
<polygon fill="#80b1d3" stroke="transparent" points="439,-10 439,-30 459,-30 459,-10 439,-10"/>
<text text-anchor="start" x="462.78" y="-15.4" font-family="Times-12" font-size="14.00">  Bootstrap</text>
<polygon fill="#fdb462" stroke="transparent" points="536,-10 536,-30 556,-30 556,-10 536,-10"/>
<text text-anchor="start" x="559.67" y="-15.4" font-family="Times-12" font-size="14.00">  Providers</text>
<polygon fill="#fb8072" stroke="transparent" points="632,-10 632,-30 652,-30 652,-10 632,-10"/>
<text text-anchor="start" x="655.73" y="-15.4" font-family="Times-12" font-size="14.00">  Exports</text>
<g id="clust1" class="cluster">
<title>cluster_ContextMenuModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-333 940,-333 940,-70 8,-70"/>
</g>
<g id="clust8" class="cluster">
<title>cluster_ContextMenuModule_exports</title>
<polygon fill="none" stroke="black" points="63,-273 63,-325 885,-325 885,-273 63,-273"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_ContextMenuModule_imports</title>
<polygon fill="none" stroke="black" points="832,-143 832,-195 932,-195 932,-143 832,-143"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_ContextMenuModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-143 16,-195 824,-195 824,-143 16,-143"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_ContextMenuModule_ContextMenuGroupComponent_providers</title>
<polygon fill="none" stroke="black" points="186,-78 186,-130 460,-130 460,-78 186,-78"/>
</g>
<!-- ContextMenuComponent -->
<g id="node1" class="node">
<title>ContextMenuComponent</title>
<polygon fill="#ffffb3" stroke="black" points="816.32,-187 657.68,-187 657.68,-151 816.32,-151 816.32,-187"/>
<text text-anchor="middle" x="737" y="-164.8" font-family="Times,serif" font-size="14.00">ContextMenuComponent</text>
</g>
<!-- ContextMenuModule -->
<g id="node5" class="node">
<title>ContextMenuModule</title>
<polygon fill="#8dd3c7" stroke="black" points="607.04,-252 604.04,-256 583.04,-256 580.04,-252 470.96,-252 470.96,-216 607.04,-216 607.04,-252"/>
<text text-anchor="middle" x="539" y="-229.8" font-family="Times,serif" font-size="14.00">ContextMenuModule</text>
</g>
<!-- ContextMenuComponent->ContextMenuModule -->
<g id="edge1" class="edge">
<title>ContextMenuComponent->ContextMenuModule</title>
<path fill="none" stroke="black" d="M677.57,-187.03C677.57,-203.4 677.57,-225 677.57,-225 677.57,-225 617.07,-225 617.07,-225"/>
<polygon fill="black" stroke="black" points="617.07,-221.5 607.07,-225 617.07,-228.5 617.07,-221.5"/>
</g>
<!-- ContextMenuDividerComponent -->
<g id="node2" class="node">
<title>ContextMenuDividerComponent</title>
<polygon fill="#ffffb3" stroke="black" points="639.59,-187 438.41,-187 438.41,-151 639.59,-151 639.59,-187"/>
<text text-anchor="middle" x="539" y="-164.8" font-family="Times,serif" font-size="14.00">ContextMenuDividerComponent</text>
</g>
<!-- ContextMenuDividerComponent->ContextMenuModule -->
<g id="edge2" class="edge">
<title>ContextMenuDividerComponent->ContextMenuModule</title>
<path fill="none" stroke="black" d="M539,-187.11C539,-187.11 539,-205.99 539,-205.99"/>
<polygon fill="black" stroke="black" points="535.5,-205.99 539,-215.99 542.5,-205.99 535.5,-205.99"/>
</g>
<!-- ContextMenuGroupComponent -->
<g id="node3" class="node">
<title>ContextMenuGroupComponent</title>
<polygon fill="#ffffb3" stroke="black" points="420.09,-187 225.91,-187 225.91,-151 420.09,-151 420.09,-187"/>
<text text-anchor="middle" x="323" y="-164.8" font-family="Times,serif" font-size="14.00">ContextMenuGroupComponent</text>
</g>
<!-- ContextMenuGroupComponent->ContextMenuModule -->
<g id="edge3" class="edge">
<title>ContextMenuGroupComponent->ContextMenuModule</title>
<path fill="none" stroke="black" d="M348.62,-187.03C348.62,-203.4 348.62,-225 348.62,-225 348.62,-225 460.81,-225 460.81,-225"/>
<polygon fill="black" stroke="black" points="460.81,-228.5 470.81,-225 460.81,-221.5 460.81,-228.5"/>
</g>
<!-- ContextMenuItemComponent -->
<g id="node4" class="node">
<title>ContextMenuItemComponent</title>
<polygon fill="#ffffb3" stroke="black" points="207.98,-187 24.02,-187 24.02,-151 207.98,-151 207.98,-187"/>
<text text-anchor="middle" x="116" y="-164.8" font-family="Times,serif" font-size="14.00">ContextMenuItemComponent</text>
</g>
<!-- ContextMenuItemComponent->ContextMenuModule -->
<g id="edge5" class="edge">
<title>ContextMenuItemComponent->ContextMenuModule</title>
<path fill="none" stroke="black" d="M139.62,-187.11C139.62,-206.34 139.62,-234 139.62,-234 139.62,-234 460.8,-234 460.8,-234"/>
<polygon fill="black" stroke="black" points="460.8,-237.5 470.8,-234 460.8,-230.5 460.8,-237.5"/>
</g>
<!-- ContextMenuComponent -->
<g id="node8" class="node">
<title>ContextMenuComponent </title>
<polygon fill="#fb8072" stroke="black" points="876.82,-317 715.18,-317 715.18,-281 876.82,-281 876.82,-317"/>
<text text-anchor="middle" x="796" y="-294.8" font-family="Times,serif" font-size="14.00">ContextMenuComponent </text>
</g>
<!-- ContextMenuModule->ContextMenuComponent -->
<g id="edge7" class="edge">
<title>ContextMenuModule->ContextMenuComponent </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M607.3,-243C674.03,-243 765.62,-243 765.62,-243 765.62,-243 765.62,-270.97 765.62,-270.97"/>
<polygon fill="black" stroke="black" points="762.13,-270.97 765.62,-280.97 769.13,-270.97 762.13,-270.97"/>
</g>
<!-- ContextMenuDividerComponent -->
<g id="node9" class="node">
<title>ContextMenuDividerComponent </title>
<polygon fill="#fb8072" stroke="black" points="697.09,-317 492.91,-317 492.91,-281 697.09,-281 697.09,-317"/>
<text text-anchor="middle" x="595" y="-294.8" font-family="Times,serif" font-size="14.00">ContextMenuDividerComponent </text>
</g>
<!-- ContextMenuModule->ContextMenuDividerComponent -->
<g id="edge8" class="edge">
<title>ContextMenuModule->ContextMenuDividerComponent </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M549.99,-252.11C549.99,-252.11 549.99,-270.99 549.99,-270.99"/>
<polygon fill="black" stroke="black" points="546.49,-270.99 549.99,-280.99 553.49,-270.99 546.49,-270.99"/>
</g>
<!-- ContextMenuGroupComponent -->
<g id="node10" class="node">
<title>ContextMenuGroupComponent </title>
<polygon fill="#fb8072" stroke="black" points="474.59,-317 277.41,-317 277.41,-281 474.59,-281 474.59,-317"/>
<text text-anchor="middle" x="376" y="-294.8" font-family="Times,serif" font-size="14.00">ContextMenuGroupComponent </text>
</g>
<!-- ContextMenuModule->ContextMenuGroupComponent -->
<g id="edge9" class="edge">
<title>ContextMenuModule->ContextMenuGroupComponent </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M483.75,-252.11C483.75,-271.34 483.75,-299 483.75,-299 483.75,-299 482.87,-299 482.87,-299"/>
<polygon fill="black" stroke="black" points="484.93,-295.5 474.93,-299 484.93,-302.5 484.93,-295.5"/>
</g>
<!-- ContextMenuItemComponent -->
<g id="node11" class="node">
<title>ContextMenuItemComponent </title>
<polygon fill="#fb8072" stroke="black" points="258.98,-317 71.02,-317 71.02,-281 258.98,-281 258.98,-317"/>
<text text-anchor="middle" x="165" y="-294.8" font-family="Times,serif" font-size="14.00">ContextMenuItemComponent </text>
</g>
<!-- ContextMenuModule->ContextMenuItemComponent -->
<g id="edge10" class="edge">
<title>ContextMenuModule->ContextMenuItemComponent </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M470.94,-243C383.36,-243 242.35,-243 242.35,-243 242.35,-243 242.35,-270.97 242.35,-270.97"/>
<polygon fill="black" stroke="black" points="238.85,-270.97 242.35,-280.97 245.85,-270.97 238.85,-270.97"/>
</g>
<!-- ContextMenuSelectionService -->
<g id="node6" class="node">
<title>ContextMenuSelectionService</title>
<ellipse fill="#fdb462" stroke="black" cx="323" cy="-104" rx="129.07" ry="18"/>
<text text-anchor="middle" x="323" y="-99.8" font-family="Times,serif" font-size="14.00">ContextMenuSelectionService</text>
</g>
<!-- ContextMenuSelectionService->ContextMenuGroupComponent -->
<g id="edge4" class="edge">
<title>ContextMenuSelectionService->ContextMenuGroupComponent</title>
<path fill="none" stroke="black" d="M323,-122.11C323,-122.11 323,-140.99 323,-140.99"/>
<polygon fill="black" stroke="black" points="319.5,-140.99 323,-150.99 326.5,-140.99 319.5,-140.99"/>
</g>
<!-- IconModule -->
<g id="node7" class="node">
<title>IconModule</title>
<polygon fill="#8dd3c7" stroke="black" points="924.43,-187 921.43,-191 900.43,-191 897.43,-187 839.57,-187 839.57,-151 924.43,-151 924.43,-187"/>
<text text-anchor="middle" x="882" y="-164.8" font-family="Times,serif" font-size="14.00">IconModule</text>
</g>
<!-- IconModule->ContextMenuModule -->
<g id="edge6" class="edge">
<title>IconModule->ContextMenuModule</title>
<path fill="none" stroke="black" d="M858.35,-187.11C858.35,-206.34 858.35,-234 858.35,-234 858.35,-234 617.12,-234 617.12,-234"/>
<polygon fill="black" stroke="black" points="617.12,-230.5 607.12,-234 617.12,-237.5 617.12,-230.5"/>
</g>
</g>
</svg>
</div>
<i id="fullscreen" class="icon ion-ios-resize module-graph-fullscreen-btn" aria-hidden="true"></i>
<div class="btn-group size-buttons">
<button id="zoom-in" class="btn btn-default btn-sm">Zoom in</button>
<button id="reset" class="btn btn-default btn-sm">Reset</button>
<button id="zoom-out" class="btn btn-default btn-sm">Zoom out</button>
</div>
</div>
<script src="../js/libs/svg-pan-zoom.min.js"></script>
<script src="../js/svg-pan-zoom.controls.js"></script>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a href="#info"
class="nav-link"
class="nav-link active"
role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
</li>
<li class="nav-item">
<a href="#source"
class="nav-link"
role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="info">
<p class="comment">
<h3>File</h3>
</p>
<p class="comment">
<code>src/context-menu/context-menu.module.ts</code>
</p>
<div class="container-fluid module">
<div class="row">
<div class="col-sm-3">
<h3>Declarations<a href="https://angular.io/api/core/NgModule#declarations" target="_blank" rel="noopener noreferrer"
title="Official documentation about module declarations"><span class="icon ion-ios-information-circle-outline"></span></a></h3>
<ul class="list-group">
<li class="list-group-item">
<a href="../components/ContextMenuComponent.html">ContextMenuComponent</a>
</li>
<li class="list-group-item">
<a href="../components/ContextMenuDividerComponent.html">ContextMenuDividerComponent</a>
</li>
<li class="list-group-item">
<a href="../components/ContextMenuGroupComponent.html">ContextMenuGroupComponent</a>
</li>
<li class="list-group-item">
<a href="../components/ContextMenuItemComponent.html">ContextMenuItemComponent</a>
</li>
</ul>
</div>
<div class="col-sm-3">
<h3>Imports<a href="https://angular.io/api/core/NgModule#imports" target="_blank" rel="noopener noreferrer"
title="Official documentation about module imports"><span
class="icon ion-ios-information-circle-outline"></a></h3>
<ul class="list-group">
<li class="list-group-item">
<a href="../modules/IconModule.html">IconModule</a>
</li>
</ul>
</div>
<div class="col-sm-3">
<h3>Exports<a href="https://angular.io/api/core/NgModule#exports" target="_blank" rel="noopener noreferrer"
title="Official documentation about module exports"><span
class="icon ion-ios-information-circle-outline"></a></h3>
<ul class="list-group">
<li class="list-group-item">
<a href="../components/ContextMenuComponent.html">ContextMenuComponent</a>
</li>
<li class="list-group-item">
<a href="../components/ContextMenuDividerComponent.html">ContextMenuDividerComponent</a>
</li>
<li class="list-group-item">
<a href="../components/ContextMenuGroupComponent.html">ContextMenuGroupComponent</a>
</li>
<li class="list-group-item">
<a href="../components/ContextMenuItemComponent.html">ContextMenuItemComponent</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { IconModule } from "carbon-components-angular/icon";
import { ContextMenuDividerComponent } from "./context-menu-divider.component";
import { ContextMenuGroupComponent } from "./context-menu-group.component";
import { ContextMenuItemComponent } from "./context-menu-item.component";
import { ContextMenuComponent } from "./context-menu.component";
@NgModule({
declarations: [
ContextMenuDividerComponent,
ContextMenuGroupComponent,
ContextMenuItemComponent,
ContextMenuComponent
],
exports: [
ContextMenuDividerComponent,
ContextMenuGroupComponent,
ContextMenuItemComponent,
ContextMenuComponent
],
imports: [CommonModule, IconModule]
})
export class ContextMenuModule { }
</code></pre>
</div>
</div>
</div><div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
<!-- END CONTENT -->
</div>
</div>
<label class="dark-mode-switch">
<input type="checkbox">
<span class="slider">
<svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
</svg>
</span>
</label>
<script>
var COMPODOC_CURRENT_PAGE_DEPTH = 1;
var COMPODOC_CURRENT_PAGE_CONTEXT = 'module';
var COMPODOC_CURRENT_PAGE_URL = 'ContextMenuModule.html';
var MAX_SEARCH_RESULTS = 15;
</script>
<script>
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
checkToggle(darkModeState);
if ($darkModeToggleSwitchers.length > 0) {
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
darkModeState = !darkModeState;
toggleDarkMode(darkModeState);
});
}
}
</script>
<script src="../js/libs/custom-elements.min.js"></script>
<script src="../js/libs/lit-html.js"></script>
<script src="../js/menu-wc.js" defer></script>
<script nomodule src="../js/menu-wc_es5.js" defer></script>
<script src="../js/libs/bootstrap-native.js"></script>
<script src="../js/libs/es6-shim.min.js"></script>
<script src="../js/libs/EventDispatcher.js"></script>
<script src="../js/libs/promise.min.js"></script>
<script src="../js/libs/zepto.min.js"></script>
<script src="../js/compodoc.js"></script>
<script src="../js/tabs.js"></script>
<script src="../js/menu.js"></script>
<script src="../js/libs/clipboard.min.js"></script>
<script src="../js/libs/prism.js"></script>
<script src="../js/sourceCode.js"></script>
<script src="../js/search/search.js"></script>
<script src="../js/search/lunr.min.js"></script>
<script src="../js/search/search-lunr.js"></script>
<script src="../js/search/search_index.js"></script>
<script src="../js/lazy-load-graphs.js"></script>
<footer class="carbon">
<dds-footer-container key="footer" disable-locale-button="true" size="micro" />
</footer>
<script
key="8"
type="module"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js">
</script>
<!-- Storybook override -->
<script>
document.title = "Carbon Components Angular";
</script>
<script
src="//1.www.s81c.com/common/stats/ibm-common.js"
type="text/javascript"
async="async">
</script>
</body>
</html>