funda-ui 4.3.355 → 4.3.721
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/DynamicFields/index.d.ts +1 -0
- package/DynamicFields/index.js +23 -3
- package/EventCalendar/index.css +150 -106
- package/EventCalendar/index.d.ts +11 -2
- package/EventCalendar/index.js +835 -151
- package/EventCalendarTimeline/index.css +293 -251
- package/EventCalendarTimeline/index.d.ts +18 -9
- package/EventCalendarTimeline/index.js +1077 -505
- package/MultipleCheckboxes/index.d.ts +1 -0
- package/MultipleCheckboxes/index.js +17 -7
- package/MultipleSelect/index.d.ts +4 -0
- package/MultipleSelect/index.js +54 -8
- package/NativeSelect/index.js +1 -0
- package/Radio/index.d.ts +2 -1
- package/Radio/index.js +54 -24
- package/Select/index.js +115 -42
- package/Table/index.js +27 -3
- package/lib/cjs/DynamicFields/index.d.ts +1 -0
- package/lib/cjs/DynamicFields/index.js +23 -3
- package/lib/cjs/EventCalendar/index.d.ts +11 -2
- package/lib/cjs/EventCalendar/index.js +835 -151
- package/lib/cjs/EventCalendarTimeline/index.d.ts +18 -9
- package/lib/cjs/EventCalendarTimeline/index.js +1077 -505
- package/lib/cjs/MultipleCheckboxes/index.d.ts +1 -0
- package/lib/cjs/MultipleCheckboxes/index.js +17 -7
- package/lib/cjs/MultipleSelect/index.d.ts +4 -0
- package/lib/cjs/MultipleSelect/index.js +54 -8
- package/lib/cjs/NativeSelect/index.js +1 -0
- package/lib/cjs/Radio/index.d.ts +2 -1
- package/lib/cjs/Radio/index.js +54 -24
- package/lib/cjs/Select/index.js +115 -42
- package/lib/cjs/Table/index.js +27 -3
- package/lib/css/EventCalendar/index.css +150 -106
- package/lib/css/EventCalendarTimeline/index.css +293 -251
- package/lib/esm/DynamicFields/index.tsx +28 -3
- package/lib/esm/EventCalendar/index.scss +172 -104
- package/lib/esm/EventCalendar/index.tsx +272 -139
- package/lib/esm/EventCalendarTimeline/index.scss +275 -213
- package/lib/esm/EventCalendarTimeline/index.tsx +706 -708
- package/lib/esm/MultipleCheckboxes/index.tsx +18 -5
- package/lib/esm/MultipleSelect/ItemList.tsx +1 -0
- package/lib/esm/MultipleSelect/index.tsx +103 -52
- package/lib/esm/NativeSelect/index.tsx +2 -0
- package/lib/esm/Radio/index.tsx +68 -27
- package/lib/esm/Select/index.tsx +236 -65
- package/lib/esm/Table/Table.tsx +1 -0
- package/lib/esm/Table/TableCell.tsx +6 -0
- package/lib/esm/Table/table-utils/ToggleSelection.tsx +17 -2
- package/package.json +1 -1
|
@@ -2244,6 +2244,604 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2244
2244
|
|
|
2245
2245
|
/***/ }),
|
|
2246
2246
|
|
|
2247
|
+
/***/ 322:
|
|
2248
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2249
|
+
|
|
2250
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2251
|
+
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2252
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2253
|
+
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
2254
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2255
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2256
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2257
|
+
})(this, function () {
|
|
2258
|
+
return (/******/function () {
|
|
2259
|
+
// webpackBootstrap
|
|
2260
|
+
/******/
|
|
2261
|
+
"use strict";
|
|
2262
|
+
|
|
2263
|
+
/******/ // The require scope
|
|
2264
|
+
/******/
|
|
2265
|
+
var __nested_webpack_require_987__ = {};
|
|
2266
|
+
/******/
|
|
2267
|
+
/************************************************************************/
|
|
2268
|
+
/******/ /* webpack/runtime/define property getters */
|
|
2269
|
+
/******/
|
|
2270
|
+
(function () {
|
|
2271
|
+
/******/ // define getter functions for harmony exports
|
|
2272
|
+
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
2273
|
+
/******/for (var key in definition) {
|
|
2274
|
+
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
2275
|
+
/******/Object.defineProperty(exports, key, {
|
|
2276
|
+
enumerable: true,
|
|
2277
|
+
get: definition[key]
|
|
2278
|
+
});
|
|
2279
|
+
/******/
|
|
2280
|
+
}
|
|
2281
|
+
/******/
|
|
2282
|
+
}
|
|
2283
|
+
/******/
|
|
2284
|
+
};
|
|
2285
|
+
/******/
|
|
2286
|
+
})();
|
|
2287
|
+
/******/
|
|
2288
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2289
|
+
/******/
|
|
2290
|
+
(function () {
|
|
2291
|
+
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
2292
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2293
|
+
};
|
|
2294
|
+
/******/
|
|
2295
|
+
})();
|
|
2296
|
+
/******/
|
|
2297
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
2298
|
+
/******/
|
|
2299
|
+
(function () {
|
|
2300
|
+
/******/ // define __esModule on exports
|
|
2301
|
+
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
2302
|
+
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2303
|
+
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2304
|
+
value: 'Module'
|
|
2305
|
+
});
|
|
2306
|
+
/******/
|
|
2307
|
+
}
|
|
2308
|
+
/******/
|
|
2309
|
+
Object.defineProperty(exports, '__esModule', {
|
|
2310
|
+
value: true
|
|
2311
|
+
});
|
|
2312
|
+
/******/
|
|
2313
|
+
};
|
|
2314
|
+
/******/
|
|
2315
|
+
})();
|
|
2316
|
+
/******/
|
|
2317
|
+
/************************************************************************/
|
|
2318
|
+
var __webpack_exports__ = {};
|
|
2319
|
+
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
2320
|
+
/* harmony export */
|
|
2321
|
+
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
2322
|
+
/* harmony export */"dateFormat": function dateFormat() {
|
|
2323
|
+
return (/* binding */_dateFormat
|
|
2324
|
+
);
|
|
2325
|
+
},
|
|
2326
|
+
/* harmony export */"getCalendarDate": function getCalendarDate() {
|
|
2327
|
+
return (/* binding */_getCalendarDate
|
|
2328
|
+
);
|
|
2329
|
+
},
|
|
2330
|
+
/* harmony export */"getCurrentDate": function getCurrentDate() {
|
|
2331
|
+
return (/* binding */_getCurrentDate
|
|
2332
|
+
);
|
|
2333
|
+
},
|
|
2334
|
+
/* harmony export */"getCurrentDay": function getCurrentDay() {
|
|
2335
|
+
return (/* binding */_getCurrentDay
|
|
2336
|
+
);
|
|
2337
|
+
},
|
|
2338
|
+
/* harmony export */"getCurrentMonth": function getCurrentMonth() {
|
|
2339
|
+
return (/* binding */_getCurrentMonth
|
|
2340
|
+
);
|
|
2341
|
+
},
|
|
2342
|
+
/* harmony export */"getCurrentYear": function getCurrentYear() {
|
|
2343
|
+
return (/* binding */_getCurrentYear
|
|
2344
|
+
);
|
|
2345
|
+
},
|
|
2346
|
+
/* harmony export */"getFirstAndLastMonthDay": function getFirstAndLastMonthDay() {
|
|
2347
|
+
return (/* binding */_getFirstAndLastMonthDay
|
|
2348
|
+
);
|
|
2349
|
+
},
|
|
2350
|
+
/* harmony export */"getFullTime": function getFullTime() {
|
|
2351
|
+
return (/* binding */_getFullTime
|
|
2352
|
+
);
|
|
2353
|
+
},
|
|
2354
|
+
/* harmony export */"getLastDayInMonth": function getLastDayInMonth() {
|
|
2355
|
+
return (/* binding */_getLastDayInMonth
|
|
2356
|
+
);
|
|
2357
|
+
},
|
|
2358
|
+
/* harmony export */"getNextMonthDate": function getNextMonthDate() {
|
|
2359
|
+
return (/* binding */_getNextMonthDate
|
|
2360
|
+
);
|
|
2361
|
+
},
|
|
2362
|
+
/* harmony export */"getNextYearDate": function getNextYearDate() {
|
|
2363
|
+
return (/* binding */_getNextYearDate
|
|
2364
|
+
);
|
|
2365
|
+
},
|
|
2366
|
+
/* harmony export */"getNow": function getNow() {
|
|
2367
|
+
return (/* binding */_getNow
|
|
2368
|
+
);
|
|
2369
|
+
},
|
|
2370
|
+
/* harmony export */"getPrevMonthDate": function getPrevMonthDate() {
|
|
2371
|
+
return (/* binding */_getPrevMonthDate
|
|
2372
|
+
);
|
|
2373
|
+
},
|
|
2374
|
+
/* harmony export */"getPrevYearDate": function getPrevYearDate() {
|
|
2375
|
+
return (/* binding */_getPrevYearDate
|
|
2376
|
+
);
|
|
2377
|
+
},
|
|
2378
|
+
/* harmony export */"getSpecifiedDate": function getSpecifiedDate() {
|
|
2379
|
+
return (/* binding */_getSpecifiedDate
|
|
2380
|
+
);
|
|
2381
|
+
},
|
|
2382
|
+
/* harmony export */"getTodayDate": function getTodayDate() {
|
|
2383
|
+
return (/* binding */_getTodayDate
|
|
2384
|
+
);
|
|
2385
|
+
},
|
|
2386
|
+
/* harmony export */"getTomorrowDate": function getTomorrowDate() {
|
|
2387
|
+
return (/* binding */_getTomorrowDate
|
|
2388
|
+
);
|
|
2389
|
+
},
|
|
2390
|
+
/* harmony export */"getYesterdayDate": function getYesterdayDate() {
|
|
2391
|
+
return (/* binding */_getYesterdayDate
|
|
2392
|
+
);
|
|
2393
|
+
},
|
|
2394
|
+
/* harmony export */"isTimeString": function isTimeString() {
|
|
2395
|
+
return (/* binding */_isTimeString
|
|
2396
|
+
);
|
|
2397
|
+
},
|
|
2398
|
+
/* harmony export */"isValidDate": function isValidDate() {
|
|
2399
|
+
return (/* binding */_isValidDate
|
|
2400
|
+
);
|
|
2401
|
+
},
|
|
2402
|
+
/* harmony export */"isValidDay": function isValidDay() {
|
|
2403
|
+
return (/* binding */_isValidDay
|
|
2404
|
+
);
|
|
2405
|
+
},
|
|
2406
|
+
/* harmony export */"isValidHours": function isValidHours() {
|
|
2407
|
+
return (/* binding */_isValidHours
|
|
2408
|
+
);
|
|
2409
|
+
},
|
|
2410
|
+
/* harmony export */"isValidMinutesAndSeconds": function isValidMinutesAndSeconds() {
|
|
2411
|
+
return (/* binding */_isValidMinutesAndSeconds
|
|
2412
|
+
);
|
|
2413
|
+
},
|
|
2414
|
+
/* harmony export */"isValidMonth": function isValidMonth() {
|
|
2415
|
+
return (/* binding */_isValidMonth
|
|
2416
|
+
);
|
|
2417
|
+
},
|
|
2418
|
+
/* harmony export */"isValidYear": function isValidYear() {
|
|
2419
|
+
return (/* binding */_isValidYear
|
|
2420
|
+
);
|
|
2421
|
+
},
|
|
2422
|
+
/* harmony export */"padZero": function padZero() {
|
|
2423
|
+
return (/* binding */_padZero
|
|
2424
|
+
);
|
|
2425
|
+
},
|
|
2426
|
+
/* harmony export */"setDateDays": function setDateDays() {
|
|
2427
|
+
return (/* binding */_setDateDays
|
|
2428
|
+
);
|
|
2429
|
+
},
|
|
2430
|
+
/* harmony export */"setDateHours": function setDateHours() {
|
|
2431
|
+
return (/* binding */_setDateHours
|
|
2432
|
+
);
|
|
2433
|
+
},
|
|
2434
|
+
/* harmony export */"setDateMinutes": function setDateMinutes() {
|
|
2435
|
+
return (/* binding */_setDateMinutes
|
|
2436
|
+
);
|
|
2437
|
+
},
|
|
2438
|
+
/* harmony export */"timestampToDate": function timestampToDate() {
|
|
2439
|
+
return (/* binding */_timestampToDate
|
|
2440
|
+
);
|
|
2441
|
+
}
|
|
2442
|
+
/* harmony export */
|
|
2443
|
+
});
|
|
2444
|
+
/**
|
|
2445
|
+
* The check string contains only hours, minutes, and seconds
|
|
2446
|
+
* @returns {Boolean}
|
|
2447
|
+
*/
|
|
2448
|
+
function _isTimeString(str) {
|
|
2449
|
+
// match "HH:mm:ss"
|
|
2450
|
+
var timePattern = /^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/;
|
|
2451
|
+
return timePattern.test(str);
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
/**
|
|
2455
|
+
* Get now
|
|
2456
|
+
* @returns {Date} // Wed Apr 17 2024 14:31:36 GMT+0800 (China Standard Time)
|
|
2457
|
+
*/
|
|
2458
|
+
var _getNow = function getNow() {
|
|
2459
|
+
return new Date(Date.now());
|
|
2460
|
+
};
|
|
2461
|
+
|
|
2462
|
+
/**
|
|
2463
|
+
* Zero Padding
|
|
2464
|
+
* @param {Number} num
|
|
2465
|
+
* @param {Boolean} padZeroEnabled
|
|
2466
|
+
* @returns {String} '01', '05', '12'
|
|
2467
|
+
*/
|
|
2468
|
+
var _padZero = function padZero(num) {
|
|
2469
|
+
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2470
|
+
if (padZeroEnabled) {
|
|
2471
|
+
return num < 10 ? '0' + num : num.toString();
|
|
2472
|
+
} else {
|
|
2473
|
+
return num.toString();
|
|
2474
|
+
}
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
* Hours validation
|
|
2479
|
+
* @param {*} v
|
|
2480
|
+
* @returns {Boolean}
|
|
2481
|
+
*/
|
|
2482
|
+
var _isValidHours = function isValidHours(v) {
|
|
2483
|
+
return /^([01]?[0-9]|2[0-3])$/.test(v); // 0~23, 00~23
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* Minutes and Seconds validation
|
|
2488
|
+
* @param {*} v
|
|
2489
|
+
* @returns {Boolean}
|
|
2490
|
+
*/
|
|
2491
|
+
var _isValidMinutesAndSeconds = function isValidMinutesAndSeconds(v) {
|
|
2492
|
+
return /^([01]?[0-9]|[0-5][0-9])$/.test(v); // 0~59, 00~59
|
|
2493
|
+
};
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* Year validation
|
|
2497
|
+
* @param {*} v
|
|
2498
|
+
* @returns {Boolean}
|
|
2499
|
+
*/
|
|
2500
|
+
var _isValidYear = function isValidYear(v) {
|
|
2501
|
+
return /^([1-9][0-9])\d{2}$/.test(v); // 1000 ~ 9999
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* Month validation
|
|
2506
|
+
* @param {*} v
|
|
2507
|
+
* @returns {Boolean}
|
|
2508
|
+
*/
|
|
2509
|
+
var _isValidMonth = function isValidMonth(v) {
|
|
2510
|
+
return /^(0?[1-9]|1[0-2])$/.test(v); // 01~12, 1~12
|
|
2511
|
+
};
|
|
2512
|
+
|
|
2513
|
+
/**
|
|
2514
|
+
* Day validation
|
|
2515
|
+
* @param {*} v
|
|
2516
|
+
* @returns {Boolean}
|
|
2517
|
+
*/
|
|
2518
|
+
var _isValidDay = function isValidDay(v) {
|
|
2519
|
+
return /^(0?[1-9]|[1-2][0-9]|3[0-1])$/.test(v); // 01~31, 1~31
|
|
2520
|
+
};
|
|
2521
|
+
|
|
2522
|
+
/**
|
|
2523
|
+
* Check if the string is legitimate
|
|
2524
|
+
* @param {String} v
|
|
2525
|
+
* @returns {Boolean}
|
|
2526
|
+
*/
|
|
2527
|
+
var _isValidDate = function isValidDate(v) {
|
|
2528
|
+
return !(String(new Date(v)).toLowerCase() === 'invalid date');
|
|
2529
|
+
};
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* Get calendar date
|
|
2533
|
+
* @param {Date | String} v
|
|
2534
|
+
* @returns {Date | String} yyyy-MM-dd
|
|
2535
|
+
*/
|
|
2536
|
+
function _dateFormat(v) {
|
|
2537
|
+
var date = typeof v === 'string' ? new Date(v.replace(/-/g, "/")) : v; // fix "Invalid date in safari"
|
|
2538
|
+
return date;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
/**
|
|
2542
|
+
* Get calendar date
|
|
2543
|
+
* @param {Date | String} v
|
|
2544
|
+
* @param {Boolean} padZeroEnabled
|
|
2545
|
+
* @returns {String} yyyy-MM-dd
|
|
2546
|
+
*/
|
|
2547
|
+
function _getCalendarDate(v) {
|
|
2548
|
+
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2549
|
+
var date = _dateFormat(v);
|
|
2550
|
+
var year = date.getFullYear();
|
|
2551
|
+
var month = _padZero(date.getMonth() + 1, padZeroEnabled);
|
|
2552
|
+
var day = _padZero(date.getDate(), padZeroEnabled);
|
|
2553
|
+
var hours = _padZero(date.getHours(), padZeroEnabled);
|
|
2554
|
+
var minutes = _padZero(date.getMinutes(), padZeroEnabled);
|
|
2555
|
+
var seconds = _padZero(date.getSeconds(), padZeroEnabled);
|
|
2556
|
+
var res = "".concat(year, "-").concat(month, "-").concat(day);
|
|
2557
|
+
return res;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* Get today date
|
|
2562
|
+
* @returns {String} yyyy-MM-dd
|
|
2563
|
+
*/
|
|
2564
|
+
function _getTodayDate() {
|
|
2565
|
+
return _getCalendarDate(new Date());
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* Get tomorrow date
|
|
2570
|
+
* @param {Date | String} v
|
|
2571
|
+
* @returns {String} yyyy-MM-dd
|
|
2572
|
+
*/
|
|
2573
|
+
function _getTomorrowDate(v) {
|
|
2574
|
+
var today = _dateFormat(v);
|
|
2575
|
+
var _tomorrow = today;
|
|
2576
|
+
_tomorrow.setDate(_tomorrow.getDate() + 1);
|
|
2577
|
+
var tomorrow = _getCalendarDate(_tomorrow);
|
|
2578
|
+
return tomorrow;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
/**
|
|
2582
|
+
* Get yesterday date
|
|
2583
|
+
* @param {Date | String} v
|
|
2584
|
+
* @returns {String} yyyy-MM-dd
|
|
2585
|
+
*/
|
|
2586
|
+
function _getYesterdayDate(v) {
|
|
2587
|
+
var today = _dateFormat(v);
|
|
2588
|
+
var _yesterday = today;
|
|
2589
|
+
_yesterday.setDate(_yesterday.getDate() - 1);
|
|
2590
|
+
var yesterday = _getCalendarDate(_yesterday);
|
|
2591
|
+
return yesterday;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
/**
|
|
2595
|
+
* Get specified date
|
|
2596
|
+
* @param {Date | String} v
|
|
2597
|
+
* @param {Number} days The number of days forward or backward, which can be a negative number
|
|
2598
|
+
* @returns {String} yyyy-MM-dd
|
|
2599
|
+
*/
|
|
2600
|
+
/* console.log(getSpecifiedDate(getTodayDate(), -180)); // 2023-08-27 (180 days before February 23, 202) */
|
|
2601
|
+
function _getSpecifiedDate(v, days) {
|
|
2602
|
+
var today = _dateFormat(v);
|
|
2603
|
+
var _specifiedDay = today;
|
|
2604
|
+
_specifiedDay.setDate(_specifiedDay.getDate() + days);
|
|
2605
|
+
var specifiedDay = _getCalendarDate(_specifiedDay);
|
|
2606
|
+
return specifiedDay;
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
/**
|
|
2610
|
+
* Get next month date
|
|
2611
|
+
* @param {Date | String} v
|
|
2612
|
+
* @returns {String} yyyy-MM-dd
|
|
2613
|
+
*/
|
|
2614
|
+
function _getNextMonthDate(v) {
|
|
2615
|
+
var today = _dateFormat(v);
|
|
2616
|
+
today.setMonth(today.getMonth() + 1);
|
|
2617
|
+
return _getCalendarDate(today);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
/**
|
|
2621
|
+
* Get previous month date
|
|
2622
|
+
* @param {Date | String} v
|
|
2623
|
+
* @returns {String} yyyy-MM-dd
|
|
2624
|
+
*/
|
|
2625
|
+
function _getPrevMonthDate(v) {
|
|
2626
|
+
var today = _dateFormat(v);
|
|
2627
|
+
today.setMonth(today.getMonth() - 1);
|
|
2628
|
+
return _getCalendarDate(today);
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Get next year date
|
|
2633
|
+
* @param {Date | String} v
|
|
2634
|
+
* @returns {String} yyyy-MM-dd
|
|
2635
|
+
*/
|
|
2636
|
+
function _getNextYearDate(v) {
|
|
2637
|
+
var today = _dateFormat(v);
|
|
2638
|
+
var current = new Date(today);
|
|
2639
|
+
current.setFullYear(current.getFullYear() + 1);
|
|
2640
|
+
return _getCalendarDate(current);
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Get previous year date
|
|
2645
|
+
* @param {Date | String} v
|
|
2646
|
+
* @returns {String} yyyy-MM-dd
|
|
2647
|
+
*/
|
|
2648
|
+
function _getPrevYearDate(v) {
|
|
2649
|
+
var today = _dateFormat(v);
|
|
2650
|
+
var current = new Date(today);
|
|
2651
|
+
current.setFullYear(current.getFullYear() - 1);
|
|
2652
|
+
return _getCalendarDate(current);
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
/**
|
|
2656
|
+
* Get last day in month
|
|
2657
|
+
* @param {Date | String} v
|
|
2658
|
+
* @param {?Number} targetMonth
|
|
2659
|
+
* @returns {String | Number} yyyy-MM-dd
|
|
2660
|
+
*/
|
|
2661
|
+
/*
|
|
2662
|
+
Example: Get last day in next month
|
|
2663
|
+
|
|
2664
|
+
const _day = '2024-01-01';
|
|
2665
|
+
const y = new Date(getNextMonthDate(_day)).getFullYear();
|
|
2666
|
+
const m = String(new Date(getNextMonthDate(_day)).getMonth() + 1).padStart(2, '0');
|
|
2667
|
+
const d = getLastDayInMonth(getNextMonthDate(_day), new Date(getNextMonthDate(_day)).getMonth() + 1);
|
|
2668
|
+
|
|
2669
|
+
const lastDayOfNextMonth = `${y}-${m}-${d}`; // 2024-02-29
|
|
2670
|
+
|
|
2671
|
+
*/
|
|
2672
|
+
function _getLastDayInMonth(v) {
|
|
2673
|
+
var targetMonth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
2674
|
+
var date = _dateFormat(v);
|
|
2675
|
+
return new Date(date.getFullYear(), typeof targetMonth !== 'undefined' ? targetMonth : date.getMonth() - 1, 0).getDate();
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Get current year
|
|
2680
|
+
* @returns {Number}
|
|
2681
|
+
*/
|
|
2682
|
+
function _getCurrentYear() {
|
|
2683
|
+
return new Date().getFullYear();
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
/**
|
|
2687
|
+
* Get current month
|
|
2688
|
+
* @param {Boolean} padZeroEnabled
|
|
2689
|
+
* @returns {Number}
|
|
2690
|
+
*/
|
|
2691
|
+
function _getCurrentMonth() {
|
|
2692
|
+
var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2693
|
+
var m = new Date().getMonth() + 1;
|
|
2694
|
+
return padZeroEnabled ? String(m).padStart(2, '0') : m;
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
/**
|
|
2698
|
+
* Get current day
|
|
2699
|
+
* @param {Boolean} padZeroEnabled
|
|
2700
|
+
* @returns {Number}
|
|
2701
|
+
*/
|
|
2702
|
+
function _getCurrentDay() {
|
|
2703
|
+
var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2704
|
+
var d = new Date().getDate();
|
|
2705
|
+
return padZeroEnabled ? String(d).padStart(2, '0') : d;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Get first and last month day
|
|
2710
|
+
* @param {Number} v
|
|
2711
|
+
* @param {Boolean} padZeroEnabled
|
|
2712
|
+
* @returns {Array}
|
|
2713
|
+
*/
|
|
2714
|
+
function _getFirstAndLastMonthDay(year) {
|
|
2715
|
+
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2716
|
+
var theFirst = new Date(year, 0, 1).getDate();
|
|
2717
|
+
var theLast = new Date(year, 11, 31).getDate();
|
|
2718
|
+
var padZero = function padZero(num) {
|
|
2719
|
+
if (padZeroEnabled) {
|
|
2720
|
+
return num < 10 ? '0' + num : num.toString();
|
|
2721
|
+
} else {
|
|
2722
|
+
return num.toString();
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
return [padZero(theFirst), padZero(theLast)];
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
/**
|
|
2729
|
+
* Get current date
|
|
2730
|
+
* @param {Boolean} padZeroEnabled
|
|
2731
|
+
* @typedef {String} JSON
|
|
2732
|
+
*/
|
|
2733
|
+
function _getCurrentDate() {
|
|
2734
|
+
var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2735
|
+
var date = new Date();
|
|
2736
|
+
var padZero = function padZero(num) {
|
|
2737
|
+
if (padZeroEnabled) {
|
|
2738
|
+
return num < 10 ? '0' + num : num.toString();
|
|
2739
|
+
} else {
|
|
2740
|
+
return num.toString();
|
|
2741
|
+
}
|
|
2742
|
+
};
|
|
2743
|
+
var year = date.getFullYear();
|
|
2744
|
+
var month = padZero(date.getMonth() + 1);
|
|
2745
|
+
var day = padZero(date.getDate());
|
|
2746
|
+
var hours = padZero(date.getHours());
|
|
2747
|
+
var minutes = padZero(date.getMinutes());
|
|
2748
|
+
return {
|
|
2749
|
+
today: "".concat(year, "-").concat(month, "-").concat(day),
|
|
2750
|
+
yearStart: "".concat(year, "-01-01"),
|
|
2751
|
+
yearEnd: "".concat(year, "-12-").concat(_getLastDayInMonth(date, 12))
|
|
2752
|
+
};
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
/**
|
|
2756
|
+
* Get full time
|
|
2757
|
+
* @param {Date | String} v
|
|
2758
|
+
* @param {Boolean} padZeroEnabled
|
|
2759
|
+
* @param {Boolean} hasSeconds
|
|
2760
|
+
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2761
|
+
*/
|
|
2762
|
+
function _getFullTime(v) {
|
|
2763
|
+
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2764
|
+
var hasSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2765
|
+
var date = _dateFormat(v);
|
|
2766
|
+
var padZero = function padZero(num) {
|
|
2767
|
+
if (padZeroEnabled) {
|
|
2768
|
+
return num < 10 ? '0' + num : num.toString();
|
|
2769
|
+
} else {
|
|
2770
|
+
return num.toString();
|
|
2771
|
+
}
|
|
2772
|
+
};
|
|
2773
|
+
var year = date.getFullYear();
|
|
2774
|
+
var month = padZero(date.getMonth() + 1);
|
|
2775
|
+
var day = padZero(date.getDate());
|
|
2776
|
+
var hours = padZero(date.getHours());
|
|
2777
|
+
var minutes = padZero(date.getMinutes());
|
|
2778
|
+
var seconds = padZero(date.getSeconds());
|
|
2779
|
+
var res = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes, ":").concat(seconds);
|
|
2780
|
+
var res2 = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes);
|
|
2781
|
+
return hasSeconds ? res : res2;
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* Add hours
|
|
2786
|
+
* @param {Date | String} v
|
|
2787
|
+
* @param {Number} offset
|
|
2788
|
+
* @param {Boolean} padZeroEnabled
|
|
2789
|
+
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2790
|
+
*/
|
|
2791
|
+
function _setDateHours(v, offset) {
|
|
2792
|
+
var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2793
|
+
var date = _dateFormat(v);
|
|
2794
|
+
var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 60 * 60 * 1000);
|
|
2795
|
+
return _getFullTime(new Date(_cur), padZeroEnabled);
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* Add minutes
|
|
2800
|
+
* @param {Date | String} v
|
|
2801
|
+
* @param {Number} offset
|
|
2802
|
+
* @param {Boolean} padZeroEnabled
|
|
2803
|
+
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2804
|
+
*/
|
|
2805
|
+
function _setDateMinutes(v, offset) {
|
|
2806
|
+
var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2807
|
+
var date = _dateFormat(v);
|
|
2808
|
+
var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 60 * 1000);
|
|
2809
|
+
return _getFullTime(new Date(_cur), padZeroEnabled);
|
|
2810
|
+
}
|
|
2811
|
+
/**
|
|
2812
|
+
* Add days
|
|
2813
|
+
* @param {Date | String} v
|
|
2814
|
+
* @param {Number} offset
|
|
2815
|
+
* @param {Boolean} padZeroEnabled
|
|
2816
|
+
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2817
|
+
*/
|
|
2818
|
+
function _setDateDays(v, offset) {
|
|
2819
|
+
var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2820
|
+
var date = _dateFormat(v);
|
|
2821
|
+
var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 24 * 60 * 60 * 1000);
|
|
2822
|
+
return _getFullTime(new Date(_cur), padZeroEnabled);
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
/**
|
|
2826
|
+
* Convert timestamp to date
|
|
2827
|
+
* @param {Number} v
|
|
2828
|
+
* @param {Boolean} padZeroEnabled
|
|
2829
|
+
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2830
|
+
*/
|
|
2831
|
+
function _timestampToDate(v) {
|
|
2832
|
+
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2833
|
+
return _getFullTime(new Date(v), padZeroEnabled);
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
/******/
|
|
2837
|
+
return __webpack_exports__;
|
|
2838
|
+
/******/
|
|
2839
|
+
}()
|
|
2840
|
+
);
|
|
2841
|
+
});
|
|
2842
|
+
|
|
2843
|
+
/***/ }),
|
|
2844
|
+
|
|
2247
2845
|
/***/ 767:
|
|
2248
2846
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2249
2847
|
|
|
@@ -3013,8 +3611,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3013
3611
|
/* harmony import */ var funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_4__);
|
|
3014
3612
|
/* harmony import */ var funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(767);
|
|
3015
3613
|
/* harmony import */ var funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_5__);
|
|
3016
|
-
/* harmony import */ var
|
|
3017
|
-
/* harmony import */ var
|
|
3614
|
+
/* harmony import */ var funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(322);
|
|
3615
|
+
/* harmony import */ var funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__);
|
|
3616
|
+
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(188);
|
|
3617
|
+
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__);
|
|
3018
3618
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3019
3619
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3020
3620
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -3036,8 +3636,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
3036
3636
|
|
|
3037
3637
|
|
|
3038
3638
|
|
|
3639
|
+
|
|
3039
3640
|
var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
3040
|
-
var
|
|
3641
|
+
var contentRef = props.contentRef,
|
|
3642
|
+
calendarWrapperClassName = props.calendarWrapperClassName,
|
|
3041
3643
|
tableWrapperClassName = props.tableWrapperClassName,
|
|
3042
3644
|
tableClassName = props.tableClassName,
|
|
3043
3645
|
tableHeadClassName = props.tableHeadClassName,
|
|
@@ -3053,8 +3655,11 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3053
3655
|
langMonthsFull = props.langMonthsFull,
|
|
3054
3656
|
langToday = props.langToday,
|
|
3055
3657
|
iconRemove = props.iconRemove,
|
|
3658
|
+
iconAdd = props.iconAdd,
|
|
3056
3659
|
cellCloseBtnClassName = props.cellCloseBtnClassName,
|
|
3057
3660
|
cellCloseBtnLabel = props.cellCloseBtnLabel,
|
|
3661
|
+
cellAddBtnClassName = props.cellAddBtnClassName,
|
|
3662
|
+
cellAddBtnLabel = props.cellAddBtnLabel,
|
|
3058
3663
|
forwardAndBackFillDisabled = props.forwardAndBackFillDisabled,
|
|
3059
3664
|
draggable = props.draggable,
|
|
3060
3665
|
showWeek = props.showWeek,
|
|
@@ -3101,10 +3706,17 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3101
3706
|
var WEEK_FULL = langWeekFull || ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'];
|
|
3102
3707
|
var MONTHS = langMonths || ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
|
|
3103
3708
|
var MONTHS_FULL = langMonthsFull || ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
3709
|
+
|
|
3710
|
+
// orginal data
|
|
3104
3711
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
3105
3712
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3106
3713
|
val = _useState2[0],
|
|
3107
3714
|
setVal = _useState2[1];
|
|
3715
|
+
|
|
3716
|
+
//
|
|
3717
|
+
var FILL_BLANK_DATE_DISABLD = typeof forwardAndBackFillDisabled === 'undefined' ? true : forwardAndBackFillDisabled;
|
|
3718
|
+
|
|
3719
|
+
//
|
|
3108
3720
|
var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
3109
3721
|
return new Date();
|
|
3110
3722
|
}, []);
|
|
@@ -3156,6 +3768,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3156
3768
|
|
|
3157
3769
|
// modal dialog
|
|
3158
3770
|
var EVENTS_ENABLED = typeof modalContent !== 'undefined';
|
|
3771
|
+
var EVENTS_DELETE_ENABLED = typeof modalDeleteContent !== 'undefined';
|
|
3159
3772
|
var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3160
3773
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
3161
3774
|
showEdit = _useState24[0],
|
|
@@ -3175,23 +3788,73 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3175
3788
|
var scrollHeaderRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3176
3789
|
var scrollBodyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3177
3790
|
var scrollListRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3791
|
+
|
|
3792
|
+
// Open temporary storage for pop-ups
|
|
3178
3793
|
var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
|
|
3179
3794
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
3180
3795
|
tableRowNum = _useState28[0],
|
|
3181
3796
|
setTableRowNum = _useState28[1];
|
|
3797
|
+
var _useState29 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
|
|
3798
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
3799
|
+
tableCellId = _useState30[0],
|
|
3800
|
+
setTableCellId = _useState30[1];
|
|
3182
3801
|
|
|
3183
3802
|
// table grid tooltip
|
|
3184
3803
|
var CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET = Number(tableTooltipExceededSidePosOffset) || 15;
|
|
3185
3804
|
var CELL_TOOLTIP_POS_OFFSET = typeof tableTooltipOffset === 'undefined' ? 10 : tableTooltipOffset;
|
|
3186
3805
|
var tableTooltipModalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3187
|
-
var
|
|
3188
|
-
_useState30 = _slicedToArray(_useState29, 2),
|
|
3189
|
-
isShowTableTooltip = _useState30[0],
|
|
3190
|
-
setIsShowTableTooltip = _useState30[1];
|
|
3191
|
-
var _useState31 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
3806
|
+
var _useState31 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3192
3807
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
3193
|
-
|
|
3194
|
-
|
|
3808
|
+
isShowTableTooltip = _useState32[0],
|
|
3809
|
+
setIsShowTableTooltip = _useState32[1];
|
|
3810
|
+
var _useState33 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
3811
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
3812
|
+
tableTooltipContent = _useState34[0],
|
|
3813
|
+
setTableTooltipContent = _useState34[1];
|
|
3814
|
+
|
|
3815
|
+
// exposes the following methods
|
|
3816
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
3817
|
+
return {
|
|
3818
|
+
gridInit: function gridInit() {
|
|
3819
|
+
tableGridInit();
|
|
3820
|
+
},
|
|
3821
|
+
gridReset: function gridReset(cb) {
|
|
3822
|
+
tableGridReset();
|
|
3823
|
+
}
|
|
3824
|
+
};
|
|
3825
|
+
}, [contentRef]);
|
|
3826
|
+
|
|
3827
|
+
// helper buttons
|
|
3828
|
+
var _delBtn = function _delBtn() {
|
|
3829
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3830
|
+
width: "20px",
|
|
3831
|
+
height: "20px",
|
|
3832
|
+
viewBox: "0 0 24 24",
|
|
3833
|
+
fill: "none"
|
|
3834
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3835
|
+
fillRule: "evenodd",
|
|
3836
|
+
clipRule: "evenodd",
|
|
3837
|
+
d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z",
|
|
3838
|
+
fill: "#000"
|
|
3839
|
+
}))), cellCloseBtnLabel || '');
|
|
3840
|
+
};
|
|
3841
|
+
var _addBtn = function _addBtn() {
|
|
3842
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3843
|
+
width: "20px",
|
|
3844
|
+
height: "20px",
|
|
3845
|
+
viewBox: "0 0 32 32"
|
|
3846
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
|
|
3847
|
+
stroke: "none",
|
|
3848
|
+
strokeWidth: "1",
|
|
3849
|
+
fill: "none",
|
|
3850
|
+
fillRule: "evenodd"
|
|
3851
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
|
|
3852
|
+
transform: "translate(-102.000000, -1037.000000)",
|
|
3853
|
+
fill: "#000000"
|
|
3854
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3855
|
+
d: "M124,1054 L119,1054 L119,1059 C119,1059.55 118.552,1060 118,1060 C117.448,1060 117,1059.55 117,1059 L117,1054 L112,1054 C111.448,1054 111,1053.55 111,1053 C111,1052.45 111.448,1052 112,1052 L117,1052 L117,1047 C117,1046.45 117.448,1046 118,1046 C118.552,1046 119,1046.45 119,1047 L119,1052 L124,1052 C124.552,1052 125,1052.45 125,1053 C125,1053.55 124.552,1054 124,1054 L124,1054 Z M130,1037 L106,1037 C103.791,1037 102,1038.79 102,1041 L102,1065 C102,1067.21 103.791,1069 106,1069 L130,1069 C132.209,1069 134,1067.21 134,1065 L134,1041 C134,1038.79 132.209,1037 130,1037 L130,1037 Z"
|
|
3856
|
+
}))))), cellAddBtnLabel || '');
|
|
3857
|
+
};
|
|
3195
3858
|
|
|
3196
3859
|
// click outside
|
|
3197
3860
|
funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_4___default()({
|
|
@@ -3204,24 +3867,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3204
3867
|
hideTableTooltip();
|
|
3205
3868
|
}
|
|
3206
3869
|
}, [isShowTableTooltip, tableGridRef]);
|
|
3207
|
-
var padZero = function padZero(num) {
|
|
3208
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3209
|
-
if (padZeroEnabled) {
|
|
3210
|
-
return num < 10 ? '0' + num : num.toString();
|
|
3211
|
-
} else {
|
|
3212
|
-
return num.toString();
|
|
3213
|
-
}
|
|
3214
|
-
};
|
|
3215
|
-
var isValidDate = function isValidDate(v) {
|
|
3216
|
-
return !(String(new window.Date(v)).toLowerCase() === 'invalid date');
|
|
3217
|
-
};
|
|
3218
|
-
var dateFormat = function dateFormat(v) {
|
|
3219
|
-
var date = typeof v === 'string' ? new window.Date(v.replace(/-/g, "/")) : v; // fix "Invalid date in safari"
|
|
3220
|
-
return date;
|
|
3221
|
-
};
|
|
3222
|
-
var getTodayDate = function getTodayDate() {
|
|
3223
|
-
return getCalendarDate(new Date());
|
|
3224
|
-
};
|
|
3225
3870
|
|
|
3226
3871
|
// cell
|
|
3227
3872
|
var getCells = function getCells() {
|
|
@@ -3300,6 +3945,37 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3300
3945
|
return [];
|
|
3301
3946
|
}
|
|
3302
3947
|
};
|
|
3948
|
+
var queryItemObj = function queryItemObj() {
|
|
3949
|
+
var curRowData = val[tableRowNum];
|
|
3950
|
+
if (curRowData) {
|
|
3951
|
+
var eventSourcesData = curRowData.eventSources;
|
|
3952
|
+
var _rowData = eventSourcesData.filter(function (item) {
|
|
3953
|
+
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(item.date) === (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day));
|
|
3954
|
+
});
|
|
3955
|
+
var _currentData = undefined;
|
|
3956
|
+
if (_rowData[0]) {
|
|
3957
|
+
var _items = _rowData[0].list;
|
|
3958
|
+
if (tableCellId === -1) {
|
|
3959
|
+
// add new
|
|
3960
|
+
_currentData = {
|
|
3961
|
+
rowData: curRowData.listSection,
|
|
3962
|
+
id: 0,
|
|
3963
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
3964
|
+
};
|
|
3965
|
+
} else {
|
|
3966
|
+
// edit or delete
|
|
3967
|
+
_currentData = _items.filter(function (item) {
|
|
3968
|
+
return item.id == tableCellId;
|
|
3969
|
+
})[0];
|
|
3970
|
+
}
|
|
3971
|
+
}
|
|
3972
|
+
return _rowData[0] ? _currentData : {
|
|
3973
|
+
rowData: curRowData.listSection,
|
|
3974
|
+
id: 0,
|
|
3975
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
3976
|
+
};
|
|
3977
|
+
}
|
|
3978
|
+
};
|
|
3303
3979
|
|
|
3304
3980
|
// ================================================================
|
|
3305
3981
|
// Table Grid drag & drop
|
|
@@ -3369,7 +4045,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3369
4045
|
}
|
|
3370
4046
|
|
|
3371
4047
|
// Determine whether it exceeds the far right or left side of the screen
|
|
3372
|
-
var _modalContent = _tableTooltipModalRef.querySelector('.e-cal-
|
|
4048
|
+
var _modalContent = _tableTooltipModalRef.querySelector('.e-cal-timeline-table__cell-tooltipcontent');
|
|
3373
4049
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
3374
4050
|
if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
|
|
3375
4051
|
// 10 pixels is used to account for some bias in mobile devices
|
|
@@ -3400,28 +4076,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3400
4076
|
// ================================================================
|
|
3401
4077
|
// Calendar
|
|
3402
4078
|
// ================================================================
|
|
3403
|
-
|
|
3404
|
-
function getCalendarDate(v) {
|
|
3405
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3406
|
-
if (typeof v === 'undefined') return '';
|
|
3407
|
-
|
|
3408
|
-
// yyyy-MM-dd
|
|
3409
|
-
var date = typeof v === 'string' ? new Date(v.replace(/-/g, "/")) : v; // fix "Invalid date in safari"
|
|
3410
|
-
var padZero = function padZero(num) {
|
|
3411
|
-
if (padZeroEnabled) {
|
|
3412
|
-
return num < 10 ? '0' + num : num.toString();
|
|
3413
|
-
} else {
|
|
3414
|
-
return num.toString();
|
|
3415
|
-
}
|
|
3416
|
-
};
|
|
3417
|
-
var year = date.getFullYear();
|
|
3418
|
-
var month = padZero(date.getMonth() + 1);
|
|
3419
|
-
var day = padZero(date.getDate());
|
|
3420
|
-
var hours = padZero(date.getHours());
|
|
3421
|
-
var minutes = padZero(date.getMinutes());
|
|
3422
|
-
var res = "".concat(year, "-").concat(month, "-").concat(day);
|
|
3423
|
-
return res;
|
|
3424
|
-
}
|
|
3425
4079
|
function setTodayDate(inputDate) {
|
|
3426
4080
|
setDay(inputDate.getDate());
|
|
3427
4081
|
setMonth(inputDate.getMonth());
|
|
@@ -3432,7 +4086,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3432
4086
|
setSelectedMonth(inputDate.getMonth());
|
|
3433
4087
|
setSelectedYear(inputDate.getFullYear());
|
|
3434
4088
|
|
|
3435
|
-
// table grid
|
|
4089
|
+
// initialize table grid
|
|
3436
4090
|
setTimeout(function () {
|
|
3437
4091
|
tableGridInit();
|
|
3438
4092
|
}, 500);
|
|
@@ -3455,8 +4109,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3455
4109
|
|
|
3456
4110
|
//
|
|
3457
4111
|
onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
|
|
3458
|
-
day: padZero(day),
|
|
3459
|
-
month: padZero(_date.getMonth() + 1),
|
|
4112
|
+
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(day),
|
|
4113
|
+
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(_date.getMonth() + 1),
|
|
3460
4114
|
year: _date.getFullYear().toString()
|
|
3461
4115
|
});
|
|
3462
4116
|
|
|
@@ -3475,8 +4129,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3475
4129
|
|
|
3476
4130
|
//
|
|
3477
4131
|
onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
|
|
3478
|
-
day: padZero(day),
|
|
3479
|
-
month: padZero(_date.getMonth() + 1),
|
|
4132
|
+
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(day),
|
|
4133
|
+
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(_date.getMonth() + 1),
|
|
3480
4134
|
year: _date.getFullYear().toString()
|
|
3481
4135
|
});
|
|
3482
4136
|
|
|
@@ -3509,8 +4163,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3509
4163
|
|
|
3510
4164
|
//
|
|
3511
4165
|
onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
|
|
3512
|
-
day: padZero(day),
|
|
3513
|
-
month: padZero(currentIndex + 1),
|
|
4166
|
+
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(day),
|
|
4167
|
+
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(currentIndex + 1),
|
|
3514
4168
|
year: year.toString()
|
|
3515
4169
|
});
|
|
3516
4170
|
|
|
@@ -3523,7 +4177,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3523
4177
|
setTodayDate(now);
|
|
3524
4178
|
|
|
3525
4179
|
//
|
|
3526
|
-
var _now = getTodayDate().split('-');
|
|
4180
|
+
var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getTodayDate)().split('-');
|
|
3527
4181
|
onChangeToday === null || onChangeToday === void 0 ? void 0 : onChangeToday({
|
|
3528
4182
|
day: _now[2],
|
|
3529
4183
|
month: _now[1],
|
|
@@ -3557,9 +4211,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3557
4211
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
3558
4212
|
role: "gridcell",
|
|
3559
4213
|
"data-resource-index": i,
|
|
3560
|
-
className: "e-cal-
|
|
4214
|
+
className: "e-cal-timeline-table__datagrid-cell"
|
|
3561
4215
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3562
|
-
className: "e-cal-
|
|
4216
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-title",
|
|
3563
4217
|
dangerouslySetInnerHTML: {
|
|
3564
4218
|
__html: item.listSection.title
|
|
3565
4219
|
}
|
|
@@ -3571,28 +4225,52 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3571
4225
|
var listSectionData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
3572
4226
|
var rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
3573
4227
|
var showEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
3574
|
-
|
|
3575
|
-
|
|
4228
|
+
// colIndex
|
|
4229
|
+
var colIndex = 0;
|
|
4230
|
+
return getCells().map(function (item, j) {
|
|
4231
|
+
var isFirstRow = j === 0;
|
|
4232
|
+
var isLastRow = j === getCells().length - 1;
|
|
3576
4233
|
|
|
3577
|
-
//
|
|
3578
|
-
var
|
|
3579
|
-
return getCells().map(function (item, j) {
|
|
3580
|
-
return item.col.map(function (dayIndex, i) {
|
|
3581
|
-
colIndex++;
|
|
3582
|
-
var d = typeof dayIndex === 'number' ? dayIndex - (startDay - 2) : 0;
|
|
3583
|
-
var _currentData = eventSourcesData.filter(function (item) {
|
|
3584
|
-
return getCalendarDate(item.date) === getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d));
|
|
3585
|
-
});
|
|
3586
|
-
var isLastCol = colIndex === 7 * getCells().length;
|
|
4234
|
+
// forward fill
|
|
4235
|
+
var __forwardFillNum = getForwardFill();
|
|
3587
4236
|
|
|
3588
|
-
|
|
3589
|
-
|
|
4237
|
+
// back fill
|
|
4238
|
+
var __backFillNum = getBackFill();
|
|
4239
|
+
return item.col.map(function (dayIndex, i) {
|
|
4240
|
+
colIndex++;
|
|
4241
|
+
var d = typeof dayIndex === 'number' ? dayIndex - (startDay - 2) : 0;
|
|
4242
|
+
var _currentData = eventSourcesData.filter(function (item) {
|
|
4243
|
+
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(item.date) === (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d));
|
|
4244
|
+
});
|
|
4245
|
+
var isLastCol = colIndex === 7 * getCells().length;
|
|
4246
|
+
|
|
4247
|
+
// date
|
|
4248
|
+
var _dateShow = d > 0 ? "".concat(year, "-").concat(month + 1, "-").concat(d) : '';
|
|
4249
|
+
|
|
4250
|
+
// forward & back
|
|
4251
|
+
if (isFirstRow && __forwardFillNum && _dateShow === '') {
|
|
4252
|
+
if (month + 1 === 1) {
|
|
4253
|
+
_dateShow = "".concat(year - 1, "-12-").concat(__forwardFillNum[i]);
|
|
4254
|
+
} else {
|
|
4255
|
+
_dateShow = "".concat(year, "-").concat(month, "-").concat(__forwardFillNum[i]);
|
|
4256
|
+
}
|
|
4257
|
+
}
|
|
4258
|
+
if (isLastRow && __backFillNum && _dateShow === '') {
|
|
4259
|
+
if (month + 1 === 12) {
|
|
4260
|
+
_dateShow = "".concat(year + 1, "-1-").concat(__backFillNum[i - item.col.filter(Boolean).length]);
|
|
4261
|
+
} else {
|
|
4262
|
+
_dateShow = "".concat(year, "-").concat(month + 2, "-").concat(__backFillNum[i - item.col.filter(Boolean).length]);
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
3590
4265
|
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
4266
|
+
// days
|
|
4267
|
+
//------
|
|
4268
|
+
if (!showEvents) {
|
|
4269
|
+
var _thContent = function _thContent() {
|
|
4270
|
+
var isForward = isFirstRow && __forwardFillNum && typeof __forwardFillNum[i] !== 'undefined';
|
|
4271
|
+
var isBack = isLastRow && __backFillNum && typeof __backFillNum[i - item.col.filter(Boolean).length] !== 'undefined';
|
|
4272
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
4273
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('e-cal-timeline-table__cell-cushion-headercontent__container', {
|
|
3596
4274
|
'empty': d <= 0,
|
|
3597
4275
|
'today': d === now.getDate(),
|
|
3598
4276
|
'selected': d === day,
|
|
@@ -3602,8 +4280,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3602
4280
|
"data-index": colIndex - 1,
|
|
3603
4281
|
"data-datagrid-col": colIndex - 1,
|
|
3604
4282
|
colSpan: 1,
|
|
3605
|
-
"data-date": getCalendarDate(_dateShow),
|
|
3606
|
-
"data-day": padZero(d),
|
|
4283
|
+
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(_dateShow),
|
|
4284
|
+
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d),
|
|
3607
4285
|
"data-week": i,
|
|
3608
4286
|
style: {
|
|
3609
4287
|
minWidth: CELL_MIN_W + 'px'
|
|
@@ -3611,31 +4289,40 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3611
4289
|
onClick: function onClick(e) {
|
|
3612
4290
|
// update row data
|
|
3613
4291
|
setTableRowNum(-1);
|
|
4292
|
+
|
|
4293
|
+
// update cell data
|
|
4294
|
+
setTableCellId(-1);
|
|
3614
4295
|
if (_currentData.length > 0) {
|
|
3615
4296
|
_currentData[0].rowData = listSectionData;
|
|
3616
4297
|
}
|
|
3617
4298
|
|
|
3618
4299
|
//
|
|
3619
4300
|
if (d > 0) {
|
|
3620
|
-
handleDayChange(e, d);
|
|
4301
|
+
handleDayChange(e, d); // update current day
|
|
4302
|
+
|
|
3621
4303
|
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, _currentData.length === 0 ? {
|
|
3622
4304
|
rowData: listSectionData,
|
|
3623
4305
|
id: 0,
|
|
3624
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
4306
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3625
4307
|
} : _currentData[0]);
|
|
3626
4308
|
if (EVENTS_ENABLED) {
|
|
3627
4309
|
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
|
|
3628
4310
|
rowData: listSectionData,
|
|
3629
4311
|
id: 0,
|
|
3630
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
4312
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3631
4313
|
} : _currentData[0], function () {
|
|
3632
4314
|
return setShowEdit(true);
|
|
3633
|
-
});
|
|
4315
|
+
}, 'normal');
|
|
3634
4316
|
}
|
|
3635
4317
|
}
|
|
3636
4318
|
}
|
|
3637
|
-
},
|
|
3638
|
-
className: "e-cal-
|
|
4319
|
+
}, !FILL_BLANK_DATE_DISABLD && isForward ? /*#__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", {
|
|
4320
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headercontent disabled",
|
|
4321
|
+
style: {
|
|
4322
|
+
width: CELL_MIN_W - 1 + 'px'
|
|
4323
|
+
}
|
|
4324
|
+
}, __forwardFillNum[i])) : null, d > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, FILL_BLANK_DATE_DISABLD ? /*#__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", {
|
|
4325
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headercontent",
|
|
3639
4326
|
style: {
|
|
3640
4327
|
width: CELL_MIN_W - 1 + 'px'
|
|
3641
4328
|
}
|
|
@@ -3643,359 +4330,236 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3643
4330
|
dangerouslySetInnerHTML: {
|
|
3644
4331
|
__html: WEEK[i]
|
|
3645
4332
|
}
|
|
3646
|
-
}) : null)) : null)
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
//------
|
|
3651
|
-
if (showEvents) {
|
|
3652
|
-
var _eventContentTooltip = _currentData.length > 0 ? typeof _currentData[0] !== 'undefined' ? typeof _currentData[0].dataTooltip === 'undefined' ? '' : /*#__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", {
|
|
3653
|
-
className: "e-cal-tl__day__event-tooltipcontent",
|
|
3654
|
-
dangerouslySetInnerHTML: {
|
|
3655
|
-
__html: _currentData[0].dataTooltip
|
|
4333
|
+
}) : 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", {
|
|
4334
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headercontent",
|
|
4335
|
+
style: {
|
|
4336
|
+
width: CELL_MIN_W - 1 + 'px'
|
|
3656
4337
|
}
|
|
3657
|
-
})) :
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
dangerouslySetInnerHTML: {
|
|
3662
|
-
__html: _currentData[0].data
|
|
4338
|
+
}, d))) : null, !FILL_BLANK_DATE_DISABLD && isBack ? /*#__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", {
|
|
4339
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headercontent disabled",
|
|
4340
|
+
style: {
|
|
4341
|
+
width: CELL_MIN_W - 1 + 'px'
|
|
3663
4342
|
}
|
|
3664
|
-
}
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
4343
|
+
}, __backFillNum[i - item.col.filter(Boolean).length])) : null);
|
|
4344
|
+
};
|
|
4345
|
+
if (!FILL_BLANK_DATE_DISABLD) {
|
|
4346
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, _thContent());
|
|
4347
|
+
} else {
|
|
4348
|
+
return d > 0 && d <= days[month] ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, _thContent()) : null;
|
|
4349
|
+
}
|
|
4350
|
+
}
|
|
4351
|
+
|
|
4352
|
+
// events
|
|
4353
|
+
//------
|
|
4354
|
+
if (showEvents) {
|
|
4355
|
+
var _eventContent = function _eventContent() {
|
|
4356
|
+
if (_currentData.length === 0 || !Array.isArray(_currentData) || typeof _currentData[0].list === 'undefined') {
|
|
4357
|
+
return null;
|
|
4358
|
+
}
|
|
4359
|
+
|
|
4360
|
+
//
|
|
4361
|
+
var _items = _currentData[0].list;
|
|
4362
|
+
return _items.map(function (cellItem, cellItemIndex) {
|
|
4363
|
+
var _eventContentTooltip = typeof cellItem.dataTooltip === 'undefined' ? '' : /*#__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", {
|
|
4364
|
+
className: "e-cal-timeline__day__event-tooltipcontent",
|
|
4365
|
+
dangerouslySetInnerHTML: {
|
|
4366
|
+
__html: cellItem.dataTooltip
|
|
3677
4367
|
}
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
return d > 0 && d <= days[month] ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
3696
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('e-cal-tl-table__cell-cushion-content__container e-cal-tl-table__cell-tooltiptrigger', {
|
|
3697
|
-
'has-event': eventSourcesData && _currentData.length > 0,
|
|
3698
|
-
'empty': d <= 0,
|
|
3699
|
-
'today': d === now.getDate(),
|
|
3700
|
-
'selected': d === day && tableRowNum === rowIndex,
|
|
3701
|
-
'last-cell': isLastCol
|
|
3702
|
-
}),
|
|
3703
|
-
key: "col" + i,
|
|
3704
|
-
"data-overlay-id": "e-cal-tl-table__cell-tooltipwrapper-".concat(idRes),
|
|
3705
|
-
"data-index": colIndex - 1,
|
|
3706
|
-
colSpan: 1,
|
|
3707
|
-
"data-date": getCalendarDate(_dateShow),
|
|
3708
|
-
"data-day": padZero(d),
|
|
3709
|
-
"data-week": i,
|
|
3710
|
-
"data-row": rowIndex,
|
|
3711
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
3712
|
-
onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
|
|
3713
|
-
if (_eventContentTooltip !== '') {
|
|
3714
|
-
if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
|
|
3715
|
-
if (_eventContent !== '') {
|
|
4368
|
+
}));
|
|
4369
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4370
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("e-cal-timeline-table__cell-cushion-content__item e-cal-timeline-table__cell-cushion-content__item-".concat(cellItemIndex), {
|
|
4371
|
+
'first': cellItemIndex === 0,
|
|
4372
|
+
'last': cellItemIndex === _items.length - 1
|
|
4373
|
+
}),
|
|
4374
|
+
key: "cell-item-".concat(rowIndex, "-").concat(cellItemIndex, "}"),
|
|
4375
|
+
"data-overlay-id": "e-cal-timeline-table__cell-tooltipwrapper-".concat(idRes),
|
|
4376
|
+
"data-cell-item-index": cellItemIndex,
|
|
4377
|
+
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(_dateShow),
|
|
4378
|
+
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d),
|
|
4379
|
+
"data-week": i,
|
|
4380
|
+
"data-row": rowIndex,
|
|
4381
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
4382
|
+
e.stopPropagation();
|
|
4383
|
+
if (_eventContentTooltip !== '') {
|
|
4384
|
+
if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
|
|
3716
4385
|
handleTableTooltipMouseEnter(e, _eventContentTooltip);
|
|
3717
4386
|
}
|
|
3718
4387
|
}
|
|
3719
|
-
}
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
|
|
3725
|
-
if (_eventContent !== '') {
|
|
4388
|
+
},
|
|
4389
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
4390
|
+
e.stopPropagation();
|
|
4391
|
+
if (_eventContentTooltip !== '') {
|
|
4392
|
+
if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
|
|
3726
4393
|
handleTableTooltipMouseLeave();
|
|
3727
4394
|
}
|
|
3728
4395
|
}
|
|
3729
|
-
}
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e);
|
|
3734
|
-
|
|
3735
|
-
// update row data
|
|
3736
|
-
setTableRowNum(rowIndex);
|
|
3737
|
-
if (_currentData.length > 0) {
|
|
3738
|
-
_currentData[0].rowData = listSectionData;
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
//
|
|
3742
|
-
if (d > 0) {
|
|
3743
|
-
handleDayChange(e, d);
|
|
3744
|
-
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, _currentData.length === 0 ? {
|
|
3745
|
-
rowData: listSectionData,
|
|
3746
|
-
id: 0,
|
|
3747
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3748
|
-
} : _currentData[0]);
|
|
3749
|
-
if (EVENTS_ENABLED) {
|
|
3750
|
-
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
|
|
3751
|
-
rowData: listSectionData,
|
|
3752
|
-
id: 0,
|
|
3753
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3754
|
-
} : _currentData[0], function () {
|
|
3755
|
-
return setShowEdit(true);
|
|
3756
|
-
});
|
|
3757
|
-
}
|
|
3758
|
-
}
|
|
3759
|
-
}
|
|
3760
|
-
}, d > 0 ? /*#__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", {
|
|
3761
|
-
className: "e-cal-tl-table__cell-cushion e-cal-tl-table__cell-cushion-content"
|
|
3762
|
-
}, _eventContent)) : null) : null;
|
|
3763
|
-
}
|
|
3764
|
-
});
|
|
3765
|
-
});
|
|
4396
|
+
},
|
|
4397
|
+
onClick: function onClick(e) {
|
|
4398
|
+
var _cellItem$callback;
|
|
4399
|
+
e.stopPropagation();
|
|
3766
4400
|
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
//#######################
|
|
4401
|
+
// update row data
|
|
4402
|
+
setTableRowNum(rowIndex);
|
|
3770
4403
|
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
var isFirstRow = j === 0;
|
|
3775
|
-
var isLastRow = j === getCells().length - 1;
|
|
4404
|
+
// update cell data
|
|
4405
|
+
setTableCellId(cellItem.id);
|
|
4406
|
+
cellItem.rowData = listSectionData;
|
|
3776
4407
|
|
|
3777
|
-
|
|
3778
|
-
|
|
4408
|
+
// Callback
|
|
4409
|
+
(_cellItem$callback = cellItem.callback) === null || _cellItem$callback === void 0 ? void 0 : _cellItem$callback.call(cellItem);
|
|
3779
4410
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
_colIndex++;
|
|
3784
|
-
var d = typeof dayIndex === 'number' ? dayIndex - (startDay - 2) : 0;
|
|
3785
|
-
var _currentData = eventSourcesData.filter(function (item) {
|
|
3786
|
-
return getCalendarDate(item.date) === getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d));
|
|
3787
|
-
});
|
|
3788
|
-
var isLastCol = _colIndex === 7 * getCells().length;
|
|
3789
|
-
|
|
3790
|
-
// date
|
|
3791
|
-
var _dateShow = d > 0 ? "".concat(year, "-").concat(month + 1, "-").concat(d) : '';
|
|
3792
|
-
if (isFirstRow && __forwardFillNum && _dateShow === '') {
|
|
3793
|
-
if (month + 1 === 1) {
|
|
3794
|
-
_dateShow = "".concat(year - 1, "-12-").concat(__forwardFillNum[i]);
|
|
3795
|
-
} else {
|
|
3796
|
-
_dateShow = "".concat(year, "-").concat(month, "-").concat(__forwardFillNum[i]);
|
|
3797
|
-
}
|
|
3798
|
-
}
|
|
3799
|
-
if (isLastRow && __backFillNum && _dateShow === '') {
|
|
3800
|
-
if (month + 1 === 12) {
|
|
3801
|
-
_dateShow = "".concat(year + 1, "-1-").concat(__backFillNum[i - item.col.filter(Boolean).length]);
|
|
3802
|
-
} else {
|
|
3803
|
-
_dateShow = "".concat(year, "-").concat(month + 2, "-").concat(__backFillNum[i - item.col.filter(Boolean).length]);
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
4411
|
+
//
|
|
4412
|
+
if (d > 0) {
|
|
4413
|
+
handleDayChange(e, d); // update current day
|
|
3806
4414
|
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
'selected': d === day,
|
|
3815
|
-
'last-cell': isLastCol
|
|
3816
|
-
}),
|
|
3817
|
-
key: "col" + i,
|
|
3818
|
-
"data-index": _colIndex - 1,
|
|
3819
|
-
"data-datagrid-col": _colIndex - 1,
|
|
3820
|
-
colSpan: 1,
|
|
3821
|
-
"data-date": getCalendarDate(_dateShow),
|
|
3822
|
-
"data-day": padZero(d),
|
|
3823
|
-
"data-week": i,
|
|
3824
|
-
style: {
|
|
3825
|
-
minWidth: CELL_MIN_W + 'px'
|
|
3826
|
-
},
|
|
3827
|
-
onClick: function onClick(e) {
|
|
3828
|
-
// update row data
|
|
3829
|
-
setTableRowNum(-1);
|
|
3830
|
-
if (_currentData.length > 0) {
|
|
3831
|
-
_currentData[0].rowData = listSectionData;
|
|
4415
|
+
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, cellItem);
|
|
4416
|
+
if (EVENTS_ENABLED) {
|
|
4417
|
+
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(cellItem, function () {
|
|
4418
|
+
return setShowEdit(true);
|
|
4419
|
+
}, 'normal');
|
|
4420
|
+
}
|
|
4421
|
+
}
|
|
3832
4422
|
}
|
|
4423
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4424
|
+
className: "e-cal-timeline__day__event",
|
|
4425
|
+
style: typeof cellItem !== 'undefined' && cellItem.eventStyles !== 'undefined' ? cellItem.eventStyles : {},
|
|
4426
|
+
dangerouslySetInnerHTML: {
|
|
4427
|
+
__html: cellItem.data
|
|
4428
|
+
}
|
|
4429
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4430
|
+
className: "e-cal-timeline__day__eventdel ".concat(cellCloseBtnClassName || '')
|
|
4431
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
4432
|
+
href: "#",
|
|
4433
|
+
tabIndex: -1,
|
|
4434
|
+
className: "align-middle",
|
|
4435
|
+
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(_dateShow),
|
|
4436
|
+
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d),
|
|
4437
|
+
"data-week": i,
|
|
4438
|
+
"data-row": rowIndex,
|
|
4439
|
+
onClick: function onClick(e) {
|
|
4440
|
+
e.preventDefault();
|
|
4441
|
+
e.stopPropagation();
|
|
4442
|
+
|
|
4443
|
+
// update row data
|
|
4444
|
+
setTableRowNum(rowIndex);
|
|
4445
|
+
|
|
4446
|
+
// update cell data
|
|
4447
|
+
setTableCellId(cellItem.id);
|
|
4448
|
+
var _existsContent = cellItem;
|
|
4449
|
+
if (typeof _existsContent !== 'undefined') {
|
|
4450
|
+
_existsContent.rowData = listSectionData;
|
|
4451
|
+
}
|
|
3833
4452
|
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
id: 0,
|
|
3840
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3841
|
-
} : _currentData[0]);
|
|
3842
|
-
if (EVENTS_ENABLED) {
|
|
3843
|
-
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
|
|
4453
|
+
//
|
|
4454
|
+
if (d > 0) {
|
|
4455
|
+
handleDayChange(e, d); // update current day
|
|
4456
|
+
|
|
4457
|
+
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, {
|
|
3844
4458
|
rowData: listSectionData,
|
|
3845
4459
|
id: 0,
|
|
3846
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3847
|
-
} : _currentData[0], function () {
|
|
3848
|
-
return setShowEdit(true);
|
|
4460
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3849
4461
|
});
|
|
4462
|
+
if (EVENTS_DELETE_ENABLED) {
|
|
4463
|
+
onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_existsContent, function () {
|
|
4464
|
+
return setShowDelete(true);
|
|
4465
|
+
});
|
|
4466
|
+
}
|
|
3850
4467
|
}
|
|
3851
4468
|
}
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
}, __forwardFillNum[i])) : null, d > 0 ? /*#__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", {
|
|
3859
|
-
className: "e-cal-tl-table__cell-cushion e-cal-tl-table__cell-cushion-headercontent",
|
|
3860
|
-
style: {
|
|
3861
|
-
width: CELL_MIN_W - 1 + 'px'
|
|
3862
|
-
}
|
|
3863
|
-
}, d)) : null, isLastRow && __backFillNum && typeof __backFillNum[i - item.col.filter(Boolean).length] !== 'undefined' ? /*#__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", {
|
|
3864
|
-
className: "e-cal-tl-table__cell-cushion e-cal-tl-table__cell-cushion-headercontent disabled",
|
|
3865
|
-
style: {
|
|
3866
|
-
width: CELL_MIN_W - 1 + 'px'
|
|
3867
|
-
}
|
|
3868
|
-
}, __backFillNum[i - item.col.filter(Boolean).length])) : null);
|
|
3869
|
-
}
|
|
3870
|
-
|
|
3871
|
-
// events
|
|
3872
|
-
//------
|
|
3873
|
-
if (showEvents) {
|
|
3874
|
-
var _eventContentTooltip = _currentData.length > 0 ? typeof _currentData[0] !== 'undefined' ? typeof _currentData[0].dataTooltip === 'undefined' ? '' : /*#__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", {
|
|
3875
|
-
className: "e-cal-tl__day__event-tooltipcontent",
|
|
3876
|
-
dangerouslySetInnerHTML: {
|
|
3877
|
-
__html: _currentData[0].dataTooltip
|
|
3878
|
-
}
|
|
3879
|
-
})) : '' : '';
|
|
3880
|
-
var _eventContent = _currentData.length > 0 ? /*#__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", {
|
|
3881
|
-
className: "e-cal-tl__day__event",
|
|
3882
|
-
style: typeof _currentData[0] !== 'undefined' && _currentData[0].eventStyles !== 'undefined' ? _currentData[0].eventStyles : {},
|
|
3883
|
-
dangerouslySetInnerHTML: {
|
|
3884
|
-
__html: _currentData[0].data
|
|
3885
|
-
}
|
|
3886
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3887
|
-
className: "e-cal-tl__day__eventdel ".concat(cellCloseBtnClassName || '')
|
|
3888
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3889
|
-
href: "#",
|
|
3890
|
-
tabIndex: -1,
|
|
3891
|
-
className: "align-middle",
|
|
3892
|
-
onClick: function onClick(e) {
|
|
3893
|
-
e.preventDefault();
|
|
3894
|
-
e.stopPropagation();
|
|
3895
|
-
setShowDelete(true);
|
|
3896
|
-
var _existsContent = _currentData[0];
|
|
3897
|
-
if (typeof _existsContent !== 'undefined') {
|
|
3898
|
-
_existsContent.rowData = listSectionData;
|
|
3899
|
-
}
|
|
3900
|
-
onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_currentData.length === 0 ? {
|
|
3901
|
-
rowData: listSectionData,
|
|
3902
|
-
id: 0,
|
|
3903
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3904
|
-
} : _existsContent);
|
|
3905
|
-
}
|
|
3906
|
-
}, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3907
|
-
width: "20px",
|
|
3908
|
-
height: "20px",
|
|
3909
|
-
viewBox: "0 0 24 24",
|
|
3910
|
-
fill: "none"
|
|
3911
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3912
|
-
fillRule: "evenodd",
|
|
3913
|
-
clipRule: "evenodd",
|
|
3914
|
-
d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z",
|
|
3915
|
-
fill: "#000"
|
|
3916
|
-
}))), cellCloseBtnLabel || ''))) : '';
|
|
4469
|
+
}, _delBtn())));
|
|
4470
|
+
});
|
|
4471
|
+
};
|
|
4472
|
+
var _tdContent = function _tdContent() {
|
|
4473
|
+
var isForward = isFirstRow && __forwardFillNum && typeof __forwardFillNum[i] !== 'undefined';
|
|
4474
|
+
var isBack = isLastRow && __backFillNum && typeof __backFillNum[i - item.col.filter(Boolean).length] !== 'undefined';
|
|
3917
4475
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
3918
|
-
className: (0,
|
|
3919
|
-
'has-event': _currentData.length > 0,
|
|
4476
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('e-cal-timeline-table__cell-cushion-content__container e-cal-timeline-table__cell-tooltiptrigger', {
|
|
4477
|
+
'has-event': eventSourcesData && _currentData.length > 0,
|
|
3920
4478
|
'empty': d <= 0,
|
|
3921
4479
|
'today': d === now.getDate(),
|
|
3922
4480
|
'selected': d === day && tableRowNum === rowIndex,
|
|
3923
4481
|
'last-cell': isLastCol
|
|
3924
4482
|
}),
|
|
3925
4483
|
key: "col" + i,
|
|
3926
|
-
"data-
|
|
3927
|
-
"data-index": _colIndex - 1,
|
|
4484
|
+
"data-index": colIndex - 1,
|
|
3928
4485
|
colSpan: 1,
|
|
3929
|
-
"data-date": getCalendarDate(_dateShow),
|
|
3930
|
-
"data-day": padZero(d),
|
|
4486
|
+
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(_dateShow),
|
|
4487
|
+
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d),
|
|
3931
4488
|
"data-week": i,
|
|
3932
4489
|
"data-row": rowIndex,
|
|
3933
4490
|
onMouseEnter: function onMouseEnter(e) {
|
|
3934
4491
|
onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
|
|
3935
|
-
if (_eventContentTooltip !== '') {
|
|
3936
|
-
if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
|
|
3937
|
-
if (_eventContent !== '') {
|
|
3938
|
-
handleTableTooltipMouseEnter(e, _eventContentTooltip);
|
|
3939
|
-
}
|
|
3940
|
-
}
|
|
3941
|
-
}
|
|
3942
4492
|
},
|
|
3943
4493
|
onMouseLeave: function onMouseLeave(e) {
|
|
3944
4494
|
onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
|
|
3945
|
-
if (_eventContentTooltip !== '') {
|
|
3946
|
-
if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
|
|
3947
|
-
if (_eventContent !== '') {
|
|
3948
|
-
handleTableTooltipMouseLeave();
|
|
3949
|
-
}
|
|
3950
|
-
}
|
|
3951
|
-
}
|
|
3952
4495
|
},
|
|
3953
4496
|
onClick: function onClick(e) {
|
|
3954
4497
|
//
|
|
3955
4498
|
onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e);
|
|
4499
|
+
if (d > 0) {
|
|
4500
|
+
handleDayChange(e, d); // update current day
|
|
4501
|
+
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, null);
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4504
|
+
}, !FILL_BLANK_DATE_DISABLD && isForward ? /*#__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", {
|
|
4505
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-content disabled"
|
|
4506
|
+
}, "\xA0")) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4507
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-content"
|
|
4508
|
+
}, _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", {
|
|
4509
|
+
className: "e-cal-timeline__day__eventadd ".concat(cellAddBtnClassName || '')
|
|
4510
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
4511
|
+
href: "#",
|
|
4512
|
+
tabIndex: -1,
|
|
4513
|
+
className: "align-middle",
|
|
4514
|
+
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(_dateShow),
|
|
4515
|
+
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d),
|
|
4516
|
+
"data-week": i,
|
|
4517
|
+
"data-row": rowIndex,
|
|
4518
|
+
onClick: function onClick(e) {
|
|
4519
|
+
e.preventDefault();
|
|
4520
|
+
e.stopPropagation();
|
|
3956
4521
|
|
|
3957
4522
|
// update row data
|
|
3958
4523
|
setTableRowNum(rowIndex);
|
|
3959
|
-
if (_currentData.length > 0) {
|
|
3960
|
-
_currentData[0].rowData = listSectionData;
|
|
3961
|
-
}
|
|
3962
4524
|
|
|
3963
|
-
//
|
|
4525
|
+
// update cell data
|
|
4526
|
+
setTableCellId(-1);
|
|
4527
|
+
|
|
4528
|
+
//
|
|
3964
4529
|
if (d > 0) {
|
|
3965
|
-
handleDayChange(e, d);
|
|
3966
|
-
|
|
4530
|
+
handleDayChange(e, d); // update current day
|
|
4531
|
+
|
|
4532
|
+
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, {
|
|
3967
4533
|
rowData: listSectionData,
|
|
3968
4534
|
id: 0,
|
|
3969
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3970
|
-
}
|
|
4535
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
4536
|
+
});
|
|
3971
4537
|
if (EVENTS_ENABLED) {
|
|
3972
|
-
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(
|
|
4538
|
+
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen({
|
|
3973
4539
|
rowData: listSectionData,
|
|
3974
4540
|
id: 0,
|
|
3975
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3976
|
-
}
|
|
4541
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
4542
|
+
}, function () {
|
|
3977
4543
|
return setShowEdit(true);
|
|
3978
|
-
});
|
|
4544
|
+
}, 'new');
|
|
3979
4545
|
}
|
|
3980
4546
|
}
|
|
3981
4547
|
}
|
|
3982
|
-
},
|
|
3983
|
-
className: "e-cal-
|
|
3984
|
-
}, "\xA0")) : null, d > 0 ? /*#__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", {
|
|
3985
|
-
className: "e-cal-tl-table__cell-cushion e-cal-tl-table__cell-cushion-content"
|
|
3986
|
-
}, _eventContent)) : null, isLastRow && __backFillNum && typeof __backFillNum[i - item.col.filter(Boolean).length] !== 'undefined' ? /*#__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", {
|
|
3987
|
-
className: "e-cal-tl-table__cell-cushion e-cal-tl-table__cell-cushion-content disabled"
|
|
4548
|
+
}, _addBtn())))), !FILL_BLANK_DATE_DISABLD && isBack ? /*#__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", {
|
|
4549
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-content disabled"
|
|
3988
4550
|
}, "\xA0")) : null);
|
|
4551
|
+
};
|
|
4552
|
+
if (!FILL_BLANK_DATE_DISABLD) {
|
|
4553
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, _tdContent());
|
|
4554
|
+
} else {
|
|
4555
|
+
return d > 0 && d <= days[month] ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, _tdContent()) : null;
|
|
3989
4556
|
}
|
|
3990
|
-
}
|
|
4557
|
+
}
|
|
3991
4558
|
});
|
|
3992
|
-
|
|
3993
|
-
//#######################
|
|
3994
|
-
}
|
|
4559
|
+
});
|
|
3995
4560
|
}
|
|
3996
|
-
|
|
3997
4561
|
function generateColUi() {
|
|
3998
|
-
if (
|
|
4562
|
+
if (FILL_BLANK_DATE_DISABLD) {
|
|
3999
4563
|
//#######################
|
|
4000
4564
|
return Array.from({
|
|
4001
4565
|
length: days[month]
|
|
@@ -4059,6 +4623,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4059
4623
|
if (scrollBodyRef.current) scrollBodyRef.current.scrollLeft = 0;
|
|
4060
4624
|
}
|
|
4061
4625
|
function tableGridInit() {
|
|
4626
|
+
var scrollBarInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4062
4627
|
//
|
|
4063
4628
|
if (tableGridRef.current === null) return;
|
|
4064
4629
|
var tableGridEl = tableGridRef.current;
|
|
@@ -4069,7 +4634,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4069
4634
|
// calculate min width
|
|
4070
4635
|
//--------------
|
|
4071
4636
|
var cellMinWidth = CELL_MIN_W;
|
|
4072
|
-
var colCount =
|
|
4637
|
+
var colCount = FILL_BLANK_DATE_DISABLD ? days[month] : 7 * getCells().length;
|
|
4073
4638
|
var scrollableMinWidth = cellMinWidth * colCount;
|
|
4074
4639
|
|
|
4075
4640
|
//****************
|
|
@@ -4077,34 +4642,37 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4077
4642
|
//****************
|
|
4078
4643
|
// initialize scrollable wrapper (width)
|
|
4079
4644
|
//--------------
|
|
4080
|
-
var _scrollableWrapper =
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
var
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4645
|
+
var _scrollableWrapper = [];
|
|
4646
|
+
if (scrollBarInit) {
|
|
4647
|
+
_scrollableWrapper = tableGridEl.querySelectorAll('.e-cal-timeline-table__scroller-harness');
|
|
4648
|
+
[].slice.call(_scrollableWrapper).forEach(function (el) {
|
|
4649
|
+
var scrollType = el.dataset.scroll;
|
|
4650
|
+
if (scrollType !== 'list') {
|
|
4651
|
+
var _content = el.querySelector('.e-cal-timeline-table__scroller');
|
|
4652
|
+
var tableMaxWidth = tableGridEl.clientWidth;
|
|
4653
|
+
var tableHeaderTitleWidth = tableGridEl.querySelector('.e-cal-timeline-table__cell-cushion-headertitle').clientWidth;
|
|
4654
|
+
var tableDividerWidth = tableGridEl.querySelector('.e-cal-timeline-table__timeline-divider').clientWidth;
|
|
4655
|
+
var tableBorderWidth = 4;
|
|
4656
|
+
var scrollMaxWidth = tableMaxWidth - tableHeaderTitleWidth - tableDividerWidth - tableBorderWidth;
|
|
4657
|
+
el.dataset.width = scrollMaxWidth;
|
|
4658
|
+
el.style.maxWidth = el.dataset.width + 'px';
|
|
4659
|
+
_content.style.minWidth = scrollableMinWidth + 'px';
|
|
4660
|
+
}
|
|
4661
|
+
});
|
|
4662
|
+
}
|
|
4095
4663
|
|
|
4096
4664
|
//****************
|
|
4097
4665
|
// STEP 3:
|
|
4098
4666
|
//****************
|
|
4099
4667
|
// initialize cell width
|
|
4100
4668
|
//--------------
|
|
4101
|
-
var headerThElements = tableGridEl.querySelector('.e-cal-
|
|
4102
|
-
var colElements = tableGridEl.querySelector('.e-cal-
|
|
4103
|
-
var tdElements = tableGridEl.querySelector('.e-cal-
|
|
4104
|
-
var tdElementMaxWidth = typeof tdElements[0] === 'undefined' ? 0 : parseFloat(window.getComputedStyle(tdElements[0].querySelector('.e-cal-
|
|
4669
|
+
var headerThElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-header__content tbody').getElementsByTagName('th');
|
|
4670
|
+
var colElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content colgroup').getElementsByTagName('col');
|
|
4671
|
+
var tdElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content tbody').getElementsByTagName('td');
|
|
4672
|
+
var tdElementMaxWidth = typeof tdElements[0] === 'undefined' ? 0 : parseFloat(window.getComputedStyle(tdElements[0].querySelector('.e-cal-timeline-table__cell-cushion-content')).maxWidth);
|
|
4105
4673
|
if (Array.isArray(eventsValue) && eventsValue.length > 0) {
|
|
4106
4674
|
for (var i = 0; i < headerThElements.length; i++) {
|
|
4107
|
-
var curHeaderThElementMaxWidth = parseFloat(window.getComputedStyle(headerThElements[i].querySelector('.e-cal-
|
|
4675
|
+
var curHeaderThElementMaxWidth = parseFloat(window.getComputedStyle(headerThElements[i].querySelector('.e-cal-timeline-table__cell-cushion-headercontent')).width);
|
|
4108
4676
|
var targetElement = headerThElements[i].offsetWidth > tdElements[i].offsetWidth ? headerThElements[i] : tdElements[i];
|
|
4109
4677
|
var tdOwidth = parseFloat(window.getComputedStyle(targetElement).width);
|
|
4110
4678
|
|
|
@@ -4120,8 +4688,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4120
4688
|
|
|
4121
4689
|
// Prevent the width from being +1 each time it is initialized
|
|
4122
4690
|
tdOwidth = tdOwidth - 1;
|
|
4123
|
-
headerThElements[i].querySelector('.e-cal-
|
|
4124
|
-
tdElements[i].querySelector('.e-cal-
|
|
4691
|
+
headerThElements[i].querySelector('.e-cal-timeline-table__cell-cushion-headercontent').style.width = tdOwidth + 'px';
|
|
4692
|
+
tdElements[i].querySelector('.e-cal-timeline-table__cell-cushion-content').style.minWidth = tdOwidth + 'px';
|
|
4125
4693
|
colElements[i].style.minWidth = tdOwidth + 'px';
|
|
4126
4694
|
}
|
|
4127
4695
|
}
|
|
@@ -4132,7 +4700,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4132
4700
|
// initialize max width of table content
|
|
4133
4701
|
//--------------
|
|
4134
4702
|
if (scrollBodyRef.current !== null && scrollHeaderRef.current !== null) {
|
|
4135
|
-
var tableContentWidth = window.getComputedStyle(tableGridEl.querySelector('.e-cal-
|
|
4703
|
+
var tableContentWidth = window.getComputedStyle(tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content')).width;
|
|
4136
4704
|
var scrollBodyEl = scrollBodyRef.current;
|
|
4137
4705
|
var scrollHeaderEl = scrollHeaderRef.current;
|
|
4138
4706
|
scrollBodyEl.style.width = tableContentWidth;
|
|
@@ -4143,7 +4711,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4143
4711
|
//
|
|
4144
4712
|
var tableWrapperMaxWidthLatest = tableGridEl.clientWidth;
|
|
4145
4713
|
if (tableWrapperMaxWidthLatest > parseFloat(tableContentWidth)) {
|
|
4146
|
-
tableGridEl.querySelector('.e-cal-
|
|
4714
|
+
tableGridEl.querySelector('.e-cal-timeline-table__timeline-table').style.width = tableContentWidth;
|
|
4147
4715
|
}
|
|
4148
4716
|
}
|
|
4149
4717
|
|
|
@@ -4152,8 +4720,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4152
4720
|
//****************
|
|
4153
4721
|
// initialize cell height
|
|
4154
4722
|
//--------------
|
|
4155
|
-
var headerTitleTrElements = tableGridEl.querySelector('.e-cal-
|
|
4156
|
-
var trElements = tableGridEl.querySelector('.e-cal-
|
|
4723
|
+
var headerTitleTrElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__title tbody').getElementsByTagName('tr');
|
|
4724
|
+
var trElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content tbody').getElementsByTagName('tr');
|
|
4157
4725
|
for (var _i2 = 0; _i2 < headerTitleTrElements.length; _i2++) {
|
|
4158
4726
|
var _targetElement = headerTitleTrElements[_i2].offsetHeight > trElements[_i2].offsetHeight ? headerTitleTrElements[_i2] : trElements[_i2];
|
|
4159
4727
|
var tdOHeight = window.getComputedStyle(_targetElement).height;
|
|
@@ -4166,16 +4734,18 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4166
4734
|
//****************
|
|
4167
4735
|
//initialize scrollable wrapper (height)
|
|
4168
4736
|
//--------------
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4737
|
+
if (scrollBarInit) {
|
|
4738
|
+
[].slice.call(_scrollableWrapper).forEach(function (el) {
|
|
4739
|
+
var scrollType = el.dataset.scroll;
|
|
4740
|
+
var oldHeight = el.clientHeight;
|
|
4741
|
+
if (scrollType !== 'header') {
|
|
4742
|
+
var tableWrapperMaxHeight = window.getComputedStyle(tableGridEl).height;
|
|
4743
|
+
if (oldHeight > parseFloat(tableWrapperMaxHeight)) {
|
|
4744
|
+
el.style.height = tableWrapperMaxHeight;
|
|
4745
|
+
}
|
|
4176
4746
|
}
|
|
4177
|
-
}
|
|
4178
|
-
}
|
|
4747
|
+
});
|
|
4748
|
+
}
|
|
4179
4749
|
|
|
4180
4750
|
//****************
|
|
4181
4751
|
// STEP 7:
|
|
@@ -4185,18 +4755,30 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4185
4755
|
tableGridEl.classList.remove('invisible');
|
|
4186
4756
|
}
|
|
4187
4757
|
function tableGridReset() {
|
|
4758
|
+
var scrollBarInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4188
4759
|
if (tableGridRef.current === null) return;
|
|
4189
4760
|
var tableGridEl = tableGridRef.current;
|
|
4190
4761
|
|
|
4191
4762
|
// initialize scrollable wrapper (width & height)
|
|
4192
4763
|
//--------------
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4764
|
+
if (scrollBarInit) {
|
|
4765
|
+
var _scrollableWrapper = tableGridEl.querySelectorAll('.e-cal-timeline-table__scroller-harness');
|
|
4766
|
+
[].slice.call(_scrollableWrapper).forEach(function (el) {
|
|
4767
|
+
var _content = el.querySelector('.e-cal-timeline-table__scroller');
|
|
4768
|
+
el.removeAttribute('data-width');
|
|
4769
|
+
el.removeAttribute('style');
|
|
4770
|
+
_content.removeAttribute('style');
|
|
4771
|
+
});
|
|
4772
|
+
}
|
|
4773
|
+
|
|
4774
|
+
// initialize cell height
|
|
4775
|
+
//--------------
|
|
4776
|
+
var headerTitleTrElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__title tbody').getElementsByTagName('tr');
|
|
4777
|
+
var trElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content tbody').getElementsByTagName('tr');
|
|
4778
|
+
for (var i = 0; i < headerTitleTrElements.length; i++) {
|
|
4779
|
+
headerTitleTrElements[i].removeAttribute('style');
|
|
4780
|
+
trElements[i].removeAttribute('style');
|
|
4781
|
+
}
|
|
4200
4782
|
}
|
|
4201
4783
|
|
|
4202
4784
|
// ================================================================
|
|
@@ -4216,8 +4798,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4216
4798
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
4217
4799
|
// Guaranteed year change triggered by the front and rear buttons
|
|
4218
4800
|
onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
|
|
4219
|
-
day: padZero(day),
|
|
4220
|
-
month: padZero(month + 1),
|
|
4801
|
+
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(day),
|
|
4802
|
+
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(month + 1),
|
|
4221
4803
|
year: year.toString()
|
|
4222
4804
|
});
|
|
4223
4805
|
}, [year]);
|
|
@@ -4226,7 +4808,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4226
4808
|
if (Array.isArray(eventsValue)) setVal(eventsValue);
|
|
4227
4809
|
|
|
4228
4810
|
// update current today
|
|
4229
|
-
if (typeof customTodayDate !== 'undefined' && isValidDate(customTodayDate)) {
|
|
4811
|
+
if (typeof customTodayDate !== 'undefined' && (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.isValidDate)(customTodayDate)) {
|
|
4230
4812
|
var _customNow = new Date(customTodayDate);
|
|
4231
4813
|
setTodayDate(_customNow);
|
|
4232
4814
|
}
|
|
@@ -4234,18 +4816,18 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4234
4816
|
// Call a function when the list has been rendered completely
|
|
4235
4817
|
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
4236
4818
|
return function () {
|
|
4237
|
-
// table grid
|
|
4819
|
+
// reset table grid
|
|
4238
4820
|
tableGridReset();
|
|
4239
4821
|
};
|
|
4240
4822
|
}, [eventsValue, customTodayDate]);
|
|
4241
4823
|
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", {
|
|
4242
|
-
className: (0,
|
|
4824
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("e-cal-timeline__wrapper", calendarWrapperClassName)
|
|
4243
4825
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4244
|
-
className: "e-cal-
|
|
4826
|
+
className: "e-cal-timeline__header bg-body-tertiary"
|
|
4245
4827
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
4246
4828
|
tabIndex: -1,
|
|
4247
4829
|
type: "button",
|
|
4248
|
-
className: "e-cal-
|
|
4830
|
+
className: "e-cal-timeline__btn e-cal-timeline__btn--prev",
|
|
4249
4831
|
onClick: handlePrevChange
|
|
4250
4832
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
4251
4833
|
width: "20px",
|
|
@@ -4256,11 +4838,11 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4256
4838
|
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",
|
|
4257
4839
|
fill: "#000"
|
|
4258
4840
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4259
|
-
className: "e-cal-
|
|
4841
|
+
className: "e-cal-timeline__header__btns"
|
|
4260
4842
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
4261
4843
|
tabIndex: -1,
|
|
4262
4844
|
type: "button",
|
|
4263
|
-
className: "e-cal-
|
|
4845
|
+
className: "e-cal-timeline__btn ".concat(winMonth ? 'active' : ''),
|
|
4264
4846
|
onClick: handleShowWinMonth
|
|
4265
4847
|
}, MONTHS[month], /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
4266
4848
|
width: "12px",
|
|
@@ -4272,7 +4854,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4272
4854
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
4273
4855
|
tabIndex: -1,
|
|
4274
4856
|
type: "button",
|
|
4275
|
-
className: "e-cal-
|
|
4857
|
+
className: "e-cal-timeline__btn ".concat(winYear ? 'active' : ''),
|
|
4276
4858
|
onClick: handleShowWinYear
|
|
4277
4859
|
}, year, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
4278
4860
|
width: "12px",
|
|
@@ -4284,7 +4866,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4284
4866
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
4285
4867
|
tabIndex: -1,
|
|
4286
4868
|
type: "button",
|
|
4287
|
-
className: "e-cal-
|
|
4869
|
+
className: "e-cal-timeline__btn e-cal-timeline__btn--next",
|
|
4288
4870
|
onClick: handleNextChange
|
|
4289
4871
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
4290
4872
|
width: "20px",
|
|
@@ -4295,52 +4877,52 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4295
4877
|
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",
|
|
4296
4878
|
fill: "#000"
|
|
4297
4879
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4298
|
-
className: "e-cal-
|
|
4880
|
+
className: "e-cal-timeline__body"
|
|
4299
4881
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4300
|
-
className: "e-cal-
|
|
4882
|
+
className: "e-cal-timeline__row"
|
|
4301
4883
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4302
|
-
className: "e-cal-
|
|
4884
|
+
className: "e-cal-timeline__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winMonth ? 'active' : '')
|
|
4303
4885
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4304
|
-
className: "e-cal-
|
|
4886
|
+
className: "e-cal-timeline__month-container"
|
|
4305
4887
|
}, MONTHS_FULL.map(function (month, index) {
|
|
4306
4888
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4307
|
-
"data-month": padZero(index + 1),
|
|
4308
|
-
className: "e-cal-
|
|
4889
|
+
"data-month": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(index + 1),
|
|
4890
|
+
className: "e-cal-timeline__month ".concat(selectedMonth === index ? ' selected' : ''),
|
|
4309
4891
|
key: month + index,
|
|
4310
4892
|
onClick: function onClick() {
|
|
4311
4893
|
handleMonthChange(index);
|
|
4312
4894
|
}
|
|
4313
4895
|
}, month);
|
|
4314
4896
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4315
|
-
className: "e-cal-
|
|
4897
|
+
className: "e-cal-timeline__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winYear ? 'active' : '')
|
|
4316
4898
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4317
|
-
className: "e-cal-
|
|
4899
|
+
className: "e-cal-timeline__year-container bg-body-tertiary"
|
|
4318
4900
|
}, yearsArray.map(function (year, index) {
|
|
4319
4901
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4320
4902
|
"data-year": year,
|
|
4321
|
-
className: "e-cal-
|
|
4903
|
+
className: "e-cal-timeline__year ".concat(selectedYear === year ? ' selected' : ''),
|
|
4322
4904
|
key: year + index,
|
|
4323
4905
|
onClick: function onClick() {
|
|
4324
4906
|
handleYearChange(year);
|
|
4325
4907
|
}
|
|
4326
4908
|
}, year);
|
|
4327
4909
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4328
|
-
className: "e-cal-
|
|
4910
|
+
className: "e-cal-timeline__today-wrapper p-2"
|
|
4329
4911
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
4330
4912
|
tabIndex: -1,
|
|
4331
4913
|
type: "button",
|
|
4332
|
-
className: "e-cal-
|
|
4914
|
+
className: "e-cal-timeline__btn e-cal-timeline__btn--today",
|
|
4333
4915
|
onClick: handleTodayChange
|
|
4334
4916
|
}, langToday || 'Today'))), val.length === 0 ? 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", {
|
|
4335
4917
|
ref: tableGridRef,
|
|
4336
|
-
className: (0,
|
|
4918
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("e-cal-timeline-table__timeline-table__wrapper invisible", tableWrapperClassName)
|
|
4337
4919
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
4338
4920
|
role: "grid",
|
|
4339
|
-
className: (0,
|
|
4921
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("e-cal-timeline-table__timeline-table", tableClassName)
|
|
4340
4922
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", {
|
|
4341
|
-
className: "e-cal-
|
|
4923
|
+
className: "e-cal-timeline-table__datagrid-header"
|
|
4342
4924
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("thead", {
|
|
4343
|
-
className: (0,
|
|
4925
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableHeadClassName),
|
|
4344
4926
|
ref: tableGridHeaderRef,
|
|
4345
4927
|
role: "rowgroup"
|
|
4346
4928
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
@@ -4348,10 +4930,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4348
4930
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
4349
4931
|
role: "presentation"
|
|
4350
4932
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4351
|
-
className: "e-cal-
|
|
4933
|
+
className: "e-cal-timeline-table__timeline-header e-cal-timeline-table__timeline-headertitle"
|
|
4352
4934
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
4353
4935
|
role: "presentation",
|
|
4354
|
-
className: "e-cal-
|
|
4936
|
+
className: "e-cal-timeline-table__datagrid-header__title"
|
|
4355
4937
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("thead", {
|
|
4356
4938
|
role: "presentation"
|
|
4357
4939
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
@@ -4359,53 +4941,57 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4359
4941
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
4360
4942
|
role: "columnheader"
|
|
4361
4943
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4362
|
-
className: "e-cal-
|
|
4363
|
-
}, tableListSectionTitle || ''))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
4944
|
+
className: "e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headertitle"
|
|
4945
|
+
}, tableListSectionTitle || ''))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
4364
4946
|
role: "presentation",
|
|
4365
|
-
className: "e-cal-
|
|
4947
|
+
className: "e-cal-timeline-table__timeline-divider"
|
|
4366
4948
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
4367
4949
|
role: "presentation"
|
|
4368
4950
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4369
4951
|
ref: scrollHeaderRef,
|
|
4370
|
-
className: "e-cal-
|
|
4952
|
+
className: "e-cal-timeline-table__scroller-harness e-cal-timeline-table__scroller-harness--hide",
|
|
4371
4953
|
"data-scroll": "header",
|
|
4372
4954
|
onScroll: syncTableScrollHeader
|
|
4373
4955
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4374
|
-
className: "e-cal-
|
|
4956
|
+
className: "e-cal-timeline-table__scroller"
|
|
4375
4957
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4376
|
-
className: "e-cal-
|
|
4958
|
+
className: "e-cal-timeline-table__timeline-header"
|
|
4377
4959
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
4378
|
-
className: "e-cal-
|
|
4960
|
+
className: "e-cal-timeline-table__datagrid-header__content e-cal-timeline-table__scrollgrid-sync-table"
|
|
4379
4961
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", null, generateDaysUi()))))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", {
|
|
4380
|
-
className: (0,
|
|
4962
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableBodyClassName),
|
|
4381
4963
|
role: "rowgroup"
|
|
4382
4964
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
4383
4965
|
role: "presentation",
|
|
4384
|
-
className: "e-cal-
|
|
4966
|
+
className: "e-cal-timeline-table__list-section"
|
|
4385
4967
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
4386
4968
|
role: "presentation",
|
|
4387
|
-
className: (0,
|
|
4969
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableListStartClassName)
|
|
4388
4970
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4389
4971
|
ref: scrollListRef,
|
|
4390
|
-
className:
|
|
4972
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('e-cal-timeline-table__scroller-harness', {
|
|
4973
|
+
'autoscroll': AUTO_SCROLL
|
|
4974
|
+
}),
|
|
4391
4975
|
"data-scroll": "list",
|
|
4392
4976
|
onScroll: syncTableScrollList
|
|
4393
4977
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4394
|
-
className: "e-cal-
|
|
4978
|
+
className: "e-cal-timeline-table__scroller"
|
|
4395
4979
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
4396
4980
|
role: "presentation",
|
|
4397
|
-
className: "e-cal-
|
|
4981
|
+
className: "e-cal-timeline-table__datagrid-body__title e-cal-timeline-table__scrollgrid-sync-table"
|
|
4398
4982
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", {
|
|
4399
4983
|
role: "presentation"
|
|
4400
4984
|
}, generateListSectionUi()))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
4401
4985
|
role: "presentation",
|
|
4402
|
-
className: (0,
|
|
4986
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('e-cal-timeline-table__timeline-divider', tableListDividerClassName)
|
|
4403
4987
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
4404
4988
|
role: "presentation",
|
|
4405
|
-
className: (0,
|
|
4989
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableListEndClassName)
|
|
4406
4990
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4407
4991
|
ref: scrollBodyRef,
|
|
4408
|
-
className:
|
|
4992
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('e-cal-timeline-table__scroller-harness', {
|
|
4993
|
+
'autoscroll': AUTO_SCROLL
|
|
4994
|
+
}),
|
|
4409
4995
|
"data-scroll": "body",
|
|
4410
4996
|
onScroll: syncTableScrollBody,
|
|
4411
4997
|
onMouseMove: BODY_DRAG ? handleTableMove : function () {},
|
|
@@ -4413,11 +4999,11 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4413
4999
|
onMouseUp: BODY_DRAG ? handleTableDragEnd : function () {},
|
|
4414
5000
|
onMouseLeave: BODY_DRAG ? handleTableDragEnd : function () {}
|
|
4415
5001
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4416
|
-
className: "e-cal-
|
|
5002
|
+
className: "e-cal-timeline-table__scroller"
|
|
4417
5003
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4418
|
-
className: "e-cal-
|
|
5004
|
+
className: "e-cal-timeline-table__timeline-body"
|
|
4419
5005
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
4420
|
-
className: "e-cal-
|
|
5006
|
+
className: "e-cal-timeline-table__datagrid-body__content e-cal-timeline-table__scrollgrid-sync-table"
|
|
4421
5007
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, generateColUi()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null, val.map(function (item, i) {
|
|
4422
5008
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
4423
5009
|
key: i
|
|
@@ -4434,29 +5020,22 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4434
5020
|
onClose: function onClose(e) {
|
|
4435
5021
|
setTimeout(function () {
|
|
4436
5022
|
setShowDelete(false);
|
|
4437
|
-
|
|
4438
|
-
return getCalendarDate(item.date) === getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(day));
|
|
4439
|
-
});
|
|
4440
|
-
onModalDeleteClose === null || onModalDeleteClose === void 0 ? void 0 : onModalDeleteClose(_currentData.length === 0 ? {
|
|
4441
|
-
id: 0,
|
|
4442
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
4443
|
-
} : _currentData[0]);
|
|
5023
|
+
onModalDeleteClose === null || onModalDeleteClose === void 0 ? void 0 : onModalDeleteClose(queryItemObj());
|
|
4444
5024
|
}, 350);
|
|
4445
5025
|
},
|
|
4446
5026
|
onSubmit: /*#__PURE__*/function () {
|
|
4447
5027
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, closewin, data) {
|
|
4448
|
-
var _currentData;
|
|
4449
5028
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4450
5029
|
while (1) switch (_context.prev = _context.next) {
|
|
4451
5030
|
case 0:
|
|
4452
|
-
|
|
4453
|
-
|
|
5031
|
+
onModalDeleteEvent === null || onModalDeleteEvent === void 0 ? void 0 : onModalDeleteEvent(queryItemObj(), closewin, function () {
|
|
5032
|
+
// initialize table grid
|
|
5033
|
+
setTimeout(function () {
|
|
5034
|
+
tableGridReset(false);
|
|
5035
|
+
tableGridInit(false);
|
|
5036
|
+
}, 500);
|
|
4454
5037
|
});
|
|
4455
|
-
|
|
4456
|
-
id: 0,
|
|
4457
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
4458
|
-
} : _currentData[0], closewin);
|
|
4459
|
-
case 2:
|
|
5038
|
+
case 1:
|
|
4460
5039
|
case "end":
|
|
4461
5040
|
return _context.stop();
|
|
4462
5041
|
}
|
|
@@ -4481,29 +5060,22 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4481
5060
|
onClose: function onClose(e) {
|
|
4482
5061
|
setTimeout(function () {
|
|
4483
5062
|
setShowEdit(false);
|
|
4484
|
-
|
|
4485
|
-
return getCalendarDate(item.date) === getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(day));
|
|
4486
|
-
});
|
|
4487
|
-
onModalEditClose === null || onModalEditClose === void 0 ? void 0 : onModalEditClose(_currentData.length === 0 ? {
|
|
4488
|
-
id: 0,
|
|
4489
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
4490
|
-
} : _currentData[0]);
|
|
5063
|
+
onModalEditClose === null || onModalEditClose === void 0 ? void 0 : onModalEditClose(queryItemObj());
|
|
4491
5064
|
}, 350);
|
|
4492
5065
|
},
|
|
4493
5066
|
onSubmit: /*#__PURE__*/function () {
|
|
4494
5067
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, closewin, data) {
|
|
4495
|
-
var _currentData;
|
|
4496
5068
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
4497
5069
|
while (1) switch (_context2.prev = _context2.next) {
|
|
4498
5070
|
case 0:
|
|
4499
|
-
|
|
4500
|
-
|
|
5071
|
+
onModalEditEvent === null || onModalEditEvent === void 0 ? void 0 : onModalEditEvent(queryItemObj(), closewin, function () {
|
|
5072
|
+
// initialize table grid
|
|
5073
|
+
setTimeout(function () {
|
|
5074
|
+
tableGridReset(false);
|
|
5075
|
+
tableGridInit(false);
|
|
5076
|
+
}, 500);
|
|
4501
5077
|
});
|
|
4502
|
-
|
|
4503
|
-
id: 0,
|
|
4504
|
-
date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
4505
|
-
} : _currentData[0], closewin);
|
|
4506
|
-
case 2:
|
|
5078
|
+
case 1:
|
|
4507
5079
|
case "end":
|
|
4508
5080
|
return _context2.stop();
|
|
4509
5081
|
}
|
|
@@ -4518,8 +5090,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4518
5090
|
containerClassName: "EventCalendarTimeline-TooltipModal"
|
|
4519
5091
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4520
5092
|
ref: tableTooltipModalRef,
|
|
4521
|
-
id: "e-cal-
|
|
4522
|
-
className: "e-cal-
|
|
5093
|
+
id: "e-cal-timeline-table__cell-tooltipwrapper-".concat(idRes),
|
|
5094
|
+
className: "e-cal-timeline-table__cell-tooltipwrapper d-inline-block ".concat(isShowTableTooltip ? 'active' : ''),
|
|
4523
5095
|
role: "tooltip",
|
|
4524
5096
|
"data-microtip-position": tableTooltipDirection || 'bottom',
|
|
4525
5097
|
"data-microtip-size": tableTooltipSize || 'auto',
|
|
@@ -4527,7 +5099,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4527
5099
|
display: 'none'
|
|
4528
5100
|
}
|
|
4529
5101
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4530
|
-
className: "e-cal-
|
|
5102
|
+
className: "e-cal-timeline-table__cell-tooltipcontent"
|
|
4531
5103
|
}, tableTooltipContent))));
|
|
4532
5104
|
};
|
|
4533
5105
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EventCalendarTimeline);
|