UNPKG

carbon-components-angular

Version:
530 lines (463 loc) 22.9 kB
<!doctype 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" >AILabelModule</li> </ol> <div class="text-center module-graph-container"> <div id="module-graph-svg"> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Generated by graphviz version 2.47.0 (20210316.0004) --> <!-- Title: dependencies Pages: 1 --> <svg width="960pt" height="284pt" viewBox="0.00 0.00 960.00 284.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 280)"> <title>dependencies</title> <polygon fill="white" stroke="transparent" points="-4,4 -4,-280 956,-280 956,4 -4,4"/> <text text-anchor="start" x="455.01" y="-42.4" font-family="Times-12" font-weight="bold" font-size="14.00">Legend</text> <polygon fill="#ffffb3" stroke="transparent" points="242,-10 242,-30 262,-30 262,-10 242,-10"/> <text text-anchor="start" x="265.63" y="-15.4" font-family="Times-12" font-size="14.00"> &#160;Declarations</text> <polygon fill="#8dd3c7" stroke="transparent" points="355,-10 355,-30 375,-30 375,-10 355,-10"/> <text text-anchor="start" x="378.73" y="-15.4" font-family="Times-12" font-size="14.00"> &#160;Module</text> <polygon fill="#80b1d3" stroke="transparent" points="441,-10 441,-30 461,-30 461,-10 441,-10"/> <text text-anchor="start" x="464.78" y="-15.4" font-family="Times-12" font-size="14.00"> &#160;Bootstrap</text> <polygon fill="#fdb462" stroke="transparent" points="538,-10 538,-30 558,-30 558,-10 538,-10"/> <text text-anchor="start" x="561.67" y="-15.4" font-family="Times-12" font-size="14.00"> &#160;Providers</text> <polygon fill="#fb8072" stroke="transparent" points="634,-10 634,-30 654,-30 654,-10 634,-10"/> <text text-anchor="start" x="657.73" y="-15.4" font-family="Times-12" font-size="14.00"> &#160;Exports</text> <g id="clust1" class="cluster"> <title>cluster_AILabelModule</title> <polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 944,-268 944,-70 8,-70"/> </g> <g id="clust2" class="cluster"> <title>cluster_AILabelModule_declarations</title> <polygon fill="none" stroke="black" points="364,-78 364,-130 936,-130 936,-78 364,-78"/> </g> <g id="clust8" class="cluster"> <title>cluster_AILabelModule_exports</title> <polygon fill="none" stroke="black" points="251,-208 251,-260 655,-260 655,-208 251,-208"/> </g> <g id="clust7" class="cluster"> <title>cluster_AILabelModule_imports</title> <polygon fill="none" stroke="black" points="16,-78 16,-130 356,-130 356,-78 16,-78"/> </g> <!-- AILabelActions --> <g id="node1" class="node"> <title>AILabelActions</title> <polygon fill="#ffffb3" stroke="black" points="928.19,-122 821.81,-122 821.81,-86 928.19,-86 928.19,-122"/> <text text-anchor="middle" x="875" y="-99.8" font-family="Times,serif" font-size="14.00">AILabelActions</text> </g> <!-- AILabelModule --> <g id="node5" class="node"> <title>AILabelModule</title> <polygon fill="#8dd3c7" stroke="black" points="506.19,-187 503.19,-191 482.19,-191 479.19,-187 399.81,-187 399.81,-151 506.19,-151 506.19,-187"/> <text text-anchor="middle" x="453" y="-164.8" font-family="Times,serif" font-size="14.00">AILabelModule</text> </g> <!-- AILabelActions&#45;&gt;AILabelModule --> <g id="edge1" class="edge"> <title>AILabelActions&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M875,-122.13C875,-142.57 875,-173 875,-173 875,-173 516.45,-173 516.45,-173"/> <polygon fill="black" stroke="black" points="516.45,-169.5 506.45,-173 516.45,-176.5 516.45,-169.5"/> </g> <!-- AILabelComponent --> <g id="node2" class="node"> <title>AILabelComponent</title> <polygon fill="#ffffb3" stroke="black" points="803.97,-122 676.03,-122 676.03,-86 803.97,-86 803.97,-122"/> <text text-anchor="middle" x="740" y="-99.8" font-family="Times,serif" font-size="14.00">AILabelComponent</text> </g> <!-- AILabelComponent&#45;&gt;AILabelModule --> <g id="edge2" class="edge"> <title>AILabelComponent&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M740,-122.27C740,-140.56 740,-166 740,-166 740,-166 516.31,-166 516.31,-166"/> <polygon fill="black" stroke="black" points="516.31,-162.5 506.31,-166 516.31,-169.5 516.31,-162.5"/> </g> <!-- AILabelContent --> <g id="node3" class="node"> <title>AILabelContent</title> <polygon fill="#ffffb3" stroke="black" points="658.47,-122 551.53,-122 551.53,-86 658.47,-86 658.47,-122"/> <text text-anchor="middle" x="605" y="-99.8" font-family="Times,serif" font-size="14.00">AILabelContent</text> </g> <!-- AILabelContent&#45;&gt;AILabelModule --> <g id="edge3" class="edge"> <title>AILabelContent&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M599.18,-122.01C599.18,-138.05 599.18,-159 599.18,-159 599.18,-159 516.19,-159 516.19,-159"/> <polygon fill="black" stroke="black" points="516.19,-155.5 506.19,-159 516.19,-162.5 516.19,-155.5"/> </g> <!-- AILabelPopoverDirective --> <g id="node4" class="node"> <title>AILabelPopoverDirective</title> <polygon fill="#ffffb3" stroke="black" points="533.88,-122 372.12,-122 372.12,-86 533.88,-86 533.88,-122"/> <text text-anchor="middle" x="453" y="-99.8" font-family="Times,serif" font-size="14.00">AILabelPopoverDirective</text> </g> <!-- AILabelPopoverDirective&#45;&gt;AILabelModule --> <g id="edge4" class="edge"> <title>AILabelPopoverDirective&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M453,-122.11C453,-122.11 453,-140.99 453,-140.99"/> <polygon fill="black" stroke="black" points="449.5,-140.99 453,-150.99 456.5,-140.99 449.5,-140.99"/> </g> <!-- AILabelActions --> <g id="node9" class="node"> <title>AILabelActions </title> <polygon fill="#fb8072" stroke="black" points="646.69,-252 537.31,-252 537.31,-216 646.69,-216 646.69,-252"/> <text text-anchor="middle" x="592" y="-229.8" font-family="Times,serif" font-size="14.00">AILabelActions </text> </g> <!-- AILabelModule&#45;&gt;AILabelActions --> <g id="edge8" class="edge"> <title>AILabelModule&#45;&gt;AILabelActions </title> <path fill="none" stroke="black" stroke-dasharray="5,2" d="M506.13,-180C526.22,-180 544.34,-180 544.34,-180 544.34,-180 544.34,-205.72 544.34,-205.72"/> <polygon fill="black" stroke="black" points="540.84,-205.72 544.34,-215.72 547.84,-205.72 540.84,-205.72"/> </g> <!-- AILabelComponent --> <g id="node10" class="node"> <title>AILabelComponent </title> <polygon fill="#fb8072" stroke="black" points="518.97,-252 387.03,-252 387.03,-216 518.97,-216 518.97,-252"/> <text text-anchor="middle" x="453" y="-229.8" font-family="Times,serif" font-size="14.00">AILabelComponent </text> </g> <!-- AILabelModule&#45;&gt;AILabelComponent --> <g id="edge9" class="edge"> <title>AILabelModule&#45;&gt;AILabelComponent </title> <path fill="none" stroke="black" stroke-dasharray="5,2" d="M453,-187.11C453,-187.11 453,-205.99 453,-205.99"/> <polygon fill="black" stroke="black" points="449.5,-205.99 453,-215.99 456.5,-205.99 449.5,-205.99"/> </g> <!-- AILabelContent --> <g id="node11" class="node"> <title>AILabelContent </title> <polygon fill="#fb8072" stroke="black" points="369.47,-252 258.53,-252 258.53,-216 369.47,-216 369.47,-252"/> <text text-anchor="middle" x="314" y="-229.8" font-family="Times,serif" font-size="14.00">AILabelContent </text> </g> <!-- AILabelModule&#45;&gt;AILabelContent --> <g id="edge10" class="edge"> <title>AILabelModule&#45;&gt;AILabelContent </title> <path fill="none" stroke="black" stroke-dasharray="5,2" d="M399.69,-180C378.27,-180 358.53,-180 358.53,-180 358.53,-180 358.53,-205.72 358.53,-205.72"/> <polygon fill="black" stroke="black" points="355.03,-205.72 358.53,-215.72 362.03,-205.72 355.03,-205.72"/> </g> <!-- ButtonModule --> <g id="node6" class="node"> <title>ButtonModule</title> <polygon fill="#8dd3c7" stroke="black" points="347.67,-122 344.67,-126 323.67,-126 320.67,-122 250.33,-122 250.33,-86 347.67,-86 347.67,-122"/> <text text-anchor="middle" x="299" y="-99.8" font-family="Times,serif" font-size="14.00">ButtonModule</text> </g> <!-- ButtonModule&#45;&gt;AILabelModule --> <g id="edge5" class="edge"> <title>ButtonModule&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M303.3,-122.01C303.3,-138.05 303.3,-159 303.3,-159 303.3,-159 389.8,-159 389.8,-159"/> <polygon fill="black" stroke="black" points="389.8,-162.5 399.8,-159 389.8,-155.5 389.8,-162.5"/> </g> <!-- IconModule --> <g id="node7" class="node"> <title>IconModule</title> <polygon fill="#8dd3c7" stroke="black" points="232.43,-122 229.43,-126 208.43,-126 205.43,-122 147.57,-122 147.57,-86 232.43,-86 232.43,-122"/> <text text-anchor="middle" x="190" y="-99.8" font-family="Times,serif" font-size="14.00">IconModule</text> </g> <!-- IconModule&#45;&gt;AILabelModule --> <g id="edge6" class="edge"> <title>IconModule&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M190,-122.27C190,-140.56 190,-166 190,-166 190,-166 389.78,-166 389.78,-166"/> <polygon fill="black" stroke="black" points="389.78,-169.5 399.78,-166 389.78,-162.5 389.78,-169.5"/> </g> <!-- PopoverModule --> <g id="node8" class="node"> <title>PopoverModule</title> <polygon fill="#8dd3c7" stroke="black" points="130.21,-122 127.21,-126 106.21,-126 103.21,-122 23.79,-122 23.79,-86 130.21,-86 130.21,-122"/> <text text-anchor="middle" x="77" y="-99.8" font-family="Times,serif" font-size="14.00">PopoverModule</text> </g> <!-- PopoverModule&#45;&gt;AILabelModule --> <g id="edge7" class="edge"> <title>PopoverModule&#45;&gt;AILabelModule</title> <path fill="none" stroke="black" d="M77,-122.13C77,-142.57 77,-173 77,-173 77,-173 389.53,-173 389.53,-173"/> <polygon fill="black" stroke="black" points="389.53,-176.5 399.53,-173 389.53,-169.5 389.53,-176.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/ai-label/ai-label.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="../directives/AILabelActions.html">AILabelActions</a> </li> <li class="list-group-item"> <a href="../components/AILabelComponent.html">AILabelComponent</a> </li> <li class="list-group-item"> <a href="../directives/AILabelContent.html">AILabelContent</a> </li> <li class="list-group-item"> <a href="../directives/AILabelPopoverDirective.html">AILabelPopoverDirective</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/ButtonModule.html">ButtonModule</a> </li> <li class="list-group-item"> <a href="../modules/IconModule.html">IconModule</a> </li> <li class="list-group-item"> <a href="../modules/PopoverModule.html">PopoverModule</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="../directives/AILabelActions.html">AILabelActions</a> </li> <li class="list-group-item"> <a href="../components/AILabelComponent.html">AILabelComponent</a> </li> <li class="list-group-item"> <a href="../directives/AILabelContent.html">AILabelContent</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">/** * Copyright IBM Corp. 2024, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { NgModule } from &quot;@angular/core&quot;; import { CommonModule } from &quot;@angular/common&quot;; import { ButtonModule } from &quot;carbon-components-angular/button&quot;; import { IconModule } from &quot;carbon-components-angular/icon&quot;; import { PopoverModule } from &quot;carbon-components-angular/popover&quot;; import { AILabelComponent } from &quot;./ai-label.component&quot;; import { AILabelPopoverDirective } from &quot;./ai-label-popover.directive&quot;; import { AILabelContent } from &quot;./ai-label-content.directive&quot;; import { AILabelActions } from &quot;./ai-label-actions.directive&quot;; @NgModule({ declarations: [ AILabelComponent, AILabelPopoverDirective, AILabelContent, AILabelActions ], exports: [ AILabelComponent, AILabelContent, AILabelActions ], imports: [ CommonModule, ButtonModule, IconModule, PopoverModule ] }) export class AILabelModule {} </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 = 'AILabelModule.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>