plataforma-fundacao-componentes 2.23.19 → 2.23.21

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.
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo, useState, useEffect, memo, useCallback, useLayoutEffect, useRef, Fragment as Fragment$1, forwardRef, useImperativeHandle, createRef } from 'react';
2
2
  import { CSSTransition, TransitionGroup } from 'react-transition-group';
3
3
  import moment from 'moment';
4
+ import DOMPurify from 'dompurify';
4
5
  import { Chart } from 'chart.js';
5
6
  import Sortable from 'sortablejs';
6
7
  import QR from 'qrcode';
@@ -5073,6 +5074,16 @@ var secondsToHours = function secondsToHours(seconds) {
5073
5074
  var s = getTwoNumbersIfNotTen(seconds - h * 3600 - m * 60);
5074
5075
  return hh.concat(':').concat(mm).concat(':').concat(s);
5075
5076
  };
5077
+ var stringToReactElement = function stringToReactElement(str, props) {
5078
+ var __html = DOMPurify.sanitize(str);
5079
+
5080
+ var el = React.createElement("div", Object.assign({}, props, {
5081
+ dangerouslySetInnerHTML: {
5082
+ __html: __html
5083
+ }
5084
+ }));
5085
+ return el;
5086
+ };
5076
5087
 
5077
5088
  var rootClassName$1G = 'component-button';
5078
5089
 
@@ -9195,6 +9206,7 @@ var EtiquetasStyle;
9195
9206
  EtiquetasStyle["Cancelado"] = "cancelado";
9196
9207
  EtiquetasStyle["OutlinePrimary"] = "outline-primary";
9197
9208
  EtiquetasStyle["OutlineDanger"] = "outline-danger";
9209
+ EtiquetasStyle["OutlineDark"] = "outline-dark";
9198
9210
  EtiquetasStyle["OutlineBlue"] = "outline-blue";
9199
9211
  EtiquetasStyle["OutlineWarningDark"] = "outline-warning-dark";
9200
9212
  })(EtiquetasStyle || (EtiquetasStyle = {}));
@@ -9416,10 +9428,11 @@ var rootClassName$2g = 'component-row';
9416
9428
  function Row(props) {
9417
9429
  var getProps = function getProps() {
9418
9430
  var p = _extends({}, props, {
9419
- className: getMergedClassNames([rootClassName$2g, props.centralized ? 'centralized' : '', props.className])
9431
+ className: getMergedClassNames([rootClassName$2g, props.centralized ? 'centralized' : '', props.columnDirection ? 'column' : '', props.className])
9420
9432
  });
9421
9433
 
9422
9434
  delete p.centralized;
9435
+ delete p.columnDirection;
9423
9436
  return p;
9424
9437
  };
9425
9438
 
@@ -10097,6 +10110,10 @@ MenuItem.defaultProps = {
10097
10110
  var rootClassName$2t = 'component-menu';
10098
10111
  var timeout;
10099
10112
 
10113
+ var format = function format(s) {
10114
+ return getStringWithoutSpecialChar(s).trim().toLowerCase();
10115
+ };
10116
+
10100
10117
  function Menu(props) {
10101
10118
  var _useState = useState(false),
10102
10119
  opened = _useState[0],
@@ -10149,10 +10166,10 @@ function Menu(props) {
10149
10166
  className: getMergedClassNames([rootClassName$2t, 'scroll-white', props.className, props.shortOnMD ? rootClassName$2t + "-short-on-md" : '', props.openOnClick ? rootClassName$2t + "-open-on-click" : '', props.hamburgerMenu ? rootClassName$2t + "-hamburger-menu" : '', (props.openOnClick || props.hamburgerMenu) && (props.opened !== undefined ? openedOrNot(props.opened) : openedOrNot(opened))])
10150
10167
  });
10151
10168
 
10169
+ delete p.loading;
10152
10170
  delete p.openOnClick;
10153
10171
  delete p.shortOnMD;
10154
10172
  delete p.items;
10155
- delete p.icon;
10156
10173
  delete p.opened;
10157
10174
  delete p.setOpened;
10158
10175
  delete p.hamburgerMenu;
@@ -10170,35 +10187,20 @@ function Menu(props) {
10170
10187
  }, 300);
10171
10188
  }
10172
10189
  }, [opened, props.opened]);
10173
-
10174
- var getItems = function getItems() {
10175
- var it = [].concat(props.items || []).map(function (it) {
10176
- return _extends({}, it);
10177
- });
10178
- if (!it) return [];
10179
-
10180
- if (props.buscar && buscarValue) {
10181
- return it.filter(function (item) {
10182
- if (getStringWithoutSpecialChar(item.label).trim().toLowerCase().match(getStringWithoutSpecialChar(buscarValue).trim().toLowerCase())) {
10183
- return true;
10184
- }
10185
-
10186
- if (item.subList && Array.from(item.subList).some(function (subItem) {
10187
- return getStringWithoutSpecialChar(subItem.label).trim().toLowerCase().match(getStringWithoutSpecialChar(buscarValue).trim().toLowerCase());
10188
- })) {
10189
- item.subList = Array.from(item.subList).filter(function (subItem) {
10190
- return getStringWithoutSpecialChar(subItem.label).trim().toLowerCase().match(getStringWithoutSpecialChar(buscarValue).trim().toLowerCase());
10191
- });
10192
- return true;
10193
- }
10194
-
10195
- return false;
10190
+ var itens = useMemo(function () {
10191
+ if (!props.items) return [];
10192
+ return props.items.filter(function (it) {
10193
+ return !buscarValue || !format(buscarValue) || it.label && format(it.label).includes(format(buscarValue)) || it.subList && it.subList.some(function (subItem) {
10194
+ return subItem.label && format(subItem.label).includes(format(buscarValue));
10196
10195
  });
10197
- }
10198
-
10199
- return it;
10200
- };
10201
-
10196
+ }).map(function (it) {
10197
+ return !it.subList || !it.subList.length ? it : _extends({}, it, {
10198
+ subList: it.subList.filter(function (subItem) {
10199
+ return !buscarValue || !format(buscarValue) || it.label && format(it.label).includes(format(buscarValue)) || subItem.label && format(subItem.label).includes(format(buscarValue));
10200
+ })
10201
+ });
10202
+ });
10203
+ }, [buscarValue, props.items]);
10202
10204
  return React.createElement(React.Fragment, null, React.createElement("div", Object.assign({}, getProps()), props.hamburgerMenu && React.createElement(IconButton$1, {
10203
10205
  className: rootClassName$2t + "-close-button",
10204
10206
  icon: React.createElement(CloseIcon, null),
@@ -10208,9 +10210,20 @@ function Menu(props) {
10208
10210
  }
10209
10211
  }), React.createElement("div", {
10210
10212
  className: rootClassName$2t + "-logo"
10211
- }, props.logo), props.buscar ? React.createElement("div", {
10213
+ }, props.logo), React.createElement(Collapse$1, {
10214
+ animateOpacity: true,
10215
+ opened: props.loading
10216
+ }, React.createElement(Col$1, {
10217
+ centralized: true
10218
+ }, React.createElement(ThreeDotsLoader, {
10219
+ size: 2
10220
+ }))), React.createElement(Collapse$1, {
10221
+ animateOpacity: true,
10222
+ opened: props.buscar && !props.loading
10223
+ }, React.createElement("div", {
10212
10224
  className: rootClassName$2t + "-buscar"
10213
10225
  }, React.createElement(Input$1, {
10226
+ disabled: props.loading || !props.buscar,
10214
10227
  id: 'buscar-menu',
10215
10228
  placeholder: 'Buscar',
10216
10229
  value: buscarValue,
@@ -10220,9 +10233,12 @@ function Menu(props) {
10220
10233
  rightObject: React.createElement(IconButton$1, {
10221
10234
  icon: React.createElement(SearchIcon, null)
10222
10235
  })
10223
- })) : undefined, React.createElement("div", {
10236
+ }))), React.createElement(Collapse$1, {
10237
+ animateOpacity: true,
10238
+ opened: itens.length > 0
10239
+ }, React.createElement("div", {
10224
10240
  className: rootClassName$2t + "-items"
10225
- }, getItems() ? getItems().map(function (it, index) {
10241
+ }, itens.map(function (it, index) {
10226
10242
  return React.createElement("div", {
10227
10243
  className: rootClassName$2t + "-it",
10228
10244
  key: index
@@ -10230,7 +10246,7 @@ function Menu(props) {
10230
10246
  buscar: props.buscar,
10231
10247
  buscarValue: buscarValue
10232
10248
  })));
10233
- }) : undefined)), React.createElement(React.Fragment, null, props.openOnClick && React.createElement("button", {
10249
+ })))), React.createElement(React.Fragment, null, props.openOnClick && React.createElement("button", {
10234
10250
  className: rootClassName$2t + "-toggle " + (opened ? rootClassName$2t + "-opened" : ''),
10235
10251
  onClick: function onClick() {
10236
10252
  setOpened(!opened);
@@ -40716,7 +40732,7 @@ function Chip(props) {
40716
40732
  return React.createElement("div", {
40717
40733
  className: useMergedClassNames([rootClassName$3b, props.w100 ? 'w100' : '', props.allClickable ? 'all-clickable' : '']),
40718
40734
  onClick: function onClick() {
40719
- if (props.allClickable && typeof props.onClick === 'function') {
40735
+ if (!props.disabled && props.allClickable && typeof props.onClick === 'function') {
40720
40736
  props.onClick();
40721
40737
  }
40722
40738
  }
@@ -40724,7 +40740,11 @@ function Chip(props) {
40724
40740
  className: 'nunito'
40725
40741
  }, props.label), React.createElement("div", {
40726
40742
  className: rootClassName$3b + "-button",
40727
- onClick: props.onClick
40743
+ onClick: function onClick() {
40744
+ if (!props.disabled && typeof props.onClick === 'function') {
40745
+ props.onClick();
40746
+ }
40747
+ }
40728
40748
  }, React.createElement(TimesCircleIcon, null)));
40729
40749
  }
40730
40750
 
@@ -40881,5 +40901,5 @@ var ModalSizes;
40881
40901
  ModalSizes["ExtraLarge"] = "extra-large";
40882
40902
  })(ModalSizes || (ModalSizes = {}));
40883
40903
 
40884
- export { ATMIcon, Accordion, Aconteceu, AconteceuIcon, ActionCard$1 as ActionCard, ActionCardThemes, ActionsColumn, AddAssemblyIcon, AddCircleIcon, AddIcon, AdvancedSemiHeader, AgencyIcon, AlertModal, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AnimatedLink$1 as AnimatedLink, ArrowLeftIcon, ArrowRightIcon, AssembleiaItem$1 as AssembleiaItem, AssembleiaPauta$1 as AssembleiaPauta, AssembleiasIcon, BackOfficeIcon, Banner, BannerAssembleia$1 as BannerAssembleia, BannerPesquisaCpfCnpj$1 as BannerPesquisaCpfCnpj, BarChartIcon, BeeIcon, BigBlockButton, BigPlayIcon, BlobFileTypes, BlocoDeNotas, BlocoMinhasAssembleias$1 as BlocoMinhasAssembleias, BoldIcon, BottomNavigation$1 as BottomNavigation, BreadCrumb, Button$1 as Button, ButtonFileUpload$1 as ButtonFileUpload, ButtonThemes, Calendar$1 as Calendar, CalendarCheckIcon, CalendarEvent$1 as CalendarEvent, CalendarIcon, Card, CardTypes, CardsIcon, Carousel, CarouselPersona$1 as CarouselPersona, CarouselTouchFrendly$1 as CarouselTouchFrendly, CataventoVerde, CheckCircleIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxThemes, ChequeIcon, ChevronArrowDownIcon, ChevronArrowLeftIcon, ChevronArrowRightIcon, Chip$1 as Chip, CircleArrowLeft, CircleArrowRight, ClockIcon, CloseIcon, CloudDownloadIcon, CloudUploadIcon, Col$1 as Col, Collapse$1 as Collapse, ComitesIcon, ComunidadeIcon, ConfirmModal, Container$1 as Container, CopyIcon, CreditIcon, CrescerIcon, CrescerLogo, DatePicker$1 as DatePicker, DestructiveModal, DevicePlusIcon, Doughnut$1 as Doughnut, DoughnutSquare, DownloadIcon, DraggableIcon, DropdownItem$1 as DropdownItem, DropdownMenu, DropdownSelector$1 as DropdownSelector, EditIcon, EditableVideoItem$1 as EditableVideoItem, ElementPaginator$1 as ElementPaginator, Etapas$1 as Etapas, Etiqueta, EtiquetasStyle, EvidenciasIcon, ExclamationIcon, ExitIconArrowLeft, ExitIconArrowRight, EyeIcon, FUNDACAO_LOGO_BRANCO, FUNDACAO_LOGO_VERDE, FileLoader, FilePlusIcon, FileUpload, FilesIcon, FilterIcon, FloatingPanel$1 as FloatingPanel, FontColorIcon, FontIcon, FooterSicredi$1 as FooterSicredi, FormacaoIcon, FullHeightContainer$1 as FullHeightContainer, FundacaoLogo, FundacaoLogoTheme, FundoSocialIcon, GlobeIcon, GraduationIcon, HEADER_SEPARATOR_PRIMARY, HEADER_SEPARATOR_SECONDARY, HamburgerIcon, HandUpIcon, Header$1 as Header, HeaderSearchField, HeaderSeparator, HeaderType, HomeIcon, HourEvents$1 as HourEvents, IconButton$1 as IconButton, IconButtonType, IconButtonWithLabel$1 as IconButtonWithLabel, ImageTypes, Information, InformationIcon, InformativoAssembleiasComImagem$1 as InformativoAssembleiasComImagem, InformativoAssembleiasComVideo$1 as InformativoAssembleiasComVideo, InlineMonthPicker$1 as InlineMonthPicker, Input$1 as Input, InputArea$1 as InputArea, InvestimentIcon, ItalicIcon, ItemDropdownDownload$1 as ItemDropdownDownload, LeftCheckboxWithLabel, LinkIcon, LinksUteisIcon, ListDotIcon, ListIcon, LoaderIcon, LocalIcon, LockIcon, Menu$1 as Menu, MenuItem, MessageIcon, Modal, ModalManager, ModalSizes, Title as ModulosTitle, MoneyByMonth, MoneyFileIcon, MoneyMonthLineChart, NavigatorWithMouse, NotaEdit, NotebookIcon, Notification, NotificationPosition, NotificationType, OptionsIcon, PageSubTitle, PageTitle, Paginator, ParticipantesIcon, PaymentIcon, PercentLoaderIcon, PhonePlusIcon, PieChartIcon, PlayIcon, PreviaVideo$1 as PreviaVideo, PrintIcon, ProgressBar, QRCode$1 as QRCode, QRCodeIcon, QRCodeWhatsapp, RadioButton$1 as RadioButton, RadioButtonType, RedoIcon, RefreshIcon, Row$1 as Row, STATUS_PAUTA, STATUS_PAUTA_BLOQUEADA, STATUS_PAUTA_ENCERRADA, STATUS_PAUTA_LIBERADA, ScrollArrowOverflow$1 as ScrollArrowOverflow, SearchBlocoDeNotas, SearchIcon, Select$1 as Select, SettingsIcon, SicrediLogo, SicrediLogoTheme, SquaresIcon, SustentabilidadeIcon, Switch, Table, TableActions, TableFileNameAndAction$1 as TableFileNameAndAction, TableWithOverflow$1 as TableWithOverflow, Tabs$1 as Tabs, TextEditor, ThreeDotsLoader, ThumbsUpIcon, TimesCircleIcon, Title, Toast, ToastManager, ToastTypes, Tooltip, TooltipManager, TooltipPosition, TopLoader, TransferenciaIcon, TrashIcon, TrianguloInferior, TwoFileIcon, TypedTable, UnderlineIcon, UndoIcon, UserIcon, VideoItem, VideoModal, VideoPlayer, WebsiteIcon, getStatusClassName, useCallbackedState, useCarouselBehaviour, useControlledTimer, useDraggableContainer, useDropOpened, useHTMLShare, useModalManager, useProgressiveCount, useScreenSize, useStorageState, useTimeElapsed, useToastManager, useValidatedState };
40904
+ export { ATMIcon, Accordion, Aconteceu, AconteceuIcon, ActionCard$1 as ActionCard, ActionCardThemes, ActionsColumn, AddAssemblyIcon, AddCircleIcon, AddIcon, AdvancedSemiHeader, AgencyIcon, AlertModal, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AnimatedLink$1 as AnimatedLink, ArrowLeftIcon, ArrowRightIcon, AssembleiaItem$1 as AssembleiaItem, AssembleiaPauta$1 as AssembleiaPauta, AssembleiasIcon, BackOfficeIcon, Banner, BannerAssembleia$1 as BannerAssembleia, BannerPesquisaCpfCnpj$1 as BannerPesquisaCpfCnpj, BarChartIcon, BeeIcon, BigBlockButton, BigPlayIcon, BlobFileTypes, BlocoDeNotas, BlocoMinhasAssembleias$1 as BlocoMinhasAssembleias, BoldIcon, BottomNavigation$1 as BottomNavigation, BreadCrumb, Button$1 as Button, ButtonFileUpload$1 as ButtonFileUpload, ButtonThemes, Calendar$1 as Calendar, CalendarCheckIcon, CalendarEvent$1 as CalendarEvent, CalendarIcon, Card, CardTypes, CardsIcon, Carousel, CarouselPersona$1 as CarouselPersona, CarouselTouchFrendly$1 as CarouselTouchFrendly, CataventoVerde, CheckCircleIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxThemes, ChequeIcon, ChevronArrowDownIcon, ChevronArrowLeftIcon, ChevronArrowRightIcon, Chip$1 as Chip, CircleArrowLeft, CircleArrowRight, ClockIcon, CloseIcon, CloudDownloadIcon, CloudUploadIcon, Col$1 as Col, Collapse$1 as Collapse, ComitesIcon, ComunidadeIcon, ConfirmModal, Container$1 as Container, CopyIcon, CreditIcon, CrescerIcon, CrescerLogo, DatePicker$1 as DatePicker, DestructiveModal, DevicePlusIcon, Doughnut$1 as Doughnut, DoughnutSquare, DownloadIcon, DraggableIcon, DropdownItem$1 as DropdownItem, DropdownMenu, DropdownSelector$1 as DropdownSelector, EditIcon, EditableVideoItem$1 as EditableVideoItem, ElementPaginator$1 as ElementPaginator, Etapas$1 as Etapas, Etiqueta, EtiquetasStyle, EvidenciasIcon, ExclamationIcon, ExitIconArrowLeft, ExitIconArrowRight, EyeIcon, FUNDACAO_LOGO_BRANCO, FUNDACAO_LOGO_VERDE, FileLoader, FilePlusIcon, FileUpload, FilesIcon, FilterIcon, FloatingPanel$1 as FloatingPanel, FontColorIcon, FontIcon, FooterSicredi$1 as FooterSicredi, FormacaoIcon, FullHeightContainer$1 as FullHeightContainer, FundacaoLogo, FundacaoLogoTheme, FundoSocialIcon, GlobeIcon, GraduationIcon, HEADER_SEPARATOR_PRIMARY, HEADER_SEPARATOR_SECONDARY, HamburgerIcon, HandUpIcon, Header$1 as Header, HeaderSearchField, HeaderSeparator, HeaderType, HomeIcon, HourEvents$1 as HourEvents, IconButton$1 as IconButton, IconButtonType, IconButtonWithLabel$1 as IconButtonWithLabel, ImageTypes, Information, InformationIcon, InformativoAssembleiasComImagem$1 as InformativoAssembleiasComImagem, InformativoAssembleiasComVideo$1 as InformativoAssembleiasComVideo, InlineMonthPicker$1 as InlineMonthPicker, Input$1 as Input, InputArea$1 as InputArea, InvestimentIcon, ItalicIcon, ItemDropdownDownload$1 as ItemDropdownDownload, LeftCheckboxWithLabel, LinkIcon, LinksUteisIcon, ListDotIcon, ListIcon, LoaderIcon, LocalIcon, LockIcon, Menu$1 as Menu, MenuItem, MessageIcon, Modal, ModalManager, ModalSizes, Title as ModulosTitle, MoneyByMonth, MoneyFileIcon, MoneyMonthLineChart, NavigatorWithMouse, NotaEdit, NotebookIcon, Notification, NotificationPosition, NotificationType, OptionsIcon, PageSubTitle, PageTitle, Paginator, ParticipantesIcon, PaymentIcon, PercentLoaderIcon, PhonePlusIcon, PieChartIcon, PlayIcon, PreviaVideo$1 as PreviaVideo, PrintIcon, ProgressBar, QRCode$1 as QRCode, QRCodeIcon, QRCodeWhatsapp, RadioButton$1 as RadioButton, RadioButtonType, RedoIcon, RefreshIcon, Row$1 as Row, STATUS_PAUTA, STATUS_PAUTA_BLOQUEADA, STATUS_PAUTA_ENCERRADA, STATUS_PAUTA_LIBERADA, ScrollArrowOverflow$1 as ScrollArrowOverflow, SearchBlocoDeNotas, SearchIcon, Select$1 as Select, SettingsIcon, SicrediLogo, SicrediLogoTheme, SquaresIcon, SustentabilidadeIcon, Switch, Table, TableActions, TableFileNameAndAction$1 as TableFileNameAndAction, TableWithOverflow$1 as TableWithOverflow, Tabs$1 as Tabs, TextEditor, ThreeDotsLoader, ThumbsUpIcon, TimesCircleIcon, Title, Toast, ToastManager, ToastTypes, Tooltip, TooltipManager, TooltipPosition, TopLoader, TransferenciaIcon, TrashIcon, TrianguloInferior, TwoFileIcon, TypedTable, UnderlineIcon, UndoIcon, UserIcon, VideoItem, VideoModal, VideoPlayer, WebsiteIcon, getStatusClassName, stringToReactElement, useCallbackedState, useCarouselBehaviour, useControlledTimer, useDraggableContainer, useDropOpened, useHTMLShare, useModalManager, useProgressiveCount, useScreenSize, useStorageState, useTimeElapsed, useToastManager, useValidatedState };
40885
40905
  //# sourceMappingURL=index.modern.js.map