Logo CEWEB.br Logo NIC.br Logo CGI.br
Home Sobre o projeto

Sites Verificados

Lista com todos os sítios que foram verificados pela TIC Web Acessibilidade. Dentro de cada domínio, há informações detalhadas sobre as páginas coletadas, bem como os erros e avisos de cada uma *.

Recomendações Avaliadas
1.1 Respeitar os Padrões Web.

Recomendações

Número Descrição Quantidade Linhas Código Fonte
1.1.3 Presença de CSS(s) in-line 33 1057 1525 1526 1598 1599 1671 1672 1739 1740 1777 1966 2344 2898 2962 3039 3076 3120 3199 3235 3319 3334 3793 4249 4813 4900 5078 5133 5453 5458 5463 5468 5551 5554
1.1.4 Presença de CSS(s) interno 28 731 2241 2300 2308 2356 2376 2396 2416 2443 2842 2862 2926 2992 3053 3132 3152 3263 3283 3805 3825 4261 4281 4705 4842 4930 4952 5090 5110
1.1.6 Presença de javascript(s) interno 67 101 231 580 603 662 774 803 915 1051 2310 2358 2378 2398 2418 2437 2445 2824 2844 2864 2908 2928 2974 2994 3018 3086 3134 3154 3178 3245 3265 3285 3352 3371 3380 3759 3807 3827 3846 3852 4263 4283 4302 4308 4687 4707 4725 4743 4761 4779 4843 4872 4912 4932 4954 4972 4990 5008 5026 5044 5092 5112 6008 6037 6054 6085 6405 6418
1057 <![CDATA[<span class="text-white" style="font-size:xx-large"><svg class="lexicon-icon lexicon-icon-acessibilidade" focusable="false" id="ewhr" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#acessibilidade"/></svg></span>]]>
1525 <![CDATA[<div class="card m-0 background-position-y-center background-position-x-center" style="border:none; background-size:cover; background-image: url(/o/adaptive-media/image/2909253/lg/cdc-convenios-home.png?t=1669057647127)"> <div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="/credito-pessoal-consignado-convenios" class="stretched-link h5 text-white" aria-label="Saiba mais sobre CDC Convênio"> CDC Convênio </a> <div class="text-white"><p>Crédito pessoal na medida, com vantagens exclusivas pra você</p></div> </div> </div>]]>
1526 <![CDATA[<div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="/credito-pessoal-consignado-convenios" class="stretched-link h5 text-white" aria-label="Saiba mais sobre CDC Convênio"> CDC Convênio </a> <div class="text-white"><p>Crédito pessoal na medida, com vantagens exclusivas pra você</p></div> </div>]]>
1598 <![CDATA[<div class="card m-0 background-position-y-center background-position-x-center" style="border:none; background-size:cover; background-image: url(/o/adaptive-media/image/2191866/md/mulher-com-oculos-de-realidade-virtual.jpg?t=1660251216072)"> <div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="https://www.bnb.gov.br/fne-inovacao" class="stretched-link h5 text-white" aria-label="Saiba mais sobre FNE Inovação"> FNE Inovação </a> <div class="text-white"><p>Inove em produtos, serviços e processos da sua empresa.</p></div> </div> </div>]]>
1599 <![CDATA[<div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="https://www.bnb.gov.br/fne-inovacao" class="stretched-link h5 text-white" aria-label="Saiba mais sobre FNE Inovação"> FNE Inovação </a> <div class="text-white"><p>Inove em produtos, serviços e processos da sua empresa.</p></div> </div>]]>
1671 <![CDATA[<div class="card m-0 background-position-y-center background-position-x-center" style="border:none; background-size:cover; background-image: url(/o/adaptive-media/image/1529191/md/Cart%C3%A3o+BNB+Agro.jpg?t=1652818815671)"> <div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="/cartao-bnb-agro" class="stretched-link h5 text-white" aria-label="Saiba mais sobre Cartão BNB Agro"> Cartão BNB Agro </a> <div class="text-white"><p>Saiba como obter o financiamento para desenvolver o seu agronegócio</p></div> </div> </div>]]>
1672 <![CDATA[<div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="/cartao-bnb-agro" class="stretched-link h5 text-white" aria-label="Saiba mais sobre Cartão BNB Agro"> Cartão BNB Agro </a> <div class="text-white"><p>Saiba como obter o financiamento para desenvolver o seu agronegócio</p></div> </div>]]>
1739 <![CDATA[<div class="card m-0 background-position-y-center background-position-x-center" style="border:none; background-size:cover; background-image: url(/o/adaptive-media/image/56619/md/por-do-sol.jpg?t=1623335791470)"> <div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="/agroamigo-sol" class="stretched-link h5 text-white" aria-label="Saiba mais sobre Agroamigo Sol"> Agroamigo Sol </a> <div class="text-white"><p>Crédito para geração de energia solar no meio rural.</p></div> </div> </div>]]>
1740 <![CDATA[<div class="card m-0 p-4 d-flex justify-content-end" style="border:none; min-height: 240px; background: linear-gradient(transparent 30%, rgba(0,0,0,0.6) 70%); background-blend-mode: darken;"> <a href="/agroamigo-sol" class="stretched-link h5 text-white" aria-label="Saiba mais sobre Agroamigo Sol"> Agroamigo Sol </a> <div class="text-white"><p>Crédito para geração de energia solar no meio rural.</p></div> </div>]]>
1777 <![CDATA[<ul class="nav" style="max-height: 344px" role="navigation"> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/institucional"> <svg class="lexicon-icon lexicon-icon-bnb-simbolo mr-2" focusable="false" id="frqe" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#bnb-simbolo"/></svg> Institucional </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/desenvolvimento-regional"> <svg class="lexicon-icon lexicon-icon-trajeto mr-2" focusable="false" id="efrs" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#trajeto"/></svg> Desenvolvimento Regional </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/sustentabilidade"> <svg class="lexicon-icon lexicon-icon-responsabilidade-ambiental mr-2" focusable="false" id="uazw" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#responsabilidade-ambiental"/></svg> Sustentabilidade </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/cultura"> <svg class="lexicon-icon lexicon-icon-mascaras-cultura mr-2" focusable="false" id="zslv" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#mascaras-cultura"/></svg> Cultura </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/etene"> <svg class="lexicon-icon lexicon-icon-prancheta-dados mr-2" focusable="false" id="nsou" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#prancheta-dados"/></svg> Etene </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/hub-de-inovacao"> <svg class="lexicon-icon lexicon-icon-foguete mr-2" focusable="false" id="vrxx" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#foguete"/></svg> Hubine </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/fundeci"> <svg class="lexicon-icon lexicon-icon-pasta-indicadores mr-2" focusable="false" id="fsfw" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#pasta-indicadores"/></svg> Fundeci </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/relacao-com-acionistas-e-investidores"> <svg class="lexicon-icon lexicon-icon-relacionamento-2 mr-2" focusable="false" id="wjos" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#relacionamento-2"/></svg> Relação com Acionistas e Investidores </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/open-finance"> <svg class="lexicon-icon lexicon-icon-open-finance mr-2" focusable="false" id="vtiy" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#open-finance"/></svg> Open Finance </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/atividades-financiadas"> <svg class="lexicon-icon lexicon-icon-credito-2 mr-2" focusable="false" id="agoo" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#credito-2"/></svg> Atividades Financiadas </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/eventos"> <svg class="lexicon-icon lexicon-icon-programacao mr-2" focusable="false" id="auey" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#programacao"/></svg> Eventos </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/revista-juridica"> <svg class="lexicon-icon lexicon-icon-livro-aberto mr-2" focusable="false" id="lcqf" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#livro-aberto"/></svg> Revista Jurídica </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/transparencia-e-prestacao-de-contas"> <svg class="lexicon-icon lexicon-icon-view mr-2" focusable="false" id="zduc" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/clay/icons.svg#view"/></svg> Transparência e Prestação de Contas </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/seguranca"> <svg class="lexicon-icon lexicon-icon-protegido mr-2" focusable="false" id="tpxz" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#protegido"/></svg> Segurança </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/privacidade-e-protecao-de-dados"> <svg class="lexicon-icon lexicon-icon-hidden mr-2" focusable="false" id="smpf" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/clay/icons.svg#hidden"/></svg> Privacidade e Proteção de Dados </a> </li> <li class="nav-item " role="presentation"> <a class="nav-link text-secondary-d1" href="https://www.bnb.gov.br/web/guest/sobre-o-banco"> <svg class="lexicon-icon lexicon-icon-bnb-simbolo mr-2" focusable="false" id="nxaf" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#bnb-simbolo"/></svg> Tudo Sobre o Banco </a> </li> </ul>]]>
1966 <![CDATA[<section class="bg-" style=""> <div class="container px-3 py-5"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-iofy" > <div class="portlet-boundary portlet-boundary_com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_ portlet-static portlet-static-end portlet-breadcrumb " id="p_p_id_com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD_"> <span id="p_com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD"></span> <section class="portlet" id="portlet_com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD"> <div class="portlet-content"> <div class="autofit-float autofit-row portlet-header mb-0"> </div> <div class=" portlet-content-container"> <div class="portlet-body"> <nav aria-label="Caminho de Navegação" id="_com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD_breadcrumbs-defaultScreen"> <style> .isDisabled { color: darkslategray !important; pointer-events: none; } .confIcon{ height:0.7em; margin-top:0; } </style> <a class="breadcrumb-last-item" href="https://www.bnb.gov.br/web/guest/acesso-a-informacao">Acesso à Informação</a> <svg class="lexicon-icon lexicon-icon-caret-right-l" focusable="false" id="ibir" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/clay/icons.svg#caret-right-l" /></svg> <span class="breadcrumb-item">Receitas e Despesas</span> </nav> </div> </div> </div> </section> </div> </div> <div id="fragment-1170299-crpl" > <div class="fragment_1170299"> <h1 class="text-primary mt-4 mb-3"> Receitas e Despesas </h1> </div></div><style>.fragment_1170299 { }</style> <div id="fragment-0-vinp" > <div class="component-paragraph pb-3 text-left text-break"> <div><p class="lead">Nesta seção, são divulgadas informações sobre a previsão e arrecadação de receita pública e execução orçamentária e financeira detalhada do Banco do Nordeste.</p> </div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-vinp'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
2344 <![CDATA[<section class="bg-light" style=""> <div class="container px-3 py-5"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-jdyz" > <h2 class="component-heading mb-0 pb-3 text-left text-break "> <span>Receitas</span> </h2></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-jdyz'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-kyus" > <div class="component-paragraph pb-3 text-left text-break"> <div>São consideradas receitas os recursos financeiros obtidos e que servem para custear as despesas e os investimentos.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-kyus'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-kccq" > <h3 class="component-heading mb-0 pb-3 text-left text-break "> <span>Transferências do Tesouro Nacional</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-kccq'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-jxvx" > <div class="component-paragraph pb-3 text-left text-break"> <div>As Transferências da União para o FNE representam a admissão de recursos para compor o Fundo Constitucional de Financiamento do Nordeste (FNE), para financiamento do setor produtivo da Região. Tais recursos não podem ser caracterizados como receitas.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-jxvx'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-2316268-zwke" > <script id="data_zwke" type="application/json">{"title":"Transferências da União para FNE","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"title"}}</script> <span class="loading-animation"></span> <div class="documents-list"></div> </div><style>.page-item button { border-radius: 2rem !important; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-zwke'); var configuration = {"contentSetId":"2707191","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"50","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"","rgbValue":""},"useTitle":false,"usePagination":false,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":true,"labelForRefDate":"Referente a","headingLevel":"h2","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script> <div id="fragment-0-krmq" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-krmq'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-pwxr" > <h3 class="component-heading mb-0 pb-3 text-left text-break "> <span>Renúncia de Receitas</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-pwxr'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-qhbz" > <div class="component-paragraph pb-3 text-left text-break"> <div>O Banco do Nordeste não desenvolve ações, programas, projetos e atividades finalísticas que resultem em renúncia de receita, nos moldes do artigo 14 da <a href="http://www.planalto.gov.br/ccivil_03/leis/lcp/lcp101.htm" target="_blank">Lei Complementar nº 101/2000</a>.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-qhbz'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
2898 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-meht" > <div class="py-4"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-meht'); var configuration = {"height":"py-4"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-nlfo" > <h2 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Despesas</span> </h2></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-nlfo'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
2962 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-6"> <div id="fragment-0-xymb" > <h3 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Execução de Despesas</span> </h3></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-xymb'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-fqei" > <div class="component-paragraph pb-3 text-white text-left text-break"> <div>Quadro de execução de despesas contendo: despesas da intermediação financeira, despesas de pessoal, outras despesas administrativas, despesas tributárias, outras despesas operacionais, provisão para imposto de renda, provisão para contribuição social sem lucro líquido, provisão para participações estatutárias no lucro.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-fqei'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> <div class="col-md-6"> <div id="fragment-0-lweo" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-lweo'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-47410-vnrw" > <div class="card card-horizontal shadow"> <div class="card-body"> <div class="card-row"> <div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-ods text-tertiary mt-1" focusable="false" id="dzkv" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-ods" /></svg> </div> <div class="autofit-col autofit-col-expand autofit-col-gutters"> <div class="card-title"><div class="h6"><a href="https://www.bnb.gov.br/documents/45743/0/Quadro+de+Despesas.ods/3508ac74-96c5-1715-9a15-8f509f54995a?version=20.0&amp;t=1695819303625&amp;download=true" class="stretched-link">Quadro de Despesas.ods</a></div></div> <div class="card-subtitle"> <span class="font-weight-bold">Atualizado em: </span>27/09/2023 </div> <div class="card-detail"> <span class="label label-unstyled text-uppercase" id="tnhd"><span class="label-item label-item-expand">ods</span></span><span class="label label-unstyled text-uppercase" id="sxji"><span class="label-item label-item-expand">322 KB</span></span> </div> </div> </div> </div> </div></div><style>.fragment_136960 { }</style> </div> </div> </div> </section>]]>
3039 <![CDATA[<div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-ods text-tertiary mt-1" focusable="false" id="dzkv" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-ods" /></svg> </div>]]>
3076 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-qbfm" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-qbfm'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
3120 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-6"> <div id="fragment-0-mmox" > <h3 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Detalhamento de Programas</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-mmox'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-ndfi" > <div class="component-paragraph pb-3 text-white text-left text-break"> <div>Quadro de detalhamento de programas incluindo orçamento de investimentos em: manutenção da infraestrutura de atendimento, Instalação de pontos de atendimento bancário, manutenção e adequação de bens imóveis, manutenção e adequação de bens móveis, veículos, máquinas e equipamentos, manutenção e adequação de ativos de informática, informação e teleprocessamento.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-ndfi'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> <div class="col-md-6"> <div id="fragment-0-hoty" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-hoty'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-47410-ocwt" > <div class="card card-horizontal shadow"> <div class="card-body"> <div class="card-row"> <div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-ods text-tertiary mt-1" focusable="false" id="zdkp" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-ods" /></svg> </div> <div class="autofit-col autofit-col-expand autofit-col-gutters"> <div class="card-title"><div class="h6"><a href="https://www.bnb.gov.br/documents/45743/0/Detalhamento+de+Programas.ods/5ae55503-718b-ad08-b477-a8b06dc3f7e0?version=20.0&amp;t=1695819318587&amp;download=true" class="stretched-link">Detalhamento de Programas.ods</a></div></div> <div class="card-subtitle"> <span class="font-weight-bold">Atualizado em: </span>27/09/2023 </div> <div class="card-detail"> <span class="label label-unstyled text-uppercase" id="apsn"><span class="label-item label-item-expand">ods</span></span><span class="label label-unstyled text-uppercase" id="dxmh"><span class="label-item label-item-expand">19 KB</span></span> </div> </div> </div> </div> </div></div> </div> </div> </div> </section>]]>
3199 <![CDATA[<div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-ods text-tertiary mt-1" focusable="false" id="zdkp" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-ods" /></svg> </div>]]>
3235 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-caoa" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-caoa'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-mzlj" > <h3 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Remuneração de Dirigentes</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-mzlj'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-tmxf" > <div class="component-paragraph pb-3 text-white text-left text-break"> <div>Informações sobre a remuneração dos Administradores e Conselheiros Fiscais.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-tmxf'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
3319 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-12"> <div id="fragment-47410-ykmv" > <div class="card card-horizontal shadow"> <div class="card-body"> <div class="card-row"> <div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-pdf text-tertiary mt-1" focusable="false" id="sbym" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-pdf" /></svg> </div> <div class="autofit-col autofit-col-expand autofit-col-gutters"> <div class="card-title"><div class="h6"><a href="https://www.bnb.gov.br/documents/45843/130415/Remunera%C3%A7%C3%A3o+de+Dirigentes+2023.pdf/5adf9d19-cba8-a67e-c91f-28c5eb5a5785?version=3.0&amp;t=1686676534534&amp;download=true" class="stretched-link">Remuneração de Dirigentes 2023.pdf</a></div></div> <div class="card-subtitle"> <span class="font-weight-bold">Atualizado em: </span>13/06/2023 </div> <div class="card-detail"> <span class="label label-unstyled text-uppercase" id="fsrv"><span class="label-item label-item-expand">pdf</span></span><span class="label label-unstyled text-uppercase" id="ktwh"><span class="label-item label-item-expand">107 KB</span></span> </div> </div> </div> </div> </div></div> <div id="fragment-0-vlqx" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-vlqx'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-2316268-edjv" > <script id="data_edjv" type="application/json">{"title":"Formulários de Referência - CVM","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"ddm__keyword__47054__Ano"}}</script> <h3 class="mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <div>Formulários de Referência</div> </h3> <span class="loading-animation"></span> <div class="documents-list"></div> </div><script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-edjv'); var configuration = {"contentSetId":"2360568","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"5","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"white","rgbValue":"rgb(236, 236, 236)"},"useTitle":true,"usePagination":true,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":false,"labelForRefDate":"Referente a","headingLevel":"h3","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script> <div id="fragment-0-utke" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-utke'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
3334 <![CDATA[<div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-pdf text-tertiary mt-1" focusable="false" id="sbym" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-pdf" /></svg> </div>]]>
3793 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-0"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-xwzf" > <h3 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Remuneração de Empregados</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-xwzf'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-cgvt" > <div class="component-paragraph pb-3 text-white text-left text-break"> <div>Informações sobre a remuneração dos Empregados do Banco do Nordeste.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-cgvt'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-2316268-vnvp" > <script id="data_vnvp" type="application/json">{"title":"Remuneração de Empregados","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"ddm__keyword__47054__Ano"}}</script> <span class="loading-animation"></span> <div class="documents-list"></div> </div><script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-vnvp'); var configuration = {"contentSetId":"3721429","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"50","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"","rgbValue":""},"useTitle":false,"usePagination":false,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":true,"labelForRefDate":"Referente a","headingLevel":"h2","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script> </div> </div> </div> </section>]]>
4249 <![CDATA[<section class="bg-primary-d1" style=""> <div class="container px-3 py-5"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-invp" > <h3 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Diárias e Passagens</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-invp'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-cinu" > <div class="component-paragraph pb-3 text-white text-left text-break"> <div>Diárias e passagens de servidores, empregados, comissionados, terceirizados, autoridades e membros do Banco do Nordeste.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-cinu'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-2316268-geqw" > <script id="data_geqw" type="application/json">{"title":"Diárias e Passagens","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"ddm__keyword__47054__Ano"}}</script> <span class="loading-animation"></span> <div class="documents-list"></div> </div><script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-geqw'); var configuration = {"contentSetId":"2707193","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"5","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"},"useTitle":false,"usePagination":true,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":true,"labelForRefDate":"Referente a","headingLevel":"h2","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script> <div id="fragment-0-tldj" > <div class="py-3"></div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-tldj'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-pgyj" > <h3 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Outras Despesas</span> </h3></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-pgyj'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-dxpl" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-outline-primary" href="/fdne" id="fragment-dxpl-link">Fundo de Desenvolvimento do Nordeste</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-dxpl'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-dxlr" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-outline-primary" href="/acesso-a-informacao/receitas-e-despesas/investimentos-em-publicidade" id="fragment-dxlr-link">Investimentos em Publicidade</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-dxlr'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-ebto" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-outline-primary" href="/acesso-a-informacao/licitacoes-e-contratos" id="fragment-ebto-link">Licitações e Contratos</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-ebto'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-btye" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-outline-primary" href="/acesso-a-informacao/receitas-e-despesas/relatorios-e-balancos-sociais" id="fragment-btye-link">Relatórios e Balanços Sociais</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-btye'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
4813 <![CDATA[<section class="bg-quaternary" style=""> <div class="container px-3 py-5"> <div class="row "> <div class="col-md-12"> <div id="fragment-47411-orru" > <div class="card mb-3 shadow "> <div class="d-flex flex-column flex-lg-row"> <div class="px-5 pt-5 pb-4 pb-lg-5 pr-lg-5"> <div class="lexicon-icon-box rounded-circle bg-quaternary text-primary"> <svg class="lexicon-icon lexicon-icon-aperto-mao" focusable="false" id="solm" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#aperto-mao" /></svg> </div> </div> <div class="px-5 pb-5 pl-lg-0 pt-lg-5"> <div class="h4"> <div>Política de Transações com Partes Relacionadas</div> </div> <div> <div><p>Nesta seção, acesse a Política de Transações com Partes Relacionadas do Banco do Nordeste.</p> </div> </div> <div><a class="btn btn-link" href="/transparencia-e-prestacao-de-contas/politica-de-transacoes-com-partes-relacionadas" rel="">Acessar</a></div> </div> </div> </div> </div><style>.fragment_169311 { }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-47411-orru'); var configuration = {"spritemap":"bnb","symbol":"aperto-mao","cardShadow":"shadow","borderRadius":"","externalLink":false,"bottomSpacing":"mb-3","btnStyle":"btn-link","btLegend":"","cardOrientation":"d-flex flex-column flex-lg-row","iconStyle":"bg-quaternary text-primary","hasButton":true,"iconBox":"rounded-circle"};let links = fragmentElement.querySelectorAll('a.btn') let titles = fragmentElement.querySelectorAll('div.h4') links.forEach((link, index) => { let ariaLabel = (configuration.btLegend == '') ? 'Saiba mais sobre ' + titles[index].innerText : configuration.btLegend ariaLabel = (configuration.externalLink) ? ariaLabel + ' (link externo)' : ariaLabel link.setAttribute("aria-label", ariaLabel) });}());</script> <div id="fragment-47411-mxpa" > <div class="card mb-3 shadow "> <div class="d-flex flex-column flex-lg-row"> <div class="px-5 pt-5 pb-4 pb-lg-5 pr-lg-5"> <div class="lexicon-icon-box rounded-circle bg-quaternary text-primary"> <svg class="lexicon-icon lexicon-icon-sheets" focusable="false" id="yrnu" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/clay/icons.svg#sheets" /></svg> </div> </div> <div class="px-5 pb-5 pl-lg-0 pt-lg-5"> <div class="h4"> <div>Política de Dividendos</div> </div> <div> <div><p>Nesta seção, acesse a Política de Dividendos do Banco do Nordeste.</p> </div> </div> <div><a class="btn btn-link" href="/transparencia-e-prestacao-de-contas/politica-de-dividendos" rel="">Acessar</a></div> </div> </div> </div> </div><script>(function() {var fragmentElement = document.querySelector('#fragment-47411-mxpa'); var configuration = {"spritemap":"clay","symbol":"sheets","cardShadow":"shadow","borderRadius":"","externalLink":false,"bottomSpacing":"mb-3","btnStyle":"btn-link","btLegend":"","cardOrientation":"d-flex flex-column flex-lg-row","iconStyle":"bg-quaternary text-primary","hasButton":true,"iconBox":"rounded-circle"};let links = fragmentElement.querySelectorAll('a.btn') let titles = fragmentElement.querySelectorAll('div.h4') links.forEach((link, index) => { let ariaLabel = (configuration.btLegend == '') ? 'Saiba mais sobre ' + titles[index].innerText : configuration.btLegend ariaLabel = (configuration.externalLink) ? ariaLabel + ' (link externo)' : ariaLabel link.setAttribute("aria-label", ariaLabel) });}());</script> </div> </div> </div> </section>]]>
4900 <![CDATA[<section class="bg-" style=""> <div class="container px-3 py-5"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-fvfv" > <h2 class="component-heading mb-0 pb-3 text-left text-break "> <span>Portal da Transparência</span> </h2></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-fvfv'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-fegs" > <div class="component-paragraph pb-3 text-left text-break"> <div>O Banco do Nordeste acredita que a transparência pública estimula o fortalecimento da democracia e o desenvolvimento da cidadania. Por isso, a página do Banco do Nordeste no Portal da Transparência do Governo Federal divulga, periodicamente, as despesas realizadas pela instituição, contribuindo, assim, para propagar as ações de governo voltadas para o aumento da transparência e controle social.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-fegs'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-kjbk" > <div class="component-html pb-3"> <div> <strong> Consulte as despesas do Banco do Nordeste no </strong><a href="http://www.transparencia.gov.br/"> Portal da Transparência do Governo Federal</a>.</div> </div></div><style>.component-html img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-kjbk'); var configuration = {"bottomSpacing":"3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-jveu" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-link" href="http://www.portaltransparencia.gov.br/orcamento/receitas?ordenarPor=ano&amp;direcao=desc" id="fragment-jveu-link">Orçamento da receita</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-jveu'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-xfqg" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-link" href="http://www.portaltransparencia.gov.br/orcamento/despesas?ordenarPor=ano&amp;direcao=desc" id="fragment-xfqg-link">Orçamento da despesa</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-xfqg'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-xtxn" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-link" href="http://www.portaltransparencia.gov.br/receitas/consulta?ordenarPor=ano&amp;direcao=desc" id="fragment-xtxn-link">Receita</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-xtxn'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-hyvs" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-link" href="http://www.portaltransparencia.gov.br/despesas/lista-consultas" id="fragment-hyvs-link">Despesa</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-hyvs'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-rsbb" > <div class="component-button pb-3 text-left text-break"> <div><a class="btn btn-nm btn-link" href="https://portaldatransparencia.gov.br/notas-fiscais/consulta?ordenarPor=municipioFornecedor&amp;direcao=asc" id="fragment-rsbb-link" target="_blank">Notas fiscais eletrônicas</a></div> </div></div><script>(function() {var fragmentElement = document.querySelector('#fragment-0-rsbb'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> </div> </div> </div> </section>]]>
5078 <![CDATA[<section class="bg-primary" style=""> <div class="container px-3 py-5"> <div class="row "> <div class="col-md-12"> <div id="fragment-0-pbqj" > <h2 class="component-heading mb-0 pb-3 text-white text-left text-break fragment-heading-text-colored"> <span>Orientações - Portal da Transparência</span> </h2></div><style>.fragment-heading-text-colored a { color: inherit; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-pbqj'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"white","rgbValue":"rgb(231, 231, 231)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-0-kpci" > <div class="component-paragraph pb-3 text-white text-left text-break"> <div>Confira um passo a passo de como utlizar o Portal da Transparência.</div> </div></div><style>.component-paragraph img { max-width: 100%; }</style><script>(function() {var fragmentElement = document.querySelector('#fragment-0-kpci'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script> <div id="fragment-47410-leeu" > <div class="card card-horizontal shadow"> <div class="card-body"> <div class="card-row"> <div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-pdf text-tertiary mt-1" focusable="false" id="pkto" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-pdf" /></svg> </div> <div class="autofit-col autofit-col-expand autofit-col-gutters"> <div class="card-title"><div class="h6"><a href="https://www.bnb.gov.br/documents/45743/0/Passo+a+Passo+-+Portal+da+Transpar%C3%AAncia.pdf/adae418a-6faf-4e6a-c354-923e49f05713?version=1.0&amp;t=1691699531417&amp;download=true" class="stretched-link">Passo a Passo - Portal da Transparência.pdf</a></div></div> <div class="card-subtitle"> <span class="font-weight-bold">Atualizado em: </span>10/08/2023 </div> <div class="card-detail"> <span class="label label-unstyled text-uppercase" id="veph"><span class="label-item label-item-expand">pdf</span></span><span class="label label-unstyled text-uppercase" id="jxul"><span class="label-item label-item-expand">421 KB</span></span> </div> </div> </div> </div> </div></div> </div> </div> </div> </section>]]>
5133 <![CDATA[<div class="autofit-col align-self-start" style="font-size:4.5rem"> <svg class="lexicon-icon lexicon-icon-arquivo-pdf text-tertiary mt-1" focusable="false" id="pkto" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#arquivo-pdf" /></svg> </div>]]>
5453 <![CDATA[<a aria-label="Instagram" href="https://www.instagram.com/bancodonordeste/" target="_blank" class="mx-2 lexicon-icon-box bg-dark text-white rounded-circle" style="font-size:1.3em" role="menuitem"> <span> <svg class="lexicon-icon lexicon-icon-social-instagram" focusable="false" id="ddiw" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#social-instagram"/></svg> </span> <span class="hide-accessible">Instagram</span> </a>]]>
5458 <![CDATA[<a aria-label="Youtube" href="https://www.youtube.com/bancodonordesteoficial" target="_blank" class="mx-2 lexicon-icon-box bg-dark text-white rounded-circle" style="font-size:1.3em" role="menuitem"> <span> <svg class="lexicon-icon lexicon-icon-social-youtube" focusable="false" id="hxxo" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#social-youtube"/></svg> </span> <span class="hide-accessible">Youtube</span> </a>]]>
5463 <![CDATA[<a aria-label="Facebook" href="https://www.facebook.com/bancodonordeste" target="_blank" class="mx-2 lexicon-icon-box bg-dark text-white rounded-circle" style="font-size:1.3em" role="menuitem"> <span> <svg class="lexicon-icon lexicon-icon-social-facebook" focusable="false" id="wgdg" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#social-facebook"/></svg> </span> <span class="hide-accessible">Facebook</span> </a>]]>
5468 <![CDATA[<a aria-label="Twitter" href="https://twitter.com/BancodoNordeste" target="_blank" class="mx-2 lexicon-icon-box bg-dark text-white rounded-circle" style="font-size:1.3em" role="menuitem"> <span> <svg class="lexicon-icon lexicon-icon-social-twitter" focusable="false" id="lsnt" role="presentation"><use xlink:href="https://www.bnb.gov.br/o/bnb-dxp-theme/images/bnb/icons.svg#social-twitter"/></svg> </span> <span class="hide-accessible">Twitter</span> </a>]]>
5551 <![CDATA[<img alt="Selo da Ética" style="width:154px" src="https://www.bnb.gov.br/o/bnb-dxp-theme/images/selo-etica.svg" />]]>
5554 <![CDATA[<img alt="Selo da Lei de Acesso à Informação" style="width:42px" src="https://www.bnb.gov.br/o/bnb-dxp-theme/images/selo-lai.svg" />]]>
731 <![CDATA[<style data-senna-track="temporary" type="text/css"> </style>]]>
2241 <![CDATA[<style> .isDisabled { color: darkslategray !important; pointer-events: none; } .confIcon{ height:0.7em; margin-top:0; } </style>]]>
2300 <![CDATA[<style>.fragment_1170299 { }</style>]]>
2308 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
2356 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
2376 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
2396 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
2416 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
2443 <![CDATA[<style>.page-item button { border-radius: 2rem !important; }</style>]]>
2842 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
2862 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
2926 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
2992 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
3053 <![CDATA[<style>.fragment_136960 { }</style>]]>
3132 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
3152 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
3263 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
3283 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
3805 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
3825 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
4261 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
4281 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
4705 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
4842 <![CDATA[<style>.fragment_169311 { }</style>]]>
4930 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
4952 <![CDATA[<style>.component-html img { max-width: 100%; }</style>]]>
5090 <![CDATA[<style>.fragment-heading-text-colored a { color: inherit; }</style>]]>
5110 <![CDATA[<style>.component-paragraph img { max-width: 100%; }</style>]]>
101 <![CDATA[<script id="f5_cspm">(function(){var f5_cspm={f5_p:'BEHMOGABHFIAMNFPEIJINHHJBOGDIFFICNONKHIECPDLCCOBKCPOAPDHNEIIOKPPCGMBMAGEAADECGEHHJAAAPLKAANKMODHPDEHCLDHMMCPOAFMNLMIHDBHONBMHBHG',setCharAt:function(str,index,chr){if(index>str.length-1)return str;return str.substr(0,index)+chr+str.substr(index+1);},get_byte:function(str,i){var s=(i/16)|0;i=(i&15);s=s*32;return((str.charCodeAt(i+16+s)-65)<<4)|(str.charCodeAt(i+s)-65);},set_byte:function(str,i,b){var s=(i/16)|0;i=(i&15);s=s*32;str=f5_cspm.setCharAt(str,(i+16+s),String.fromCharCode((b>>4)+65));str=f5_cspm.setCharAt(str,(i+s),String.fromCharCode((b&15)+65));return str;},set_latency:function(str,latency){latency=latency&0xffff;str=f5_cspm.set_byte(str,40,(latency>>8));str=f5_cspm.set_byte(str,41,(latency&0xff));str=f5_cspm.set_byte(str,35,2);return str;},wait_perf_data:function(){try{var wp=window.performance.timing;if(wp.loadEventEnd>0){var res=wp.loadEventEnd-wp.navigationStart;if(res<60001){var cookie_val=f5_cspm.set_latency(f5_cspm.f5_p,res);window.document.cookie='f5avr0961558605aaaaaaaaaaaaaaaa_cspm_='+encodeURIComponent(cookie_val)+';path=/';} return;}} catch(err){return;} setTimeout(f5_cspm.wait_perf_data,100);return;},go:function(){var chunk=window.document.cookie.split(/\s*;\s*/);for(var i=0;i<chunk.length;++i){var pair=chunk[i].split(/\s*=\s*/);if(pair[0]=='f5_cspm'&&pair[1]=='1234') {var d=new Date();d.setTime(d.getTime()-1000);window.document.cookie='f5_cspm=;expires='+d.toUTCString()+';path=/;';setTimeout(f5_cspm.wait_perf_data,100);}}}} f5_cspm.go();}());</script>]]>
231 <![CDATA[<script data-senna-track="temporary" type="text/javascript"> // <![CDATA[ var Liferay = Liferay || {}; Liferay.Browser = { acceptsGzip: function() { return false; }, getMajorVersion: function() { return 0; }, getRevision: function() { return ''; }, getVersion: function() { return ''; }, isAir: function() { return false; }, isChrome: function() { return false; }, isEdge: function() { return false; }, isFirefox: function() { return false; }, isGecko: function() { return false; }, isIe: function() { return false; }, isIphone: function() { return false; }, isLinux: function() { return false; }, isMac: function() { return false; }, isMobile: function() { return false; }, isMozilla: function() { return false; }, isOpera: function() { return false; }, isRtf: function() { return false; }, isSafari: function() { return false; }, isSun: function() { return false; }, isWebKit: function() { return false; }, isWindows: function() { return false; } }; Liferay.Data = Liferay.Data || {}; Liferay.Data.ICONS_INLINE_SVG = true; Liferay.Data.NAV_SELECTOR = '#navigation'; Liferay.Data.NAV_SELECTOR_MOBILE = '#navigationCollapse'; Liferay.Data.isCustomizationView = function() { return false; }; Liferay.Data.notices = [ null ]; Liferay.PortletKeys = { DOCUMENT_LIBRARY: 'com_liferay_document_library_web_portlet_DLPortlet', DYNAMIC_DATA_MAPPING: 'com_liferay_dynamic_data_mapping_web_portlet_DDMPortlet', ITEM_SELECTOR: 'com_liferay_item_selector_web_portlet_ItemSelectorPortlet' }; Liferay.PropsValues = { JAVASCRIPT_SINGLE_PAGE_APPLICATION_TIMEOUT: 0, NTLM_AUTH_ENABLED: false, UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE: 104857600 }; Liferay.ThemeDisplay = { getLayoutId: function() { return '57'; }, getLayoutRelativeControlPanelURL: function() { return '/group/guest/~/control_panel/manage'; }, getLayoutRelativeURL: function() { return '/web/guest/acesso-a-informacao/receitas-e-despesas'; }, getLayoutURL: function() { return 'https://www.bnb.gov.br/web/guest/acesso-a-informacao/receitas-e-despesas'; }, getParentLayoutId: function() { return '15'; }, isControlPanel: function() { return false; }, isPrivateLayout: function() { return 'false'; }, isVirtualLayout: function() { return false; }, getBCP47LanguageId: function() { return 'pt-BR'; }, getCanonicalURL: function() { return 'https\x3a\x2f\x2fwww\x2ebnb\x2egov\x2ebr\x2facesso-a-informacao\x2freceitas-e-despesas'; }, getCDNBaseURL: function() { return 'https://www.bnb.gov.br'; }, getCDNDynamicResourcesHost: function() { return ''; }, getCDNHost: function() { return ''; }, getCompanyGroupId: function() { return '20128'; }, getCompanyId: function() { return '20101'; }, getDefaultLanguageId: function() { return 'pt_BR'; }, getDoAsUserIdEncoded: function() { return ''; }, getLanguageId: function() { return 'pt_BR'; }, getParentGroupId: function() { return '20124'; }, getPathContext: function() { return ''; }, getPathImage: function() { return '/image'; }, getPathJavaScript: function() { return '/o/frontend-js-web'; }, getPathMain: function() { return '/c'; }, getPathThemeImages: function() { return 'https://www.bnb.gov.br/o/bnb-dxp-theme/images'; }, getPathThemeRoot: function() { return '/o/bnb-dxp-theme'; }, getPlid: function() { return '84'; }, getPortalURL: function() { return 'https://www.bnb.gov.br'; }, getRealUserId: function() { return '20105'; }, getScopeGroupId: function() { return '20124'; }, getScopeGroupIdOrLiveGroupId: function() { return '20124'; }, getSessionId: function() { return ''; }, getSiteAdminURL: function() { return 'https://www.bnb.gov.br/group/guest/~/control_panel/manage?p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view'; }, getSiteGroupId: function() { return '20124'; }, getURLControlPanel: function() { return '/group/control_panel?refererPlid=84'; }, getURLHome: function() { return 'https\x3a\x2f\x2fwww\x2ebnb\x2egov\x2ebr\x2fweb\x2fguest'; }, getUserEmailAddress: function() { return ''; }, getUserId: function() { return '20105'; }, getUserName: function() { return ''; }, isAddSessionIdToURL: function() { return false; }, isImpersonated: function() { return false; }, isSignedIn: function() { return false; }, isStagedPortlet: function() { return false; }, isStateExclusive: function() { return false; }, isStateMaximized: function() { return false; }, isStatePopUp: function() { return false; } }; var themeDisplay = Liferay.ThemeDisplay; Liferay.AUI = { getAvailableLangPath: function() { return 'available_languages.jsp?browserId=other&themeId=portalbancodonordeste_WAR_bnbdxptheme&colorSchemeId=01&minifierType=js&languageId=pt_BR&t=1695350076125'; }, getCombine: function() { return true; }, getComboPath: function() { return '/combo/?browserId=other&minifierType=&languageId=pt_BR&t=1670770798365&'; }, getDateFormat: function() { return '%d/%m/%Y'; }, getEditorCKEditorPath: function() { return '/o/frontend-editor-ckeditor-web'; }, getFilter: function() { var filter = 'raw'; filter = 'min'; return filter; }, getFilterConfig: function() { var instance = this; var filterConfig = null; if (!instance.getCombine()) { filterConfig = { replaceStr: '.js' + instance.getStaticResourceURLParams(), searchExp: '\\.js$' }; } return filterConfig; }, getJavaScriptRootPath: function() { return '/o/frontend-js-web'; }, getLangPath: function() { return 'aui_lang.jsp?browserId=other&themeId=portalbancodonordeste_WAR_bnbdxptheme&colorSchemeId=01&minifierType=js&languageId=pt_BR&t=1670770798365'; }, getPortletRootPath: function() { return '/html/portlet'; }, getStaticResourceURLParams: function() { return '?browserId=other&minifierType=&languageId=pt_BR&t=1670770798365'; } }; Liferay.authToken = '5NXJKTmY'; Liferay.currentURL = '\x2fweb\x2fguest\x2facesso-a-informacao\x2freceitas-e-despesas'; Liferay.currentURLEncoded = '\x252Fweb\x252Fguest\x252Facesso-a-informacao\x252Freceitas-e-despesas'; // ]]> </script>]]>
580 <![CDATA[<script data-senna-track="temporary" type="text/javascript"> // <![CDATA[ // ]]> </script>]]>
603 <![CDATA[<script data-senna-track="permanent" id="googleAnalyticsScript" type="text/javascript"> (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { var arrayValue = i[r].q || []; i[r].q = arrayValue; (i[r].q).push(arguments); }; i[r].l = 1 * new Date(); a = s.createElement(o); m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m); })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'G-0W34JDGDKK', 'auto'); ga('send', 'pageview'); Liferay.on( 'endNavigate', function(event) { ga('set', 'page', event.path); ga('send', 'pageview'); } ); </script>]]>
662 <![CDATA[<script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-0W34JDGDKK'); </script>]]>
774 <![CDATA[<script type="text/javascript"> // <![CDATA[ Liferay.Loader.require('frontend-js-spa-web@3.0.53/liferay/init.es', function(frontendJsSpaWeb3053LiferayInitEs) { (function(){ var frontendJsSpaWebLiferayInitEs = frontendJsSpaWeb3053LiferayInitEs; (function() {var $ = AUI.$;var _ = AUI._; Liferay.SPA = Liferay.SPA || {}; Liferay.SPA.cacheExpirationTime = -1; Liferay.SPA.clearScreensCache = false; Liferay.SPA.debugEnabled = false; Liferay.SPA.excludedPaths = ["/c/document_library","/documents","/image"]; Liferay.SPA.loginRedirect = ''; Liferay.SPA.navigationExceptionSelectors = ':not([target="_blank"]):not([data-senna-off]):not([data-resource-href]):not([data-cke-saved-href]):not([data-cke-saved-href])'; Liferay.SPA.requestTimeout = 0; Liferay.SPA.userNotification = { message: 'Parece que isso está demorando mais do que o esperado.', timeout: 30000, title: 'Oops' }; frontendJsSpaWebLiferayInitEs.default.init( function(app) { app.setPortletsBlacklist({"com_liferay_site_navigation_directory_web_portlet_SitesDirectoryPortlet":true,"com_liferay_nested_portlets_web_portlet_NestedPortletsPortlet":true,"com_liferay_login_web_portlet_LoginPortlet":true,"com_liferay_login_web_portlet_FastLoginPortlet":true}); app.setValidStatusCodes([221,490,494,499,491,492,493,495,220]); } );})();})(); }); // ]]> </script>]]>
803 <![CDATA[<script type="text/javascript"> // <![CDATA[ Liferay.on( 'ddmFieldBlur', function(event) { if (window.Analytics) { Analytics.send( 'fieldBlurred', 'Form', { fieldName: event.fieldName, focusDuration: event.focusDuration, formId: event.formId, page: event.page } ); } } ); Liferay.on( 'ddmFieldFocus', function(event) { if (window.Analytics) { Analytics.send( 'fieldFocused', 'Form', { fieldName: event.fieldName, formId: event.formId, page: event.page } ); } } ); Liferay.on( 'ddmFormPageShow', function(event) { if (window.Analytics) { Analytics.send( 'pageViewed', 'Form', { formId: event.formId, page: event.page, title: event.title } ); } } ); Liferay.on( 'ddmFormSubmit', function(event) { if (window.Analytics) { Analytics.send( 'formSubmitted', 'Form', { formId: event.formId } ); } } ); Liferay.on( 'ddmFormView', function(event) { if (window.Analytics) { Analytics.send( 'formViewed', 'Form', { formId: event.formId, title: event.title } ); } } ); // ]]> </script>]]>
915 <![CDATA[<script data-senna-track="temporary" type="text/javascript"> if (window.Analytics) { window._com_liferay_document_library_analytics_isViewFileEntry = false; } </script>]]>
1051 <![CDATA[<script> new window.VLibras.Widget('https://vlibras.gov.br/app'); </script>]]>
2310 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-vinp'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2358 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-jdyz'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2378 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-kyus'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2398 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-kccq'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2418 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-jxvx'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2437 <![CDATA[<script id="data_zwke" type="application/json">{"title":"Transferências da União para FNE","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"title"}}</script>]]>
2445 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-zwke'); var configuration = {"contentSetId":"2707191","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"50","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"","rgbValue":""},"useTitle":false,"usePagination":false,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":true,"labelForRefDate":"Referente a","headingLevel":"h2","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script>]]>
2824 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-krmq'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2844 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-pwxr'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2864 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-qhbz'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2908 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-meht'); var configuration = {"height":"py-4"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2928 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-nlfo'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2974 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-xymb'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
2994 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-fqei'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3018 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-lweo'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3086 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-qbfm'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3134 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-mmox'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3154 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-ndfi'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3178 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-hoty'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3245 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-caoa'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3265 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-mzlj'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3285 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-tmxf'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3352 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-vlqx'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3371 <![CDATA[<script id="data_edjv" type="application/json">{"title":"Formulários de Referência - CVM","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"ddm__keyword__47054__Ano"}}</script>]]>
3380 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-edjv'); var configuration = {"contentSetId":"2360568","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"5","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"white","rgbValue":"rgb(236, 236, 236)"},"useTitle":true,"usePagination":true,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":false,"labelForRefDate":"Referente a","headingLevel":"h3","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script>]]>
3759 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-utke'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3807 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-xwzf'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3827 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-cgvt'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
3846 <![CDATA[<script id="data_vnvp" type="application/json">{"title":"Remuneração de Empregados","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"ddm__keyword__47054__Ano"}}</script>]]>
3852 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-vnvp'); var configuration = {"contentSetId":"3721429","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"50","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"","rgbValue":""},"useTitle":false,"usePagination":false,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":true,"labelForRefDate":"Referente a","headingLevel":"h2","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script>]]>
4263 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-invp'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4283 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-cinu'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4302 <![CDATA[<script id="data_geqw" type="application/json">{"title":"Diárias e Passagens","type":0,"typeSettings":{"anyClassTypeDLFileEntryAssetRendererFactory":"47053","orderByColumn1":"ddm__keyword__47054__Ano"}}</script>]]>
4308 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-2316268-geqw'); var configuration = {"contentSetId":"2707193","showDateConversions":false,"showModifiedDate":true,"showRefDate":false,"textAlign":"left","pageSize":"5","showYear":false,"groupBy":"noGroup","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"},"useTitle":false,"usePagination":true,"bottomSpacing":"3","labelForYear":"Ocorrido em","useContentSetTitle":true,"labelForRefDate":"Referente a","headingLevel":"h2","showCreateDate":true,"activeDebug":false};const editMode = document.body.classList.contains('has-edit-mode-menu') const apiURL = `${Liferay.ThemeDisplay.getPortalURL()}/o/headless-delivery` const contentSetsEndPoint = `/v1.0/content-sets/${configuration.contentSetId}/content-set-elements` const restrictFields = 'title,content.contentUrl,content.dateCreated,content.dateModified,content.documentType,content.fileExtension,content.sizeInBytes' const params = { fields: restrictFields, 'pageSize': configuration.pageSize, 'page': 1 } const pathThemeImages = Liferay.ThemeDisplay.getPathThemeImages() const spritemapBNB = `${pathThemeImages}/bnb/icons.svg` const spritemapClay = `${pathThemeImages}/clay/icons.svg` const scriptAssetListJson = fragmentElement.querySelector(`script#data_${fragmentElement.id.slice(-4)}`) const assetListObject = (scriptAssetListJson) ? JSON.parse(scriptAssetListJson.text) : null const documentsList = fragmentElement.querySelector('.documents-list') const loadingAnimation = fragmentElement.querySelector('.loading-animation') const orderByYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência', 'ddm__keyword__47054__Ano'] const orderByMonthYearAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const orderByDayAttrs = ['modifiedDate', 'createDate', 'publishDate', 'ddm__keyword__47047__DataReferência'] const fileEntryTypes = { 'docOrdin': 47046, 'docAnual': 47053 } const validity = (assetListObject) ? validateConfiguration() : null validity && init() // funcao de inicialização function init() { fragmentElement.classList.add('mb-4') editMode && reportConstraints() fetchDocumentsPage() } // constrói um objeto para verificar status de validade de algumas configurações function validateConfiguration() { let orderByColumn = assetListObject.typeSettings.orderByColumn1 let orderByColumnName = getOrderByFieldName(orderByColumn) let canGroupByYear = orderByYearAttrs.includes(orderByColumn) let canGroupByMonthYear = orderByMonthYearAttrs.includes(orderByColumn) let canGroupByDay = orderByDayAttrs.includes(orderByColumn) let canShowRefDate = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docOrdin) let canShowYear = (assetListObject.typeSettings.anyClassTypeDLFileEntryAssetRendererFactory == fileEntryTypes.docAnual) let validityState = { 'canGroupByYear': { 'state': canGroupByYear, 'msg' : canGroupByYear ? '' : `A coleção não pode ser agrupada por ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByMonthYear': { 'state': canGroupByMonthYear, 'msg' : canGroupByMonthYear ? '' : `A coleção não pode ser agrupada por mês e ano, pois está ordenada por ${orderByColumnName}.` }, 'canGroupByDay': { 'state': canGroupByDay, 'msg' : canGroupByDay ? '' : `A coleção não pode ser agrupada por dia, pois está ordenada por ${orderByColumnName}.` }, 'canShowRefDate': { 'state': canShowRefDate, 'msg' : canShowRefDate ? '' : 'Não é possível mostrar o campo Data de Referência. Esse metadado existe apenas em coleções de Documentos Ordinários.' }, 'canShowYear': { 'state': canShowYear, 'msg' : canShowYear ? '' : 'Não é possível mostrar o campo Ano. Esse metadado existe apenas em coleções de Documentos Anuais.' } } return validityState } // alerta sobre restrições na configuração function reportConstraints() { cleanAlerts() // alerta sobre restrições let validationMessages = [] configuration.groupBy == 'groupByYear' && !validity.canGroupByYear.state && validationMessages.push(validity.canGroupByYear.msg) configuration.groupBy == 'groupByMonthYear' && !validity.canGroupByMonthYear.state && validationMessages.push(validity.canGroupByMonthYear.msg) configuration.groupBy == 'groupByDay' && !validity.canGroupByDay.state && validationMessages.push(validity.canGroupByDay.msg) configuration.showRefDate && !validity.canShowRefDate.state && validationMessages.push(validity.canShowRefDate.msg) configuration.showYear && !validity.canShowYear.state && validationMessages.push(validity.canShowYear.msg) validationMessages.length > 0 && displayAlert('danger', 'Configuração inválida', validationMessages.join('<br/>'), documentsList, 'beforebegin') // debug if (configuration.activeDebug) { console.clear() console.log('Propriedades da Coleção:') console.log(assetListObject) console.log('Configuração do Fragmento:') console.log(configuration) console.log('Validade da Configuração:') console.log(validity) } } // principal funcao para pegar os dados function fetchDocumentsPage(page) { params.page = (page) ? page : params.page let request = Liferay.Util.addParams(params, apiURL+contentSetsEndPoint) fetch( request, { method: 'GET', headers: { 'Content-Type': 'application/json' } } ).then(response => { if (response.ok) { return response.json() } }).then(documents => { handleDocuments(documents) if (editMode && configuration.activeDebug) { console.log(`Retorno da requisição (page ${params.page}):`) console.log(documents) } }) } // manipula dados retornados da coleção function handleDocuments(documents) { loadingAnimation && loadingAnimation.remove() if (documents.items.length > 0) { switch (configuration.groupBy) { case 'noGroup': renderDocumentsList(documents) break case 'groupByYear': (validity.canGroupByYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByMonthYear': (validity.canGroupByMonthYear.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break case 'groupByDay': (validity.canGroupByDay.state) ? renderDocumentsListByGroup(documents) : renderDocumentsList(documents) break } configuration.usePagination && renderPaginationBar(documents.page, documents.lastPage, documents.totalCount) } else { displayAlert('info', 'Aviso', 'Não foram encontrados documentos', documentsList, 'afterbegin') } } // renderiza lista agrupada function renderDocumentsListByGroup(documents) { let lastListGroup = documentsList.querySelector('.list-group:last-child') let currentGroup = (lastListGroup) ? lastListGroup.dataset.group : 0 configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`Extração do grupo a partir do campo ${getOrderByFieldName(assetListObject.typeSettings.orderByColumn1)}:`) documents.items.forEach(doc => { let group = getDocumentGroup(doc) if (currentGroup != group) { let listGroup = document.createElement('ul') listGroup.classList.add('list-group') listGroup.dataset.group = group listGroup.setAttribute('aria-label', `${assetListObject.title} de ${group}`) lastListGroup = documentsList.insertAdjacentElement('beforeend', listGroup) lastListGroup.insertAdjacentHTML('afterbegin', renderListGroupHeader(group)) currentGroup = group } lastListGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // extrai e retorna o dado (string) utilizado como agrupador (dia, mês ou ano) a partir do campo utilizado como primeira ordenação da coleção function getDocumentGroup(document) { let fieldData let group let dateField let options let test let orderByColumn = assetListObject.typeSettings.orderByColumn1 switch (orderByColumn) { case 'ddm__keyword__47047__DataReferência': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'ddm__keyword__47054__Ano': fieldData = document.content.documentType.contentFields[0].contentFieldValue.data break case 'modifiedDate': fieldData = document.content.dateModified break case 'createDate': fieldData = document.content.dateCreated break case 'publishDate': // verificar esse caso por que não há uma campo data de publicação em coleções de documentos fieldData = document.content.dateCreated break } dateField = new Date(fieldData) switch (configuration.groupBy) { case 'groupByYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência' || orderByColumn == 'ddm__keyword__47054__Ano') group = test ? dateField.getUTCFullYear() : dateField.getFullYear() break case 'groupByMonthYear': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {month:'long', year:'numeric', timeZone: 'UTC'} : { month:'long', year:'numeric' } group = dateField.toLocaleDateString('pt-BR', options) group = group.charAt(0).toUpperCase() + group.slice(1) break case 'groupByDay': test = (orderByColumn == 'ddm__keyword__47047__DataReferência') options = test ? {timeZone: 'UTC'} : {} group = dateField.toLocaleDateString('pt-BR', options) break } configuration.activeDebug && configuration.showDateConversions && editMode && console.log(`${fieldData} --> ${group}`) return group } // renderiza lista comum function renderDocumentsList(documents) { let listGroup = getNodeElement(documentsList, 'afterbegin', 'ul', '.list-group') listGroup.setAttribute('aria-label', assetListObject.title) documents.items.forEach(doc => { listGroup.insertAdjacentHTML('beforeend', renderListGroupItem(doc)) }) } // renderiza cabeçalho da lista function renderListGroupHeader(title) { let listHeaderHTML = ` <li class="list-group-header"> <span class="list-group-header-title"><big>${title}</big></span> </li> ` return listHeaderHTML } // renderiza um item da lista function renderListGroupItem(document) { let dateCreated = (configuration.showCreateDate) ? new Date(document.content.dateCreated) : null let dateCreatedHTML = (dateCreated) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Publicado em</span> <span class="small">${dateCreated.toLocaleDateString('pt-BR')}</span> </div>` : '' let dateModified = (configuration.showModifiedDate) ? new Date(document.content.dateModified) : null let dateModifiedHTML = (dateModified) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">Atualizado em</span> <span class="small">${dateModified.toLocaleDateString('pt-BR')}</span> </div>` : '' let refDate = (configuration.showRefDate && validity.canShowRefDate.state) ? new Date(document.content.documentType.contentFields[0].contentFieldValue.data) : null let refDateHTML = (refDate) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForRefDate}</span> <span class="small">${refDate.toLocaleDateString('pt-BR', {timeZone: 'UTC'})}</span> </div>` : '' let year = (configuration.showYear && validity.canShowYear.state) ? document.content.documentType.contentFields[0].contentFieldValue.data : null let yearHTML = (year) ? ` <div class="d-flex flex-row flex-lg-column text-lg-right ml-lg-3 mr-md-2 mr-lg-0"> <span class="small font-weight-bold text-nowrap mr-1 mr-lg-0">${configuration.labelForYear}</span> <span class="small">${year}</span> </div>` : '' let hasMetadatas = (year || refDate || dateCreated || dateModified) let metadataHTML = (hasMetadatas) ? ` <div class="d-flex flex-column flex-md-row"> ${yearHTML} ${refDateHTML} ${dateCreatedHTML} ${dateModifiedHTML} </div>` : '' let listItemHTML = ` <li class="list-group-item list-group-item-flex align-items-center"> <div class="autofit-col"> <svg class="lexicon-icon text-tertiary lexicon-icon-lg" focusable="false" role="presentation" viewBox="0 0 512 512"> <use xlink:href="${spritemapBNB}#arquivo-${document.content.fileExtension}" /> </svg> </div> <div class="autofit-col autofit-col-expand"> <div class="d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between"> <div class="d-flex flex-column"> <span class="list-group-title"> <a href="${document.content.contentUrl}">${document.title}</a> </span> <span class="list-group-subtitle text-uppercase small"> ${document.content.fileExtension}, ${Liferay.Util.formatStorage(document.content.sizeInBytes, {addSpaceBeforeSuffix: true})} </span> </div> ${metadataHTML} </div> </div> </li> ` return listItemHTML } // renderiza paginação function renderPaginationBar(page, lastPage, totalCount) { let paginationBar = getNodeElement(fragmentElement, 'beforeend', 'div', '.pagination-bar') let lastIndex = (page === lastPage) ? totalCount : configuration.pageSize*page let nDocuments = (page+1 === lastPage) ? totalCount - configuration.pageSize*page : configuration.pageSize paginationBar.classList.add('justify-content-center', 'justify-content-lg-between') let textColor = (configuration.textColor.cssClass) ? `text-${configuration.textColor.cssClass}` : '' paginationBar.innerHTML = ` <div class="pagination-results mr-0 ${textColor}">Exibindo 1 a ${lastIndex} de ${totalCount} documentos.</div> <ul class="pagination"> <li class="page-item"> <button class="btn btn-unstyled page-link" type="button"> Exibir mais ${nDocuments} documentos ${renderIcon('angle-down', spritemapClay, 'ml-2')} </button> </li> </ul> ` let showMoreButton = paginationBar.querySelector('button.page-link') if (page !== lastPage) { showMoreButton.addEventListener('click', e => { showMoreButton.querySelector('svg').remove() let loadAnimation = getNodeElement(showMoreButton, 'beforeend', 'span', '.loading-animation') loadAnimation.classList.add('loading-animation-sm', 'ml-2') fetchDocumentsPage(page+1) }) } else { showMoreButton.remove() } } // imprime um mensagem de alerta function displayAlert(style, title, msg, parentNode, position) { let styleIcons = { 'danger': 'exclamation-full', 'success': 'check-circle-full', 'info': 'info-circle', 'warning': 'warning-full' } let html = ` <div class="alert p-4 alert-${style}" role="alert"> <span class="alert-indicator"> ${renderIcon(styleIcons[style], spritemapClay, '')} </span> <strong>${title}:</strong> <p class="mt-2 mb-0">${msg}</p> </div> ` parentNode.insertAdjacentHTML(position, html) } // limpa mensagens de alerta function cleanAlerts() { let alerts = fragmentElement.querySelectorAll('.alert') alerts.forEach(alert => alert.remove()) } // imprime icone SGV function renderIcon(icon, spritemap, cssClasses) { return ` <svg class="lexicon-icon lexicon-icon-${icon} ${cssClasses}" focusable="false" role="presentation"> <use href="${spritemap}#${icon}"></use> </svg> ` } // retorna/cria um elemento html de uma classe css // ascendantNode é um nó ascendente // position é uma string 'beforeend', 'afterbegin' + // elementType uma string 'ul', 'div' etc // cssClass é uma classe css function getNodeElement(ascendantNode, position, elementType, cssClass) { let nodeElement if (ascendantNode.querySelector(cssClass)) { nodeElement = ascendantNode.querySelector(cssClass) } else { nodeElement = document.createElement(elementType) nodeElement = ascendantNode.insertAdjacentElement(position, nodeElement) nodeElement.classList.add(cssClass.slice(1)) } return nodeElement } // retorna nome amigável do campo usado como 1ª ordenação function getOrderByFieldName(orderByColumn) { let regExp = /^ddm__keyword__\d+__(.+)/ let matchExp = regExp.exec(orderByColumn) return (matchExp) ? matchExp[1] : Liferay.Language.get(orderByColumn) };}());</script>]]>
4687 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-tldj'); var configuration = {"height":"py-3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4707 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-pgyj'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4725 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-dxpl'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4743 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-dxlr'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4761 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-ebto'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4779 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-btye'); var configuration = {"buttonType":"outline-primary","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4843 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-47411-orru'); var configuration = {"spritemap":"bnb","symbol":"aperto-mao","cardShadow":"shadow","borderRadius":"","externalLink":false,"bottomSpacing":"mb-3","btnStyle":"btn-link","btLegend":"","cardOrientation":"d-flex flex-column flex-lg-row","iconStyle":"bg-quaternary text-primary","hasButton":true,"iconBox":"rounded-circle"};let links = fragmentElement.querySelectorAll('a.btn') let titles = fragmentElement.querySelectorAll('div.h4') links.forEach((link, index) => { let ariaLabel = (configuration.btLegend == '') ? 'Saiba mais sobre ' + titles[index].innerText : configuration.btLegend ariaLabel = (configuration.externalLink) ? ariaLabel + ' (link externo)' : ariaLabel link.setAttribute("aria-label", ariaLabel) });}());</script>]]>
4872 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-47411-mxpa'); var configuration = {"spritemap":"clay","symbol":"sheets","cardShadow":"shadow","borderRadius":"","externalLink":false,"bottomSpacing":"mb-3","btnStyle":"btn-link","btLegend":"","cardOrientation":"d-flex flex-column flex-lg-row","iconStyle":"bg-quaternary text-primary","hasButton":true,"iconBox":"rounded-circle"};let links = fragmentElement.querySelectorAll('a.btn') let titles = fragmentElement.querySelectorAll('div.h4') links.forEach((link, index) => { let ariaLabel = (configuration.btLegend == '') ? 'Saiba mais sobre ' + titles[index].innerText : configuration.btLegend ariaLabel = (configuration.externalLink) ? ariaLabel + ' (link externo)' : ariaLabel link.setAttribute("aria-label", ariaLabel) });}());</script>]]>
4912 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-fvfv'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4932 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-fegs'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"","rgbValue":""}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4954 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-kjbk'); var configuration = {"bottomSpacing":"3"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4972 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-jveu'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
4990 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-xfqg'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
5008 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-xtxn'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
5026 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-hyvs'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
5044 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-rsbb'); var configuration = {"buttonType":"link","buttonAlign":"left","bottomSpacing":"3","buttonSize":"nm"};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
5092 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-pbqj'); var configuration = {"textAlign":"left","bottomSpacing":"3","headingLevel":"h2","textColor":{"cssClass":"white","rgbValue":"rgb(231, 231, 231)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
5112 <![CDATA[<script>(function() {var fragmentElement = document.querySelector('#fragment-0-kpci'); var configuration = {"textAlign":"left","bottomSpacing":"3","textColor":{"cssClass":"white","rgbValue":"rgb(230, 230, 230)"}};/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */;}());</script>]]>
6008 <![CDATA[<script type="text/javascript"> // <![CDATA[ Liferay.BrowserSelectors.run(); // ]]> </script>]]>
6037 <![CDATA[<script type="text/javascript"> // <![CDATA[ Liferay.currentURL = '\x2fweb\x2fguest\x2facesso-a-informacao\x2freceitas-e-despesas'; Liferay.currentURLEncoded = '\x252Fweb\x252Fguest\x252Facesso-a-informacao\x252Freceitas-e-despesas'; // ]]> </script>]]>
6054 <![CDATA[<script type="text/javascript"> // <![CDATA[ // ]]> </script>]]>
6085 <![CDATA[<script type="text/javascript"> // <![CDATA[ (function() {var $ = AUI.$;var _ = AUI._; var onVote = function(event) { if (window.Analytics) { Analytics.send('VOTE', 'Ratings', { className: event.className, classPK: event.classPK, ratingType: event.ratingType, score: event.score }); } }; var onDestroyPortlet = function() { Liferay.detach('ratings:vote', onVote); Liferay.detach('destroyPortlet', onDestroyPortlet); }; Liferay.on('ratings:vote', onVote); Liferay.on('destroyPortlet', onDestroyPortlet); })();(function() {var $ = AUI.$;var _ = AUI._; var onDestroyPortlet = function() { Liferay.detach('messagePosted', onMessagePosted); Liferay.detach('destroyPortlet', onDestroyPortlet); }; Liferay.on('destroyPortlet', onDestroyPortlet); var onMessagePosted = function(event) { if (window.Analytics) { Analytics.send('posted', 'Comment', { className: event.className, classPK: event.classPK, commentId: event.commentId, text: event.text }); } }; Liferay.on('messagePosted', onMessagePosted); })();(function() {var $ = AUI.$;var _ = AUI._; var onShare = function(data) { if (window.Analytics) { Analytics.send('shared', 'SocialBookmarks', { className: data.className, classPK: data.classPK, type: data.type, url: data.url }); } }; var onDestroyPortlet = function() { Liferay.detach('socialBookmarks:share', onShare); Liferay.detach('destroyPortlet', onDestroyPortlet); }; Liferay.on('socialBookmarks:share', onShare); Liferay.on('destroyPortlet', onDestroyPortlet); })();(function() {var $ = AUI.$;var _ = AUI._; var pathnameRegexp = /\/documents\/(\d+)\/(\d+)\/(.+?)\/([^&]+)/; function handleDownloadClick(event) { if (event.target.nodeName.toLowerCase() === 'a' && window.Analytics) { var anchor = event.target; var match = pathnameRegexp.exec(anchor.pathname); var fileEntryId = anchor.dataset.analyticsFileEntryId || (anchor.parentElement && anchor.parentElement.dataset.analyticsFileEntryId); if (fileEntryId && match) { var getParameterValue = function(parameterName) { var result = null; anchor.search .substr(1) .split('&') .forEach(function(item) { var tmp = item.split('='); if (tmp[0] === parameterName) { result = decodeURIComponent(tmp[1]); } }); return result; }; Analytics.send('documentDownloaded', 'Document', { groupId: match[1], fileEntryId: fileEntryId, preview: !!window._com_liferay_document_library_analytics_isViewFileEntry, title: decodeURIComponent(match[3].replace(/\+/gi, ' ')), version: getParameterValue('version') }); } } } var onDestroyPortlet = function() { document.body.removeEventListener('click', handleDownloadClick); }; Liferay.once('destroyPortlet', onDestroyPortlet); var onPortletReady = function() { document.body.addEventListener('click', handleDownloadClick); }; Liferay.once('portletReady', onPortletReady); })();(function() {var $ = AUI.$;var _ = AUI._; function showDialog(uri, title, namespace, refreshOnClose) { Liferay.Util.openWindow({ dialog: { centered: true, constrain: true, cssClass: 'sharing-dialog', destroyOnHide: true, modal: true, height: 540, width: 600, on: { visibleChange: function(event) { if (refreshOnClose && !event.newVal) { Liferay.Portlet.refresh('#p_p_id' + namespace); } } } }, id: 'sharingDialog', title: Liferay.Util.escapeHTML(title), uri: uri }); } var Sharing = {}; Liferay.provide( Sharing, 'share', function(classNameId, classPK, title, namespace, refreshOnClose) { var sharingParameters = { classNameId: classNameId, classPK: classPK }; var sharingURL = Liferay.Util.PortletURL.createPortletURL( 'https://www.bnb.gov.br/group/guest/~/control_panel/manage?p_p_id=com_liferay_sharing_web_portlet_SharingPortlet&p_p_lifecycle=0&p_p_state=pop_up&_com_liferay_sharing_web_portlet_SharingPortlet_mvcRenderCommandName=%2Fsharing%2Fshare&p_p_auth=g6tf2mo1', sharingParameters ); showDialog(sharingURL.toString(), title, namespace, refreshOnClose); }, ['liferay-util-window'] ); Liferay.provide( Sharing, 'manageCollaborators', function(classNameId, classPK, namespace, refreshOnClose) { var manageCollaboratorsParameters = { classNameId: classNameId, classPK: classPK }; var manageCollaboratorsURL = Liferay.Util.PortletURL.createPortletURL( 'https://www.bnb.gov.br/group/guest/~/control_panel/manage?p_p_id=com_liferay_sharing_web_portlet_ManageCollaboratorsPortlet&p_p_lifecycle=0&p_p_state=pop_up&_com_liferay_sharing_web_portlet_ManageCollaboratorsPortlet_mvcRenderCommandName=%2Fsharing%2Fmanage_collaborators&p_p_auth=L7aG6g96', manageCollaboratorsParameters ); showDialog( manageCollaboratorsURL.toString(), 'Gerenciar colaboradores', namespace, refreshOnClose ); }, ['liferay-util-window'] ); Liferay.Sharing = Sharing; })(); if (Liferay.Data.ICONS_INLINE_SVG) { svg4everybody( { attributeName: 'data-href', polyfill: true, validate: function (src, svg, use) { return !src || !src.startsWith('#'); } } ); } Liferay.Portlet.register('com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_name_navigation_menu'); Liferay.Portlet.onLoad( { canEditTitle: false, columnPos: 0, isStatic: 'end', namespacedId: 'p_p_id_com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_name_navigation_menu_', portletId: 'com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_name_navigation_menu', refreshURL: '\x2fc\x2fportal\x2frender_portlet\x3fp_l_id\x3d84\x26p_p_id\x3dcom_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_name_navigation_menu\x26p_p_lifecycle\x3d0\x26p_t_lifecycle\x3d0\x26p_p_state\x3dnormal\x26p_p_mode\x3dview\x26p_p_col_id\x3dnull\x26p_p_col_pos\x3dnull\x26p_p_col_count\x3dnull\x26p_p_static\x3d1\x26p_p_isolated\x3d1\x26currentURL\x3d\x252Fweb\x252Fguest\x252Facesso-a-informacao\x252Freceitas-e-despesas', refreshURLData: {} } ); Liferay.Portlet.register('com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_lgpd_navigation_menu'); Liferay.Portlet.onLoad( { canEditTitle: false, columnPos: 0, isStatic: 'end', namespacedId: 'p_p_id_com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_lgpd_navigation_menu_', portletId: 'com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_lgpd_navigation_menu', refreshURL: '\x2fc\x2fportal\x2frender_portlet\x3fp_l_id\x3d84\x26p_p_id\x3dcom_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_INSTANCE_lgpd_navigation_menu\x26p_p_lifecycle\x3d0\x26p_t_lifecycle\x3d0\x26p_p_state\x3dnormal\x26p_p_mode\x3dview\x26p_p_col_id\x3dnull\x26p_p_col_pos\x3dnull\x26p_p_col_count\x3dnull\x26p_p_static\x3d1\x26p_p_isolated\x3d1\x26currentURL\x3d\x252Fweb\x252Fguest\x252Facesso-a-informacao\x252Freceitas-e-despesas', refreshURLData: {} } ); Liferay.Portlet.register('com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD'); Liferay.Portlet.onLoad( { canEditTitle: false, columnPos: 0, isStatic: 'end', namespacedId: 'p_p_id_com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD_', portletId: 'com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD', refreshURL: '\x2fc\x2fportal\x2frender_portlet\x3fp_l_id\x3d84\x26p_p_id\x3dcom_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_bdBSZcEPvDWD\x26p_p_lifecycle\x3d0\x26p_t_lifecycle\x3d0\x26p_p_state\x3dnormal\x26p_p_mode\x3dview\x26p_p_col_id\x3dnull\x26p_p_col_pos\x3dnull\x26p_p_col_count\x3dnull\x26p_p_static\x3d1\x26p_p_isolated\x3d1\x26currentURL\x3d\x252Fweb\x252Fguest\x252Facesso-a-informacao\x252Freceitas-e-despesas', refreshURLData: {} } ); Liferay.Loader.require('metal-dom/src/all/dom', function(metalDomSrcAllDom) { (function(){ var dom = metalDomSrcAllDom; (function() {var $ = AUI.$;var _ = AUI._; var focusInPortletHandler = dom.delegate( document, 'focusin', '.portlet', function(event) { dom.addClasses(dom.closest(event.delegateTarget, '.portlet'), 'open'); } ); var focusOutPortletHandler = dom.delegate( document, 'focusout', '.portlet', function(event) { dom.removeClasses(dom.closest(event.delegateTarget, '.portlet'), 'open'); } ); })();})(); });AUI().use('liferay-menu', 'liferay-notice', 'aui-base', 'liferay-session', 'liferay-poller', function(A) {(function() {var $ = AUI.$;var _ = AUI._; if (A.UA.mobile) { Liferay.Util.addInputCancel(); } })();(function() {var $ = AUI.$;var _ = AUI._; new Liferay.Menu(); var liferayNotices = Liferay.Data.notices; for (var i = 1; i < liferayNotices.length; i++) { new Liferay.Notice(liferayNotices[i]); } })();(function() {var $ = AUI.$;var _ = AUI._; Liferay.Session = new Liferay.SessionBase( { autoExtend: true, redirectOnExpire: false, redirectUrl: 'https\x3a\x2f\x2fwww\x2ebnb\x2egov\x2ebr\x2fweb\x2fguest', sessionLength: 900, sessionTimeoutOffset: 70, warningLength: 0 } ); })();}); // ]]> </script>]]>
6405 <![CDATA[<script type="text/javascript"> // <![CDATA[ AUI().use( 'aui-base', function(A) { var frameElement = window.frameElement; if (frameElement && frameElement.getAttribute('id') === 'simulationDeviceIframe') { A.getBody().addClass('lfr-has-simulation-panel'); } } ); // ]]> </script>]]>
6418 <![CDATA[<script type="text/javascript"> // <![CDATA[ Liferay.Loader.require('frontend-js-tooltip-support-web@2.0.5/index', function(frontendJsTooltipSupportWeb205Index) { (function(){ var TooltipSupport = frontendJsTooltipSupportWeb205Index; (function() { try { TooltipSupport.default() } catch (err) { console.error(err); } })();})(); }); // ]]> </script>]]>