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
12 changes: 9 additions & 3 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ export default {
src: 'src/styles/*',
dest: 'lib/styles',
// Replace all imports for scss files which will be used as theming files
transform: (content) => content.toString().replace(/~@\/assets\//g, '../assets/')
}
transform: (content) => {
return content.toString()
.replace(/~@\/assets\//g, '../assets/')
// Add scss styles from element-ui
.replace('../../node_modules/element-ui/packages/theme-chalk/src/index', './element-ui/index')
}
},
{ src: 'node_modules/element-ui/packages/theme-chalk/src/*', dest: 'lib/styles/element-ui' }
]
}),
typescript({
Expand All @@ -58,7 +64,7 @@ export default {
resolve(),
terser(),
del({
targets: ['lib/styles/index.d.ts', 'lib/plugins/'],
targets: ['lib/styles/index.d.ts'],
hook: 'writeBundle'
})
]
Expand Down
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.2.3",
"version": "0.2.4",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu-private/"
Expand Down
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
STooltip
} from './components'
import { Components } from './types/components'
import { Message, MessageBox, Notification } from './plugins/elementUI'

const elements = [
{ component: SApp, name: Components.SApp },
Expand Down Expand Up @@ -73,7 +74,10 @@ if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(SoramitsuElements, {})
}

/* export {
export {
Message,
MessageBox,
Notification,
SApp,
SAside,
SButton,
Expand Down Expand Up @@ -102,5 +106,5 @@ if (typeof window !== 'undefined' && window.Vue) {
SScrollSections,
SSubmenu,
STooltip
} */
}
export default SoramitsuElements
13 changes: 9 additions & 4 deletions src/plugins/elementUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
MenuItem,
MenuItemGroup,
Message,
MessageBox,
MessageBox as MsgBox,
Notification,
Option,
Pagination,
Expand Down Expand Up @@ -85,13 +85,18 @@ Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Loading.directive)
Vue.use(Checkbox)
const MsgBox = MessageBox
const MessageBox = MsgBox
MsgBox.setDefaults({
cancelButtonText: 'Cancel',
confirmButtonText: 'OK'
})
Vue.prototype.$prompt = MsgBox.prompt
Vue.prototype.$alert = MsgBox.alert
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$message = Message
Vue.prototype.$notify = Notification
// locale.use(lang) // TODO: it will be used later
export {
MessageBox,
Message,
Notification
}