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.
- package/dist/components/chip/Chip.d.ts +1 -0
- package/dist/components/menu/Menu.d.ts +1 -0
- package/dist/components/menu/Menu.stories.d.ts +12 -13
- package/dist/components/menu/components/menuItem/MenuItem.d.ts +1 -1
- package/dist/components/row/Row.d.ts +1 -0
- package/dist/hooks/usePublicMenuList/usePublicMenuList.d.ts +23 -0
- package/dist/index.css +10 -3
- package/dist/index.d.ts +5 -1
- package/dist/index.js +57 -36
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +57 -37
- package/dist/index.modern.js.map +1 -1
- package/dist/libraries/EtiquetasThemes.d.ts +1 -0
- package/dist/models/menus.d.ts +21 -0
- package/dist/utils/ParsingUtils.d.ts +2 -0
- package/package.json +3 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
import Menu from "./Menu";
|
|
6
|
+
export declare const Normal: () => JSX.Element;
|
|
7
|
+
export declare const WithSemiHeader: () => JSX.Element;
|
|
8
|
+
export declare const ProgramsAndCollapse: () => JSX.Element;
|
|
9
|
+
export declare const ShortOnMD: () => JSX.Element;
|
|
10
|
+
export declare const OpenOnClick: () => JSX.Element;
|
|
11
|
+
export declare const HamburgerMenuGreen: () => JSX.Element;
|
|
12
|
+
export declare const HamburgerMenuWhite: () => JSX.Element;
|
|
13
|
+
export declare const HamburgerMenuAndLoading: () => JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MenuItemProps } from '../../components/menu/components/menuItem/MenuItem';
|
|
2
|
+
import { Item } from '../../models/menus';
|
|
3
|
+
interface Props {
|
|
4
|
+
roles?: string[];
|
|
5
|
+
idFerramenta: string;
|
|
6
|
+
menus: Item[];
|
|
7
|
+
menusLoading?: boolean;
|
|
8
|
+
history: {
|
|
9
|
+
push: (url: string) => void;
|
|
10
|
+
location: any;
|
|
11
|
+
};
|
|
12
|
+
getProgramaLabel: (str: string) => string;
|
|
13
|
+
openModalProfileWarning: (label: string, plural?: boolean, isPerfil?: boolean, labelPrograma?: boolean) => void;
|
|
14
|
+
allProfilesForProgramas: {
|
|
15
|
+
[k: string]: string[];
|
|
16
|
+
};
|
|
17
|
+
isRoute: (str: string, reg: RegExp | string) => boolean;
|
|
18
|
+
closeMenu: () => void;
|
|
19
|
+
incongruencia?: boolean;
|
|
20
|
+
openModalIncongruencia?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export default function usePublicMenuList(props: Props): MenuItemProps[];
|
|
23
|
+
export {};
|
package/dist/index.css
CHANGED
|
@@ -2623,12 +2623,12 @@ h5 {
|
|
|
2623
2623
|
.component-checkbox-classic {
|
|
2624
2624
|
border-radius: 0;
|
|
2625
2625
|
background-color: rgba(0, 0, 0, 0);
|
|
2626
|
-
border:
|
|
2626
|
+
border: 1px solid #3fa110; }
|
|
2627
2627
|
.component-checkbox-classic::after {
|
|
2628
2628
|
content: '';
|
|
2629
2629
|
position: absolute;
|
|
2630
|
-
width:
|
|
2631
|
-
height:
|
|
2630
|
+
width: 12px;
|
|
2631
|
+
height: 12px;
|
|
2632
2632
|
background-color: rgba(0, 0, 0, 0);
|
|
2633
2633
|
transition: background-color 0.3s ease; }
|
|
2634
2634
|
.component-checkbox-classic:disabled, .component-checkbox-classic[aria-disabled='true'] {
|
|
@@ -5156,6 +5156,11 @@ max-width 100% 540px 720px 960px 1140px
|
|
|
5156
5156
|
color: #2b517b;
|
|
5157
5157
|
border-color: #2b517b; }
|
|
5158
5158
|
|
|
5159
|
+
.component-etiqueta.outline-dark {
|
|
5160
|
+
background-color: rgba(0, 0, 0, 0);
|
|
5161
|
+
color: #323c32;
|
|
5162
|
+
border-color: #323c32; }
|
|
5163
|
+
|
|
5159
5164
|
.component-etiqueta.outline-warning-dark {
|
|
5160
5165
|
background-color: rgba(0, 0, 0, 0);
|
|
5161
5166
|
color: #765f00;
|
|
@@ -5501,6 +5506,8 @@ max-width 100% 540px 720px 960px 1140px
|
|
|
5501
5506
|
.component-row.centralized {
|
|
5502
5507
|
justify-content: center;
|
|
5503
5508
|
align-items: center; }
|
|
5509
|
+
.component-row.column {
|
|
5510
|
+
flex-direction: column; }
|
|
5504
5511
|
|
|
5505
5512
|
:export {
|
|
5506
5513
|
widthXs: 575.98px;
|
package/dist/index.d.ts
CHANGED
|
@@ -226,8 +226,12 @@ export * from './libraries/RadioButtonTheme';
|
|
|
226
226
|
export * from './libraries/SicrediLogoThemes';
|
|
227
227
|
export * from './libraries/Toast';
|
|
228
228
|
export * from './libraries/Tooltips';
|
|
229
|
+
export * from './models/menus';
|
|
230
|
+
export { stringToReactElement } from './utils/ParsingUtils';
|
|
229
231
|
export { Accordion, ActionCard, AdvancedSemiHeader, AssembleiaItem, AssembleiaPauta, Aconteceu, AnimatedLink, Banner, BannerAssembleia, BannerPesquisaCpfCnpj, BigBlockButton, BlocoDeNotas, BreadCrumb, Button, ButtonFileUpload, BlocoMinhasAssembleias, BottomNavigation, Card, Carousel, CarouselPersona, CarouselTouchFrendly, Checkbox, Col, Collapse, Container, DatePicker, Doughnut, DoughnutSquare, DropdownItem, DropdownMenu, DropdownSelector, EditableVideoItem, ElementPaginator, Etapas, Etiqueta, FileLoader, FileUpload, FooterSicredi, FullHeightContainer, Header, HeaderSeparator, HeaderSearchField, IconButton, IconButtonWithLabel, Information, Input, InputArea, ItemDropdownDownload, InformativoAssembleiasComImagem, InformativoAssembleiasComVideo, Menu, MenuItem, Modal, ModalManager, Title,
|
|
230
232
|
/**
|
|
231
233
|
* @deprecated
|
|
232
234
|
*/
|
|
233
|
-
Title as ModulosTitle, MoneyByMonth, MoneyMonthLineChart, NotaEdit, Notification, HourEvents, Calendar, CalendarEvent, FloatingPanel, InlineMonthPicker, ScrollArrowOverflow, PageSubTitle, PageTitle, Paginator, PreviaVideo, ProgressBar, RadioButton, QRCode, Row, SearchBlocoDeNotas, Select, Switch, Table, TypedTable, TableFileNameAndAction, TableActions, TableWithOverflow, TextEditor, LeftCheckboxWithLabel, ActionsColumn, Tabs, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, VideoItem, VideoPlayer, VideoModal,
|
|
235
|
+
Title as ModulosTitle, MoneyByMonth, MoneyMonthLineChart, NotaEdit, Notification, HourEvents, Calendar, CalendarEvent, FloatingPanel, InlineMonthPicker, ScrollArrowOverflow, PageSubTitle, PageTitle, Paginator, PreviaVideo, ProgressBar, RadioButton, QRCode, Row, SearchBlocoDeNotas, Select, Switch, Table, TypedTable, TableFileNameAndAction, TableActions, TableWithOverflow, TextEditor, LeftCheckboxWithLabel, ActionsColumn, Tabs, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, VideoItem, VideoPlayer, VideoModal, };
|
|
236
|
+
export { useCallbackedState, useCarouselBehaviour, useControlledTimer, useDraggableContainer, useHTMLShare, useDropOpened, useModalManager, useProgressiveCount, useScreenSize, useStorageState, useTimeElapsed, useToastManager, useValidatedState, };
|
|
237
|
+
export { AconteceuIcon, ChevronArrowRightIcon, FontIcon, PaymentIcon, AddCircleIcon, CircleArrowLeft, CopyIcon, QRCodeIcon, PrintIcon, FormacaoIcon, PercentLoaderIcon, AddIcon, AddAssemblyIcon, CircleArrowRight, FundacaoLogo, PieChartIcon, AlignCenterIcon, ClockIcon, CalendarCheckIcon, DevicePlusIcon, NotebookIcon, AgencyIcon, FundoSocialIcon, PlayIcon, AlignJustifyIcon, CloseIcon, GlobeIcon, QRCodeWhatsapp, AlignLeftIcon, CloudDownloadIcon, GraduationIcon, RedoIcon, AlignRightIcon, CloudUploadIcon, HamburgerIcon, RefreshIcon, ArrowLeftIcon, ComitesIcon, HandUpIcon, SearchIcon, ArrowRightIcon, ComunidadeIcon, HomeIcon, SettingsIcon, AssembleiasIcon, CreditIcon, InformationIcon, SicrediLogo, ATMIcon, CrescerIcon, InvestimentIcon, PhonePlusIcon, SquaresIcon, BackOfficeIcon, CrescerLogo, ItalicIcon, SustentabilidadeIcon, BarChartIcon, Chip, DownloadIcon, LinkIcon, ThreeDotsLoader, BeeIcon, DraggableIcon, LinksUteisIcon, ThumbsUpIcon, BigPlayIcon, EditIcon, ListDotIcon, TimesCircleIcon, BoldIcon, EvidenciasIcon, ListIcon, TransferenciaIcon, CalendarIcon, ExclamationIcon, LoaderIcon, TrashIcon, CardsIcon, ExitIconArrowLeft, LocalIcon, TrianguloInferior, CataventoVerde, ExitIconArrowRight, LockIcon, TwoFileIcon, CheckCircleIcon, EyeIcon, MessageIcon, UnderlineIcon, CheckIcon, FilePlusIcon, MoneyFileIcon, UndoIcon, ChequeIcon, FilesIcon, NavigatorWithMouse, UserIcon, ChevronArrowDownIcon, FilterIcon, OptionsIcon, WebsiteIcon, ChevronArrowLeftIcon, FontColorIcon, ParticipantesIcon, };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var React__default = _interopDefault(React);
|
|
5
5
|
var reactTransitionGroup = require('react-transition-group');
|
|
6
6
|
var moment = _interopDefault(require('moment'));
|
|
7
|
+
var DOMPurify = _interopDefault(require('dompurify'));
|
|
7
8
|
var chart_js = require('chart.js');
|
|
8
9
|
var Sortable = _interopDefault(require('sortablejs'));
|
|
9
10
|
var QR = _interopDefault(require('qrcode'));
|
|
@@ -5067,6 +5068,16 @@ var secondsToHours = function secondsToHours(seconds) {
|
|
|
5067
5068
|
var s = getTwoNumbersIfNotTen(seconds - h * 3600 - m * 60);
|
|
5068
5069
|
return hh.concat(':').concat(mm).concat(':').concat(s);
|
|
5069
5070
|
};
|
|
5071
|
+
var stringToReactElement = function stringToReactElement(str, props) {
|
|
5072
|
+
var __html = DOMPurify.sanitize(str);
|
|
5073
|
+
|
|
5074
|
+
var el = React__default.createElement("div", Object.assign({}, props, {
|
|
5075
|
+
dangerouslySetInnerHTML: {
|
|
5076
|
+
__html: __html
|
|
5077
|
+
}
|
|
5078
|
+
}));
|
|
5079
|
+
return el;
|
|
5080
|
+
};
|
|
5070
5081
|
|
|
5071
5082
|
var rootClassName$1G = 'component-button';
|
|
5072
5083
|
|
|
@@ -9175,6 +9186,7 @@ var Etapas$1 = React.memo(Etapas);
|
|
|
9175
9186
|
EtiquetasStyle["Cancelado"] = "cancelado";
|
|
9176
9187
|
EtiquetasStyle["OutlinePrimary"] = "outline-primary";
|
|
9177
9188
|
EtiquetasStyle["OutlineDanger"] = "outline-danger";
|
|
9189
|
+
EtiquetasStyle["OutlineDark"] = "outline-dark";
|
|
9178
9190
|
EtiquetasStyle["OutlineBlue"] = "outline-blue";
|
|
9179
9191
|
EtiquetasStyle["OutlineWarningDark"] = "outline-warning-dark";
|
|
9180
9192
|
})(exports.EtiquetasStyle || (exports.EtiquetasStyle = {}));
|
|
@@ -9396,10 +9408,11 @@ var rootClassName$2g = 'component-row';
|
|
|
9396
9408
|
function Row(props) {
|
|
9397
9409
|
var getProps = function getProps() {
|
|
9398
9410
|
var p = _extends({}, props, {
|
|
9399
|
-
className: getMergedClassNames([rootClassName$2g, props.centralized ? 'centralized' : '', props.className])
|
|
9411
|
+
className: getMergedClassNames([rootClassName$2g, props.centralized ? 'centralized' : '', props.columnDirection ? 'column' : '', props.className])
|
|
9400
9412
|
});
|
|
9401
9413
|
|
|
9402
9414
|
delete p.centralized;
|
|
9415
|
+
delete p.columnDirection;
|
|
9403
9416
|
return p;
|
|
9404
9417
|
};
|
|
9405
9418
|
|
|
@@ -10075,6 +10088,10 @@ MenuItem.defaultProps = {
|
|
|
10075
10088
|
var rootClassName$2t = 'component-menu';
|
|
10076
10089
|
var timeout;
|
|
10077
10090
|
|
|
10091
|
+
var format = function format(s) {
|
|
10092
|
+
return getStringWithoutSpecialChar(s).trim().toLowerCase();
|
|
10093
|
+
};
|
|
10094
|
+
|
|
10078
10095
|
function Menu(props) {
|
|
10079
10096
|
var _useState = React.useState(false),
|
|
10080
10097
|
opened = _useState[0],
|
|
@@ -10127,10 +10144,10 @@ function Menu(props) {
|
|
|
10127
10144
|
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))])
|
|
10128
10145
|
});
|
|
10129
10146
|
|
|
10147
|
+
delete p.loading;
|
|
10130
10148
|
delete p.openOnClick;
|
|
10131
10149
|
delete p.shortOnMD;
|
|
10132
10150
|
delete p.items;
|
|
10133
|
-
delete p.icon;
|
|
10134
10151
|
delete p.opened;
|
|
10135
10152
|
delete p.setOpened;
|
|
10136
10153
|
delete p.hamburgerMenu;
|
|
@@ -10148,35 +10165,20 @@ function Menu(props) {
|
|
|
10148
10165
|
}, 300);
|
|
10149
10166
|
}
|
|
10150
10167
|
}, [opened, props.opened]);
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
return
|
|
10155
|
-
|
|
10156
|
-
if (!it) return [];
|
|
10157
|
-
|
|
10158
|
-
if (props.buscar && buscarValue) {
|
|
10159
|
-
return it.filter(function (item) {
|
|
10160
|
-
if (getStringWithoutSpecialChar(item.label).trim().toLowerCase().match(getStringWithoutSpecialChar(buscarValue).trim().toLowerCase())) {
|
|
10161
|
-
return true;
|
|
10162
|
-
}
|
|
10163
|
-
|
|
10164
|
-
if (item.subList && Array.from(item.subList).some(function (subItem) {
|
|
10165
|
-
return getStringWithoutSpecialChar(subItem.label).trim().toLowerCase().match(getStringWithoutSpecialChar(buscarValue).trim().toLowerCase());
|
|
10166
|
-
})) {
|
|
10167
|
-
item.subList = Array.from(item.subList).filter(function (subItem) {
|
|
10168
|
-
return getStringWithoutSpecialChar(subItem.label).trim().toLowerCase().match(getStringWithoutSpecialChar(buscarValue).trim().toLowerCase());
|
|
10169
|
-
});
|
|
10170
|
-
return true;
|
|
10171
|
-
}
|
|
10172
|
-
|
|
10173
|
-
return false;
|
|
10168
|
+
var itens = React.useMemo(function () {
|
|
10169
|
+
if (!props.items) return [];
|
|
10170
|
+
return props.items.filter(function (it) {
|
|
10171
|
+
return !buscarValue || !format(buscarValue) || it.label && format(it.label).includes(format(buscarValue)) || it.subList && it.subList.some(function (subItem) {
|
|
10172
|
+
return subItem.label && format(subItem.label).includes(format(buscarValue));
|
|
10174
10173
|
});
|
|
10175
|
-
}
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10174
|
+
}).map(function (it) {
|
|
10175
|
+
return !it.subList || !it.subList.length ? it : _extends({}, it, {
|
|
10176
|
+
subList: it.subList.filter(function (subItem) {
|
|
10177
|
+
return !buscarValue || !format(buscarValue) || it.label && format(it.label).includes(format(buscarValue)) || subItem.label && format(subItem.label).includes(format(buscarValue));
|
|
10178
|
+
})
|
|
10179
|
+
});
|
|
10180
|
+
});
|
|
10181
|
+
}, [buscarValue, props.items]);
|
|
10180
10182
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", Object.assign({}, getProps()), props.hamburgerMenu && React__default.createElement(IconButton$1, {
|
|
10181
10183
|
className: rootClassName$2t + "-close-button",
|
|
10182
10184
|
icon: React__default.createElement(CloseIcon, null),
|
|
@@ -10186,9 +10188,20 @@ function Menu(props) {
|
|
|
10186
10188
|
}
|
|
10187
10189
|
}), React__default.createElement("div", {
|
|
10188
10190
|
className: rootClassName$2t + "-logo"
|
|
10189
|
-
}, props.logo),
|
|
10191
|
+
}, props.logo), React__default.createElement(Collapse$1, {
|
|
10192
|
+
animateOpacity: true,
|
|
10193
|
+
opened: props.loading
|
|
10194
|
+
}, React__default.createElement(Col$1, {
|
|
10195
|
+
centralized: true
|
|
10196
|
+
}, React__default.createElement(ThreeDotsLoader, {
|
|
10197
|
+
size: 2
|
|
10198
|
+
}))), React__default.createElement(Collapse$1, {
|
|
10199
|
+
animateOpacity: true,
|
|
10200
|
+
opened: props.buscar && !props.loading
|
|
10201
|
+
}, React__default.createElement("div", {
|
|
10190
10202
|
className: rootClassName$2t + "-buscar"
|
|
10191
10203
|
}, React__default.createElement(Input$1, {
|
|
10204
|
+
disabled: props.loading || !props.buscar,
|
|
10192
10205
|
id: 'buscar-menu',
|
|
10193
10206
|
placeholder: 'Buscar',
|
|
10194
10207
|
value: buscarValue,
|
|
@@ -10198,9 +10211,12 @@ function Menu(props) {
|
|
|
10198
10211
|
rightObject: React__default.createElement(IconButton$1, {
|
|
10199
10212
|
icon: React__default.createElement(SearchIcon, null)
|
|
10200
10213
|
})
|
|
10201
|
-
}))
|
|
10214
|
+
}))), React__default.createElement(Collapse$1, {
|
|
10215
|
+
animateOpacity: true,
|
|
10216
|
+
opened: itens.length > 0
|
|
10217
|
+
}, React__default.createElement("div", {
|
|
10202
10218
|
className: rootClassName$2t + "-items"
|
|
10203
|
-
},
|
|
10219
|
+
}, itens.map(function (it, index) {
|
|
10204
10220
|
return React__default.createElement("div", {
|
|
10205
10221
|
className: rootClassName$2t + "-it",
|
|
10206
10222
|
key: index
|
|
@@ -10208,7 +10224,7 @@ function Menu(props) {
|
|
|
10208
10224
|
buscar: props.buscar,
|
|
10209
10225
|
buscarValue: buscarValue
|
|
10210
10226
|
})));
|
|
10211
|
-
})
|
|
10227
|
+
})))), React__default.createElement(React__default.Fragment, null, props.openOnClick && React__default.createElement("button", {
|
|
10212
10228
|
className: rootClassName$2t + "-toggle " + (opened ? rootClassName$2t + "-opened" : ''),
|
|
10213
10229
|
onClick: function onClick() {
|
|
10214
10230
|
setOpened(!opened);
|
|
@@ -40690,7 +40706,7 @@ function Chip(props) {
|
|
|
40690
40706
|
return React__default.createElement("div", {
|
|
40691
40707
|
className: useMergedClassNames([rootClassName$3b, props.w100 ? 'w100' : '', props.allClickable ? 'all-clickable' : '']),
|
|
40692
40708
|
onClick: function onClick() {
|
|
40693
|
-
if (props.allClickable && typeof props.onClick === 'function') {
|
|
40709
|
+
if (!props.disabled && props.allClickable && typeof props.onClick === 'function') {
|
|
40694
40710
|
props.onClick();
|
|
40695
40711
|
}
|
|
40696
40712
|
}
|
|
@@ -40698,7 +40714,11 @@ function Chip(props) {
|
|
|
40698
40714
|
className: 'nunito'
|
|
40699
40715
|
}, props.label), React__default.createElement("div", {
|
|
40700
40716
|
className: rootClassName$3b + "-button",
|
|
40701
|
-
onClick:
|
|
40717
|
+
onClick: function onClick() {
|
|
40718
|
+
if (!props.disabled && typeof props.onClick === 'function') {
|
|
40719
|
+
props.onClick();
|
|
40720
|
+
}
|
|
40721
|
+
}
|
|
40702
40722
|
}, React__default.createElement(TimesCircleIcon, null)));
|
|
40703
40723
|
}
|
|
40704
40724
|
|
|
@@ -41062,6 +41082,7 @@ exports.VideoModal = VideoModal;
|
|
|
41062
41082
|
exports.VideoPlayer = VideoPlayer;
|
|
41063
41083
|
exports.WebsiteIcon = WebsiteIcon;
|
|
41064
41084
|
exports.getStatusClassName = getStatusClassName;
|
|
41085
|
+
exports.stringToReactElement = stringToReactElement;
|
|
41065
41086
|
exports.useCallbackedState = useCallbackedState;
|
|
41066
41087
|
exports.useCarouselBehaviour = useCarouselBehaviour;
|
|
41067
41088
|
exports.useControlledTimer = useControlledTimer;
|