carbon-components-angular
Version:
Next generation components
1 lines • 32.2 kB
JavaScript
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6842],{"./src/breadcrumb/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{aG:()=>Breadcrumb,UN:()=>BreadcrumbItemComponent,wH:()=>BreadcrumbModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),platform_browser=__webpack_require__("./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2020/router.mjs");let BreadcrumbItemComponent=class BreadcrumbItemComponent{constructor(domSanitizer,router){this.domSanitizer=domSanitizer,this.router=router,this.navigation=new core.EventEmitter,this.skeleton=!1,this.ariaCurrent="page",this.current=!1,this.itemClass=!0}set href(v){this._href=v}get href(){return this.domSanitizer.bypassSecurityTrustUrl(this._href)}useTemplate(){return this.skeleton||this._href||this.route}navigate(event){if(this.router&&this.route){event.preventDefault();const status=this.router.navigate(this.route,this.routeExtras);this.navigation.emit(status)}}};BreadcrumbItemComponent.ctorParameters=()=>[{type:platform_browser.DomSanitizer},{type:router.F0,decorators:[{type:core.Optional}]}],BreadcrumbItemComponent.propDecorators={href:[{type:core.Input}],route:[{type:core.Input}],routeExtras:[{type:core.Input}],navigation:[{type:core.Output}],skeleton:[{type:core.Input}],ariaCurrent:[{type:core.Input}],current:[{type:core.HostBinding,args:["class.cds--breadcrumb-item--current"]},{type:core.Input}],itemClass:[{type:core.HostBinding,args:["class.cds--breadcrumb-item"]}]},BreadcrumbItemComponent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-breadcrumb-item, ibm-breadcrumb-item",template:'\n\t<a\n\t\tclass="cds--link"\n\t\t[href]="(skeleton ? \'/#\' : href)"\n\t\t(click)="navigate($event)"\n\t\t[attr.aria-current]="(current ? ariaCurrent : null)"\n\t\t*ngIf="useTemplate(); else content">\n\t\t<ng-container *ngTemplateOutlet="content"></ng-container>\n\t</a>\n\t<ng-template #content>\n\t\t<ng-content></ng-content>\n\t</ng-template>'})],BreadcrumbItemComponent);var i18n=__webpack_require__("./src/i18n/index.ts");let Breadcrumb=class Breadcrumb{constructor(i18n,router){this.i18n=i18n,this.router=router,this.noTrailingSlash=!1,this.ariaLabel=this.i18n.get().BREADCRUMB.LABEL,this.navigation=new core.EventEmitter,this._skeleton=!1}set skeleton(value){this._skeleton=value,this.updateChildren()}get skeleton(){return this._skeleton}set threshold(threshold){this._threshold=threshold,(isNaN(threshold)||threshold<4)&&(this._threshold=4)}get threshold(){return this._threshold}get shouldShowContent(){return!this.items}get shouldShowOverflow(){return!!this.items&&this.items.length>this.threshold}get first(){return this.shouldShowOverflow?this.items[0]:null}get overflowItems(){return this.shouldShowOverflow?this.items.slice(1,this.items.length-2):[]}get secondLast(){return this.shouldShowOverflow?this.items[this.items.length-2]:null}get last(){return this.shouldShowOverflow?this.items[this.items.length-1]:null}ngAfterContentInit(){this.updateChildren()}navigate(event,item){if(this.router&&item.route){event.preventDefault();const status=this.router.navigate(item.route,item.routeExtras);this.navigation.emit(status)}}updateChildren(){this.children&&this.children.toArray().forEach((child=>child.skeleton=this.skeleton))}};Breadcrumb.ctorParameters=()=>[{type:i18n.oc},{type:router.F0,decorators:[{type:core.Optional}]}],Breadcrumb.propDecorators={children:[{type:core.ContentChildren,args:[BreadcrumbItemComponent]}],items:[{type:core.Input}],noTrailingSlash:[{type:core.Input}],ariaLabel:[{type:core.Input}],skeleton:[{type:core.Input}],threshold:[{type:core.Input}],navigation:[{type:core.Output}]},Breadcrumb=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-breadcrumb, ibm-breadcrumb",template:'\n\t<nav #nav class="cds--breadcrumb"\n\t\t[ngClass]="{\n\t\t\t\'cds--skeleton\' : skeleton,\n\t\t\t\'cds--breadcrumb--no-trailing-slash\' : noTrailingSlash\n\t\t}"\n\t\t[attr.aria-label]="ariaLabel">\n\t\t<ng-template [ngIf]="shouldShowContent">\n\t\t\t<ng-content></ng-content>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="!shouldShowOverflow">\n\t\t\t<cds-breadcrumb-item\n\t\t\t\t*ngFor="let item of items"\n\t\t\t\t[href]="item.href"\n\t\t\t\t[route]="item.route"\n\t\t\t\t[routeExtras]="item.routeExtras"\n\t\t\t\t[current]="item.current"\n\t\t\t\t[ariaCurrent]="item.ariaCurrent"\n\t\t\t\t(navigation)="navigation.emit($event)">\n\t\t\t\t<ng-container *ngIf="!item.template">{{item.content}}</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf="item.template"\n\t\t\t\t\t[ngTemplateOutlet]="item.template"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item }">\n\t\t\t\t</ng-template>\n\t\t\t</cds-breadcrumb-item>\n\t\t</ng-template>\n\t\t<ng-template [ngIf]="shouldShowOverflow">\n\t\t\t<cds-breadcrumb-item\n\t\t\t\t[href]="first?.href"\n\t\t\t\t[route]="first?.route"\n\t\t\t\t[routeExtras]="first?.routeExtras"\n\t\t\t\t[current]="first?.current"\n\t\t\t\t[ariaCurrent]="first?.ariaCurrent"\n\t\t\t\t(navigation)="navigation.emit($event)">\n\t\t\t\t<ng-container *ngIf="!first?.template">{{first?.content}}</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf="first?.template"\n\t\t\t\t\t[ngTemplateOutlet]="first?.template"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: first }">\n\t\t\t\t</ng-template>\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item>\n\t\t\t\t<cds-overflow-menu>\n\t\t\t\t\t<li class="cds--overflow-menu-options__option"\n\t\t\t\t\t\t*ngFor="let item of overflowItems">\n\t\t\t\t\t\t<a class="cds--overflow-menu-options__btn"\n\t\t\t\t\t\t\thref="{{item?.href}}"\n\t\t\t\t\t\t\t(click)="navigate($event, item)"\n\t\t\t\t\t\t\tstyle="text-decoration: none;">\n\t\t\t\t\t\t\t<ng-container *ngIf="!item?.template">{{item?.content}}</ng-container>\n\t\t\t\t\t\t\t<ng-template\n\t\t\t\t\t\t\t\t*ngIf="item?.template"\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]="item?.template"\n\t\t\t\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: item }">\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</cds-overflow-menu>\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item\n\t\t\t\t[href]="secondLast?.href"\n\t\t\t\t[route]="secondLast?.route"\n\t\t\t\t[routeExtras]="secondLast?.routeExtras"\n\t\t\t\t[current]="secondLast?.current"\n\t\t\t\t[ariaCurrent]="secondLast?.ariaCurrent"\n\t\t\t\t(navigation)="navigation.emit($event)">\n\t\t\t\t<ng-container *ngIf="!secondLast?.template">{{secondLast?.content}}</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf="secondLast?.template"\n\t\t\t\t\t[ngTemplateOutlet]="secondLast?.template"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: secondLast }">\n\t\t\t\t</ng-template>\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item\n\t\t\t\t[href]="last?.href"\n\t\t\t\t[route]="last?.route"\n\t\t\t\t[routeExtras]="last?.routeExtras"\n\t\t\t\t[current]="last?.current"\n\t\t\t\t[ariaCurrent]="last?.ariaCurrent"\n\t\t\t\t(navigation)="navigation.emit($event)">\n\t\t\t\t<ng-container *ngIf="!last?.template">{{last?.content}}</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf="last?.template"\n\t\t\t\t\t[ngTemplateOutlet]="last?.template"\n\t\t\t\t\t[ngTemplateOutletContext]="{ $implicit: last }">\n\t\t\t\t</ng-template>\n\t\t\t</cds-breadcrumb-item>\n\t\t</ng-template>\n\t</nav>'})],Breadcrumb);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),dialog=__webpack_require__("./src/dialog/index.ts");let BreadcrumbModule=class BreadcrumbModule{};BreadcrumbModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Breadcrumb,BreadcrumbItemComponent],exports:[Breadcrumb,BreadcrumbItemComponent],imports:[common.CommonModule,dialog.Su,i18n.LU]})],BreadcrumbModule)},"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{a:()=>IconDirective});var tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.cdsIcon="",this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}set ibmIcon(iconName){this.cdsIcon=iconName}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.u9)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString()}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.cdsIcon)}ngOnChanges({cdsIcon}){cdsIcon&&!cdsIcon.isFirstChange()&&this.renderIcon(this.cdsIcon)}};IconDirective.titleIdCounter=0,IconDirective.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.C6}],IconDirective.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]},IconDirective=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{QX:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/folder/16.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js"),_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/@carbon/icons/es/view/16.js"),_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@carbon/icons/es/view--off/16.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.C6,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_55__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_55__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.C6]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.C6}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.Z,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.Z,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.Z,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.Z,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.Z,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.Z,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.Z,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.Z,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.Z,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.Z,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.Z,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.Z,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.Z,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.Z,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.Z,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.Z,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.Z,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.Z,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.Z,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.Z,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.Z,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.Z,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.Z,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.Z,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.Z,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.Z,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.Z,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.Z,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.Z,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.Z,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.Z,_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__.Z,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__.Z,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__.Z,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__.Z,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__.Z,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__.Z,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__.Z,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__.Z,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__.Z,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__.Z,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__.Z,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__.Z,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__.Z,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__.Z,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__.Z,_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__.Z,_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__.Z,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__.Z,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__.Z,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__.Z,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__.Z,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__.Z])}};IconModule.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.C6}],IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_56__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_55__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.a],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.a],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_57__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{C6:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends class IconCache{}{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.BB)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ar:()=>icon_directive.a,QX:()=>icon_module.QX,C6:()=>icon_service.C6});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./src/breadcrumb/breadcrumb.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,CurrentPage:()=>CurrentPage,Model:()=>Model,ModelWithTemplate:()=>ModelWithTemplate,Skeleton:()=>Skeleton,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/breadcrumb/index.ts");let breadcrumbItems;const createBreadcrumbItems=(count,content="Breadcrumb")=>(breadcrumbItems&&count===breadcrumbItems.length||(breadcrumbItems=Array(count).fill(0).map(((x,i)=>({content:`${content} ${i+1}`,href:"#"+(i+1)})))),breadcrumbItems),withTemplate=(templateRef,items)=>items.map((item=>Object.assign(item,{template:templateRef}))),__WEBPACK_DEFAULT_EXPORT__={title:"Components/Breadcrumb",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.wH]})],args:{noTrailingSlash:!0,skeleton:!1},argTypes:{noTrailingSlash:{type:"boolean"},skeleton:{type:"boolean",control:!1}},component:___WEBPACK_IMPORTED_MODULE_1__.aG,subcomponents:{BreadcrumbItemComponent:___WEBPACK_IMPORTED_MODULE_1__.UN}},Basic=(args=>({props:args,template:'\n <cds-breadcrumb [noTrailingSlash]="noTrailingSlash">\n <cds-breadcrumb-item href="#1">\n Breadcrumb 1\n </cds-breadcrumb-item>\n <cds-breadcrumb-item href="#2">\n Breadcrumb 2\n </cds-breadcrumb-item>\n <cds-breadcrumb-item href="#3">\n Breadcrumb 3\n </cds-breadcrumb-item>\n </cds-breadcrumb>\n '})).bind({}),CurrentPage=(args=>({props:args,template:'\n <cds-breadcrumb>\n <cds-breadcrumb-item href="#1">\n Breadcrumb 1\n </cds-breadcrumb-item>\n <cds-breadcrumb-item href="#2">\n Breadcrumb 2\n </cds-breadcrumb-item>\n <cds-breadcrumb-item current="true" href="#3">\n Breadcrumb 3\n </cds-breadcrumb-item>\n </cds-breadcrumb>\n '})).bind({});CurrentPage.parameters={controls:{disable:!0}};const Model=(args=>({props:{...args,createBreadcrumbItems},template:'\n <cds-breadcrumb\n [noTrailingSlash]="noTrailingSlash"\n [threshold]="threshold"\n [items]="createBreadcrumbItems(itemCount, content)">\n </cds-breadcrumb>\n '})).bind({});Model.args={itemCount:10,threshold:4,templateContent:"Hello",content:"breadcrumb"};const ModelWithTemplate=(args=>({props:{...args,createBreadcrumbItems,withTemplate},template:'\n <ng-template #breadcrumbTemplate let-item>\n {{ templateContent }}{{ item.content }}\n </ng-template>\n <cds-breadcrumb\n [noTrailingSlash]="noTrailingSlash"\n [threshold]="threshold"\n [items]="withTemplate(breadcrumbTemplate, createBreadcrumbItems(itemCount, content))">\n </cds-breadcrumb>\n '})).bind({});ModelWithTemplate.args={itemCount:10,threshold:4,templateContent:"Hello",content:"breadcrumb"};const Skeleton=(args=>({props:args,template:'\n <cds-breadcrumb skeleton="true" [noTrailingSlash]="noTrailingSlash">\n <cds-breadcrumb-item></cds-breadcrumb-item>\n <cds-breadcrumb-item></cds-breadcrumb-item>\n <cds-breadcrumb-item></cds-breadcrumb-item>\n <cds-breadcrumb-item></cds-breadcrumb-item>\n </cds-breadcrumb>\n '})).bind({});Skeleton.parameters={controls:{disable:!0}},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-breadcrumb [noTrailingSlash]="noTrailingSlash">\n <cds-breadcrumb-item href="#1">\n Breadcrumb 1\n </cds-breadcrumb-item>\n <cds-breadcrumb-item href="#2">\n Breadcrumb 2\n </cds-breadcrumb-item>\n <cds-breadcrumb-item href="#3">\n Breadcrumb 3\n </cds-breadcrumb-item>\n </cds-breadcrumb>\n `\n})',...Basic.parameters?.docs?.source}}},CurrentPage.parameters={...CurrentPage.parameters,docs:{...CurrentPage.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-breadcrumb>\n <cds-breadcrumb-item href="#1">\n Breadcrumb 1\n </cds-breadcrumb-item>\n <cds-breadcrumb-item href="#2">\n Breadcrumb 2\n </cds-breadcrumb-item>\n <cds-breadcrumb-item current="true" href="#3">\n Breadcrumb 3\n </cds-breadcrumb-item>\n </cds-breadcrumb>\n `\n})',...CurrentPage.parameters?.docs?.source}}},Model.parameters={...Model.parameters,docs:{...Model.parameters?.docs,source:{originalSource:'args => ({\n props: {\n ...args,\n createBreadcrumbItems\n },\n template: `\n <cds-breadcrumb\n [noTrailingSlash]="noTrailingSlash"\n [threshold]="threshold"\n [items]="createBreadcrumbItems(itemCount, content)">\n </cds-breadcrumb>\n `\n})',...Model.parameters?.docs?.source}}},ModelWithTemplate.parameters={...ModelWithTemplate.parameters,docs:{...ModelWithTemplate.parameters?.docs,source:{originalSource:'args => ({\n props: {\n ...args,\n createBreadcrumbItems,\n withTemplate\n },\n template: `\n <ng-template #breadcrumbTemplate let-item>\n {{ templateContent }}{{ item.content }}\n </ng-template>\n <cds-breadcrumb\n [noTrailingSlash]="noTrailingSlash"\n [threshold]="threshold"\n [items]="withTemplate(breadcrumbTemplate, createBreadcrumbItems(itemCount, content))">\n </cds-breadcrumb>\n `\n})',...ModelWithTemplate.parameters?.docs?.source}}},Skeleton.parameters={...Skeleton.parameters,docs:{...Skeleton.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-breadcrumb skeleton="true" [noTrailingSlash]="noTrailingSlash">\n <cds-breadcrumb-item></cds-breadcrumb-item>\n <cds-breadcrumb-item></cds-breadcrumb-item>\n <cds-breadcrumb-item></cds-breadcrumb-item>\n <cds-breadcrumb-item></cds-breadcrumb-item>\n </cds-breadcrumb>\n `\n})',...Skeleton.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","CurrentPage","Model","ModelWithTemplate","Skeleton"]}}]);