vue-intergrall-plugins 0.0.502 → 0.0.504

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,20 +1,26 @@
1
-
2
1
  <template>
3
2
  <transition name="fade">
4
- <div class="btn-rolagem" :class="{'higher' : classeCustomizada}" v-show="visibilidade" @click="rolar()">
3
+ <div
4
+ class="btn-rolagem"
5
+ :class="{ higher: classeCustomizada }"
6
+ v-show="visibilidade"
7
+ @click="rolar()"
8
+ >
5
9
  <div class="sinalizar-msg-nova" :title="tituloSinalizador" v-show="sinalizar"></div>
6
10
  <fa-icon :icon="['fas', 'arrow-circle-down']" />
7
11
  </div>
8
- </transition>
12
+ </transition>
9
13
  </template>
10
14
 
11
15
  <style scoped>
12
- .fade-enter-active, .fade-leave-active {
13
- transition: opacity .3s;
14
- }
15
- .fade-enter, .fade-leave-to {
16
- opacity: 0;
17
- }
16
+ .fade-enter-active,
17
+ .fade-leave-active {
18
+ transition: opacity 0.3s;
19
+ }
20
+ .fade-enter,
21
+ .fade-leave-to {
22
+ opacity: 0;
23
+ }
18
24
  </style>
19
25
 
20
26
  <script>
@@ -22,88 +28,98 @@ export default {
22
28
  props: {
23
29
  identificador: {
24
30
  type: String,
25
- required: true
31
+ required: true,
26
32
  },
27
33
  containerSelector: {
28
34
  type: String,
29
- required: true
35
+ required: true,
30
36
  },
31
37
  classeCustomizada: {
32
38
  type: Boolean,
33
- required: false
39
+ required: false,
34
40
  },
35
41
  sinalizar: {
36
42
  type: Boolean,
37
- required: false
43
+ required: false,
38
44
  },
39
45
  tituloSinalizador: {
40
46
  type: String,
41
- required: false
47
+ required: false,
42
48
  },
43
49
  rolarParaMsg: {
44
50
  type: Boolean,
45
- required: false
51
+ required: false,
46
52
  },
47
53
  callbackFn: {
48
54
  type: Function,
49
- required: false
50
- }
55
+ required: false,
56
+ },
51
57
  },
52
58
  created() {
53
- this.$root.$refs[`rc-${this.identificador}`] = this
59
+ this.$root.$refs[`rc-${this.identificador}`] = this;
54
60
  },
55
61
  data() {
56
62
  return {
57
63
  visibilidade: false,
58
- container: ""
59
- }
64
+ container: "",
65
+ };
60
66
  },
61
67
  methods: {
62
- getContainer(){
63
- this.container = document.querySelector(this.containerSelector)
68
+ getContainer() {
69
+ this.container = document.querySelector(this.containerSelector);
64
70
  },
65
- rolar(paraCima){
71
+ rolar(paraCima) {
66
72
  try {
67
- this.getContainer()
68
- if(this.sinalizar && this.callbackFn) this.callbackFn()
69
- let alturaFinal = this.container.scrollHeight
70
- if(this.rolarParaMsg) {
71
- let ultimaMsgContainer = this.container.children[this.container.children.length - 2]
72
- !ultimaMsgContainer.children.length ? ultimaMsgContainer = this.container.children[this.container.children.length - 3] : ''
73
- const ultimaMsg = ultimaMsgContainer.lastElementChild.offsetHeight + 10
74
- alturaFinal -= ultimaMsg
73
+ this.getContainer();
74
+ if (this.sinalizar && this.callbackFn) this.callbackFn();
75
+ let alturaFinal = this.container.scrollHeight;
76
+ if (this.rolarParaMsg) {
77
+ let ultimaMsgContainer = this.container.children[
78
+ this.container.children.length - 2
79
+ ];
80
+ !ultimaMsgContainer.children.length
81
+ ? (ultimaMsgContainer = this.container.children[
82
+ this.container.children.length - 3
83
+ ])
84
+ : "";
85
+ const ultimaMsg = ultimaMsgContainer.lastElementChild.offsetHeight + 10;
86
+ alturaFinal -= ultimaMsg;
75
87
  }
76
88
 
77
- this.container.scroll(0, paraCima ? 0 : alturaFinal)
78
- }catch(e) {
79
- console.error("Nao foi possivel rolar o container")
80
- console.error(e)
89
+ this.container.scroll(0, paraCima ? 0 : alturaFinal);
90
+ } catch (e) {
91
+ console.error("Nao foi possivel rolar o container");
92
+ console.error(e);
81
93
  }
82
94
  },
83
- verifyScrollbar(){
95
+ verifyScrollbar() {
84
96
  try {
85
- this.getContainer()
97
+ this.getContainer();
86
98
 
87
- this.visibilidade = true
99
+ this.visibilidade = true;
88
100
 
89
101
  const posicaoDaBarra = this.container.scrollTop,
90
- tamanhoContainer = this.container.offsetHeight,
91
- tamanhoBarra = this.container.scrollHeight
92
-
93
- if(posicaoDaBarra == (tamanhoBarra - tamanhoContainer)){
94
- if(this.sinalizar) this.$emit("updateKey")
95
- this.visibilidade = false
96
- }else if(parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra || parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra + 1 || parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra - 1){
97
- this.visibilidade = false
102
+ tamanhoContainer = this.container.offsetHeight,
103
+ tamanhoBarra = this.container.scrollHeight;
104
+
105
+ if (posicaoDaBarra == tamanhoBarra - tamanhoContainer) {
106
+ if (this.sinalizar) this.$emit("updateKey");
107
+ this.visibilidade = false;
108
+ } else if (
109
+ parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra ||
110
+ parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra + 1 ||
111
+ parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra - 1
112
+ ) {
113
+ this.visibilidade = false;
98
114
  }
99
- }catch(e) {
100
- console.error("Ignorando botao de rolagem devido a erro")
101
- console.error(e)
102
- this.visibilidade = false
115
+ } catch (e) {
116
+ console.error("Ignorando botao de rolagem devido a erro");
117
+ console.error(e);
118
+ this.visibilidade = false;
103
119
  }
104
- }
105
- }
106
- }
120
+ },
121
+ },
122
+ };
107
123
  </script>
108
124
  <style>
109
125
  .btn-rolagem {
@@ -114,18 +130,18 @@ export default {
114
130
  .btn-rolagem.higher {
115
131
  bottom: 36px;
116
132
  }
117
- .btn-rolagem svg{
118
- font-size: 2.4rem;
133
+ .btn-rolagem svg {
134
+ font-size: 38.4px;
119
135
  color: #757575;
120
136
  transition-duration: 300ms;
121
137
  transition-property: opacity;
122
- opacity: .8;
138
+ opacity: 0.8;
123
139
  cursor: pointer;
124
140
  }
125
- .btn-rolagem svg:hover{
141
+ .btn-rolagem svg:hover {
126
142
  opacity: 1;
127
143
  }
128
- .sinalizar-msg-nova{
144
+ .sinalizar-msg-nova {
129
145
  position: absolute;
130
146
  top: -10px;
131
147
  left: -10px;
@@ -139,11 +155,11 @@ export default {
139
155
  animation-iteration-count: infinite;
140
156
  }
141
157
 
142
- @keyframes blink{
143
- from{
144
- opacity: .8 - .1;
158
+ @keyframes blink {
159
+ from {
160
+ opacity: 0.8 - 0.1;
145
161
  }
146
- to{
162
+ to {
147
163
  opacity: 1;
148
164
  }
149
165
  }
@@ -405,7 +405,7 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
405
405
  --border-radius: 5px;
406
406
 
407
407
  flex: 2;
408
- font-size: .7rem;
408
+ font-size: 11.2px;
409
409
  padding: 10px 0;
410
410
  display: flex;
411
411
  flex-direction: column;
@@ -450,7 +450,7 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
450
450
  .ts-content input {
451
451
  border: 1px solid transparent;
452
452
  outline: 0;
453
- font-size: .8rem;
453
+ font-size: 12.8px;
454
454
  padding: 2.5px 5px;
455
455
  background-color: var(--input-background-color);
456
456
  }
@@ -490,7 +490,7 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
490
490
  cursor: pointer;
491
491
  font-weight: 550;
492
492
  padding: 2px 3px;
493
- font-size: .8rem;
493
+ font-size: 12.8px;
494
494
  transition: background-color 150ms;
495
495
  }
496
496
  .ts-dropdown li:hover, .ts-dropdown li:focus-within, .ts-dropdown li:focus {