Skip to content

Commit 51fb95c

Browse files
authored
Merge pull request #148 from zvonimirfras/master
Feat(Pagination): Add pagination
2 parents 7cdf84a + 2b5791d commit 51fb95c

14 files changed

+580
-419
lines changed

.storybook/preview.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "~carbon-components/scss/globals/scss/styles.scss";
1+
@import "~carbon-components/css/carbon-components.min.css";
22

33
body {
44
margin: 20px;

package-lock.json

Lines changed: 44 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"core-js": "^2.5.3",
6464
"rxjs": "^6.0.0",
6565
"zone.js": "^0.8.26",
66-
"carbon-components": "^9.1.13"
66+
"carbon-components": "^9.20.0"
6767
},
6868
"devDependencies": {
6969
"@angular-devkit/build-angular": "0.7.1",
@@ -93,7 +93,7 @@
9393
"@types/node": "8.5.2",
9494
"angular2-template-loader": "0.6.2",
9595
"babel-core": "6.26.3",
96-
"carbon-components": "9.1.13",
96+
"carbon-components": "9.20.0",
9797
"codelyzer": "4.0.2",
9898
"commitizen": "2.10.1",
9999
"core-js": "2.5.5",

src/i18n/en.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"TOOLTIP": {
5252
"CLOSE": "Close tooltip"
5353
},
54-
"POPOVER" : {
54+
"POPOVER": {
5555
"CLOSE": "Close popover"
5656
}
5757
},
@@ -65,12 +65,19 @@
6565
"RESET_SEARCH": "Reset search"
6666
}
6767
},
68-
"MODAL" : {
68+
"MODAL": {
6969
"CLOSE": "Close modal"
7070
},
71-
"OVERFLOW_MENU" : {
71+
"OVERFLOW_MENU": {
7272
"OVERFLOW": "Overflow"
7373
},
74+
"PAGINATION": {
75+
"ITEMS_PER_PAGE": "Items per page:",
76+
"OPEN_LIST_OF_OPTIONS": "Open list of options",
77+
"ITEMS_INDICES": "{{startItemIndex}}-{{endItemIndex}} of {{totalDataLength}} items",
78+
"BACKWARD": "Backward",
79+
"FORWARD": "Forward"
80+
},
7481
"SIDENAV": {
7582
"NAV_LABEL": "Side navigation"
7683
},
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export class PaginationModel {
2+
/**
3+
* Tracks the current page.
4+
*
5+
* @type {number}
6+
* @memberof PaginationModel
7+
*/
8+
currentPage: number;
9+
10+
/**
11+
* Length of page.
12+
*
13+
* @type {number}
14+
* @memberof PaginationModel
15+
*/
16+
pageLength: number;
17+
18+
/**
19+
* Absolute total number of items needed to paginate.
20+
*
21+
* @private
22+
* @type {number}
23+
* @memberof PaginationModel
24+
*/
25+
totalDataLength: number;
26+
}

0 commit comments

Comments
 (0)