@nixweb/nixloc-ui 0.0.111 → 0.0.112
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/ckeditor5/LICENSE.md +49 -0
- package/ckeditor5/README.md +68 -0
- package/ckeditor5/build/ckeditor.js +41694 -0
- package/ckeditor5/build/ckeditor.js.map +1 -0
- package/ckeditor5/build/translations/af.js +1 -0
- package/ckeditor5/build/translations/ar.js +1 -0
- package/ckeditor5/build/translations/ast.js +1 -0
- package/ckeditor5/build/translations/az.js +1 -0
- package/ckeditor5/build/translations/bg.js +1 -0
- package/ckeditor5/build/translations/bs.js +1 -0
- package/ckeditor5/build/translations/ca.js +1 -0
- package/ckeditor5/build/translations/cs.js +1 -0
- package/ckeditor5/build/translations/da.js +1 -0
- package/ckeditor5/build/translations/de-ch.js +1 -0
- package/ckeditor5/build/translations/de.js +1 -0
- package/ckeditor5/build/translations/el.js +1 -0
- package/ckeditor5/build/translations/en-au.js +1 -0
- package/ckeditor5/build/translations/en-gb.js +1 -0
- package/ckeditor5/build/translations/en.js +1 -0
- package/ckeditor5/build/translations/eo.js +1 -0
- package/ckeditor5/build/translations/es.js +1 -0
- package/ckeditor5/build/translations/et.js +1 -0
- package/ckeditor5/build/translations/eu.js +1 -0
- package/ckeditor5/build/translations/fa.js +1 -0
- package/ckeditor5/build/translations/fi.js +1 -0
- package/ckeditor5/build/translations/fr.js +1 -0
- package/ckeditor5/build/translations/gl.js +1 -0
- package/ckeditor5/build/translations/gu.js +1 -0
- package/ckeditor5/build/translations/he.js +1 -0
- package/ckeditor5/build/translations/hi.js +1 -0
- package/ckeditor5/build/translations/hr.js +1 -0
- package/ckeditor5/build/translations/hu.js +1 -0
- package/ckeditor5/build/translations/id.js +1 -0
- package/ckeditor5/build/translations/it.js +1 -0
- package/ckeditor5/build/translations/ja.js +1 -0
- package/ckeditor5/build/translations/jv.js +1 -0
- package/ckeditor5/build/translations/kk.js +1 -0
- package/ckeditor5/build/translations/km.js +1 -0
- package/ckeditor5/build/translations/kn.js +1 -0
- package/ckeditor5/build/translations/ko.js +1 -0
- package/ckeditor5/build/translations/ku.js +1 -0
- package/ckeditor5/build/translations/lt.js +1 -0
- package/ckeditor5/build/translations/lv.js +1 -0
- package/ckeditor5/build/translations/nb.js +1 -0
- package/ckeditor5/build/translations/ne.js +1 -0
- package/ckeditor5/build/translations/nl.js +1 -0
- package/ckeditor5/build/translations/no.js +1 -0
- package/ckeditor5/build/translations/oc.js +1 -0
- package/ckeditor5/build/translations/pl.js +1 -0
- package/ckeditor5/build/translations/pt.js +1 -0
- package/ckeditor5/build/translations/ro.js +1 -0
- package/ckeditor5/build/translations/ru.js +1 -0
- package/ckeditor5/build/translations/si.js +1 -0
- package/ckeditor5/build/translations/sk.js +1 -0
- package/ckeditor5/build/translations/sl.js +1 -0
- package/ckeditor5/build/translations/sq.js +1 -0
- package/ckeditor5/build/translations/sr-latn.js +1 -0
- package/ckeditor5/build/translations/sr.js +1 -0
- package/ckeditor5/build/translations/sv.js +1 -0
- package/ckeditor5/build/translations/th.js +1 -0
- package/ckeditor5/build/translations/tk.js +1 -0
- package/ckeditor5/build/translations/tr.js +1 -0
- package/ckeditor5/build/translations/tt.js +1 -0
- package/ckeditor5/build/translations/ug.js +1 -0
- package/ckeditor5/build/translations/uk.js +1 -0
- package/ckeditor5/build/translations/uz.js +1 -0
- package/ckeditor5/build/translations/vi.js +1 -0
- package/ckeditor5/build/translations/zh-cn.js +1 -0
- package/ckeditor5/build/translations/zh.js +1 -0
- package/ckeditor5/package.json +42 -0
- package/ckeditor5/sample/index.html +133 -0
- package/ckeditor5/sample/styles.css +500 -0
- package/ckeditor5/src/ckeditor.js +127 -0
- package/ckeditor5/webpack.config.js +96 -0
- package/package.json +2 -1
- package/src/component/shared/CodigoEditor.vue +28 -5
- package/src/component/shared/DocumentoPreview.vue +4 -12
- package/src/component/shared/LegendaParametro.vue +101 -0
- package/src/component/shared/Tabela.vue +1 -1
- package/src/component/template/ModeloDocumentoView.vue +12 -14
- package/src/store/modulos/generic.js +12 -1
- package/src/component/shared/ConfiguracaoTabela.vue +0 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nixweb/nixloc-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.112",
|
|
4
4
|
"description": "Componentes UI",
|
|
5
5
|
"author": "Fábio Ávila <fabio@nixweb.com.br>",
|
|
6
6
|
"private": false,
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@babel/polyfill": "^7.2.5",
|
|
14
14
|
"@ckeditor/ckeditor5-vue2": "^2.0.0",
|
|
15
15
|
"bootstrap-vue": "^2.0.0-rc.11",
|
|
16
|
+
"ckeditor5-custom-build": "file:ckeditor5",
|
|
16
17
|
"sass-loader": "^12.4.0",
|
|
17
18
|
"v-runtime-template": "^1.10.0",
|
|
18
19
|
"vodal": "^2.4.0",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<button @click="aplicar()">Aplicar</button>
|
|
4
3
|
<AceEditor
|
|
5
4
|
v-model="codigo"
|
|
6
5
|
lang="html"
|
|
@@ -20,11 +19,26 @@
|
|
|
20
19
|
showGutter: true,
|
|
21
20
|
}"
|
|
22
21
|
/>
|
|
22
|
+
<div class="aplicar">
|
|
23
|
+
<b-row>
|
|
24
|
+
<b-col class="text-right">
|
|
25
|
+
<Botao
|
|
26
|
+
chave="aplicarCodigo"
|
|
27
|
+
tipo="primario"
|
|
28
|
+
titulo="Aplicar"
|
|
29
|
+
classeIcone="far fa-code"
|
|
30
|
+
tamanho="pequeno"
|
|
31
|
+
:clique="aplicar"
|
|
32
|
+
/>
|
|
33
|
+
</b-col>
|
|
34
|
+
</b-row>
|
|
35
|
+
</div>
|
|
23
36
|
</div>
|
|
24
37
|
</template>
|
|
25
38
|
|
|
26
39
|
<script>
|
|
27
40
|
import AceEditor from "vuejs-ace-editor";
|
|
41
|
+
import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
|
|
28
42
|
|
|
29
43
|
import { mapMutations } from "vuex";
|
|
30
44
|
|
|
@@ -32,6 +46,7 @@ export default {
|
|
|
32
46
|
name: "CodigoEditor",
|
|
33
47
|
components: {
|
|
34
48
|
AceEditor,
|
|
49
|
+
Botao,
|
|
35
50
|
},
|
|
36
51
|
data() {
|
|
37
52
|
return {
|
|
@@ -52,12 +67,15 @@ export default {
|
|
|
52
67
|
this.codigo = this.documentoHtml;
|
|
53
68
|
},
|
|
54
69
|
methods: {
|
|
55
|
-
...mapMutations("generic", [
|
|
70
|
+
...mapMutations("generic", [
|
|
71
|
+
"atualizaDocumentoHtml",
|
|
72
|
+
"fecharModal",
|
|
73
|
+
"removeCarregando",
|
|
74
|
+
]),
|
|
56
75
|
aplicar() {
|
|
57
76
|
this.atualizaDocumentoHtml(this.codigo);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
//code here
|
|
77
|
+
this.fecharModal("codigo");
|
|
78
|
+
this.removeCarregando(["aplicarCodigo"]);
|
|
61
79
|
},
|
|
62
80
|
editorInit: function () {
|
|
63
81
|
require("brace/ext/language_tools"); //language extension prerequsite...
|
|
@@ -70,3 +88,8 @@ export default {
|
|
|
70
88
|
},
|
|
71
89
|
};
|
|
72
90
|
</script>
|
|
91
|
+
<style scoped>
|
|
92
|
+
.aplicar {
|
|
93
|
+
margin-top: 10px;
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
<script>
|
|
6
6
|
import VRuntimeTemplate from "v-runtime-template";
|
|
7
7
|
|
|
8
|
+
import { mapGetters } from "vuex";
|
|
9
|
+
|
|
8
10
|
export default {
|
|
9
11
|
name: "HtmlPreview",
|
|
10
12
|
components: {
|
|
@@ -15,16 +17,6 @@ export default {
|
|
|
15
17
|
dados: Object,
|
|
16
18
|
},
|
|
17
19
|
methods: {
|
|
18
|
-
agruparPor(array, key) {
|
|
19
|
-
const result = {};
|
|
20
|
-
array.forEach((item) => {
|
|
21
|
-
if (!result[item[key]]) {
|
|
22
|
-
result[item[key]] = [];
|
|
23
|
-
}
|
|
24
|
-
result[item[key]].push(item);
|
|
25
|
-
});
|
|
26
|
-
return result;
|
|
27
|
-
},
|
|
28
20
|
somaGrupo(grupoNome) {
|
|
29
21
|
let total = "";
|
|
30
22
|
this.dados.produto.forEach((x) => {
|
|
@@ -34,10 +26,10 @@ export default {
|
|
|
34
26
|
},
|
|
35
27
|
},
|
|
36
28
|
computed: {
|
|
29
|
+
...mapGetters("generic", ["agruparPor"]),
|
|
37
30
|
produtoAgrupado() {
|
|
38
|
-
return this.agruparPor(this.dados.produto, "grupoNome");
|
|
31
|
+
return this.agruparPor({ array: this.dados.produto, key: "grupoNome" });
|
|
39
32
|
},
|
|
40
33
|
},
|
|
41
34
|
};
|
|
42
35
|
</script>
|
|
43
|
-
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="div-alerta">
|
|
4
|
+
<Alerta tipo="info">
|
|
5
|
+
<span>
|
|
6
|
+
Utilize os parâmetros para que as informações sejam carregadas de forma
|
|
7
|
+
dinâmicas!</span
|
|
8
|
+
>
|
|
9
|
+
</Alerta>
|
|
10
|
+
</div>
|
|
11
|
+
<table class="table table-responsive-xs">
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th><span class="titulo-cabecalho">Parâmetro</span></th>
|
|
15
|
+
<th><span class="titulo-cabecalho">Descrição</span></th>
|
|
16
|
+
<th><span class="titulo-cabecalho">Exemplo</span></th>
|
|
17
|
+
</tr>
|
|
18
|
+
</thead>
|
|
19
|
+
<tbody v-for="(legenda, grupoNome) in agrupado">
|
|
20
|
+
<td class="grupo" colspan="8">
|
|
21
|
+
<div>{{ grupoNome }}</div>
|
|
22
|
+
</td>
|
|
23
|
+
<tr v-for="item in legenda">
|
|
24
|
+
<td>
|
|
25
|
+
<span> {{ item.parametro }}</span>
|
|
26
|
+
</td>
|
|
27
|
+
<td>
|
|
28
|
+
<span> {{ item.descricao }}</span>
|
|
29
|
+
</td>
|
|
30
|
+
<td>
|
|
31
|
+
<span> {{ item.exemplo }}</span>
|
|
32
|
+
</td>
|
|
33
|
+
</tr>
|
|
34
|
+
</tbody>
|
|
35
|
+
</table>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
<script>
|
|
39
|
+
import Alerta from "@nixweb/nixloc-ui/src/component/layout/Alerta";
|
|
40
|
+
|
|
41
|
+
import { mapGetters } from "vuex";
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
name: "LegendaParametro",
|
|
45
|
+
components: {
|
|
46
|
+
Alerta,
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
legenda: [
|
|
51
|
+
{
|
|
52
|
+
grupoNome: "Locação",
|
|
53
|
+
parametro: "{{d.l.n}}",
|
|
54
|
+
descricao: "Número da Locação",
|
|
55
|
+
exemplo: "200",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
grupoNome: "Locação",
|
|
59
|
+
parametro: "{{d.l.dA}}",
|
|
60
|
+
descricao: "Número da Locação",
|
|
61
|
+
exemplo: "200",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
computed: {
|
|
67
|
+
...mapGetters("generic", ["agruparPor"]),
|
|
68
|
+
agrupado() {
|
|
69
|
+
var teste = this.agruparPor({ array: this.legenda, key: "grupoNome" });
|
|
70
|
+
console.log(teste);
|
|
71
|
+
return teste;
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
</script>
|
|
76
|
+
<style scoped>
|
|
77
|
+
.table th,
|
|
78
|
+
.table td {
|
|
79
|
+
height: 10px !important;
|
|
80
|
+
padding-left: 5px !important;
|
|
81
|
+
padding-top: 7px !important;
|
|
82
|
+
padding-bottom: 5px !important;
|
|
83
|
+
padding-right: 5px !important;
|
|
84
|
+
border-bottom: 0px !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.titulo-cabecalho {
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
color: #757d8c;
|
|
90
|
+
font-weight: 400;
|
|
91
|
+
text-transform: uppercase;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.grupo {
|
|
95
|
+
background-color: #fafafc;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.div-alerta {
|
|
99
|
+
margin-bottom: 20px;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
<b-col class="text-right" sm="6">
|
|
40
40
|
<div class="lado-a-lado">
|
|
41
41
|
<Botao
|
|
42
|
-
chave="
|
|
42
|
+
chave="abrirLegenda"
|
|
43
43
|
tipo="info"
|
|
44
|
-
classeIcone="fas fa-
|
|
44
|
+
classeIcone="fas fa-book-reader"
|
|
45
45
|
tamanho="pequeno"
|
|
46
|
-
:clique="
|
|
46
|
+
:clique="abrirLegenda"
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="lado-a-lado">
|
|
@@ -72,15 +72,13 @@
|
|
|
72
72
|
<Modal titulo="Salvar" :largura="500" v-show="mostrarModal('salvarDocumento')">
|
|
73
73
|
<slot></slot>
|
|
74
74
|
</Modal>
|
|
75
|
-
<Modal titulo="
|
|
76
|
-
<BarraRolagem :alturaMinima="
|
|
77
|
-
<
|
|
75
|
+
<Modal titulo="Parâmetros" :largura="900" v-if="mostrarModal('legenda')">
|
|
76
|
+
<BarraRolagem :alturaMinima="400" :alturaMaxima="400">
|
|
77
|
+
<LegendaParametro />
|
|
78
78
|
</BarraRolagem>
|
|
79
79
|
</Modal>
|
|
80
80
|
<Modal titulo="Editor de Código" :largura="900" v-if="mostrarModal('codigo')">
|
|
81
|
-
<
|
|
82
|
-
<CodigoEditor v-if="modal.abrir" />
|
|
83
|
-
</BarraRolagem>
|
|
81
|
+
<CodigoEditor v-if="modal.abrir" />
|
|
84
82
|
</Modal>
|
|
85
83
|
<Modal titulo="Visualizar" :largura="1100" v-if="mostrarModal('visualizar')">
|
|
86
84
|
<div v-if="modal.abrir">
|
|
@@ -122,7 +120,7 @@ import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel";
|
|
|
122
120
|
import DocumentoEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentoEditor.vue";
|
|
123
121
|
import DocumentoPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentoPreview.vue";
|
|
124
122
|
import CodigoEditor from "@nixweb/nixloc-ui/src/component/shared/CodigoEditor.vue";
|
|
125
|
-
import
|
|
123
|
+
import LegendaParametro from "@nixweb/nixloc-ui/src/component/shared/LegendaParametro.vue";
|
|
126
124
|
import Moldura from "@nixweb/nixloc-ui/src/component/layout/Moldura";
|
|
127
125
|
import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
|
|
128
126
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
@@ -142,7 +140,7 @@ export default {
|
|
|
142
140
|
DocumentoEditor,
|
|
143
141
|
DocumentoPreview,
|
|
144
142
|
CodigoEditor,
|
|
145
|
-
|
|
143
|
+
LegendaParametro,
|
|
146
144
|
Moldura,
|
|
147
145
|
Botao,
|
|
148
146
|
Modal,
|
|
@@ -180,9 +178,9 @@ export default {
|
|
|
180
178
|
fazerCopia() {
|
|
181
179
|
this.insereEvento({ nome: "fazerCopia" });
|
|
182
180
|
},
|
|
183
|
-
|
|
184
|
-
this.abrirModal("
|
|
185
|
-
this.removeCarregando(["
|
|
181
|
+
abrirLegenda() {
|
|
182
|
+
this.abrirModal("legenda");
|
|
183
|
+
this.removeCarregando(["abrirLegenda"]);
|
|
186
184
|
},
|
|
187
185
|
abrirCodigo() {
|
|
188
186
|
this.abrirModal("codigo");
|
|
@@ -144,7 +144,17 @@ export default {
|
|
|
144
144
|
.replaceAll("<p> !important;</p>", "<p> </p>");
|
|
145
145
|
|
|
146
146
|
return classeImportant;
|
|
147
|
-
}
|
|
147
|
+
},
|
|
148
|
+
agruparPor: () => (obj) => {
|
|
149
|
+
const result = {};
|
|
150
|
+
obj.array.forEach((item) => {
|
|
151
|
+
if (!result[item[obj.key]]) {
|
|
152
|
+
result[item[obj.key]] = [];
|
|
153
|
+
}
|
|
154
|
+
result[item[obj.key]].push(item);
|
|
155
|
+
});
|
|
156
|
+
return result;
|
|
157
|
+
},
|
|
148
158
|
},
|
|
149
159
|
mutations: {
|
|
150
160
|
abrirModal: (state, nome) => {
|
|
@@ -236,6 +246,7 @@ export default {
|
|
|
236
246
|
state.EscolherEstatico.campoAlvo = obj.campoAlvo;
|
|
237
247
|
state.EscolherEstatico.valor = obj.valor;
|
|
238
248
|
},
|
|
249
|
+
|
|
239
250
|
},
|
|
240
251
|
actions: {
|
|
241
252
|
postApi: async function (context, params) {
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-row>
|
|
4
|
-
<b-col sm="6"
|
|
5
|
-
><EscolherEstatico
|
|
6
|
-
titulo="Primeira Tabela"
|
|
7
|
-
:valorInicial="{ conteudo: '10', id: 10 }"
|
|
8
|
-
:dados="opcoes"
|
|
9
|
-
/></b-col>
|
|
10
|
-
<b-col sm="6"
|
|
11
|
-
><EscolherEstatico
|
|
12
|
-
titulo="Segunda Tabela"
|
|
13
|
-
:valorInicial="{ conteudo: '10', id: 10 }"
|
|
14
|
-
:dados="opcoes"
|
|
15
|
-
/></b-col>
|
|
16
|
-
</b-row>
|
|
17
|
-
<b-row>
|
|
18
|
-
<b-col sm="6"
|
|
19
|
-
><EscolherEstatico
|
|
20
|
-
titulo="Terceira Tabela"
|
|
21
|
-
:valorInicial="{ conteudo: '10', id: 10 }"
|
|
22
|
-
:dados="opcoes"
|
|
23
|
-
/></b-col>
|
|
24
|
-
<b-col sm="6"
|
|
25
|
-
><EscolherEstatico
|
|
26
|
-
titulo="Quarta Tabela"
|
|
27
|
-
:valorInicial="{ conteudo: '10', id: 10 }"
|
|
28
|
-
:dados="opcoes"
|
|
29
|
-
/></b-col>
|
|
30
|
-
</b-row>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
<script>
|
|
34
|
-
import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
|
|
35
|
-
import EscolherEstatico from "@nixweb/nixloc-ui/src/component/forms/EscolherEstatico.vue";
|
|
36
|
-
|
|
37
|
-
export default {
|
|
38
|
-
name: "ConfiguracaoTabela",
|
|
39
|
-
components: {
|
|
40
|
-
EscolherEstatico,
|
|
41
|
-
},
|
|
42
|
-
data() {
|
|
43
|
-
return {
|
|
44
|
-
opcoes: [
|
|
45
|
-
{ conteudo: "Produto", id: "v-for='n in dados.produtos'" },
|
|
46
|
-
{ conteudo: "Produto Agrupado", id: "v-for='n in dados.produtos'" },
|
|
47
|
-
{ conteudo: "Período", id: "v-for='n in dados.periodos'" },
|
|
48
|
-
{ conteudo: "Pagamento", id: "v-for='n in dados.pagamentos'" },
|
|
49
|
-
],
|
|
50
|
-
tabela1: "v-for='n in dados.produtos'",
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
</script>
|