carbon-components-angular
Version:
Next generation components
1 lines • 3.38 kB
JavaScript
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[2969],{"./src/pagination/pagination-nav.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,__namedExportsOrder:()=>__namedExportsOrder,default:()=>pagination_nav_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),pagination=__webpack_require__("./src/pagination/index.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let PaginationNavStory=class PaginationNavStory{constructor(){this.model=new pagination.wi,this.disabled=!1,this.pageInputDisabled=!1,this.numOfItemsToShow=!1,this.size="md"}get totalDataLength(){return this.model.totalDataLength}set totalDataLength(value){this.model.totalDataLength=value}ngOnInit(){this.model.currentPage=1}selectPage(page){console.log("Loading page",page,"from pagination model"),this.model.currentPage=page}};PaginationNavStory.propDecorators={model:[{type:core.Input}],disabled:[{type:core.Input}],pageInputDisabled:[{type:core.Input}],numOfItemsToShow:[{type:core.Input}],size:[{type:core.Input}],totalDataLength:[{type:core.Input}]},PaginationNavStory=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-pagination",template:'\n\t\t<cds-pagination-nav\n\t\t\t[model]="model"\n\t\t\t[disabled]="disabled"\n\t\t\t(selectPage)="selectPage($event)"\n\t\t\t[numOfItemsToShow]="numOfItemsToShow"\n\t\t\t[size]="size">\n\t\t</cds-pagination-nav>\n\t'})],PaginationNavStory);const pagination_nav_stories={title:"Components/Pagination Nav",decorators:[(0,dist.moduleMetadata)({imports:[pagination.u3],declarations:[PaginationNavStory]})],component:pagination.zI},Basic=(args=>({props:args,template:'\n \x3c!--\n app-* components are for demo purposes only.\n You can create your own implementation by using the component source found at:\n https://github.com/IBM/carbon-components-angular/tree/master/src/pagination/pagination-nav/stories/pagination-nav-story.component.ts\n --\x3e\n <app-pagination\n [disabled]="disabled"\n [totalDataLength]="totalDataLength"\n [numOfItemsToShow]="numOfItemsToShow"\n [skeleton]="skeleton"\n [size]="size">\n </app-pagination>\n '})).bind({});Basic.args={disabled:!1,totalDataLength:10,numOfItemsToShow:4,skeleton:!1,size:"md"},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n \x3c!--\n app-* components are for demo purposes only.\n You can create your own implementation by using the component source found at:\n https://github.com/IBM/carbon-components-angular/tree/master/src/pagination/pagination-nav/stories/pagination-nav-story.component.ts\n --\x3e\n <app-pagination\n [disabled]="disabled"\n [totalDataLength]="totalDataLength"\n [numOfItemsToShow]="numOfItemsToShow"\n [skeleton]="skeleton"\n [size]="size">\n </app-pagination>\n `\n})',...Basic.parameters?.docs?.source}}};const __namedExportsOrder=["Basic"]}}]);