@nixweb/nixloc-ui 0.0.189 → 0.0.190

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.189",
3
+ "version": "0.0.190",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -6,9 +6,16 @@
6
6
  <Tip :field="field" :formName="formName" />
7
7
  </label>
8
8
  <div class="inner-addon right-addon">
9
- <i v-if="notifications.length > 0 && formDirty" class="required glyphicon fas fa-exclamation-triangle"></i>
10
- <vue-editor v-model.trim="value" :editorToolbar="customToolbar" :disabled="disabled"
11
- :class="{ disabled: disabled }"></vue-editor>
9
+ <i
10
+ v-if="notifications.length > 0 && formDirty"
11
+ class="required glyphicon fas fa-exclamation-triangle"
12
+ ></i>
13
+ <vue-editor
14
+ v-model.trim="value"
15
+ :editorToolbar="customToolbar"
16
+ :disabled="disabled"
17
+ :class="{ disabled: disabled }"
18
+ ></vue-editor>
12
19
  </div>
13
20
 
14
21
  <div v-if="formDirty">
@@ -32,10 +39,6 @@ export default {
32
39
  props: {
33
40
  title: String,
34
41
  field: String,
35
- customToolbar: {
36
- type: Array,
37
- default: [["bold", "italic", "underline"]],
38
- },
39
42
  formName: String,
40
43
  required: Boolean,
41
44
  disabled: Boolean,
@@ -47,6 +50,7 @@ export default {
47
50
  notifications: [],
48
51
  formDirty: false,
49
52
  textoEditor: "",
53
+ customToolbar: [["bold", "italic", "underline"]],
50
54
  };
51
55
  },
52
56
  created() {
@@ -123,7 +127,6 @@ export default {
123
127
  color: #94aa2a;
124
128
  font-size: 14px;
125
129
  }
126
-
127
130
  .invalid {
128
131
  color: #f0134d;
129
132
  font-size: 14px;
@@ -132,8 +135,4 @@ export default {
132
135
  .disabled {
133
136
  color: #86929e;
134
137
  }
135
-
136
- button{
137
- color:black;
138
- }
139
138
  </style>
@@ -1,20 +1,35 @@
1
1
  <template>
2
2
  <div>
3
- <AceEditor v-model="code" lang="html" @init="editorInit" theme="monokai" width="100%" height="400px" :options="{
4
- enableBasicAutocompletion: true,
5
- enableLiveAutocompletion: true,
6
- fontSize: 15,
7
- highlightActiveLine: true,
8
- enableSnippets: false,
9
- showLineNumbers: true,
10
- tabSize: 2,
11
- showPrintMargin: false,
12
- showGutter: true,
13
- }" />
14
- <div class="apply" v-if="showButtonApply">
3
+ <AceEditor
4
+ v-model="code"
5
+ lang="html"
6
+ @init="editorInit"
7
+ theme="monokai"
8
+ width="100%"
9
+ height="400px"
10
+ :options="{
11
+ enableBasicAutocompletion: true,
12
+ enableLiveAutocompletion: true,
13
+ fontSize: 15,
14
+ highlightActiveLine: true,
15
+ enableSnippets: false,
16
+ showLineNumbers: true,
17
+ tabSize: 2,
18
+ showPrintMargin: false,
19
+ showGutter: true,
20
+ }"
21
+ />
22
+ <div class="apply">
15
23
  <b-row>
16
24
  <b-col class="text-right">
17
- <Button key="applyCode" type="primary" title="Aplicar" classIcon="far fa-code" size="small" :clicked="apply" />
25
+ <Button
26
+ key="applyCode"
27
+ type="primary"
28
+ title="Aplicar"
29
+ classIcon="far fa-code"
30
+ size="small"
31
+ :clicked="apply"
32
+ />
18
33
  </b-col>
19
34
  </b-row>
20
35
  </div>
@@ -33,13 +48,6 @@ export default {
33
48
  AceEditor,
34
49
  Button,
35
50
  },
36
- props: {
37
- showButtonApply: {
38
- type: Boolean,
39
- default: true
40
- },
41
- value: String,
42
- },
43
51
  data() {
44
52
  return {
45
53
  code: "",
@@ -56,12 +64,7 @@ export default {
56
64
  },
57
65
  },
58
66
  mounted() {
59
- if (this.value) {
60
- this.code = this.value;
61
- }
62
- else {
63
- this.code = this.documentHtml;
64
- }
67
+ this.code = this.documentHtml;
65
68
  },
66
69
  methods: {
67
70
  ...mapMutations("generic", [
@@ -83,14 +86,6 @@ export default {
83
86
  require("brace/snippets/javascript"); //snippet
84
87
  },
85
88
  },
86
- watch: {
87
- code() {
88
- this.$emit("input", this.code);
89
- },
90
- value() {
91
- this.code = this.value;
92
- },
93
- },
94
89
  };
95
90
  </script>
96
91
  <style scoped>
@@ -16,11 +16,7 @@
16
16
  <thead>
17
17
  <tr>
18
18
  <th v-for="(obj, ind) in header" :key="ind">
19
- <div
20
- class="title-margem"
21
- :class="obj.classCssTitle"
22
- :style="obj.styleHeader"
23
- >
19
+ <div class="title-margem" :class="obj.classCssTitle" :style="obj.styleHeader">
24
20
  <i class="fas fa-search" v-if="obj.iconSearch"></i>
25
21
  <span class="title-header"> {{ obj.title }}</span>
26
22
  </div>
@@ -30,40 +26,20 @@
30
26
  <tbody>
31
27
  <tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
32
28
  <td v-for="(obj, ind) in header" :key="ind">
33
- <div
34
- :style="obj.styleBody"
35
- :class="
36
- convertClass(row[obj.fieldComparison], obj.classCssBody)
37
- "
38
- v-if="obj.type === 'text'"
39
- >
29
+ <div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
30
+ " v-if="obj.type === 'text'">
40
31
  {{ row[obj.field] }}
41
32
  </div>
42
- <div
43
- :style="obj.styleBody"
44
- :class="
45
- convertClass(row[obj.fieldComparison], obj.classCssBody)
46
- "
47
- v-if="obj.type === 'date'"
48
- >
33
+ <div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
34
+ " v-if="obj.type === 'date'">
49
35
  {{ row[obj.field] | moment("DD/MM/YYYY") }}
50
36
  </div>
51
- <div
52
- :style="obj.styleBody"
53
- :class="
54
- convertClass(row[obj.fieldComparison], obj.classCssBody)
55
- "
56
- v-if="obj.type === 'dateTime'"
57
- >
37
+ <div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
38
+ " v-if="obj.type === 'dateTime'">
58
39
  {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
59
40
  </div>
60
- <div
61
- :style="obj.styleBody"
62
- :class="
63
- convertClass(row[obj.fieldComparison], obj.classCssBody)
64
- "
65
- v-if="obj.type === 'currency'"
66
- >
41
+ <div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
42
+ " v-if="obj.type === 'currency'">
67
43
  {{ row[obj.field] | currency }}
68
44
  </div>
69
45
  </td>
@@ -78,10 +54,7 @@
78
54
  </tbody>
79
55
  </table>
80
56
  <div>
81
- <TotalizationReport
82
- :totalization="totalization"
83
- :totalRecords="data.length"
84
- />
57
+ <TotalizationReport :totalization="totalization" :totalRecords="data.length" />
85
58
  </div>
86
59
  </div>
87
60
  </ScrollBar>
@@ -220,5 +193,4 @@ table tbody tr td {
220
193
  .rejected {
221
194
  color: #f0134d;
222
195
  }
223
-
224
196
  </style>
@@ -5,27 +5,15 @@
5
5
  <div class="molded">
6
6
  <b-row>
7
7
  <b-col sm="9">
8
- <input
9
- type="text"
10
- name="search"
11
- placeholder="Pesquisar ..."
12
- @keyup="verifyCleanSearch()"
13
- @keyup.enter.prevent="executeSearch()"
14
- v-model="search.content"
15
- /></b-col>
8
+ <input type="text" name="search" placeholder="Pesquisar ..." @keyup="verifyCleanSearch()"
9
+ @keyup.enter.prevent="executeSearch()" v-model="search.content" /></b-col>
16
10
  <b-col sm="3">
17
11
  <div class="div-select">
18
- <SelectStatic
19
- fieldTarget="filter"
20
- :onlyQuery="true"
21
- :initialValue="{ content: 'Contém', id: 'contains' }"
22
- v-model="search.filter"
23
- :showBorder="false"
24
- :data="[
12
+ <SelectStatic fieldTarget="filter" :onlyQuery="true" :initialValue="{ content: 'Contém', id: 'contains' }"
13
+ v-model="search.filter" :showBorder="false" :data="[
25
14
  { content: 'Contém', id: 'contains' },
26
15
  { content: 'Igual', id: 'equal' },
27
- ]"
28
- />
16
+ ]" />
29
17
  </div>
30
18
  </b-col>
31
19
  </b-row>
@@ -34,22 +22,10 @@
34
22
  </b-col>
35
23
  <b-col xs="4" sm="4" md="4" lg="4" xl="4">
36
24
  <div class="div-button">
37
- <Button
38
- _key="btnSearch"
39
- type="info"
40
- title="Buscar"
41
- classIcon="fas fa-search"
42
- size="small"
43
- :clicked="executeSearch"
44
- />
45
- <Button
46
- _key="btnClean"
47
- type="info"
48
- title="Limpar"
49
- classIcon="fas fa-broom"
50
- size="small"
51
- :clicked="executeClean"
52
- />
25
+ <Button _key="btnSearch" type="info" title="Buscar" classIcon="fas fa-search" size="small"
26
+ :clicked="executeSearch" />
27
+ <Button _key="btnClean" type="info" title="Limpar" classIcon="fas fa-broom" size="small"
28
+ :clicked="executeClean" />
53
29
  </div>
54
30
  </b-col>
55
31
  </b-row>
@@ -150,5 +126,4 @@ input[type="text"]:focus {
150
126
  margin-top: -30px;
151
127
  margin-right: 5px;
152
128
  }
153
-
154
129
  </style>
@@ -16,23 +16,14 @@
16
16
  </th>
17
17
  </tr>
18
18
  </thead>
19
- <draggable
20
- v-model="data"
21
- tag="tbody"
22
- @change="checkMove"
23
- :options="{ disabled: !dragAndDrop }"
24
- >
19
+ <draggable v-model="data" tag="tbody" @change="checkMove" :options="{ disabled: !dragAndDrop }">
25
20
  <tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
26
21
  <td class="td-checkbox" v-if="showChecks">
27
22
  <div :class="{ 'center-vertical': row.photo != null }">
28
23
  <b-form-checkbox v-model="selected" :value="row.id" />
29
24
  </div>
30
25
  </td>
31
- <td
32
- v-for="(obj, ind) in header"
33
- :key="ind"
34
- :class="{ 'drag-and-drop': dragAndDrop }"
35
- >
26
+ <td v-for="(obj, ind) in header" :key="ind" :class="{ 'drag-and-drop': dragAndDrop }">
36
27
  <TableItem :obj="obj" :row="row" />
37
28
  </td>
38
29
  </tr>
@@ -1,83 +1,44 @@
1
1
  <template>
2
2
  <div>
3
- <div
4
- v-if="obj.type === 'period-rent'"
5
- class="period-rent"
6
- @click="navegateTo(obj, row)"
7
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
8
- >
9
- <DisplayPeriodRent
10
- :periodRent="row[obj.field]"
11
- :fontSize="14"
12
- :showDeliveryDevolution="true"
13
- />
3
+ <div v-if="obj.type === 'period-rent'" class="period-rent" @click="navegateTo(obj, row)" :style="obj.styleBody"
4
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
5
+ <DisplayPeriodRent :periodRent="row[obj.field]" :fontSize="14" :showDeliveryDevolution="true" />
14
6
  </div>
15
- <div
16
- v-if="obj.type === 'text'"
17
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
18
- >
7
+ <div v-if="obj.type === 'text'" :style="obj.styleBody"
8
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
19
9
  {{ row[obj.field] }}
20
10
  <div>{{ row[obj.fieldSecond] }}</div>
21
11
  </div>
22
12
  <div v-if="obj.type === 'image'">
23
- <img
24
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
25
- class="img"
26
- :src="urlImage + obj.container + '/' + row[obj.field]"
27
- />
13
+ <img :class="convertClass(row[obj.fieldComparison], obj.classCssBody)" class="img"
14
+ :src="urlImage + obj.container + '/' + row[obj.field]" />
28
15
  </div>
29
16
  <div v-if="obj.type === 'class'" class="text-center">
30
17
  <div :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
31
18
  {{ row[obj.field] }}
32
19
  </div>
33
20
  </div>
34
- <div
35
- v-if="obj.type === 'html'"
36
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
37
- >
21
+ <div v-if="obj.type === 'html'" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
38
22
  <div v-if="row[obj.field]" v-html="row[obj.field]"></div>
39
23
  <div v-else v-html="obj.html"></div>
40
24
  </div>
41
- <div
42
- v-if="obj.type === 'select'"
43
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
44
- >
25
+ <div v-if="obj.type === 'select'" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
45
26
  {{ row[obj.field].content }}
46
27
  </div>
47
- <div
48
- v-if="obj.type === 'date'"
49
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
50
- >
28
+ <div v-if="obj.type === 'date'" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
51
29
  {{ row[obj.field] | moment("DD/MM/YYYY") }}
52
30
  </div>
53
- <div
54
- v-if="obj.type === 'dateTime'"
55
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
56
- >
31
+ <div v-if="obj.type === 'dateTime'" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
57
32
  {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
58
33
  </div>
59
- <div
60
- v-if="obj.type === 'currency'"
61
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
62
- >
34
+ <div v-if="obj.type === 'currency'" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
63
35
  {{ row[obj.field] | currency }}
64
36
  </div>
65
- <div
66
- v-if="obj.type === 'button'"
67
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
68
- >
69
- <TableButton
70
- v-if="obj.ifFieldEqual == row[obj.field]"
71
- :obj="obj"
72
- :row="row"
73
- />
37
+ <div v-if="obj.type === 'button'" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
38
+ <TableButton v-if="obj.ifFieldEqual == row[obj.field]" :obj="obj" :row="row" />
74
39
  </div>
75
- <div
76
- v-if="obj.type === 'link'"
77
- class="link"
78
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
79
- @click="navegateTo(obj, row)"
80
- >
40
+ <div v-if="obj.type === 'link'" class="link" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
41
+ @click="navegateTo(obj, row)">
81
42
  <span> {{ row[obj.field] }}</span>
82
43
  <div class="field-second">{{ row[obj.fieldSecond] }}</div>
83
44
  </div>
@@ -1,12 +1,7 @@
1
1
  <template>
2
2
  <div>
3
- <Panel
4
- :module="panel.module"
5
- :title="panel.title"
6
- :showFilter="panel.showFilter"
7
- :showSearch="panel.showSearch"
8
- :showButtons="panel.showButtons"
9
- >
3
+ <Panel :module="panel.module" :title="panel.title" :showFilter="panel.showFilter" :showSearch="panel.showSearch"
4
+ :showButtons="panel.showButtons">
10
5
  <div slot="content-main">
11
6
  <div>
12
7
  <div class="div-top">
@@ -14,65 +9,30 @@
14
9
  <b-row>
15
10
  <b-col sm="6">
16
11
  <div class="side-by-side">
17
- <Button
18
- _key="saveDocument"
19
- type="success"
20
- title="Salvar"
21
- classIcon="fas fa-save"
22
- :disabled="isDisabled"
23
- size="small"
24
- :clicked="saveDocument"
25
- />
12
+ <Button _key="saveDocument" type="success" title="Salvar" classIcon="fas fa-save"
13
+ :disabled="isDisabled" size="small" :clicked="saveDocument" />
26
14
  </div>
27
15
  <div class="side-by-side" v-if="showByRule">
28
- <Button
29
- v-if="id"
30
- _key="saveAs"
31
- type="success"
32
- title="Clonar"
33
- classIcon="fas fa-clone"
34
- size="small"
35
- :clicked="saveAs"
36
- />
16
+ <Button v-if="id" _key="saveAs" type="success" title="Clonar" classIcon="fas fa-clone" size="small"
17
+ :clicked="saveAs" />
37
18
  </div>
38
19
  </b-col>
39
20
  <b-col class="text-right" sm="6">
40
21
  <div class="side-by-side" v-if="id && showByRule">
41
- <Button
42
- key="showModalConfig"
43
- type="info"
44
- classIcon="fa-solid fa-gear"
45
- size="small"
46
- :clicked="showModalConfig"
47
- />
22
+ <Button key="showModalConfig" type="info" classIcon="fa-solid fa-gear" size="small"
23
+ :clicked="showModalConfig" />
48
24
  </div>
49
25
  <div class="side-by-side" v-if="showByRule">
50
- <Button
51
- key="showModalLegend"
52
- type="info"
53
- classIcon="fas fa-book-reader"
54
- size="small"
55
- :clicked="showModalLegend"
56
- />
26
+ <Button key="showModalLegend" type="info" classIcon="fas fa-book-reader" size="small"
27
+ :clicked="showModalLegend" />
57
28
  </div>
58
29
  <div class="side-by-side" v-if="showByRule">
59
- <Button
60
- key="showModalCode"
61
- type="info"
62
- classIcon="far fa-code"
63
- size="small"
64
- :clicked="showModalCode"
65
- />
30
+ <Button key="showModalCode" type="info" classIcon="far fa-code" size="small"
31
+ :clicked="showModalCode" />
66
32
  </div>
67
33
  <div class="side-by-side">
68
- <Button
69
- key="showModalPreview"
70
- type="info"
71
- title="Visualizar"
72
- classIcon="far fa-eye"
73
- size="small"
74
- :clicked="showModalPreview"
75
- />
34
+ <Button key="showModalPreview" type="info" title="Visualizar" classIcon="far fa-eye" size="small"
35
+ :clicked="showModalPreview" />
76
36
  </div>
77
37
  </b-col>
78
38
  </b-row>
@@ -82,11 +42,7 @@
82
42
  <slot></slot>
83
43
  </Modal>
84
44
  <Modal title="Parâmetros" :width="1100" v-show="showModal('legenda')">
85
- <ParameterLegend
86
- v-show="modal.open"
87
- :legend="parameterLegend"
88
- :module="module"
89
- />
45
+ <ParameterLegend v-show="modal.open" :legend="parameterLegend" :module="module" />
90
46
  </Modal>
91
47
  <Modal title="Editor de Código" :width="900" v-if="showModal('code')">
92
48
  <CodeEditor v-if="modal.open" />
@@ -95,16 +51,8 @@
95
51
  <div v-if="modal.open">
96
52
  <b-row>
97
53
  <b-col class="text-center">
98
- <Button
99
- v-if="false"
100
- v-print="'#printMe'"
101
- key="print"
102
- type="edit"
103
- title="Imprimir"
104
- classIcon="fas fa-print"
105
- size="small"
106
- :clicked="print"
107
- />
54
+ <Button v-if="false" v-print="'#printMe'" key="print" type="edit" title="Imprimir"
55
+ classIcon="fas fa-print" size="small" :clicked="print" />
108
56
  </b-col>
109
57
  </b-row>
110
58
  <br />
@@ -112,10 +60,7 @@
112
60
  <div>
113
61
  <div class="a4">
114
62
  <div id="printMe">
115
- <DocumentPreview
116
- :template="documentPreview('dev')"
117
- :d="parameterExemple"
118
- />
63
+ <DocumentPreview :template="documentPreview('dev')" :d="parameterExemple" />
119
64
  </div>
120
65
  </div>
121
66
  </div>
@@ -247,9 +192,11 @@ export default {
247
192
  .div-top {
248
193
  margin-top: 30px;
249
194
  }
195
+
250
196
  .div-editor {
251
197
  margin-top: 25px;
252
198
  }
199
+
253
200
  .a4 {
254
201
  max-width: 1140px;
255
202
  min-height: 21cm;
@@ -696,6 +696,7 @@ export default {
696
696
  return axios.get(params.url, {
697
697
  params: params.obj,
698
698
  responseType: "arraybuffer",
699
+ headers: new Token().tokenHeaders(),
699
700
  })
700
701
  .then((response) => {
701
702
  let blob = new Blob([response.data], { type: "application/pdf" }),
@@ -56,6 +56,9 @@ export default {
56
56
  },
57
57
  updateToken: (state, token) => {
58
58
  state.userLogged.token = token;
59
+ },
60
+ updateComunication: (state) => {
61
+ state.userLogged.user.showComunication = false;
59
62
  }
60
63
  },
61
64
  }