@nixweb/nixloc-ui 0.0.130 → 0.0.131

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.130",
3
+ "version": "0.0.131",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div class="c-div-button">
3
3
  <button
4
- :style="'background-color:' + backroundColor + ';color:' + color"
5
4
  class="button"
6
5
  :class="{
7
6
  small: size === 'small',
@@ -18,11 +17,7 @@
18
17
  :disabled="disabled"
19
18
  @click="execute()"
20
19
  >
21
- <i
22
- class="title"
23
- :class="classIcon"
24
- v-if="!isLoading(this._key) && classIcon"
25
- ></i>
20
+ <i class="title" :class="classIcon" v-if="!isLoading(this._key) && classIcon"></i>
26
21
  <span v-if="!isLoading(this._key)">{{ title }}</span>
27
22
  <vue-loading
28
23
  v-if="isLoading(this._key)"
@@ -44,8 +39,6 @@ export default {
44
39
  title: String,
45
40
  type: String,
46
41
  size: String,
47
- color: String,
48
- backroundColor: String,
49
42
  eventName: String,
50
43
  eventData: Object,
51
44
  classIcon: String,
@@ -1,10 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <b-form-checkbox
4
- v-model="valueLocal"
5
- :value="true"
6
- :unchecked-value="false"
7
- >
3
+ <b-form-checkbox v-model="valueLocal" :value="true" :unchecked-value="false">
8
4
  {{ title }}
9
5
  <Tip :field="field" :formName="formName" />
10
6
  </b-form-checkbox>
@@ -24,7 +20,6 @@ export default {
24
20
  formName: String,
25
21
  field: String,
26
22
  value: Boolean,
27
- changed: Function,
28
23
  markFormDirty: {
29
24
  type: Boolean,
30
25
  default: true,
@@ -45,7 +40,6 @@ export default {
45
40
  valueLocal() {
46
41
  this.$emit("input", this.valueLocal);
47
42
  if (this.markFormDirty) this.updateFormDirty(true);
48
- if (this.changed) this.changed();
49
43
  },
50
44
  },
51
45
  };
@@ -4,7 +4,6 @@
4
4
  <i class="title class-icon-title" :class="classIconTitle"></i>
5
5
  <span class="title" :style="'color: ' + titleColor">{{ title }} </span>
6
6
  <span class="required" v-if="required">*</span>
7
- <Tip :field="field" :formName="formName" />
8
7
  </label>
9
8
  <div class="inner-addon right-addon">
10
9
  <div
@@ -4,14 +4,12 @@
4
4
  <div>
5
5
  <div class="document-editor__toolbar"></div>
6
6
  <div class="document-editor__editable-container">
7
- <div id="template-dev">
8
- <ckeditor
9
- :editor="editor"
10
- v-model="documentHtml"
11
- @ready="onReady"
12
- @focus="changed"
13
- ></ckeditor>
14
- </div>
7
+ <ckeditor
8
+ :editor="editor"
9
+ v-model="documentHtml"
10
+ @ready="onReady"
11
+ @focus="changed"
12
+ ></ckeditor>
15
13
  </div>
16
14
  </div>
17
15
  </div>
@@ -48,9 +46,7 @@ export default {
48
46
  methods: {
49
47
  ...mapMutations("generic", ["updateDocumentHtml", "addEvent"]),
50
48
  onReady(editor) {
51
- const toolbarContainer = document.querySelector(
52
- ".document-editor__toolbar"
53
- );
49
+ const toolbarContainer = document.querySelector(".document-editor__toolbar");
54
50
  toolbarContainer.appendChild(editor.ui.view.toolbar.element);
55
51
  },
56
52
  changed() {
@@ -82,11 +78,12 @@ export default {
82
78
  padding: 10px;
83
79
  border: 1px solid #e4e6ec;
84
80
  background: var(--ck-color-base-foreground);
81
+ overflow-y: scroll;
85
82
  }
86
83
 
87
84
  .document-editor__editable-container .ck-editor__editable {
88
85
  width: 22cm;
89
- height: 700px;
86
+ min-height: 21cm;
90
87
  padding: 20px;
91
88
  border: 1px hsl(0, 0%, 82.7%) solid;
92
89
  border-radius: var(--ck-border-radius);
@@ -101,9 +98,7 @@ export default {
101
98
  }
102
99
 
103
100
  .document-editor .ck-heading-dropdown .ck-list .ck-button__label {
104
- line-height: calc(
105
- 1.7 * var(--ck-line-height-base) * var(--ck-font-size-base)
106
- );
101
+ line-height: calc(1.7 * var(--ck-line-height-base) * var(--ck-font-size-base));
107
102
  min-width: 6em;
108
103
  }
109
104
 
@@ -135,10 +130,7 @@ export default {
135
130
  color: hsl(203, 100%, 50%);
136
131
  }
137
132
 
138
- .document-editor
139
- .ck-heading-dropdown
140
- .ck-heading_heading2.ck-on
141
- .ck-button__label {
133
+ .document-editor .ck-heading-dropdown .ck-heading_heading2.ck-on .ck-button__label {
142
134
  color: var(--ck-color-list-button-on-text);
143
135
  }
144
136
 
@@ -16,11 +16,12 @@ export default {
16
16
  template: String,
17
17
  d: Object,
18
18
  },
19
+
19
20
  methods: {
20
- somaGrupo(grupo) {
21
+ sMg(grN) {
21
22
  let total = "";
22
- this.d.itensLocacao.forEach((x) => {
23
- if (x.grupo === grupo) return (total = x.valorTotal);
23
+ this.d.pLoc.forEach((x) => {
24
+ if (x.pGp === grN) return (total = x.pGpT);
24
25
  });
25
26
  return total;
26
27
  },
@@ -28,8 +29,7 @@ export default {
28
29
  computed: {
29
30
  ...mapGetters("generic", ["groupBy"]),
30
31
  produtoAgrupado() {
31
- var group = this.groupBy({ array: this.d.itensLocacao, key: "grupo" });
32
- return group;
32
+ return this.groupBy({ array: this.d.produto, key: "pGp" });
33
33
  },
34
34
  },
35
35
  };
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <Loading type="line" :center="false" v-show="loading" />
4
- <FullCalendar :options="calendarOptions" />
4
+ <FullCalendar ref="cc" :options="calendarOptions" />
5
5
  </div>
6
6
  </template>
7
7
 
@@ -137,11 +137,6 @@ export default {
137
137
  cursor: pointer !important;
138
138
  }
139
139
 
140
- .fc-event-time {
141
- color: black !important;
142
- font-weight: normal !important;
143
- }
144
-
145
140
  .fc-list-day-side-text {
146
141
  color: black !important;
147
142
  }
@@ -158,10 +153,6 @@ export default {
158
153
  color: black !important;
159
154
  }
160
155
 
161
- .fc-list-event-title {
162
- cursor: pointer !important;
163
- }
164
-
165
156
  .fc-button-primary:hover {
166
157
  background: #3e90b3 !important;
167
158
  }
@@ -6,25 +6,25 @@
6
6
  <table class="table table-responsive-xs">
7
7
  <thead>
8
8
  <tr>
9
+ <th><span class="title-header">Parâmetro</span></th>
9
10
  <th><span class="title-header">Descrição</span></th>
10
11
  <th><span class="title-header">Exemplo</span></th>
11
- <th><span class="title-header">Parâmetro</span></th>
12
12
  </tr>
13
13
  </thead>
14
14
  <tbody v-for="(legendLocal, groupName) in grouped">
15
15
  <td class="group text-center" colspan="8">
16
- <div>{{ groupName }}</div>
16
+ <div>{{ groupName.toUpperCase() }}</div>
17
17
  </td>
18
18
  <tr v-for="item in legendLocal">
19
- <td class="description">
19
+ <td class="parametro">
20
+ <span> {{ item.parameter }}</span>
21
+ </td>
22
+ <td>
20
23
  <span> {{ item.description }}</span>
21
24
  </td>
22
25
  <td>
23
26
  <span class="exemplo"> {{ item.example }}</span>
24
27
  </td>
25
- <td class="parametro">
26
- <span> {{ item.parameter }}</span>
27
- </td>
28
28
  </tr>
29
29
  </tbody>
30
30
  </table>
@@ -70,26 +70,23 @@ export default {
70
70
  let legend = [];
71
71
  let self = this;
72
72
  setTimeout(function () {
73
- if (self.search.content) {
74
- self.legend.forEach(function (item) {
75
- if (self.search.filter.content == "equal") {
76
- if (item.description == self.search.content) legend.push(item);
77
- }
78
- if (self.search.filter.content == "contains") {
79
- if (item.description.includes(self.search.content))
80
- legend.push(item);
81
- }
82
- });
83
- self.legendLocal = legend;
84
- }
85
- self.removeLoading(["btnSearch", "btnClean"]);
73
+ self.legend.forEach(function (item) {
74
+ if (self.search.filter.content == "equal") {
75
+ if (item.description == self.search.content) legend.push(item);
76
+ }
77
+ if (self.search.filter.content == "contains") {
78
+ if (item.description.includes(self.search.content)) legend.push(item);
79
+ }
80
+ });
81
+ self.legendLocal = legend;
82
+ self.removeLoading(["search", "clean"]);
86
83
  }, 300);
87
84
  },
88
85
  clearedSearch: function () {
89
86
  let self = this;
90
87
  setTimeout(function () {
91
88
  self.legendLocal = self.legend;
92
- self.removeLoading(["btnSearch", "btnClean"]);
89
+ self.removeLoading(["search", "clean"]);
93
90
  }, 300);
94
91
  },
95
92
  },
@@ -119,10 +116,6 @@ export default {
119
116
  font-weight: 500;
120
117
  }
121
118
 
122
- .description {
123
- width: 350px;
124
- }
125
-
126
119
  .div-warning {
127
120
  margin-bottom: 20px;
128
121
  }
@@ -100,7 +100,7 @@
100
100
  <div class="a4">
101
101
  <div id="printMe">
102
102
  <DocumentPreview
103
- :template="documentPreview('dev')"
103
+ :template="documentPreview"
104
104
  :d="parameterExemple"
105
105
  />
106
106
  </div>
@@ -165,12 +165,7 @@ export default {
165
165
  ...mapGetters("generic", ["showModal", "event", "documentPreview"]),
166
166
  },
167
167
  methods: {
168
- ...mapMutations("generic", [
169
- "openModal",
170
- "hideModal",
171
- "removeLoading",
172
- "addEvent",
173
- ]),
168
+ ...mapMutations("generic", ["openModal", "hideModal", "removeLoading", "addEvent"]),
174
169
  saveDocument() {
175
170
  if (this.id) {
176
171
  this.addEvent({ name: "saveDocument" });
@@ -1,5 +1,4 @@
1
1
  import axios from "@/config/axios";
2
- import Tips from "@/config/tips";
3
2
  import Token from "@nixweb/nixloc-ui/src/config/token";
4
3
 
5
4
  export default {
@@ -36,13 +35,7 @@ export default {
36
35
  },
37
36
  getters: {
38
37
  tip: (state) => (tipId) => {
39
- var tips = new Tips();
40
- let message = "";
41
- tips.help.find(value => {
42
- if (value.tipId == tipId)
43
- message = value.message;
44
- })
45
- return message;
38
+ return "";
46
39
  },
47
40
  showModal: (state) => (name) => {
48
41
  if (name == state.modal.name) return true;
@@ -67,17 +60,11 @@ export default {
67
60
  event: (state) => {
68
61
  return state.event;
69
62
  },
70
- documentPreview: (state) => (env) => {
63
+ documentPreview: (state) => {
71
64
  let documentHtml = state.documentHtml
72
65
  let ret = documentHtml;
73
66
 
74
- var template = null;
75
-
76
- if (env == 'dev')
77
- template = document.getElementById("template-dev");
78
-
79
- if (env == 'prod')
80
- template = document.getElementById("template-prod");
67
+ var template = document.getElementById("template");
81
68
 
82
69
  if (template != null) {
83
70
  var tables = template.getElementsByTagName("table");
@@ -99,30 +86,24 @@ export default {
99
86
 
100
87
  if (th) {
101
88
 
89
+ let isGrouped = th.innerText.includes("n.grupo");
90
+ let isProduct = th.innerText.includes("p.pLoc");
91
+ let isPeriod = th.innerText.includes("n.periodo");
102
92
  let isPayment = th.innerText.includes("n.pagamento");
103
-
104
-
105
- let isPeriod = th.innerText.includes("t.periodoLocacao");
106
- let isProduct = th.innerText.includes("t.produtoLocacao");
107
- let isGrouped = th.innerText.includes("t.produtoAgrupado");
108
- let isMoviment = th.innerText.includes("t.produtoMovimentacao");
109
- let isCustumerAdress = th.innerText.includes("t.enderecoCliente");
110
-
93
+ let isMoviment = th.innerText.includes("p.pMoviment");
111
94
 
112
95
  if (isProduct) {
113
- obj.vForSimple = "v-for='produto in d.itensLocacao'";
96
+ obj.vForSimple = "v-for='p in d.pLoc'";
114
97
  config.push(obj);
115
98
  } else if (isPeriod) {
116
- obj.vForSimple = "v-for='periodo in d.periodoLocacao'";
99
+ obj.vForSimple = "v-for='pe in d.periodo'";
117
100
  config.push(obj);
118
101
  } else if (isPayment) {
119
102
  obj.vForSimple = "v-for='pg in d.pagamento'";
120
103
  config.push(obj);
121
104
  } else if (isGrouped) {
122
- obj.vForGrouped = "v-for='(itensLocacao, grupo) in produtoAgrupado'";
123
- obj.vForSimple = "v-for='produto in itensLocacao'";
124
-
125
- // neste cenário basicamente temos que montar o <tbody> no array de agrupamento
105
+ obj.vForGrouped = "v-for='(produto, grN) in produtoAgrupado'";
106
+ obj.vForSimple = "v-for='p in d.pLoc'";
126
107
 
127
108
  var initIndex = documentHtml.split("<tbody>", index + 1).join("<tbody>").length;
128
109
  var lastIndex = documentHtml.split("</tbody>", index + 1).join("</tbody>").length;
@@ -131,18 +112,13 @@ export default {
131
112
 
132
113
  let tr = tbody.substring(tbody.indexOf("<tr>"), tbody.lastIndexOf("</tr>"));
133
114
 
134
- // faz o replace nameGroup para tirar o <tr/>
135
115
  obj.nameGroup = tr.substring(0, tr.indexOf('</tr>')) + "</tr>";
136
116
  obj.nameGroup = obj.nameGroup.replaceAll("\"", "'");
137
117
  obj.nameGroupReplace = obj.nameGroup.replace("<tr>", "").replace("</tr>", "");
138
-
139
118
  config.push(obj);
140
119
 
141
120
  } else if (isMoviment) {
142
- obj.vForSimple = "v-for='produto in d.itensMovimentacao'";
143
- config.push(obj);
144
- } else if (isCustumerAdress) {
145
- obj.vForSimple = "v-for='endereco in d.locacao.cliente.endereco'";
121
+ obj.vForSimple = "v-for='pM in d.pMoviment'";
146
122
  config.push(obj);
147
123
  } else {
148
124
  config.push(obj);
@@ -158,20 +134,17 @@ export default {
158
134
  replace += `.replace("<tbody>${x.nameGroup}<tr>", "<tbody ${x.vForGrouped}>${x.nameGroupReplace}<tr ${x.vForSimple}>")`;
159
135
  });
160
136
 
161
-
162
-
163
137
  var retParse = ret.replaceAll("\"", "'");
164
- retParse = eval(`retParse${replace}`);
138
+ retParse = eval(`ret${replace}`);
165
139
 
166
140
  var classImportant = retParse
167
- .replaceAll("t.periodoLocacao", "")
168
- .replaceAll("t.produtoLocacao", "")
169
- .replaceAll("t.produtoAgrupado", "")
170
- .replaceAll("t.produtoMovimentacao", "")
171
- .replaceAll("t.enderecoCliente", "")
141
+ .replaceAll("n.grupo", "")
142
+ .replaceAll("p.pLoc", "")
143
+ .replaceAll("p.pMoviment", "")
144
+ .replaceAll("n.periodo", "")
145
+ .replaceAll("n.pagamento", "")
172
146
  .replaceAll("<p>&nbsp!important;</p>", "<p>&nbsp</p>");
173
147
  }
174
-
175
148
  return classImportant;
176
149
  },
177
150
  groupBy: () => (obj) => {