@nixweb/nixloc-ui 0.0.153 → 0.0.155

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.153",
3
+ "version": "0.0.155",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -10,7 +10,12 @@
10
10
  v-if="notifications.length > 0 && formDirty"
11
11
  class="required glyphicon fas fa-exclamation-triangle"
12
12
  ></i>
13
- <vue-editor v-model.trim="value" :editorToolbar="customToolbar"></vue-editor>
13
+ <vue-editor
14
+ v-model.trim="value"
15
+ :editorToolbar="customToolbar"
16
+ :disabled="disabled"
17
+ :class="{ disabled: disabled }"
18
+ ></vue-editor>
14
19
  </div>
15
20
 
16
21
  <div v-if="formDirty">
@@ -36,6 +41,7 @@ export default {
36
41
  field: String,
37
42
  formName: String,
38
43
  required: Boolean,
44
+ disabled: Boolean,
39
45
  maxLength: Number,
40
46
  value: String,
41
47
  },
@@ -44,16 +50,18 @@ export default {
44
50
  notifications: [],
45
51
  formDirty: false,
46
52
  textoEditor: "",
47
- customToolbar: [
48
- ["bold", "italic", "underline"],
49
- ],
53
+ customToolbar: [["bold", "italic", "underline"]],
50
54
  };
51
55
  },
52
56
  created() {
53
57
  this.validate();
54
58
  },
55
59
  methods: {
56
- ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
60
+ ...mapMutations("validation", [
61
+ "addValidation",
62
+ "removeValidation",
63
+ "updateFormDirty",
64
+ ]),
57
65
  validate() {
58
66
  this.notifications = [];
59
67
 
@@ -123,4 +131,8 @@ export default {
123
131
  color: #f0134d;
124
132
  font-size: 14px;
125
133
  }
134
+
135
+ .disabled {
136
+ color: #86929e;
137
+ }
126
138
  </style>
@@ -7,6 +7,7 @@
7
7
  :required="required"
8
8
  :formName="formName"
9
9
  _style="color:red;"
10
+ :disabled="disabled"
10
11
  v-model="discount.discount"
11
12
  >
12
13
  <div class="glyphicon margin-button">
@@ -16,6 +17,7 @@
16
17
  type="primary"
17
18
  classIcon="fa-solid fa-brazilian-real-sign"
18
19
  size="small"
20
+ :disabled="disabled"
19
21
  :clicked="change"
20
22
  /></div
21
23
  ></InputDecimal>
@@ -25,6 +27,7 @@
25
27
  field="discount"
26
28
  :formName="formName"
27
29
  :required="false"
30
+ :disabled="disabled"
28
31
  _style="color:red;"
29
32
  :maxLength="5"
30
33
  type="float"
@@ -34,6 +37,7 @@
34
37
  _key="btnDiscount"
35
38
  title=""
36
39
  type="primary"
40
+ :disabled="disabled"
37
41
  classIcon="fa-solid fa-percent"
38
42
  size="small"
39
43
  :clicked="change"
@@ -55,8 +55,8 @@ export default {
55
55
  }
56
56
 
57
57
  .success {
58
- background-color: #f6ffed;
59
- border: 1px solid #b7eb8f;
58
+ background-color: #f6ffed !important;
59
+ border: 1px solid #b7eb8f !important;
60
60
  }
61
61
 
62
62
  .warning {
@@ -6,6 +6,7 @@
6
6
  small: size === 'small',
7
7
  medium: size === 'medium',
8
8
  large: size === 'large',
9
+ blue: type === 'blue',
9
10
  primary: type === 'primary',
10
11
  success: type === 'success',
11
12
  warning: type === 'warning',
@@ -66,6 +67,12 @@ export default {
66
67
  color: #fff;
67
68
  }
68
69
 
70
+ .blue {
71
+ background: #007bff;
72
+ border-color: #007bff;
73
+ color: #fff;
74
+ }
75
+
69
76
  .primary {
70
77
  background: #577696;
71
78
  border-color: #577696;
@@ -74,8 +81,8 @@ export default {
74
81
 
75
82
  .success {
76
83
  color: #fff;
77
- background: #38A169;
78
- border-color: #38A169;
84
+ background: #38a169;
85
+ border-color: #38a169;
79
86
  }
80
87
 
81
88
  .info {
@@ -19,7 +19,7 @@ export default {
19
19
  .molded {
20
20
  border: 1px solid #e8eaed;
21
21
  background-color: white;
22
- border-radius: 12px !important;
22
+ border-radius: 8px !important;
23
23
  padding: 10px;
24
24
  padding-top: 15px;
25
25
  padding-left: 30px;
@@ -23,7 +23,17 @@
23
23
  <span class="exemplo"> {{ item.example }}</span>
24
24
  </td>
25
25
  <td class="parametro">
26
- <span> {{ item.parameter }}</span>
26
+ <span @click="copy(item.parameter)" v-clipboard="item.parameter">
27
+ {{ item.parameter }}
28
+ <span v-if="item.parameter">
29
+ <span class="copy" v-if="copied != item.parameter">
30
+ <span>Copiar</span>
31
+ </span>
32
+ <span class="copied" v-else>
33
+ <span>Copiado</span>
34
+ </span>
35
+ </span>
36
+ </span>
27
37
  </td>
28
38
  </tr>
29
39
  </tbody>
@@ -49,6 +59,7 @@ export default {
49
59
  data() {
50
60
  return {
51
61
  legendLocal: [],
62
+ copied: "",
52
63
  };
53
64
  },
54
65
  mounted() {
@@ -56,6 +67,9 @@ export default {
56
67
  },
57
68
  methods: {
58
69
  ...mapMutations("generic", ["removeLoading"]),
70
+ copy(parameter) {
71
+ this.copied = parameter;
72
+ },
59
73
  },
60
74
  computed: {
61
75
  ...mapGetters("generic", ["groupBy"]),
@@ -128,11 +142,21 @@ export default {
128
142
  }
129
143
 
130
144
  .parametro {
131
- width: 250px;
145
+ font: 12px;
146
+ width: 340px;
147
+ cursor: pointer;
132
148
  }
133
149
 
134
150
  .exemplo {
135
151
  font-size: 14px;
136
152
  color: rgb(31, 31, 82);
137
153
  }
154
+
155
+ .copy {
156
+ color: rgb(31, 31, 82);
157
+ }
158
+
159
+ .copied {
160
+ color: red;
161
+ }
138
162
  </style>
@@ -13,7 +13,6 @@
13
13
  <div class="div-select">
14
14
  <SelectStatic
15
15
  :title="obj.title"
16
- fieldTarget="timeZone"
17
16
  :data="select"
18
17
  :markFormDirty="false"
19
18
  v-model="obj.target"
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- Atualizado em
3
+ {{ title }}
4
4
  <span class="timer">{{ time }}</span> segundos...
5
5
  </div>
6
6
  </template>
@@ -12,6 +12,10 @@ export default {
12
12
  type: Number,
13
13
  default: 10,
14
14
  },
15
+ title: {
16
+ type: String,
17
+ default: "Atualizado em",
18
+ },
15
19
  endTime: Function,
16
20
  },
17
21
  data() {
@@ -49,6 +49,7 @@
49
49
  <div class="side-by-side">
50
50
  <Button
51
51
  key="showModalLegend"
52
+ title="Parâmetros (Alt)"
52
53
  type="info"
53
54
  classIcon="fas fa-book-reader"
54
55
  size="small"
@@ -58,6 +59,7 @@
58
59
  <div class="side-by-side">
59
60
  <Button
60
61
  key="showModalCode"
62
+ title="Código"
61
63
  type="info"
62
64
  classIcon="far fa-code"
63
65
  size="small"
@@ -81,8 +83,8 @@
81
83
  <Modal title="Salvar" :width="800" v-show="showModal('saveDocument')">
82
84
  <slot></slot>
83
85
  </Modal>
84
- <Modal title="Parâmetros" :width="1100" v-if="showModal('legenda')">
85
- <ParameterLegend v-if="modal.open" :legend="parameterLegend" />
86
+ <Modal title="Parâmetros" :width="1100" v-show="showModal('legenda')">
87
+ <ParameterLegend v-show="modal.open" :legend="parameterLegend" />
86
88
  </Modal>
87
89
  <Modal title="Editor de Código" :width="900" v-if="showModal('code')">
88
90
  <CodeEditor v-if="modal.open" />
@@ -178,6 +180,15 @@ export default {
178
180
  setTimeout(function () {
179
181
  self.showDocumentEditor = true;
180
182
  }, 1500);
183
+ window.addEventListener("keydown", (e) => {
184
+ if (e.key == "Alt") {
185
+ if (this.modal.open) {
186
+ this.hideModal();
187
+ } else {
188
+ this.showModalLegend();
189
+ }
190
+ }
191
+ });
181
192
  },
182
193
  computed: {
183
194
  ...mapState("generic", ["modal", "documentHtml"]),
@@ -12,8 +12,8 @@
12
12
  <div class="div-loading" v-show="loading">
13
13
  <span
14
14
  >Aguarde, estamos carregando os dados, isso pode levar alguns
15
- minutos...</span
16
- >
15
+ minutos...
16
+ </span>
17
17
  <Loading type="line" :center="false" />
18
18
  </div>
19
19
  <Molded v-show="!loading">
@@ -85,6 +85,15 @@
85
85
  size="small"
86
86
  :clicked="openListError"
87
87
  />
88
+ <Button
89
+ v-if="isValid"
90
+ _key="btnImport"
91
+ type="success"
92
+ title="Importar"
93
+ classIcon="fa-solid fa-file-import"
94
+ size="small"
95
+ :clicked="startImport"
96
+ />
88
97
  </div>
89
98
  <br />
90
99
  <Alert type="danger" v-if="listError.length > 0">
@@ -102,6 +111,7 @@
102
111
  </Alert>
103
112
 
104
113
  <TableImport
114
+ v-if="fileName"
105
115
  :select="select"
106
116
  :headerTable="headerTable"
107
117
  :data="data"
@@ -155,6 +165,7 @@ export default {
155
165
  typeImport: Number,
156
166
  urlMapping: String,
157
167
  urlValidate: String,
168
+ urlImport: String,
158
169
  },
159
170
  data() {
160
171
  return {
@@ -218,6 +229,24 @@ export default {
218
229
  this.removeLoading(["btnValidate"]);
219
230
  });
220
231
  },
232
+ startImport() {
233
+ let params = {
234
+ url: this.urlImport,
235
+ obj: {
236
+ fileName: this.fileName,
237
+ container: this.container,
238
+ typeImport: this.typeImport,
239
+ items: this.headerTable,
240
+ },
241
+ notNotifyToast: true,
242
+ };
243
+ this.postApi(params).then((response) => {
244
+ if (response.success) {
245
+ alert();
246
+ }
247
+ this.removeLoading(["btnValidate"]);
248
+ });
249
+ },
221
250
  openListError() {
222
251
  this.openModal("listError");
223
252
  this.removeLoading(["btnListError"]);