funda-ui 4.4.15 → 4.4.35
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/EventCalendar/index.css +114 -114
- package/EventCalendar/index.d.ts +1 -0
- package/EventCalendar/index.js +116 -84
- package/EventCalendarTimeline/index.css +274 -270
- package/EventCalendarTimeline/index.d.ts +3 -0
- package/EventCalendarTimeline/index.js +641 -224
- package/MultipleCheckboxes/index.js +11 -11
- package/MultipleSelect/index.js +11 -11
- package/NativeSelect/index.js +11 -11
- package/Radio/index.js +11 -11
- package/Select/index.js +11 -11
- package/Table/index.css +1 -0
- package/Table/index.js +36 -7
- package/TagInput/index.d.ts +1 -0
- package/TagInput/index.js +20 -2
- package/Tree/index.js +11 -11
- package/Utils/object.js +11 -11
- package/Utils/os.d.ts +2 -0
- package/Utils/os.js +104 -0
- package/lib/cjs/EventCalendar/index.d.ts +1 -0
- package/lib/cjs/EventCalendar/index.js +116 -84
- package/lib/cjs/EventCalendarTimeline/index.d.ts +3 -0
- package/lib/cjs/EventCalendarTimeline/index.js +641 -224
- package/lib/cjs/MultipleCheckboxes/index.js +11 -11
- package/lib/cjs/MultipleSelect/index.js +11 -11
- package/lib/cjs/NativeSelect/index.js +11 -11
- package/lib/cjs/Radio/index.js +11 -11
- package/lib/cjs/Select/index.js +11 -11
- package/lib/cjs/Table/index.js +36 -7
- package/lib/cjs/TagInput/index.d.ts +1 -0
- package/lib/cjs/TagInput/index.js +20 -2
- package/lib/cjs/Tree/index.js +11 -11
- package/lib/cjs/Utils/object.js +11 -11
- package/lib/cjs/Utils/os.d.ts +2 -0
- package/lib/cjs/Utils/os.js +104 -0
- package/lib/css/EventCalendar/index.css +114 -114
- package/lib/css/EventCalendarTimeline/index.css +274 -270
- package/lib/css/Table/index.css +1 -0
- package/lib/esm/EventCalendar/index.scss +81 -81
- package/lib/esm/EventCalendar/index.tsx +136 -98
- package/lib/esm/EventCalendarTimeline/index.scss +226 -221
- package/lib/esm/EventCalendarTimeline/index.tsx +445 -207
- package/lib/esm/ModalDialog/index.tsx +0 -1
- package/lib/esm/Table/Table.tsx +0 -1
- package/lib/esm/Table/index.scss +2 -0
- package/lib/esm/Table/utils/hooks/useTableDraggable.tsx +47 -6
- package/lib/esm/TagInput/index.tsx +23 -1
- package/lib/esm/Utils/libs/object.ts +67 -67
- package/lib/esm/Utils/libs/os.ts +63 -0
- package/package.json +1 -1
|
@@ -2923,6 +2923,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
2923
2923
|
onCellMouseEnter = props.onCellMouseEnter,
|
|
2924
2924
|
onCellMouseLeave = props.onCellMouseLeave,
|
|
2925
2925
|
onCellClick = props.onCellClick,
|
|
2926
|
+
onCellDoubleClick = props.onCellDoubleClick,
|
|
2926
2927
|
onCellMouseUp = props.onCellMouseUp,
|
|
2927
2928
|
onKeyPressed = props.onKeyPressed;
|
|
2928
2929
|
var DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
@@ -2931,10 +2932,13 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
2931
2932
|
var WEEK_FULL = langWeekFull || ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'];
|
|
2932
2933
|
var MONTHS = langMonths || ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
|
|
2933
2934
|
var MONTHS_FULL = langMonthsFull || ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
2935
|
+
var START_WEEK_ON = 1; // represents "Monday/1" in JavaScript
|
|
2936
|
+
|
|
2937
|
+
// orginal data
|
|
2934
2938
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
2935
2939
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2936
|
-
|
|
2937
|
-
|
|
2940
|
+
orginalData = _useState2[0],
|
|
2941
|
+
setOrginalData = _useState2[1];
|
|
2938
2942
|
var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
2939
2943
|
return new Date();
|
|
2940
2944
|
}, []);
|
|
@@ -3001,6 +3005,20 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3001
3005
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
3002
3006
|
tableCellId = _useState28[0],
|
|
3003
3007
|
setTableCellId = _useState28[1];
|
|
3008
|
+
var findMondayAndTruncate = function findMondayAndTruncate(dates) {
|
|
3009
|
+
var _res = dates.map(function (s) {
|
|
3010
|
+
return new Date(s);
|
|
3011
|
+
});
|
|
3012
|
+
// Find the first Monday in the sequence
|
|
3013
|
+
for (var i = 0; i < _res.length; i++) {
|
|
3014
|
+
var _date2 = _res[i];
|
|
3015
|
+
if (_date2.getDay() === START_WEEK_ON) {
|
|
3016
|
+
// Return dates starting from Monday onwards
|
|
3017
|
+
return dates.slice(i);
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
return []; // Return empty array if no Monday found
|
|
3021
|
+
};
|
|
3004
3022
|
|
|
3005
3023
|
// exposes the following methods
|
|
3006
3024
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
@@ -3042,7 +3060,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3042
3060
|
}))))), cellAddBtnLabel || '');
|
|
3043
3061
|
};
|
|
3044
3062
|
var queryItemObj = function queryItemObj() {
|
|
3045
|
-
var _perData =
|
|
3063
|
+
var _perData = orginalData.filter(function (item) {
|
|
3046
3064
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day));
|
|
3047
3065
|
});
|
|
3048
3066
|
var _currentData = undefined;
|
|
@@ -3082,9 +3100,9 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3082
3100
|
|
|
3083
3101
|
// next month
|
|
3084
3102
|
if (type === 'back') {
|
|
3085
|
-
var
|
|
3086
|
-
currentMonth =
|
|
3087
|
-
currentStartDay = getStartDayOfMonth(
|
|
3103
|
+
var _date3 = new Date(year, currentMonth + 1, day);
|
|
3104
|
+
currentMonth = _date3.getMonth();
|
|
3105
|
+
currentStartDay = getStartDayOfMonth(_date3);
|
|
3088
3106
|
}
|
|
3089
3107
|
|
|
3090
3108
|
//
|
|
@@ -3125,64 +3143,74 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3125
3143
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(v);
|
|
3126
3144
|
});
|
|
3127
3145
|
};
|
|
3128
|
-
return _tempCells.map(function (_, j) {
|
|
3129
|
-
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
3130
3146
|
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3147
|
+
// The remaining date of the previous month
|
|
3148
|
+
// If the number is 7, the calendar does not include the date of the previous month
|
|
3149
|
+
var remainPrevDate = findMondayAndTruncate(_getForwardFill(year, month + 1));
|
|
3150
|
+
var remainPrevDateTotal = remainPrevDate.length === 7 ? 0 : remainPrevDate.length;
|
|
3151
|
+
return {
|
|
3152
|
+
rowsTotal: orginalData.length,
|
|
3153
|
+
colsTotal: allDays.length,
|
|
3154
|
+
forwardFillTotal: remainPrevDateTotal,
|
|
3155
|
+
list: _tempCells.map(function (_, j) {
|
|
3156
|
+
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
3157
|
+
|
|
3158
|
+
// back fill
|
|
3159
|
+
var backFillArr = [];
|
|
3160
|
+
for (var k = 0; k < 7 - _col.length; k++) {
|
|
3161
|
+
backFillArr.push(null);
|
|
3162
|
+
}
|
|
3163
|
+
_col.splice.apply(_col, [_col.length, 0].concat(_toConsumableArray(backFillArr)));
|
|
3137
3164
|
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3165
|
+
//
|
|
3166
|
+
var isFirstGroup = j === 0;
|
|
3167
|
+
var isLastGroup = j === _tempCells.length - 1;
|
|
3141
3168
|
|
|
3142
|
-
|
|
3143
|
-
|
|
3169
|
+
// forward fill
|
|
3170
|
+
var __forwardFillDate = _getForwardFill(year, month + 1);
|
|
3144
3171
|
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3172
|
+
// back fill
|
|
3173
|
+
var __backFillDate = _getBackFill(year, month + 1);
|
|
3174
|
+
var _getDateShow = function _getDateShow(_dayIndex, _m, _startDay, _month) {
|
|
3175
|
+
var currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
|
|
3149
3176
|
|
|
3150
|
-
|
|
3151
|
-
|
|
3177
|
+
// date
|
|
3178
|
+
var _dateShow = currentDay > 0 ? "".concat(year, "-").concat(_month + 1, "-").concat(currentDay) : '';
|
|
3152
3179
|
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3180
|
+
// forward & back
|
|
3181
|
+
if (isFirstGroup && _dateShow === '') {
|
|
3182
|
+
_dateShow = __forwardFillDate.at(currentDay - 1);
|
|
3183
|
+
}
|
|
3184
|
+
if (isLastGroup && _dateShow === '') {
|
|
3185
|
+
_dateShow = __backFillDate.at(_m);
|
|
3186
|
+
}
|
|
3187
|
+
return {
|
|
3188
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
|
|
3189
|
+
firstGroup: isFirstGroup,
|
|
3190
|
+
lastGroup: isLastGroup,
|
|
3191
|
+
validDisplayDate: currentDay > 0 && currentDay <= days[month]
|
|
3192
|
+
};
|
|
3165
3193
|
};
|
|
3166
|
-
};
|
|
3167
3194
|
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3195
|
+
//
|
|
3196
|
+
return {
|
|
3197
|
+
month: currentMonth,
|
|
3198
|
+
startDay: currentStartDay,
|
|
3199
|
+
row: j,
|
|
3200
|
+
col: _col,
|
|
3201
|
+
dateInfo: _col.map(function (k, m) {
|
|
3202
|
+
var _lastWeekDays = _col.filter(Boolean).length;
|
|
3203
|
+
return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
|
|
3204
|
+
}),
|
|
3205
|
+
weekDisplay: _col.map(function (k, m) {
|
|
3206
|
+
return WEEK[m];
|
|
3207
|
+
}),
|
|
3208
|
+
week: _col.map(function (k, m) {
|
|
3209
|
+
return m;
|
|
3210
|
+
})
|
|
3211
|
+
};
|
|
3212
|
+
})
|
|
3213
|
+
};
|
|
3186
3214
|
};
|
|
3187
3215
|
function setTodayDate(inputDate) {
|
|
3188
3216
|
setDay(inputDate.getDate());
|
|
@@ -3307,7 +3335,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3307
3335
|
}, [date]);
|
|
3308
3336
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
3309
3337
|
// update events value
|
|
3310
|
-
if (Array.isArray(eventsValue))
|
|
3338
|
+
if (Array.isArray(eventsValue)) setOrginalData(eventsValue);
|
|
3311
3339
|
|
|
3312
3340
|
// update current today
|
|
3313
3341
|
if (typeof customTodayDate === 'string' && customTodayDate !== '' && (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.isValidDate)(customTodayDate)) {
|
|
@@ -3319,17 +3347,17 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3319
3347
|
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
3320
3348
|
}, [eventsValue, customTodayDate]);
|
|
3321
3349
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3322
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("
|
|
3350
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__wrapper", calendarWrapperClassName),
|
|
3323
3351
|
onKeyDown: function onKeyDown(e) {
|
|
3324
3352
|
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e);
|
|
3325
3353
|
},
|
|
3326
3354
|
tabIndex: -1
|
|
3327
3355
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3328
|
-
className: "
|
|
3356
|
+
className: "custom-event-cal__header bg-body-tertiary"
|
|
3329
3357
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3330
3358
|
tabIndex: -1,
|
|
3331
3359
|
type: "button",
|
|
3332
|
-
className: "
|
|
3360
|
+
className: "custom-event-cal__btn custom-event-cal__btn--prev",
|
|
3333
3361
|
onClick: handlePrevChange
|
|
3334
3362
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3335
3363
|
width: "20px",
|
|
@@ -3340,11 +3368,11 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3340
3368
|
d: "M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z",
|
|
3341
3369
|
fill: "#000"
|
|
3342
3370
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3343
|
-
className: "
|
|
3371
|
+
className: "custom-event-cal__header__btns"
|
|
3344
3372
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3345
3373
|
tabIndex: -1,
|
|
3346
3374
|
type: "button",
|
|
3347
|
-
className: "
|
|
3375
|
+
className: "custom-event-cal__btn ".concat(winMonth ? 'active' : ''),
|
|
3348
3376
|
onClick: handleShowWinMonth
|
|
3349
3377
|
}, MONTHS[month], /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3350
3378
|
width: "12px",
|
|
@@ -3356,7 +3384,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3356
3384
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3357
3385
|
tabIndex: -1,
|
|
3358
3386
|
type: "button",
|
|
3359
|
-
className: "
|
|
3387
|
+
className: "custom-event-cal__btn ".concat(winYear ? 'active' : ''),
|
|
3360
3388
|
onClick: handleShowWinYear
|
|
3361
3389
|
}, year, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3362
3390
|
width: "12px",
|
|
@@ -3368,7 +3396,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3368
3396
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3369
3397
|
tabIndex: -1,
|
|
3370
3398
|
type: "button",
|
|
3371
|
-
className: "
|
|
3399
|
+
className: "custom-event-cal__btn custom-event-cal__btn--next",
|
|
3372
3400
|
onClick: handleNextChange
|
|
3373
3401
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3374
3402
|
width: "20px",
|
|
@@ -3379,12 +3407,12 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3379
3407
|
d: "M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z",
|
|
3380
3408
|
fill: "#000"
|
|
3381
3409
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3382
|
-
className: "
|
|
3410
|
+
className: "custom-event-cal__body"
|
|
3383
3411
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3384
|
-
className: "
|
|
3412
|
+
className: "custom-event-cal__row"
|
|
3385
3413
|
}, WEEK.map(function (s, i) {
|
|
3386
3414
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3387
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('
|
|
3415
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day custom-event-cal__day--week custom-event-cal__day--disabled bg-secondary-subtle empty', {
|
|
3388
3416
|
'last-cell': i === WEEK.length - 1
|
|
3389
3417
|
}),
|
|
3390
3418
|
key: i,
|
|
@@ -3393,11 +3421,11 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3393
3421
|
__html: s
|
|
3394
3422
|
}
|
|
3395
3423
|
});
|
|
3396
|
-
})), getCells().map(function (item, j) {
|
|
3397
|
-
var isLastRow = j === getCells().length - 1;
|
|
3424
|
+
})), getCells().list.map(function (item, j) {
|
|
3425
|
+
var isLastRow = j === getCells().list.length - 1;
|
|
3398
3426
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3399
3427
|
key: 'row' + item.row,
|
|
3400
|
-
className: "
|
|
3428
|
+
className: "custom-event-cal__row"
|
|
3401
3429
|
}, item.col.map(function (dayIndex, i) {
|
|
3402
3430
|
var isLastCell = i === item.col.length - 1;
|
|
3403
3431
|
|
|
@@ -3410,7 +3438,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3410
3438
|
|
|
3411
3439
|
// helper
|
|
3412
3440
|
var d = parseFloat(_dateDayShow);
|
|
3413
|
-
var _currentData =
|
|
3441
|
+
var _currentData = orginalData.filter(function (item) {
|
|
3414
3442
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === _dateShow;
|
|
3415
3443
|
});
|
|
3416
3444
|
var isInteractive = item.dateInfo[i].validDisplayDate; // The date on which the user interaction can occur, e.g. click, modify
|
|
@@ -3425,7 +3453,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3425
3453
|
var _items = _currentData[0].list;
|
|
3426
3454
|
return _items.map(function (cellItem, cellItemIndex) {
|
|
3427
3455
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3428
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("
|
|
3456
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__cell-item custom-event-cal__cell-item-".concat(cellItemIndex), {
|
|
3429
3457
|
'first': cellItemIndex === 0,
|
|
3430
3458
|
'last': cellItemIndex === _items.length - 1
|
|
3431
3459
|
}),
|
|
@@ -3454,13 +3482,13 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3454
3482
|
}
|
|
3455
3483
|
}
|
|
3456
3484
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3457
|
-
className: "
|
|
3485
|
+
className: "custom-event-cal__day__event",
|
|
3458
3486
|
style: typeof cellItem !== 'undefined' && cellItem.eventStyles !== 'undefined' ? cellItem.eventStyles : {},
|
|
3459
3487
|
dangerouslySetInnerHTML: typeof cellItem.data === 'string' ? {
|
|
3460
3488
|
__html: cellItem.data
|
|
3461
3489
|
} : undefined
|
|
3462
3490
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(cellItem.data) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, cellItem.data) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3463
|
-
className: "
|
|
3491
|
+
className: "custom-event-cal__day__eventdel ".concat(cellCloseBtnClassName || '')
|
|
3464
3492
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3465
3493
|
href: "#",
|
|
3466
3494
|
tabIndex: -1,
|
|
@@ -3495,7 +3523,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3495
3523
|
});
|
|
3496
3524
|
};
|
|
3497
3525
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3498
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('
|
|
3526
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day', {
|
|
3499
3527
|
'empty': !isInteractive,
|
|
3500
3528
|
'today': d === now.getDate(),
|
|
3501
3529
|
'selected': d === day,
|
|
@@ -3517,6 +3545,10 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3517
3545
|
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, null);
|
|
3518
3546
|
}
|
|
3519
3547
|
},
|
|
3548
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
3549
|
+
//
|
|
3550
|
+
onCellDoubleClick === null || onCellDoubleClick === void 0 ? void 0 : onCellDoubleClick(e);
|
|
3551
|
+
},
|
|
3520
3552
|
onMouseLeave: function onMouseLeave(e) {
|
|
3521
3553
|
onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
|
|
3522
3554
|
},
|
|
@@ -3528,7 +3560,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3528
3560
|
'disabled': !isInteractive
|
|
3529
3561
|
})
|
|
3530
3562
|
}, d), _eventContent(), isForward || isBack ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3531
|
-
className: "
|
|
3563
|
+
className: "custom-event-cal__day__eventadd ".concat(cellAddBtnClassName || '')
|
|
3532
3564
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3533
3565
|
href: "#",
|
|
3534
3566
|
tabIndex: -1,
|
|
@@ -3564,37 +3596,37 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3564
3596
|
}, _addBtn()))));
|
|
3565
3597
|
}));
|
|
3566
3598
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3567
|
-
className: "
|
|
3599
|
+
className: "custom-event-cal__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winMonth ? 'active' : '')
|
|
3568
3600
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3569
|
-
className: "
|
|
3601
|
+
className: "custom-event-cal__month-container"
|
|
3570
3602
|
}, MONTHS_FULL.map(function (month, index) {
|
|
3571
3603
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3572
3604
|
"data-month": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(index + 1),
|
|
3573
|
-
className: "
|
|
3605
|
+
className: "custom-event-cal__month ".concat(selectedMonth === index ? ' selected' : ''),
|
|
3574
3606
|
key: month + index,
|
|
3575
3607
|
onClick: function onClick() {
|
|
3576
3608
|
handleMonthChange(index);
|
|
3577
3609
|
}
|
|
3578
3610
|
}, month);
|
|
3579
3611
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3580
|
-
className: "
|
|
3612
|
+
className: "custom-event-cal__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winYear ? 'active' : '')
|
|
3581
3613
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3582
|
-
className: "
|
|
3614
|
+
className: "custom-event-cal__year-container bg-body-tertiary"
|
|
3583
3615
|
}, yearsArray.map(function (year, index) {
|
|
3584
3616
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3585
3617
|
"data-year": year,
|
|
3586
|
-
className: "
|
|
3618
|
+
className: "custom-event-cal__year ".concat(selectedYear === year ? ' selected' : ''),
|
|
3587
3619
|
key: year + index,
|
|
3588
3620
|
onClick: function onClick() {
|
|
3589
3621
|
handleYearChange(year);
|
|
3590
3622
|
}
|
|
3591
3623
|
}, year);
|
|
3592
3624
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3593
|
-
className: "
|
|
3625
|
+
className: "custom-event-cal__today-wrapper p-2 bg-body-tertiary"
|
|
3594
3626
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3595
3627
|
tabIndex: -1,
|
|
3596
3628
|
type: "button",
|
|
3597
|
-
className: "
|
|
3629
|
+
className: "custom-event-cal__btn custom-event-cal__btn--today",
|
|
3598
3630
|
onClick: handleTodayChange
|
|
3599
3631
|
}, langToday || 'Today'))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default()), {
|
|
3600
3632
|
show: showDelete,
|
|
@@ -82,7 +82,10 @@ export declare type EventCalendarTimelineProps = {
|
|
|
82
82
|
onCellMouseLeave?: (el: any) => void;
|
|
83
83
|
onCellMouseUp?: (el: any, selectedCellsData: any[]) => void;
|
|
84
84
|
onCellClick?: (el: any, cellData: any) => void;
|
|
85
|
+
onCellDoubleClick?: (el: any, cellData: any) => void;
|
|
85
86
|
onKeyPressed?: (el: any, selectedCellsData: any[]) => void;
|
|
87
|
+
onKeyCopy?: (el: any, selectedCellsData: any[]) => void;
|
|
88
|
+
onKeyPaste?: (el: any, selectedCellsData: any[]) => void;
|
|
86
89
|
tableListSectionTitle?: string | React.ReactNode;
|
|
87
90
|
tableCellMinWidth?: number;
|
|
88
91
|
tableTooltipDirection?: string;
|