plataforma-fundacao-componentes 2.23.14 → 2.23.16
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/assembleiaItem/AssembleiaItem.d.ts +1 -7
- package/dist/components/calendar/Calendar.d.ts +2 -0
- package/dist/components/calendar/components/calendarDays/CalendarDays.d.ts +2 -0
- package/dist/components/calendar/components/calendarMonthDay/CalendarMonthDay.d.ts +2 -0
- package/dist/createComponent.d.ts +1 -0
- package/dist/index.css +18 -8
- package/dist/index.js +35 -24
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +35 -24
- package/dist/index.modern.js.map +1 -1
- package/package.json +9 -9
package/dist/index.modern.js
CHANGED
|
@@ -4867,30 +4867,22 @@ AnimatedLink.defaultProps = {
|
|
|
4867
4867
|
var AnimatedLink$1 = memo(AnimatedLink);
|
|
4868
4868
|
|
|
4869
4869
|
var rootClassName$1F = 'assembleia-item';
|
|
4870
|
-
var AssembleiaModo;
|
|
4871
|
-
|
|
4872
|
-
(function (AssembleiaModo) {
|
|
4873
|
-
AssembleiaModo[AssembleiaModo["Presencial"] = 1] = "Presencial";
|
|
4874
|
-
AssembleiaModo[AssembleiaModo["TabletDigital"] = 2] = "TabletDigital";
|
|
4875
|
-
AssembleiaModo[AssembleiaModo["AgenciaDigital"] = 3] = "AgenciaDigital";
|
|
4876
|
-
AssembleiaModo[AssembleiaModo["Digital"] = 4] = "Digital";
|
|
4877
|
-
})(AssembleiaModo || (AssembleiaModo = {}));
|
|
4878
4870
|
|
|
4879
4871
|
function AssembleiaItem(props) {
|
|
4880
4872
|
var _props$presencial;
|
|
4881
4873
|
|
|
4882
4874
|
return React.createElement("div", {
|
|
4883
|
-
className: getMergedClassNames([rootClassName$1F, props.modo ===
|
|
4875
|
+
className: getMergedClassNames([rootClassName$1F, props.modo === 1 ? 'presencial' : ''])
|
|
4884
4876
|
}, React.createElement("div", {
|
|
4885
4877
|
onClick: props.onClick,
|
|
4886
|
-
className: getMergedClassNames([rootClassName$1F + "-first", props.modo ===
|
|
4878
|
+
className: getMergedClassNames([rootClassName$1F + "-first", props.modo === 1 ? 'presencial' : ''])
|
|
4887
4879
|
}, React.createElement("div", {
|
|
4888
4880
|
className: rootClassName$1F + "-left"
|
|
4889
4881
|
}, React.createElement("div", {
|
|
4890
4882
|
className: rootClassName$1F + "-coop"
|
|
4891
|
-
}, props.nomeCooperativa, props.modo ===
|
|
4883
|
+
}, props.nomeCooperativa, props.modo === 1 ? " - " + props.language.presencial : ''), React.createElement("div", {
|
|
4892
4884
|
className: rootClassName$1F + "-endereco nunito"
|
|
4893
|
-
}, props.modo ===
|
|
4885
|
+
}, props.modo === 1 ? (_props$presencial = props.presencial) === null || _props$presencial === void 0 ? void 0 : _props$presencial.endereco : props.language.enderecoDigital)), React.createElement("div", {
|
|
4894
4886
|
className: rootClassName$1F + "-right"
|
|
4895
4887
|
}, React.createElement("div", {
|
|
4896
4888
|
className: rootClassName$1F + "-col-data"
|
|
@@ -4906,7 +4898,7 @@ function AssembleiaItem(props) {
|
|
|
4906
4898
|
className: rootClassName$1F + "-value-data nunito"
|
|
4907
4899
|
}, props.dataTermino)), React.createElement("div", {
|
|
4908
4900
|
className: rootClassName$1F + "-icon"
|
|
4909
|
-
}, React.createElement(ChevronArrowRightIcon, null)))), props.presencial && props.modo !==
|
|
4901
|
+
}, React.createElement(ChevronArrowRightIcon, null)))), props.presencial && props.modo !== 1 && React.createElement("div", {
|
|
4910
4902
|
className: rootClassName$1F + "-second"
|
|
4911
4903
|
}, React.createElement("div", {
|
|
4912
4904
|
className: rootClassName$1F + "-left"
|
|
@@ -13249,7 +13241,7 @@ function CalendarEvent(props) {
|
|
|
13249
13241
|
ref: ref,
|
|
13250
13242
|
className: useMergedClassNames([rootClassName$30, props.size, props.borderStyle]),
|
|
13251
13243
|
disabled: props.disabled,
|
|
13252
|
-
onClick: function onClick() {
|
|
13244
|
+
onClick: function onClick(evt) {
|
|
13253
13245
|
if (typeof props.onClick === 'function') {
|
|
13254
13246
|
props.onClick();
|
|
13255
13247
|
}
|
|
@@ -13257,6 +13249,8 @@ function CalendarEvent(props) {
|
|
|
13257
13249
|
if (!props.forceExpanded && props.expansible) {
|
|
13258
13250
|
setExpanded(!expanded);
|
|
13259
13251
|
}
|
|
13252
|
+
|
|
13253
|
+
evt.stopPropagation();
|
|
13260
13254
|
},
|
|
13261
13255
|
style: {
|
|
13262
13256
|
color: props.color,
|
|
@@ -13297,49 +13291,61 @@ var CalendarChip$1 = memo(CalendarChip);
|
|
|
13297
13291
|
var rootClassName$32 = 'calendar-month-day';
|
|
13298
13292
|
|
|
13299
13293
|
function CalendarMonthDay(props) {
|
|
13300
|
-
var _props$eventos, _props$
|
|
13294
|
+
var _props$eventos, _props$eventos3, _props$eventos4, _props$eventos5, _props$eventos6, _props$eventos6$slice;
|
|
13301
13295
|
|
|
13302
13296
|
var classNames = useMemo(function () {
|
|
13303
13297
|
return getMergedClassNames([rootClassName$32, props.pocket ? 'pocket' : '', props.isToday ? 'today' : '', props.disabled ? 'disabled' : '', props.highlightWeekends && (props.day.getDay() === 0 || props.day.getDay() === 6) ? 'highlight' : '']);
|
|
13304
13298
|
}, [props.day, props.disabled, props.highlightWeekends, props.isToday, props.pocket]);
|
|
13299
|
+
var date = new Date();
|
|
13300
|
+
date.setDate(date.getDate() - 1);
|
|
13305
13301
|
return React.createElement("div", {
|
|
13306
|
-
className: classNames
|
|
13302
|
+
className: getMergedClassNames([classNames, ((_props$eventos = props.eventos) === null || _props$eventos === void 0 ? void 0 : _props$eventos.length) > 2 ? 'pointer-cursor' : undefined]),
|
|
13303
|
+
onClick: function onClick(evt) {
|
|
13304
|
+
var _props$eventos2;
|
|
13305
|
+
|
|
13306
|
+
if (((_props$eventos2 = props.eventos) === null || _props$eventos2 === void 0 ? void 0 : _props$eventos2.length) > 2 && typeof props.onDateClick === 'function') {
|
|
13307
|
+
props.onDateClick(props.day, evt);
|
|
13308
|
+
evt.stopPropagation();
|
|
13309
|
+
}
|
|
13310
|
+
}
|
|
13307
13311
|
}, React.createElement("div", {
|
|
13308
13312
|
className: rootClassName$32 + "-label-line"
|
|
13309
13313
|
}, React.createElement("div", {
|
|
13310
13314
|
className: rootClassName$32 + "-day nunito",
|
|
13311
13315
|
onClick: function onClick(evt) {
|
|
13312
|
-
if (props.pocket && !props.disabled && typeof props.
|
|
13313
|
-
props.
|
|
13316
|
+
if (props.pocket && !props.disabled && typeof props.onPlusButtonClick === 'function') {
|
|
13317
|
+
props.onPlusButtonClick(props.day, evt);
|
|
13314
13318
|
}
|
|
13315
13319
|
}
|
|
13316
13320
|
}, React.createElement(Notification, {
|
|
13317
|
-
count: props.pocket ? (_props$
|
|
13321
|
+
count: props.pocket ? (_props$eventos3 = props.eventos) === null || _props$eventos3 === void 0 ? void 0 : _props$eventos3.length : 0,
|
|
13318
13322
|
type: props.disabled ? NotificationType.Disabled : NotificationType.Primary,
|
|
13319
13323
|
verticalOuter: 11,
|
|
13320
13324
|
horizontalOuter: 14
|
|
13321
|
-
}, getTwoNumbersIfNotTen(props.day.getDate()))), React.createElement("div", null, !props.pocket && props.showPlusIcon && Boolean(props.eventos) && ((_props$
|
|
13322
|
-
num: ((_props$
|
|
13325
|
+
}, getTwoNumbersIfNotTen(props.day.getDate()))), React.createElement("div", null, !props.pocket && props.showPlusIcon && Boolean(props.eventos) && ((_props$eventos4 = props.eventos) === null || _props$eventos4 === void 0 ? void 0 : _props$eventos4.length) > 2 ? React.createElement(CalendarChip$1, {
|
|
13326
|
+
num: ((_props$eventos5 = props.eventos) === null || _props$eventos5 === void 0 ? void 0 : _props$eventos5.length) - 2,
|
|
13323
13327
|
onClick: function onClick(evt) {
|
|
13324
13328
|
if (typeof props.onPlusButtonClick === 'function') {
|
|
13325
13329
|
props.onPlusButtonClick(props.day, evt);
|
|
13330
|
+
evt.stopPropagation();
|
|
13326
13331
|
}
|
|
13327
13332
|
},
|
|
13328
13333
|
disabled: props.disabled
|
|
13329
13334
|
}) : undefined)), !props.pocket ? React.createElement(Fragment$1, null, React.createElement("div", {
|
|
13330
13335
|
className: rootClassName$32 + "-eventos"
|
|
13331
|
-
}, (_props$
|
|
13336
|
+
}, (_props$eventos6 = props.eventos) === null || _props$eventos6 === void 0 ? void 0 : (_props$eventos6$slice = _props$eventos6.slice(0, 2)) === null || _props$eventos6$slice === void 0 ? void 0 : _props$eventos6$slice.map(function (e) {
|
|
13332
13337
|
return React.createElement(CalendarEvent$1, Object.assign({
|
|
13333
13338
|
key: e.id
|
|
13334
13339
|
}, e, {
|
|
13335
13340
|
disabled: props.disabled
|
|
13336
13341
|
}));
|
|
13337
13342
|
})), props.showAddButton ? React.createElement("button", {
|
|
13338
|
-
disabled: props.
|
|
13343
|
+
disabled: props.disabledPrevAddButton ? props.day < date ? true : false : false,
|
|
13339
13344
|
className: rootClassName$32 + "-button",
|
|
13340
13345
|
onClick: function onClick(evt) {
|
|
13341
13346
|
if (typeof props.onAddButtonClick === 'function') {
|
|
13342
13347
|
props.onAddButtonClick(props.day, evt);
|
|
13348
|
+
evt.stopPropagation();
|
|
13343
13349
|
}
|
|
13344
13350
|
}
|
|
13345
13351
|
}, React.createElement("span", null, React.createElement(AddCircleIcon, null), props.language.addNew)) : undefined) : undefined);
|
|
@@ -13372,7 +13378,7 @@ function CalendarDays(props) {
|
|
|
13372
13378
|
}, days.map(function (d) {
|
|
13373
13379
|
var _props$eventos;
|
|
13374
13380
|
|
|
13375
|
-
var k = "" + d.getFullYear() + (d.getMonth() + 1) + d.getDate();
|
|
13381
|
+
var k = "" + d.getFullYear() + getTwoNumbersIfNotTen(d.getMonth() + 1) + getTwoNumbersIfNotTen(d.getDate());
|
|
13376
13382
|
var eventos = (_props$eventos = props.eventos) === null || _props$eventos === void 0 ? void 0 : _props$eventos.get(k);
|
|
13377
13383
|
return React.createElement(CalendarMonthDay$1, {
|
|
13378
13384
|
pocket: props.pocket,
|
|
@@ -13382,10 +13388,12 @@ function CalendarDays(props) {
|
|
|
13382
13388
|
eventos: eventos,
|
|
13383
13389
|
isToday: d.getDate() === today.getDate() && d.getMonth() === today.getMonth() && d.getFullYear() === today.getFullYear(),
|
|
13384
13390
|
disabled: disabledDay(d) || props.loading,
|
|
13391
|
+
disabledPrevAddButton: props.disabledPrevAddButton,
|
|
13385
13392
|
showAddButton: props.showAddButton,
|
|
13386
13393
|
onAddButtonClick: props.onAddButtonClick,
|
|
13387
13394
|
showPlusIcon: props.showPlusIcon,
|
|
13388
13395
|
onPlusButtonClick: props.onPlusButtonClick,
|
|
13396
|
+
onDateClick: props.onDateClick,
|
|
13389
13397
|
highlightWeekends: props.highlightWeekends
|
|
13390
13398
|
});
|
|
13391
13399
|
}));
|
|
@@ -13441,11 +13449,13 @@ function Calendar(props) {
|
|
|
13441
13449
|
referencia: props.referencia,
|
|
13442
13450
|
disabledNextMonth: props.disabledNextMonth,
|
|
13443
13451
|
disabledPrevMonth: props.disabledPrevMonth,
|
|
13452
|
+
disabledPrevAddButton: props.disabledPrevAddButton,
|
|
13444
13453
|
language: props.language,
|
|
13445
13454
|
showAddButton: props.showAddButton,
|
|
13446
13455
|
onAddButtonClick: props.onAddButtonClick,
|
|
13447
13456
|
showPlusIcon: props.showPlusIcon,
|
|
13448
13457
|
onPlusButtonClick: props.onPlusButtonClick,
|
|
13458
|
+
onDateClick: props.onDateClick,
|
|
13449
13459
|
highlightWeekends: props.highlightWeekends,
|
|
13450
13460
|
loading: props.loading,
|
|
13451
13461
|
eventos: props.eventos
|
|
@@ -13457,6 +13467,7 @@ Calendar.defaultProps = {
|
|
|
13457
13467
|
loading: false,
|
|
13458
13468
|
disabledNextMonth: true,
|
|
13459
13469
|
disabledPrevMonth: true,
|
|
13470
|
+
disabledPrevAddButton: true,
|
|
13460
13471
|
highlightWeekends: true,
|
|
13461
13472
|
showAddButton: true,
|
|
13462
13473
|
showPlusIcon: true,
|