Skip to content

Commit

Permalink
Merge branch 'develop' into feat/validacao-emenda-preenchida
Browse files Browse the repository at this point in the history
  • Loading branch information
fragomeni committed Aug 8, 2024
2 parents ca92453 + c61e050 commit 16fd932
Show file tree
Hide file tree
Showing 48 changed files with 1,759 additions and 139 deletions.
3 changes: 3 additions & 0 deletions assets/icons/arrow-down-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/arrow-up-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 32 additions & 3 deletions demo/components/demoview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,35 @@ const mapProjetosNormas = {
_plp_68_2024_1: PLP_68_2024_1,
_plp_68_2024_2: PLP_68_2024_2,
_plp_68_2024_3: PLP_68_2024_3,
_mpv_905_2019: MPV_905_2019,
};

const mapDispositivosBloqueados = {
_mpv_905_2019: [
'art1',
'art2_par1',
'art2_par3',
{
lexmlId: 'art3',
bloquearFilhos: false,
},
'art4_par1u',
{
lexmlId: 'art5',
bloquearFilhos: false,
},
],
};

const mapConfiguracaoPaginacaoDispositivos = {
_plp_68_2024: {
// maxItensPorPagina: 700,
rangeArtigos: [
{ numInicial: 1, numFinal: 160 },
{ numInicial: 161, numFinal: 392 },
{ numInicial: 393, numFinal: 499 },
],
},
};

@customElement('demo-view')
Expand Down Expand Up @@ -184,6 +213,8 @@ export class DemoView extends LitElement {
if (this.elLexmlEmenda) {
const params = new LexmlEmendaParametrosEdicao();
params.modo = this.modo;
params.configuracaoPaginacao = mapConfiguracaoPaginacaoDispositivos[this.elDocumento.value];
params.dispositivosBloqueados = mapDispositivosBloqueados[this.elDocumento.value];

if (this.projetoNorma) {
params.projetoNorma = this.projetoNorma;
Expand Down Expand Up @@ -399,9 +430,7 @@ export class DemoView extends LitElement {
<option value="_plc_artigos_agrupados">PL (testes unitários de cmd)</option>
<option value="_sem_texto">PL 3/2023 (sem texto LexML)</option>
<option value="_plp_68_2024">PLP 68, de 2024 (completo)</option>
<option value="_plp_68_2024_1">PLP 68, de 2024 (arts. 1 a 160)</option>
<option value="_plp_68_2024_2">PLP 68, de 2024 (arts. 161 a 392)</option>
<option value="_plp_68_2024_3">PLP 68, de 2024 (arts. 393 a 499)</option>
<option value="_mpv_905_2019">MPV 905, de 2019 (com dispositivos bloqueados)</option>
</select>
<select id="modo">
<option value="edicao" id="optEdicao">Edição</option>
Expand Down
37 changes: 24 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 69 additions & 5 deletions src/assets/css/editor.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,63 @@ export const editorStyles = html`
padding: 0 5px 0 0;
}
.container__elemento--ativo {
border: 3px solid #24d421;
border-radius: 4px;
}
[bloqueado='true'] {
position: relative;
box-sizing: border-box;
background-color: #f9f9fa;
color: #a8a8ac;
}
[bloqueado='true'] .texto__rotulo {
color: #a8a8ac;
}
.container__elemento--ativo[bloqueado='true'] {
border-color: #cccccc;
}
[bloqueado='true']::before {
content: '';
display: inline-block;
mask-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2216%22%20height=%2216%22%20fill=%22currentColor%22%20class=%22bi%20bi-ban%22%20viewBox=%220%200%2016%2016%22%3E%3Cpath%20d=%22M15%208a6.97%206.97%200%200%200-1.71-4.584l-9.874%209.875A7%207%200%200%200%2015%208M2.71%2012.584l9.874-9.875a7%207%200%200%200-9.874%209.874ZM16%208A8%208%200%201%201%200%208a8%208%200%200%201%2016%200%22/%3E%3C/svg%3E');
width: 0.7em;
height: 0.7em;
background-color: currentColor;
-webkit-mask-size: cover;
mask-size: cover;
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
color: #9c9ca0;
}
[bloqueado='true']::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 1px solid #e9e9eb;
border-radius: 4px;
pointer-events: none;
box-sizing: border-box;
}
.container__elemento--ativo[bloqueado='true']::after {
border: 0;
}
[bloqueado='true']:hover {
cursor: not-allowed;
}
.container__elemento--articulacao {
width: 100%;
min-height: 1px;
Expand Down Expand Up @@ -426,11 +483,6 @@ export const editorStyles = html`
display: none;
}
.container__elemento--ativo {
border: 3px solid #24d421;
border-radius: 4px;
}
.mensagem {
font-family: var(--sl-font-sans);
font-size: 0.8em;
Expand Down Expand Up @@ -556,6 +608,18 @@ export const editorStyles = html`
vertical-align: 4px;
}
.button-navegacao-marca {
font-size: 18px;
}
.button-navegacao-marca::part(base) {
margin: 0 2px;
}
.button-navegacao-marca::part(label) {
padding: 0;
}
@media (max-width: 768px) {
.mobile-buttons {
display: inline-block !important;
Expand Down
Loading

0 comments on commit 16fd932

Please sign in to comment.