@tak-ps/vue-tabler 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/components/BreadCrumb.vue +14 -2
- package/components/Bytes.vue +1 -1
- package/components/Epoch.vue +1 -1
- package/components/Err.vue +1 -1
- package/components/Input.vue +2 -2
- package/components/Loading.vue +1 -1
- package/components/Markdown.vue +23 -0
- package/components/Modal.vue +1 -1
- package/lib.js +3 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
## Version History
|
|
12
12
|
|
|
13
|
+
### v2.11.0
|
|
14
|
+
|
|
15
|
+
- :tada: Add `TablerMarkdown` component
|
|
16
|
+
|
|
17
|
+
### v2.10.0
|
|
18
|
+
|
|
19
|
+
- :tada: Add Normalize Option to BreadCrumb component
|
|
20
|
+
- :bug: Move `whitespace: pre;` to text area to avoid breaking date inputs
|
|
21
|
+
|
|
13
22
|
### v2.9.0
|
|
14
23
|
|
|
15
24
|
- :bug: Add `white-space: pre;` to text area to retain newline characters
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
}'
|
|
11
11
|
>
|
|
12
12
|
<a v-if='crumb_it === crumbs.length - 1' v-text='crumb'></a>
|
|
13
|
-
<a v-else @click='$router.push("/" + crumbs.splice(0, crumb_it + 1).join("/").toLowerCase())' class='cursor-pointer' v-text='crumb'></a>
|
|
13
|
+
<a v-else-if='normalize' @click='$router.push("/" + crumbs.splice(0, crumb_it + 1).join("/").toLowerCase())' class='cursor-pointer' v-text='crumb'></a>
|
|
14
|
+
<a v-else @click='$router.push("/" + crumbs.splice(0, crumb_it + 1).join("/"))' class='cursor-pointer' v-text='crumb'></a>
|
|
14
15
|
</li>
|
|
15
16
|
</ol>
|
|
16
17
|
</template>
|
|
@@ -18,12 +19,23 @@
|
|
|
18
19
|
<script>
|
|
19
20
|
export default {
|
|
20
21
|
name: 'BreadCrumb',
|
|
22
|
+
props: {
|
|
23
|
+
normalize: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true,
|
|
26
|
+
description: 'Perform Title Casing on URL Components'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
21
29
|
data: function() {
|
|
22
30
|
return {
|
|
23
31
|
crumbs: this.$route.path.split('/').filter((crumb) => {
|
|
24
32
|
return crumb.length;
|
|
25
33
|
}).map((crumb) => {
|
|
26
|
-
|
|
34
|
+
if (this.normalize) {
|
|
35
|
+
return `${crumb[0].toUpperCase()}${crumb.slice(1, crumb.length)}`;
|
|
36
|
+
} else {
|
|
37
|
+
return `${crumb[0]}${crumb.slice(1, crumb.length)}`;
|
|
38
|
+
}
|
|
27
39
|
})
|
|
28
40
|
}
|
|
29
41
|
},
|
package/components/Bytes.vue
CHANGED
package/components/Epoch.vue
CHANGED
package/components/Err.vue
CHANGED
package/components/Input.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div>
|
|
3
3
|
<label v-if='label' class="form-label" v-text='label'></label>
|
|
4
4
|
|
|
5
5
|
<template v-if='!rows || rows <= 1'>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}' class="form-control" :placeholder='label||placeholder||""'/>
|
|
9
9
|
</template>
|
|
10
10
|
<template v-else>
|
|
11
|
-
<textarea :disabled='disabled' :rows='rows' :value='modelValue' @input='event => current = event.target.value' :type='type' :class='{
|
|
11
|
+
<textarea style='white-space: pre;' :disabled='disabled' :rows='rows' :value='modelValue' @input='event => current = event.target.value' :type='type' :class='{
|
|
12
12
|
"is-invalid": error
|
|
13
13
|
}' class="form-control" :placeholder='label||placeholder||""'/>
|
|
14
14
|
</template>
|
package/components/Loading.vue
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-html='html'></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import showdown from 'showdown';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'TablerMarkdown',
|
|
10
|
+
props: {
|
|
11
|
+
markdown: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
computed: {
|
|
17
|
+
html: function() {
|
|
18
|
+
const converter = new showdown.Converter();
|
|
19
|
+
return converter.makeHtml(this.markdown);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
</script>
|
package/components/Modal.vue
CHANGED
package/lib.js
CHANGED
|
@@ -11,11 +11,13 @@ import TablerBytes from './components/Bytes.vue';
|
|
|
11
11
|
import TablerEnum from './components/Enum.vue';
|
|
12
12
|
import TablerEpoch from './components/Epoch.vue';
|
|
13
13
|
import TablerEpochRange from './components/EpochRange.vue';
|
|
14
|
+
import TablerMarkdown from './components/Markdown.vue';
|
|
14
15
|
|
|
15
16
|
export {
|
|
16
17
|
TablerEnum,
|
|
17
18
|
TablerBytes,
|
|
18
19
|
TablerEpoch,
|
|
20
|
+
TablerMarkdown,
|
|
19
21
|
TablerEpochRange,
|
|
20
22
|
TablerBreadCrumb,
|
|
21
23
|
TablerError,
|
|
@@ -25,5 +27,5 @@ export {
|
|
|
25
27
|
TablerProgress,
|
|
26
28
|
TablerToggle,
|
|
27
29
|
TablerInput,
|
|
28
|
-
TablerList
|
|
30
|
+
TablerList,
|
|
29
31
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tak-ps/vue-tabler",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.0",
|
|
5
5
|
"main": "lib.js",
|
|
6
6
|
"module": "lib.js",
|
|
7
7
|
"description": "Tabler UI components for Vue3",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@vue/cli-plugin-babel": "^5.0.8",
|
|
25
25
|
"eslint": "^8.28.0",
|
|
26
26
|
"eslint-plugin-vue": "^9.8.0",
|
|
27
|
+
"showdown": "^2.1.0",
|
|
27
28
|
"vue-tabler-icons": "^2.16.0"
|
|
28
29
|
}
|
|
29
30
|
}
|