funda-ui 4.4.15 → 4.5.12
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/Date/index.js +1078 -77
- package/EventCalendar/index.css +114 -114
- package/EventCalendar/index.d.ts +1 -0
- package/EventCalendar/index.js +124 -86
- package/EventCalendarTimeline/index.css +274 -270
- package/EventCalendarTimeline/index.d.ts +3 -0
- package/EventCalendarTimeline/index.js +673 -225
- package/Input/index.d.ts +7 -0
- package/Input/index.js +699 -57
- package/MasonryLayout/index.js +11 -1
- package/MultipleCheckboxes/index.js +11 -11
- package/MultipleSelect/index.d.ts +1 -0
- package/MultipleSelect/index.js +18 -16
- package/NativeSelect/index.js +11 -11
- package/Radio/index.js +11 -11
- package/RangeSlider/index.js +1078 -77
- package/Select/index.js +45 -13
- 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/Textarea/index.d.ts +7 -0
- package/Textarea/index.js +707 -10
- package/Tree/index.js +13 -11
- package/Utils/inputsCalculation.d.ts +18 -1
- package/Utils/inputsCalculation.js +26 -0
- package/Utils/object.js +11 -11
- package/Utils/os.d.ts +2 -0
- package/Utils/os.js +104 -0
- package/lib/cjs/Date/index.js +1078 -77
- package/lib/cjs/EventCalendar/index.d.ts +1 -0
- package/lib/cjs/EventCalendar/index.js +124 -86
- package/lib/cjs/EventCalendarTimeline/index.d.ts +3 -0
- package/lib/cjs/EventCalendarTimeline/index.js +673 -225
- package/lib/cjs/Input/index.d.ts +7 -0
- package/lib/cjs/Input/index.js +699 -57
- package/lib/cjs/MasonryLayout/index.js +11 -1
- package/lib/cjs/MultipleCheckboxes/index.js +11 -11
- package/lib/cjs/MultipleSelect/index.d.ts +1 -0
- package/lib/cjs/MultipleSelect/index.js +18 -16
- package/lib/cjs/NativeSelect/index.js +11 -11
- package/lib/cjs/Radio/index.js +11 -11
- package/lib/cjs/RangeSlider/index.js +1078 -77
- package/lib/cjs/Select/index.js +45 -13
- 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/Textarea/index.d.ts +7 -0
- package/lib/cjs/Textarea/index.js +707 -10
- package/lib/cjs/Tree/index.js +13 -11
- package/lib/cjs/Utils/inputsCalculation.d.ts +18 -1
- package/lib/cjs/Utils/inputsCalculation.js +26 -0
- 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 +144 -104
- package/lib/esm/EventCalendarTimeline/index.scss +226 -221
- package/lib/esm/EventCalendarTimeline/index.tsx +791 -517
- package/lib/esm/Input/index.tsx +299 -77
- package/lib/esm/MasonryLayout/index.tsx +9 -2
- package/lib/esm/ModalDialog/index.tsx +0 -1
- package/lib/esm/MultipleSelect/index.tsx +6 -4
- 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/Textarea/index.tsx +332 -39
- package/lib/esm/Tree/TreeList.tsx +4 -1
- package/lib/esm/Tree/index.tsx +1 -0
- package/lib/esm/Utils/libs/inputsCalculation.ts +60 -31
- package/lib/esm/Utils/libs/object.ts +67 -67
- package/lib/esm/Utils/libs/os.ts +63 -0
- package/package.json +1 -1
|
@@ -53,6 +53,7 @@ export declare type EventCalendarProps = {
|
|
|
53
53
|
onCellMouseEnter?: (el: any) => void;
|
|
54
54
|
onCellMouseLeave?: (el: any) => void;
|
|
55
55
|
onCellClick?: (el: any) => void;
|
|
56
|
+
onCellDoubleClick?: (el: any) => void;
|
|
56
57
|
onCellMouseUp?: (el: any) => void;
|
|
57
58
|
onKeyPressed?: (el: any) => void;
|
|
58
59
|
};
|
|
@@ -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
|
}, []);
|
|
@@ -2985,6 +2989,8 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
2985
2989
|
setWinMonth = _useState22[1];
|
|
2986
2990
|
|
|
2987
2991
|
// modal dialog
|
|
2992
|
+
var modalEditHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
2993
|
+
var modalDeleteHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
2988
2994
|
var EVENTS_ENABLED = typeof modalContent !== 'undefined';
|
|
2989
2995
|
var EVENTS_DELETE_ENABLED = typeof modalDeleteContent !== 'undefined';
|
|
2990
2996
|
var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
@@ -3001,12 +3007,28 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3001
3007
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
3002
3008
|
tableCellId = _useState28[0],
|
|
3003
3009
|
setTableCellId = _useState28[1];
|
|
3010
|
+
var findMondayAndTruncate = function findMondayAndTruncate(dates) {
|
|
3011
|
+
var _res = dates.map(function (s) {
|
|
3012
|
+
return new Date(s);
|
|
3013
|
+
});
|
|
3014
|
+
// Find the first Monday in the sequence
|
|
3015
|
+
for (var i = 0; i < _res.length; i++) {
|
|
3016
|
+
var _date2 = _res[i];
|
|
3017
|
+
if (_date2.getDay() === START_WEEK_ON) {
|
|
3018
|
+
// Return dates starting from Monday onwards
|
|
3019
|
+
return dates.slice(i);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
return []; // Return empty array if no Monday found
|
|
3023
|
+
};
|
|
3004
3024
|
|
|
3005
3025
|
// exposes the following methods
|
|
3006
3026
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
3007
3027
|
return {
|
|
3008
|
-
|
|
3009
|
-
|
|
3028
|
+
closeModal: function closeModal() {
|
|
3029
|
+
if (modalEditHandleRef.current) modalEditHandleRef.current.close();
|
|
3030
|
+
if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
|
|
3031
|
+
}
|
|
3010
3032
|
};
|
|
3011
3033
|
}, [contentRef]);
|
|
3012
3034
|
|
|
@@ -3042,7 +3064,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3042
3064
|
}))))), cellAddBtnLabel || '');
|
|
3043
3065
|
};
|
|
3044
3066
|
var queryItemObj = function queryItemObj() {
|
|
3045
|
-
var _perData =
|
|
3067
|
+
var _perData = orginalData.filter(function (item) {
|
|
3046
3068
|
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
3069
|
});
|
|
3048
3070
|
var _currentData = undefined;
|
|
@@ -3082,9 +3104,9 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3082
3104
|
|
|
3083
3105
|
// next month
|
|
3084
3106
|
if (type === 'back') {
|
|
3085
|
-
var
|
|
3086
|
-
currentMonth =
|
|
3087
|
-
currentStartDay = getStartDayOfMonth(
|
|
3107
|
+
var _date3 = new Date(year, currentMonth + 1, day);
|
|
3108
|
+
currentMonth = _date3.getMonth();
|
|
3109
|
+
currentStartDay = getStartDayOfMonth(_date3);
|
|
3088
3110
|
}
|
|
3089
3111
|
|
|
3090
3112
|
//
|
|
@@ -3125,64 +3147,74 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3125
3147
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(v);
|
|
3126
3148
|
});
|
|
3127
3149
|
};
|
|
3128
|
-
return _tempCells.map(function (_, j) {
|
|
3129
|
-
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
3130
3150
|
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3151
|
+
// The remaining date of the previous month
|
|
3152
|
+
// If the number is 7, the calendar does not include the date of the previous month
|
|
3153
|
+
var remainPrevDate = findMondayAndTruncate(_getForwardFill(year, month + 1));
|
|
3154
|
+
var remainPrevDateTotal = remainPrevDate.length === 7 ? 0 : remainPrevDate.length;
|
|
3155
|
+
return {
|
|
3156
|
+
rowsTotal: orginalData.length,
|
|
3157
|
+
colsTotal: allDays.length,
|
|
3158
|
+
forwardFillTotal: remainPrevDateTotal,
|
|
3159
|
+
list: _tempCells.map(function (_, j) {
|
|
3160
|
+
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
3161
|
+
|
|
3162
|
+
// back fill
|
|
3163
|
+
var backFillArr = [];
|
|
3164
|
+
for (var k = 0; k < 7 - _col.length; k++) {
|
|
3165
|
+
backFillArr.push(null);
|
|
3166
|
+
}
|
|
3167
|
+
_col.splice.apply(_col, [_col.length, 0].concat(_toConsumableArray(backFillArr)));
|
|
3137
3168
|
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3169
|
+
//
|
|
3170
|
+
var isFirstGroup = j === 0;
|
|
3171
|
+
var isLastGroup = j === _tempCells.length - 1;
|
|
3141
3172
|
|
|
3142
|
-
|
|
3143
|
-
|
|
3173
|
+
// forward fill
|
|
3174
|
+
var __forwardFillDate = _getForwardFill(year, month + 1);
|
|
3144
3175
|
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3176
|
+
// back fill
|
|
3177
|
+
var __backFillDate = _getBackFill(year, month + 1);
|
|
3178
|
+
var _getDateShow = function _getDateShow(_dayIndex, _m, _startDay, _month) {
|
|
3179
|
+
var currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
|
|
3149
3180
|
|
|
3150
|
-
|
|
3151
|
-
|
|
3181
|
+
// date
|
|
3182
|
+
var _dateShow = currentDay > 0 ? "".concat(year, "-").concat(_month + 1, "-").concat(currentDay) : '';
|
|
3152
3183
|
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3184
|
+
// forward & back
|
|
3185
|
+
if (isFirstGroup && _dateShow === '') {
|
|
3186
|
+
_dateShow = __forwardFillDate.at(currentDay - 1);
|
|
3187
|
+
}
|
|
3188
|
+
if (isLastGroup && _dateShow === '') {
|
|
3189
|
+
_dateShow = __backFillDate.at(_m);
|
|
3190
|
+
}
|
|
3191
|
+
return {
|
|
3192
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
|
|
3193
|
+
firstGroup: isFirstGroup,
|
|
3194
|
+
lastGroup: isLastGroup,
|
|
3195
|
+
validDisplayDate: currentDay > 0 && currentDay <= days[month]
|
|
3196
|
+
};
|
|
3165
3197
|
};
|
|
3166
|
-
};
|
|
3167
3198
|
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3199
|
+
//
|
|
3200
|
+
return {
|
|
3201
|
+
month: currentMonth,
|
|
3202
|
+
startDay: currentStartDay,
|
|
3203
|
+
row: j,
|
|
3204
|
+
col: _col,
|
|
3205
|
+
dateInfo: _col.map(function (k, m) {
|
|
3206
|
+
var _lastWeekDays = _col.filter(Boolean).length;
|
|
3207
|
+
return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
|
|
3208
|
+
}),
|
|
3209
|
+
weekDisplay: _col.map(function (k, m) {
|
|
3210
|
+
return WEEK[m];
|
|
3211
|
+
}),
|
|
3212
|
+
week: _col.map(function (k, m) {
|
|
3213
|
+
return m;
|
|
3214
|
+
})
|
|
3215
|
+
};
|
|
3216
|
+
})
|
|
3217
|
+
};
|
|
3186
3218
|
};
|
|
3187
3219
|
function setTodayDate(inputDate) {
|
|
3188
3220
|
setDay(inputDate.getDate());
|
|
@@ -3307,7 +3339,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3307
3339
|
}, [date]);
|
|
3308
3340
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
3309
3341
|
// update events value
|
|
3310
|
-
if (Array.isArray(eventsValue))
|
|
3342
|
+
if (Array.isArray(eventsValue)) setOrginalData(eventsValue);
|
|
3311
3343
|
|
|
3312
3344
|
// update current today
|
|
3313
3345
|
if (typeof customTodayDate === 'string' && customTodayDate !== '' && (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.isValidDate)(customTodayDate)) {
|
|
@@ -3319,17 +3351,17 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3319
3351
|
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
3320
3352
|
}, [eventsValue, customTodayDate]);
|
|
3321
3353
|
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)("
|
|
3354
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__wrapper", calendarWrapperClassName),
|
|
3323
3355
|
onKeyDown: function onKeyDown(e) {
|
|
3324
3356
|
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e);
|
|
3325
3357
|
},
|
|
3326
3358
|
tabIndex: -1
|
|
3327
3359
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3328
|
-
className: "
|
|
3360
|
+
className: "custom-event-cal__header bg-body-tertiary"
|
|
3329
3361
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3330
3362
|
tabIndex: -1,
|
|
3331
3363
|
type: "button",
|
|
3332
|
-
className: "
|
|
3364
|
+
className: "custom-event-cal__btn custom-event-cal__btn--prev",
|
|
3333
3365
|
onClick: handlePrevChange
|
|
3334
3366
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3335
3367
|
width: "20px",
|
|
@@ -3340,11 +3372,11 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3340
3372
|
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
3373
|
fill: "#000"
|
|
3342
3374
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3343
|
-
className: "
|
|
3375
|
+
className: "custom-event-cal__header__btns"
|
|
3344
3376
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3345
3377
|
tabIndex: -1,
|
|
3346
3378
|
type: "button",
|
|
3347
|
-
className: "
|
|
3379
|
+
className: "custom-event-cal__btn ".concat(winMonth ? 'active' : ''),
|
|
3348
3380
|
onClick: handleShowWinMonth
|
|
3349
3381
|
}, MONTHS[month], /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3350
3382
|
width: "12px",
|
|
@@ -3356,7 +3388,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3356
3388
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3357
3389
|
tabIndex: -1,
|
|
3358
3390
|
type: "button",
|
|
3359
|
-
className: "
|
|
3391
|
+
className: "custom-event-cal__btn ".concat(winYear ? 'active' : ''),
|
|
3360
3392
|
onClick: handleShowWinYear
|
|
3361
3393
|
}, year, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3362
3394
|
width: "12px",
|
|
@@ -3368,7 +3400,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3368
3400
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3369
3401
|
tabIndex: -1,
|
|
3370
3402
|
type: "button",
|
|
3371
|
-
className: "
|
|
3403
|
+
className: "custom-event-cal__btn custom-event-cal__btn--next",
|
|
3372
3404
|
onClick: handleNextChange
|
|
3373
3405
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3374
3406
|
width: "20px",
|
|
@@ -3379,12 +3411,12 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3379
3411
|
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
3412
|
fill: "#000"
|
|
3381
3413
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3382
|
-
className: "
|
|
3414
|
+
className: "custom-event-cal__body"
|
|
3383
3415
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3384
|
-
className: "
|
|
3416
|
+
className: "custom-event-cal__row"
|
|
3385
3417
|
}, WEEK.map(function (s, i) {
|
|
3386
3418
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3387
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('
|
|
3419
|
+
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
3420
|
'last-cell': i === WEEK.length - 1
|
|
3389
3421
|
}),
|
|
3390
3422
|
key: i,
|
|
@@ -3393,11 +3425,11 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3393
3425
|
__html: s
|
|
3394
3426
|
}
|
|
3395
3427
|
});
|
|
3396
|
-
})), getCells().map(function (item, j) {
|
|
3397
|
-
var isLastRow = j === getCells().length - 1;
|
|
3428
|
+
})), getCells().list.map(function (item, j) {
|
|
3429
|
+
var isLastRow = j === getCells().list.length - 1;
|
|
3398
3430
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3399
3431
|
key: 'row' + item.row,
|
|
3400
|
-
className: "
|
|
3432
|
+
className: "custom-event-cal__row"
|
|
3401
3433
|
}, item.col.map(function (dayIndex, i) {
|
|
3402
3434
|
var isLastCell = i === item.col.length - 1;
|
|
3403
3435
|
|
|
@@ -3410,7 +3442,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3410
3442
|
|
|
3411
3443
|
// helper
|
|
3412
3444
|
var d = parseFloat(_dateDayShow);
|
|
3413
|
-
var _currentData =
|
|
3445
|
+
var _currentData = orginalData.filter(function (item) {
|
|
3414
3446
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === _dateShow;
|
|
3415
3447
|
});
|
|
3416
3448
|
var isInteractive = item.dateInfo[i].validDisplayDate; // The date on which the user interaction can occur, e.g. click, modify
|
|
@@ -3425,7 +3457,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3425
3457
|
var _items = _currentData[0].list;
|
|
3426
3458
|
return _items.map(function (cellItem, cellItemIndex) {
|
|
3427
3459
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3428
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("
|
|
3460
|
+
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
3461
|
'first': cellItemIndex === 0,
|
|
3430
3462
|
'last': cellItemIndex === _items.length - 1
|
|
3431
3463
|
}),
|
|
@@ -3454,13 +3486,13 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3454
3486
|
}
|
|
3455
3487
|
}
|
|
3456
3488
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3457
|
-
className: "
|
|
3489
|
+
className: "custom-event-cal__day__event",
|
|
3458
3490
|
style: typeof cellItem !== 'undefined' && cellItem.eventStyles !== 'undefined' ? cellItem.eventStyles : {},
|
|
3459
3491
|
dangerouslySetInnerHTML: typeof cellItem.data === 'string' ? {
|
|
3460
3492
|
__html: cellItem.data
|
|
3461
3493
|
} : undefined
|
|
3462
3494
|
}, /*#__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: "
|
|
3495
|
+
className: "custom-event-cal__day__eventdel ".concat(cellCloseBtnClassName || '')
|
|
3464
3496
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3465
3497
|
href: "#",
|
|
3466
3498
|
tabIndex: -1,
|
|
@@ -3495,7 +3527,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3495
3527
|
});
|
|
3496
3528
|
};
|
|
3497
3529
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3498
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('
|
|
3530
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day', {
|
|
3499
3531
|
'empty': !isInteractive,
|
|
3500
3532
|
'today': d === now.getDate(),
|
|
3501
3533
|
'selected': d === day,
|
|
@@ -3517,6 +3549,10 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3517
3549
|
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, null);
|
|
3518
3550
|
}
|
|
3519
3551
|
},
|
|
3552
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
3553
|
+
//
|
|
3554
|
+
onCellDoubleClick === null || onCellDoubleClick === void 0 ? void 0 : onCellDoubleClick(e);
|
|
3555
|
+
},
|
|
3520
3556
|
onMouseLeave: function onMouseLeave(e) {
|
|
3521
3557
|
onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
|
|
3522
3558
|
},
|
|
@@ -3528,7 +3564,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3528
3564
|
'disabled': !isInteractive
|
|
3529
3565
|
})
|
|
3530
3566
|
}, 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: "
|
|
3567
|
+
className: "custom-event-cal__day__eventadd ".concat(cellAddBtnClassName || '')
|
|
3532
3568
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3533
3569
|
href: "#",
|
|
3534
3570
|
tabIndex: -1,
|
|
@@ -3564,39 +3600,40 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3564
3600
|
}, _addBtn()))));
|
|
3565
3601
|
}));
|
|
3566
3602
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3567
|
-
className: "
|
|
3603
|
+
className: "custom-event-cal__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winMonth ? 'active' : '')
|
|
3568
3604
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3569
|
-
className: "
|
|
3605
|
+
className: "custom-event-cal__month-container"
|
|
3570
3606
|
}, MONTHS_FULL.map(function (month, index) {
|
|
3571
3607
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3572
3608
|
"data-month": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(index + 1),
|
|
3573
|
-
className: "
|
|
3609
|
+
className: "custom-event-cal__month ".concat(selectedMonth === index ? ' selected' : ''),
|
|
3574
3610
|
key: month + index,
|
|
3575
3611
|
onClick: function onClick() {
|
|
3576
3612
|
handleMonthChange(index);
|
|
3577
3613
|
}
|
|
3578
3614
|
}, month);
|
|
3579
3615
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3580
|
-
className: "
|
|
3616
|
+
className: "custom-event-cal__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winYear ? 'active' : '')
|
|
3581
3617
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3582
|
-
className: "
|
|
3618
|
+
className: "custom-event-cal__year-container bg-body-tertiary"
|
|
3583
3619
|
}, yearsArray.map(function (year, index) {
|
|
3584
3620
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3585
3621
|
"data-year": year,
|
|
3586
|
-
className: "
|
|
3622
|
+
className: "custom-event-cal__year ".concat(selectedYear === year ? ' selected' : ''),
|
|
3587
3623
|
key: year + index,
|
|
3588
3624
|
onClick: function onClick() {
|
|
3589
3625
|
handleYearChange(year);
|
|
3590
3626
|
}
|
|
3591
3627
|
}, year);
|
|
3592
3628
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3593
|
-
className: "
|
|
3629
|
+
className: "custom-event-cal__today-wrapper p-2 bg-body-tertiary"
|
|
3594
3630
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3595
3631
|
tabIndex: -1,
|
|
3596
3632
|
type: "button",
|
|
3597
|
-
className: "
|
|
3633
|
+
className: "custom-event-cal__btn custom-event-cal__btn--today",
|
|
3598
3634
|
onClick: handleTodayChange
|
|
3599
3635
|
}, 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()), {
|
|
3636
|
+
ref: modalDeleteHandleRef,
|
|
3600
3637
|
show: showDelete,
|
|
3601
3638
|
maskOpacity: modalMaskOpacity,
|
|
3602
3639
|
triggerClassName: "",
|
|
@@ -3628,6 +3665,7 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3628
3665
|
};
|
|
3629
3666
|
}()
|
|
3630
3667
|
}, modalDeleteContent || 'Are you sure?'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default()), {
|
|
3668
|
+
ref: modalEditHandleRef,
|
|
3631
3669
|
show: showEdit,
|
|
3632
3670
|
maskOpacity: modalMaskOpacity,
|
|
3633
3671
|
heading: modalHeading,
|
|
@@ -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;
|