plataforma-fundacao-componentes 2.23.27 → 2.23.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -6183,14 +6183,17 @@ header.component-header {
6183
6183
  width: 100%; } }
6184
6184
  .informativo-assembleias-com-imagem .informativo-assembleias-com-imagem-button.filled {
6185
6185
  width: 100%;
6186
- display: flex;
6187
- justify-content: center; }
6186
+ margin-left: 10px; }
6188
6187
  .informativo-assembleias-com-imagem .informativo-assembleias-com-imagem-button.filled button {
6189
6188
  padding: 10px 60px;
6190
6189
  border-radius: 6px; }
6191
- @media screen and (max-width: 575.98px) {
6192
- .informativo-assembleias-com-imagem .informativo-assembleias-com-imagem-button.filled button {
6193
- width: 100%; } }
6190
+ @media screen and (max-width: 767.98px) {
6191
+ .informativo-assembleias-com-imagem .informativo-assembleias-com-imagem-button.filled {
6192
+ display: flex;
6193
+ justify-content: center;
6194
+ margin-left: 0px; }
6195
+ .informativo-assembleias-com-imagem .informativo-assembleias-com-imagem-button.filled button {
6196
+ width: 100%; } }
6194
6197
 
6195
6198
  :export {
6196
6199
  widthXs: 575.98px;
package/dist/index.js CHANGED
@@ -40740,19 +40740,16 @@ var sortItems = function sortItems(a, b) {
40740
40740
 
40741
40741
  function usePublicMenuList(props) {
40742
40742
  var hasPermission = React.useCallback(function (need) {
40743
- var role = !need.roles || !need.roles.length || need.roles.some(function (role) {
40744
- return props.roles && props.roles.find(function (up) {
40745
- return up === role;
40746
- });
40743
+ var needPermission = need.roles && need.roles.length || need.programas && need.programas.length;
40744
+ var hasRole = need.roles && need.roles.length && need.roles.some(function (role) {
40745
+ return props.roles && props.roles.includes(role);
40747
40746
  });
40748
- var programa = !need.programas || !need.programas.length || need.programas.some(function (prog) {
40749
- var _props$allProfilesFor;
40750
-
40751
- return props.allProfilesForProgramas[prog] && ((_props$allProfilesFor = props.allProfilesForProgramas[prog]) === null || _props$allProfilesFor === void 0 ? void 0 : _props$allProfilesFor.some(function (profile) {
40747
+ var hasRoleByPrograma = need.programas && need.programas.length && need.programas.some(function (prog) {
40748
+ return props.allProfilesForProgramas[prog] && props.allProfilesForProgramas[prog].some(function (profile) {
40752
40749
  return props.roles && props.roles.includes(profile);
40753
- }));
40750
+ });
40754
40751
  });
40755
- return role && programa;
40752
+ return !needPermission || hasRole || hasRoleByPrograma;
40756
40753
  }, [props.allProfilesForProgramas, props.roles]);
40757
40754
 
40758
40755
  var _useState = React.useState(References.OPENED_ACTIVE),