@burh/nuxt-core 1.0.28 → 1.0.30

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.
@@ -17,7 +17,7 @@
17
17
  }
18
18
  ]"></i>
19
19
 
20
- <base-button role="button" @click="$emit('btn-first-click')" size="sm" :type="firstButtonType"
20
+ <base-button v-if="firstButtonText" role="button" @click="$emit('btn-first-click')" size="sm" :type="firstButtonType"
21
21
  class="ml-2">{{firstButtonText}}</base-button>
22
22
  </div>
23
23
 
@@ -45,10 +45,7 @@ export default {
45
45
  type: String,
46
46
  default: 'primary'
47
47
  },
48
- firstButtonText: {
49
- type: String,
50
- default: 'Enviar Teste'
51
- },
48
+ firstButtonText: String,
52
49
  },
53
50
  };
54
51
  </script>
@@ -1,14 +1,29 @@
1
1
  <template>
2
2
  <div class="row">
3
- <base-input
4
- class="col-5"
5
- type="text"
6
- :label="firstInput.label"/>
7
- <base-input
8
- class="col-6"
9
- type="text"
10
- :label="secondInput.label"/>
11
- <span class="col-1 pt-4 mt-3" @click="icon.event">
3
+
4
+ <validation-provider tag="div" class="col-5" :vid="`first-input-${id}`"
5
+ :name="firstInput.label" :rules="firstInput.rules" v-slot="{ errors }">
6
+ <base-input
7
+ type="text"
8
+ v-model="firstField"
9
+ v-on:input="$emit('first-input', $event);"
10
+ :error="errors[0]"
11
+ :valid="errors.length ? true : false"
12
+ :label="firstInput.label"/>
13
+ </validation-provider>
14
+
15
+ <validation-provider tag="div" class="col-6" :vid="`second-input-${id}`"
16
+ :name="secondInput.label" :rules="secondInput.rules" v-slot="{ errors }">
17
+ <base-input
18
+ type="text"
19
+ v-model="secondField"
20
+ v-on:input="$emit('second-input', $event);"
21
+ :error="errors[0]"
22
+ :valid="errors.length ? true : false"
23
+ :label="secondInput.label"/>
24
+ </validation-provider>
25
+
26
+ <span class="col-1 pt-4 mt-3 cursor-pointer" @click="$emit(icon.event)">
12
27
  <font-awesome-icon :icon="icon.type" :aria-label="'Icone de funcionalidade'" />
13
28
  </span>
14
29
  </div>
@@ -16,11 +31,17 @@
16
31
 
17
32
  <script>
18
33
  export default {
34
+ name: 'double-input-with-icon',
19
35
  props: {
36
+ id: {
37
+ type: String | Number,
38
+ default: 0
39
+ },
20
40
  firstInput: {
21
41
  type: Object,
22
42
  default: () => ({
23
43
  label: 'Nome',
44
+ rules: { required: true }
24
45
  }),
25
46
  description: 'properties of first input in format JSON'
26
47
  },
@@ -28,6 +49,10 @@ export default {
28
49
  type: Object,
29
50
  default: () => ({
30
51
  label: 'Email',
52
+ rules: {
53
+ required: true,
54
+ email: true
55
+ }
31
56
  }),
32
57
  description: 'properties of second input in format JSON'
33
58
  },
@@ -39,7 +64,13 @@ export default {
39
64
  }),
40
65
  description: 'properties of icon in format JSON'
41
66
  }
42
- }
67
+ },
68
+ data() {
69
+ return {
70
+ firstField: '',
71
+ secondField: ''
72
+ }
73
+ },
43
74
  }
44
75
  </script>
45
76
 
@@ -7,7 +7,7 @@
7
7
  <font-awesome-icon :icon="icon" :aria-label="iconAria" />
8
8
  </span>
9
9
  <div class="d-inline-block">
10
- <component :is="titleTag" class="text-muted h5">{{title}}</component>
10
+ <component :is="titleTag" class="text-muted">{{title}}</component>
11
11
  <p>{{subtitle}}</p>
12
12
  </div>
13
13
  </div>
@@ -15,14 +15,15 @@
15
15
 
16
16
  <script>
17
17
  export default {
18
+ name: 'label-context-icon',
18
19
  props: {
19
20
  icon: {
20
21
  type: Array,
21
22
  default: () => ['fas', 'paper-plane']
22
23
  },
23
24
  iconClass: {
24
- type: Array,
25
- default: () => []
25
+ type: String,
26
+ default: ''
26
27
  },
27
28
  iconAria: {
28
29
  type: String,
@@ -34,13 +35,16 @@ export default {
34
35
  },
35
36
  titleTag: {
36
37
  type: String,
37
- default: 'h3',
38
+ default: 'h5',
38
39
  },
39
40
  subtitle: {
40
41
  type: String,
41
42
  default: 'Subtitulo',
42
43
  },
43
- iconSize: String
44
+ iconSize: {
45
+ type: String,
46
+ default: '',
47
+ },
44
48
  }
45
49
  }
46
50
  </script>
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <modal :show.sync="openModal" v-on:close="closeModal()" class="modal modal-docs">
3
+ <template slot="header">
4
+ <div class="d-flex mx-auto flex-column">
5
+ <i class="display-1 fas fa-file mx-auto primary"></i>
6
+ <h2 class="display-4 mx-auto">Documentos</h2>
7
+ </div>
8
+ </template>
9
+
10
+ <ul class="list-group list-group-flush" data-toggle="checklist">
11
+ <li class="list-group-item px-0"
12
+ v-for="item in modalData.envelopeDocuments.slice((currentPage-1)*pageSize,currentPage*pageSize)"
13
+ :key="item.id"
14
+ >
15
+ <div class="checklist-item checklist-item-info">
16
+ <div class="checklist-info">
17
+ <h5 class="checklist-title mb-0">{{item.name}}</h5>
18
+ </div>
19
+ <div>
20
+ <el-checkbox-group v-model="checkList">
21
+ <el-checkbox
22
+ class="my-auto"
23
+ :type="'info'"
24
+ :label="item.documentId"
25
+ v-on:change="onSelectionChange(item)"
26
+ >
27
+ </el-checkbox>
28
+ </el-checkbox-group>
29
+ </div>
30
+ </div>
31
+ </li>
32
+ </ul>
33
+ <div class="card-footer py-4 d-flex">
34
+ <base-pagination class="mx-auto" v-model="currentPage" :perPage="3" :total=modalData.envelopeDocuments.length></base-pagination>
35
+ </div>
36
+ <template slot="footer">
37
+ <base-button size="sm" class="mr-auto" outline type="primary" @click="$emit('close-modal')">Fechar</base-button>
38
+ <base-button size="sm" @click="$emit('download-doc', modalData, downloadItems)" type="primary">Download</base-button>
39
+ </template>
40
+
41
+ </modal>
42
+ </template>
43
+ <script>
44
+ import swal from 'sweetalert2';
45
+ import { mask } from 'vue-the-mask';
46
+ import { Checkbox, CheckboxGroup } from 'element-ui'
47
+ export default {
48
+ name: 'docs-modal',
49
+ directives: { mask },
50
+ components: {
51
+ [Checkbox.name]: Checkbox,
52
+ [CheckboxGroup.name]: CheckboxGroup,
53
+ },
54
+ data(){
55
+ return{
56
+ filtrarPorTexto: '',
57
+ currentPage: 1,
58
+ pageSize: 3,
59
+ downloadItems: [],
60
+ checkList: []
61
+ }
62
+ },
63
+ props:{
64
+ modalData: null,
65
+ show: false,
66
+ },
67
+ model:{
68
+ prop: 'show'
69
+ },
70
+ computed:{
71
+ openModal:{
72
+ get(){return this.show;},
73
+ set(show){this.$emit('input', show);}
74
+ }
75
+ },
76
+ methods:{
77
+ onSelectionChange(selectedItem){
78
+ if(this.downloadItems.length != 0){
79
+ this.downloadItems.filter((item, index)=>{
80
+ if(item.documentId === selectedItem.documentId){
81
+ this.downloadItems.splice(index, 1)
82
+ }else if(index === this.downloadItems.length - 1){
83
+ this.downloadItems.push(selectedItem)
84
+ }
85
+ })
86
+ }else{
87
+ this.downloadItems.push(selectedItem)
88
+ }
89
+
90
+ },
91
+ closeModal(){
92
+ this.downloadItems = []
93
+ this.checkList = []
94
+ this.$emit('close-modal')
95
+ }
96
+ }
97
+ }
98
+ </script>
99
+ <style lang="scss">
100
+ .modal-docs{
101
+ .modal-header .close {
102
+ padding: 1.25rem;
103
+ margin: -1rem -1rem -1rem !important;
104
+ }
105
+ .modal-footer{
106
+ padding-top: 0 !important
107
+ }
108
+ .el-checkbox__label{
109
+ display: none !important;
110
+ }
111
+ }
112
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {