@masterkeymaterial/ui 0.0.2 → 0.0.4
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/fesm2022/masterkeymaterial-ui.mjs +6457 -0
- package/fesm2022/masterkeymaterial-ui.mjs.map +1 -0
- package/package.json +14 -5
- package/types/masterkeymaterial-ui.d.ts +928 -0
- package/ng-package.json +0 -10
- package/src/elements/ui-button/ui-button.css +0 -229
- package/src/elements/ui-button/ui-button.html +0 -12
- package/src/elements/ui-button/ui-button.ts +0 -133
- package/src/elements/ui-check-box/ui-check-box.css +0 -66
- package/src/elements/ui-check-box/ui-check-box.html +0 -5
- package/src/elements/ui-check-box/ui-check-box.ts +0 -65
- package/src/elements/ui-chip/ui-chip.css +0 -24
- package/src/elements/ui-chip/ui-chip.html +0 -3
- package/src/elements/ui-chip/ui-chip.ts +0 -25
- package/src/elements/ui-drop-zone/ui-drop-zone.css +0 -91
- package/src/elements/ui-drop-zone/ui-drop-zone.html +0 -8
- package/src/elements/ui-drop-zone/ui-drop-zone.ts +0 -153
- package/src/elements/ui-file-list/ui-file-list.css +0 -43
- package/src/elements/ui-file-list/ui-file-list.html +0 -17
- package/src/elements/ui-file-list/ui-file-list.ts +0 -22
- package/src/elements/ui-list-errors/ui-list-errors.css +0 -30
- package/src/elements/ui-list-errors/ui-list-errors.html +0 -10
- package/src/elements/ui-list-errors/ui-list-errors.ts +0 -14
- package/src/elements/ui-loading/ui-loading.css +0 -13
- package/src/elements/ui-loading/ui-loading.html +0 -1
- package/src/elements/ui-loading/ui-loading.ts +0 -10
- package/src/elements/ui-menu/ui-menu.css +0 -69
- package/src/elements/ui-menu/ui-menu.html +0 -20
- package/src/elements/ui-menu/ui-menu.ts +0 -267
- package/src/elements/ui-procurar/ui-procurar.css +0 -48
- package/src/elements/ui-procurar/ui-procurar.html +0 -14
- package/src/elements/ui-procurar/ui-procurar.ts +0 -82
- package/src/elements/ui-progress/ui-progress.css +0 -0
- package/src/elements/ui-progress/ui-progress.html +0 -1
- package/src/elements/ui-progress/ui-progress.ts +0 -15
- package/src/elements/ui-select/ui-select.css +0 -211
- package/src/elements/ui-select/ui-select.html +0 -46
- package/src/elements/ui-select/ui-select.ts +0 -482
- package/src/elements/ui-slide/ui-slide.css +0 -75
- package/src/elements/ui-slide/ui-slide.html +0 -7
- package/src/elements/ui-slide/ui-slide.ts +0 -61
- package/src/fields/Base/BaseFieldsForm/BaseFieldsForm.component.ts +0 -113
- package/src/fields/Base/BaseFieldsValues/BaseFieldsValues.ts +0 -112
- package/src/fields/Formulario/Formulario.ts +0 -1056
- package/src/fields/Formulario/form-action/form-action.css +0 -98
- package/src/fields/Formulario/form-action/form-action.html +0 -75
- package/src/fields/Formulario/form-action/form-action.ts +0 -187
- package/src/fields/Formulario/form-controls/form-controls.css +0 -108
- package/src/fields/Formulario/form-controls/form-controls.html +0 -105
- package/src/fields/Formulario/form-controls/form-controls.ts +0 -122
- package/src/fields/Formulario/form-fase/form-fase.css +0 -84
- package/src/fields/Formulario/form-fase/form-fase.html +0 -24
- package/src/fields/Formulario/form-fase/form-fase.ts +0 -157
- package/src/fields/Formulario/form-filter/form-filter.css +0 -50
- package/src/fields/Formulario/form-filter/form-filter.html +0 -25
- package/src/fields/Formulario/form-filter/form-filter.ts +0 -53
- package/src/fields/Formulario/form-no-action/form-no-action.css +0 -32
- package/src/fields/Formulario/form-no-action/form-no-action.html +0 -12
- package/src/fields/Formulario/form-no-action/form-no-action.ts +0 -21
- package/src/fields/Formulario/formated-values/formated-values.css +0 -104
- package/src/fields/Formulario/formated-values/formated-values.html +0 -15
- package/src/fields/Formulario/formated-values/formated-values.ts +0 -186
- package/src/fields/Formulario/single-values/single-values.css +0 -88
- package/src/fields/Formulario/single-values/single-values.html +0 -11
- package/src/fields/Formulario/single-values/single-values.ts +0 -65
- package/src/fields/autocomplete/autocomplete.css +0 -94
- package/src/fields/autocomplete/autocomplete.html +0 -38
- package/src/fields/autocomplete/autocomplete.ts +0 -294
- package/src/fields/button/button.css +0 -7
- package/src/fields/button/button.html +0 -19
- package/src/fields/button/button.ts +0 -38
- package/src/fields/checkbox/checkbox.css +0 -27
- package/src/fields/checkbox/checkbox.html +0 -20
- package/src/fields/checkbox/checkbox.ts +0 -44
- package/src/fields/color/CirculoColorido/circulocolorido.css +0 -50
- package/src/fields/color/CirculoColorido/circulocolorido.html +0 -8
- package/src/fields/color/CirculoColorido/circulocolorido.ts +0 -24
- package/src/fields/color/color.css +0 -15
- package/src/fields/color/color.html +0 -24
- package/src/fields/color/color.ts +0 -47
- package/src/fields/date/date.html +0 -19
- package/src/fields/date/date.ts +0 -29
- package/src/fields/datetime/datetime.html +0 -19
- package/src/fields/datetime/datetime.ts +0 -29
- package/src/fields/display/display.css +0 -7
- package/src/fields/display/display.html +0 -20
- package/src/fields/display/display.ts +0 -43
- package/src/fields/editor/editor.css +0 -51
- package/src/fields/editor/editor.html +0 -37
- package/src/fields/editor/editor.ts +0 -218
- package/src/fields/email/email.html +0 -19
- package/src/fields/email/email.ts +0 -29
- package/src/fields/fields.css +0 -180
- package/src/fields/generic/generic.html +0 -3
- package/src/fields/generic/generic.ts +0 -91
- package/src/fields/hidden/hidden.html +0 -3
- package/src/fields/hidden/hidden.ts +0 -20
- package/src/fields/icon/icon.css +0 -19
- package/src/fields/icon/icon.html +0 -27
- package/src/fields/icon/icon.ts +0 -31
- package/src/fields/multifactor/multifactor.css +0 -21
- package/src/fields/multifactor/multifactor.html +0 -39
- package/src/fields/multifactor/multifactor.ts +0 -106
- package/src/fields/multikv/multikv.css +0 -43
- package/src/fields/multikv/multikv.html +0 -47
- package/src/fields/multikv/multikv.ts +0 -88
- package/src/fields/multitext/multitext.css +0 -36
- package/src/fields/multitext/multitext.html +0 -38
- package/src/fields/multitext/multitext.ts +0 -75
- package/src/fields/number/number.html +0 -20
- package/src/fields/number/number.ts +0 -35
- package/src/fields/password/password.html +0 -23
- package/src/fields/password/password.ts +0 -37
- package/src/fields/search/search.css +0 -0
- package/src/fields/search/search.html +0 -19
- package/src/fields/search/search.ts +0 -54
- package/src/fields/select/select.css +0 -15
- package/src/fields/select/select.html +0 -18
- package/src/fields/select/select.ts +0 -52
- package/src/fields/slide/slide.css +0 -27
- package/src/fields/slide/slide.html +0 -20
- package/src/fields/slide/slide.ts +0 -45
- package/src/fields/text/text.html +0 -19
- package/src/fields/text/text.ts +0 -30
- package/src/fields/textarea/textarea.css +0 -4
- package/src/fields/textarea/textarea.html +0 -20
- package/src/fields/textarea/textarea.ts +0 -31
- package/src/fields/time/time.html +0 -19
- package/src/fields/time/time.ts +0 -29
- package/src/fields/upload/upload.css +0 -24
- package/src/fields/upload/upload.html +0 -41
- package/src/fields/upload/upload.ts +0 -137
- package/src/interfaces/interfaces.ts +0 -61
- package/src/public-api.ts +0 -38
- package/src/util/ClassOf.pipe.ts +0 -11
- package/src/util/JsonColorido.pipe.ts +0 -11
- package/src/util/util.ts +0 -2151
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -13
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/* FASES */
|
|
2
|
-
.faseButtons {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
height: 45px;
|
|
8
|
-
flex: 1;
|
|
9
|
-
gap: 1px;
|
|
10
|
-
position: relative;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.faseUnderline {
|
|
14
|
-
height: 1px;
|
|
15
|
-
background-color: var(--sys-outline);
|
|
16
|
-
margin-top: 0px;
|
|
17
|
-
margin-bottom: var(--MasterGap);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.faseUnderline.underline-linear {
|
|
21
|
-
margin-top: 5px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.fase-linha-entre-botoes {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: row;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
align-items: stretch;
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 0px;
|
|
31
|
-
left: 0px;
|
|
32
|
-
right: 0px;
|
|
33
|
-
bottom: 0px;
|
|
34
|
-
pointer-events: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.fase-linha-central {
|
|
38
|
-
width: 99%;
|
|
39
|
-
height: 1px;
|
|
40
|
-
background-color: var(--sys-outline);
|
|
41
|
-
align-self: center;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.faseButtons .todosBotoes {
|
|
45
|
-
--ui-align-items: center;
|
|
46
|
-
--ui-height: 45px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.faseBotao {
|
|
50
|
-
background-color: var(--sys-card);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.faseButtons .faseBotao.ativo {
|
|
54
|
-
--ui-background: color-mix(in srgb, var(--sys-background) 50%, transparent 50%);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.faseButtons .faseBotao:not(.ativo) {
|
|
58
|
-
--ui-outline-color: color-mix(in srgb, var(--sys-background) 50%, transparent 50%);
|
|
59
|
-
--ui-opacity: 0.1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.faseButtons .faseBotao {
|
|
63
|
-
flex: 1;
|
|
64
|
-
position: relative;
|
|
65
|
-
min-width: 120px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.faseHeader {
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: row;
|
|
71
|
-
justify-content: flex-start;
|
|
72
|
-
align-items: center;
|
|
73
|
-
position: relative;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.faseHeader.hasGap {
|
|
77
|
-
gap: 15px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.faseHeaderText {
|
|
81
|
-
font-size: 14px;
|
|
82
|
-
font-weight: 600;
|
|
83
|
-
flex: 1;
|
|
84
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
@if(isFaseado()){
|
|
2
|
-
<div class="faseButtons">
|
|
3
|
-
<ui-button tipo="icon" tema="primary" (clicked)="faseVoltar()" class="todosBotoes" [disabled]="isDisabledVoltar()"
|
|
4
|
-
icone="fa fa-arrow-left" title="Voltar" [radiusTabFormat]="!isLinear()"></ui-button>
|
|
5
|
-
<div class="faseButtons faseHeader" [class.hasGap]="isLinear()">
|
|
6
|
-
@if(isLinear()){
|
|
7
|
-
<div class="fase-linha-entre-botoes">
|
|
8
|
-
<div class="fase-linha-central"></div>
|
|
9
|
-
</div>
|
|
10
|
-
}
|
|
11
|
-
@for (fase of fasesList(); track $index) {
|
|
12
|
-
<ui-button tipo="nofill" tema="primary" class="todosBotoes faseBotao" (clicked)="faseAvancar($index)"
|
|
13
|
-
[class.ativo]="faseIndex() == $index" [disabled]="fase.disabled" [icone]="fase.icone" [title]="fase.nome"
|
|
14
|
-
[radiusTabFormat]="!isLinear()">
|
|
15
|
-
<div class="faseHeaderText" [innerHTML]="fase.nome"></div>
|
|
16
|
-
</ui-button>
|
|
17
|
-
}
|
|
18
|
-
</div>
|
|
19
|
-
<ui-button tipo="nofill" tema="primary" (clicked)="faseAvancar()" class="todosBotoes" [disabled]="isDisabledAvancar()"
|
|
20
|
-
icone="fa fa-arrow-right" [iconeAntes]="false" [iconeDepois]="true" title="Proximo"
|
|
21
|
-
[radiusTabFormat]="!isLinear()"></ui-button>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="faseUnderline" [class.underline-linear]="isLinear()"></div>
|
|
24
|
-
}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { Component, computed, effect, input, model, OnInit, signal } from '@angular/core';
|
|
2
|
-
import { UiButton } from "../../../elements/ui-button/ui-button";
|
|
3
|
-
import { IFaseCampos, IFases, IFieldComponent } from '../Formulario';
|
|
4
|
-
import { LOG } from '../../../util/util';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'ui-form-fase',
|
|
8
|
-
templateUrl: './form-fase.html',
|
|
9
|
-
styleUrls: ['./form-fase.css'],
|
|
10
|
-
imports: [UiButton],
|
|
11
|
-
})
|
|
12
|
-
export class FormFase implements OnInit {
|
|
13
|
-
|
|
14
|
-
fases = model<IFases<any>>();
|
|
15
|
-
campos = input<IFieldComponent<any>[]>();
|
|
16
|
-
|
|
17
|
-
isDisabledVoltar = signal(true);
|
|
18
|
-
isDisabledAvancar = signal(true);
|
|
19
|
-
isFaseado = computed(() => {
|
|
20
|
-
let fases = this.fases()?.fases;
|
|
21
|
-
return fases !== undefined && fases.length > 1; // 1 é faseado mas não tem navegação, mais de 1 é faseado com navegação
|
|
22
|
-
});
|
|
23
|
-
fasesList = computed(() => {
|
|
24
|
-
return this.fases()?.fases ?? [];
|
|
25
|
-
});
|
|
26
|
-
faseIndex = model<number>(0);
|
|
27
|
-
fase_historico = signal<number[]>([0]);
|
|
28
|
-
isLinear = computed(() => this.fases()?.isLinear ?? false);
|
|
29
|
-
|
|
30
|
-
constructor() {
|
|
31
|
-
effect(() => {
|
|
32
|
-
let fases = this.fases()?.fases;
|
|
33
|
-
if (fases == null) {
|
|
34
|
-
this.isDisabledAvancar.set(true);
|
|
35
|
-
this.isDisabledVoltar.set(true);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this.isDisabledVoltar.set(this.faseIndex() <= 0);
|
|
39
|
-
this.isDisabledAvancar.set(this.faseIndex() >= (fases.length - 1));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
ngOnInit(): void {
|
|
43
|
-
let campos = this.campos();
|
|
44
|
-
let fases = this.fases();
|
|
45
|
-
|
|
46
|
-
if (campos == null || fases == null) return;
|
|
47
|
-
let semFase = this.checkCamposInFase(campos, fases);
|
|
48
|
-
if (semFase.length > 0) {
|
|
49
|
-
semFase.forEach(prop => {
|
|
50
|
-
this.fases.update(f => {
|
|
51
|
-
if (f) {
|
|
52
|
-
// Adiciona os campos sem fase a primeira fase, se ela existir.
|
|
53
|
-
if (f.fases.length > 0) {
|
|
54
|
-
let primeiraFase = f.fases[0];
|
|
55
|
-
if (!primeiraFase.campos.includes(prop)) {
|
|
56
|
-
primeiraFase.campos.push(prop);
|
|
57
|
-
}
|
|
58
|
-
} else {
|
|
59
|
-
// Se não houver fase, cria uma nova fase e adiciona os campos sem fase nela.
|
|
60
|
-
f.fases.push({
|
|
61
|
-
nome: "Geral",
|
|
62
|
-
campos: [prop],
|
|
63
|
-
} as IFaseCampos<any>);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return f;
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
// LOG(1, "Fases configuradas:", this.fases());
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
faseAvancar(faseIndex?: number): void {
|
|
74
|
-
let fases = this.fases()?.fases;
|
|
75
|
-
if (fases == null) return;
|
|
76
|
-
|
|
77
|
-
if (faseIndex != null) {
|
|
78
|
-
let proximaFaseIndex = fases.indexOf(fases[faseIndex]);
|
|
79
|
-
if (proximaFaseIndex !== -1) {
|
|
80
|
-
if (proximaFaseIndex !== this.faseIndex()) {
|
|
81
|
-
this.faseIndex.set(faseIndex);
|
|
82
|
-
this.fase_historico.update(h => { h = [...h, faseIndex]; return h; });
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
LOG(1, "Fase informada não existe.");
|
|
86
|
-
}
|
|
87
|
-
} else {
|
|
88
|
-
let proximaFaseIndex = fases.indexOf(fases[this.faseIndex() + 1]);
|
|
89
|
-
if (proximaFaseIndex !== -1) {
|
|
90
|
-
if (proximaFaseIndex !== this.faseIndex()) {
|
|
91
|
-
this.faseIndex.set(proximaFaseIndex);
|
|
92
|
-
this.fase_historico.update(h => { h = [...h, proximaFaseIndex]; return h; });
|
|
93
|
-
}
|
|
94
|
-
} else {
|
|
95
|
-
LOG(1, "Não há próxima fase para avançar.");
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
faseVoltar(): void {
|
|
100
|
-
let fases = this.fases()?.fases;
|
|
101
|
-
if (fases == null) return;
|
|
102
|
-
|
|
103
|
-
if (this.faseIndex() > 0) {
|
|
104
|
-
this.fase_historico.update(h => { h.pop(); return h; });
|
|
105
|
-
let ultimaFaseDoHistorico = this.fase_historico()[this.fase_historico().length - 1];
|
|
106
|
-
if (ultimaFaseDoHistorico != null) {
|
|
107
|
-
this.faseIndex.set(ultimaFaseDoHistorico);
|
|
108
|
-
} else {
|
|
109
|
-
LOG(1, "Não para onde voltar.");
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
this.faseIndex.set(0);
|
|
113
|
-
this.fase_historico.set([0]);
|
|
114
|
-
LOG(1, "Já está na primeira fase possível.")
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
checkCamposInFase(campos: IFieldComponent<any>[], fases: IFases<any>): string[] {
|
|
121
|
-
// Verifica e informa no console se todos os campos recebidos estão presentes em alguma fase
|
|
122
|
-
let camposNomes = campos.map(c => c.prop);
|
|
123
|
-
let camposEmFases: string[] = [];
|
|
124
|
-
let camposNaoEmFases: string[] = [];
|
|
125
|
-
for (let campoNome of camposNomes) {
|
|
126
|
-
let encontrado = false;
|
|
127
|
-
for (let fase of fases.fases) {
|
|
128
|
-
for (let campoOrGrupo of fase.campos) {
|
|
129
|
-
if (typeof campoOrGrupo === 'string') {
|
|
130
|
-
if (campoOrGrupo === campoNome) {
|
|
131
|
-
encontrado = true;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
} else {
|
|
135
|
-
if (campoOrGrupo.campos.includes(campoNome)) {
|
|
136
|
-
encontrado = true;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (encontrado) break;
|
|
142
|
-
}
|
|
143
|
-
if (encontrado) {
|
|
144
|
-
camposEmFases.push(campoNome);
|
|
145
|
-
} else {
|
|
146
|
-
camposNaoEmFases.push(campoNome);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
// if (camposNaoEmFases.length > 0) {
|
|
150
|
-
// LOG(1, "⚠️ Campos sem fase:", camposNaoEmFases);
|
|
151
|
-
// } else {
|
|
152
|
-
// LOG(1, "✔️ Todos os campos estão presentes em alguma fase.");
|
|
153
|
-
// }
|
|
154
|
-
return camposNaoEmFases;
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
margin-top: 10px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.buttonsGap {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: var(--ui-form-flex-direction, column);
|
|
10
|
-
gap: var(--MasterGap);
|
|
11
|
-
margin-top: var(--MasterGap);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.filtrosAtivos {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-wrap: wrap;
|
|
17
|
-
gap: var(--MasterGap);
|
|
18
|
-
margin-bottom: var(--MasterGap);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.filtrosAtivos div {
|
|
22
|
-
display: flex;
|
|
23
|
-
gap: 2px;
|
|
24
|
-
align-items: center;
|
|
25
|
-
background-color: var(--sys-high-15);
|
|
26
|
-
padding: 0 0 0 1rem;
|
|
27
|
-
border-radius: var(--MasterRadius);
|
|
28
|
-
font-size: 0.9rem;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.fieldHidden {
|
|
32
|
-
display: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.areaValues {
|
|
36
|
-
outline: 1px solid color-mix(in srgb, var(--sys-outline) 50%, transparent 50%);
|
|
37
|
-
background-color: color-mix(in srgb, var(--sys-card) 80%, var(--sys-background) 20%);
|
|
38
|
-
border-radius: var(--MasterRadius);
|
|
39
|
-
padding: 0.5rem;
|
|
40
|
-
gap: var(--MasterGap);
|
|
41
|
-
margin-top: var(--MasterGap);
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
flex-wrap: wrap;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.areaValues .card {
|
|
48
|
-
flex: 1;
|
|
49
|
-
overflow: auto;
|
|
50
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<div class="filtrosAtivos">
|
|
2
|
-
@for ( item of kvPreenchido(); track $index) {
|
|
3
|
-
<div>
|
|
4
|
-
{{ item.v }}
|
|
5
|
-
<ui-button tipo="icon" tema="error" icone="bi bi-x" (click)="onDeletePropriedade(item.k)">
|
|
6
|
-
</ui-button>
|
|
7
|
-
</div>
|
|
8
|
-
}
|
|
9
|
-
</div>
|
|
10
|
-
<div class="g-fields" [style.--g-fields-min]="gmin()" [style.--g-fields-max]="gmax()">
|
|
11
|
-
|
|
12
|
-
@for (campo of form.listaCampos(); track $index) {
|
|
13
|
-
<fields-g [form]="form" [name]="campo.prop" [class]="campo.tipo == 'hidden' ? 'fieldHidden' : ''"></fields-g>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
</div>
|
|
17
|
-
<div class="buttonsGap">
|
|
18
|
-
<ui-button tipo="fill" tema="primary" icone="bi bi-funnel" (click)="onFiltrar()">{{ actionTitle() }}</ui-button>
|
|
19
|
-
<ng-content></ng-content>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
@if(showFormControls()){
|
|
23
|
-
<ui-form-controls [form]="form" [recebido]="this.values()" [(hasOutline)]="hasOutline" [faseIndex]="faseIndex()"
|
|
24
|
-
[totalFases]="listaFase().length"></ui-form-controls>
|
|
25
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Component, computed, input, model, output } from '@angular/core';
|
|
2
|
-
import { UiButton } from "../../../elements/ui-button/ui-button";
|
|
3
|
-
import { BaseFieldsValues } from '../../Base/BaseFieldsValues/BaseFieldsValues';
|
|
4
|
-
import { FieldsGeneric } from '../../generic/generic';
|
|
5
|
-
import { LibUtil } from '../../../util/util';
|
|
6
|
-
import { IKV } from '../../../interfaces/interfaces';
|
|
7
|
-
import { FormControls } from "../form-controls/form-controls";
|
|
8
|
-
import { IField, IFields } from '../Formulario';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'fields-form-filter',
|
|
12
|
-
templateUrl: './form-filter.html',
|
|
13
|
-
styleUrl: './form-filter.css',
|
|
14
|
-
imports: [UiButton, FieldsGeneric, FormControls],
|
|
15
|
-
})
|
|
16
|
-
export class FormFilter<T> extends BaseFieldsValues<T> {
|
|
17
|
-
|
|
18
|
-
async onSave() {
|
|
19
|
-
// Não faz nada.
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
hasOutline = model<boolean>(false);
|
|
24
|
-
filtrar = output<any>();
|
|
25
|
-
actionTitle = input<string>('Aplicar Filtro');
|
|
26
|
-
|
|
27
|
-
onFiltrar() {
|
|
28
|
-
let valores = LibUtil.clonar(this.form.values());
|
|
29
|
-
valores = LibUtil.limparObject(valores);
|
|
30
|
-
this.filtrar.emit(valores);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
kvPreenchido = computed(() => {
|
|
34
|
-
let propriedades: IKV[] = [];
|
|
35
|
-
let valores = this.values() as any;
|
|
36
|
-
if (!valores) return propriedades;
|
|
37
|
-
let campos = this.campos();
|
|
38
|
-
for (const key of Object.keys(campos)) {
|
|
39
|
-
let campo = campos[key];
|
|
40
|
-
if (campo.tipo === IField.Hidden) continue;
|
|
41
|
-
if (valores?.[key] != null && valores?.[key] !== '' && !(Array.isArray(valores?.[key]) && valores?.[key].length === 0)) {
|
|
42
|
-
propriedades.push({ k: campo.prop, v: campo.titulo ?? String(campo.prop) });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return propriedades;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
onDeletePropriedade(k: string | number | null | undefined) {
|
|
49
|
-
if (k == null) return;
|
|
50
|
-
this.form.updateValues({ [k as keyof IFields<T>]: '' });
|
|
51
|
-
this.onFiltrar();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.buttonsGap {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: var(--ui-form-flex-direction, column);
|
|
9
|
-
gap: var(--MasterGap);
|
|
10
|
-
margin-top: var(--MasterGap);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.fieldHidden {
|
|
14
|
-
display: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.areaValues {
|
|
18
|
-
outline: 1px solid color-mix(in srgb, var(--sys-outline) 50%, transparent 50%);
|
|
19
|
-
background-color: color-mix(in srgb, var(--sys-card) 80%, var(--sys-background) 20%);
|
|
20
|
-
border-radius: var(--MasterRadius);
|
|
21
|
-
padding: 0.5rem;
|
|
22
|
-
gap: var(--MasterGap);
|
|
23
|
-
margin-top: var(--MasterGap);
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
flex-wrap: wrap;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.areaValues .card {
|
|
30
|
-
flex: 1;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<div class="g-fields" [style.--g-fields-min]="gmin()" [style.--g-fields-max]="gmax()">
|
|
2
|
-
|
|
3
|
-
@for (campo of form.listaCampos(); track $index) {
|
|
4
|
-
<fields-g [form]="form" [name]="campo.prop" [class]="campo.tipo == 'hidden' ? 'fieldHidden' : ''"></fields-g>
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
@if(showFormControls()){
|
|
10
|
-
<ui-form-controls [form]="form" [recebido]="this.values()" [(hasOutline)]="hasOutline" [faseIndex]="faseIndex()"
|
|
11
|
-
[totalFases]="listaFase().length"></ui-form-controls>
|
|
12
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Component, model } from '@angular/core';
|
|
2
|
-
import { FieldsGeneric } from '../../generic/generic';
|
|
3
|
-
import { BaseFieldsValues } from '../../Base/BaseFieldsValues/BaseFieldsValues';
|
|
4
|
-
import { FormControls } from "../form-controls/form-controls";
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'fields-form-no-action',
|
|
8
|
-
templateUrl: './form-no-action.html',
|
|
9
|
-
styleUrl: './form-no-action.css',
|
|
10
|
-
imports: [FieldsGeneric, FormControls],
|
|
11
|
-
})
|
|
12
|
-
export class FormNoAction<T> extends BaseFieldsValues<T> {
|
|
13
|
-
|
|
14
|
-
async onSave() {
|
|
15
|
-
// Não faz nada.
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
hasOutline = model<boolean>(false);
|
|
20
|
-
|
|
21
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
.showEntidade {
|
|
2
|
-
margin-top: 5px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.linhaDado {
|
|
6
|
-
border: 1px solid transparent;
|
|
7
|
-
border-bottom: 1px dotted var(--sys-primary-15);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.titulo {
|
|
11
|
-
font-weight: 600;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.linhaDado.isEspecial .titulo {
|
|
15
|
-
color: var(--sys-secondary);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.conteudo {
|
|
19
|
-
color: color-mix(in srgb, var(--sys-secondary) 50%, var(--sys-on-background) 50%);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.linhaDado:hover {
|
|
23
|
-
border-bottom: 1px solid var(--sys-secondary);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.showEntidade.cantos .linhaDado {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: row;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
align-items: center;
|
|
31
|
-
flex-wrap: wrap;
|
|
32
|
-
gap: calc(var(--MasterGap) / 2);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.showEntidade.centro .linhaDado {
|
|
36
|
-
display: grid;
|
|
37
|
-
grid-template-columns: 1fr 1fr;
|
|
38
|
-
gap: calc(var(--MasterGap) / 2);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.showEntidade.centro .titulo {
|
|
42
|
-
text-align: end;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.showEntidade.esquerda .linhaDado {
|
|
46
|
-
display: grid;
|
|
47
|
-
grid-template-columns: auto 1fr;
|
|
48
|
-
gap: calc(var(--MasterGap) / 2);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.showEntidade.grid {
|
|
53
|
-
display: grid;
|
|
54
|
-
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
55
|
-
gap: calc(var(--MasterGap) / 4);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.showEntidade.grid .linhaDado {
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
flex-wrap: wrap;
|
|
62
|
-
border: 1px solid var(--sys-primary-15);
|
|
63
|
-
border-radius: var(--MasterRadius);
|
|
64
|
-
padding: calc(var(--MasterGap) / 2);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.showEntidade.grid .linhaDado:hover {
|
|
68
|
-
border: 1px solid var(--sys-secondary);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.showEntidade.wrap {
|
|
72
|
-
display: flex;
|
|
73
|
-
flex-wrap: wrap;
|
|
74
|
-
gap: calc(var(--MasterGap) / 2);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.showEntidade.wrap .linhaDado {
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
flex-wrap: wrap;
|
|
81
|
-
border: 1px solid var(--sys-primary-15);
|
|
82
|
-
border-radius: var(--MasterRadius);
|
|
83
|
-
padding: calc(var(--MasterGap) / 2);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.showEntidade.wrap .linhaDado:hover {
|
|
87
|
-
border: 1px solid var(--sys-secondary);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@media (max-width: 600px) {
|
|
91
|
-
|
|
92
|
-
.showEntidade.cantos .linhaDado,
|
|
93
|
-
.showEntidade.centro .linhaDado,
|
|
94
|
-
.showEntidade.esquerda .linhaDado,
|
|
95
|
-
.showEntidade.cantos .linhaDado *,
|
|
96
|
-
.showEntidade.centro .linhaDado *,
|
|
97
|
-
.showEntidade.esquerda .linhaDado * {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
flex-wrap: wrap;
|
|
101
|
-
gap: calc(var(--MasterGap) / 4);
|
|
102
|
-
text-align: start;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<div [class]="modo()" [class.showEntidade]="true">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@for (field of camposFormatados(); track $index) {
|
|
5
|
-
<div class="linhaDado" [class.isEspecial]="field.isEspecial">
|
|
6
|
-
<div class="titulo" [innerHTML]="field.label"></div>
|
|
7
|
-
<!-- @if(field.isInner){ -->
|
|
8
|
-
<div class="conteudo" [innerHTML]="field.value"></div>
|
|
9
|
-
<!-- }@else {
|
|
10
|
-
<build-component [componente]="field.value" [inputs]="field.inputs"></build-component>
|
|
11
|
-
} -->
|
|
12
|
-
</div>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
</div>
|