@burh/nuxt-core 1.0.159 → 1.0.161
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.
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<sign-out-item @logout="$emit('logout')" />
|
|
26
|
-
</base-dropdown>
|
|
2
|
+
<base-dropdown menu-on-right class="nav-item" tag="li" title-tag="a">
|
|
3
|
+
<business-avatar
|
|
4
|
+
:logo="userAvatar"
|
|
5
|
+
:userName="userName"
|
|
6
|
+
:companyName="companyName"
|
|
7
|
+
class="nav-link pr-0 pt-2 pb-2"
|
|
8
|
+
:class="textColor"
|
|
9
|
+
@click.prevent
|
|
10
|
+
slot="title-container"
|
|
11
|
+
/>
|
|
12
|
+
<h6 class="dropdown-header">
|
|
13
|
+
{{ isSindipecas ? 'Opções' : 'Entrar como' }}
|
|
14
|
+
</h6>
|
|
15
|
+
<slot name="companies"></slot>
|
|
16
|
+
<dropdown-section
|
|
17
|
+
v-for="(value, name) in text"
|
|
18
|
+
:key="name"
|
|
19
|
+
:title="name"
|
|
20
|
+
:items="value"
|
|
21
|
+
/>
|
|
22
|
+
<hr class="dropdown-divider" />
|
|
23
|
+
<sign-out-item @logout="$emit('logout')" />
|
|
24
|
+
</base-dropdown>
|
|
27
25
|
</template>
|
|
28
26
|
<script>
|
|
29
27
|
import DropdownSection from './DropdownSection';
|
|
@@ -32,33 +30,34 @@ import AvatarLink from '../Avatar/AvatarLink';
|
|
|
32
30
|
import BusinessAvatar from '../Avatar/BusinessAvatar';
|
|
33
31
|
|
|
34
32
|
export default {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
33
|
+
name: 'user-menu-dropdown',
|
|
34
|
+
components: {
|
|
35
|
+
DropdownSection,
|
|
36
|
+
SignOutItem,
|
|
37
|
+
AvatarLink,
|
|
38
|
+
BusinessAvatar
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
text: Object,
|
|
42
|
+
userAvatar: String,
|
|
43
|
+
userName: String,
|
|
44
|
+
companyLogo: String,
|
|
45
|
+
companyName: String,
|
|
46
|
+
textColor: String,
|
|
47
|
+
companies: Array,
|
|
48
|
+
isSindipecas: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
handleCompanyClick(company) {}
|
|
55
|
+
},
|
|
56
|
+
data() {
|
|
57
|
+
return {
|
|
58
|
+
console: console
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
61
|
};
|
|
62
62
|
</script>
|
|
63
|
-
<style lang="scss" scoped>
|
|
64
|
-
</style>
|
|
63
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,133 +1,61 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<client-only>
|
|
3
|
+
<text-editor
|
|
4
|
+
ref="editor"
|
|
5
|
+
v-model="value"
|
|
6
|
+
:config="editorConfig"
|
|
7
|
+
/>
|
|
8
|
+
</client-only>
|
|
6
9
|
</template>
|
|
10
|
+
|
|
7
11
|
<script>
|
|
8
|
-
import 'quill/dist/quill.core.css'
|
|
9
|
-
import 'quill/dist/quill.snow.css'
|
|
10
|
-
import 'quill/dist/quill.bubble.css'
|
|
11
12
|
export default {
|
|
12
|
-
|
|
13
|
+
name: 'html-editor',
|
|
14
|
+
components: {
|
|
15
|
+
'text-editor': () => { if (process.client) { return import('@blowstack/ckeditor-nuxt') } }
|
|
16
|
+
},
|
|
13
17
|
props: {
|
|
14
18
|
value: {
|
|
15
19
|
type: String,
|
|
16
|
-
default:
|
|
17
|
-
},
|
|
18
|
-
name: String,
|
|
19
|
-
configTools: {
|
|
20
|
-
type: Array,
|
|
21
|
-
default: () => null
|
|
20
|
+
default: ''
|
|
22
21
|
}
|
|
23
22
|
},
|
|
23
|
+
mounted() {
|
|
24
|
+
import('@ckeditor/ckeditor5-build-classic/build/translations/pt-br')
|
|
25
|
+
},
|
|
24
26
|
data() {
|
|
25
27
|
return {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//[{ 'font': [] }],
|
|
40
|
-
//[{ 'color': [] }, { 'background': [] }],
|
|
41
|
-
|
|
42
|
-
[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
43
|
-
//[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
44
|
-
|
|
45
|
-
//[{ 'align': '' }, {'align': 'center'}, {'align': 'justify'}, {'align': 'right'}],
|
|
46
|
-
|
|
47
|
-
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
48
|
-
|
|
49
|
-
[ 'link', 'image' ], // add's image support
|
|
50
|
-
|
|
51
|
-
//['blockquote', 'code-block'],
|
|
52
|
-
|
|
53
|
-
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
|
54
|
-
//[{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
|
|
55
|
-
[{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
|
|
56
|
-
//[{ 'direction': 'rtl' }], // text direction
|
|
57
|
-
|
|
58
|
-
['clean']
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
if (this.value) {
|
|
64
|
-
if (this.value.length > 0) {
|
|
65
|
-
this.editor.pasteHTML(this.value);
|
|
66
|
-
}
|
|
28
|
+
editorConfig: {
|
|
29
|
+
language: 'pt-br',
|
|
30
|
+
removePlugins: [
|
|
31
|
+
'Title',
|
|
32
|
+
'FontBackgroundColor',
|
|
33
|
+
'FontColor',
|
|
34
|
+
'FontFamily',
|
|
35
|
+
'FontSize',
|
|
36
|
+
'Subscript',
|
|
37
|
+
'Superscript',
|
|
38
|
+
'BlockQuote',
|
|
39
|
+
'PageBreak'
|
|
40
|
+
]
|
|
67
41
|
}
|
|
68
|
-
|
|
69
|
-
let editorRef = this.$refs.editor;
|
|
70
|
-
let node = editorRef.children[0];
|
|
71
|
-
this.editor.on("text-change", () => {
|
|
72
|
-
let html = node.innerHTML;
|
|
73
|
-
if (html === "<p><br></p>") {
|
|
74
|
-
html = "";
|
|
75
|
-
}
|
|
76
|
-
this.content = html;
|
|
77
|
-
this.$emit("input", this.content);
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
pasteHTML() {
|
|
81
|
-
if (!this.editor) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
this.editor.pasteHTML(this.value);
|
|
85
|
-
},
|
|
86
|
-
randomString() {
|
|
87
|
-
let text = "";
|
|
88
|
-
let possible =
|
|
89
|
-
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
90
|
-
|
|
91
|
-
for (let i = 0; i < 5; i++)
|
|
92
|
-
text += possible.charAt(
|
|
93
|
-
Math.floor(Math.random() * possible.length)
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
return text;
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
async mounted() {
|
|
100
|
-
let Quill = await import("quill");
|
|
101
|
-
Quill = Quill.default || Quill;
|
|
102
|
-
this.editorId = this.randomString();
|
|
103
|
-
this.toolbarId = this.randomString();
|
|
104
|
-
this.$nextTick(() => {
|
|
105
|
-
this.initialize(Quill);
|
|
106
|
-
});
|
|
42
|
+
}
|
|
107
43
|
},
|
|
108
44
|
watch: {
|
|
109
|
-
value(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
},
|
|
45
|
+
value() {
|
|
46
|
+
this.$emit("input", this.value)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
115
49
|
};
|
|
116
50
|
</script>
|
|
51
|
+
|
|
117
52
|
<style lang="scss">
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
.
|
|
122
|
-
|
|
123
|
-
|
|
53
|
+
.ck-editor {
|
|
54
|
+
margin-bottom: 20px!important;
|
|
55
|
+
}
|
|
56
|
+
.ck-content {
|
|
57
|
+
min-height: 200px;
|
|
58
|
+
max-height: 500px;
|
|
59
|
+
overflow-y: auto;
|
|
124
60
|
}
|
|
125
|
-
margin-bottom: 1.5rem;
|
|
126
|
-
resize: vertical;
|
|
127
|
-
overflow-y: scroll;
|
|
128
|
-
font-family: Poppins, Open Sans, sans-serif;
|
|
129
|
-
}
|
|
130
|
-
.ql-container.ql-snow {
|
|
131
|
-
border: 0;
|
|
132
|
-
}
|
|
133
61
|
</style>
|
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
<base-nav
|
|
3
|
+
container-classes="container-fluid container-fluid--bu"
|
|
4
|
+
class="border-bottom navbar-animated navbar-horizontal"
|
|
5
|
+
expand="lg"
|
|
6
|
+
type="white"
|
|
7
|
+
>
|
|
8
|
+
<div style="display: flex; " slot="brand">
|
|
9
|
+
<avatar-link
|
|
10
|
+
:logo="brand"
|
|
11
|
+
:name="brandName"
|
|
12
|
+
class="row pl-4 nav-link cursor-pointer"
|
|
13
|
+
@avatar-click="redirectIndex"
|
|
14
|
+
/>
|
|
15
|
+
<slot name="brand-center" />
|
|
16
|
+
</div>
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
<a
|
|
19
|
+
v-if="currentUser && !disabledLinks"
|
|
20
|
+
:href="urlBackToBusiness"
|
|
21
|
+
class="btn btn-link"
|
|
22
|
+
>
|
|
23
|
+
Voltar para o Burh
|
|
24
|
+
</a>
|
|
25
|
+
<user-menu-dropdown
|
|
26
|
+
v-else
|
|
27
|
+
:companyName="'Sindipeças'"
|
|
28
|
+
:userName="brandName"
|
|
29
|
+
:isSindipecas="true"
|
|
30
|
+
@logout="$emit('logout')"
|
|
31
|
+
/>
|
|
32
|
+
</base-nav>
|
|
22
33
|
</template>
|
|
23
34
|
<script>
|
|
24
35
|
import BaseNav from '@burh/nuxt-core/components/burh-ds/Navbar/BaseNav.vue';
|
|
@@ -27,45 +38,44 @@ import AppLinkArea from '@burh/nuxt-core/components/burh-ds/Dropdown/AppLinkArea
|
|
|
27
38
|
import AvatarLink from '@burh/nuxt-core/components/burh-ds/Avatar/AvatarLink.vue';
|
|
28
39
|
|
|
29
40
|
export default {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
components: {
|
|
42
|
+
BaseNav,
|
|
43
|
+
UserMenuDropdown,
|
|
44
|
+
AppLinkArea,
|
|
45
|
+
AvatarLink
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
currentUser: Object,
|
|
49
|
+
currentCompany: Object,
|
|
50
|
+
userMenuText: Object,
|
|
51
|
+
brand: String,
|
|
52
|
+
brandName: String,
|
|
53
|
+
showableProducts: Object,
|
|
54
|
+
activeProducts: Array,
|
|
55
|
+
gridApps: Array,
|
|
56
|
+
disabledLinks: Boolean
|
|
57
|
+
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
console: console,
|
|
61
|
+
indexRoute: String,
|
|
51
62
|
urlBackToBusiness: process.env.oldBusinessUrl
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
handleAvatarClick(company) {
|
|
67
|
+
this.$emit('company-click', company);
|
|
68
|
+
},
|
|
69
|
+
redirectIndex() {
|
|
70
|
+
if (!this.disabledLinks) this.$router.push(this.indexRoute);
|
|
71
|
+
},
|
|
72
|
+
getCurrentApp() {
|
|
73
|
+
this.indexRoute = `/${this.$route.path.split('/')[1]}`;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
mounted() {
|
|
77
|
+
this.getCurrentApp();
|
|
78
|
+
}
|
|
69
79
|
};
|
|
70
80
|
</script>
|
|
71
81
|
<style lang="scss">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burh/nuxt-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.161",
|
|
4
4
|
"description": "Design System and Components.",
|
|
5
5
|
"author": "Burh",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@babel/core": "^7.4.5",
|
|
17
|
+
"@blowstack/ckeditor-nuxt": "^0.6.0",
|
|
17
18
|
"@chenfengyuan/vue-qrcode": "^1.0.1",
|
|
19
|
+
"@ckeditor/ckeditor5-build-classic": "^27.0.0",
|
|
18
20
|
"@fortawesome/fontawesome-svg-core": "^1.2.22",
|
|
19
21
|
"@fortawesome/free-brands-svg-icons": "^5.10.2",
|
|
20
22
|
"@fortawesome/free-regular-svg-icons": "^5.10.2",
|