funda-ui 4.4.15 → 4.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Date/index.js +1078 -77
- package/EventCalendar/index.css +114 -114
- package/EventCalendar/index.d.ts +1 -0
- package/EventCalendar/index.js +124 -86
- package/EventCalendarTimeline/index.css +274 -270
- package/EventCalendarTimeline/index.d.ts +3 -0
- package/EventCalendarTimeline/index.js +673 -225
- package/Input/index.d.ts +7 -0
- package/Input/index.js +699 -57
- package/MasonryLayout/index.js +11 -1
- package/MultipleCheckboxes/index.js +11 -11
- package/MultipleSelect/index.d.ts +1 -0
- package/MultipleSelect/index.js +18 -16
- package/NativeSelect/index.js +11 -11
- package/Radio/index.js +11 -11
- package/RangeSlider/index.js +1078 -77
- package/Select/index.js +45 -13
- package/Table/index.css +1 -0
- package/Table/index.js +36 -7
- package/TagInput/index.d.ts +1 -0
- package/TagInput/index.js +20 -2
- package/Textarea/index.d.ts +7 -0
- package/Textarea/index.js +707 -10
- package/Tree/index.js +13 -11
- package/Utils/inputsCalculation.d.ts +18 -1
- package/Utils/inputsCalculation.js +26 -0
- package/Utils/object.js +11 -11
- package/Utils/os.d.ts +2 -0
- package/Utils/os.js +104 -0
- package/lib/cjs/Date/index.js +1078 -77
- package/lib/cjs/EventCalendar/index.d.ts +1 -0
- package/lib/cjs/EventCalendar/index.js +124 -86
- package/lib/cjs/EventCalendarTimeline/index.d.ts +3 -0
- package/lib/cjs/EventCalendarTimeline/index.js +673 -225
- package/lib/cjs/Input/index.d.ts +7 -0
- package/lib/cjs/Input/index.js +699 -57
- package/lib/cjs/MasonryLayout/index.js +11 -1
- package/lib/cjs/MultipleCheckboxes/index.js +11 -11
- package/lib/cjs/MultipleSelect/index.d.ts +1 -0
- package/lib/cjs/MultipleSelect/index.js +18 -16
- package/lib/cjs/NativeSelect/index.js +11 -11
- package/lib/cjs/Radio/index.js +11 -11
- package/lib/cjs/RangeSlider/index.js +1078 -77
- package/lib/cjs/Select/index.js +45 -13
- package/lib/cjs/Table/index.js +36 -7
- package/lib/cjs/TagInput/index.d.ts +1 -0
- package/lib/cjs/TagInput/index.js +20 -2
- package/lib/cjs/Textarea/index.d.ts +7 -0
- package/lib/cjs/Textarea/index.js +707 -10
- package/lib/cjs/Tree/index.js +13 -11
- package/lib/cjs/Utils/inputsCalculation.d.ts +18 -1
- package/lib/cjs/Utils/inputsCalculation.js +26 -0
- package/lib/cjs/Utils/object.js +11 -11
- package/lib/cjs/Utils/os.d.ts +2 -0
- package/lib/cjs/Utils/os.js +104 -0
- package/lib/css/EventCalendar/index.css +114 -114
- package/lib/css/EventCalendarTimeline/index.css +274 -270
- package/lib/css/Table/index.css +1 -0
- package/lib/esm/EventCalendar/index.scss +81 -81
- package/lib/esm/EventCalendar/index.tsx +144 -104
- package/lib/esm/EventCalendarTimeline/index.scss +226 -221
- package/lib/esm/EventCalendarTimeline/index.tsx +791 -517
- package/lib/esm/Input/index.tsx +299 -77
- package/lib/esm/MasonryLayout/index.tsx +9 -2
- package/lib/esm/ModalDialog/index.tsx +0 -1
- package/lib/esm/MultipleSelect/index.tsx +6 -4
- package/lib/esm/Table/Table.tsx +0 -1
- package/lib/esm/Table/index.scss +2 -0
- package/lib/esm/Table/utils/hooks/useTableDraggable.tsx +47 -6
- package/lib/esm/TagInput/index.tsx +23 -1
- package/lib/esm/Textarea/index.tsx +332 -39
- package/lib/esm/Tree/TreeList.tsx +4 -1
- package/lib/esm/Tree/index.tsx +1 -0
- package/lib/esm/Utils/libs/inputsCalculation.ts +60 -31
- package/lib/esm/Utils/libs/object.ts +67 -67
- package/lib/esm/Utils/libs/os.ts +63 -0
- package/package.json +1 -1
|
@@ -3191,6 +3191,146 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
3191
3191
|
|
|
3192
3192
|
/***/ }),
|
|
3193
3193
|
|
|
3194
|
+
/***/ 13:
|
|
3195
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3196
|
+
|
|
3197
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
3198
|
+
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); }
|
|
3199
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3200
|
+
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),
|
|
3201
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
3202
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
3203
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
3204
|
+
})(this, function () {
|
|
3205
|
+
return (/******/function () {
|
|
3206
|
+
// webpackBootstrap
|
|
3207
|
+
/******/
|
|
3208
|
+
"use strict";
|
|
3209
|
+
|
|
3210
|
+
/******/ // The require scope
|
|
3211
|
+
/******/
|
|
3212
|
+
var __nested_webpack_require_987__ = {};
|
|
3213
|
+
/******/
|
|
3214
|
+
/************************************************************************/
|
|
3215
|
+
/******/ /* webpack/runtime/define property getters */
|
|
3216
|
+
/******/
|
|
3217
|
+
(function () {
|
|
3218
|
+
/******/ // define getter functions for harmony exports
|
|
3219
|
+
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
3220
|
+
/******/for (var key in definition) {
|
|
3221
|
+
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
3222
|
+
/******/Object.defineProperty(exports, key, {
|
|
3223
|
+
enumerable: true,
|
|
3224
|
+
get: definition[key]
|
|
3225
|
+
});
|
|
3226
|
+
/******/
|
|
3227
|
+
}
|
|
3228
|
+
/******/
|
|
3229
|
+
}
|
|
3230
|
+
/******/
|
|
3231
|
+
};
|
|
3232
|
+
/******/
|
|
3233
|
+
})();
|
|
3234
|
+
/******/
|
|
3235
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
3236
|
+
/******/
|
|
3237
|
+
(function () {
|
|
3238
|
+
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
3239
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
3240
|
+
};
|
|
3241
|
+
/******/
|
|
3242
|
+
})();
|
|
3243
|
+
/******/
|
|
3244
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
3245
|
+
/******/
|
|
3246
|
+
(function () {
|
|
3247
|
+
/******/ // define __esModule on exports
|
|
3248
|
+
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
3249
|
+
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
3250
|
+
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
3251
|
+
value: 'Module'
|
|
3252
|
+
});
|
|
3253
|
+
/******/
|
|
3254
|
+
}
|
|
3255
|
+
/******/
|
|
3256
|
+
Object.defineProperty(exports, '__esModule', {
|
|
3257
|
+
value: true
|
|
3258
|
+
});
|
|
3259
|
+
/******/
|
|
3260
|
+
};
|
|
3261
|
+
/******/
|
|
3262
|
+
})();
|
|
3263
|
+
/******/
|
|
3264
|
+
/************************************************************************/
|
|
3265
|
+
var __webpack_exports__ = {};
|
|
3266
|
+
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
3267
|
+
/* harmony export */
|
|
3268
|
+
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
3269
|
+
/* harmony export */"default": function _default() {
|
|
3270
|
+
return __WEBPACK_DEFAULT_EXPORT__;
|
|
3271
|
+
}
|
|
3272
|
+
/* harmony export */
|
|
3273
|
+
});
|
|
3274
|
+
/*
|
|
3275
|
+
* Determine whether it is a special platform
|
|
3276
|
+
*
|
|
3277
|
+
* @private
|
|
3278
|
+
*/
|
|
3279
|
+
function getOs() {
|
|
3280
|
+
if (typeof window === 'undefined') return {};
|
|
3281
|
+
var os;
|
|
3282
|
+
if (typeof window !== "undefined") {
|
|
3283
|
+
var _getOs = function _getOs() {
|
|
3284
|
+
var _navigator = window.navigator;
|
|
3285
|
+
var platform = function platform() {
|
|
3286
|
+
// 2022 way of detecting. Note : this userAgentData feature is available only in secure contexts (HTTPS)
|
|
3287
|
+
if (typeof _navigator.userAgentData !== 'undefined' && _navigator.userAgentData != null) {
|
|
3288
|
+
return _navigator.userAgentData.platform;
|
|
3289
|
+
}
|
|
3290
|
+
// Deprecated but still works for most of the browser
|
|
3291
|
+
if (typeof _navigator.platform !== 'undefined') {
|
|
3292
|
+
if (typeof _navigator.userAgent !== 'undefined' && /android/.test(_navigator.userAgent.toLowerCase())) {
|
|
3293
|
+
// android device’s _navigator.platform is often set as 'linux', so const’s use userAgent for them
|
|
3294
|
+
return 'android';
|
|
3295
|
+
}
|
|
3296
|
+
return _navigator.platform;
|
|
3297
|
+
}
|
|
3298
|
+
return 'unknown';
|
|
3299
|
+
};
|
|
3300
|
+
var _platform = platform().toLowerCase();
|
|
3301
|
+
var isOSX = /mac/.test(_platform); // Mac desktop
|
|
3302
|
+
var isIOS = ['iphone', 'ipad', 'ipod'].indexOf(_platform) === -1 ? false : true; // Mac iOs
|
|
3303
|
+
var isApple = isOSX || isIOS; // Apple device (desktop or iOS)
|
|
3304
|
+
var isWindows = /win/.test(_platform); // Windows
|
|
3305
|
+
var isAndroid = /android/.test(_platform); // Android
|
|
3306
|
+
var isLinux = /linux/.test(_platform); // Linux
|
|
3307
|
+
|
|
3308
|
+
return {
|
|
3309
|
+
isOSX: isOSX,
|
|
3310
|
+
isIOS: isIOS,
|
|
3311
|
+
isApple: isApple,
|
|
3312
|
+
isWindows: isWindows,
|
|
3313
|
+
isAndroid: isAndroid,
|
|
3314
|
+
isLinux: isLinux
|
|
3315
|
+
};
|
|
3316
|
+
};
|
|
3317
|
+
os = _getOs();
|
|
3318
|
+
} else {
|
|
3319
|
+
os = {};
|
|
3320
|
+
}
|
|
3321
|
+
return os;
|
|
3322
|
+
}
|
|
3323
|
+
/* harmony default export */
|
|
3324
|
+
var __WEBPACK_DEFAULT_EXPORT__ = getOs;
|
|
3325
|
+
/******/
|
|
3326
|
+
return __webpack_exports__;
|
|
3327
|
+
/******/
|
|
3328
|
+
}()
|
|
3329
|
+
);
|
|
3330
|
+
});
|
|
3331
|
+
|
|
3332
|
+
/***/ }),
|
|
3333
|
+
|
|
3194
3334
|
/***/ 761:
|
|
3195
3335
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3196
3336
|
|
|
@@ -3719,6 +3859,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3719
3859
|
/* 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__);
|
|
3720
3860
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(188);
|
|
3721
3861
|
/* 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__);
|
|
3862
|
+
/* harmony import */ var funda_utils_dist_cjs_os__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13);
|
|
3863
|
+
/* harmony import */ var funda_utils_dist_cjs_os__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_os__WEBPACK_IMPORTED_MODULE_8__);
|
|
3722
3864
|
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); }
|
|
3723
3865
|
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; }
|
|
3724
3866
|
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); } }
|
|
@@ -3741,6 +3883,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
3741
3883
|
|
|
3742
3884
|
|
|
3743
3885
|
|
|
3886
|
+
|
|
3744
3887
|
var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
3745
3888
|
var contentRef = props.contentRef,
|
|
3746
3889
|
calendarWrapperClassName = props.calendarWrapperClassName,
|
|
@@ -3806,7 +3949,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3806
3949
|
onCellMouseLeave = props.onCellMouseLeave,
|
|
3807
3950
|
onCellMouseUp = props.onCellMouseUp,
|
|
3808
3951
|
onCellClick = props.onCellClick,
|
|
3952
|
+
onCellDoubleClick = props.onCellDoubleClick,
|
|
3809
3953
|
onKeyPressed = props.onKeyPressed,
|
|
3954
|
+
onKeyCopy = props.onKeyCopy,
|
|
3955
|
+
onKeyPaste = props.onKeyPaste,
|
|
3810
3956
|
tableListSectionTitle = props.tableListSectionTitle,
|
|
3811
3957
|
tableCellMinWidth = props.tableCellMinWidth,
|
|
3812
3958
|
tableTooltipDirection = props.tableTooltipDirection,
|
|
@@ -3833,16 +3979,21 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3833
3979
|
var day = date.getDate();
|
|
3834
3980
|
return month + ' ' + day;
|
|
3835
3981
|
};
|
|
3982
|
+
var START_WEEK_ON = 1; // represents "Monday/1" in JavaScript
|
|
3836
3983
|
|
|
3837
3984
|
// orginal data
|
|
3838
3985
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
3839
3986
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3840
|
-
|
|
3841
|
-
|
|
3987
|
+
orginalData = _useState2[0],
|
|
3988
|
+
setOrginalData = _useState2[1];
|
|
3842
3989
|
|
|
3843
3990
|
//
|
|
3844
3991
|
var FILL_BLANK_DATE_DISABLD = typeof forwardAndBackFillDisabled === 'undefined' ? true : forwardAndBackFillDisabled;
|
|
3845
3992
|
|
|
3993
|
+
// root
|
|
3994
|
+
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3995
|
+
var rootWidth = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
|
|
3996
|
+
|
|
3846
3997
|
//
|
|
3847
3998
|
var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
3848
3999
|
return new Date();
|
|
@@ -3894,6 +4045,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3894
4045
|
setWinMonth = _useState22[1];
|
|
3895
4046
|
|
|
3896
4047
|
// modal dialog
|
|
4048
|
+
var modalEditHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
4049
|
+
var modalDeleteHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
3897
4050
|
var EVENTS_ENABLED = typeof modalContent !== 'undefined';
|
|
3898
4051
|
var EVENTS_DELETE_ENABLED = typeof modalDeleteContent !== 'undefined';
|
|
3899
4052
|
var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
@@ -3916,34 +4069,54 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3916
4069
|
var scrollBodyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3917
4070
|
var scrollListRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3918
4071
|
|
|
3919
|
-
//
|
|
3920
|
-
var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(
|
|
4072
|
+
// Temporary date
|
|
4073
|
+
var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
|
|
3921
4074
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
3922
|
-
|
|
3923
|
-
|
|
4075
|
+
tempDate = _useState28[0],
|
|
4076
|
+
setTempDate = _useState28[1];
|
|
4077
|
+
|
|
4078
|
+
// Open temporary storage for pop-ups
|
|
3924
4079
|
var _useState29 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
|
|
3925
4080
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
3926
|
-
|
|
3927
|
-
|
|
4081
|
+
tableRowNum = _useState30[0],
|
|
4082
|
+
setTableRowNum = _useState30[1];
|
|
4083
|
+
var _useState31 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
|
|
4084
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
4085
|
+
tableCellId = _useState32[0],
|
|
4086
|
+
setTableCellId = _useState32[1];
|
|
3928
4087
|
|
|
3929
4088
|
// table grid tooltip
|
|
3930
4089
|
var CELL_TOOLTIP_EXCEEDED_SIDE_POS_OFFSET = Number(tableTooltipExceededSidePosOffset) || 15;
|
|
3931
4090
|
var CELL_TOOLTIP_POS_OFFSET = typeof tableTooltipOffset === 'undefined' ? 10 : tableTooltipOffset;
|
|
3932
4091
|
var tableTooltipModalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3933
|
-
var
|
|
3934
|
-
_useState32 = _slicedToArray(_useState31, 2),
|
|
3935
|
-
isShowTableTooltip = _useState32[0],
|
|
3936
|
-
setIsShowTableTooltip = _useState32[1];
|
|
3937
|
-
var _useState33 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
4092
|
+
var _useState33 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3938
4093
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
3939
|
-
|
|
3940
|
-
|
|
4094
|
+
isShowTableTooltip = _useState34[0],
|
|
4095
|
+
setIsShowTableTooltip = _useState34[1];
|
|
4096
|
+
var _useState35 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
4097
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
4098
|
+
tableTooltipContent = _useState36[0],
|
|
4099
|
+
setTableTooltipContent = _useState36[1];
|
|
3941
4100
|
|
|
3942
4101
|
// appearance mode
|
|
3943
|
-
var
|
|
3944
|
-
|
|
3945
|
-
appearanceMode =
|
|
3946
|
-
setAppearanceMode =
|
|
4102
|
+
var _useState37 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(appearance),
|
|
4103
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
4104
|
+
appearanceMode = _useState38[0],
|
|
4105
|
+
setAppearanceMode = _useState38[1];
|
|
4106
|
+
var findMondayAndTruncate = function findMondayAndTruncate(dates) {
|
|
4107
|
+
var _res = dates.map(function (s) {
|
|
4108
|
+
return new Date(s);
|
|
4109
|
+
});
|
|
4110
|
+
// Find the first Monday in the sequence
|
|
4111
|
+
for (var i = 0; i < _res.length; i++) {
|
|
4112
|
+
var _date2 = _res[i];
|
|
4113
|
+
if (_date2.getDay() === START_WEEK_ON) {
|
|
4114
|
+
// Return dates starting from Monday onwards
|
|
4115
|
+
return dates.slice(i);
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
return []; // Return empty array if no Monday found
|
|
4119
|
+
};
|
|
3947
4120
|
|
|
3948
4121
|
// exposes the following methods
|
|
3949
4122
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
@@ -3960,6 +4133,11 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3960
4133
|
resetSelectedCells: function resetSelectedCells() {
|
|
3961
4134
|
// reset selection area
|
|
3962
4135
|
setSelectedCells([]);
|
|
4136
|
+
setCopiedCells(null);
|
|
4137
|
+
},
|
|
4138
|
+
closeModal: function closeModal() {
|
|
4139
|
+
if (modalEditHandleRef.current) modalEditHandleRef.current.close();
|
|
4140
|
+
if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
|
|
3963
4141
|
}
|
|
3964
4142
|
};
|
|
3965
4143
|
}, [contentRef]);
|
|
@@ -3972,10 +4150,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3972
4150
|
//================================================================
|
|
3973
4151
|
// Weekly calendar
|
|
3974
4152
|
//================================================================
|
|
3975
|
-
var
|
|
3976
|
-
|
|
3977
|
-
weekOffset =
|
|
3978
|
-
setWeekOffset =
|
|
4153
|
+
var _useState39 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
|
|
4154
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
4155
|
+
weekOffset = _useState40[0],
|
|
4156
|
+
setWeekOffset = _useState40[1];
|
|
3979
4157
|
var handleNextWeek = function handleNextWeek() {
|
|
3980
4158
|
setWeekOffset(weekOffset + 1);
|
|
3981
4159
|
return weekOffset + 1;
|
|
@@ -3985,29 +4163,26 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3985
4163
|
return weekOffset - 1;
|
|
3986
4164
|
};
|
|
3987
4165
|
var weekDates = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getWeekDatesFromMon)(weekOffset);
|
|
3988
|
-
var
|
|
3989
|
-
|
|
3990
|
-
displayWeekForHeader =
|
|
3991
|
-
setDisplayWeekForHeader =
|
|
4166
|
+
var _useState41 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
4167
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
4168
|
+
displayWeekForHeader = _useState42[0],
|
|
4169
|
+
setDisplayWeekForHeader = _useState42[1];
|
|
3992
4170
|
|
|
3993
4171
|
//================================================================
|
|
3994
4172
|
// Drag to activate the selection area
|
|
3995
4173
|
//================================================================
|
|
3996
|
-
var
|
|
3997
|
-
_useState42 = _slicedToArray(_useState41, 2),
|
|
3998
|
-
isSelecting = _useState42[0],
|
|
3999
|
-
setIsSelecting = _useState42[1];
|
|
4000
|
-
var _useState43 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
4174
|
+
var _useState43 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
4001
4175
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
var _useState45 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(
|
|
4176
|
+
isSelecting = _useState44[0],
|
|
4177
|
+
setIsSelecting = _useState44[1];
|
|
4178
|
+
var _useState45 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
4005
4179
|
_useState46 = _slicedToArray(_useState45, 2),
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4180
|
+
selectedCells = _useState46[0],
|
|
4181
|
+
setSelectedCells = _useState46[1];
|
|
4182
|
+
var _useState47 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
4183
|
+
_useState48 = _slicedToArray(_useState47, 2),
|
|
4184
|
+
startCell = _useState48[0],
|
|
4185
|
+
setStartCell = _useState48[1];
|
|
4011
4186
|
|
|
4012
4187
|
// Determine whether it is a selected cell
|
|
4013
4188
|
var isCellSelected = function isCellSelected(row, col) {
|
|
@@ -4021,9 +4196,59 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4021
4196
|
});
|
|
4022
4197
|
};
|
|
4023
4198
|
|
|
4024
|
-
//
|
|
4025
|
-
function
|
|
4199
|
+
// Start selecting
|
|
4200
|
+
var handleTableMainCellMouseDown = function handleTableMainCellMouseDown(e, row, col, colsOffset) {
|
|
4201
|
+
var isMultiSelect = e.ctrlKey || e.metaKey; // Check whether the Ctrl or Command key is pressed
|
|
4202
|
+
|
|
4203
|
+
setIsSelecting(true);
|
|
4204
|
+
setStartCell({
|
|
4205
|
+
row: row,
|
|
4206
|
+
col: col
|
|
4207
|
+
});
|
|
4026
4208
|
var _el = e.currentTarget;
|
|
4209
|
+
setIsSelecting(true);
|
|
4210
|
+
setStartCell({
|
|
4211
|
+
row: row,
|
|
4212
|
+
col: col
|
|
4213
|
+
});
|
|
4214
|
+
setSelectedCells(function (prevSelectedCells) {
|
|
4215
|
+
if (isMultiSelect) {
|
|
4216
|
+
// Multi-select mode: Add or remove cells
|
|
4217
|
+
//++++++++++
|
|
4218
|
+
var cellExists = prevSelectedCells.some(function (_ref3) {
|
|
4219
|
+
var r = _ref3.row,
|
|
4220
|
+
c = _ref3.col;
|
|
4221
|
+
return r === row && c === col;
|
|
4222
|
+
});
|
|
4223
|
+
if (cellExists) {
|
|
4224
|
+
return prevSelectedCells.filter(function (_ref4) {
|
|
4225
|
+
var r = _ref4.row,
|
|
4226
|
+
c = _ref4.col;
|
|
4227
|
+
return !(r === row && c === col);
|
|
4228
|
+
});
|
|
4229
|
+
} else {
|
|
4230
|
+
return [].concat(_toConsumableArray(prevSelectedCells), [{
|
|
4231
|
+
rowData: JSON.parse(_el.dataset.rowinfo),
|
|
4232
|
+
date: _el.dataset.date,
|
|
4233
|
+
row: row,
|
|
4234
|
+
col: col
|
|
4235
|
+
}]);
|
|
4236
|
+
}
|
|
4237
|
+
} else {
|
|
4238
|
+
// Radio Mode: Clear the previous selection, select only the current cell
|
|
4239
|
+
//++++++++++
|
|
4240
|
+
return [{
|
|
4241
|
+
rowData: JSON.parse(_el.dataset.rowinfo),
|
|
4242
|
+
date: _el.dataset.date,
|
|
4243
|
+
row: row,
|
|
4244
|
+
col: col
|
|
4245
|
+
}];
|
|
4246
|
+
}
|
|
4247
|
+
});
|
|
4248
|
+
};
|
|
4249
|
+
|
|
4250
|
+
// Selecting now
|
|
4251
|
+
var handleTableMainCellMouseEnter = function handleTableMainCellMouseEnter(e, row, col, colsOffset) {
|
|
4027
4252
|
if (isSelecting && startCell) {
|
|
4028
4253
|
//########## MODE: WEEK #############
|
|
4029
4254
|
var curDateList = [];
|
|
@@ -4056,10 +4281,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4056
4281
|
for (var r = minRow; r <= maxRow; r++) {
|
|
4057
4282
|
for (var c = minCol; c <= maxCol; c++) {
|
|
4058
4283
|
// query date and row data
|
|
4059
|
-
var curRowData =
|
|
4284
|
+
var curRowData = orginalData[r];
|
|
4060
4285
|
newSelectedCells.push({
|
|
4061
4286
|
rowData: curRowData === null || curRowData === void 0 ? void 0 : curRowData.listSection,
|
|
4062
|
-
date: curDateList[c],
|
|
4287
|
+
date: curDateList[c - colsOffset],
|
|
4063
4288
|
row: r,
|
|
4064
4289
|
col: c
|
|
4065
4290
|
});
|
|
@@ -4067,23 +4292,155 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4067
4292
|
}
|
|
4068
4293
|
setSelectedCells(newSelectedCells);
|
|
4069
4294
|
}
|
|
4070
|
-
}
|
|
4295
|
+
};
|
|
4071
4296
|
|
|
4072
4297
|
// Stop selecting
|
|
4073
|
-
function
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4298
|
+
var handleTableMainMouseUp = function handleTableMainMouseUp(e) {
|
|
4299
|
+
setIsSelecting(false);
|
|
4300
|
+
};
|
|
4301
|
+
|
|
4302
|
+
//================================================================
|
|
4303
|
+
// Copy & Paste
|
|
4304
|
+
//================================================================
|
|
4305
|
+
var _useState49 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
4306
|
+
_useState50 = _slicedToArray(_useState49, 2),
|
|
4307
|
+
copiedCells = _useState50[0],
|
|
4308
|
+
setCopiedCells = _useState50[1];
|
|
4309
|
+
var handleWrapperKeyDown = function handleWrapperKeyDown(e) {
|
|
4310
|
+
var isMac = funda_utils_dist_cjs_os__WEBPACK_IMPORTED_MODULE_8___default()().isOSX;
|
|
4311
|
+
|
|
4312
|
+
//########## MODE: WEEK #############
|
|
4313
|
+
var curDateList = [];
|
|
4314
|
+
if (appearanceMode === 'week') {
|
|
4315
|
+
curDateList = weekDates.map(function (v) {
|
|
4316
|
+
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(v);
|
|
4317
|
+
});
|
|
4318
|
+
}
|
|
4319
|
+
//########## /MODE: WEEK #############
|
|
4320
|
+
|
|
4321
|
+
//########## MODE: MONTH #############
|
|
4322
|
+
if (appearanceMode === 'month') {
|
|
4323
|
+
curDateList = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getMonthDates)(year, month + 1);
|
|
4324
|
+
}
|
|
4325
|
+
//########## /MODE: MONTH #############
|
|
4326
|
+
|
|
4327
|
+
// Listen for copy
|
|
4328
|
+
if (isMac && e.metaKey && e.key === 'c' || !isMac && e.ctrlKey && e.key === 'c') {
|
|
4329
|
+
if (selectedCells.length > 0) {
|
|
4330
|
+
// Gets the structure of the selected area
|
|
4331
|
+
var _selectedCellsCoordinates = selectedCells.map(function (_ref5) {
|
|
4332
|
+
var r = _ref5.row,
|
|
4333
|
+
c = _ref5.col;
|
|
4334
|
+
return [r, c];
|
|
4335
|
+
});
|
|
4336
|
+
var _selectedCellsCoordin = _selectedCellsCoordinates.reduce(function (_ref6, _ref7) {
|
|
4337
|
+
var _ref8 = _slicedToArray(_ref6, 2),
|
|
4338
|
+
min = _ref8[0],
|
|
4339
|
+
max = _ref8[1];
|
|
4340
|
+
var _ref9 = _slicedToArray(_ref7, 1),
|
|
4341
|
+
r = _ref9[0];
|
|
4342
|
+
return [Math.min(min, r), Math.max(max, r)];
|
|
4343
|
+
}, [Infinity, -Infinity]),
|
|
4344
|
+
_selectedCellsCoordin2 = _slicedToArray(_selectedCellsCoordin, 2),
|
|
4345
|
+
minRow = _selectedCellsCoordin2[0],
|
|
4346
|
+
maxRow = _selectedCellsCoordin2[1];
|
|
4347
|
+
var _selectedCellsCoordin3 = _selectedCellsCoordinates.reduce(function (_ref10, _ref11) {
|
|
4348
|
+
var _ref12 = _slicedToArray(_ref10, 2),
|
|
4349
|
+
min = _ref12[0],
|
|
4350
|
+
max = _ref12[1];
|
|
4351
|
+
var _ref13 = _slicedToArray(_ref11, 2),
|
|
4352
|
+
_ = _ref13[0],
|
|
4353
|
+
c = _ref13[1];
|
|
4354
|
+
return [Math.min(min, c), Math.max(max, c)];
|
|
4355
|
+
}, [Infinity, -Infinity]),
|
|
4356
|
+
_selectedCellsCoordin4 = _slicedToArray(_selectedCellsCoordin3, 2),
|
|
4357
|
+
minCol = _selectedCellsCoordin4[0],
|
|
4358
|
+
maxCol = _selectedCellsCoordin4[1];
|
|
4359
|
+
|
|
4360
|
+
/*
|
|
4361
|
+
[Be equal to:]
|
|
4362
|
+
// Suppose _selectedCellsCoordinates is an array of selected cells, each of which is in the form of [row, col].
|
|
4363
|
+
let minRow = Infinity;
|
|
4364
|
+
let maxRow = -Infinity;
|
|
4365
|
+
let minCol = Infinity;
|
|
4366
|
+
let maxCol = -Infinity;
|
|
4367
|
+
for (const [row, col] of _selectedCellsCoordinates) {
|
|
4368
|
+
if (row < minRow) minRow = row;
|
|
4369
|
+
if (row > maxRow) maxRow = row;
|
|
4370
|
+
if (col < minCol) minCol = col;
|
|
4371
|
+
if (col > maxCol) maxCol = col;
|
|
4372
|
+
}
|
|
4373
|
+
*/
|
|
4374
|
+
|
|
4375
|
+
// Calculate the offset and adjust the cell coordinates
|
|
4376
|
+
var adjustedCells = _selectedCellsCoordinates.map(function (_ref14) {
|
|
4377
|
+
var _ref15 = _slicedToArray(_ref14, 2),
|
|
4378
|
+
r = _ref15[0],
|
|
4379
|
+
c = _ref15[1];
|
|
4380
|
+
return [r - minRow, c - minCol];
|
|
4381
|
+
});
|
|
4382
|
+
|
|
4383
|
+
// The copy result is independent of the data
|
|
4384
|
+
setCopiedCells({
|
|
4385
|
+
structure: {
|
|
4386
|
+
rows: maxRow - minRow + 1,
|
|
4387
|
+
cols: maxCol - minCol + 1
|
|
4388
|
+
},
|
|
4389
|
+
offset: {
|
|
4390
|
+
row: minRow,
|
|
4391
|
+
col: minCol
|
|
4392
|
+
},
|
|
4393
|
+
cells: adjustedCells
|
|
4394
|
+
});
|
|
4395
|
+
|
|
4396
|
+
//
|
|
4397
|
+
onKeyCopy === null || onKeyCopy === void 0 ? void 0 : onKeyCopy(e, selectedCells);
|
|
4398
|
+
}
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4401
|
+
// Listen for paste
|
|
4402
|
+
if (isMac && e.metaKey && e.key === 'v' || !isMac && e.ctrlKey && e.key === 'v') {
|
|
4403
|
+
if (copiedCells && selectedCells.length > 0) {
|
|
4404
|
+
var _getCells = getCells(),
|
|
4405
|
+
rowsTotal = _getCells.rowsTotal,
|
|
4406
|
+
colsTotal = _getCells.colsTotal,
|
|
4407
|
+
forwardFillTotal = _getCells.forwardFillTotal;
|
|
4408
|
+
var _selectedCells$ = selectedCells[0],
|
|
4409
|
+
targetRow = _selectedCells$.row,
|
|
4410
|
+
targetCol = _selectedCells$.col; // the first position
|
|
4411
|
+
var newSelectedCellsCoordinates = copiedCells.cells.map(function (_ref16) {
|
|
4412
|
+
var _ref17 = _slicedToArray(_ref16, 2),
|
|
4413
|
+
r = _ref17[0],
|
|
4414
|
+
c = _ref17[1];
|
|
4415
|
+
return [targetRow + r, targetCol + c];
|
|
4416
|
+
}).filter(function (_ref18) {
|
|
4417
|
+
var _ref19 = _slicedToArray(_ref18, 2),
|
|
4418
|
+
r = _ref19[0],
|
|
4419
|
+
c = _ref19[1];
|
|
4420
|
+
return r < rowsTotal && c < colsTotal;
|
|
4421
|
+
}); // Make sure you don't go beyond the scope of the table
|
|
4422
|
+
|
|
4423
|
+
// query date and row data
|
|
4424
|
+
var newSelectedCells = [];
|
|
4425
|
+
newSelectedCellsCoordinates.forEach(function (item) {
|
|
4426
|
+
var _item = _slicedToArray(item, 2),
|
|
4427
|
+
r = _item[0],
|
|
4428
|
+
c = _item[1];
|
|
4429
|
+
var curRowData = orginalData[r];
|
|
4430
|
+
newSelectedCells.push({
|
|
4431
|
+
rowData: curRowData === null || curRowData === void 0 ? void 0 : curRowData.listSection,
|
|
4432
|
+
date: curDateList[c - forwardFillTotal],
|
|
4433
|
+
row: r,
|
|
4434
|
+
col: c
|
|
4435
|
+
});
|
|
4436
|
+
});
|
|
4437
|
+
setSelectedCells(newSelectedCells);
|
|
4438
|
+
|
|
4439
|
+
//
|
|
4440
|
+
onKeyPaste === null || onKeyPaste === void 0 ? void 0 : onKeyPaste(e, newSelectedCells);
|
|
4441
|
+
}
|
|
4442
|
+
}
|
|
4443
|
+
};
|
|
4087
4444
|
|
|
4088
4445
|
//================================================================
|
|
4089
4446
|
// Other
|
|
@@ -4162,7 +4519,12 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4162
4519
|
week: [_daysIndicator[_dayOfWeek] - 1]
|
|
4163
4520
|
});
|
|
4164
4521
|
});
|
|
4165
|
-
return
|
|
4522
|
+
return {
|
|
4523
|
+
rowsTotal: orginalData.length,
|
|
4524
|
+
colsTotal: curWeek.length,
|
|
4525
|
+
forwardFillTotal: 0,
|
|
4526
|
+
list: curWeek
|
|
4527
|
+
};
|
|
4166
4528
|
}
|
|
4167
4529
|
//########## /MODE: WEEK #############
|
|
4168
4530
|
|
|
@@ -4180,9 +4542,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4180
4542
|
|
|
4181
4543
|
// next month
|
|
4182
4544
|
if (type === 'back') {
|
|
4183
|
-
var
|
|
4184
|
-
currentMonth =
|
|
4185
|
-
currentStartDay = getStartDayOfMonth(
|
|
4545
|
+
var _date3 = new Date(year, currentMonth + 1, day);
|
|
4546
|
+
currentMonth = _date3.getMonth();
|
|
4547
|
+
currentStartDay = getStartDayOfMonth(_date3);
|
|
4186
4548
|
}
|
|
4187
4549
|
|
|
4188
4550
|
//
|
|
@@ -4223,75 +4585,91 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4223
4585
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(v);
|
|
4224
4586
|
});
|
|
4225
4587
|
};
|
|
4226
|
-
return _tempCells.map(function (_, j) {
|
|
4227
|
-
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
4228
4588
|
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4589
|
+
// The remaining date of the previous month
|
|
4590
|
+
// If the number is 7, the calendar does not include the date of the previous month
|
|
4591
|
+
var remainPrevDate = findMondayAndTruncate(_getForwardFill(year, month + 1));
|
|
4592
|
+
var remainPrevDateTotal = remainPrevDate.length === 7 ? 0 : remainPrevDate.length;
|
|
4593
|
+
return {
|
|
4594
|
+
rowsTotal: orginalData.length,
|
|
4595
|
+
colsTotal: allDays.length,
|
|
4596
|
+
forwardFillTotal: remainPrevDateTotal,
|
|
4597
|
+
list: _tempCells.map(function (_, j) {
|
|
4598
|
+
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
4599
|
+
|
|
4600
|
+
// back fill
|
|
4601
|
+
var backFillArr = [];
|
|
4602
|
+
for (var k = 0; k < 7 - _col.length; k++) {
|
|
4603
|
+
backFillArr.push(null);
|
|
4604
|
+
}
|
|
4605
|
+
_col.splice.apply(_col, [_col.length, 0].concat(_toConsumableArray(backFillArr)));
|
|
4235
4606
|
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4607
|
+
//
|
|
4608
|
+
var isFirstGroup = j === 0;
|
|
4609
|
+
var isLastGroup = j === _tempCells.length - 1;
|
|
4239
4610
|
|
|
4240
|
-
|
|
4241
|
-
|
|
4611
|
+
// forward fill
|
|
4612
|
+
var __forwardFillDate = _getForwardFill(year, month + 1);
|
|
4242
4613
|
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4614
|
+
// back fill
|
|
4615
|
+
var __backFillDate = _getBackFill(year, month + 1);
|
|
4616
|
+
var _getDateShow = function _getDateShow(_dayIndex, _m, _startDay, _month) {
|
|
4617
|
+
var currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
|
|
4247
4618
|
|
|
4248
|
-
|
|
4249
|
-
|
|
4619
|
+
// date
|
|
4620
|
+
var _dateShow = currentDay > 0 ? "".concat(year, "-").concat(_month + 1, "-").concat(currentDay) : '';
|
|
4250
4621
|
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4622
|
+
// forward & back
|
|
4623
|
+
if (isFirstGroup && _dateShow === '') {
|
|
4624
|
+
_dateShow = __forwardFillDate.at(currentDay - 1);
|
|
4625
|
+
}
|
|
4626
|
+
if (isLastGroup && _dateShow === '') {
|
|
4627
|
+
_dateShow = __backFillDate.at(_m);
|
|
4628
|
+
}
|
|
4629
|
+
return {
|
|
4630
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(_dateShow),
|
|
4631
|
+
firstGroup: isFirstGroup,
|
|
4632
|
+
lastGroup: isLastGroup,
|
|
4633
|
+
validDisplayDate: currentDay > 0 && currentDay <= days[month]
|
|
4634
|
+
};
|
|
4263
4635
|
};
|
|
4264
|
-
};
|
|
4265
4636
|
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4637
|
+
//
|
|
4638
|
+
return {
|
|
4639
|
+
month: currentMonth,
|
|
4640
|
+
startDay: currentStartDay,
|
|
4641
|
+
row: j,
|
|
4642
|
+
col: _col,
|
|
4643
|
+
dateInfo: _col.map(function (k, m) {
|
|
4644
|
+
var _lastWeekDays = _col.filter(Boolean).length;
|
|
4645
|
+
return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
|
|
4646
|
+
}),
|
|
4647
|
+
weekDisplay: _col.map(function (k, m) {
|
|
4648
|
+
return WEEK[m];
|
|
4649
|
+
}),
|
|
4650
|
+
week: _col.map(function (k, m) {
|
|
4651
|
+
return m;
|
|
4652
|
+
})
|
|
4653
|
+
};
|
|
4654
|
+
})
|
|
4655
|
+
};
|
|
4284
4656
|
}
|
|
4285
4657
|
//########## /MODE: MONTH #############
|
|
4286
4658
|
|
|
4287
|
-
return
|
|
4659
|
+
return {
|
|
4660
|
+
rowsTotal: 0,
|
|
4661
|
+
colsTotal: 0,
|
|
4662
|
+
forwardFillTotal: 0,
|
|
4663
|
+
list: []
|
|
4664
|
+
};
|
|
4288
4665
|
};
|
|
4289
4666
|
var queryItemObj = function queryItemObj() {
|
|
4290
|
-
var curRowData =
|
|
4667
|
+
var curRowData = orginalData[tableRowNum];
|
|
4668
|
+
var curDate = tempDate !== '' ? tempDate : "".concat(year, "-").concat(month + 1, "-").concat(day);
|
|
4291
4669
|
if (curRowData) {
|
|
4292
4670
|
var eventSourcesData = curRowData.eventSources;
|
|
4293
4671
|
var _rowData = eventSourcesData.filter(function (item) {
|
|
4294
|
-
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)(
|
|
4672
|
+
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)(curDate);
|
|
4295
4673
|
});
|
|
4296
4674
|
var _currentData = undefined;
|
|
4297
4675
|
if (_rowData[0]) {
|
|
@@ -4301,7 +4679,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4301
4679
|
_currentData = {
|
|
4302
4680
|
rowData: curRowData.listSection,
|
|
4303
4681
|
id: 0,
|
|
4304
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(
|
|
4682
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(curDate)
|
|
4305
4683
|
};
|
|
4306
4684
|
} else {
|
|
4307
4685
|
// edit or delete
|
|
@@ -4313,7 +4691,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4313
4691
|
return _rowData[0] ? _currentData : {
|
|
4314
4692
|
rowData: curRowData.listSection,
|
|
4315
4693
|
id: 0,
|
|
4316
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(
|
|
4694
|
+
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(curDate)
|
|
4317
4695
|
};
|
|
4318
4696
|
}
|
|
4319
4697
|
};
|
|
@@ -4386,7 +4764,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4386
4764
|
}
|
|
4387
4765
|
|
|
4388
4766
|
// Determine whether it exceeds the far right or left side of the screen
|
|
4389
|
-
var _modalContent = _tableTooltipModalRef.querySelector('.
|
|
4767
|
+
var _modalContent = _tableTooltipModalRef.querySelector('.custom-event-tl-table__cell-tooltipcontent');
|
|
4390
4768
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
4391
4769
|
if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
|
|
4392
4770
|
// 10 pixels is used to account for some bias in mobile devices
|
|
@@ -4582,7 +4960,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4582
4960
|
// ================================================================
|
|
4583
4961
|
|
|
4584
4962
|
function generateListSectionUi() {
|
|
4585
|
-
return
|
|
4963
|
+
return orginalData.map(function (item, i) {
|
|
4586
4964
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
4587
4965
|
key: i,
|
|
4588
4966
|
role: "row",
|
|
@@ -4590,9 +4968,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4590
4968
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
4591
4969
|
role: "gridcell",
|
|
4592
4970
|
"data-resource-index": i,
|
|
4593
|
-
className: "
|
|
4971
|
+
className: "custom-event-tl-table__datagrid-cell"
|
|
4594
4972
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4595
|
-
className: "
|
|
4973
|
+
className: "custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-title",
|
|
4596
4974
|
dangerouslySetInnerHTML: {
|
|
4597
4975
|
__html: item.listSection.title
|
|
4598
4976
|
}
|
|
@@ -4606,7 +4984,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4606
4984
|
var showEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
4607
4985
|
// colIndex
|
|
4608
4986
|
var colIndex = 0;
|
|
4609
|
-
|
|
4987
|
+
var _getCells2 = getCells(),
|
|
4988
|
+
forwardFillTotal = _getCells2.forwardFillTotal,
|
|
4989
|
+
cellsList = _getCells2.list;
|
|
4990
|
+
return cellsList.map(function (item, j) {
|
|
4610
4991
|
return item.col.map(function (dayIndex, i) {
|
|
4611
4992
|
colIndex++;
|
|
4612
4993
|
|
|
@@ -4627,7 +5008,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4627
5008
|
var _currentData = eventSourcesData.filter(function (item) {
|
|
4628
5009
|
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.getCalendarDate)(item.date) === _dateShow;
|
|
4629
5010
|
});
|
|
4630
|
-
var isLastCol = colIndex === 7 *
|
|
5011
|
+
var isLastCol = colIndex === 7 * cellsList.length;
|
|
4631
5012
|
var isInteractive = item.dateInfo[i].validDisplayDate; // The date on which the user interaction can occur, e.g. click, modify
|
|
4632
5013
|
var isForward = item.dateInfo[i].firstGroup && !isInteractive;
|
|
4633
5014
|
var isBack = item.dateInfo[i].lastGroup && !isInteractive;
|
|
@@ -4637,7 +5018,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4637
5018
|
if (!showEvents) {
|
|
4638
5019
|
var _thContent = function _thContent() {
|
|
4639
5020
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
4640
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5021
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__cell-cushion-headercontent__container', {
|
|
4641
5022
|
'empty': !isInteractive,
|
|
4642
5023
|
'today': d === now.getDate(),
|
|
4643
5024
|
'selected': d === day,
|
|
@@ -4668,6 +5049,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4668
5049
|
|
|
4669
5050
|
// reset selection area
|
|
4670
5051
|
setSelectedCells([]);
|
|
5052
|
+
setCopiedCells(null);
|
|
4671
5053
|
|
|
4672
5054
|
//
|
|
4673
5055
|
if (isInteractive) {
|
|
@@ -4686,6 +5068,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4686
5068
|
} : _currentData[0], function () {
|
|
4687
5069
|
return setShowEdit(true);
|
|
4688
5070
|
}, 'normal');
|
|
5071
|
+
|
|
5072
|
+
// set temporary date
|
|
5073
|
+
setTempDate(_dateShow);
|
|
4689
5074
|
}
|
|
4690
5075
|
}
|
|
4691
5076
|
},
|
|
@@ -4696,7 +5081,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4696
5081
|
onCellMouseUp === null || onCellMouseUp === void 0 ? void 0 : onCellMouseUp(e, selectedCells);
|
|
4697
5082
|
}
|
|
4698
5083
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4699
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5084
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-headercontent', {
|
|
4700
5085
|
'disabled': !isInteractive
|
|
4701
5086
|
}),
|
|
4702
5087
|
style: {
|
|
@@ -4723,18 +5108,18 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4723
5108
|
var _items = _currentData[0].list;
|
|
4724
5109
|
return _items.map(function (cellItem, cellItemIndex) {
|
|
4725
5110
|
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", {
|
|
4726
|
-
className: "
|
|
5111
|
+
className: "custom-event-tl__day__event-tooltipcontent",
|
|
4727
5112
|
dangerouslySetInnerHTML: {
|
|
4728
5113
|
__html: cellItem.dataTooltip
|
|
4729
5114
|
}
|
|
4730
5115
|
}));
|
|
4731
5116
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4732
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("
|
|
5117
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__cell-cushion-content__item custom-event-tl-table__cell-cushion-content__item-".concat(cellItemIndex), {
|
|
4733
5118
|
'first': cellItemIndex === 0,
|
|
4734
5119
|
'last': cellItemIndex === _items.length - 1
|
|
4735
5120
|
}),
|
|
4736
5121
|
key: "cell-item-".concat(rowIndex, "-").concat(cellItemIndex, "}"),
|
|
4737
|
-
"data-overlay-id": "
|
|
5122
|
+
"data-overlay-id": "custom-event-tl-table__cell-tooltipwrapper-".concat(idRes),
|
|
4738
5123
|
"data-cell-item-index": cellItemIndex,
|
|
4739
5124
|
"data-date": _dateShow,
|
|
4740
5125
|
"data-day": _dateDayShow,
|
|
@@ -4779,17 +5164,20 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4779
5164
|
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(cellItem, function () {
|
|
4780
5165
|
return setShowEdit(true);
|
|
4781
5166
|
}, 'normal');
|
|
5167
|
+
|
|
5168
|
+
// set temporary date
|
|
5169
|
+
setTempDate(_dateShow);
|
|
4782
5170
|
}
|
|
4783
5171
|
}
|
|
4784
5172
|
}
|
|
4785
5173
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4786
|
-
className: "
|
|
5174
|
+
className: "custom-event-tl__day__event",
|
|
4787
5175
|
style: typeof cellItem !== 'undefined' && cellItem.eventStyles !== 'undefined' ? cellItem.eventStyles : {},
|
|
4788
5176
|
dangerouslySetInnerHTML: typeof cellItem.data === 'string' ? {
|
|
4789
5177
|
__html: cellItem.data
|
|
4790
5178
|
} : undefined
|
|
4791
5179
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(cellItem.data) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, cellItem.data) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4792
|
-
className: "
|
|
5180
|
+
className: "custom-event-tl__day__eventdel ".concat(cellCloseBtnClassName || '')
|
|
4793
5181
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
4794
5182
|
href: "#",
|
|
4795
5183
|
tabIndex: -1,
|
|
@@ -4825,6 +5213,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4825
5213
|
onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_existsContent, function () {
|
|
4826
5214
|
return setShowDelete(true);
|
|
4827
5215
|
});
|
|
5216
|
+
|
|
5217
|
+
// set temporary date
|
|
5218
|
+
setTempDate(_dateShow);
|
|
4828
5219
|
}
|
|
4829
5220
|
}
|
|
4830
5221
|
}
|
|
@@ -4832,9 +5223,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4832
5223
|
});
|
|
4833
5224
|
};
|
|
4834
5225
|
var _tdContent = function _tdContent() {
|
|
4835
|
-
var
|
|
5226
|
+
var _orginalData$rowIndex;
|
|
4836
5227
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
4837
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5228
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__cell-cushion-content__container custom-event-tl-table__cell-tooltiptrigger', {
|
|
4838
5229
|
'has-event': eventSourcesData && _currentData.length > 0,
|
|
4839
5230
|
'empty': !isInteractive,
|
|
4840
5231
|
'today': d === now.getDate(),
|
|
@@ -4844,7 +5235,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4844
5235
|
key: "col" + i,
|
|
4845
5236
|
"data-index": colIndex - 1,
|
|
4846
5237
|
colSpan: 1,
|
|
4847
|
-
"data-rowinfo": JSON.stringify((
|
|
5238
|
+
"data-rowinfo": JSON.stringify((_orginalData$rowIndex = orginalData[rowIndex]) === null || _orginalData$rowIndex === void 0 ? void 0 : _orginalData$rowIndex.listSection),
|
|
4848
5239
|
"data-date": _dateShow,
|
|
4849
5240
|
"data-day": _dateDayShow,
|
|
4850
5241
|
"data-week": weekDay,
|
|
@@ -4853,13 +5244,13 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4853
5244
|
onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
|
|
4854
5245
|
|
|
4855
5246
|
//
|
|
4856
|
-
if (multipleCells) handleTableMainCellMouseEnter(e, rowIndex, dayIndex);
|
|
5247
|
+
if (multipleCells) handleTableMainCellMouseEnter(e, rowIndex, dayIndex, forwardFillTotal);
|
|
4857
5248
|
},
|
|
4858
5249
|
onMouseDown: function onMouseDown(e) {
|
|
4859
|
-
var
|
|
5250
|
+
var _orginalData$rowIndex2;
|
|
4860
5251
|
//
|
|
4861
5252
|
onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e, {
|
|
4862
|
-
rowData: (
|
|
5253
|
+
rowData: (_orginalData$rowIndex2 = orginalData[rowIndex]) === null || _orginalData$rowIndex2 === void 0 ? void 0 : _orginalData$rowIndex2.listSection,
|
|
4863
5254
|
date: _dateShow,
|
|
4864
5255
|
row: rowIndex,
|
|
4865
5256
|
col: dayIndex
|
|
@@ -4868,7 +5259,17 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4868
5259
|
handleDayChange(e, d); // update current day
|
|
4869
5260
|
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, null);
|
|
4870
5261
|
}
|
|
4871
|
-
if (multipleCells) handleTableMainCellMouseDown(e, rowIndex, dayIndex);
|
|
5262
|
+
if (multipleCells) handleTableMainCellMouseDown(e, rowIndex, dayIndex, forwardFillTotal);
|
|
5263
|
+
},
|
|
5264
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
5265
|
+
var _orginalData$rowIndex3;
|
|
5266
|
+
//
|
|
5267
|
+
onCellDoubleClick === null || onCellDoubleClick === void 0 ? void 0 : onCellDoubleClick(e, {
|
|
5268
|
+
rowData: (_orginalData$rowIndex3 = orginalData[rowIndex]) === null || _orginalData$rowIndex3 === void 0 ? void 0 : _orginalData$rowIndex3.listSection,
|
|
5269
|
+
date: _dateShow,
|
|
5270
|
+
row: rowIndex,
|
|
5271
|
+
col: dayIndex
|
|
5272
|
+
});
|
|
4872
5273
|
},
|
|
4873
5274
|
onMouseLeave: function onMouseLeave(e) {
|
|
4874
5275
|
onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
|
|
@@ -4877,7 +5278,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4877
5278
|
onCellMouseUp === null || onCellMouseUp === void 0 ? void 0 : onCellMouseUp(e, selectedCells);
|
|
4878
5279
|
}
|
|
4879
5280
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4880
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5281
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-content', {
|
|
4881
5282
|
'disabled': !isInteractive
|
|
4882
5283
|
}),
|
|
4883
5284
|
style: {
|
|
@@ -4888,7 +5289,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4888
5289
|
userSelect: 'none'
|
|
4889
5290
|
}
|
|
4890
5291
|
}, "\xA0")), 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", {
|
|
4891
|
-
className: "
|
|
5292
|
+
className: "custom-event-tl__day__eventadd ".concat(cellAddBtnClassName || '')
|
|
4892
5293
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
4893
5294
|
href: "#",
|
|
4894
5295
|
tabIndex: -1,
|
|
@@ -4924,6 +5325,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4924
5325
|
}, function () {
|
|
4925
5326
|
return setShowEdit(true);
|
|
4926
5327
|
}, 'new');
|
|
5328
|
+
|
|
5329
|
+
// set temporary date
|
|
5330
|
+
setTempDate(_dateShow);
|
|
4927
5331
|
}
|
|
4928
5332
|
}
|
|
4929
5333
|
}
|
|
@@ -4973,7 +5377,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4973
5377
|
} else {
|
|
4974
5378
|
// colIndex
|
|
4975
5379
|
var colIndex = 0;
|
|
4976
|
-
|
|
5380
|
+
var _getCells3 = getCells(),
|
|
5381
|
+
forwardFillTotal = _getCells3.forwardFillTotal,
|
|
5382
|
+
cellsList = _getCells3.list;
|
|
5383
|
+
return cellsList.map(function (item, j) {
|
|
4977
5384
|
return item.col.map(function (dayIndex, i) {
|
|
4978
5385
|
colIndex++;
|
|
4979
5386
|
|
|
@@ -5028,8 +5435,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5028
5435
|
var tableGridEl = tableGridRef.current;
|
|
5029
5436
|
|
|
5030
5437
|
// initialize cell height
|
|
5031
|
-
var headerTitleTrElements = tableGridEl.querySelector('.
|
|
5032
|
-
var trElements = tableGridEl.querySelector('.
|
|
5438
|
+
var headerTitleTrElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__title tbody').getElementsByTagName('tr');
|
|
5439
|
+
var trElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content tbody').getElementsByTagName('tr');
|
|
5033
5440
|
for (var i = 0; i < headerTitleTrElements.length; i++) {
|
|
5034
5441
|
var targetElement = headerTitleTrElements[i].offsetHeight > trElements[i].offsetHeight ? headerTitleTrElements[i] : trElements[i];
|
|
5035
5442
|
var tdOHeight = window.getComputedStyle(targetElement).height;
|
|
@@ -5037,12 +5444,26 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5037
5444
|
trElements[i].style.height = tdOHeight;
|
|
5038
5445
|
}
|
|
5039
5446
|
}
|
|
5447
|
+
function outerWrapperInit() {
|
|
5448
|
+
var _rootRef$current$pare;
|
|
5449
|
+
if (rootRef.current === null) return;
|
|
5450
|
+
|
|
5451
|
+
// calculate wrapper width
|
|
5452
|
+
var wrapperWidth = ((_rootRef$current$pare = rootRef.current.parentElement) === null || _rootRef$current$pare === void 0 ? void 0 : _rootRef$current$pare.offsetWidth) || 0;
|
|
5453
|
+
if (rootRef.current && wrapperWidth > 0 && rootWidth.current === 0) {
|
|
5454
|
+
rootWidth.current = wrapperWidth;
|
|
5455
|
+
rootRef.current.style.width = wrapperWidth + 'px';
|
|
5456
|
+
}
|
|
5457
|
+
}
|
|
5040
5458
|
function tableGridInit() {
|
|
5041
5459
|
//
|
|
5042
5460
|
if (tableGridRef.current === null) return;
|
|
5461
|
+
var _getCells4 = getCells(),
|
|
5462
|
+
forwardFillTotal = _getCells4.forwardFillTotal,
|
|
5463
|
+
cellsList = _getCells4.list;
|
|
5043
5464
|
var tableGridEl = tableGridRef.current;
|
|
5044
5465
|
var _curCellMinWidth = CELL_MIN_W;
|
|
5045
|
-
var _curColCount = FILL_BLANK_DATE_DISABLD ? days[month] : 7 *
|
|
5466
|
+
var _curColCount = FILL_BLANK_DATE_DISABLD ? days[month] : 7 * cellsList.length;
|
|
5046
5467
|
if (appearanceMode === 'week') {
|
|
5047
5468
|
_curColCount = 7;
|
|
5048
5469
|
}
|
|
@@ -5054,15 +5475,15 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5054
5475
|
//--------------
|
|
5055
5476
|
if (appearanceMode === 'week') {
|
|
5056
5477
|
var tableMaxWidth = tableGridEl.clientWidth;
|
|
5057
|
-
var tableHeaderTitleWidth = tableGridEl.querySelector('.
|
|
5058
|
-
var tableDividerWidth = tableGridEl.querySelector('.
|
|
5478
|
+
var tableHeaderTitleWidth = tableGridEl.querySelector('.custom-event-tl-table__cell-cushion-headertitle').clientWidth;
|
|
5479
|
+
var tableDividerWidth = tableGridEl.querySelector('.custom-event-tl-table__timeline-divider').clientWidth;
|
|
5059
5480
|
var tableBorderWidth = 4;
|
|
5060
5481
|
var scrollMaxWidth = tableMaxWidth - tableHeaderTitleWidth - tableDividerWidth - tableBorderWidth;
|
|
5061
5482
|
_curCellMinWidth = scrollMaxWidth / 7;
|
|
5062
5483
|
_curColCount = 7;
|
|
5063
5484
|
|
|
5064
5485
|
// header
|
|
5065
|
-
tableGridEl.querySelectorAll('.
|
|
5486
|
+
tableGridEl.querySelectorAll('.custom-event-tl-table__cell-cushion-headercontent__container, .custom-event-tl-table__cell-cushion-content').forEach(function (node) {
|
|
5066
5487
|
node.style.width = _curCellMinWidth + 'px';
|
|
5067
5488
|
});
|
|
5068
5489
|
}
|
|
@@ -5081,17 +5502,17 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5081
5502
|
//****************
|
|
5082
5503
|
// initialize "header & main" cells
|
|
5083
5504
|
//--------------
|
|
5084
|
-
var headerThContentContainers = tableGridEl.querySelector('.
|
|
5505
|
+
var headerThContentContainers = tableGridEl.querySelector('.custom-event-tl-table__datagrid-header__content tbody').getElementsByTagName('th');
|
|
5085
5506
|
for (var i = 0; i < headerThContentContainers.length; i++) {
|
|
5086
|
-
var curHeaderThContent = headerThContentContainers[i].querySelector('.
|
|
5507
|
+
var curHeaderThContent = headerThContentContainers[i].querySelector('.custom-event-tl-table__cell-cushion-headercontent');
|
|
5087
5508
|
if (curHeaderThContent !== null) curHeaderThContent.style.width = _curCellMinWidth + 'px';
|
|
5088
5509
|
}
|
|
5089
|
-
var mainTdContentContainers = tableGridEl.querySelector('.
|
|
5510
|
+
var mainTdContentContainers = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content tbody').getElementsByTagName('td');
|
|
5090
5511
|
for (var _i2 = 0; _i2 < mainTdContentContainers.length; _i2++) {
|
|
5091
|
-
var _curHeaderThContent = mainTdContentContainers[_i2].querySelector('.
|
|
5512
|
+
var _curHeaderThContent = mainTdContentContainers[_i2].querySelector('.custom-event-tl-table__cell-cushion-content');
|
|
5092
5513
|
if (_curHeaderThContent !== null) _curHeaderThContent.style.width = _curCellMinWidth + 'px';
|
|
5093
5514
|
}
|
|
5094
|
-
var mainTdContentCols = tableGridEl.querySelector('.
|
|
5515
|
+
var mainTdContentCols = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content colgroup').getElementsByTagName('col');
|
|
5095
5516
|
for (var _i3 = 0; _i3 < mainTdContentCols.length; _i3++) {
|
|
5096
5517
|
mainTdContentCols[_i3].style.minWidth = _curCellMinWidth + 'px';
|
|
5097
5518
|
}
|
|
@@ -5101,20 +5522,20 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5101
5522
|
//****************
|
|
5102
5523
|
// initialize scrollable wrapper (width)
|
|
5103
5524
|
//--------------
|
|
5104
|
-
var _scrollableWrapper = tableGridEl.querySelectorAll('.
|
|
5525
|
+
var _scrollableWrapper = tableGridEl.querySelectorAll('.custom-event-tl-table__scroller-harness');
|
|
5105
5526
|
[].slice.call(_scrollableWrapper).forEach(function (el) {
|
|
5106
5527
|
var scrollType = el.dataset.scroll;
|
|
5107
5528
|
if (appearanceMode === 'week') {
|
|
5108
|
-
el.classList.add('
|
|
5529
|
+
el.classList.add('custom-event-tl-table__scroller-harness--hideX');
|
|
5109
5530
|
}
|
|
5110
5531
|
if (appearanceMode === 'month') {
|
|
5111
|
-
el.classList.remove('
|
|
5532
|
+
el.classList.remove('custom-event-tl-table__scroller-harness--hideX');
|
|
5112
5533
|
}
|
|
5113
5534
|
if (scrollType !== 'list') {
|
|
5114
|
-
var _content = el.querySelector('.
|
|
5535
|
+
var _content = el.querySelector('.custom-event-tl-table__scroller');
|
|
5115
5536
|
var _tableMaxWidth = tableGridEl.clientWidth;
|
|
5116
|
-
var _tableHeaderTitleWidth = tableGridEl.querySelector('.
|
|
5117
|
-
var _tableDividerWidth = tableGridEl.querySelector('.
|
|
5537
|
+
var _tableHeaderTitleWidth = tableGridEl.querySelector('.custom-event-tl-table__cell-cushion-headertitle').clientWidth;
|
|
5538
|
+
var _tableDividerWidth = tableGridEl.querySelector('.custom-event-tl-table__timeline-divider').clientWidth;
|
|
5118
5539
|
var _tableBorderWidth = 4;
|
|
5119
5540
|
var _scrollMaxWidth = _tableMaxWidth - _tableHeaderTitleWidth - _tableDividerWidth - _tableBorderWidth;
|
|
5120
5541
|
el.dataset.width = _scrollMaxWidth;
|
|
@@ -5128,10 +5549,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5128
5549
|
//****************
|
|
5129
5550
|
// initialize cell width
|
|
5130
5551
|
//--------------
|
|
5131
|
-
var tdElementMaxWidth = typeof mainTdContentContainers[0] === 'undefined' ? 0 : parseFloat(window.getComputedStyle(mainTdContentContainers[0].querySelector('.
|
|
5552
|
+
var tdElementMaxWidth = typeof mainTdContentContainers[0] === 'undefined' ? 0 : parseFloat(window.getComputedStyle(mainTdContentContainers[0].querySelector('.custom-event-tl-table__cell-cushion-content')).maxWidth);
|
|
5132
5553
|
if (Array.isArray(eventsValue) && eventsValue.length > 0) {
|
|
5133
5554
|
for (var _i4 = 0; _i4 < headerThContentContainers.length; _i4++) {
|
|
5134
|
-
var _curHeaderThContent2 = headerThContentContainers[_i4].querySelector('.
|
|
5555
|
+
var _curHeaderThContent2 = headerThContentContainers[_i4].querySelector('.custom-event-tl-table__cell-cushion-headercontent');
|
|
5135
5556
|
var curHeaderThContentMaxWidth = parseFloat(window.getComputedStyle(_curHeaderThContent2).width);
|
|
5136
5557
|
var targetElement = headerThContentContainers[_i4].offsetWidth > mainTdContentContainers[_i4].offsetWidth ? headerThContentContainers[_i4] : mainTdContentContainers[_i4];
|
|
5137
5558
|
var tdOwidth = parseFloat(window.getComputedStyle(targetElement).width);
|
|
@@ -5148,7 +5569,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5148
5569
|
|
|
5149
5570
|
// Prevent the width from being +1 each time it is initialized
|
|
5150
5571
|
tdOwidth = tdOwidth - 1;
|
|
5151
|
-
headerThContentContainers[_i4].querySelector('.
|
|
5572
|
+
headerThContentContainers[_i4].querySelector('.custom-event-tl-table__cell-cushion-headercontent').style.width = tdOwidth + 'px';
|
|
5152
5573
|
mainTdContentCols[_i4].style.minWidth = tdOwidth + 'px';
|
|
5153
5574
|
}
|
|
5154
5575
|
}
|
|
@@ -5159,7 +5580,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5159
5580
|
// initialize max width of table content
|
|
5160
5581
|
//--------------
|
|
5161
5582
|
if (scrollBodyRef.current !== null && scrollHeaderRef.current !== null) {
|
|
5162
|
-
var tableContentWidth = window.getComputedStyle(tableGridEl.querySelector('.
|
|
5583
|
+
var tableContentWidth = window.getComputedStyle(tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content')).width;
|
|
5163
5584
|
var scrollBodyEl = scrollBodyRef.current;
|
|
5164
5585
|
var scrollHeaderEl = scrollHeaderRef.current;
|
|
5165
5586
|
scrollBodyEl.style.width = tableContentWidth;
|
|
@@ -5170,7 +5591,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5170
5591
|
//
|
|
5171
5592
|
var tableWrapperMaxWidthLatest = tableGridEl.clientWidth;
|
|
5172
5593
|
if (tableWrapperMaxWidthLatest > parseFloat(tableContentWidth)) {
|
|
5173
|
-
tableGridEl.querySelector('.
|
|
5594
|
+
tableGridEl.querySelector('.custom-event-tl-table__timeline-table').style.width = tableContentWidth;
|
|
5174
5595
|
}
|
|
5175
5596
|
}
|
|
5176
5597
|
|
|
@@ -5211,20 +5632,20 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5211
5632
|
//--------------
|
|
5212
5633
|
if (appearanceMode === 'week') {
|
|
5213
5634
|
var _tableMaxWidth2 = tableGridEl.clientWidth;
|
|
5214
|
-
var _tableHeaderTitleWidth2 = tableGridEl.querySelector('.
|
|
5215
|
-
var _tableDividerWidth2 = tableGridEl.querySelector('.
|
|
5635
|
+
var _tableHeaderTitleWidth2 = tableGridEl.querySelector('.custom-event-tl-table__cell-cushion-headertitle').clientWidth;
|
|
5636
|
+
var _tableDividerWidth2 = tableGridEl.querySelector('.custom-event-tl-table__timeline-divider').clientWidth;
|
|
5216
5637
|
var _tableBorderWidth2 = 4;
|
|
5217
5638
|
var _scrollMaxWidth2 = _tableMaxWidth2 - _tableHeaderTitleWidth2 - _tableDividerWidth2 - _tableBorderWidth2;
|
|
5218
5639
|
_curCellMinWidth = _scrollMaxWidth2 / 7;
|
|
5219
5640
|
_curColCount = 7;
|
|
5220
5641
|
|
|
5221
5642
|
// header content
|
|
5222
|
-
tableGridEl.querySelectorAll('.
|
|
5643
|
+
tableGridEl.querySelectorAll('.custom-event-tl-table__cell-cushion-headercontent__container, .custom-event-tl-table__cell-cushion-headercontent').forEach(function (node) {
|
|
5223
5644
|
node.style.width = _curCellMinWidth + 'px';
|
|
5224
5645
|
});
|
|
5225
5646
|
|
|
5226
5647
|
// main content
|
|
5227
|
-
tableGridEl.querySelectorAll('.
|
|
5648
|
+
tableGridEl.querySelectorAll('.custom-event-tl-table__cell-cushion-content').forEach(function (node) {
|
|
5228
5649
|
node.style.width = _curCellMinWidth + 'px';
|
|
5229
5650
|
});
|
|
5230
5651
|
}
|
|
@@ -5235,9 +5656,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5235
5656
|
|
|
5236
5657
|
// initialize scrollable wrapper (width & height)
|
|
5237
5658
|
//--------------
|
|
5238
|
-
var _scrollableWrapper = tableGridEl.querySelectorAll('.
|
|
5659
|
+
var _scrollableWrapper = tableGridEl.querySelectorAll('.custom-event-tl-table__scroller-harness');
|
|
5239
5660
|
[].slice.call(_scrollableWrapper).forEach(function (el) {
|
|
5240
|
-
var _content = el.querySelector('.
|
|
5661
|
+
var _content = el.querySelector('.custom-event-tl-table__scroller');
|
|
5241
5662
|
el.removeAttribute('data-width');
|
|
5242
5663
|
el.removeAttribute('style');
|
|
5243
5664
|
_content.removeAttribute('style');
|
|
@@ -5245,8 +5666,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5245
5666
|
|
|
5246
5667
|
// initialize cell height
|
|
5247
5668
|
//--------------
|
|
5248
|
-
var headerTitleTrElements = tableGridEl.querySelector('.
|
|
5249
|
-
var trElements = tableGridEl.querySelector('.
|
|
5669
|
+
var headerTitleTrElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__title tbody').getElementsByTagName('tr');
|
|
5670
|
+
var trElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content tbody').getElementsByTagName('tr');
|
|
5250
5671
|
for (var i = 0; i < headerTitleTrElements.length; i++) {
|
|
5251
5672
|
headerTitleTrElements[i].removeAttribute('style');
|
|
5252
5673
|
trElements[i].removeAttribute('style');
|
|
@@ -5276,15 +5697,18 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5276
5697
|
});
|
|
5277
5698
|
}, [year]);
|
|
5278
5699
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5700
|
+
var _getCells5 = getCells(),
|
|
5701
|
+
forwardFillTotal = _getCells5.forwardFillTotal,
|
|
5702
|
+
cellsList = _getCells5.list;
|
|
5279
5703
|
if (typeof appearanceWeekTmpl === 'function') {
|
|
5280
|
-
setDisplayWeekForHeader([
|
|
5704
|
+
setDisplayWeekForHeader([cellsList.at(0).dateInfo[0].date, cellsList.at(-1).dateInfo[0].date]);
|
|
5281
5705
|
} else {
|
|
5282
|
-
setDisplayWeekForHeader([formatToEnglishMonthDay(
|
|
5706
|
+
setDisplayWeekForHeader([formatToEnglishMonthDay(cellsList.at(0).dateInfo[0].date), formatToEnglishMonthDay(cellsList.at(-1).dateInfo[0].date)]);
|
|
5283
5707
|
}
|
|
5284
5708
|
}, [weekOffset]);
|
|
5285
5709
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5286
5710
|
// update events value
|
|
5287
|
-
if (Array.isArray(eventsValue) && eventsValue.length > 0)
|
|
5711
|
+
if (Array.isArray(eventsValue) && eventsValue.length > 0) setOrginalData(eventsValue);
|
|
5288
5712
|
|
|
5289
5713
|
// update current today
|
|
5290
5714
|
if (typeof customTodayDate !== 'undefined' && (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.isValidDate)(customTodayDate)) {
|
|
@@ -5294,19 +5718,34 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5294
5718
|
|
|
5295
5719
|
// Call a function when the list has been rendered completely
|
|
5296
5720
|
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
5721
|
+
}, [eventsValue, customTodayDate, appearanceMode]);
|
|
5722
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5723
|
+
// calculate wrapper width (!!!FIRST!!!)
|
|
5724
|
+
//--------------
|
|
5725
|
+
outerWrapperInit();
|
|
5726
|
+
|
|
5727
|
+
// !!!Please do not use dependencies
|
|
5728
|
+
//--------------
|
|
5297
5729
|
return function () {
|
|
5298
5730
|
// reset table grid
|
|
5299
5731
|
tableGridReset();
|
|
5732
|
+
|
|
5733
|
+
// reset selection area
|
|
5734
|
+
setSelectedCells([]);
|
|
5735
|
+
setCopiedCells(null);
|
|
5300
5736
|
};
|
|
5301
|
-
}, [
|
|
5737
|
+
}, []);
|
|
5302
5738
|
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", {
|
|
5303
|
-
|
|
5739
|
+
ref: rootRef,
|
|
5740
|
+
className: "custom-event-tl__outerwrapper"
|
|
5741
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5742
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl__wrapper custom-event-tl__wrapper--".concat(appearanceMode), calendarWrapperClassName)
|
|
5304
5743
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5305
|
-
className: "
|
|
5744
|
+
className: "custom-event-tl__header bg-body-tertiary"
|
|
5306
5745
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5307
5746
|
tabIndex: -1,
|
|
5308
5747
|
type: "button",
|
|
5309
|
-
className: "
|
|
5748
|
+
className: "custom-event-tl__btn custom-event-tl__btn--prev",
|
|
5310
5749
|
onClick: handlePrevChange
|
|
5311
5750
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
5312
5751
|
width: "20px",
|
|
@@ -5317,13 +5756,13 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5317
5756
|
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",
|
|
5318
5757
|
fill: "#000"
|
|
5319
5758
|
}))), appearanceMode === 'week' ? /*#__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", {
|
|
5320
|
-
className: "
|
|
5759
|
+
className: "custom-event-tl__header__info"
|
|
5321
5760
|
}, typeof appearanceWeekTmpl === 'function' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, appearanceWeekTmpl(displayWeekForHeader[0], displayWeekForHeader[1])) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, displayWeekForHeader[0], " - ", displayWeekForHeader[1]))) : null, appearanceMode === 'month' ? /*#__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", {
|
|
5322
|
-
className: "
|
|
5761
|
+
className: "custom-event-tl__header__btns"
|
|
5323
5762
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5324
5763
|
tabIndex: -1,
|
|
5325
5764
|
type: "button",
|
|
5326
|
-
className: "
|
|
5765
|
+
className: "custom-event-tl__btn ".concat(winMonth ? 'active' : ''),
|
|
5327
5766
|
onClick: handleShowWinMonth
|
|
5328
5767
|
}, MONTHS[month], /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
5329
5768
|
width: "12px",
|
|
@@ -5335,7 +5774,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5335
5774
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5336
5775
|
tabIndex: -1,
|
|
5337
5776
|
type: "button",
|
|
5338
|
-
className: "
|
|
5777
|
+
className: "custom-event-tl__btn ".concat(winYear ? 'active' : ''),
|
|
5339
5778
|
onClick: handleShowWinYear
|
|
5340
5779
|
}, year, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
5341
5780
|
width: "12px",
|
|
@@ -5347,7 +5786,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5347
5786
|
}))))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5348
5787
|
tabIndex: -1,
|
|
5349
5788
|
type: "button",
|
|
5350
|
-
className: "
|
|
5789
|
+
className: "custom-event-tl__btn custom-event-tl__btn--next",
|
|
5351
5790
|
onClick: handleNextChange
|
|
5352
5791
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
5353
5792
|
width: "20px",
|
|
@@ -5358,66 +5797,69 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5358
5797
|
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",
|
|
5359
5798
|
fill: "#000"
|
|
5360
5799
|
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5361
|
-
className: "
|
|
5800
|
+
className: "custom-event-tl__body"
|
|
5362
5801
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5363
|
-
className: "
|
|
5802
|
+
className: "custom-event-tl__row"
|
|
5364
5803
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5365
|
-
className: "
|
|
5804
|
+
className: "custom-event-tl__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winMonth ? 'active' : '')
|
|
5366
5805
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5367
|
-
className: "
|
|
5806
|
+
className: "custom-event-tl__month-container"
|
|
5368
5807
|
}, MONTHS_FULL.map(function (month, index) {
|
|
5369
5808
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5370
5809
|
"data-month": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(index + 1),
|
|
5371
|
-
className: "
|
|
5810
|
+
className: "custom-event-tl__month ".concat(selectedMonth === index ? ' selected' : ''),
|
|
5372
5811
|
key: month + index,
|
|
5373
5812
|
onClick: function onClick() {
|
|
5374
5813
|
handleMonthChange(index);
|
|
5375
5814
|
}
|
|
5376
5815
|
}, month);
|
|
5377
5816
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5378
|
-
className: "
|
|
5817
|
+
className: "custom-event-tl__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winYear ? 'active' : '')
|
|
5379
5818
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5380
|
-
className: "
|
|
5819
|
+
className: "custom-event-tl__year-container bg-body-tertiary"
|
|
5381
5820
|
}, yearsArray.map(function (year, index) {
|
|
5382
5821
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5383
5822
|
"data-year": year,
|
|
5384
|
-
className: "
|
|
5823
|
+
className: "custom-event-tl__year ".concat(selectedYear === year ? ' selected' : ''),
|
|
5385
5824
|
key: year + index,
|
|
5386
5825
|
onClick: function onClick() {
|
|
5387
5826
|
handleYearChange(year);
|
|
5388
5827
|
}
|
|
5389
5828
|
}, year);
|
|
5390
5829
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5391
|
-
className: "
|
|
5830
|
+
className: "custom-event-tl__today-wrapper p-2"
|
|
5392
5831
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5393
5832
|
tabIndex: -1,
|
|
5394
5833
|
type: "button",
|
|
5395
|
-
className: "
|
|
5834
|
+
className: "custom-event-tl__btn custom-event-tl__btn--today",
|
|
5396
5835
|
onClick: handleTodayChange
|
|
5397
5836
|
}, langToday || 'Today'), appearanceToggle ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5398
5837
|
tabIndex: -1,
|
|
5399
5838
|
type: "button",
|
|
5400
|
-
className: "
|
|
5839
|
+
className: "custom-event-tl__btn custom-event-tl__btn--appearance ".concat(appearanceMode === 'month' ? 'active' : ''),
|
|
5401
5840
|
"data-mode": "month",
|
|
5402
5841
|
onClick: handleAppearanceChange
|
|
5403
5842
|
}, langAppearanceLabelMonth || 'Month'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
5404
5843
|
tabIndex: -1,
|
|
5405
5844
|
type: "button",
|
|
5406
|
-
className: "
|
|
5845
|
+
className: "custom-event-tl__btn custom-event-tl__btn--appearance ".concat(appearanceMode === 'week' ? 'active' : ''),
|
|
5407
5846
|
"data-mode": "week",
|
|
5408
5847
|
onClick: handleAppearanceChange
|
|
5409
|
-
}, langAppearanceLabelWeek || 'Week')) : null)),
|
|
5848
|
+
}, langAppearanceLabelWeek || 'Week')) : null)), orginalData.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", {
|
|
5410
5849
|
ref: tableGridRef,
|
|
5411
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("
|
|
5850
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--".concat(appearanceMode, " invisible"), tableWrapperClassName),
|
|
5412
5851
|
onKeyDown: function onKeyDown(e) {
|
|
5413
5852
|
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e, selectedCells);
|
|
5853
|
+
|
|
5854
|
+
// Copy & Paste
|
|
5855
|
+
handleWrapperKeyDown(e);
|
|
5414
5856
|
},
|
|
5415
5857
|
tabIndex: -1 // require "tabIndex" attribute
|
|
5416
5858
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
5417
5859
|
role: "grid",
|
|
5418
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("
|
|
5860
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__timeline-table", tableClassName)
|
|
5419
5861
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", {
|
|
5420
|
-
className: "
|
|
5862
|
+
className: "custom-event-tl-table__datagrid-header"
|
|
5421
5863
|
}), /*#__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", {
|
|
5422
5864
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableHeadClassName),
|
|
5423
5865
|
ref: tableGridHeaderRef,
|
|
@@ -5427,10 +5869,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5427
5869
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
5428
5870
|
role: "presentation"
|
|
5429
5871
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5430
|
-
className: "
|
|
5872
|
+
className: "custom-event-tl-table__timeline-header custom-event-tl-table__timeline-headertitle"
|
|
5431
5873
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
5432
5874
|
role: "presentation",
|
|
5433
|
-
className: "
|
|
5875
|
+
className: "custom-event-tl-table__datagrid-header__title"
|
|
5434
5876
|
}, /*#__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", {
|
|
5435
5877
|
role: "presentation"
|
|
5436
5878
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
@@ -5438,55 +5880,55 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5438
5880
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
5439
5881
|
role: "columnheader"
|
|
5440
5882
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5441
|
-
className: "
|
|
5883
|
+
className: "custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-headertitle"
|
|
5442
5884
|
}, tableListSectionTitle || ''))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
5443
5885
|
role: "presentation",
|
|
5444
|
-
className: "
|
|
5886
|
+
className: "custom-event-tl-table__timeline-divider"
|
|
5445
5887
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", {
|
|
5446
5888
|
role: "presentation"
|
|
5447
5889
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5448
5890
|
ref: scrollHeaderRef,
|
|
5449
|
-
className: "
|
|
5891
|
+
className: "custom-event-tl-table__scroller-harness custom-event-tl-table__scroller-harness--hide",
|
|
5450
5892
|
"data-scroll": "header",
|
|
5451
5893
|
onScroll: syncTableScrollHeader
|
|
5452
5894
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5453
|
-
className: "
|
|
5895
|
+
className: "custom-event-tl-table__scroller"
|
|
5454
5896
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5455
|
-
className: "
|
|
5897
|
+
className: "custom-event-tl-table__timeline-header"
|
|
5456
5898
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
5457
|
-
className: "
|
|
5899
|
+
className: "custom-event-tl-table__datagrid-header__content custom-event-tl-table__scrollgrid-sync-table"
|
|
5458
5900
|
}, /*#__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", {
|
|
5459
5901
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableBodyClassName),
|
|
5460
5902
|
role: "rowgroup"
|
|
5461
5903
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
5462
5904
|
role: "presentation",
|
|
5463
|
-
className: "
|
|
5905
|
+
className: "custom-event-tl-table__list-section"
|
|
5464
5906
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
5465
5907
|
role: "presentation",
|
|
5466
5908
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableListStartClassName)
|
|
5467
5909
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5468
5910
|
ref: scrollListRef,
|
|
5469
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5911
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__scroller-harness', {
|
|
5470
5912
|
'autoscroll': AUTO_SCROLL
|
|
5471
5913
|
}),
|
|
5472
5914
|
"data-scroll": "list",
|
|
5473
5915
|
onScroll: syncTableScrollList
|
|
5474
5916
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5475
|
-
className: "
|
|
5917
|
+
className: "custom-event-tl-table__scroller"
|
|
5476
5918
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
5477
5919
|
role: "presentation",
|
|
5478
|
-
className: "
|
|
5920
|
+
className: "custom-event-tl-table__datagrid-body__title custom-event-tl-table__scrollgrid-sync-table"
|
|
5479
5921
|
}, /*#__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", {
|
|
5480
5922
|
role: "presentation"
|
|
5481
5923
|
}, generateListSectionUi()))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
5482
5924
|
role: "presentation",
|
|
5483
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5925
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__timeline-divider', tableListDividerClassName)
|
|
5484
5926
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
5485
5927
|
role: "presentation",
|
|
5486
5928
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)(tableListEndClassName)
|
|
5487
5929
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5488
5930
|
ref: scrollBodyRef,
|
|
5489
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('
|
|
5931
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__scroller-harness', {
|
|
5490
5932
|
'autoscroll': AUTO_SCROLL
|
|
5491
5933
|
}),
|
|
5492
5934
|
"data-scroll": "body",
|
|
@@ -5496,19 +5938,20 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5496
5938
|
onMouseUp: BODY_DRAG ? handleTableDragEnd : function () {},
|
|
5497
5939
|
onMouseLeave: BODY_DRAG ? handleTableDragEnd : function () {}
|
|
5498
5940
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5499
|
-
className: "
|
|
5941
|
+
className: "custom-event-tl-table__scroller"
|
|
5500
5942
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5501
|
-
className: "
|
|
5943
|
+
className: "custom-event-tl-table__timeline-body"
|
|
5502
5944
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
5503
|
-
className: "
|
|
5945
|
+
className: "custom-event-tl-table__datagrid-body__content custom-event-tl-table__scrollgrid-sync-table"
|
|
5504
5946
|
/* Drag to activate the selection area */,
|
|
5505
5947
|
onMouseLeave: multipleCells ? handleTableMainMouseUp : undefined,
|
|
5506
5948
|
onMouseUp: multipleCells ? handleTableMainMouseUp : undefined
|
|
5507
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, generateColUi()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null,
|
|
5949
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, generateColUi()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null, orginalData.map(function (item, i) {
|
|
5508
5950
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
5509
5951
|
key: i
|
|
5510
5952
|
}, generateDaysUi(item.eventSources, item.listSection, i, true));
|
|
5511
|
-
})))))))))))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
|
|
5953
|
+
}))))))))))))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
|
|
5954
|
+
ref: modalDeleteHandleRef,
|
|
5512
5955
|
show: showDelete,
|
|
5513
5956
|
maskOpacity: modalMaskOpacity,
|
|
5514
5957
|
triggerClassName: "",
|
|
@@ -5521,10 +5964,12 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5521
5964
|
setTimeout(function () {
|
|
5522
5965
|
setShowDelete(false);
|
|
5523
5966
|
onModalDeleteClose === null || onModalDeleteClose === void 0 ? void 0 : onModalDeleteClose(queryItemObj());
|
|
5967
|
+
// set temporary date
|
|
5968
|
+
setTempDate('');
|
|
5524
5969
|
}, 350);
|
|
5525
5970
|
},
|
|
5526
5971
|
onSubmit: /*#__PURE__*/function () {
|
|
5527
|
-
var
|
|
5972
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, closewin, data) {
|
|
5528
5973
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5529
5974
|
while (1) switch (_context.prev = _context.next) {
|
|
5530
5975
|
case 0:
|
|
@@ -5541,10 +5986,11 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5541
5986
|
}, _callee);
|
|
5542
5987
|
}));
|
|
5543
5988
|
return function (_x2, _x3, _x4) {
|
|
5544
|
-
return
|
|
5989
|
+
return _ref20.apply(this, arguments);
|
|
5545
5990
|
};
|
|
5546
5991
|
}()
|
|
5547
5992
|
}, modalDeleteContent || 'Are you sure?'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
|
|
5993
|
+
ref: modalEditHandleRef,
|
|
5548
5994
|
show: showEdit,
|
|
5549
5995
|
maskOpacity: modalMaskOpacity,
|
|
5550
5996
|
heading: modalHeading,
|
|
@@ -5560,10 +6006,12 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5560
6006
|
setTimeout(function () {
|
|
5561
6007
|
setShowEdit(false);
|
|
5562
6008
|
onModalEditClose === null || onModalEditClose === void 0 ? void 0 : onModalEditClose(queryItemObj());
|
|
6009
|
+
// set temporary date
|
|
6010
|
+
setTempDate('');
|
|
5563
6011
|
}, 350);
|
|
5564
6012
|
},
|
|
5565
6013
|
onSubmit: /*#__PURE__*/function () {
|
|
5566
|
-
var
|
|
6014
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, closewin, data) {
|
|
5567
6015
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
5568
6016
|
while (1) switch (_context2.prev = _context2.next) {
|
|
5569
6017
|
case 0:
|
|
@@ -5580,7 +6028,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5580
6028
|
}, _callee2);
|
|
5581
6029
|
}));
|
|
5582
6030
|
return function (_x5, _x6, _x7) {
|
|
5583
|
-
return
|
|
6031
|
+
return _ref21.apply(this, arguments);
|
|
5584
6032
|
};
|
|
5585
6033
|
}()
|
|
5586
6034
|
}, modalContent)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default()), {
|
|
@@ -5588,8 +6036,8 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5588
6036
|
containerClassName: "EventCalendarTimeline-TooltipModal"
|
|
5589
6037
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5590
6038
|
ref: tableTooltipModalRef,
|
|
5591
|
-
id: "
|
|
5592
|
-
className: "
|
|
6039
|
+
id: "custom-event-tl-table__cell-tooltipwrapper-".concat(idRes),
|
|
6040
|
+
className: "custom-event-tl-table__cell-tooltipwrapper d-inline-block ".concat(isShowTableTooltip ? 'active' : ''),
|
|
5593
6041
|
role: "tooltip",
|
|
5594
6042
|
"data-microtip-position": tableTooltipDirection || 'bottom',
|
|
5595
6043
|
"data-microtip-size": tableTooltipSize || 'auto',
|
|
@@ -5597,7 +6045,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5597
6045
|
display: 'none'
|
|
5598
6046
|
}
|
|
5599
6047
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5600
|
-
className: "
|
|
6048
|
+
className: "custom-event-tl-table__cell-tooltipcontent"
|
|
5601
6049
|
}, tableTooltipContent))));
|
|
5602
6050
|
};
|
|
5603
6051
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EventCalendarTimeline);
|