vue-intergrall-plugins 0.0.244 → 0.0.245

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.244",
3
+ "version": "0.0.245",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="text-footer-actions--btn" @click="$emit('click-trigger')" :title="dictionary.msg_baixar_todos_anexos">
3
+ <span class="multiplos">
4
+ <fa-icon :icon="['fas', 'download']" />
5
+ <fa-icon :icon="['fas', 'paperclip']" class="small" />
6
+ </span>
7
+ </div>
8
+ </template>
9
+
10
+ <style scoped>
11
+ .multiplos {
12
+ display: flex;
13
+ }
14
+ .multiplos svg {
15
+ font-size: .95rem
16
+ }
17
+ .multiplos svg.small {
18
+ font-size: .7rem!important;
19
+ }
20
+ </style>
21
+
22
+ <script>
23
+ export default {
24
+ props: {
25
+ dictionary: {
26
+ type: Object,
27
+ default: {},
28
+ required: false
29
+ }
30
+ }
31
+ }
32
+ </script>
@@ -38,7 +38,13 @@
38
38
  :message="message"
39
39
  :maxCharacters="textareaSettings.maxCharacters"
40
40
  />
41
- <div v-if="buttons.hasFiles || buttons.hasAudio || buttons.hasExpand || formattedMessageSettings.hasStandardMessages || buttons.hasScreenShare" class="text-footer-actions" :class="{'outside-buttons' : cssStyle.outsideButtons && !audioFile}">
41
+ <div v-if="buttons.hasFiles || buttons.hasAudio || buttons.hasExpand || formattedMessageSettings.hasStandardMessages || buttons.hasScreenShare || buttons.hasDownloadAll" class="text-footer-actions" :class="{'outside-buttons' : cssStyle.outsideButtons && !audioFile}">
42
+ <BtnDownloadAllFiles
43
+ v-show="buttons.hasDownloadAll && !audioFile"
44
+ @click-trigger="$emit('handle-download-files')"
45
+ :dictionary="dictionary"
46
+ :ref="`${textId}-download-files`"
47
+ />
42
48
  <BtnScreenShare
43
49
  v-show="buttons.hasScreenShare && !audioFile"
44
50
  @handle-screen-share="handleScreenShare"
@@ -123,9 +129,10 @@ import BtnExpand from "./BtnExpand"
123
129
  import BtnStandardMessages from "./BtnStandardMessages"
124
130
  import StandardMessages from "./StandardMessages"
125
131
  import BtnScreenShare from "./BtnScreenShare"
132
+ import BtnDownloadAllFiles from './BtnDownloadAllFiles'
126
133
 
127
134
  export default {
128
- components: { BtnEmojis, Loader, BtnMic, BtnFiles, BtnExpand, RemainingCharacters, BtnStandardMessages, StandardMessages, BtnScreenShare },
135
+ components: { BtnEmojis, Loader, BtnMic, BtnFiles, BtnExpand, RemainingCharacters, BtnStandardMessages, StandardMessages, BtnScreenShare, BtnDownloadAllFiles },
129
136
  mixins: [ clickaway ],
130
137
  props: {
131
138
  buttons: {
@@ -31,6 +31,7 @@ export default {
31
31
  <style>
32
32
  .req-loader-container {
33
33
  position: absolute;
34
+ z-index: 1;
34
35
  top: 0;
35
36
  left: 0;
36
37
  width: 100%;
@@ -11,7 +11,9 @@
11
11
  :reduce="template => template.cod"
12
12
  :clearable="false"
13
13
  @input="setTemplate"
14
- :getOptionLabel="template => template.label">
14
+ :getOptionLabel="template => template.label"
15
+ ref="template-v-select"
16
+ >
15
17
  <div slot="no-options" v-text="dictionary.msg_sem_resultados"></div>
16
18
  </v-select>
17
19
  </div>
@@ -131,6 +133,9 @@
131
133
  this.selectedTemplate = this.templates[key]
132
134
  this.codTemplate = key
133
135
  this.$emit('selected-template', key)
136
+ this.$nextTick(() => {
137
+ if(this.$root.$refs[`template-single-${this.identifier}`]) this.$root.$refs[`template-single-${this.identifier}`].handleInitialFocus()
138
+ })
134
139
  }else{
135
140
  this.selectedTemplate = null
136
141
  }
@@ -145,6 +150,9 @@
145
150
  this.adjustOnSelect()
146
151
  }
147
152
  }
153
+ if(!this.codTemplate && this.$refs["template-v-select"] && this.$refs["template-v-select"].$el) {
154
+ this.$refs["template-v-select"].$el.querySelector("input").focus()
155
+ }
148
156
  },
149
157
  selectIfHasContact24h() {
150
158
  if(this.templates['envio_msg']) {
@@ -383,7 +391,6 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
383
391
  align-items: center;
384
392
  }
385
393
  .tg-btn button {
386
- outline: unset;
387
394
  border: unset;
388
395
  display: block;
389
396
  min-width: 180px;
@@ -392,7 +399,7 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
392
399
  font-weight: 500;
393
400
  background-color: #007bff;
394
401
  color: #FFF;
395
- transition-duration: 300ms;
402
+ transition: transform 300ms ease-in-out;
396
403
  user-select: none;
397
404
  cursor: pointer;
398
405
  box-shadow: inset 0 -2px rgba(0, 0, 0, 0.2);
@@ -425,11 +432,11 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
425
432
  transform: translateY(1px);
426
433
  }
427
434
  .tg-btn button:focus, .tg-btn button:active {
428
- outline: unset;
435
+ outline: 2px solid black;
429
436
  }
430
437
  .tg-btn.small-btn {
431
438
  width: auto;
432
- margin-left: 5px;
439
+ margin: 0 5px;
433
440
  }
434
441
  .tg-btn.small-btn svg {
435
442
  margin-right: 0;
@@ -11,6 +11,7 @@
11
11
  :placeholderMessage="'Escreva sua mensagem'"
12
12
  :ignoreHideTextarea="true"
13
13
  :dictionary="dictionary"
14
+ ref="text-footer-template-message"
14
15
  ></TextFooter>
15
16
  <div class="tg-btn" :class="{'small-btn' : iconButton}" v-if="hasButton">
16
17
  <button @click="sendMessage">
@@ -47,7 +48,17 @@ export default {
47
48
  required: true
48
49
  }
49
50
  },
51
+ mounted() {
52
+ this.initFocus()
53
+ },
50
54
  methods: {
55
+ initFocus() {
56
+ this.$nextTick(() => {
57
+ if(this.$refs["text-footer-template-message"] && this.$refs["text-footer-template-message"].$el) {
58
+ this.$refs["text-footer-template-message"].$el.querySelector("textarea").focus()
59
+ }
60
+ })
61
+ },
51
62
  sendMessage() {
52
63
  this.$emit('click-trigger')
53
64
  },
@@ -52,7 +52,7 @@
52
52
  </div>
53
53
  </div>
54
54
  <div class="tg-btn" :class="{'small-btn' : iconButton}" v-if="hasButton">
55
- <button @click="$emit('click-trigger')">
55
+ <button @click="$emit('click-trigger')" ref="template-single-button">
56
56
  <template v-if="!iconButton">
57
57
  <fa-icon :icon="['fas', 'paper-plane']" />
58
58
  {{ dictionary.btn_contatar_clientes }}
@@ -121,6 +121,11 @@ export default {
121
121
  })
122
122
  },
123
123
  methods: {
124
+ handleInitialFocus() {
125
+ const allInputs = document.querySelectorAll(`.input-var-${this.identifier}`);
126
+ if(allInputs.length) allInputs[0].focus()
127
+ else if(this.$refs["template-single-button"]) this.$refs["template-single-button"].focus()
128
+ },
124
129
  limparInputVar() {
125
130
  const allInputs = document.querySelectorAll(`.input-var-${this.identifier}`);
126
131
  allInputs.forEach((input) => {