UNPKG

devexpress-gantt

Version:

DevExpress Gantt Control

1,149 lines (1,092 loc) 922 kB
/*! * DevExpress Gantt (dx-gantt) * Version: 3.0.20 * Build date: Tue May 23 2023 * * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["Gantt"] = factory(); else root["DevExpress"] = root["DevExpress"] || {}, root["DevExpress"]["Gantt"] = factory(); })(this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 88); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__createBinding", function() { return __createBinding; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArray", function() { return __spreadArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var string_1 = __webpack_require__(42); function isDefined(value) { return value !== undefined && value !== null; } exports.isDefined = isDefined; function boolToInt(value) { return value ? 1 : 0; } exports.boolToInt = boolToInt; function boolToString(value) { return value ? '1' : '0'; } exports.boolToString = boolToString; function isNumber(obj) { return typeof obj === 'number'; } exports.isNumber = isNumber; function isString(obj) { return typeof obj === 'string'; } exports.isString = isString; function isNonNullString(str) { return !!str; } exports.isNonNullString = isNonNullString; function isEven(num) { return (num % 2) !== 0; } exports.isEven = isEven; function isOdd(num) { return (num % 2) === 0; } exports.isOdd = isOdd; function numberToStringBin(num, minLength) { if (minLength === void 0) { minLength = 0; } return string_1.StringUtils.padLeft(num.toString(2), minLength, '0'); } exports.numberToStringBin = numberToStringBin; function numberToStringHex(num, minLength) { if (minLength === void 0) { minLength = 0; } return string_1.StringUtils.padLeft(num.toString(16), minLength, '0'); } exports.numberToStringHex = numberToStringHex; /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MouseEventSource = exports.TaskTitlePosition = exports.Position = exports.ViewType = void 0; var ViewType; (function (ViewType) { ViewType[ViewType["TenMinutes"] = 0] = "TenMinutes"; ViewType[ViewType["Hours"] = 1] = "Hours"; ViewType[ViewType["SixHours"] = 2] = "SixHours"; ViewType[ViewType["Days"] = 3] = "Days"; ViewType[ViewType["Weeks"] = 4] = "Weeks"; ViewType[ViewType["Months"] = 5] = "Months"; ViewType[ViewType["Quarter"] = 6] = "Quarter"; ViewType[ViewType["Years"] = 7] = "Years"; ViewType[ViewType["FiveYears"] = 8] = "FiveYears"; })(ViewType = exports.ViewType || (exports.ViewType = {})); var Position; (function (Position) { Position[Position["Left"] = 0] = "Left"; Position[Position["Top"] = 1] = "Top"; Position[Position["Right"] = 2] = "Right"; Position[Position["Bottom"] = 3] = "Bottom"; })(Position = exports.Position || (exports.Position = {})); var TaskTitlePosition; (function (TaskTitlePosition) { TaskTitlePosition[TaskTitlePosition["Inside"] = 0] = "Inside"; TaskTitlePosition[TaskTitlePosition["Outside"] = 1] = "Outside"; TaskTitlePosition[TaskTitlePosition["None"] = 2] = "None"; })(TaskTitlePosition = exports.TaskTitlePosition || (exports.TaskTitlePosition = {})); var MouseEventSource; (function (MouseEventSource) { MouseEventSource[MouseEventSource["TaskArea"] = 0] = "TaskArea"; MouseEventSource[MouseEventSource["TaskEdit_Frame"] = 1] = "TaskEdit_Frame"; MouseEventSource[MouseEventSource["TaskEdit_Progress"] = 2] = "TaskEdit_Progress"; MouseEventSource[MouseEventSource["TaskEdit_Start"] = 3] = "TaskEdit_Start"; MouseEventSource[MouseEventSource["TaskEdit_End"] = 4] = "TaskEdit_End"; MouseEventSource[MouseEventSource["TaskEdit_DependencyStart"] = 5] = "TaskEdit_DependencyStart"; MouseEventSource[MouseEventSource["TaskEdit_DependencyFinish"] = 6] = "TaskEdit_DependencyFinish"; MouseEventSource[MouseEventSource["Successor_Wrapper"] = 7] = "Successor_Wrapper"; MouseEventSource[MouseEventSource["Successor_DependencyStart"] = 8] = "Successor_DependencyStart"; MouseEventSource[MouseEventSource["Successor_DependencyFinish"] = 9] = "Successor_DependencyFinish"; })(MouseEventSource = exports.MouseEventSource || (exports.MouseEventSource = {})); /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var browser_1 = __webpack_require__(8); var common_1 = __webpack_require__(1); var math_1 = __webpack_require__(58); var string_1 = __webpack_require__(42); var DomUtils = (function () { function DomUtils() { } DomUtils.clearInnerHtml = function (element) { while (element.firstChild) element.removeChild(element.firstChild); }; DomUtils.setStylePosition = function (style, point) { style.left = math_1.MathUtils.round(point.x, 3) + 'px'; style.top = math_1.MathUtils.round(point.y, 3) + 'px'; }; DomUtils.setStyleSize = function (style, size) { style.width = math_1.MathUtils.round(size.width, 3) + 'px'; style.height = math_1.MathUtils.round(size.height, 3) + 'px'; }; DomUtils.setStyleSizeAndPosition = function (style, rectangle) { DomUtils.setStylePosition(style, rectangle); DomUtils.setStyleSize(style, rectangle); }; DomUtils.hideNode = function (node) { if (node) { var parentNode = node.parentNode; if (parentNode) parentNode.removeChild(node); } }; DomUtils.isHTMLElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; }; DomUtils.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; }; DomUtils.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; }; DomUtils.isHTMLTableRowElement = function (element) { return element.tagName === 'TR'; }; DomUtils.isItParent = function (parentElement, element) { if (!parentElement || !element) return false; while (element) { if (element === parentElement) return true; if (element.tagName === 'BODY') return false; element = element.parentNode; } return false; }; DomUtils.getParentByTagName = function (element, tagName) { tagName = tagName.toUpperCase(); while (element) { if (element.tagName === 'BODY') return null; if (element.tagName === tagName) return element; element = element.parentNode; } return null; }; DomUtils.getDocumentScrollTop = function () { var isScrollBodyIE = browser_1.Browser.IE && DomUtils.getCurrentStyle(document.body).overflow === 'hidden' && document.body.scrollTop > 0; if (browser_1.Browser.WebKitFamily || browser_1.Browser.Edge || isScrollBodyIE) { if (browser_1.Browser.MacOSMobilePlatform) return window.pageYOffset; if (browser_1.Browser.WebKitFamily) return document.documentElement.scrollTop || document.body.scrollTop; return document.body.scrollTop; } else return document.documentElement.scrollTop; }; DomUtils.getDocumentScrollLeft = function () { var isScrollBodyIE = browser_1.Browser.IE && DomUtils.getCurrentStyle(document.body).overflow === 'hidden' && document.body.scrollLeft > 0; if (browser_1.Browser.Edge || isScrollBodyIE) return document.body ? document.body.scrollLeft : document.documentElement.scrollLeft; if (browser_1.Browser.WebKitFamily) return document.documentElement.scrollLeft || document.body.scrollLeft; return document.documentElement.scrollLeft; }; DomUtils.getCurrentStyle = function (element) { if (element.currentStyle) return element.currentStyle; else if (document.defaultView && document.defaultView.getComputedStyle) { var result = document.defaultView.getComputedStyle(element, null); if (!result && browser_1.Browser.Firefox && window.frameElement) { var changes = []; var curElement = window.frameElement; while (!(result = document.defaultView.getComputedStyle(element, null))) { changes.push([curElement, curElement.style.display]); curElement.style.setProperty('display', 'block', 'important'); curElement = curElement.tagName === 'BODY' ? curElement.ownerDocument.defaultView.frameElement : curElement.parentNode; } result = cloneObject(result); for (var ch = void 0, i = 0; ch = changes[i]; i++) ch[0].style.display = ch[1]; document.body.offsetWidth; } return result; } return window.getComputedStyle(element, null); }; DomUtils.setFocus = function (element) { function focusCore() { try { element.focus(); if (browser_1.Browser.IE && document.activeElement !== element) element.focus(); } catch (e) { } } if (browser_1.Browser.MacOSMobilePlatform) focusCore(); else { setTimeout(function () { focusCore(); }, 100); } }; DomUtils.hasClassName = function (element, className) { try { var classNames = className.split(' '); var classList = element.classList; if (classList) { for (var i = classNames.length - 1; i >= 0; i--) { if (!classList.contains(classNames[i])) return false; } } else { var elementClassName = element.getAttribute && element.getAttribute('class'); if (!elementClassName) return false; var elementClasses = elementClassName.split(' '); for (var i = classNames.length - 1; i >= 0; i--) { if (elementClasses.indexOf(classNames[i]) < 0) return false; } } return true; } catch (e) { return false; } }; DomUtils.addClassName = function (element, className) { if (!DomUtils.hasClassName(element, className)) { var elementClassName = element.getAttribute && element.getAttribute('class'); element.setAttribute('class', elementClassName === '' ? className : elementClassName + " " + className); } }; DomUtils.removeClassName = function (element, className) { var elementClassName = element.getAttribute && element.getAttribute('class'); var updClassName = " " + elementClassName + " "; var newClassName = updClassName.replace(" " + className + " ", ' '); if (updClassName.length !== newClassName.length) element.setAttribute('class', string_1.StringUtils.trim(newClassName)); }; DomUtils.toggleClassName = function (element, className, toggle) { if (toggle === undefined) { if (DomUtils.hasClassName(element, className)) DomUtils.removeClassName(element, className); else DomUtils.addClassName(element, className); } else { if (toggle) DomUtils.addClassName(element, className); else DomUtils.removeClassName(element, className); } }; DomUtils.pxToInt = function (px) { return pxToNumber(px, parseInt); }; DomUtils.pxToFloat = function (px) { return pxToNumber(px, parseFloat); }; DomUtils.getAbsolutePositionY = function (element) { function getAbsolutePositionY_IE(element) { return browser_1.Browser.IE && element.parentNode === null ? 0 : element.getBoundingClientRect().top + DomUtils.getDocumentScrollTop(); } function getAbsolutePositionY_FF3(element) { return Math.round(element.getBoundingClientRect().top + DomUtils.getDocumentScrollTop()); } function getAbsolutePositionY_Opera(curEl) { var isFirstCycle = true; if (curEl && DomUtils.isHTMLTableRowElement(curEl) && curEl.cells.length > 0) curEl = curEl.cells[0]; var pos = getAbsoluteScrollOffset_OperaFF(curEl, false); while (curEl != null) { pos += curEl.offsetTop; if (!isFirstCycle) pos -= curEl.scrollTop; curEl = curEl.offsetParent; isFirstCycle = false; } pos += document.body.scrollTop; return pos; } function getAbsolutePositionY_NS(curEl) { var pos = getAbsoluteScrollOffset_OperaFF(curEl, false); var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetTop; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollTop; if (!isFirstCycle && browser_1.Browser.Firefox) { var style = DomUtils.getCurrentStyle(curEl); if (curEl.tagName === 'DIV' && style.overflow !== 'visible') pos += DomUtils.pxToInt(style.borderTopWidth); } isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } function getAbsolutePositionY_Other(curEl) { var pos = 0; var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetTop; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollTop; isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } if (!element) return 0; if (browser_1.Browser.IE) return getAbsolutePositionY_IE(element); else if (browser_1.Browser.Firefox && browser_1.Browser.Version >= 3) return getAbsolutePositionY_FF3(element); else if (browser_1.Browser.Opera) return getAbsolutePositionY_Opera(element); else if (browser_1.Browser.NetscapeFamily && (!browser_1.Browser.Firefox || browser_1.Browser.Version < 3)) return getAbsolutePositionY_NS(element); else if (browser_1.Browser.WebKitFamily || browser_1.Browser.Edge) return getAbsolutePositionY_FF3(element); return getAbsolutePositionY_Other(element); }; DomUtils.getAbsolutePositionX = function (element) { function getAbsolutePositionX_IE(element) { return browser_1.Browser.IE && element.parentNode === null ? 0 : element.getBoundingClientRect().left + DomUtils.getDocumentScrollLeft(); } function getAbsolutePositionX_FF3(element) { return Math.round(element.getBoundingClientRect().left + DomUtils.getDocumentScrollLeft()); } function getAbsolutePositionX_Opera(curEl) { var isFirstCycle = true; var pos = getAbsoluteScrollOffset_OperaFF(curEl, true); while (curEl != null) { pos += curEl.offsetLeft; if (!isFirstCycle) pos -= curEl.scrollLeft; curEl = curEl.offsetParent; isFirstCycle = false; } pos += document.body.scrollLeft; return pos; } function getAbsolutePositionX_NS(curEl) { var pos = getAbsoluteScrollOffset_OperaFF(curEl, true); var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetLeft; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollLeft; if (!isFirstCycle && browser_1.Browser.Firefox) { var style = DomUtils.getCurrentStyle(curEl); if (curEl.tagName === 'DIV' && style.overflow !== 'visible') pos += DomUtils.pxToInt(style.borderLeftWidth); } isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } function getAbsolutePositionX_Other(curEl) { var pos = 0; var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetLeft; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollLeft; isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } if (!element) return 0; if (browser_1.Browser.IE) return getAbsolutePositionX_IE(element); else if (browser_1.Browser.Firefox && browser_1.Browser.Version >= 3) return getAbsolutePositionX_FF3(element); else if (browser_1.Browser.Opera && browser_1.Browser.Version <= 12) return getAbsolutePositionX_Opera(element); else if (browser_1.Browser.NetscapeFamily && (!browser_1.Browser.Firefox || browser_1.Browser.Version < 3)) return getAbsolutePositionX_NS(element); else if (browser_1.Browser.WebKitFamily || browser_1.Browser.Edge) return getAbsolutePositionX_FF3(element); else return getAbsolutePositionX_Other(element); }; DomUtils.isInteractiveControl = function (element) { return ['A', 'INPUT', 'SELECT', 'OPTION', 'TEXTAREA', 'BUTTON', 'IFRAME'].indexOf(element.tagName) > -1; }; DomUtils.getClearClientHeight = function (element) { return element.offsetHeight - (DomUtils.getTopBottomPaddings(element) + DomUtils.getVerticalBordersWidth(element)); }; DomUtils.getTopBottomPaddings = function (element, style) { var currentStyle = style ? style : DomUtils.getCurrentStyle(element); return DomUtils.pxToInt(currentStyle.paddingTop) + DomUtils.pxToInt(currentStyle.paddingBottom); }; DomUtils.getVerticalBordersWidth = function (element, style) { if (!common_1.isDefined(style)) style = (browser_1.Browser.IE && browser_1.Browser.MajorVersion !== 9 && window.getComputedStyle) ? window.getComputedStyle(element) : DomUtils.getCurrentStyle(element); var res = 0; if (style.borderTopStyle !== 'none') res += DomUtils.pxToFloat(style.borderTopWidth); if (style.borderBottomStyle !== 'none') res += DomUtils.pxToFloat(style.borderBottomWidth); return res; }; DomUtils.getNodes = function (parent, predicate) { var collection = parent.all || parent.getElementsByTagName('*'); var result = []; for (var i = 0; i < collection.length; i++) { var element = collection[i]; if (predicate(element)) result.push(element); } return result; }; DomUtils.getChildNodes = function (parent, predicate) { var collection = parent.childNodes; var result = []; for (var i = 0; i < collection.length; i++) { var element = collection[i]; if (predicate(element)) result.push(element); } return result; }; DomUtils.getNodesByClassName = function (parent, className) { if (parent.querySelectorAll) { var children = parent.querySelectorAll("." + className); var result_1 = []; children.forEach(function (element) { return result_1.push(element); }); return result_1; } else return DomUtils.getNodes(parent, function (elem) { return DomUtils.hasClassName(elem, className); }); }; DomUtils.getChildNodesByClassName = function (parent, className) { function nodeListToArray(nodeList, filter) { var result = []; for (var i = 0; i < nodeList.length; i++) { var element = nodeList[i]; if (filter(element)) result.push(element); } return result; } if (parent.querySelectorAll) { var children = parent.querySelectorAll("." + className); return nodeListToArray(children, function (element) { return element.parentNode === parent; }); } else { return DomUtils.getChildNodes(parent, function (elem) { if (DomUtils.isElementNode(elem)) return common_1.isNonNullString(elem.className) && DomUtils.hasClassName(elem, elem.className); else return false; }); } }; DomUtils.getVerticalScrollBarWidth = function () { if (DomUtils.verticalScrollBarWidth === undefined) { var container = document.createElement('DIV'); container.style.cssText = 'position: absolute; top: 0px; left: 0px; visibility: hidden; width: 200px; height: 150px; overflow: hidden; box-sizing: content-box'; document.body.appendChild(container); var child = document.createElement('P'); container.appendChild(child); child.style.cssText = 'width: 100%; height: 200px;'; var widthWithoutScrollBar = child.offsetWidth; container.style.overflow = 'scroll'; var widthWithScrollBar = child.offsetWidth; if (widthWithoutScrollBar === widthWithScrollBar) widthWithScrollBar = container.clientWidth; DomUtils.verticalScrollBarWidth = widthWithoutScrollBar - widthWithScrollBar; document.body.removeChild(container); } return DomUtils.verticalScrollBarWidth; }; DomUtils.getHorizontalBordersWidth = function (element, style) { if (!common_1.isDefined(style)) style = (browser_1.Browser.IE && window.getComputedStyle) ? window.getComputedStyle(element) : DomUtils.getCurrentStyle(element); var res = 0; if (style.borderLeftStyle !== 'none') res += DomUtils.pxToFloat(style.borderLeftWidth); if (style.borderRightStyle !== 'none') res += DomUtils.pxToFloat(style.borderRightWidth); return res; }; DomUtils.getFontFamiliesFromCssString = function (cssString) { return cssString.split(',').map(function (fam) { return string_1.StringUtils.trim(fam.replace(/'|"/gi, '')); }); }; DomUtils.getInnerText = function (container) { if (browser_1.Browser.Safari && browser_1.Browser.MajorVersion <= 5) { if (DomUtils.html2PlainTextFilter === null) { DomUtils.html2PlainTextFilter = document.createElement('DIV'); DomUtils.html2PlainTextFilter.style.width = '0'; DomUtils.html2PlainTextFilter.style.height = '0'; DomUtils.html2PlainTextFilter.style.overflow = 'visible'; DomUtils.html2PlainTextFilter.style.display = 'none'; document.body.appendChild(DomUtils.html2PlainTextFilter); } var filter = DomUtils.html2PlainTextFilter; filter.innerHTML = container.innerHTML; filter.style.display = ''; var innerText = filter.innerText; filter.style.display = 'none'; return innerText; } else if (browser_1.Browser.NetscapeFamily || browser_1.Browser.WebKitFamily || (browser_1.Browser.IE && browser_1.Browser.Version >= 9) || browser_1.Browser.Edge) return container.textContent; else return container.innerText; }; DomUtils.html2PlainTextFilter = null; DomUtils.verticalScrollBarWidth = undefined; return DomUtils; }()); exports.DomUtils = DomUtils; function cloneObject(srcObject) { if (typeof (srcObject) !== 'object' || !common_1.isDefined(srcObject)) return srcObject; var newObject = {}; for (var i in srcObject) newObject[i] = srcObject[i]; return newObject; } function pxToNumber(px, parseFunction) { var result = 0; if (common_1.isDefined(px) && px !== '') { try { var indexOfPx = px.indexOf('px'); if (indexOfPx > -1) result = parseFunction(px.substr(0, indexOfPx)); } catch (e) { } } return result; } function getAbsoluteScrollOffset_OperaFF(curEl, isX) { var pos = 0; var isFirstCycle = true; while (curEl != null) { if (curEl.tagName === 'BODY') break; var style = DomUtils.getCurrentStyle(curEl); if (style.position === 'absolute') break; if (!isFirstCycle && curEl.tagName === 'DIV' && (style.position === '' || style.position === 'static')) pos -= isX ? curEl.scrollLeft : curEl.scrollTop; curEl = curEl.parentNode; isFirstCycle = false; } return pos; } /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Point = (function () { function Point(x, y) { this.x = x; this.y = y; } Point.zero = function () { return new Point(0, 0); }; Point.fromNumber = function (num) { return new Point(num, num); }; Point.prototype.isZero = function () { return this.x === 0 && this.y === 0; }; Point.prototype.toString = function () { return JSON.stringify(this); }; Point.prototype.copyFrom = function (obj) { this.x = obj.x; this.y = obj.y; }; Point.prototype.clone = function () { return new Point(this.x, this.y); }; Point.prototype.equals = function (obj) { return this.x === obj.x && this.y === obj.y; }; Point.prototype.offset = function (offsetX, offsetY) { this.x += offsetX; this.y += offsetY; return this; }; Point.prototype.offsetByPoint = function (offset) { this.x += offset.x; this.y += offset.y; return this; }; Point.prototype.multiply = function (multiplierX, multiplierY) { this.x *= multiplierX; this.y *= multiplierY; return this; }; Point.prototype.negative = function () { this.x *= -1; this.y *= -1; return this; }; Point.prototype.applyConverter = function (converter) { this.x = converter(this.x); this.y = converter(this.y); return this; }; Point.plus = function (a, b) { return new Point(a.x + b.x, a.y + b.y); }; Point.minus = function (a, b) { return new Point(a.x - b.x, a.y - b.y); }; Point.xComparer = function (a, b) { return a.x - b.x; }; Point.yComparer = function (a, b) { return a.y - b.y; }; Point.equals = function (a, b) { return a.x === b.x && a.y === b.y; }; return Point; }()); exports.Point = Point; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommandBase = void 0; var CommandBase = (function () { function CommandBase(control) { this.control = control; } Object.defineProperty(CommandBase.prototype, "modelManipulator", { get: function () { return this.control.modelManipulator; }, enumerable: false, configurable: true }); Object.defineProperty(CommandBase.prototype, "history", { get: function () { return this.control.history; }, enumerable: false, configurable: true }); Object.defineProperty(CommandBase.prototype, "validationController", { get: function () { return this.control.validationController; }, enumerable: false, configurable: true }); Object.defineProperty(CommandBase.prototype, "state", { get: function () { if (!this._state) this._state = this.getState(); return this._state; }, enumerable: false, configurable: true }); CommandBase.prototype.execute = function () { var parameters = []; for (var _i = 0; _i < arguments.length; _i++) { parameters[_i] = arguments[_i]; } if (!this.state.enabled) return false; var executed = this.executeInternal.apply(this, parameters); if (executed) this.control.barManager.updateItemsState([]); return executed; }; CommandBase.prototype.isEnabled = function () { return this.control.settings.editing.enabled; }; CommandBase.prototype.executeInternal = function () { var parameters = []; for (var _i = 0; _i < arguments.length; _i++) { parameters[_i] = arguments[_i]; } throw new Error("Not implemented"); }; return CommandBase; }()); exports.CommandBase = CommandBase; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SimpleCommandState = void 0; var SimpleCommandState = (function () { function SimpleCommandState(enabled, value) { this.visible = true; this.enabled = enabled; this.value = value; } return SimpleCommandState; }()); exports.SimpleCommandState = SimpleCommandState; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DateTimeUtils = void 0; var Time_1 = __webpack_require__(67); var TimeRange_1 = __webpack_require__(68); var common_1 = __webpack_require__(1); var DateRange_1 = __webpack_require__(14); var DayOfWeekMonthlyOccurrence_1 = __webpack_require__(69); var DateTimeUtils = (function () { function DateTimeUtils() { } DateTimeUtils.compareDates = function (date1, date2) { if (!date1 || !date2) return -1; return date2.getTime() - date1.getTi