@nixweb/nixloc-ui 0.0.185 → 0.0.186

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": "@nixweb/nixloc-ui",
3
- "version": "0.0.185",
3
+ "version": "0.0.186",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -0,0 +1,115 @@
1
+ <template>
2
+ <div>
3
+ <div>{{ title }}
4
+ <span class="required" v-if="required">*</span>
5
+ </div>
6
+ <div class="email-input-container">
7
+ <div class="email-tag" v-for="(email, index) in tos" :key="index">
8
+ {{ email }}
9
+ <button class="remove-button" @click="removeEmail(index)">
10
+ <i class="fa-solid fa-circle-xmark"></i>
11
+ </button>
12
+ </div>
13
+ <input v-model="newItem" @keyup.enter="addItem" :placeholder="placeholder" class="email-input" />
14
+ </div>
15
+ </div>
16
+ </template>
17
+
18
+ <script>
19
+ export default {
20
+ name: "InputTag",
21
+ props: {
22
+ title: String,
23
+ placeholder: String,
24
+ required: Boolean,
25
+ initialValue: Array,
26
+ value: Array,
27
+ },
28
+ data() {
29
+ return {
30
+ tos: [],
31
+ newItem: ""
32
+ };
33
+ },
34
+ mounted() {
35
+ this.tos = this.initialValue;
36
+ },
37
+ methods: {
38
+ addItem() {
39
+ if (this.newItem) {
40
+ this.tos.push(this.newItem);
41
+ this.newItem = "";
42
+ }
43
+ },
44
+ removeEmail(index) {
45
+ this.tos.splice(index, 1);
46
+ }
47
+ },
48
+ watch: {
49
+ tos: {
50
+ handler(tos) {
51
+ this.$emit("input", tos);
52
+ },
53
+ deep: true,
54
+ },
55
+ },
56
+
57
+ };
58
+ </script>
59
+
60
+ <style>
61
+ .email-input-container {
62
+ display: flex;
63
+ flex-wrap: wrap;
64
+ align-items: center;
65
+ border: 1px solid #E5E4E8;
66
+ border-radius: 6px;
67
+ padding-left: 5px;
68
+ }
69
+
70
+ .email-tag {
71
+ display: flex;
72
+ align-items: center;
73
+ background-color: #f0f0f0;
74
+ padding: 4px 8px;
75
+ border-radius: 16px;
76
+ margin-top: 6px;
77
+ margin-right: 8px;
78
+ margin-bottom: 8px;
79
+ }
80
+
81
+ .remove-button {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ background-color: transparent;
86
+ border: none;
87
+ cursor: pointer;
88
+ margin-left: 4px;
89
+ outline: none;
90
+ }
91
+
92
+ .remove-button {
93
+ color: #ff0000;
94
+ }
95
+
96
+ .remove-button:hover {
97
+ color: #ff0000;
98
+ }
99
+
100
+ .email-input {
101
+ flex: 1;
102
+ border: none;
103
+ outline: none;
104
+ font-size: 14px;
105
+ padding: 4px;
106
+ font-weight: 400 !important;
107
+ }
108
+
109
+ .email-input::placeholder {
110
+ font-weight: 300 !important;
111
+ opacity: 0.5;
112
+ color: #969595;
113
+ }
114
+ </style>
115
+
@@ -564,7 +564,7 @@ export default {
564
564
 
565
565
  let downloadLink = document.createElement("a");
566
566
  downloadLink.href = url;
567
- downloadLink.download = `${params.obj.fileName}.${params.obj.fileType}`;
567
+ downloadLink.download = `${params.obj.fileName}`;
568
568
 
569
569
  document.body.appendChild(downloadLink);
570
570
  downloadLink.click();
@@ -592,7 +592,7 @@ export default {
592
592
 
593
593
  let downloadLink = document.createElement("a");
594
594
  downloadLink.href = url;
595
- downloadLink.download = `${params.obj.fileName}.${params.obj.fileType}`;
595
+ downloadLink.download = `${params.obj.fileName}`;
596
596
 
597
597
  document.body.appendChild(downloadLink);
598
598
  downloadLink.click();