plataforma-fundacao-componentes 2.23.15 → 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/index.css +1 -3
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -13291,7 +13291,7 @@ var CalendarChip$1 = memo(CalendarChip);
|
|
|
13291
13291
|
var rootClassName$32 = 'calendar-month-day';
|
|
13292
13292
|
|
|
13293
13293
|
function CalendarMonthDay(props) {
|
|
13294
|
-
var _props$eventos, _props$
|
|
13294
|
+
var _props$eventos, _props$eventos3, _props$eventos4, _props$eventos5, _props$eventos6, _props$eventos6$slice;
|
|
13295
13295
|
|
|
13296
13296
|
var classNames = useMemo(function () {
|
|
13297
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' : '']);
|
|
@@ -13299,9 +13299,11 @@ function CalendarMonthDay(props) {
|
|
|
13299
13299
|
var date = new Date();
|
|
13300
13300
|
date.setDate(date.getDate() - 1);
|
|
13301
13301
|
return React.createElement("div", {
|
|
13302
|
-
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
13303
|
onClick: function onClick(evt) {
|
|
13304
|
-
|
|
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') {
|
|
13305
13307
|
props.onDateClick(props.day, evt);
|
|
13306
13308
|
evt.stopPropagation();
|
|
13307
13309
|
}
|
|
@@ -13316,12 +13318,12 @@ function CalendarMonthDay(props) {
|
|
|
13316
13318
|
}
|
|
13317
13319
|
}
|
|
13318
13320
|
}, React.createElement(Notification, {
|
|
13319
|
-
count: props.pocket ? (_props$
|
|
13321
|
+
count: props.pocket ? (_props$eventos3 = props.eventos) === null || _props$eventos3 === void 0 ? void 0 : _props$eventos3.length : 0,
|
|
13320
13322
|
type: props.disabled ? NotificationType.Disabled : NotificationType.Primary,
|
|
13321
13323
|
verticalOuter: 11,
|
|
13322
13324
|
horizontalOuter: 14
|
|
13323
|
-
}, getTwoNumbersIfNotTen(props.day.getDate()))), React.createElement("div", null, !props.pocket && props.showPlusIcon && Boolean(props.eventos) && ((_props$
|
|
13324
|
-
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,
|
|
13325
13327
|
onClick: function onClick(evt) {
|
|
13326
13328
|
if (typeof props.onPlusButtonClick === 'function') {
|
|
13327
13329
|
props.onPlusButtonClick(props.day, evt);
|
|
@@ -13331,7 +13333,7 @@ function CalendarMonthDay(props) {
|
|
|
13331
13333
|
disabled: props.disabled
|
|
13332
13334
|
}) : undefined)), !props.pocket ? React.createElement(Fragment$1, null, React.createElement("div", {
|
|
13333
13335
|
className: rootClassName$32 + "-eventos"
|
|
13334
|
-
}, (_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) {
|
|
13335
13337
|
return React.createElement(CalendarEvent$1, Object.assign({
|
|
13336
13338
|
key: e.id
|
|
13337
13339
|
}, e, {
|
|
@@ -13376,7 +13378,7 @@ function CalendarDays(props) {
|
|
|
13376
13378
|
}, days.map(function (d) {
|
|
13377
13379
|
var _props$eventos;
|
|
13378
13380
|
|
|
13379
|
-
var k = "" + d.getFullYear() + getTwoNumbersIfNotTen(d.getMonth()) + getTwoNumbersIfNotTen(d.getDate());
|
|
13381
|
+
var k = "" + d.getFullYear() + getTwoNumbersIfNotTen(d.getMonth() + 1) + getTwoNumbersIfNotTen(d.getDate());
|
|
13380
13382
|
var eventos = (_props$eventos = props.eventos) === null || _props$eventos === void 0 ? void 0 : _props$eventos.get(k);
|
|
13381
13383
|
return React.createElement(CalendarMonthDay$1, {
|
|
13382
13384
|
pocket: props.pocket,
|