Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@soramitsu/soramitsu-js-ui",
"version": "0.9.5",
"version": "0.9.6",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu/"
Expand Down
16 changes: 7 additions & 9 deletions src/components/Pagination/SPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

<script lang="ts">
import { Component, Mixins, Prop, Ref, Watch } from 'vue-property-decorator'
import { ElPagination } from 'element-ui/types/pagination'
import cloneDeep from 'lodash/fp/cloneDeep'

import BorderRadiusMixin from '../../mixins/BorderRadiusMixin'

Expand Down Expand Up @@ -154,11 +152,13 @@ export default class SPagination extends Mixins(BorderRadiusMixin) {
this.totalItem.textContent = `${this.totalText} ${this.total}`
}
}
if (this.sizesItem && !this.sizesLabelItem) {
const itemsPerPageText = document.createElement('span')
itemsPerPageText.textContent = this.perPageText
itemsPerPageText.classList.add('per-page-text')
this.pagination.$el.insertBefore(itemsPerPageText, this.sizesItem)
if (this.sizesItem) {
if (!this.sizesLabelItem) {
this.sizesLabelItem = document.createElement('span')
this.sizesLabelItem.classList.add('per-page-text')
this.pagination.$el.insertBefore(this.sizesLabelItem, this.sizesItem)
}
this.sizesLabelItem.textContent = this.perPageText
}
}

Expand Down Expand Up @@ -218,8 +218,6 @@ export default class SPagination extends Mixins(BorderRadiusMixin) {
mounted (): void {
this.initPaginationItems()
this.renderPaginationItems()
this.sizesLabelItem = (Array.from(this.pagination.$el.childNodes) as Array<any>)
.find(item => item.className === 'per-page-text')
}

updated (): void {
Expand Down
8 changes: 8 additions & 0 deletions src/stories/SPagination.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const configurable = () => ({
:popper-class="borderRadius"
:prev-text="prevText"
:next-text="nextText"
:per-page-text="perPageText"
:total-text="totalText"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@prev-click="handlePrevClick"
Expand Down Expand Up @@ -53,6 +55,12 @@ export const configurable = () => ({
},
nextText: {
default: text('Next text', '')
},
perPageText: {
default: text('Per page text', '')
},
totalText: {
default: text('Total text', '')
}
},
methods: {
Expand Down
7 changes: 6 additions & 1 deletion src/styles/json-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ $footer-height: 26px;
width: $footer-height;
bottom: 0;
right: 0;
cursor: pointer;
cursor: ns-resize;
}
// TODO: think about hover and focus
}

.jsoneditor {
border: none !important;
font-family: $s-font-family-mono;
.jsoneditor-outer {
height: calc(100% - #{$footer-height});
margin-bottom: -1px !important;
padding-bottom: 1px !important;
}
.ace-jsoneditor {
*, textarea.jsoneditor-text * {
font-family: $s-font-family-mono;
Expand Down