@burh/nuxt-core 1.0.21 → 1.0.23

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.
Files changed (42) hide show
  1. package/assets/css/variables.css +3 -0
  2. package/assets/sass/argon-panna.scss +106 -0
  3. package/assets/sass/argon-test-online.scss +106 -0
  4. package/assets/sass/burh-ds/_variables.scss +1 -0
  5. package/assets/sass/burh-ds/organisms/_cards.scss +36 -4
  6. package/assets/sass/burh-ds/variables/_colors-panna.scss +303 -0
  7. package/assets/sass/burh-ds/variables/_colors-test-online.scss +303 -0
  8. package/assets/sass/burh-ds/variables/_colors.scss +0 -1
  9. package/assets/sass/custom/_variables.scss +1 -0
  10. package/components/argon-core/BaseDropdown.vue +1 -1
  11. package/components/argon-core/Modal.vue +1 -1
  12. package/components/burh-ds/Avatar/AvatarLink.vue +24 -18
  13. package/components/burh-ds/Button/ExportButton.vue +3 -8
  14. package/components/burh-ds/Cards/TestCard.vue +181 -0
  15. package/components/burh-ds/Cards/WelcomeCard.vue +48 -42
  16. package/components/burh-ds/Dropdown/AppLinkArea.vue +125 -39
  17. package/components/burh-ds/Dropdown/DropdownItem.vue +21 -16
  18. package/components/burh-ds/Dropdown/DropdownSection.vue +26 -26
  19. package/components/burh-ds/Dropdown/FaqVideoArea.vue +79 -65
  20. package/components/burh-ds/Dropdown/SignOutItem.vue +6 -6
  21. package/components/burh-ds/Dropdown/UserMenuDropdown.vue +54 -48
  22. package/components/burh-ds/Groups/SimpleProductItem.vue +26 -11
  23. package/components/burh-ds/Headings/AppHeader.vue +46 -47
  24. package/components/burh-ds/Headings/StepHeader.vue +95 -51
  25. package/components/burh-ds/Link/DefaultLink.vue +31 -0
  26. package/components/burh-ds/Lists/ListNavLinks.vue +47 -34
  27. package/components/burh-ds/Modals/AppConfigModal.vue +158 -156
  28. package/components/burh-ds/Modals/SendTest.vue +170 -0
  29. package/components/burh-ds/Modals/VideoModal.vue +15 -5
  30. package/components/burh-ds/Navbar/BaseNav.vue +2 -2
  31. package/components/burh-ds/Pagination/NamedPagination.vue +179 -0
  32. package/components/burh-ds/Questions/Question.vue +76 -36
  33. package/components/burh-ds/Questions/QuestionAttach.vue +1 -1
  34. package/components/burh-ds/Questions/QuestionRadio.vue +79 -73
  35. package/components/burh-ds/Questions/QuestionRadioItem.vue +25 -18
  36. package/components/burh-ds/Questions/QuestionText.vue +53 -22
  37. package/components/burh-ds/Tabs/TesteTab.vue +100 -0
  38. package/components/layouts/burh-ds/navbar/AppNavbar.vue +73 -35
  39. package/components/layouts/burh-ds/navbar/BusinessGlobalNavbar.vue +385 -242
  40. package/package.json +2 -2
  41. package/components/burh-ds/Cards/RecentTestCard.vue +0 -51
  42. package/data/ListNavLinksMock.json +0 -113
@@ -1,58 +1,64 @@
1
1
  <template>
2
- <base-dropdown menu-on-right
3
- class="nav-item"
4
- tag="li"
5
- title-tag="a"
6
- >
7
- <business-avatar
8
- :logo="userAvatar"
9
- :userName="userName"
10
- :companyName="companyName"
11
- class="nav-link pr-0 pt-2 pb-2"
12
- :class="textColor"
13
- @click.prevent
14
- slot="title-container"
15
- />
16
- <h6 class="dropdown-header">Entrar como</h6>
17
- <avatar-link
18
- :logo="userAvatar"
19
- :name="userName"
20
- class="row pl-4"
21
- />
22
- <dropdown-section
23
- v-for="(value, name) in text"
24
- :key="name"
25
- :title="name"
26
- :items="value"
27
- />
28
- <hr class="dropdown-divider">
29
- <sign-out-item />
30
- </base-dropdown>
2
+ <base-dropdown menu-on-right
3
+ class="nav-item"
4
+ tag="li"
5
+ title-tag="a"
6
+ >
7
+ <business-avatar
8
+ :logo="userAvatar"
9
+ :userName="userName"
10
+ :companyName="companyName"
11
+ class="nav-link pr-0 pt-2 pb-2"
12
+ :class="textColor"
13
+ @click.prevent
14
+ slot="title-container"
15
+ />
16
+ <h6 class="dropdown-header">Entrar como</h6>
17
+ <slot name="companies"></slot>
18
+ <dropdown-section
19
+ v-for="(value, name) in text"
20
+ :key="name"
21
+ :title="name"
22
+ :items="value"
23
+ />
24
+ <hr class="dropdown-divider">
25
+ <sign-out-item @logout="$emit('logout')" />
26
+ </base-dropdown>
31
27
  </template>
32
28
  <script>
33
- import DropdownSection from "./DropdownSection";
34
- import SignOutItem from "./SignOutItem";
29
+ import DropdownSection from './DropdownSection';
30
+ import SignOutItem from './SignOutItem';
35
31
  import AvatarLink from '../Avatar/AvatarLink';
36
32
  import BusinessAvatar from '../Avatar/BusinessAvatar';
37
33
 
38
34
  export default {
39
- name: "user-menu-dropdown",
40
- components: {
41
- DropdownSection,
42
- SignOutItem,
43
- AvatarLink,
44
- BusinessAvatar
45
- },
46
- props: {
47
- text: Object,
48
- userAvatar: String,
49
- userName: String,
50
- companyLogo: String,
51
- companyName: String,
52
- textColor: String
53
- }
54
- }
35
+ name: 'user-menu-dropdown',
36
+ components: {
37
+ DropdownSection,
38
+ SignOutItem,
39
+ AvatarLink,
40
+ BusinessAvatar
41
+ },
42
+ props: {
43
+ text: Object,
44
+ userAvatar: String,
45
+ userName: String,
46
+ companyLogo: String,
47
+ companyName: String,
48
+ textColor: String,
49
+ companies: Array
50
+ },
51
+ methods: {
52
+ handleCompanyClick(company) {
53
+ console.log(company.name);
54
+ }
55
+ },
56
+ data() {
57
+ return {
58
+ console : console
59
+ };
60
+ }
61
+ };
55
62
  </script>
56
63
  <style lang="scss" scoped>
57
-
58
64
  </style>
@@ -1,17 +1,21 @@
1
1
  <template>
2
- <component :is="tag" :to="to" class="product-item" @click="$emit('click-product')">
2
+ <default-link @click="callVideoTutorial" :link="hasEnableBadge? '/planos' : to" class="product-item" >
3
3
  <img :src="avatar" :class="avatarClass" class="avatar avatar-xl rounded-circle product-item--avatar" :alt="`Logo do Produto ${title}`">
4
4
  <div :class="contentClass" class="product-item--content">
5
5
  <component :is="titleTag" :class="titleClass" class="product-item--title">{{title}}</component>
6
6
  <p :class="descriptionClass" class="product-item--description" v-if="description">{{description}}</p>
7
7
  <badge :class="badgeClass" v-if="hasEnableBadge">Habilitar</badge>
8
8
  </div>
9
- </component >
9
+ </default-link>
10
10
  </template>
11
11
 
12
12
  <script>
13
+ import DefaultLink from '../Link/DefaultLink';
13
14
  export default {
14
15
  name: 'simple-product-item',
16
+ components: {
17
+ DefaultLink
18
+ },
15
19
  props: {
16
20
  tag: {
17
21
  type: String,
@@ -29,12 +33,27 @@ export default {
29
33
  description: String,
30
34
  descriptionClass: String,
31
35
  hasEnableBadge: Boolean,
32
- badgeClass: String,
33
- to: {
34
- type: String,
35
- default: "/"
36
- }
36
+ badgeClass: String,
37
+ to: {
38
+ type: String,
39
+ default: '/'
40
+ },
41
+ indexableName: String
42
+ },
43
+
44
+ mounted() {
45
+ console.log('this.indexableName');
46
+ console.log(this.indexableName);
47
+ },
48
+
49
+ methods: {
50
+ callVideoTutorial() {
51
+ if (this.indexableName == 'VIDEO_CHAMADA') {
52
+ this.$emit('callVideoTutorial');
53
+ }
54
+ }
37
55
  }
56
+
38
57
  };
39
58
  </script>
40
59
 
@@ -43,10 +62,6 @@ export default {
43
62
  .product-item {
44
63
  display: inline-block;
45
64
 
46
- &--avatar {
47
-
48
- }
49
-
50
65
  &--title {
51
66
  text-align: center;
52
67
  }
@@ -1,59 +1,58 @@
1
1
  <template>
2
- <base-header class="app-header" :type="'white'">
3
- <div class="row">
4
- <div class="col-6 my-auto">
5
- <h2 class="font-weight-bold display-3">{{name}}</h2>
6
- </div>
2
+ <base-header class="app-header" :type="'white'">
3
+ <div class="row justify-content-center">
4
+ <div class="col-6 my-auto">
5
+ <h2 class="font-weight-bold display-3">{{name}}</h2>
6
+ </div>
7
7
 
8
- <div class="col-6 d-flex justify-content-end">
9
- <i v-for="(options, index) in icons" :key="index"
10
- @click="$emit(options.event)"
11
- class="display-4 text-default mt-3 mx-3 cursor-pointer" :class="options.icon"></i>
8
+ <div class="col-6 d-flex justify-content-end">
9
+ <i v-for="(options, index) in icons" :key="index"
10
+ @click="$emit(options.event, options)"
11
+ class="display-4 pt-3 px-3" :class="[
12
+ options.icon,
13
+ {
14
+ 'cursor-pointer': !options.disabled,
15
+ 'text-default': !options.disabled,
16
+ 'text-light': options.disabled
17
+ }
18
+ ]"></i>
12
19
 
13
- <base-button role="button" @click="actionButtonHeader()" size="sm" :type="optionsBtnType"
14
- class="ml-2">{{optionsBtnText}}</base-button>
15
- </div>
20
+ <base-button role="button" @click="$emit('btn-first-click')" size="sm" :type="firstButtonType"
21
+ class="ml-2">{{firstButtonText}}</base-button>
22
+ </div>
16
23
 
17
- <div class="col-12 d-flex justify-content-center">
18
- <slot/>
19
- </div>
20
- </div>
21
- </base-header>
24
+ <slot/>
25
+ </div>
26
+ </base-header>
22
27
  </template>
23
28
  <script>
24
29
  export default {
25
- data(){
26
- return{
27
- default: ''
28
- }
29
- },
30
- props:{
31
- icons:{
32
- type: Array,
33
- default: () =>[{event: 'view', icon: 'fas fa-eye'}, {event: 'config', icon: 'fas fa-cog'} ]
34
- },
35
- name: {
36
- type: String,
37
- default: 'Teste de matematica'
38
- },
39
- optionsBtnType:{
40
- type: String,
41
- default: 'test-online'
42
- },
43
- optionsBtnText: {
44
- type: String,
45
- default: 'Enviar Teste'
46
- },
47
- },
48
- methods:{
49
- actionButtonHeader(){
50
- this.$emit('btn-header')
51
- },
52
- },
53
- }
30
+ data(){
31
+ return{
32
+ default: ''
33
+ };
34
+ },
35
+ props:{
36
+ icons:{
37
+ type: Array,
38
+ default: () =>[{ event: 'view', icon: 'fas fa-eye', disabled: false }, { event: 'config', icon: 'fas fa-cog', disabled: false } ]
39
+ },
40
+ name: {
41
+ type: String,
42
+ default: 'Teste de matematica'
43
+ },
44
+ firstButtonType:{
45
+ type: String,
46
+ default: 'primary'
47
+ },
48
+ firstButtonText: {
49
+ type: String,
50
+ default: 'Enviar Teste'
51
+ },
52
+ },
53
+ };
54
54
  </script>
55
55
  <style lang="scss">
56
- @import "node_modules/@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss";
57
56
 
58
57
  .app-header {
59
58
  width: 100%;
@@ -1,67 +1,111 @@
1
1
  <template>
2
- <div class="card card--shadow py-3 px-4">
3
- <base-input
4
- name="Ask"
5
- :label="`Etapa #${position + 1}`"
6
- placeholder="Escreva o nome da etapa"
7
- type="text"
8
- class=""
9
- :error="getError('Ask')"
10
- :valid="isValid('Ask')"
11
- v-model="name"
12
- v-validate="'required'"/>
13
-
14
- <div class="">
15
- <textarea
16
- v-model="description"
17
- class="form-control form-control-alternative"
18
- rows="3"
19
- placeholder="Descrição desta etapa..."/>
20
- </div>
2
+ <div class="card pt-3 px-4" :class="{'pb-5': !hideIcons}">
3
+ <base-input
4
+ name="Ask"
5
+ :label="`Etapa #${position + 1}`"
6
+ placeholder="Escreva o nome da etapa"
7
+ type="text"
8
+ class=""
9
+ :error="getError('Ask')"
10
+ :valid="isValid('Ask')"
11
+ v-on:input="emitStage()"
12
+ v-model="name"
13
+ v-validate="'required'"/>
21
14
 
15
+ <div class="pb-3">
16
+ <textarea
17
+ v-on:input="emitStage()"
18
+ v-model="description"
19
+ class="form-control form-control-alternative"
20
+ rows="3"
21
+ placeholder="Descrição desta etapa..."/>
22
22
  </div>
23
+
24
+ <ul class="step-icons" v-if="!hideIcons">
25
+ <li v-for="(icon, index) in icons"
26
+ :key="`question-icon-${position}-${index}`"
27
+ @click="$emit(icon.event)">
28
+ <font-awesome-icon :icon="icon.icon" class="" />
29
+ </li>
30
+ </ul>
31
+ </div>
23
32
  </template>
24
33
 
25
34
  <script>
26
35
  export default {
27
- props: {
28
- position: {
29
- type: Number,
30
- default: 0
31
- }
36
+ props: {
37
+ hideIcons: {
38
+ type: Boolean,
39
+ default: false
40
+ },
41
+ position: {
42
+ type: Number,
43
+ default: 0
44
+ },
45
+ title: {
46
+ type: String,
47
+ default: ''
48
+ },
49
+ text: {
50
+ type: String,
51
+ default: ''
52
+ },
53
+ icons: {
54
+ type: Array,
55
+ default: () => [
56
+ { event: 'first-icon-click', icon: ['fas', 'trash-alt'] }
57
+ ]
32
58
  },
33
- data() {
34
- return {
35
- name: '',
36
- description: ''
37
- }
59
+ },
60
+ data() {
61
+ return {
62
+ name: this.title,
63
+ description: this.text
64
+ }
65
+ },
66
+ methods: {
67
+ getError(name){
68
+ return this.errors.first(name);
69
+ },
70
+ isValid(name) {
71
+ return this.validated && !this.errors.has(name);
38
72
  },
39
- methods: {
40
- getError(name){
41
- return this.errors.first(name);
42
- },
43
- isValid(name) {
44
- return this.validated && !this.errors.has(name);
45
- },
46
- emitStage() {
47
- this.$emit('change-stage',
48
- {
49
- name: this.name,
50
- description: this.description
51
- })
52
- }
73
+ emitStage() {
74
+ this.$emit('change-stage',
75
+ {
76
+ name: this.name,
77
+ description: this.description
78
+ })
79
+ }
80
+ },
81
+ watch: {
82
+ title(newName) {
83
+ this.name = newName;
53
84
  },
54
- watch: {
55
- name() {
56
- this.emitStage();
57
- },
58
- description() {
59
- this.emitStage();
60
- }
85
+ text(newDescription) {
86
+ this.description = newDescription;
61
87
  }
88
+ }
62
89
  }
63
90
  </script>
64
91
 
65
- <style lang="scss">
92
+ <style lang="scss" scoped>
93
+
94
+ .step-icons {
95
+ position: absolute;
96
+ bottom: 0;
97
+ right: 1rem;
98
+ display: flex;
99
+ justify-content: flex-end;
100
+ align-items: flex-end;
101
+ list-style: none;
102
+
103
+ li {
104
+ padding-top: 1rem;
105
+ padding-left: 1rem;
106
+ padding-right: 1rem;
107
+ cursor: pointer;
108
+ }
109
+ }
66
110
 
67
111
  </style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <nuxt-link @click="$emit('click')" v-if="isNuxtLink" :to="link">
3
+ <slot />
4
+ </nuxt-link>
5
+ <a v-else @click="$emit('click')" :href="link">
6
+ <slot />
7
+ </a>
8
+ </template>
9
+ <script>
10
+ export default {
11
+ name: 'default-link',
12
+ props: {
13
+ link: String,
14
+ },
15
+ computed: {
16
+ isNuxtLink() {
17
+ return (!this.link.includes('://') && this.link !== '#');
18
+ }
19
+ },
20
+
21
+ };
22
+ </script>
23
+ <style lang="scss">
24
+ .col--product-item {
25
+ text-align: center;
26
+ }
27
+
28
+ .product-item {
29
+ text-align: center;
30
+ }
31
+ </style>
@@ -1,41 +1,54 @@
1
1
  <template>
2
- <base-dropdown menu-on-left
3
- v-if="children != ''"
4
- class=""
5
- tag="li"
6
- title-tag="a"
7
- >
8
- <span
9
- href="#"
10
- class="nav-link bolder"
11
- @click.prevent
12
- slot="title-container"
13
- >
14
- {{name}}
15
- </span>
16
- <a
17
- :href=links.link
18
- class="dropdown-item"
19
- v-for="(links, index) in children"
20
- :key="index">{{links.name}}
21
- </a>
22
- </base-dropdown>
23
- <li v-else class="nav-item">
24
- <nuxt-link :to=link class="nav-link bolder">{{name}}</nuxt-link>
25
- </li>
2
+ <base-dropdown menu-on-left
3
+ v-if="children != ''"
4
+ class=""
5
+ tag="li"
6
+ title-tag="a"
7
+ >
8
+ <span
9
+ href="#"
10
+ class="nav-link bolder"
11
+ @click.prevent
12
+ slot="title-container"
13
+ >
14
+ {{name}}
15
+ </span>
16
+ <span
17
+ class="dropdown-item d-flex justify-content-between"
18
+ v-for="(links, index) in children"
19
+ :key="index"
20
+ v-if="links.isVisible"
21
+ >
22
+ <default-link :link="links.link">
23
+ {{links.name}}
24
+ </default-link>
25
+ <nuxt-link v-if="links.hasBadge" to="/planos">
26
+ <badge >Habilitar</badge>
27
+ </nuxt-link>
28
+ </span>
29
+
30
+ </base-dropdown>
31
+ <li v-else class="nav-item">
32
+ <default-link :link="link" class="nav-link bolder">{{name}}</default-link>
33
+ </li>
26
34
  </template>
27
35
  <script>
36
+ import DefaultLink from '../Link/DefaultLink';
37
+
28
38
  export default {
29
- props:{
30
- id: String,
31
- name: String,
32
- link: String,
33
- children: Array
34
- }
35
- }
39
+ props:{
40
+ id: String,
41
+ name: String,
42
+ link: String,
43
+ children: Array,
44
+ },
45
+ components: {
46
+ DefaultLink
47
+ },
48
+ };
36
49
  </script>
37
50
  <style lang="scss" scoped>
38
- .bolder {
39
- font-weight: 600;
40
- }
51
+ .bolder {
52
+ font-weight: 600;
53
+ }
41
54
  </style>