mdz-enum 1.1.13 → 1.1.15

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/src/functions.ts DELETED
@@ -1,36 +0,0 @@
1
- export const listEnum = (object: any, filters = []) => {
2
- let list = []
3
- if (filters && filters.length > 0) {
4
- for (var filter in filters) {
5
- for (var key in object) {
6
- if (typeof object[key] === 'function') continue
7
-
8
- if (object[key] !== filters[filter]) continue
9
-
10
- const item = {
11
- value: object[key],
12
- label: object.description ? object.description(object[key]) : '',
13
- }
14
-
15
- list.push(item)
16
- }
17
- }
18
- } else {
19
- for (var key in object) {
20
- if (typeof object[key] === 'function') continue
21
-
22
- const item = {
23
- value: object[key],
24
- label: object.description ? object.description(object[key]) : '',
25
- }
26
-
27
- list.push(item)
28
- }
29
- }
30
-
31
- list = list.sort(function (a, b) {
32
- return b.label - a.label
33
- })
34
-
35
- return list
36
- }
@@ -1,267 +0,0 @@
1
- export const Situacao = {
2
- Inativo: '0',
3
- Ativo: '1',
4
-
5
- description(val: string) {
6
- switch (val) {
7
- case this.Inativo:
8
- return 'Inativo'
9
-
10
- case this.Ativo:
11
- return 'Ativo'
12
-
13
- default:
14
- return 'enum not found'
15
- }
16
- },
17
- }
18
-
19
- export const TipoCompartilhamento = {
20
- NotaFiscal: '1',
21
- PedidoVenda: '2',
22
- Boleto: '3',
23
-
24
- description(val: string) {
25
- switch (val) {
26
- case this.NotaFiscal:
27
- return 'Nota Fiscal'
28
-
29
- case this.PedidoVenda:
30
- return 'Pedido'
31
-
32
- case this.Boleto:
33
- return 'Boleto'
34
-
35
- default:
36
- return 'enum not found'
37
- }
38
- },
39
- }
40
-
41
- export const TipoDescontoGeneral = {
42
- Percentual: '0',
43
- Valor: '1',
44
- description(val: string) {
45
- switch (val) {
46
- case this.Percentual:
47
- return 'Percentual'
48
- case this.Valor:
49
- return 'Valor'
50
- default:
51
- return 'enum not found'
52
- }
53
- },
54
- }
55
-
56
- export const TipoTempo = {
57
- Dias: '1',
58
- Semanas: '2',
59
- Meses: '3',
60
- Anos: '4',
61
-
62
- description(val: string) {
63
- switch (val) {
64
- case this.Dias:
65
- return 'Dias'
66
-
67
- case this.Semanas:
68
- return 'Semanas'
69
-
70
- case this.Meses:
71
- return 'Meses'
72
-
73
- case this.Anos:
74
- return 'Anos'
75
- }
76
- },
77
- }
78
-
79
- export const Uf = {
80
- RO: '11',
81
- AC: '12',
82
- AM: '13',
83
- RR: '14',
84
- PA: '15',
85
- AP: '16',
86
- TO: '17',
87
- MA: '21',
88
- PI: '22',
89
- CE: '23',
90
- RN: '24',
91
- PB: '25',
92
- PE: '26',
93
- AL: '27',
94
- SE: '28',
95
- BA: '29',
96
- MG: '31',
97
- ES: '32',
98
- RJ: '33',
99
- SP: '35',
100
- PR: '41',
101
- SC: '42',
102
- RS: '43',
103
- MS: '50',
104
- MT: '51',
105
- GO: '52',
106
- DF: '53',
107
- AN: '91',
108
- EX: '99',
109
-
110
- description(val: string) {
111
- switch (val) {
112
- case this.RO:
113
- return 'Rondônia'
114
-
115
- case this.AC:
116
- return 'Acre'
117
-
118
- case this.AM:
119
- return 'Amazonas'
120
-
121
- case this.RR:
122
- return 'Roraima'
123
-
124
- case this.PA:
125
- return 'Pará'
126
-
127
- case this.AP:
128
- return 'Amapá'
129
-
130
- case this.TO:
131
- return 'Tocantins'
132
-
133
- case this.MA:
134
- return 'Maranhão'
135
-
136
- case this.RN:
137
- return 'Rio Grande do Norte'
138
-
139
- case this.PB:
140
- return 'Paraíba'
141
-
142
- case this.PE:
143
- return 'Pernambuco'
144
-
145
- case this.AL:
146
- return 'Alagoas'
147
-
148
- case this.SE:
149
- return 'Sergipe'
150
-
151
- case this.BA:
152
- return 'Bahia'
153
-
154
- case this.MG:
155
- return 'Minas Gerais'
156
-
157
- case this.ES:
158
- return 'Espírito Santo'
159
-
160
- case this.RJ:
161
- return 'Rio de Janeiro'
162
-
163
- case this.SP:
164
- return 'São Paulo'
165
-
166
- case this.PR:
167
- return 'Paraná'
168
-
169
- case this.SC:
170
- return 'Santa Catarina'
171
-
172
- case this.RS:
173
- return 'Rio Grande do Sul'
174
-
175
- case this.MS:
176
- return 'Mato Grosso do Sul'
177
-
178
- case this.MT:
179
- return 'Mato Grosso'
180
-
181
- case this.GO:
182
- return 'Goiás'
183
-
184
- case this.DF:
185
- return 'Distrito Federal'
186
- }
187
- },
188
-
189
- shortDescription(val: string) {
190
- switch (val) {
191
- case this.RO:
192
- return 'RO'
193
-
194
- case this.AC:
195
- return 'AC'
196
-
197
- case this.AM:
198
- return 'AM'
199
-
200
- case this.RR:
201
- return 'RR'
202
-
203
- case this.PA:
204
- return 'PA'
205
-
206
- case this.AP:
207
- return 'AP'
208
-
209
- case this.TO:
210
- return 'TO'
211
-
212
- case this.MA:
213
- return 'MA'
214
-
215
- case this.RN:
216
- return 'RN'
217
-
218
- case this.PB:
219
- return 'PB'
220
-
221
- case this.PE:
222
- return 'PE'
223
-
224
- case this.AL:
225
- return 'AL'
226
-
227
- case this.SE:
228
- return 'SE'
229
-
230
- case this.BA:
231
- return 'BA'
232
-
233
- case this.MG:
234
- return 'MG'
235
-
236
- case this.ES:
237
- return 'ES'
238
-
239
- case this.RJ:
240
- return 'RJ'
241
-
242
- case this.SP:
243
- return 'SP'
244
-
245
- case this.PR:
246
- return 'PR'
247
-
248
- case this.SC:
249
- return 'SC'
250
-
251
- case this.RS:
252
- return 'RS'
253
-
254
- case this.MS:
255
- return 'MS'
256
-
257
- case this.MT:
258
- return 'MT'
259
-
260
- case this.GO:
261
- return 'GO'
262
-
263
- case this.DF:
264
- return 'DF'
265
- }
266
- },
267
- }
package/src/index.ts DELETED
@@ -1,88 +0,0 @@
1
- export { listEnum } from './functions'
2
- export {
3
- SituacaoPedido,
4
- OperacaoPedido,
5
- OrigemPedido,
6
- TipoFrete,
7
- TipoDescontoPromocao,
8
- TipoMarketplace,
9
- SituacaoProdutoMarketplace,
10
- StatusProcessoCarrinho,
11
- TipoAplicacaoTabelaPreco,
12
- TipoValorTabelaPreco,
13
- } from './commercial'
14
- export {
15
- TipoDispositivo,
16
- TipoPermissao,
17
- TipoPeriferico,
18
- ModeloSat,
19
- ModoFinalizacao,
20
- VersaoLayoutSat,
21
- TipoPrecoPadrao,
22
- TipoEtiqueta,
23
- ModeloEtiqueta,
24
- ParametroEtiquetaProduto,
25
- } from './config'
26
- export {
27
- MeioPagamento,
28
- OperacaoOperadoraCartao,
29
- TipoCalculoParcelamento,
30
- TipoPromocao,
31
- IndicadorFormaPagamento,
32
- BandeiraCartao,
33
- SituacaoDocumentoFinanceiro,
34
- TipoLancamentoDocumentoFinanceiro,
35
- TipoCaixaOperacao,
36
- SituacaoCaixa,
37
- TipoValorConfiguracaoBoleto,
38
- SituacaoBoleto,
39
- SituacaoConciliacao,
40
- TipoDataDocumentoFinanceiro,
41
- TipoCalculoTaxaCartaoCredito,
42
- } from './finance'
43
- //teste de exportação
44
- export {
45
- COFINS,
46
- ICMS_CSOSN,
47
- ICMS_CST,
48
- IPI,
49
- PIS,
50
- TipoOperacaoNotaFiscal,
51
- OperacaoNotaFiscal,
52
- ModeloNotaFiscal,
53
- OrigemProduto,
54
- IdentificadorLocalDestino,
55
- AmbienteNotaFiscal,
56
- ConsumidorFinalNotaFiscal,
57
- FinalidadeEmissaoNotaFiscal,
58
- IndicadorIEDestinatario,
59
- IndicadorIntermediador,
60
- IndicadorPresencaNotaFiscal,
61
- ModalidadeBaseCalculo,
62
- ModalidadeBaseCalculoST,
63
- MotivoDesoneracao,
64
- RegimeTributario,
65
- TipoEmissaoNotaFiscal,
66
- TipoImpressaoDanfe,
67
- SituacaoNotaFiscal,
68
- TipoInformacaoAdicional,
69
- TipoDesconto,
70
- SituacaoManifestoDestinatario,
71
- TipoEventoManifestacao,
72
- } from './fiscal'
73
-
74
- export { Situacao, TipoCompartilhamento, TipoDescontoGeneral, TipoTempo, Uf } from './general'
75
- export { TipoEndereco, TipoPessoa, GeneroPessoa } from './people'
76
- export {
77
- TipoAtributo,
78
- TipoProduto,
79
- TipoValoracao,
80
- SituacaoMovimentacaoEstoque,
81
- OrigemMovimentacaoEstoque,
82
- TipoCategoria,
83
- TipoImagemGaleria,
84
- } from './logistics'
85
-
86
- export { TipoRelatorio, AgrupamentoRelatorio } from './reports/index'
87
-
88
- export { TipoOrganizacao, SituacaoOrganizacao } from './plataform'
@@ -1,185 +0,0 @@
1
- export const TipoAtributo = {
2
- Cor: '0',
3
- Tamanho: '1',
4
-
5
- description(val: string) {
6
- switch (val) {
7
- case this.Cor:
8
- return 'Cor'
9
-
10
- case this.Tamanho:
11
- return 'Tamanho'
12
-
13
- default:
14
- return 'enum not found'
15
- }
16
- },
17
- }
18
-
19
- export const TipoProduto = {
20
- Simples: '0',
21
- ComGrade: '1',
22
-
23
- description(val: string) {
24
- switch (val) {
25
- case this.Simples:
26
- return 'Simples'
27
-
28
- case this.ComGrade:
29
- return 'Com Grade'
30
-
31
- default:
32
- return 'enum not found'
33
- }
34
- },
35
- }
36
-
37
- export const TipoValoracao = {
38
- PrecoAquisicao: '0',
39
- PrecoCusto: '1',
40
- PrecoVenda: '2',
41
- PrecoAtacado: '3',
42
-
43
- description(val: string) {
44
- switch (val) {
45
- case this.PrecoAquisicao:
46
- return 'Preço de Aquisição'
47
-
48
- case this.PrecoCusto:
49
- return 'Preço de Custo'
50
-
51
- case this.PrecoVenda:
52
- return 'Preço de Venda'
53
-
54
- case this.PrecoAtacado:
55
- return 'Preço de Atacado'
56
-
57
- default:
58
- return 'enum not found'
59
- }
60
- },
61
- }
62
-
63
- export const SituacaoMovimentacaoEstoque = {
64
- EmEdicao: '0',
65
- Processado: '1',
66
- Estornado: '2',
67
-
68
- description(val: string) {
69
- switch (val) {
70
- case this.EmEdicao:
71
- return 'Em Edição'
72
-
73
- case this.Processado:
74
- return 'Processado'
75
-
76
- case this.Estornado:
77
- return 'Estornado'
78
-
79
- default:
80
- return 'enum not found'
81
- }
82
- },
83
- }
84
-
85
- export const OrigemMovimentacaoEstoque = {
86
- Manual: '1',
87
- NotaFiscal: '2',
88
- Pedido: '3',
89
-
90
- description(val: string) {
91
- switch (val) {
92
- case this.Manual:
93
- return 'Manual'
94
-
95
- case this.NotaFiscal:
96
- return 'Nota Fiscal'
97
-
98
- case this.Pedido:
99
- return 'Pedido'
100
-
101
- default:
102
- return 'enum not found'
103
- }
104
- },
105
- }
106
-
107
- export const TipoCategoria = {
108
- Beleza: '0',
109
- Bolsa: '1',
110
- Calçado: '2',
111
- Celular: '3',
112
- Decoracao: '4',
113
- Eletrodomestico: '5',
114
- Eletronico: '6',
115
- Esporte: '7',
116
- Ferramenta: '8',
117
- Game: '9',
118
- Movel: '10',
119
- Vestuario: '11',
120
- Saude: '12',
121
-
122
- description(val: string) {
123
- switch (val) {
124
- case this.Beleza:
125
- return 'Beleza'
126
-
127
- case this.Bolsa:
128
- return 'Bolsas'
129
-
130
- case this.Calçado:
131
- return 'Calçados'
132
-
133
- case this.Celular:
134
- return 'Celular'
135
-
136
- case this.Decoracao:
137
- return 'Decoração'
138
-
139
- case this.Eletrodomestico:
140
- return 'Eletrodomésticos'
141
-
142
- case this.Eletronico:
143
- return 'Eletrônicos'
144
-
145
- case this.Esporte:
146
- return 'Esportes'
147
-
148
- case this.Ferramenta:
149
- return 'Ferramentas'
150
-
151
- case this.Game:
152
- return 'Games'
153
-
154
- case this.Movel:
155
- return 'Móveis'
156
-
157
- case this.Vestuario:
158
- return 'Vestuário'
159
-
160
- case this.Saude:
161
- return 'Saúde'
162
-
163
- default:
164
- break
165
- }
166
- },
167
- }
168
-
169
- export const TipoImagemGaleria = {
170
- Geral: '0',
171
- PorGrade: '1',
172
-
173
- description(val: string) {
174
- switch (val) {
175
- case this.Geral:
176
- return 'Geral'
177
-
178
- case this.PorGrade:
179
- return 'Por Grade'
180
-
181
- default:
182
- return 'enum not found'
183
- }
184
- },
185
- }
@@ -1,53 +0,0 @@
1
- export const TipoEndereco = {
2
- Residencial: "0",
3
- Comercial: "1",
4
-
5
- description(val: string) {
6
- switch (val) {
7
- case this.Residencial:
8
- return "Residencial";
9
-
10
- case this.Comercial:
11
- return "Comercial";
12
-
13
- default:
14
- return "enum not found";
15
- }
16
- },
17
- };
18
-
19
- export const TipoPessoa = {
20
- Fisico: "0",
21
- Juridico: "1",
22
-
23
- description(val: string) {
24
- switch (val) {
25
- case this.Fisico:
26
- return "Físico";
27
-
28
- case this.Juridico:
29
- return "Jurídico";
30
-
31
- default:
32
- return "enum not found";
33
- }
34
- },
35
- };
36
-
37
- export const GeneroPessoa = {
38
- Masculino: "0",
39
- Feminino: "1",
40
-
41
- description(val: string) {
42
- switch (val) {
43
- case this.Masculino:
44
- return "Masculino";
45
-
46
- case this.Feminino:
47
- return "Feminino";
48
-
49
- default:
50
- return "enum not found";
51
- }
52
- },
53
- };
@@ -1,43 +0,0 @@
1
- export const SituacaoOrganizacao = {
2
- Ativo: '1',
3
- Bloqueado: '2',
4
- Cancelado: '3',
5
-
6
- description(val: string) {
7
- switch (val) {
8
- case this.Ativo:
9
- return 'Ativo'
10
-
11
- case this.Bloqueado:
12
- return 'Bloqueado'
13
-
14
- case this.Cancelado:
15
- return 'Cancelado'
16
-
17
- default:
18
- return 'enum not found'
19
- }
20
- },
21
- }
22
-
23
- export const TipoOrganizacao = {
24
- Cliente: '1',
25
- Parceiro: '2',
26
- Entidade: '3',
27
-
28
- description(val: string) {
29
- switch (val) {
30
- case this.Cliente:
31
- return 'Cliente'
32
-
33
- case this.Entidade:
34
- return 'Entidade'
35
-
36
- case this.Parceiro:
37
- return 'Parceiro'
38
-
39
- default:
40
- return 'enum not found'
41
- }
42
- },
43
- }
@@ -1,37 +0,0 @@
1
- export const TipoRelatorio = {
2
- Resumido: '1',
3
- Detalhado: '2',
4
-
5
- description(val: string) {
6
- switch (val) {
7
- case this.Resumido:
8
- return 'Resumido'
9
-
10
- case this.Detalhado:
11
- return 'Detalhado'
12
- }
13
- },
14
- }
15
-
16
- export const AgrupamentoRelatorio = {
17
- Pessoa: '1',
18
- Data: '2',
19
- Produto: '3',
20
- Documento: '4',
21
-
22
- description(val: string) {
23
- switch (val) {
24
- case this.Pessoa:
25
- return 'Pessoa'
26
-
27
- case this.Data:
28
- return 'Data'
29
-
30
- case this.Produto:
31
- return 'Produto'
32
-
33
- case this.Documento:
34
- return 'Documento'
35
- }
36
- },
37
- }