jqwidgets-ng 19.2.2 → 20.0.0
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/esm2020/jqxinput/angular_jqxinput.mjs +25 -3
- package/fesm2015/jqwidgets-ng-jqxinput.mjs +25 -3
- package/fesm2020/jqwidgets-ng-jqxinput.mjs +25 -3
- package/jqwidgets/jqx-all.js +13 -13
- package/jqwidgets/jqxangular.js +1 -1
- package/jqwidgets/jqxbarcode.js +1 -1
- package/jqwidgets/jqxbargauge.js +2 -2
- package/jqwidgets/jqxbulletchart.js +1 -1
- package/jqwidgets/jqxbuttongroup.js +1 -1
- package/jqwidgets/jqxbuttons.js +2 -2
- package/jqwidgets/jqxcalendar.js +1 -1
- package/jqwidgets/jqxchart.annotations.js +1 -1
- package/jqwidgets/jqxchart.api.js +1 -1
- package/jqwidgets/jqxchart.core.js +1 -1
- package/jqwidgets/jqxchart.js +1 -1
- package/jqwidgets/jqxchart.rangeselector.js +1 -1
- package/jqwidgets/jqxchart.waterfall.js +1 -1
- package/jqwidgets/jqxcheckbox.js +1 -1
- package/jqwidgets/jqxcheckboxgroup.js +1 -1
- package/jqwidgets/jqxcolorpicker.js +1 -1
- package/jqwidgets/jqxcombobox.js +1 -1
- package/jqwidgets/jqxcomplexinput.js +1 -1
- package/jqwidgets/jqxcore.js +1 -1
- package/jqwidgets/jqxdata.export.js +1 -1
- package/jqwidgets/jqxdata.js +1 -1
- package/jqwidgets/jqxdatatable.js +2 -2
- package/jqwidgets/jqxdate.js +1 -1
- package/jqwidgets/jqxdatetimeinput.js +1 -1
- package/jqwidgets/jqxdocking.js +1 -1
- package/jqwidgets/jqxdockinglayout.js +1 -1
- package/jqwidgets/jqxdockpanel.js +1 -1
- package/jqwidgets/jqxdragdrop.js +1 -1
- package/jqwidgets/jqxdraw.js +1 -1
- package/jqwidgets/jqxdropdownbutton.js +1 -1
- package/jqwidgets/jqxdropdownlist.js +2 -2
- package/jqwidgets/jqxeditor.js +1 -1
- package/jqwidgets/jqxexpander.js +1 -1
- package/jqwidgets/jqxfileupload.js +1 -1
- package/jqwidgets/jqxform.js +1 -1
- package/jqwidgets/jqxformattedinput.js +1 -1
- package/jqwidgets/jqxgantt.js +1 -1
- package/jqwidgets/jqxgauge.js +1 -1
- package/jqwidgets/jqxgrid.aggregates.js +1 -1
- package/jqwidgets/jqxgrid.columnsreorder.js +1 -1
- package/jqwidgets/jqxgrid.columnsresize.js +1 -1
- package/jqwidgets/jqxgrid.edit.js +1 -1
- package/jqwidgets/jqxgrid.export.js +1 -1
- package/jqwidgets/jqxgrid.filter.js +2 -2
- package/jqwidgets/jqxgrid.grouping.js +1 -1
- package/jqwidgets/jqxgrid.js +2 -2
- package/jqwidgets/jqxgrid.pager.js +1 -1
- package/jqwidgets/jqxgrid.selection.js +2 -2
- package/jqwidgets/jqxgrid.sort.js +1 -1
- package/jqwidgets/jqxgrid.storage.js +1 -1
- package/jqwidgets/jqxheatmap.js +1 -1
- package/jqwidgets/jqxinput.js +2 -2
- package/jqwidgets/jqxkanban.js +2 -2
- package/jqwidgets/jqxknob.js +1 -1
- package/jqwidgets/jqxknockout.js +1 -1
- package/jqwidgets/jqxlayout.js +1 -1
- package/jqwidgets/jqxlistbox.js +1 -1
- package/jqwidgets/jqxlistmenu.js +1 -1
- package/jqwidgets/jqxloader.js +1 -1
- package/jqwidgets/jqxmaskedinput.js +1 -1
- package/jqwidgets/jqxmenu.js +1 -1
- package/jqwidgets/jqxnavbar.js +1 -1
- package/jqwidgets/jqxnavigationbar.js +1 -1
- package/jqwidgets/jqxnotification.js +1 -1
- package/jqwidgets/jqxnumberinput.js +1 -1
- package/jqwidgets/jqxpanel.js +1 -1
- package/jqwidgets/jqxpasswordinput.js +1 -1
- package/jqwidgets/jqxpivot.js +1 -1
- package/jqwidgets/jqxpivotdesigner.js +2 -2
- package/jqwidgets/jqxpivotgrid.js +1 -1
- package/jqwidgets/jqxpopover.js +1 -1
- package/jqwidgets/jqxprogressbar.js +1 -1
- package/jqwidgets/jqxqrcode.js +1 -1
- package/jqwidgets/jqxradiobutton.js +1 -1
- package/jqwidgets/jqxradiobuttongroup.js +2 -2
- package/jqwidgets/jqxrangeselector.js +1 -1
- package/jqwidgets/jqxrating.js +1 -1
- package/jqwidgets/jqxresponsivepanel.js +1 -1
- package/jqwidgets/jqxribbon.js +1 -1
- package/jqwidgets/jqxscheduler.api.js +1 -1
- package/jqwidgets/jqxscheduler.js +1 -1
- package/jqwidgets/jqxscrollbar.js +1 -1
- package/jqwidgets/jqxscrollview.js +1 -1
- package/jqwidgets/jqxslider.js +1 -1
- package/jqwidgets/jqxsortable.js +1 -1
- package/jqwidgets/jqxsplitter.js +1 -1
- package/jqwidgets/jqxswitchbutton.js +1 -1
- package/jqwidgets/jqxtabs.js +2 -2
- package/jqwidgets/jqxtagcloud.js +1 -1
- package/jqwidgets/jqxtextarea.js +1 -1
- package/jqwidgets/jqxtimeline.js +1 -1
- package/jqwidgets/jqxtimepicker.js +1 -1
- package/jqwidgets/jqxtoolbar.js +1 -1
- package/jqwidgets/jqxtooltip.js +1 -1
- package/jqwidgets/jqxtouch.js +1 -1
- package/jqwidgets/jqxtree.js +1 -1
- package/jqwidgets/jqxtreegrid.js +1 -1
- package/jqwidgets/jqxtreemap.js +1 -1
- package/jqwidgets/jqxvalidator.js +1 -1
- package/jqwidgets/jqxwindow.js +1 -1
- package/jqwidgets/modules/jqxbarcode.js +48 -36
- package/jqwidgets/modules/jqxbargauge.js +67 -39
- package/jqwidgets/modules/jqxbulletchart.js +85 -41
- package/jqwidgets/modules/jqxbuttongroup.js +73 -39
- package/jqwidgets/modules/jqxbuttons.js +54 -36
- package/jqwidgets/modules/jqxcalendar.js +96 -43
- package/jqwidgets/modules/jqxchart.js +189 -53
- package/jqwidgets/modules/jqxcheckbox.js +92 -42
- package/jqwidgets/modules/jqxcheckboxgroup.js +92 -42
- package/jqwidgets/modules/jqxcolorpicker.js +111 -45
- package/jqwidgets/modules/jqxcombobox.js +149 -51
- package/jqwidgets/modules/jqxcomplexinput.js +73 -39
- package/jqwidgets/modules/jqxdatatable.js +343 -84
- package/jqwidgets/modules/jqxdatetimeinput.js +266 -69
- package/jqwidgets/modules/jqxdocking.js +92 -42
- package/jqwidgets/modules/jqxdockinglayout.js +167 -53
- package/jqwidgets/modules/jqxdockpanel.js +73 -39
- package/jqwidgets/modules/jqxdragdrop.js +90 -40
- package/jqwidgets/modules/jqxdraw.js +47 -35
- package/jqwidgets/modules/jqxdropdownbutton.js +73 -39
- package/jqwidgets/modules/jqxdropdownlist.js +248 -67
- package/jqwidgets/modules/jqxeditor.js +360 -83
- package/jqwidgets/modules/jqxexpander.js +113 -47
- package/jqwidgets/modules/jqxfileupload.js +67 -39
- package/jqwidgets/modules/jqxform.js +325 -80
- package/jqwidgets/modules/jqxformattedinput.js +251 -70
- package/jqwidgets/modules/jqxgantt.js +50 -38
- package/jqwidgets/modules/jqxgauge.js +110 -44
- package/jqwidgets/modules/jqxgrid.js +4452 -3974
- package/jqwidgets/modules/jqxheatmap.js +67 -39
- package/jqwidgets/modules/jqxinput.js +1263 -989
- package/jqwidgets/modules/jqxkanban.js +1557 -1273
- package/jqwidgets/modules/jqxknob.js +91 -41
- package/jqwidgets/modules/jqxlayout.js +167 -53
- package/jqwidgets/modules/jqxlineargauge.js +110 -44
- package/jqwidgets/modules/jqxlinkbutton.js +54 -36
- package/jqwidgets/modules/jqxlistbox.js +171 -54
- package/jqwidgets/modules/jqxlistmenu.js +307 -78
- package/jqwidgets/modules/jqxloader.js +48 -36
- package/jqwidgets/modules/jqxmaskedinput.js +48 -36
- package/jqwidgets/modules/jqxmenu.js +150 -52
- package/jqwidgets/modules/jqxnavbar.js +113 -47
- package/jqwidgets/modules/jqxnavigationbar.js +188 -58
- package/jqwidgets/modules/jqxnotification.js +129 -47
- package/jqwidgets/modules/jqxnumberinput.js +187 -57
- package/jqwidgets/modules/jqxpanel.js +110 -44
- package/jqwidgets/modules/jqxpasswordinput.js +128 -46
- package/jqwidgets/modules/jqxpivotdesigner.js +382 -89
- package/jqwidgets/modules/jqxpivotgrid.js +382 -89
- package/jqwidgets/modules/jqxpopover.js +73 -39
- package/jqwidgets/modules/jqxprogressbar.js +48 -36
- package/jqwidgets/modules/jqxqrcode.js +106 -46
- package/jqwidgets/modules/jqxradiobutongroup.js +93 -43
- package/jqwidgets/modules/jqxradiobutton.js +73 -39
- package/jqwidgets/modules/jqxrangeselector.js +85 -41
- package/jqwidgets/modules/jqxrating.js +73 -39
- package/jqwidgets/modules/jqxrepeatbutton.js +54 -36
- package/jqwidgets/modules/jqxresponsivepanel.js +67 -39
- package/jqwidgets/modules/jqxribbon.js +92 -42
- package/jqwidgets/modules/jqxscheduler.js +1572 -971
- package/jqwidgets/modules/jqxscrollbar.js +10627 -91161
- package/jqwidgets/modules/jqxscrollview.js +72 -38
- package/jqwidgets/modules/jqxslider.js +72 -38
- package/jqwidgets/modules/jqxsortable.js +72 -38
- package/jqwidgets/modules/jqxsplitlayout.js +2022 -2082
- package/jqwidgets/modules/jqxsplitter.js +72 -38
- package/jqwidgets/modules/jqxswitchbutton.js +109 -43
- package/jqwidgets/modules/jqxtabs.js +169 -55
- package/jqwidgets/modules/jqxtagcloud.js +128 -46
- package/jqwidgets/modules/jqxtextarea.js +128 -46
- package/jqwidgets/modules/jqxtimeline.js +48 -36
- package/jqwidgets/modules/jqxtimepicker.js +65 -37
- package/jqwidgets/modules/jqxtogglebutton.js +54 -36
- package/jqwidgets/modules/jqxtoolbar.js +1507 -1032
- package/jqwidgets/modules/jqxtooltip.js +47 -35
- package/jqwidgets/modules/jqxtree.js +6451 -187
- package/jqwidgets/modules/jqxtreegrid.js +361 -86
- package/jqwidgets/modules/jqxtreemap.js +84 -40
- package/jqwidgets/modules/jqxvalidator.js +109 -43
- package/jqwidgets/modules/jqxwindow.js +73 -39
- package/jqwidgets/styles/gantt/jqx.gantt.css +98 -98
- package/jqwidgets/styles/jqx.base.css +20 -20
- package/jqwidgets.d.ts +2 -0
- package/jqxinput/angular_jqxinput.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* Release Date:
|
|
3
|
-
Copyright (c) 2011-2024 jQWidgets.
|
|
4
|
-
License: https://jqwidgets.com/license/ */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/******/ (() => { // webpackBootstrap
|
|
8
|
-
var __webpack_exports__ = {};
|
|
9
|
-
|
|
10
|
-
/* Release Date: 28-May-2024
|
|
11
|
-
Copyright (c) 2011-2024 jQWidgets.
|
|
12
|
-
License: https://jqwidgets.com/license/ */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/******/ (() => { // webpackBootstrap
|
|
16
|
-
var __webpack_exports__ = {};
|
|
17
|
-
|
|
18
|
-
/* Release Date: 28-May-2024
|
|
2
|
+
/* Release Date: Sep-17-2024
|
|
19
3
|
Copyright (c) 2011-2024 jQWidgets.
|
|
20
4
|
License: https://jqwidgets.com/license/ */
|
|
21
5
|
|
|
@@ -24,7 +8,7 @@ License: https://jqwidgets.com/license/ */
|
|
|
24
8
|
/******/ var __webpack_modules__ = ({
|
|
25
9
|
|
|
26
10
|
/***/ 5459:
|
|
27
|
-
/***/ ((module, exports,
|
|
11
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
28
12
|
|
|
29
13
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disable */
|
|
30
14
|
/* eslint-disable */
|
|
@@ -8204,7 +8188,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
8204
8188
|
// file names, and JQXLite is normally delivered in a lowercase file name.
|
|
8205
8189
|
// Do this after creating the global so that if an AMD module wants to call
|
|
8206
8190
|
// noConflict to hide this version of JQXLite, it will work.
|
|
8207
|
-
if (
|
|
8191
|
+
if ( true && __webpack_require__.amdO.JQXLite) {
|
|
8208
8192
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return JQXLite; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
8209
8193
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
8210
8194
|
}
|
|
@@ -11379,2519 +11363,2475 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
11379
11363
|
}
|
|
11380
11364
|
})(jqxBaseFramework);
|
|
11381
11365
|
})();
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
/***/ }),
|
|
11385
|
-
|
|
11386
|
-
/***/ 40:
|
|
11387
|
-
/***/ (() => {
|
|
11388
|
-
|
|
11389
|
-
/*
|
|
11390
|
-
jQWidgets v19.0.0 (2024-Feb)
|
|
11391
|
-
Copyright (c) 2011-2024 jQWidgets.
|
|
11392
|
-
License: https://jqwidgets.com/license/
|
|
11393
|
-
*/
|
|
11394
|
-
/* eslint-disable */
|
|
11395
|
-
|
|
11396
|
-
/*
|
|
11397
|
-
jQWidgets v17.0.0 (2023-Aug)
|
|
11398
|
-
Copyright (c) 2011-2023 jQWidgets.
|
|
11399
|
-
License: https://jqwidgets.com/license/
|
|
11400
|
-
*/
|
|
11401
|
-
/* eslint-disable */
|
|
11402
11366
|
|
|
11403
|
-
/*
|
|
11404
|
-
jQWidgets v16.0.0 (2023-Mar)
|
|
11405
|
-
Copyright (c) 2011-2023 jQWidgets.
|
|
11406
|
-
License: https://jqwidgets.com/license/
|
|
11407
|
-
*/
|
|
11408
|
-
/* eslint-disable */
|
|
11409
|
-
|
|
11410
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
11411
|
-
|
|
11412
|
-
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
|
11413
|
-
|
|
11414
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
11415
11367
|
|
|
11416
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11417
11368
|
|
|
11418
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
11419
11369
|
|
|
11420
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11421
11370
|
|
|
11422
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11423
11371
|
|
|
11424
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11425
11372
|
|
|
11426
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11427
11373
|
|
|
11428
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11429
11374
|
|
|
11430
|
-
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
11431
11375
|
|
|
11432
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
11433
11376
|
|
|
11434
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11435
11377
|
|
|
11436
|
-
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
11437
11378
|
|
|
11438
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11439
11379
|
|
|
11440
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11441
11380
|
|
|
11442
|
-
/* tslint:disable */
|
|
11443
11381
|
|
|
11382
|
+
|
|
11383
|
+
|
|
11384
|
+
/***/ }),
|
|
11385
|
+
|
|
11386
|
+
/***/ 40:
|
|
11387
|
+
/***/ (() => {
|
|
11388
|
+
|
|
11389
|
+
/* tslint:disable */
|
|
11444
11390
|
/* eslint-disable */
|
|
11391
|
+
(function(){
|
|
11392
|
+
if (typeof document === 'undefined') {
|
|
11393
|
+
return;
|
|
11394
|
+
}
|
|
11445
11395
|
if (!window.JQX) {
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11396
|
+
window.JQX = {
|
|
11397
|
+
Utilities: {
|
|
11398
|
+
Core: {
|
|
11399
|
+
isMobile() {
|
|
11400
|
+
var isMobile = /(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());
|
|
11401
|
+
var iOS = function () {
|
|
11402
|
+
return [
|
|
11403
|
+
'iPad Simulator',
|
|
11404
|
+
'iPhone Simulator',
|
|
11405
|
+
'iPod Simulator',
|
|
11406
|
+
'iPad',
|
|
11407
|
+
'iPhone',
|
|
11408
|
+
'iPod'
|
|
11409
|
+
].includes(navigator.platform)
|
|
11410
|
+
// iPad on iOS 13 detection
|
|
11411
|
+
|| (navigator.userAgent.includes('Mac') && 'ontouchend' in document)
|
|
11412
|
+
}
|
|
11413
|
+
|
|
11414
|
+
if (!isMobile) {
|
|
11415
|
+
return iOS();
|
|
11416
|
+
}
|
|
11417
|
+
|
|
11418
|
+
return isMobile;
|
|
11419
|
+
}
|
|
11420
|
+
}
|
|
11462
11421
|
}
|
|
11463
|
-
}
|
|
11464
11422
|
}
|
|
11465
|
-
};
|
|
11466
11423
|
}
|
|
11467
11424
|
|
|
11468
|
-
var LayoutItem = /*#__PURE__*/function (_HTMLElement) {
|
|
11469
|
-
"use strict";
|
|
11470
11425
|
|
|
11471
|
-
|
|
11426
|
+
class LayoutItem extends HTMLElement {
|
|
11427
|
+
constructor() {
|
|
11428
|
+
super();
|
|
11472
11429
|
|
|
11473
|
-
|
|
11430
|
+
this._properties = {
|
|
11431
|
+
'min': 50,
|
|
11432
|
+
'label': 'Item',
|
|
11433
|
+
'modifiers': ['resize', 'drag', 'close'],
|
|
11434
|
+
'size': null
|
|
11435
|
+
}
|
|
11436
|
+
}
|
|
11474
11437
|
|
|
11475
|
-
|
|
11476
|
-
|
|
11438
|
+
_setProperty(property, value) {
|
|
11439
|
+
var that = this;
|
|
11477
11440
|
|
|
11478
|
-
|
|
11441
|
+
if (that._properties[property] === value) {
|
|
11442
|
+
return;
|
|
11443
|
+
}
|
|
11479
11444
|
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
'min': 50,
|
|
11483
|
-
'label': 'Item',
|
|
11484
|
-
'modifiers': ['resize', 'drag', 'close'],
|
|
11485
|
-
'size': null
|
|
11486
|
-
};
|
|
11487
|
-
return _this;
|
|
11488
|
-
}
|
|
11445
|
+
that._properties[property] = value;
|
|
11446
|
+
that._updating = true;
|
|
11489
11447
|
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11448
|
+
if (property === 'disabled' || property === 'modifiers') {
|
|
11449
|
+
if (value) {
|
|
11450
|
+
that.setAttribute(property, value);
|
|
11451
|
+
}
|
|
11452
|
+
else {
|
|
11453
|
+
that.removeAttribute(property);
|
|
11454
|
+
}
|
|
11455
|
+
}
|
|
11456
|
+
else {
|
|
11457
|
+
if (value === null) {
|
|
11458
|
+
that.removeAttribute(property);
|
|
11459
|
+
}
|
|
11460
|
+
else {
|
|
11461
|
+
that.setAttribute(property, value);
|
|
11462
|
+
}
|
|
11463
|
+
}
|
|
11494
11464
|
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11465
|
+
if (!that.isCompleted) {
|
|
11466
|
+
return;
|
|
11467
|
+
}
|
|
11498
11468
|
|
|
11499
|
-
|
|
11500
|
-
that._updating = true;
|
|
11469
|
+
var layout = that.closest('jqx-layout');
|
|
11501
11470
|
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
that.removeAttribute(property);
|
|
11507
|
-
}
|
|
11508
|
-
} else {
|
|
11509
|
-
if (value === null) {
|
|
11510
|
-
that.removeAttribute(property);
|
|
11511
|
-
} else {
|
|
11512
|
-
that.setAttribute(property, value);
|
|
11471
|
+
if (layout) {
|
|
11472
|
+
if (!layout._resizeDetails && !layout._updating && layout.isRendered) {
|
|
11473
|
+
layout.refresh();
|
|
11474
|
+
}
|
|
11513
11475
|
}
|
|
11514
|
-
|
|
11476
|
+
that._updating = false;
|
|
11477
|
+
}
|
|
11515
11478
|
|
|
11516
|
-
|
|
11517
|
-
return;
|
|
11518
|
-
|
|
11479
|
+
get label() {
|
|
11480
|
+
return this._properties['label'];
|
|
11481
|
+
}
|
|
11519
11482
|
|
|
11520
|
-
|
|
11483
|
+
set label(value) {
|
|
11484
|
+
this._setProperty('label', value);
|
|
11485
|
+
}
|
|
11521
11486
|
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
}
|
|
11526
|
-
}
|
|
11487
|
+
get modifiers() {
|
|
11488
|
+
return this._properties['modifiers'];
|
|
11489
|
+
}
|
|
11527
11490
|
|
|
11528
|
-
|
|
11491
|
+
set modifiers(value) {
|
|
11492
|
+
this._setProperty('modifiers', value);
|
|
11529
11493
|
}
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
return this._properties['label'];
|
|
11534
|
-
},
|
|
11535
|
-
set: function set(value) {
|
|
11536
|
-
this._setProperty('label', value);
|
|
11494
|
+
|
|
11495
|
+
get min() {
|
|
11496
|
+
return this._properties['min'];
|
|
11537
11497
|
}
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
return this._properties['modifiers'];
|
|
11542
|
-
},
|
|
11543
|
-
set: function set(value) {
|
|
11544
|
-
this._setProperty('modifiers', value);
|
|
11498
|
+
|
|
11499
|
+
set min(value) {
|
|
11500
|
+
this._setProperty('min', value);
|
|
11545
11501
|
}
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
return this._properties['min'];
|
|
11550
|
-
},
|
|
11551
|
-
set: function set(value) {
|
|
11552
|
-
this._setProperty('min', value);
|
|
11502
|
+
|
|
11503
|
+
get size() {
|
|
11504
|
+
return this._properties['size'];
|
|
11553
11505
|
}
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
} else {
|
|
11564
|
-
this._setProperty('size', Math.max(this.min, value));
|
|
11506
|
+
|
|
11507
|
+
set size(value) {
|
|
11508
|
+
if (value !== null) {
|
|
11509
|
+
if (typeof value === 'string') {
|
|
11510
|
+
this._setProperty('size', value);
|
|
11511
|
+
}
|
|
11512
|
+
else {
|
|
11513
|
+
this._setProperty('size', Math.max(this.min, value));
|
|
11514
|
+
}
|
|
11565
11515
|
}
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11516
|
+
else {
|
|
11517
|
+
this._setProperty('size', value);
|
|
11518
|
+
}
|
|
11519
|
+
}
|
|
11520
|
+
|
|
11521
|
+
static get observedAttributes() {
|
|
11522
|
+
return ['min', 'size', 'label', 'modifiers'];
|
|
11569
11523
|
}
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
return;
|
|
11577
|
-
}
|
|
11578
|
-
|
|
11579
|
-
if (!that.isCompleted) {
|
|
11580
|
-
return;
|
|
11581
|
-
}
|
|
11582
|
-
|
|
11583
|
-
if (name === 'size') {
|
|
11584
|
-
if (!that._updating) {
|
|
11585
|
-
if (newValue === null) {
|
|
11586
|
-
this[name] = null;
|
|
11524
|
+
|
|
11525
|
+
|
|
11526
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
11527
|
+
var that = this;
|
|
11528
|
+
|
|
11529
|
+
if (oldValue === newValue) {
|
|
11587
11530
|
return;
|
|
11588
|
-
|
|
11531
|
+
}
|
|
11532
|
+
|
|
11533
|
+
if (!that.isCompleted) {
|
|
11534
|
+
return;
|
|
11535
|
+
}
|
|
11589
11536
|
|
|
11590
|
-
|
|
11537
|
+
if (name === 'size') {
|
|
11538
|
+
if (!that._updating) {
|
|
11539
|
+
if (newValue === null) {
|
|
11540
|
+
this[name] = null;
|
|
11541
|
+
return;
|
|
11542
|
+
}
|
|
11543
|
+
|
|
11544
|
+
that[name] = Math.max(that.min, parseInt(newValue));
|
|
11545
|
+
}
|
|
11546
|
+
}
|
|
11547
|
+
else {
|
|
11548
|
+
that[name] = newValue;
|
|
11591
11549
|
}
|
|
11592
|
-
} else {
|
|
11593
|
-
that[name] = newValue;
|
|
11594
|
-
}
|
|
11595
11550
|
}
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
}
|
|
11551
|
+
|
|
11552
|
+
connectedCallback() {
|
|
11553
|
+
if (!this.isCompleted) {
|
|
11554
|
+
this.render();
|
|
11555
|
+
}
|
|
11602
11556
|
}
|
|
11603
|
-
}, {
|
|
11604
|
-
key: "whenRendered",
|
|
11605
|
-
value: function whenRendered(callback) {
|
|
11606
|
-
var that = this;
|
|
11607
11557
|
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
return;
|
|
11611
|
-
}
|
|
11558
|
+
whenRendered(callback) {
|
|
11559
|
+
var that = this;
|
|
11612
11560
|
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11561
|
+
if (that.isRendered) {
|
|
11562
|
+
callback();
|
|
11563
|
+
return;
|
|
11564
|
+
}
|
|
11616
11565
|
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
}, {
|
|
11620
|
-
key: "render",
|
|
11621
|
-
value: function render() {
|
|
11622
|
-
var that = this;
|
|
11623
|
-
|
|
11624
|
-
if (!that.hasAttribute('data-id')) {
|
|
11625
|
-
that.setAttribute('data-id', 'id' + Math.random().toString(16).slice(2));
|
|
11626
|
-
}
|
|
11627
|
-
|
|
11628
|
-
if (!that.hasAttribute('label')) {
|
|
11629
|
-
that.setAttribute('label', that.label);
|
|
11630
|
-
}
|
|
11631
|
-
|
|
11632
|
-
if (!that.hasAttribute('min')) {
|
|
11633
|
-
that.setAttribute('min', that.min);
|
|
11634
|
-
}
|
|
11635
|
-
|
|
11636
|
-
if (!that.hasAttribute('label')) {
|
|
11637
|
-
that.setAttribute('label', that.label);
|
|
11638
|
-
}
|
|
11639
|
-
|
|
11640
|
-
if (!that.hasAttribute('modifiers')) {
|
|
11641
|
-
that.setAttribute('modifiers', that.modifiers);
|
|
11642
|
-
}
|
|
11643
|
-
|
|
11644
|
-
for (var i = 0; i < that.attributes.length; i++) {
|
|
11645
|
-
var attribute = that.attributes[i];
|
|
11646
|
-
var attributeName = attribute.name;
|
|
11647
|
-
var attributeValue = attribute.value;
|
|
11648
|
-
|
|
11649
|
-
if (!isNaN(attributeValue) && (attributeName === 'min' || attributeName === 'size')) {
|
|
11650
|
-
that._properties[attributeName] = parseInt(attributeValue);
|
|
11651
|
-
continue;
|
|
11566
|
+
if (!that.whenRenderedCallbacks) {
|
|
11567
|
+
that.whenRenderedCallbacks = [];
|
|
11652
11568
|
}
|
|
11653
11569
|
|
|
11654
|
-
that.
|
|
11655
|
-
|
|
11570
|
+
that.whenRenderedCallbacks.push(callback);
|
|
11571
|
+
}
|
|
11656
11572
|
|
|
11657
|
-
|
|
11658
|
-
|
|
11573
|
+
render() {
|
|
11574
|
+
var that = this;
|
|
11659
11575
|
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
that.whenRenderedCallbacks[i]();
|
|
11576
|
+
if (!that.hasAttribute('data-id')) {
|
|
11577
|
+
that.setAttribute('data-id', 'id' + Math.random().toString(16).slice(2));
|
|
11663
11578
|
}
|
|
11664
11579
|
|
|
11665
|
-
that.
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11580
|
+
if (!that.hasAttribute('label')) {
|
|
11581
|
+
that.setAttribute('label', that.label);
|
|
11582
|
+
}
|
|
11583
|
+
|
|
11584
|
+
if (!that.hasAttribute('min')) {
|
|
11585
|
+
that.setAttribute('min', that.min);
|
|
11586
|
+
}
|
|
11587
|
+
|
|
11588
|
+
if (!that.hasAttribute('label')) {
|
|
11589
|
+
that.setAttribute('label', that.label);
|
|
11590
|
+
}
|
|
11674
11591
|
|
|
11675
|
-
|
|
11676
|
-
|
|
11592
|
+
if (!that.hasAttribute('modifiers')) {
|
|
11593
|
+
that.setAttribute('modifiers', that.modifiers);
|
|
11594
|
+
}
|
|
11677
11595
|
|
|
11678
|
-
var
|
|
11679
|
-
|
|
11596
|
+
for (var i = 0; i < that.attributes.length; i++) {
|
|
11597
|
+
var attribute = that.attributes[i];
|
|
11598
|
+
var attributeName = attribute.name;
|
|
11599
|
+
var attributeValue = attribute.value;
|
|
11680
11600
|
|
|
11681
|
-
|
|
11601
|
+
if (!isNaN(attributeValue) && (attributeName === 'min' || attributeName === 'size')) {
|
|
11602
|
+
that._properties[attributeName] = parseInt(attributeValue);
|
|
11603
|
+
continue;
|
|
11604
|
+
}
|
|
11682
11605
|
|
|
11683
|
-
|
|
11606
|
+
that._properties[attributeName] = attributeValue;
|
|
11607
|
+
}
|
|
11684
11608
|
|
|
11685
|
-
|
|
11686
|
-
var _this2;
|
|
11609
|
+
that.classList.add('jqx-layout-item');
|
|
11687
11610
|
|
|
11688
|
-
|
|
11611
|
+
that.isCompleted = true;
|
|
11689
11612
|
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
}
|
|
11613
|
+
if (that.whenRenderedCallbacks) {
|
|
11614
|
+
for (var i = 0; i < that.whenRenderedCallbacks.length; i++) {
|
|
11615
|
+
that.whenRenderedCallbacks[i]();
|
|
11616
|
+
}
|
|
11695
11617
|
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
get: function get() {
|
|
11699
|
-
return this._properties.orientation;
|
|
11700
|
-
},
|
|
11701
|
-
set: function set(value) {
|
|
11702
|
-
this._setProperty('orientation', value);
|
|
11618
|
+
that.whenRenderedCallbacks = [];
|
|
11619
|
+
}
|
|
11703
11620
|
}
|
|
11704
|
-
|
|
11705
|
-
key: "render",
|
|
11706
|
-
value: function render() {
|
|
11707
|
-
var that = this;
|
|
11621
|
+
}
|
|
11708
11622
|
|
|
11709
|
-
|
|
11623
|
+
class LayoutGroup extends LayoutItem {
|
|
11624
|
+
constructor() {
|
|
11625
|
+
super();
|
|
11710
11626
|
|
|
11711
|
-
|
|
11627
|
+
this._properties['label'] = 'Group';
|
|
11628
|
+
this._properties['orientation'] = 'vertical'
|
|
11629
|
+
}
|
|
11712
11630
|
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
} else {
|
|
11716
|
-
that._properties['orientation'] = that.getAttribute('orientation');
|
|
11717
|
-
}
|
|
11631
|
+
get orientation() {
|
|
11632
|
+
return this._properties.orientation;
|
|
11718
11633
|
}
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
return ['min', 'size', 'modifiers', 'orientation', 'position'];
|
|
11634
|
+
|
|
11635
|
+
set orientation(value) {
|
|
11636
|
+
this._setProperty('orientation', value);
|
|
11723
11637
|
}
|
|
11724
|
-
}]);
|
|
11725
11638
|
|
|
11726
|
-
|
|
11727
|
-
|
|
11639
|
+
static get observedAttributes() {
|
|
11640
|
+
return ['min', 'size', 'modifiers', 'orientation', 'position'];
|
|
11641
|
+
}
|
|
11728
11642
|
|
|
11729
|
-
|
|
11730
|
-
|
|
11643
|
+
render() {
|
|
11644
|
+
var that = this;
|
|
11731
11645
|
|
|
11732
|
-
|
|
11646
|
+
super.render();
|
|
11733
11647
|
|
|
11734
|
-
|
|
11648
|
+
that.className = 'jqx-layout-group';
|
|
11735
11649
|
|
|
11736
|
-
|
|
11737
|
-
|
|
11650
|
+
if (!that.hasAttribute('orientation')) {
|
|
11651
|
+
that.setAttribute('orientation', that._properties['orientation']);
|
|
11652
|
+
}
|
|
11653
|
+
else {
|
|
11654
|
+
that._properties['orientation'] = that.getAttribute('orientation');
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
}
|
|
11738
11658
|
|
|
11739
|
-
|
|
11659
|
+
class TabLayoutGroup extends LayoutGroup {
|
|
11660
|
+
constructor() {
|
|
11661
|
+
super();
|
|
11662
|
+
this._properties['position'] = 'top'
|
|
11663
|
+
this._properties['label'] = 'TabGroup';
|
|
11664
|
+
}
|
|
11740
11665
|
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
return _this3;
|
|
11745
|
-
}
|
|
11666
|
+
get position() {
|
|
11667
|
+
return this._properties.position;
|
|
11668
|
+
}
|
|
11746
11669
|
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
get: function get() {
|
|
11750
|
-
return this._properties.position;
|
|
11751
|
-
},
|
|
11752
|
-
set: function set(value) {
|
|
11753
|
-
this._setProperty('position', value);
|
|
11670
|
+
set position(value) {
|
|
11671
|
+
this._setProperty('position', value);
|
|
11754
11672
|
}
|
|
11755
|
-
}, {
|
|
11756
|
-
key: "render",
|
|
11757
|
-
value: function render() {
|
|
11758
|
-
var that = this;
|
|
11759
11673
|
|
|
11760
|
-
|
|
11674
|
+
render() {
|
|
11675
|
+
var that = this;
|
|
11676
|
+
|
|
11677
|
+
super.render();
|
|
11678
|
+
|
|
11679
|
+
if (!that.hasAttribute('position') && that.position) {
|
|
11680
|
+
that.setAttribute('position', 'top');
|
|
11681
|
+
}
|
|
11682
|
+
}
|
|
11761
11683
|
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
}
|
|
11684
|
+
static get observedAttributes() {
|
|
11685
|
+
return ['min', 'size', 'modifiers', 'orientation', 'position'];
|
|
11765
11686
|
}
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11687
|
+
}
|
|
11688
|
+
|
|
11689
|
+
class TabLayoutItem extends LayoutGroup {
|
|
11690
|
+
constructor() {
|
|
11691
|
+
super();
|
|
11692
|
+
this._properties['label'] = 'TabItem';
|
|
11770
11693
|
}
|
|
11771
|
-
|
|
11694
|
+
}
|
|
11772
11695
|
|
|
11773
|
-
return TabLayoutGroup;
|
|
11774
|
-
}(LayoutGroup);
|
|
11775
11696
|
|
|
11776
|
-
|
|
11777
|
-
|
|
11697
|
+
(function ($) {
|
|
11698
|
+
"use strict";
|
|
11699
|
+
$.jqx.jqxWidget("jqxSplitLayout", "", {});
|
|
11700
|
+
|
|
11701
|
+
$.extend($.jqx._jqxSplitLayout.prototype, {
|
|
11702
|
+
defineInstance: function () {
|
|
11703
|
+
var settings = {
|
|
11704
|
+
'dataSource': null,
|
|
11705
|
+
'ready': null,
|
|
11706
|
+
'orientation': 'vertical'
|
|
11707
|
+
};
|
|
11778
11708
|
|
|
11779
|
-
|
|
11709
|
+
if (this === $.jqx._jqxSplitLayout.prototype) {
|
|
11710
|
+
return settings;
|
|
11711
|
+
}
|
|
11780
11712
|
|
|
11781
|
-
|
|
11713
|
+
$.extend(true, this, settings);
|
|
11714
|
+
return settings;
|
|
11715
|
+
},
|
|
11782
11716
|
|
|
11783
|
-
|
|
11784
|
-
|
|
11717
|
+
createInstance: function () {
|
|
11718
|
+
var that = this;
|
|
11719
|
+
this._properties = {
|
|
11720
|
+
'dataSource': null,
|
|
11721
|
+
'ready': null,
|
|
11722
|
+
'orientation': 'vertical'
|
|
11723
|
+
}
|
|
11785
11724
|
|
|
11786
|
-
|
|
11725
|
+
var that = this;
|
|
11787
11726
|
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11727
|
+
that.layout = document.createElement('jqx-split-layout');
|
|
11728
|
+
that.layout.style.width = '100%';
|
|
11729
|
+
that.layout.style.height = '100%';
|
|
11730
|
+
that.element.className += that.toThemeProperty("jqx-split-layout-component jqx-rc-all jqx-widget");
|
|
11731
|
+
that.layout.dataSource = that.dataSource;
|
|
11732
|
+
that.layout.orientation = that.orientation;
|
|
11733
|
+
that.layout.ready = that.ready;
|
|
11734
|
+
that.element.appendChild(that.layout);
|
|
11735
|
+
},
|
|
11792
11736
|
|
|
11793
|
-
|
|
11794
|
-
|
|
11737
|
+
propertyChangedHandler: function (object, key, oldValue, value) {
|
|
11738
|
+
var that = object;
|
|
11795
11739
|
|
|
11796
|
-
(
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
$.extend($.jqx._jqxSplitLayout.prototype, {
|
|
11801
|
-
defineInstance: function defineInstance() {
|
|
11802
|
-
var settings = {
|
|
11803
|
-
'dataSource': null,
|
|
11804
|
-
'ready': null,
|
|
11805
|
-
'orientation': 'vertical'
|
|
11806
|
-
};
|
|
11807
|
-
|
|
11808
|
-
if (this === $.jqx._jqxSplitLayout.prototype) {
|
|
11809
|
-
return settings;
|
|
11810
|
-
}
|
|
11811
|
-
|
|
11812
|
-
$.extend(true, this, settings);
|
|
11813
|
-
return settings;
|
|
11814
|
-
},
|
|
11815
|
-
createInstance: function createInstance() {
|
|
11816
|
-
var that = this;
|
|
11817
|
-
this._properties = {
|
|
11818
|
-
'dataSource': null,
|
|
11819
|
-
'ready': null,
|
|
11820
|
-
'orientation': 'vertical'
|
|
11821
|
-
};
|
|
11822
|
-
var that = this;
|
|
11823
|
-
that.layout = document.createElement('jqx-split-layout');
|
|
11824
|
-
that.layout.style.width = '100%';
|
|
11825
|
-
that.layout.style.height = '100%';
|
|
11826
|
-
that.element.className += that.toThemeProperty("jqx-split-layout-component jqx-rc-all jqx-widget");
|
|
11827
|
-
that.layout.dataSource = that.dataSource;
|
|
11828
|
-
that.layout.orientation = that.orientation;
|
|
11829
|
-
that.layout.ready = that.ready;
|
|
11830
|
-
that.element.appendChild(that.layout);
|
|
11831
|
-
},
|
|
11832
|
-
propertyChangedHandler: function propertyChangedHandler(object, key, oldValue, value) {
|
|
11833
|
-
var that = object;
|
|
11834
|
-
|
|
11835
|
-
if (oldValue != value || value instanceof Object) {
|
|
11836
|
-
if (!that.layout) {
|
|
11837
|
-
return;
|
|
11838
|
-
}
|
|
11740
|
+
if (oldValue != value || value instanceof Object) {
|
|
11741
|
+
if (!that.layout) {
|
|
11742
|
+
return;
|
|
11743
|
+
}
|
|
11839
11744
|
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
render: function render() {
|
|
11844
|
-
var that = this;
|
|
11745
|
+
that.layout[key] = value;
|
|
11746
|
+
}
|
|
11747
|
+
},
|
|
11845
11748
|
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
}
|
|
11749
|
+
render: function () {
|
|
11750
|
+
var that = this;
|
|
11849
11751
|
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
var that = this;
|
|
11752
|
+
if (!that.layout) {
|
|
11753
|
+
return;
|
|
11754
|
+
}
|
|
11854
11755
|
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
}
|
|
11756
|
+
that.layout.render();
|
|
11757
|
+
},
|
|
11858
11758
|
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
}
|
|
11759
|
+
refresh() {
|
|
11760
|
+
var that = this;
|
|
11862
11761
|
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
var that = this;
|
|
11762
|
+
if (!that.layout) {
|
|
11763
|
+
return;
|
|
11764
|
+
}
|
|
11867
11765
|
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11766
|
+
if (!that.layout.isRendered) {
|
|
11767
|
+
return;
|
|
11768
|
+
}
|
|
11871
11769
|
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
});
|
|
11875
|
-
})(jqxBaseFramework);
|
|
11770
|
+
that.layout.refresh();
|
|
11771
|
+
},
|
|
11876
11772
|
|
|
11877
|
-
|
|
11878
|
-
|
|
11773
|
+
dataBind() {
|
|
11774
|
+
var that = this;
|
|
11879
11775
|
|
|
11880
|
-
|
|
11776
|
+
if (!that.layout) {
|
|
11777
|
+
return;
|
|
11778
|
+
}
|
|
11779
|
+
|
|
11780
|
+
that.layout.dataBind();
|
|
11781
|
+
}
|
|
11782
|
+
});
|
|
11783
|
+
})(jqxBaseFramework);
|
|
11881
11784
|
|
|
11882
|
-
|
|
11785
|
+
class SplitLayout extends HTMLElement {
|
|
11786
|
+
constructor() {
|
|
11787
|
+
super();
|
|
11883
11788
|
|
|
11884
|
-
|
|
11885
|
-
|
|
11789
|
+
this._properties = {
|
|
11790
|
+
'dataSource': null,
|
|
11791
|
+
'orientation': 'vertical'
|
|
11792
|
+
}
|
|
11793
|
+
}
|
|
11886
11794
|
|
|
11887
|
-
_classCallCheck(this, SplitLayout);
|
|
11888
11795
|
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11796
|
+
get orientation() {
|
|
11797
|
+
return this._properties['orientation'];
|
|
11798
|
+
}
|
|
11799
|
+
|
|
11800
|
+
set orientation(value) {
|
|
11801
|
+
this._properties['orientation'] = value;
|
|
11802
|
+
}
|
|
11896
11803
|
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
get: function get() {
|
|
11900
|
-
return this._properties['orientation'];
|
|
11901
|
-
},
|
|
11902
|
-
set: function set(value) {
|
|
11903
|
-
this._properties['orientation'] = value;
|
|
11804
|
+
get dataSource() {
|
|
11805
|
+
return this._properties['dataSource'];
|
|
11904
11806
|
}
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
return this._properties['dataSource'];
|
|
11909
|
-
},
|
|
11910
|
-
set: function set(value) {
|
|
11911
|
-
this._properties['dataSource'] = value;
|
|
11807
|
+
|
|
11808
|
+
set dataSource(value) {
|
|
11809
|
+
this._properties['dataSource'] = value;
|
|
11912
11810
|
}
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11811
|
+
|
|
11812
|
+
|
|
11813
|
+
_dragStart(event) {
|
|
11814
|
+
event.stopPropagation();
|
|
11815
|
+
event.preventDefault();
|
|
11918
11816
|
}
|
|
11919
|
-
}, {
|
|
11920
|
-
key: "_leaveHandler",
|
|
11921
|
-
value: function _leaveHandler() {
|
|
11922
|
-
var that = this;
|
|
11923
11817
|
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
}
|
|
11818
|
+
_leaveHandler() {
|
|
11819
|
+
var that = this;
|
|
11927
11820
|
|
|
11928
|
-
|
|
11821
|
+
if (that._resizeDetails) {
|
|
11822
|
+
return;
|
|
11823
|
+
}
|
|
11929
11824
|
|
|
11930
|
-
|
|
11825
|
+
that._handleButtonsVisibility(null);
|
|
11826
|
+
that._hideSplitter();
|
|
11931
11827
|
|
|
11932
|
-
|
|
11933
|
-
|
|
11828
|
+
requestAnimationFrame(function () {
|
|
11829
|
+
// that.classList.remove('outline');
|
|
11830
|
+
})
|
|
11934
11831
|
}
|
|
11935
|
-
}, {
|
|
11936
|
-
key: "_enterHandler",
|
|
11937
|
-
value: function _enterHandler() {
|
|
11938
|
-
var that = this;
|
|
11939
11832
|
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11833
|
+
_enterHandler() {
|
|
11834
|
+
var that = this;
|
|
11835
|
+
|
|
11836
|
+
if (that._resizeDetails) {
|
|
11837
|
+
return;
|
|
11838
|
+
}
|
|
11943
11839
|
|
|
11944
|
-
|
|
11840
|
+
that._handleButtonsVisibility(that._selectedItem);
|
|
11945
11841
|
|
|
11946
|
-
|
|
11842
|
+
that._updateSplitter();
|
|
11947
11843
|
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11844
|
+
requestAnimationFrame(function () {
|
|
11845
|
+
that.classList.add('outline');
|
|
11846
|
+
})
|
|
11951
11847
|
}
|
|
11848
|
+
|
|
11952
11849
|
/**
|
|
11953
11850
|
* Element's HTML template.
|
|
11954
11851
|
*/
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
key: "template",
|
|
11958
|
-
value: function template() {
|
|
11959
|
-
return '<div class="jqx-container" id="container" role="presentation"><jqx-layout-group data-id="root" id="itemsContainer"></jqx-layout-group><div root-splitter id="splitter" class="jqx-layout-splitter"></div>';
|
|
11852
|
+
template() {
|
|
11853
|
+
return '<div class="jqx-container" id="container" role="presentation"><jqx-layout-group data-id="root" id="itemsContainer"></jqx-layout-group><div root-splitter id="splitter" class="jqx-layout-splitter"></div>';
|
|
11960
11854
|
}
|
|
11855
|
+
|
|
11961
11856
|
/**
|
|
11962
11857
|
* Updates the element when a property is changed.
|
|
11963
11858
|
* @param {string} propertyName The name of the property.
|
|
11964
11859
|
* @param {number/string} oldValue The previously entered value. Max, min and value are of type Number. The rest are of type String.
|
|
11965
11860
|
* @param {number/string} newValue The new entered value. Max, min and value are of type Number. The rest are of type String.
|
|
11966
11861
|
*/
|
|
11862
|
+
propertyChangedHandler(propertyName, oldValue, newValue) {
|
|
11863
|
+
var that = this;
|
|
11864
|
+
|
|
11865
|
+
switch (propertyName) {
|
|
11866
|
+
case 'orientation':
|
|
11867
|
+
if (that.$.itemsContainer) {
|
|
11868
|
+
that.$.itemsContainer.orientation = that.orientation;
|
|
11869
|
+
}
|
|
11870
|
+
break;
|
|
11871
|
+
case 'dataSource':
|
|
11872
|
+
that.dataBind();
|
|
11873
|
+
break;
|
|
11874
|
+
case 'selectedIndex':
|
|
11875
|
+
that._handleItemClick(that.getItem(newValue + ''), true);
|
|
11876
|
+
break;
|
|
11877
|
+
default:
|
|
11878
|
+
super.propertyChangedHandler(propertyName, oldValue, newValue);
|
|
11879
|
+
break;
|
|
11880
|
+
}
|
|
11881
|
+
}
|
|
11967
11882
|
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
value: function propertyChangedHandler(propertyName, oldValue, newValue) {
|
|
11971
|
-
var that = this;
|
|
11883
|
+
dataBind() {
|
|
11884
|
+
var that = this;
|
|
11972
11885
|
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11886
|
+
that.$.itemsContainer.innerHTML = '';
|
|
11887
|
+
|
|
11888
|
+
var template = '';
|
|
11889
|
+
var processDataSource = function (dataSource, isTabLayoutGroup) {
|
|
11890
|
+
for (var i = 0; i < dataSource.length; i++) {
|
|
11891
|
+
var item = dataSource[i];
|
|
11892
|
+
|
|
11893
|
+
var size = item.size;
|
|
11894
|
+
var min = item.min;
|
|
11895
|
+
var modifiers = item.modifiers;
|
|
11896
|
+
var type = item.type;
|
|
11897
|
+
var position = item.position;
|
|
11898
|
+
var orientation = item.orientation ? item.orientation : 'vertical';
|
|
11899
|
+
var id = item.id;
|
|
11900
|
+
var label = item.label;
|
|
11901
|
+
|
|
11902
|
+
var props = '';
|
|
11903
|
+
|
|
11904
|
+
if (id !== undefined) {
|
|
11905
|
+
props += `id="${id}" `
|
|
11906
|
+
}
|
|
11907
|
+
|
|
11908
|
+
if (size !== undefined) {
|
|
11909
|
+
props += `size="${size}" `
|
|
11910
|
+
}
|
|
11978
11911
|
|
|
11979
|
-
|
|
11912
|
+
if (label !== undefined) {
|
|
11913
|
+
props += `label="${label}" `
|
|
11914
|
+
}
|
|
11980
11915
|
|
|
11981
|
-
case 'dataSource':
|
|
11982
|
-
that.dataBind();
|
|
11983
|
-
break;
|
|
11984
11916
|
|
|
11985
|
-
|
|
11986
|
-
|
|
11917
|
+
if (min !== undefined) {
|
|
11918
|
+
props += `min="${min}" `
|
|
11919
|
+
}
|
|
11987
11920
|
|
|
11988
|
-
|
|
11921
|
+
if (modifiers !== undefined) {
|
|
11922
|
+
props += `modifiers="${modifiers}" `
|
|
11923
|
+
}
|
|
11989
11924
|
|
|
11990
|
-
|
|
11991
|
-
|
|
11925
|
+
if (position !== undefined) {
|
|
11926
|
+
props += `position="${position}" `
|
|
11927
|
+
}
|
|
11992
11928
|
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
if (label !== undefined) {
|
|
12025
|
-
props += "label=\"".concat(label, "\" ");
|
|
12026
|
-
}
|
|
12027
|
-
|
|
12028
|
-
if (min !== undefined) {
|
|
12029
|
-
props += "min=\"".concat(min, "\" ");
|
|
12030
|
-
}
|
|
12031
|
-
|
|
12032
|
-
if (modifiers !== undefined) {
|
|
12033
|
-
props += "modifiers=\"".concat(modifiers, "\" ");
|
|
12034
|
-
}
|
|
12035
|
-
|
|
12036
|
-
if (position !== undefined) {
|
|
12037
|
-
props += "position=\"".concat(position, "\" ");
|
|
12038
|
-
}
|
|
12039
|
-
|
|
12040
|
-
if (item.items) {
|
|
12041
|
-
props += "orientation=".concat(orientation, " ");
|
|
12042
|
-
|
|
12043
|
-
if (type === 'tabs') {
|
|
12044
|
-
template += "<jqx-tab-layout-group ".concat(props, ">");
|
|
12045
|
-
processDataSource(item.items, true);
|
|
12046
|
-
template += '</jqx-tab-layout-group>';
|
|
12047
|
-
} else {
|
|
12048
|
-
template += "<jqx-layout-group ".concat(props, ">");
|
|
12049
|
-
processDataSource(item.items);
|
|
12050
|
-
template += '</jqx-layout-group>';
|
|
12051
|
-
}
|
|
12052
|
-
} else {
|
|
12053
|
-
var content = item.content || '';
|
|
12054
|
-
|
|
12055
|
-
if (isTabLayoutGroup) {
|
|
12056
|
-
template += "<jqx-tab-layout-item ".concat(props, ">") + content + '</jqx-tab-layout-item>';
|
|
12057
|
-
} else {
|
|
12058
|
-
if (type === 'tabs') {
|
|
12059
|
-
template += "<jqx-tab-layout-group>";
|
|
12060
|
-
template += "<jqx-tab-layout-item ".concat(props, ">") + content + '</jqx-tab-layout-item>';
|
|
12061
|
-
template += '</jqx-tab-layout-group>';
|
|
12062
|
-
} else {
|
|
12063
|
-
template += "<jqx-layout-item ".concat(props, ">") + content + '</jqx-layout-item>';
|
|
12064
|
-
}
|
|
11929
|
+
if (item.items) {
|
|
11930
|
+
props += `orientation=${orientation} `
|
|
11931
|
+
|
|
11932
|
+
if (type === 'tabs') {
|
|
11933
|
+
template += `<jqx-tab-layout-group ${props}>`;
|
|
11934
|
+
processDataSource(item.items, true);
|
|
11935
|
+
template += '</jqx-tab-layout-group>'
|
|
11936
|
+
}
|
|
11937
|
+
else {
|
|
11938
|
+
template += `<jqx-layout-group ${props}>`;
|
|
11939
|
+
processDataSource(item.items);
|
|
11940
|
+
template += '</jqx-layout-group>'
|
|
11941
|
+
}
|
|
11942
|
+
}
|
|
11943
|
+
else {
|
|
11944
|
+
var content = item.content || '';
|
|
11945
|
+
if (isTabLayoutGroup) {
|
|
11946
|
+
template += `<jqx-tab-layout-item ${props}>` + content + '</jqx-tab-layout-item>';
|
|
11947
|
+
}
|
|
11948
|
+
else {
|
|
11949
|
+
if (type === 'tabs') {
|
|
11950
|
+
template += `<jqx-tab-layout-group>`;
|
|
11951
|
+
template += `<jqx-tab-layout-item ${props}>` + content + '</jqx-tab-layout-item>';
|
|
11952
|
+
template += '</jqx-tab-layout-group>'
|
|
11953
|
+
}
|
|
11954
|
+
else {
|
|
11955
|
+
template += `<jqx-layout-item ${props}>` + content + '</jqx-layout-item>';
|
|
11956
|
+
}
|
|
11957
|
+
}
|
|
11958
|
+
}
|
|
12065
11959
|
}
|
|
12066
|
-
}
|
|
12067
11960
|
}
|
|
12068
|
-
};
|
|
12069
11961
|
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
11962
|
+
processDataSource(that.dataSource);
|
|
11963
|
+
that.$.itemsContainer.innerHTML = template;
|
|
11964
|
+
that.refresh();
|
|
12073
11965
|
}
|
|
11966
|
+
|
|
11967
|
+
|
|
12074
11968
|
/**
|
|
12075
11969
|
* Element's render funciton
|
|
12076
11970
|
*/
|
|
11971
|
+
render() {
|
|
11972
|
+
var that = this;
|
|
12077
11973
|
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
that.setAttribute('role', 'group');
|
|
12083
|
-
|
|
12084
|
-
if (that.selectedIndex) {
|
|
12085
|
-
that._handleItemClick(that.getItem(that.selectedIndex + ''), true);
|
|
12086
|
-
}
|
|
12087
|
-
|
|
12088
|
-
var render = function render() {
|
|
12089
|
-
if (!that.dataSource) {
|
|
12090
|
-
that.dataSource = that._getDataSource(that._getLayout());
|
|
12091
|
-
} else {
|
|
12092
|
-
that.dataBind();
|
|
11974
|
+
that.setAttribute('role', 'group');
|
|
11975
|
+
|
|
11976
|
+
if (that.selectedIndex) {
|
|
11977
|
+
that._handleItemClick(that.getItem(that.selectedIndex + ''), true);
|
|
12093
11978
|
}
|
|
12094
11979
|
|
|
12095
|
-
that.$.itemsContainer.orientation = that.orientation;
|
|
12096
|
-
that.refresh();
|
|
12097
11980
|
|
|
12098
|
-
|
|
11981
|
+
var render = (function () {
|
|
11982
|
+
if (!that.dataSource) {
|
|
11983
|
+
that.dataSource = that._getDataSource(that._getLayout());
|
|
11984
|
+
}
|
|
11985
|
+
else {
|
|
11986
|
+
that.dataBind();
|
|
11987
|
+
}
|
|
12099
11988
|
|
|
12100
|
-
|
|
12101
|
-
that.classList.add('outline');
|
|
11989
|
+
that.$.itemsContainer.orientation = that.orientation;
|
|
12102
11990
|
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
11991
|
+
that.refresh();
|
|
11992
|
+
that._updateSplitter();
|
|
11993
|
+
that.isRendered = true;
|
|
11994
|
+
that.classList.add('outline');
|
|
12107
11995
|
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
11996
|
+
if (that.ready) {
|
|
11997
|
+
that.ready();
|
|
11998
|
+
}
|
|
11999
|
+
})
|
|
12000
|
+
|
|
12001
|
+
if (document.readyState === 'complete') {
|
|
12002
|
+
render();
|
|
12003
|
+
}
|
|
12004
|
+
else {
|
|
12005
|
+
window.addEventListener('load', (function () {
|
|
12006
|
+
render();
|
|
12007
|
+
}));
|
|
12008
|
+
}
|
|
12115
12009
|
}
|
|
12116
|
-
}, {
|
|
12117
|
-
key: "connectedCallback",
|
|
12118
|
-
value: function connectedCallback() {
|
|
12119
|
-
var that = this;
|
|
12120
12010
|
|
|
12121
|
-
|
|
12122
|
-
var
|
|
12011
|
+
connectedCallback() {
|
|
12012
|
+
var that = this;
|
|
12013
|
+
|
|
12014
|
+
var setup = function () {
|
|
12015
|
+
var fragment = document.createDocumentFragment();
|
|
12016
|
+
|
|
12017
|
+
while (that.childNodes.length) {
|
|
12018
|
+
fragment.appendChild(that.firstChild);
|
|
12019
|
+
}
|
|
12020
|
+
|
|
12021
|
+
that.innerHTML = that.template();
|
|
12022
|
+
that.classList.add('jqx-widget');
|
|
12023
|
+
that.$ = {
|
|
12024
|
+
container: that.querySelector("#container"),
|
|
12025
|
+
itemsContainer: that.querySelector("#itemsContainer"),
|
|
12026
|
+
splitter: that.querySelector("#splitter")
|
|
12027
|
+
};
|
|
12028
|
+
|
|
12029
|
+
delete that.$.container.id;
|
|
12030
|
+
delete that.$.itemsContainer.id;
|
|
12031
|
+
delete that.$.splitter.id;
|
|
12032
|
+
|
|
12033
|
+
that.$.itemsContainer.appendChild(fragment);
|
|
12034
|
+
that.classList.add('jqx-split-layout');
|
|
12035
|
+
|
|
12036
|
+
document.addEventListener('pointerdown', function (event) {
|
|
12037
|
+
that._documentDownHandler(event);
|
|
12038
|
+
});
|
|
12039
|
+
|
|
12040
|
+
document.addEventListener('pointermove', function (event) {
|
|
12041
|
+
that._documentMoveHandler(event);
|
|
12042
|
+
});
|
|
12043
|
+
|
|
12044
|
+
document.addEventListener('pointerup', function (event) {
|
|
12045
|
+
that._documentUpHandler(event);
|
|
12046
|
+
});
|
|
12047
|
+
|
|
12048
|
+
document.addEventListener('selectstart', function (event) {
|
|
12049
|
+
that._documentSelectStartHandler(event);
|
|
12050
|
+
});
|
|
12051
|
+
|
|
12052
|
+
document.addEventListener('keyup', function (event) {
|
|
12053
|
+
that._keyUpHandler(event);
|
|
12054
|
+
});
|
|
12055
|
+
|
|
12056
|
+
that.addEventListener('mouseleave', function (event) {
|
|
12057
|
+
that._leaveHandler(event);
|
|
12058
|
+
});
|
|
12059
|
+
|
|
12060
|
+
that.addEventListener('mouseenter', function (event) {
|
|
12061
|
+
that._enterHandler(event);
|
|
12062
|
+
});
|
|
12063
|
+
|
|
12064
|
+
that.addEventListener('dragStart', function (event) {
|
|
12065
|
+
that._dragStart(event);
|
|
12066
|
+
});
|
|
12123
12067
|
|
|
12124
|
-
|
|
12125
|
-
fragment.appendChild(that.firstChild);
|
|
12068
|
+
that.render();
|
|
12126
12069
|
}
|
|
12127
12070
|
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
delete that.$.itemsContainer.id;
|
|
12137
|
-
delete that.$.splitter.id;
|
|
12138
|
-
that.$.itemsContainer.appendChild(fragment);
|
|
12139
|
-
that.classList.add('jqx-split-layout');
|
|
12140
|
-
document.addEventListener('pointerdown', function (event) {
|
|
12141
|
-
that._documentDownHandler(event);
|
|
12142
|
-
});
|
|
12143
|
-
document.addEventListener('pointermove', function (event) {
|
|
12144
|
-
that._documentMoveHandler(event);
|
|
12145
|
-
});
|
|
12146
|
-
document.addEventListener('pointerup', function (event) {
|
|
12147
|
-
that._documentUpHandler(event);
|
|
12148
|
-
});
|
|
12149
|
-
document.addEventListener('selectstart', function (event) {
|
|
12150
|
-
that._documentSelectStartHandler(event);
|
|
12151
|
-
});
|
|
12152
|
-
document.addEventListener('keyup', function (event) {
|
|
12153
|
-
that._keyUpHandler(event);
|
|
12154
|
-
});
|
|
12155
|
-
that.addEventListener('mouseleave', function (event) {
|
|
12156
|
-
that._leaveHandler(event);
|
|
12157
|
-
});
|
|
12158
|
-
that.addEventListener('mouseenter', function (event) {
|
|
12159
|
-
that._enterHandler(event);
|
|
12160
|
-
});
|
|
12161
|
-
that.addEventListener('dragStart', function (event) {
|
|
12162
|
-
that._dragStart(event);
|
|
12163
|
-
});
|
|
12164
|
-
that.render();
|
|
12165
|
-
};
|
|
12166
|
-
|
|
12167
|
-
if (document.readyState === 'complete') {
|
|
12168
|
-
setup();
|
|
12169
|
-
} else {
|
|
12170
|
-
window.addEventListener('load', function () {
|
|
12171
|
-
setup();
|
|
12172
|
-
});
|
|
12173
|
-
}
|
|
12071
|
+
if (document.readyState === 'complete') {
|
|
12072
|
+
setup();
|
|
12073
|
+
}
|
|
12074
|
+
else {
|
|
12075
|
+
window.addEventListener('load', function () {
|
|
12076
|
+
setup();
|
|
12077
|
+
});
|
|
12078
|
+
}
|
|
12174
12079
|
}
|
|
12080
|
+
|
|
12175
12081
|
/**
|
|
12176
12082
|
* Returns the Splitter item according to the index
|
|
12177
12083
|
* @param {any} index - string, e.g. '0.1'
|
|
12178
12084
|
*/
|
|
12085
|
+
getItem(index) {
|
|
12086
|
+
var that = this;
|
|
12179
12087
|
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
var that = this;
|
|
12088
|
+
if (index === undefined || index === null) {
|
|
12089
|
+
return;
|
|
12090
|
+
}
|
|
12184
12091
|
|
|
12185
|
-
|
|
12186
|
-
return;
|
|
12187
|
-
}
|
|
12092
|
+
index = (index + '').split('.');
|
|
12188
12093
|
|
|
12189
|
-
|
|
12094
|
+
var items = that._getDataSource(that._getLayout()),
|
|
12095
|
+
item;
|
|
12190
12096
|
|
|
12191
|
-
|
|
12192
|
-
|
|
12097
|
+
for (var i = 0; i < index.length; i++) {
|
|
12098
|
+
item = items[index[i]];
|
|
12193
12099
|
|
|
12194
|
-
|
|
12195
|
-
|
|
12100
|
+
if (!item) {
|
|
12101
|
+
break;
|
|
12102
|
+
}
|
|
12196
12103
|
|
|
12197
|
-
|
|
12198
|
-
break;
|
|
12104
|
+
items = item.items;
|
|
12199
12105
|
}
|
|
12200
12106
|
|
|
12201
|
-
|
|
12202
|
-
}
|
|
12203
|
-
|
|
12204
|
-
return item;
|
|
12107
|
+
return item;
|
|
12205
12108
|
}
|
|
12109
|
+
|
|
12110
|
+
|
|
12206
12111
|
/**
|
|
12207
12112
|
* Document down handler
|
|
12208
12113
|
* @param {any} event
|
|
12209
12114
|
*/
|
|
12115
|
+
_documentDownHandler(event) {
|
|
12116
|
+
var that = this,
|
|
12117
|
+
target = event.target;
|
|
12210
12118
|
|
|
12211
|
-
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
target = event.target;
|
|
12216
|
-
|
|
12217
|
-
if (that.contains(target) && target.closest) {
|
|
12218
|
-
that._target = target;
|
|
12219
|
-
|
|
12220
|
-
that._updateSplitter();
|
|
12221
|
-
}
|
|
12119
|
+
if (that.contains(target) && target.closest) {
|
|
12120
|
+
that._target = target;
|
|
12121
|
+
that._updateSplitter();
|
|
12122
|
+
}
|
|
12222
12123
|
}
|
|
12124
|
+
|
|
12223
12125
|
/**
|
|
12224
12126
|
* Document move handler
|
|
12225
12127
|
* @param {any} event
|
|
12226
12128
|
*/
|
|
12129
|
+
_documentMoveHandler(event) {
|
|
12130
|
+
var that = this,
|
|
12131
|
+
target = event.target,
|
|
12132
|
+
menu = that._contextMenu;
|
|
12227
12133
|
|
|
12228
|
-
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
var that = this,
|
|
12232
|
-
target = event.target,
|
|
12233
|
-
menu = that._contextMenu;
|
|
12134
|
+
if (menu && !JQX.Utilities.Core.isMobile) {
|
|
12135
|
+
if (menu.querySelector('.jqx-layout-context-menu-item[hover]')) {
|
|
12136
|
+
var items = menu.children;
|
|
12234
12137
|
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
for (var i = 0; i < items.length; i++) {
|
|
12240
|
-
items[i].removeAttribute('hover');
|
|
12241
|
-
}
|
|
12242
|
-
}
|
|
12138
|
+
for (var i = 0; i < items.length; i++) {
|
|
12139
|
+
items[i].removeAttribute('hover');
|
|
12140
|
+
}
|
|
12141
|
+
}
|
|
12243
12142
|
|
|
12244
|
-
|
|
12245
|
-
|
|
12143
|
+
if (menu.contains(target) && target.closest && target.closest('.jqx-layout-context-menu-item')) {
|
|
12144
|
+
target.setAttribute('hover', '');
|
|
12145
|
+
}
|
|
12246
12146
|
}
|
|
12247
|
-
}
|
|
12248
12147
|
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12148
|
+
if (that._dragDetails) {
|
|
12149
|
+
var offsetX = Math.abs(that._dragDetails.pageX - event.pageX);
|
|
12150
|
+
var offsetY = Math.abs(that._dragDetails.pageY - event.pageY);
|
|
12252
12151
|
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12152
|
+
if (offsetY <= 5 && offsetX <= 5) {
|
|
12153
|
+
return;
|
|
12154
|
+
}
|
|
12256
12155
|
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12156
|
+
if (!that._dragDetails.feedback.parentElement) {
|
|
12157
|
+
document.body.appendChild(that._dragDetails.feedback);
|
|
12158
|
+
document.body.appendChild(that._dragDetails.overlay)
|
|
12159
|
+
setTimeout(function () {
|
|
12160
|
+
that._dragDetails.feedback.classList.add('dragging');
|
|
12161
|
+
}, 100);
|
|
12162
|
+
}
|
|
12264
12163
|
|
|
12265
|
-
|
|
12266
|
-
that._dragDetails.feedback.style.left = event.pageX - that._dragDetails.feedback.offsetWidth / 2 - 5 + 'px';
|
|
12267
|
-
that._dragDetails.feedback.style.top = event.pageY - that._dragDetails.feedback.offsetHeight / 2 - 5 + 'px';
|
|
12268
|
-
var elements = document.elementsFromPoint(event.pageX, event.pageY);
|
|
12269
|
-
var group = null;
|
|
12270
|
-
var isTabStrip = false;
|
|
12164
|
+
that._dragDetails.dragging = true;
|
|
12271
12165
|
|
|
12272
|
-
|
|
12273
|
-
|
|
12166
|
+
that._dragDetails.feedback.style.left = event.pageX - that._dragDetails.feedback.offsetWidth / 2 - 5 + 'px';
|
|
12167
|
+
that._dragDetails.feedback.style.top = event.pageY - that._dragDetails.feedback.offsetHeight / 2 - 5 + 'px';
|
|
12274
12168
|
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12169
|
+
var elements = document.elementsFromPoint(event.pageX, event.pageY);
|
|
12170
|
+
var group = null;
|
|
12171
|
+
var isTabStrip = false;
|
|
12278
12172
|
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
continue;
|
|
12282
|
-
}
|
|
12173
|
+
for (var i = 0; i < elements.length; i++) {
|
|
12174
|
+
var element = elements[i];
|
|
12283
12175
|
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
}
|
|
12288
|
-
|
|
12289
|
-
if ((element.parentElement === that._dragDetails.parent || element === that._dragDetails.parent) && that._dragDetails.layoutGroup.items.length === 1) {
|
|
12290
|
-
continue;
|
|
12291
|
-
}
|
|
12292
|
-
|
|
12293
|
-
if (that._dragDetails.element.contains(element)) {
|
|
12294
|
-
continue;
|
|
12295
|
-
}
|
|
12296
|
-
|
|
12297
|
-
if (element instanceof TabLayoutItem) {
|
|
12298
|
-
group = element.parentElement;
|
|
12299
|
-
break;
|
|
12300
|
-
} else if (element instanceof TabLayoutGroup) {
|
|
12301
|
-
group = element;
|
|
12302
|
-
break;
|
|
12303
|
-
}
|
|
12304
|
-
}
|
|
12176
|
+
if (that._dragDetails.feedback.contains(element)) {
|
|
12177
|
+
continue;
|
|
12178
|
+
}
|
|
12305
12179
|
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
var height = size;
|
|
12311
|
-
var width = size;
|
|
12312
|
-
|
|
12313
|
-
if (!size) {
|
|
12314
|
-
width = group.offsetWidth / 3;
|
|
12315
|
-
height = group.offsetHeight / 3;
|
|
12316
|
-
} else {
|
|
12317
|
-
edgeSize = 0;
|
|
12318
|
-
}
|
|
12319
|
-
|
|
12320
|
-
var positionRects = [{
|
|
12321
|
-
left: offset.left,
|
|
12322
|
-
top: offset.top,
|
|
12323
|
-
right: offset.left + edgeSize,
|
|
12324
|
-
bottom: offset.top + edgeSize,
|
|
12325
|
-
position: 'top'
|
|
12326
|
-
}, {
|
|
12327
|
-
left: offset.left + edgeSize,
|
|
12328
|
-
top: offset.top,
|
|
12329
|
-
right: offset.left + group.offsetWidth - edgeSize,
|
|
12330
|
-
bottom: offset.top + height - edgeSize,
|
|
12331
|
-
position: 'top'
|
|
12332
|
-
}, {
|
|
12333
|
-
left: offset.left + group.offsetWidth - edgeSize,
|
|
12334
|
-
top: offset.top,
|
|
12335
|
-
right: offset.left + group.offsetWidth,
|
|
12336
|
-
bottom: offset.top + edgeSize,
|
|
12337
|
-
position: 'top'
|
|
12338
|
-
}, {
|
|
12339
|
-
left: offset.left,
|
|
12340
|
-
top: offset.top + edgeSize,
|
|
12341
|
-
right: offset.left + width,
|
|
12342
|
-
bottom: offset.top + group.offsetHeight - edgeSize,
|
|
12343
|
-
position: 'left'
|
|
12344
|
-
}, {
|
|
12345
|
-
left: offset.left + group.offsetWidth - width,
|
|
12346
|
-
top: offset.top + edgeSize,
|
|
12347
|
-
right: offset.left + group.offsetWidth,
|
|
12348
|
-
bottom: offset.top + group.offsetHeight - edgeSize,
|
|
12349
|
-
position: 'right'
|
|
12350
|
-
}, {
|
|
12351
|
-
left: offset.left,
|
|
12352
|
-
top: offset.top + group.offsetHeight - edgeSize,
|
|
12353
|
-
right: offset.left + edgeSize,
|
|
12354
|
-
bottom: offset.top + group.offsetHeight,
|
|
12355
|
-
position: 'bottom'
|
|
12356
|
-
}, {
|
|
12357
|
-
left: offset.left + edgeSize,
|
|
12358
|
-
top: offset.top + group.offsetHeight - height + edgeSize,
|
|
12359
|
-
right: offset.left + group.offsetWidth - edgeSize,
|
|
12360
|
-
bottom: offset.top + group.offsetHeight,
|
|
12361
|
-
position: 'bottom'
|
|
12362
|
-
}, {
|
|
12363
|
-
left: offset.left + group.offsetWidth - edgeSize,
|
|
12364
|
-
top: offset.top + group.offsetHeight - edgeSize,
|
|
12365
|
-
right: offset.left + group.offsetWidth,
|
|
12366
|
-
bottom: offset.top + group.offsetHeight,
|
|
12367
|
-
position: 'bottom'
|
|
12368
|
-
}];
|
|
12369
|
-
|
|
12370
|
-
for (var i = 0; i < positionRects.length; i++) {
|
|
12371
|
-
var rect = positionRects[i];
|
|
12372
|
-
|
|
12373
|
-
if (rect.left <= event.pageX && event.pageX <= rect.right) {
|
|
12374
|
-
if (rect.top <= event.pageY && event.pageY <= rect.bottom) {
|
|
12375
|
-
position = rect.position;
|
|
12376
|
-
break;
|
|
12377
|
-
}
|
|
12378
|
-
}
|
|
12379
|
-
}
|
|
12380
|
-
|
|
12381
|
-
return position;
|
|
12382
|
-
};
|
|
12383
|
-
|
|
12384
|
-
var rootGroup = that.querySelector('jqx-layout-group');
|
|
12385
|
-
var position = getPosition(rootGroup, 10);
|
|
12386
|
-
var currentGroup = null;
|
|
12387
|
-
|
|
12388
|
-
if (!position) {
|
|
12389
|
-
if (!group) {
|
|
12390
|
-
that._handleDropArea(null);
|
|
12391
|
-
} else {
|
|
12392
|
-
if (isTabStrip) {
|
|
12393
|
-
if (group !== that._dragDetails.parent) {
|
|
12394
|
-
position = 'center';
|
|
12395
|
-
currentGroup = group;
|
|
12396
|
-
}
|
|
12397
|
-
} else {
|
|
12398
|
-
position = getPosition(group) || 'center';
|
|
12399
|
-
currentGroup = group;
|
|
12400
|
-
}
|
|
12401
|
-
}
|
|
12402
|
-
} else {
|
|
12403
|
-
currentGroup = rootGroup;
|
|
12404
|
-
}
|
|
12180
|
+
if (element.classList.contains('jqx-layout-tab-strip')) {
|
|
12181
|
+
if (that._dragDetails.element.contains(element)) {
|
|
12182
|
+
continue;
|
|
12183
|
+
}
|
|
12405
12184
|
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12185
|
+
group = element.parentElement;
|
|
12186
|
+
isTabStrip = true;
|
|
12187
|
+
break;
|
|
12188
|
+
}
|
|
12409
12189
|
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
if (that._resizeDetails) {
|
|
12415
|
-
var offsetX = Math.abs(that._resizeDetails.clientX - event.clientX);
|
|
12416
|
-
var offsetY = Math.abs(that._resizeDetails.clientY - event.clientY);
|
|
12417
|
-
var splitter = that._resizeDetails.splitter;
|
|
12418
|
-
var item = that._resizeDetails.item;
|
|
12419
|
-
var itemRect = that._resizeDetails.itemRect;
|
|
12420
|
-
var previousItemRect = that._resizeDetails.previousItemRect;
|
|
12421
|
-
var previousItem = that._resizeDetails.previousItem;
|
|
12422
|
-
var nextItemRect = that._resizeDetails.nextItemRect;
|
|
12423
|
-
var nextItem = that._resizeDetails.nextItem;
|
|
12424
|
-
var minSize = parseInt(item.getAttribute('min'));
|
|
12425
|
-
|
|
12426
|
-
var resetSplitter = function resetSplitter(splitter) {
|
|
12427
|
-
if (splitter.classList.contains('jqx-visibility-hidden')) {
|
|
12428
|
-
return;
|
|
12429
|
-
}
|
|
12190
|
+
if ((element.parentElement === that._dragDetails.parent || element === that._dragDetails.parent) && that._dragDetails.layoutGroup.items.length === 1) {
|
|
12191
|
+
continue;
|
|
12192
|
+
}
|
|
12430
12193
|
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
splitter.style.bottom = '';
|
|
12435
|
-
};
|
|
12194
|
+
if (that._dragDetails.element.contains(element)) {
|
|
12195
|
+
continue;
|
|
12196
|
+
}
|
|
12436
12197
|
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12198
|
+
if (element instanceof TabLayoutItem) {
|
|
12199
|
+
group = element.parentElement;
|
|
12200
|
+
break;
|
|
12201
|
+
}
|
|
12202
|
+
else if (element instanceof TabLayoutGroup) {
|
|
12203
|
+
group = element;
|
|
12204
|
+
break;
|
|
12205
|
+
}
|
|
12206
|
+
}
|
|
12441
12207
|
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
return;
|
|
12447
|
-
}
|
|
12208
|
+
var getPosition = function (group, size) {
|
|
12209
|
+
var offset = that.offset(group);
|
|
12210
|
+
var position = null;
|
|
12211
|
+
var edgeSize = 50;
|
|
12448
12212
|
|
|
12449
|
-
|
|
12450
|
-
|
|
12213
|
+
var height = size;
|
|
12214
|
+
var width = size;
|
|
12215
|
+
|
|
12216
|
+
if (!size) {
|
|
12217
|
+
width = group.offsetWidth / 3;
|
|
12218
|
+
height = group.offsetHeight / 3;
|
|
12219
|
+
}
|
|
12220
|
+
else {
|
|
12221
|
+
edgeSize = 0;
|
|
12222
|
+
}
|
|
12223
|
+
|
|
12224
|
+
var positionRects = [
|
|
12225
|
+
{
|
|
12226
|
+
left: offset.left,
|
|
12227
|
+
top: offset.top,
|
|
12228
|
+
right: offset.left + edgeSize,
|
|
12229
|
+
bottom: offset.top + edgeSize,
|
|
12230
|
+
position: 'top'
|
|
12231
|
+
},
|
|
12232
|
+
{
|
|
12233
|
+
left: offset.left + edgeSize,
|
|
12234
|
+
top: offset.top,
|
|
12235
|
+
right: offset.left + group.offsetWidth - edgeSize,
|
|
12236
|
+
bottom: offset.top + height - edgeSize,
|
|
12237
|
+
position: 'top'
|
|
12238
|
+
},
|
|
12239
|
+
{
|
|
12240
|
+
left: offset.left + group.offsetWidth - edgeSize,
|
|
12241
|
+
top: offset.top,
|
|
12242
|
+
right: offset.left + group.offsetWidth,
|
|
12243
|
+
bottom: offset.top + edgeSize,
|
|
12244
|
+
position: 'top'
|
|
12245
|
+
},
|
|
12246
|
+
{
|
|
12247
|
+
left: offset.left,
|
|
12248
|
+
top: offset.top + edgeSize,
|
|
12249
|
+
right: offset.left + width,
|
|
12250
|
+
bottom: offset.top + group.offsetHeight - edgeSize,
|
|
12251
|
+
position: 'left'
|
|
12252
|
+
},
|
|
12253
|
+
{
|
|
12254
|
+
left: offset.left + group.offsetWidth - width,
|
|
12255
|
+
top: offset.top + edgeSize,
|
|
12256
|
+
right: offset.left + group.offsetWidth,
|
|
12257
|
+
bottom: offset.top + group.offsetHeight - edgeSize,
|
|
12258
|
+
position: 'right'
|
|
12259
|
+
},
|
|
12260
|
+
{
|
|
12261
|
+
left: offset.left,
|
|
12262
|
+
top: offset.top + group.offsetHeight - edgeSize,
|
|
12263
|
+
right: offset.left + edgeSize,
|
|
12264
|
+
bottom: offset.top + group.offsetHeight,
|
|
12265
|
+
position: 'bottom'
|
|
12266
|
+
},
|
|
12267
|
+
{
|
|
12268
|
+
left: offset.left + edgeSize,
|
|
12269
|
+
top: offset.top + group.offsetHeight - height + edgeSize,
|
|
12270
|
+
right: offset.left + group.offsetWidth - edgeSize,
|
|
12271
|
+
bottom: offset.top + group.offsetHeight,
|
|
12272
|
+
position: 'bottom'
|
|
12273
|
+
},
|
|
12274
|
+
{
|
|
12275
|
+
left: offset.left + group.offsetWidth - edgeSize,
|
|
12276
|
+
top: offset.top + group.offsetHeight - edgeSize,
|
|
12277
|
+
right: offset.left + group.offsetWidth,
|
|
12278
|
+
bottom: offset.top + group.offsetHeight,
|
|
12279
|
+
position: 'bottom'
|
|
12280
|
+
},
|
|
12281
|
+
]
|
|
12282
|
+
|
|
12283
|
+
for (var i = 0; i < positionRects.length; i++) {
|
|
12284
|
+
var rect = positionRects[i];
|
|
12285
|
+
|
|
12286
|
+
if (rect.left <= event.pageX && event.pageX <= rect.right) {
|
|
12287
|
+
if (rect.top <= event.pageY && event.pageY <= rect.bottom) {
|
|
12288
|
+
position = rect.position;
|
|
12289
|
+
break;
|
|
12290
|
+
}
|
|
12291
|
+
}
|
|
12292
|
+
}
|
|
12293
|
+
|
|
12294
|
+
return position;
|
|
12295
|
+
}
|
|
12451
12296
|
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12297
|
+
var rootGroup = that.querySelector('jqx-layout-group');
|
|
12298
|
+
|
|
12299
|
+
var position = getPosition(rootGroup, 10);
|
|
12300
|
+
var currentGroup = null;
|
|
12301
|
+
|
|
12302
|
+
if (!position) {
|
|
12303
|
+
if (!group) {
|
|
12304
|
+
that._handleDropArea(null);
|
|
12305
|
+
}
|
|
12306
|
+
else {
|
|
12307
|
+
if (isTabStrip) {
|
|
12308
|
+
if (group !== that._dragDetails.parent) {
|
|
12309
|
+
position = 'center';
|
|
12310
|
+
currentGroup = group;
|
|
12311
|
+
}
|
|
12312
|
+
}
|
|
12313
|
+
else {
|
|
12314
|
+
position = getPosition(group) || 'center';
|
|
12315
|
+
currentGroup = group
|
|
12316
|
+
}
|
|
12317
|
+
}
|
|
12318
|
+
}
|
|
12319
|
+
else {
|
|
12320
|
+
currentGroup = rootGroup;
|
|
12321
|
+
}
|
|
12322
|
+
|
|
12323
|
+
if (currentGroup) {
|
|
12324
|
+
that._dragDetails.current = currentGroup;
|
|
12325
|
+
that._dragDetails.position = position;
|
|
12326
|
+
that._handleDropArea(currentGroup, position);
|
|
12327
|
+
}
|
|
12470
12328
|
}
|
|
12471
12329
|
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12330
|
+
if (that._resizeDetails) {
|
|
12331
|
+
var offsetX = Math.abs(that._resizeDetails.clientX - event.clientX);
|
|
12332
|
+
var offsetY = Math.abs(that._resizeDetails.clientY - event.clientY);
|
|
12333
|
+
|
|
12334
|
+
var splitter = that._resizeDetails.splitter;
|
|
12335
|
+
var item = that._resizeDetails.item;
|
|
12336
|
+
var itemRect = that._resizeDetails.itemRect;
|
|
12337
|
+
var previousItemRect = that._resizeDetails.previousItemRect;
|
|
12338
|
+
var previousItem = that._resizeDetails.previousItem;
|
|
12339
|
+
var nextItemRect = that._resizeDetails.nextItemRect;
|
|
12340
|
+
var nextItem = that._resizeDetails.nextItem;
|
|
12341
|
+
var minSize = parseInt(item.getAttribute('min'));
|
|
12342
|
+
|
|
12343
|
+
var resetSplitter = function (splitter) {
|
|
12344
|
+
if (splitter.classList.contains('jqx-visibility-hidden')) {
|
|
12345
|
+
return;
|
|
12346
|
+
}
|
|
12347
|
+
|
|
12348
|
+
splitter.style.right = '';
|
|
12349
|
+
splitter.style.top = '';
|
|
12350
|
+
splitter.style.left = '';
|
|
12351
|
+
splitter.style.bottom = '';
|
|
12352
|
+
}
|
|
12353
|
+
|
|
12354
|
+
resetSplitter(splitter);
|
|
12355
|
+
resetSplitter(that.$.splitter);
|
|
12356
|
+
|
|
12357
|
+
splitter.classList.remove('error');
|
|
12358
|
+
splitter.classList.add('active');
|
|
12359
|
+
|
|
12360
|
+
if (!that._resizeDetails.dragging) {
|
|
12361
|
+
if (splitter.classList.contains('horizontal') && offsetY <= 5) {
|
|
12362
|
+
return;
|
|
12363
|
+
}
|
|
12364
|
+
else if (splitter.classList.contains('vertical') && offsetX <= 5) {
|
|
12365
|
+
return;
|
|
12366
|
+
}
|
|
12367
|
+
|
|
12368
|
+
that._resizeDetails.dragging = true;
|
|
12502
12369
|
}
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
previousItem.setAttribute('size', previousItemSize);
|
|
12512
|
-
}
|
|
12513
|
-
} else {
|
|
12514
|
-
var newPosition = -event[normalized.clientPos] + that._resizeDetails.splitterRect[normalized.pos];
|
|
12515
|
-
var minPosition = itemRect[normalized.size] - minSize;
|
|
12516
|
-
|
|
12517
|
-
if (newPosition > minPosition) {
|
|
12518
|
-
newPosition = minPosition;
|
|
12519
|
-
splitter.classList.add('error');
|
|
12520
|
-
}
|
|
12521
|
-
|
|
12522
|
-
if (nextItemRect) {
|
|
12523
|
-
var minSize = parseInt(nextItem.getAttribute('min'));
|
|
12524
|
-
var maxPosition = -nextItemRect[normalized.size] + minSize;
|
|
12525
|
-
|
|
12526
|
-
if (newPosition < maxPosition) {
|
|
12527
|
-
newPosition = maxPosition;
|
|
12528
|
-
splitter.classList.add('error');
|
|
12370
|
+
|
|
12371
|
+
var normalized = {
|
|
12372
|
+
'clientPos': 'clientX',
|
|
12373
|
+
'pos': 'x',
|
|
12374
|
+
'size': 'width',
|
|
12375
|
+
'near': 'left',
|
|
12376
|
+
'far': 'right',
|
|
12377
|
+
'offsetSize': 'offsetWidth'
|
|
12529
12378
|
}
|
|
12530
|
-
}
|
|
12531
12379
|
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12380
|
+
if (splitter.classList.contains('horizontal')) {
|
|
12381
|
+
normalized = {
|
|
12382
|
+
'clientPos': 'clientY',
|
|
12383
|
+
'pos': 'y',
|
|
12384
|
+
'size': 'height',
|
|
12385
|
+
'near': 'top',
|
|
12386
|
+
'far': 'bottom',
|
|
12387
|
+
'offsetSize': 'offsetHeight'
|
|
12388
|
+
}
|
|
12389
|
+
}
|
|
12535
12390
|
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
}
|
|
12540
|
-
}
|
|
12391
|
+
var updateSplitter = function (splitter) {
|
|
12392
|
+
var offset = that.offset(splitter);
|
|
12393
|
+
var elementOffset = that.offset(that);
|
|
12541
12394
|
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
}
|
|
12545
|
-
}, {
|
|
12546
|
-
key: "_offsetTop",
|
|
12547
|
-
value: function _offsetTop(element) {
|
|
12548
|
-
var that = this;
|
|
12395
|
+
elementOffset.left++;
|
|
12396
|
+
elementOffset.top++;
|
|
12549
12397
|
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
}
|
|
12398
|
+
that.$.splitter.style.width = splitter.offsetWidth + 'px';
|
|
12399
|
+
that.$.splitter.style.height = splitter.offsetHeight + 'px';
|
|
12553
12400
|
|
|
12554
|
-
|
|
12555
|
-
}
|
|
12556
|
-
}, {
|
|
12557
|
-
key: "_offsetLeft",
|
|
12558
|
-
value: function _offsetLeft(element) {
|
|
12559
|
-
var that = this;
|
|
12401
|
+
that.$.splitter.className = splitter.className;
|
|
12560
12402
|
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
}
|
|
12403
|
+
that.$.splitter.style.left = offset.left - elementOffset.left + 'px';
|
|
12404
|
+
that.$.splitter.style.top = offset.top - elementOffset.top + 'px';
|
|
12564
12405
|
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
key: "offset",
|
|
12569
|
-
value: function offset(element) {
|
|
12570
|
-
return {
|
|
12571
|
-
left: this._offsetLeft(element),
|
|
12572
|
-
top: this._offsetTop(element)
|
|
12573
|
-
};
|
|
12574
|
-
}
|
|
12575
|
-
}, {
|
|
12576
|
-
key: "_keyUpHandler",
|
|
12577
|
-
value: function _keyUpHandler(event) {
|
|
12578
|
-
var that = this;
|
|
12406
|
+
splitter.setAttribute('drag', '');
|
|
12407
|
+
that.$.splitter.setAttribute('drag', '');
|
|
12408
|
+
}
|
|
12579
12409
|
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12410
|
+
if (splitter.classList.contains('last')) {
|
|
12411
|
+
var newPosition = event[normalized.clientPos] - that._resizeDetails.splitterRect[normalized.pos];
|
|
12412
|
+
var maxPosition = itemRect[normalized.size] - minSize;
|
|
12583
12413
|
|
|
12584
|
-
|
|
12414
|
+
if (newPosition > maxPosition) {
|
|
12415
|
+
newPosition = maxPosition;
|
|
12416
|
+
splitter.classList.add('error');
|
|
12417
|
+
}
|
|
12585
12418
|
|
|
12586
|
-
|
|
12419
|
+
if (previousItemRect) {
|
|
12420
|
+
var minSize = parseInt(previousItem.getAttribute('min'));
|
|
12587
12421
|
|
|
12588
|
-
|
|
12589
|
-
|
|
12422
|
+
var minPosition = previousItemRect[normalized.size] - minSize;
|
|
12423
|
+
if (newPosition < -minPosition) {
|
|
12424
|
+
newPosition = -minPosition;
|
|
12425
|
+
splitter.classList.add('error');
|
|
12426
|
+
}
|
|
12427
|
+
}
|
|
12590
12428
|
|
|
12591
|
-
|
|
12592
|
-
var drag = that._resizeDetails;
|
|
12593
|
-
drag.splitter.classList.contains('last') ? drag.previousItem.size = drag.previousItemSize : drag.nextItem.size = drag.nextItem.previousItemSize;
|
|
12594
|
-
drag.item.size = drag.itemSize;
|
|
12595
|
-
that.refresh();
|
|
12429
|
+
splitter.style[normalized.near] = newPosition + 'px';
|
|
12596
12430
|
|
|
12597
|
-
|
|
12431
|
+
var newSize = item[normalized.offsetSize] - newPosition;
|
|
12598
12432
|
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12433
|
+
item.setAttribute('size', newSize);
|
|
12434
|
+
|
|
12435
|
+
if (previousItem) {
|
|
12436
|
+
var previousItemSize = item[normalized.offsetSize] + previousItem[normalized.offsetSize] - newSize;
|
|
12437
|
+
|
|
12438
|
+
previousItem.setAttribute('size', previousItemSize);
|
|
12439
|
+
}
|
|
12440
|
+
}
|
|
12441
|
+
else {
|
|
12442
|
+
var newPosition = -event[normalized.clientPos] + that._resizeDetails.splitterRect[normalized.pos];
|
|
12443
|
+
var minPosition = itemRect[normalized.size] - minSize;
|
|
12444
|
+
|
|
12445
|
+
if (newPosition > minPosition) {
|
|
12446
|
+
newPosition = minPosition;
|
|
12447
|
+
splitter.classList.add('error');
|
|
12448
|
+
}
|
|
12449
|
+
|
|
12450
|
+
if (nextItemRect) {
|
|
12451
|
+
var minSize = parseInt(nextItem.getAttribute('min'));
|
|
12452
|
+
|
|
12453
|
+
var maxPosition = -nextItemRect[normalized.size] + minSize;
|
|
12454
|
+
if (newPosition < maxPosition) {
|
|
12455
|
+
newPosition = maxPosition;
|
|
12456
|
+
splitter.classList.add('error');
|
|
12457
|
+
}
|
|
12458
|
+
}
|
|
12459
|
+
|
|
12460
|
+
|
|
12461
|
+
splitter.style[normalized.far] = newPosition + 'px';
|
|
12462
|
+
|
|
12463
|
+
var newSize = item[normalized.offsetSize] - newPosition;
|
|
12464
|
+
|
|
12465
|
+
item.setAttribute('size', newSize);
|
|
12466
|
+
|
|
12467
|
+
if (nextItem) {
|
|
12468
|
+
var nextItemSize = nextItem[normalized.offsetSize] + item[normalized.offsetSize] - newSize;
|
|
12469
|
+
|
|
12470
|
+
nextItem.setAttribute('size', nextItemSize);
|
|
12471
|
+
}
|
|
12472
|
+
}
|
|
12473
|
+
|
|
12474
|
+
updateSplitter(splitter);
|
|
12605
12475
|
}
|
|
12606
|
-
}
|
|
12607
12476
|
}
|
|
12608
|
-
}, {
|
|
12609
|
-
key: "_endDrag",
|
|
12610
|
-
value: function _endDrag() {
|
|
12611
|
-
var that = this;
|
|
12612
12477
|
|
|
12613
|
-
|
|
12478
|
+
_offsetTop(element) {
|
|
12479
|
+
var that = this;
|
|
12614
12480
|
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
}
|
|
12481
|
+
if (!element) {
|
|
12482
|
+
return 0;
|
|
12483
|
+
}
|
|
12619
12484
|
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
var position = that._dragDetails.position;
|
|
12485
|
+
return element.offsetTop + that._offsetTop(element.offsetParent);
|
|
12486
|
+
}
|
|
12623
12487
|
|
|
12624
|
-
|
|
12488
|
+
_offsetLeft(element) {
|
|
12489
|
+
var that = this;
|
|
12625
12490
|
|
|
12626
|
-
|
|
12627
|
-
|
|
12491
|
+
if (!element) {
|
|
12492
|
+
return 0;
|
|
12493
|
+
}
|
|
12628
12494
|
|
|
12629
|
-
that.
|
|
12495
|
+
return element.offsetLeft + that._offsetLeft(element.offsetParent);
|
|
12496
|
+
}
|
|
12630
12497
|
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12498
|
+
offset(element) {
|
|
12499
|
+
return { left: this._offsetLeft(element), top: this._offsetTop(element) }
|
|
12500
|
+
}
|
|
12501
|
+
|
|
12502
|
+
_keyUpHandler(event) {
|
|
12503
|
+
var that = this;
|
|
12504
|
+
if (event.key === 'Escape') {
|
|
12505
|
+
if (that._dragDetails) {
|
|
12506
|
+
that._dragDetails.feedback.remove();
|
|
12507
|
+
that._dragDetails.overlay.remove();
|
|
12508
|
+
that._dragDetails = null;
|
|
12509
|
+
that._handleDropArea(null);
|
|
12510
|
+
}
|
|
12635
12511
|
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
var parent = group.parentElement;
|
|
12639
|
-
var parentGroup = parent.parentElement;
|
|
12640
|
-
var ownerGroup = parentGroup.parentElement;
|
|
12512
|
+
if (that._resizeDetails) {
|
|
12513
|
+
var drag = that._resizeDetails;
|
|
12641
12514
|
|
|
12642
|
-
|
|
12643
|
-
|
|
12515
|
+
drag.splitter.classList.contains('last') ? drag.previousItem.size = drag.previousItemSize : drag.nextItem.size = drag.nextItem.previousItemSize;
|
|
12516
|
+
drag.item.size = drag.itemSize;
|
|
12644
12517
|
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12518
|
+
that.refresh();
|
|
12519
|
+
that._handleItemClick(drag.item);
|
|
12520
|
+
that._resizeDetails = null;
|
|
12521
|
+
return;
|
|
12649
12522
|
}
|
|
12523
|
+
}
|
|
12524
|
+
else if (event.key === 'Delete') {
|
|
12525
|
+
if (that._selectedItem) {
|
|
12526
|
+
that._removeLayoutItem(that._selectedItem);
|
|
12527
|
+
}
|
|
12528
|
+
}
|
|
12529
|
+
}
|
|
12530
|
+
|
|
12531
|
+
_endDrag() {
|
|
12532
|
+
var that = this;
|
|
12650
12533
|
|
|
12651
|
-
|
|
12652
|
-
|
|
12534
|
+
that._handleDropArea(null);
|
|
12535
|
+
|
|
12536
|
+
if (!that._dragDetails.dragging) {
|
|
12537
|
+
that._dragDetails = null;
|
|
12538
|
+
return;
|
|
12653
12539
|
}
|
|
12654
12540
|
|
|
12655
|
-
that.
|
|
12541
|
+
var group = that._dragDetails.current;
|
|
12542
|
+
var item = that._dragDetails.element;
|
|
12543
|
+
var position = that._dragDetails.position;
|
|
12656
12544
|
|
|
12657
|
-
that.
|
|
12545
|
+
that._handleDropArea(null);
|
|
12658
12546
|
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12547
|
+
if (group) {
|
|
12548
|
+
that._addTabLayoutItem(group, position, item);
|
|
12549
|
+
that._removeLayoutItem(item);
|
|
12550
|
+
|
|
12551
|
+
if (group.parentElement && Array.from(group.parentElement.parentElement.children).filter(function (value) {
|
|
12552
|
+
if (value.classList.contains('jqx-layout-group')) {
|
|
12553
|
+
return true;
|
|
12554
|
+
}
|
|
12555
|
+
|
|
12556
|
+
return false;
|
|
12557
|
+
}).length === 1) {
|
|
12558
|
+
var parent = group.parentElement;
|
|
12559
|
+
var parentGroup = parent.parentElement;
|
|
12560
|
+
var ownerGroup = parentGroup.parentElement;
|
|
12561
|
+
|
|
12562
|
+
if (!(parentGroup.getAttribute('data-id') === 'root' || ownerGroup.getAttribute('data-id') === 'root') && ownerGroup !== that) {
|
|
12563
|
+
var index = Array.from(ownerGroup.children).indexOf(parent.parentElement);
|
|
12564
|
+
|
|
12565
|
+
if (index >= 0) {
|
|
12566
|
+
ownerGroup.insertBefore(parent, ownerGroup.children[index])
|
|
12567
|
+
}
|
|
12568
|
+
else {
|
|
12569
|
+
ownerGroup.appendChild(parent);
|
|
12570
|
+
}
|
|
12571
|
+
|
|
12572
|
+
parentGroup.remove();
|
|
12573
|
+
}
|
|
12574
|
+
}
|
|
12575
|
+
|
|
12576
|
+
that.refresh();
|
|
12577
|
+
that._updateSplitter();
|
|
12666
12578
|
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12579
|
+
requestAnimationFrame(function () {
|
|
12580
|
+
that.classList.add('outline');
|
|
12581
|
+
that.querySelectorAll('.jqx-element').forEach(function (control) {
|
|
12582
|
+
that.dispatchEvent(new CustomEvent('resize'));
|
|
12671
12583
|
|
|
12672
|
-
|
|
12584
|
+
});
|
|
12585
|
+
})
|
|
12586
|
+
}
|
|
12673
12587
|
|
|
12674
|
-
|
|
12588
|
+
that.dispatchEvent(new CustomEvent('stateChange', { type: 'insert', item: item }));
|
|
12675
12589
|
|
|
12676
|
-
|
|
12590
|
+
that._dragDetails.feedback.remove();
|
|
12591
|
+
that._dragDetails.overlay.remove();
|
|
12592
|
+
that._dragDetails = null;
|
|
12677
12593
|
}
|
|
12678
12594
|
/**
|
|
12679
12595
|
* Document up handler
|
|
12680
12596
|
* @param {any} event
|
|
12681
12597
|
*/
|
|
12598
|
+
_documentUpHandler(event) {
|
|
12599
|
+
var that = this,
|
|
12600
|
+
isMobile = JQX.Utilities.Core.isMobile,
|
|
12601
|
+
target = isMobile ? document.elementFromPoint(event.pageX - window.pageXOffset, event.pageY - window.pageYOffset) : event.target;
|
|
12682
12602
|
|
|
12683
|
-
}, {
|
|
12684
|
-
key: "_documentUpHandler",
|
|
12685
|
-
value: function _documentUpHandler(event) {
|
|
12686
|
-
var that = this,
|
|
12687
|
-
isMobile = JQX.Utilities.Core.isMobile,
|
|
12688
|
-
target = isMobile ? document.elementFromPoint(event.pageX - window.pageXOffset, event.pageY - window.pageYOffset) : event.target;
|
|
12689
|
-
|
|
12690
|
-
if (event.button === 2) {
|
|
12691
|
-
return;
|
|
12692
|
-
}
|
|
12693
|
-
|
|
12694
|
-
if (that._dragDetails) {
|
|
12695
|
-
that._endDrag(event);
|
|
12696
|
-
}
|
|
12697
12603
|
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
if (drag.item) {
|
|
12702
|
-
drag.item.style.overflow = '';
|
|
12703
|
-
}
|
|
12704
|
-
|
|
12705
|
-
if (drag.previousItem) {
|
|
12706
|
-
drag.previousItem.style.overflow = '';
|
|
12604
|
+
if (event.button === 2) {
|
|
12605
|
+
return;
|
|
12707
12606
|
}
|
|
12708
12607
|
|
|
12709
|
-
if (
|
|
12710
|
-
|
|
12608
|
+
if (that._dragDetails) {
|
|
12609
|
+
that._endDrag(event);
|
|
12711
12610
|
}
|
|
12712
12611
|
|
|
12713
|
-
that.
|
|
12612
|
+
if (that._resizeDetails) {
|
|
12613
|
+
var drag = that._resizeDetails;
|
|
12714
12614
|
|
|
12715
|
-
|
|
12615
|
+
if (drag.item) {
|
|
12616
|
+
drag.item.style.overflow = '';
|
|
12617
|
+
}
|
|
12716
12618
|
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
control.dispatchEvent(new CustomEvent('resize'));
|
|
12721
|
-
});
|
|
12722
|
-
return;
|
|
12723
|
-
}
|
|
12619
|
+
if (drag.previousItem) {
|
|
12620
|
+
drag.previousItem.style.overflow = '';
|
|
12621
|
+
}
|
|
12724
12622
|
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12623
|
+
if (drag.nextItem) {
|
|
12624
|
+
drag.nextItem.style.overflow = '';
|
|
12625
|
+
}
|
|
12728
12626
|
|
|
12729
|
-
|
|
12627
|
+
that.refresh();
|
|
12628
|
+
that._handleItemClick(drag.item);
|
|
12629
|
+
that._resizeDetails = null;
|
|
12630
|
+
window.dispatchEvent(new Event('resize'));
|
|
12730
12631
|
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
that._handleItemClick(target.closest('.jqx-layout-item'));
|
|
12632
|
+
that.querySelectorAll('.jqx-element').forEach(function (control) {
|
|
12633
|
+
control.dispatchEvent(new CustomEvent('resize'));
|
|
12634
|
+
});
|
|
12635
|
+
return;
|
|
12736
12636
|
}
|
|
12737
|
-
}
|
|
12738
12637
|
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
delete that._target;
|
|
12742
|
-
return;
|
|
12638
|
+
if (!that.contains(target)) {
|
|
12639
|
+
return;
|
|
12743
12640
|
}
|
|
12744
12641
|
|
|
12745
|
-
|
|
12746
|
-
var button = event.target;
|
|
12642
|
+
that.classList.add('outline');
|
|
12747
12643
|
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12644
|
+
if (that._target && !target.item) {
|
|
12645
|
+
if (target instanceof TabLayoutItem) {
|
|
12646
|
+
that._handleItemClick(target);
|
|
12647
|
+
}
|
|
12648
|
+
else {
|
|
12649
|
+
that._handleItemClick(target.closest('.jqx-layout-item'));
|
|
12650
|
+
}
|
|
12751
12651
|
}
|
|
12752
12652
|
|
|
12753
|
-
|
|
12754
|
-
|
|
12653
|
+
if (that._target) {
|
|
12654
|
+
if (that._target !== target) {
|
|
12655
|
+
delete that._target;
|
|
12656
|
+
return;
|
|
12657
|
+
}
|
|
12658
|
+
|
|
12659
|
+
if (!event.button && target.closest('.jqx-layout-buttons-container')) {
|
|
12660
|
+
var button = event.target;
|
|
12661
|
+
|
|
12662
|
+
that._handleButtonClick(button.item, button.position);
|
|
12663
|
+
}
|
|
12664
|
+
else if (target.closest('.jqx-layout-context-menu') && (!isMobile && !event.button || isMobile)) {
|
|
12665
|
+
that._handleMenuItemClick(target.closest('.jqx-layout-context-menu-item'));
|
|
12666
|
+
}
|
|
12667
|
+
|
|
12668
|
+
delete that._target;
|
|
12669
|
+
}
|
|
12755
12670
|
}
|
|
12671
|
+
|
|
12756
12672
|
/**
|
|
12757
12673
|
* Document Select Start event handler
|
|
12758
12674
|
*/
|
|
12675
|
+
_documentSelectStartHandler(event) {
|
|
12676
|
+
var that = this;
|
|
12759
12677
|
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
var that = this;
|
|
12764
|
-
|
|
12765
|
-
if (that._target) {
|
|
12766
|
-
event.preventDefault();
|
|
12767
|
-
}
|
|
12678
|
+
if (that._target) {
|
|
12679
|
+
event.preventDefault();
|
|
12680
|
+
}
|
|
12768
12681
|
}
|
|
12682
|
+
|
|
12769
12683
|
/**
|
|
12770
12684
|
* Adds labels to the items that do not have set
|
|
12771
12685
|
* @param {any} data
|
|
12772
12686
|
*/
|
|
12687
|
+
_getDataSource(layout, path, index) {
|
|
12688
|
+
var that = this;
|
|
12689
|
+
|
|
12690
|
+
var data = [];
|
|
12773
12691
|
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
value: function _getDataSource(layout, path, index) {
|
|
12777
|
-
var that = this;
|
|
12778
|
-
var data = [];
|
|
12779
|
-
|
|
12780
|
-
if (!index) {
|
|
12781
|
-
index = 0;
|
|
12782
|
-
}
|
|
12783
|
-
|
|
12784
|
-
if (!path) {
|
|
12785
|
-
path = '';
|
|
12786
|
-
}
|
|
12787
|
-
|
|
12788
|
-
for (var i = 0; i < layout.length; i++) {
|
|
12789
|
-
var layoutItem = layout[i];
|
|
12790
|
-
var item = {
|
|
12791
|
-
label: layoutItem.label,
|
|
12792
|
-
id: layoutItem.getAttribute('data-id'),
|
|
12793
|
-
orientation: layoutItem.orientation,
|
|
12794
|
-
size: layoutItem.size,
|
|
12795
|
-
min: layoutItem.min,
|
|
12796
|
-
type: layoutItem.type,
|
|
12797
|
-
modifiers: layoutItem.modifiers,
|
|
12798
|
-
position: layoutItem.position
|
|
12799
|
-
};
|
|
12800
|
-
layoutItem.removeAttribute('index');
|
|
12801
|
-
|
|
12802
|
-
if (layoutItem instanceof LayoutGroup) {
|
|
12803
|
-
data.push(item);
|
|
12804
|
-
item.index = path !== '' ? path + '.' + index : index.toString();
|
|
12805
|
-
layoutItem.setAttribute('index', item.index);
|
|
12806
|
-
|
|
12807
|
-
if (layoutItem.items) {
|
|
12808
|
-
var items = that._getDataSource(layoutItem.items, item.index, 0);
|
|
12809
|
-
|
|
12810
|
-
item.items = items;
|
|
12811
|
-
}
|
|
12812
|
-
} else if (layoutItem instanceof LayoutItem) {
|
|
12813
|
-
if (layoutItem.items) {
|
|
12814
|
-
var items = that._getDataSource(layoutItem.items, path, index);
|
|
12815
|
-
|
|
12816
|
-
data = data.concat(items);
|
|
12817
|
-
} else {
|
|
12818
|
-
item.index = path !== '' ? path + '.' + index : index.toString();
|
|
12819
|
-
layoutItem.setAttribute('index', item.index);
|
|
12820
|
-
data.push(item);
|
|
12821
|
-
}
|
|
12692
|
+
if (!index) {
|
|
12693
|
+
index = 0;
|
|
12822
12694
|
}
|
|
12823
12695
|
|
|
12824
|
-
|
|
12825
|
-
|
|
12696
|
+
if (!path) {
|
|
12697
|
+
path = '';
|
|
12698
|
+
}
|
|
12699
|
+
|
|
12700
|
+
for (var i = 0; i < layout.length; i++) {
|
|
12701
|
+
var layoutItem = layout[i];
|
|
12702
|
+
|
|
12703
|
+
var item = {
|
|
12704
|
+
label: layoutItem.label,
|
|
12705
|
+
id: layoutItem.getAttribute('data-id'),
|
|
12706
|
+
orientation: layoutItem.orientation,
|
|
12707
|
+
size: layoutItem.size,
|
|
12708
|
+
min: layoutItem.min,
|
|
12709
|
+
type: layoutItem.type,
|
|
12710
|
+
modifiers: layoutItem.modifiers,
|
|
12711
|
+
position: layoutItem.position
|
|
12712
|
+
}
|
|
12713
|
+
|
|
12714
|
+
layoutItem.removeAttribute('index');
|
|
12715
|
+
|
|
12716
|
+
if (layoutItem instanceof LayoutGroup) {
|
|
12717
|
+
data.push(item);
|
|
12718
|
+
|
|
12719
|
+
item.index = path !== '' ? path + '.' + index : index.toString();
|
|
12720
|
+
layoutItem.setAttribute('index', item.index);
|
|
12721
|
+
|
|
12722
|
+
if (layoutItem.items) {
|
|
12723
|
+
var items = that._getDataSource(layoutItem.items, item.index, 0);
|
|
12724
|
+
item.items = items;
|
|
12725
|
+
}
|
|
12726
|
+
}
|
|
12727
|
+
else if (layoutItem instanceof LayoutItem) {
|
|
12728
|
+
if (layoutItem.items) {
|
|
12729
|
+
var items = that._getDataSource(layoutItem.items, path, index);
|
|
12730
|
+
|
|
12731
|
+
data = data.concat(items);
|
|
12732
|
+
}
|
|
12733
|
+
else {
|
|
12734
|
+
item.index = path !== '' ? path + '.' + index : index.toString();
|
|
12735
|
+
layoutItem.setAttribute('index', item.index);
|
|
12736
|
+
|
|
12737
|
+
data.push(item);
|
|
12738
|
+
}
|
|
12739
|
+
}
|
|
12740
|
+
|
|
12741
|
+
index++;
|
|
12742
|
+
}
|
|
12826
12743
|
|
|
12827
|
-
|
|
12744
|
+
return data;
|
|
12828
12745
|
}
|
|
12746
|
+
|
|
12829
12747
|
/**
|
|
12830
12748
|
* Generates the JSON array of the current structure of the element
|
|
12831
12749
|
*/
|
|
12750
|
+
_getLayout() {
|
|
12751
|
+
var that = this;
|
|
12752
|
+
var group = !arguments.length ? that.$.itemsContainer : arguments[0];
|
|
12832
12753
|
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
var that = this;
|
|
12837
|
-
var group = !arguments.length ? that.$.itemsContainer : arguments[0];
|
|
12838
|
-
|
|
12839
|
-
if (that._buttons) {
|
|
12840
|
-
that._buttons.remove();
|
|
12841
|
-
}
|
|
12754
|
+
if (that._buttons) {
|
|
12755
|
+
that._buttons.remove();
|
|
12756
|
+
}
|
|
12842
12757
|
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12758
|
+
if (that._dropArea) {
|
|
12759
|
+
that._dropArea.remove();
|
|
12760
|
+
}
|
|
12846
12761
|
|
|
12847
|
-
|
|
12762
|
+
var splitters = that.querySelectorAll('.jqx-layout-splitter');
|
|
12848
12763
|
|
|
12849
|
-
|
|
12850
|
-
|
|
12764
|
+
for (var i = 0; i < splitters.length; i++) {
|
|
12765
|
+
var splitter = splitters[i];
|
|
12851
12766
|
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
}
|
|
12856
|
-
|
|
12857
|
-
group.items = Array.from(group.children);
|
|
12858
|
-
group.items = group.items.filter(function (value) {
|
|
12859
|
-
return value !== group.tabs && value.hasAttribute('data-id');
|
|
12860
|
-
});
|
|
12861
|
-
var items = group.items.map(function (value) {
|
|
12862
|
-
if (value.classList.contains('jqx-layout-tab-strip')) {
|
|
12863
|
-
return null;
|
|
12767
|
+
if (splitter !== that.$.splitter) {
|
|
12768
|
+
splitter.remove();
|
|
12769
|
+
}
|
|
12864
12770
|
}
|
|
12865
12771
|
|
|
12866
|
-
|
|
12867
|
-
|
|
12772
|
+
group.items = Array.from(group.children);
|
|
12773
|
+
group.items = group.items.filter(function (value) {
|
|
12774
|
+
return value !== group.tabs && value.hasAttribute('data-id');
|
|
12775
|
+
});
|
|
12776
|
+
|
|
12777
|
+
var items = group.items.map(function (value) {
|
|
12778
|
+
if (value.classList.contains('jqx-layout-tab-strip')) {
|
|
12779
|
+
return null;
|
|
12780
|
+
}
|
|
12781
|
+
|
|
12782
|
+
var item = value;
|
|
12783
|
+
var itemGroup = value instanceof LayoutGroup ? value : null;
|
|
12784
|
+
|
|
12785
|
+
if (itemGroup) {
|
|
12786
|
+
item.items = that._getLayout(itemGroup)
|
|
12787
|
+
}
|
|
12788
|
+
|
|
12789
|
+
return item;
|
|
12790
|
+
});
|
|
12868
12791
|
|
|
12869
|
-
if (
|
|
12870
|
-
|
|
12792
|
+
if (group !== that.$.itemsContainer) {
|
|
12793
|
+
return items.filter(function (value) {
|
|
12794
|
+
return value !== null && value !== group.tabs
|
|
12795
|
+
});
|
|
12871
12796
|
}
|
|
12872
12797
|
|
|
12873
|
-
|
|
12874
|
-
|
|
12798
|
+
var data = [];
|
|
12799
|
+
var item = group;
|
|
12875
12800
|
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
return value !== null && value !== group.tabs;
|
|
12801
|
+
item.items = items.filter(function (value) {
|
|
12802
|
+
return value !== null && value !== group.tabs
|
|
12879
12803
|
});
|
|
12880
|
-
}
|
|
12881
|
-
|
|
12882
|
-
var data = [];
|
|
12883
|
-
var item = group;
|
|
12884
|
-
item.items = items.filter(function (value) {
|
|
12885
|
-
return value !== null && value !== group.tabs;
|
|
12886
|
-
});
|
|
12887
|
-
data.push(item);
|
|
12888
|
-
return data;
|
|
12889
|
-
}
|
|
12890
|
-
}, {
|
|
12891
|
-
key: "_updateSplitter",
|
|
12892
|
-
value: function _updateSplitter() {
|
|
12893
|
-
var that = this;
|
|
12894
12804
|
|
|
12895
|
-
|
|
12896
|
-
that._buttons.remove();
|
|
12897
|
-
}
|
|
12805
|
+
data.push(item);
|
|
12898
12806
|
|
|
12899
|
-
|
|
12807
|
+
return data;
|
|
12808
|
+
}
|
|
12900
12809
|
|
|
12901
|
-
var items = that.querySelectorAll('[data-id]');
|
|
12902
12810
|
|
|
12903
|
-
|
|
12904
|
-
var
|
|
12811
|
+
_updateSplitter() {
|
|
12812
|
+
var that = this;
|
|
12905
12813
|
|
|
12906
|
-
if (
|
|
12907
|
-
|
|
12814
|
+
if (that._buttons && that._dragDetails) {
|
|
12815
|
+
that._buttons.remove();
|
|
12908
12816
|
}
|
|
12909
12817
|
|
|
12910
|
-
|
|
12911
|
-
|
|
12818
|
+
that._removeSplitter();
|
|
12819
|
+
var items = that.querySelectorAll('[data-id]');
|
|
12912
12820
|
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12821
|
+
for (var i = 0; i < items.length; i++) {
|
|
12822
|
+
var item = items[i];
|
|
12823
|
+
|
|
12824
|
+
if (item.getAttribute('data-id') === 'root') {
|
|
12825
|
+
continue;
|
|
12826
|
+
}
|
|
12917
12827
|
|
|
12918
|
-
|
|
12828
|
+
if (item.hasAttribute('role')) {
|
|
12829
|
+
var role = item.getAttribute('role');
|
|
12830
|
+
|
|
12831
|
+
if (role === 'gridcell' || role === 'row' || role === 'columnheader' || role === 'rowheader') {
|
|
12832
|
+
continue;
|
|
12833
|
+
}
|
|
12834
|
+
}
|
|
12919
12835
|
|
|
12920
|
-
|
|
12921
|
-
|
|
12836
|
+
item.setAttribute('hover', '');
|
|
12837
|
+
that._handleSplitter(item);
|
|
12838
|
+
}
|
|
12922
12839
|
}
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12840
|
+
|
|
12841
|
+
_hideSplitter() {
|
|
12842
|
+
var that = this;
|
|
12843
|
+
|
|
12844
|
+
var items = that.querySelectorAll('[data-id]');
|
|
12845
|
+
|
|
12846
|
+
for (var i = 0; i < items.length; i++) {
|
|
12847
|
+
var item = items[i];
|
|
12848
|
+
|
|
12849
|
+
item.removeAttribute('hover');
|
|
12850
|
+
}
|
|
12933
12851
|
}
|
|
12934
|
-
}, {
|
|
12935
|
-
key: "_removeSplitter",
|
|
12936
|
-
value: function _removeSplitter() {
|
|
12937
|
-
var that = this;
|
|
12938
|
-
var splitters = that.querySelectorAll('.jqx-layout-splitter');
|
|
12939
12852
|
|
|
12940
|
-
|
|
12941
|
-
var
|
|
12853
|
+
_removeSplitter() {
|
|
12854
|
+
var that = this;
|
|
12855
|
+
var splitters = that.querySelectorAll('.jqx-layout-splitter');
|
|
12856
|
+
|
|
12857
|
+
for (var i = 0; i < splitters.length; i++) {
|
|
12858
|
+
var splitter = splitters[i];
|
|
12942
12859
|
|
|
12943
|
-
|
|
12944
|
-
|
|
12860
|
+
if (splitter !== that.$.splitter) {
|
|
12861
|
+
splitter.remove();
|
|
12862
|
+
}
|
|
12945
12863
|
}
|
|
12946
|
-
}
|
|
12947
12864
|
|
|
12948
|
-
|
|
12865
|
+
that._hideSplitter();
|
|
12949
12866
|
}
|
|
12867
|
+
|
|
12950
12868
|
/**
|
|
12951
12869
|
* Handles item selection
|
|
12952
12870
|
* @param {any} target - target element that was clicked
|
|
12953
12871
|
* @param {any} isOnDemand - selection on demand
|
|
12954
12872
|
*/
|
|
12873
|
+
_handleItemClick(target) {
|
|
12874
|
+
var that = this,
|
|
12875
|
+
previouslySelectedIndex = that.selectedIndex;
|
|
12955
12876
|
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
if (!target) {
|
|
12964
|
-
that.selectedIndex = null;
|
|
12965
|
-
that.querySelectorAll('[data-id]').forEach(function (i) {
|
|
12966
|
-
i.removeAttribute('selected');
|
|
12967
|
-
});
|
|
12968
|
-
that._selectedItem = null;
|
|
12969
|
-
return;
|
|
12970
|
-
} else {
|
|
12971
|
-
item = target instanceof HTMLElement ? target : that.querySelector('[data-id=' + target.id + ']');
|
|
12972
|
-
|
|
12973
|
-
if (item && item.readonly) {
|
|
12974
|
-
that.selectedIndex = null;
|
|
12975
|
-
return;
|
|
12877
|
+
var item = null;
|
|
12878
|
+
|
|
12879
|
+
if (!target) {
|
|
12880
|
+
that.selectedIndex = null;
|
|
12881
|
+
that.querySelectorAll('[data-id]').forEach(function (i) { i.removeAttribute('selected') });
|
|
12882
|
+
that._selectedItem = null;
|
|
12883
|
+
return;
|
|
12976
12884
|
}
|
|
12885
|
+
else {
|
|
12886
|
+
item = target instanceof HTMLElement ? target : that.querySelector('[data-id=' + target.id + ']');
|
|
12977
12887
|
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12888
|
+
if (item && item.readonly) {
|
|
12889
|
+
that.selectedIndex = null;
|
|
12890
|
+
return;
|
|
12891
|
+
}
|
|
12981
12892
|
|
|
12982
|
-
|
|
12983
|
-
that.refresh();
|
|
12984
|
-
return;
|
|
12985
|
-
}
|
|
12893
|
+
that.querySelectorAll('[data-id]').forEach(function (i) { i.removeAttribute('selected') });
|
|
12986
12894
|
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12895
|
+
if (!item) {
|
|
12896
|
+
that.refresh();
|
|
12897
|
+
return;
|
|
12898
|
+
}
|
|
12991
12899
|
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12900
|
+
that.selectedIndex = item.getAttribute('index');
|
|
12901
|
+
|
|
12902
|
+
item.setAttribute('selected', '');
|
|
12903
|
+
item.setAttribute('hover', '');
|
|
12904
|
+
that._selectedItem = item;
|
|
12905
|
+
if (item.classList.contains('jqx-hidden')) {
|
|
12906
|
+
that.refresh();
|
|
12907
|
+
}
|
|
12995
12908
|
|
|
12996
|
-
|
|
12909
|
+
that._handleButtonsVisibility(item);
|
|
12997
12910
|
|
|
12998
|
-
|
|
12999
|
-
|
|
12911
|
+
if (previouslySelectedIndex !== that.selectedIndex) {
|
|
12912
|
+
that.dispatchEvent(new CustomEvent('change'));
|
|
12913
|
+
}
|
|
13000
12914
|
}
|
|
13001
|
-
}
|
|
13002
12915
|
|
|
13003
|
-
|
|
12916
|
+
that._updateSplitter();
|
|
13004
12917
|
}
|
|
12918
|
+
|
|
13005
12919
|
/**
|
|
13006
12920
|
* Handles Layout Button click
|
|
13007
12921
|
* @param {any} target
|
|
13008
12922
|
*/
|
|
12923
|
+
_handleButtonClick(target, position) {
|
|
12924
|
+
var that = this,
|
|
12925
|
+
newItem = that._addLayoutItem(target, position);
|
|
13009
12926
|
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
value: function _handleButtonClick(target, position) {
|
|
13013
|
-
var that = this,
|
|
13014
|
-
newItem = that._addLayoutItem(target, position); //Select the new empty item
|
|
12927
|
+
//Select the new empty item
|
|
12928
|
+
that.dispatchEvent(new CustomEvent('stateChange', { type: 'insert', item: newItem }));
|
|
13015
12929
|
|
|
12930
|
+
that._handleItemClick(newItem, true);
|
|
12931
|
+
}
|
|
13016
12932
|
|
|
13017
|
-
that.dispatchEvent(new CustomEvent('stateChange', {
|
|
13018
|
-
type: 'insert',
|
|
13019
|
-
item: newItem
|
|
13020
|
-
}));
|
|
13021
12933
|
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
if (item.getAttribute('data-id') === 'root') {
|
|
13030
|
-
return;
|
|
13031
|
-
}
|
|
13032
|
-
|
|
13033
|
-
if (item instanceof LayoutItem && item.parentElement.items.length === 1) {
|
|
13034
|
-
var parent = item.parentElement;
|
|
13035
|
-
var currentParent = parent;
|
|
13036
|
-
|
|
13037
|
-
while (parent && parent.items && parent.items.length === 1) {
|
|
13038
|
-
if (parent.getAttribute('data-id') === 'root') {
|
|
13039
|
-
break;
|
|
13040
|
-
}
|
|
13041
|
-
|
|
13042
|
-
currentParent = parent;
|
|
13043
|
-
parent = parent.parentElement;
|
|
12934
|
+
|
|
12935
|
+
_removeLayoutItem(item) {
|
|
12936
|
+
var that = this;
|
|
12937
|
+
|
|
12938
|
+
if (item.getAttribute('data-id') === 'root') {
|
|
12939
|
+
return;
|
|
13044
12940
|
}
|
|
13045
12941
|
|
|
13046
|
-
if (
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
12942
|
+
if (item instanceof LayoutItem && item.parentElement.items.length === 1) {
|
|
12943
|
+
var parent = item.parentElement;
|
|
12944
|
+
var currentParent = parent;
|
|
12945
|
+
|
|
12946
|
+
while (parent && parent.items && parent.items.length === 1) {
|
|
12947
|
+
if (parent.getAttribute('data-id') === 'root') {
|
|
12948
|
+
break;
|
|
12949
|
+
}
|
|
12950
|
+
|
|
12951
|
+
currentParent = parent;
|
|
12952
|
+
parent = parent.parentElement;
|
|
12953
|
+
}
|
|
12954
|
+
|
|
12955
|
+
if (currentParent.getAttribute('data-id') !== 'root') {
|
|
12956
|
+
currentParent.remove();
|
|
12957
|
+
}
|
|
12958
|
+
else if (that.allowLiveSplit) {
|
|
12959
|
+
currentParent.appendChild(document.createElement('jqx-layout-item'));
|
|
12960
|
+
}
|
|
13050
12961
|
}
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
type: 'delete',
|
|
13058
|
-
item: item
|
|
13059
|
-
}));
|
|
12962
|
+
else {
|
|
12963
|
+
item.remove();
|
|
12964
|
+
}
|
|
12965
|
+
|
|
12966
|
+
that.refresh();
|
|
12967
|
+
|
|
12968
|
+
that.dispatchEvent(new CustomEvent('stateChange', { type: 'delete', item: item }));
|
|
13060
12969
|
}
|
|
12970
|
+
|
|
13061
12971
|
/**
|
|
13062
12972
|
* Refreshes the UI Component.
|
|
13063
12973
|
*/
|
|
12974
|
+
refresh() {
|
|
12975
|
+
var that = this;
|
|
13064
12976
|
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
var that = this;
|
|
12977
|
+
if (that._isUpdating) {
|
|
12978
|
+
return;
|
|
12979
|
+
}
|
|
13069
12980
|
|
|
13070
|
-
|
|
13071
|
-
return;
|
|
13072
|
-
}
|
|
12981
|
+
that.dataSource = that._getDataSource(that._getLayout());
|
|
13073
12982
|
|
|
13074
|
-
|
|
13075
|
-
that.$.splitter.className = 'jqx-visibility-hidden jqx-layout-splitter';
|
|
12983
|
+
that.$.splitter.className = 'jqx-visibility-hidden jqx-layout-splitter';
|
|
13076
12984
|
|
|
13077
|
-
|
|
13078
|
-
|
|
12985
|
+
var refreshLayoutGroup = function (group) {
|
|
12986
|
+
var item = that.getItem(group.getAttribute('index'));
|
|
13079
12987
|
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
12988
|
+
if (!item) {
|
|
12989
|
+
return;
|
|
12990
|
+
}
|
|
12991
|
+
group.style.gridTemplateColumns = '';
|
|
12992
|
+
group.style.gridTemplateRows = '';
|
|
13083
12993
|
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
var percentages = 0;
|
|
13088
|
-
var withSizeCount = 0;
|
|
12994
|
+
var template = '';
|
|
12995
|
+
var percentages = 0;
|
|
12996
|
+
var withSizeCount = 0;
|
|
13089
12997
|
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
12998
|
+
if (group instanceof TabLayoutGroup) {
|
|
12999
|
+
if (group.tabs) {
|
|
13000
|
+
group.tabs.remove();
|
|
13001
|
+
}
|
|
13094
13002
|
|
|
13095
|
-
|
|
13096
|
-
|
|
13003
|
+
var header = document.createElement('div');
|
|
13004
|
+
header.classList.add('jqx-layout-tab-strip');
|
|
13097
13005
|
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13006
|
+
if (that._selectedItem && group.contains(that._selectedItem) && that._selectedItem instanceof TabLayoutItem) {
|
|
13007
|
+
group.selectedIndex = Math.max(0, group.items.indexOf(that._selectedItem));
|
|
13008
|
+
}
|
|
13101
13009
|
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13010
|
+
if (group.selectedIndex >= group.children.length) {
|
|
13011
|
+
group.selectedIndex = 0;
|
|
13012
|
+
}
|
|
13105
13013
|
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13014
|
+
for (var i = 0; i < group.children.length; i++) {
|
|
13015
|
+
var child = group.children[i];
|
|
13016
|
+
var childItem = that.getItem(child.getAttribute('index'));
|
|
13017
|
+
|
|
13018
|
+
if (!childItem) {
|
|
13019
|
+
continue;
|
|
13020
|
+
}
|
|
13021
|
+
|
|
13022
|
+
var tab = document.createElement('div');
|
|
13023
|
+
tab.classList.add('jqx-layout-tab');
|
|
13024
|
+
tab.innerHTML = '<label>' + childItem.label + '</label><span class="jqx-close-button"></span>';
|
|
13025
|
+
header.appendChild(tab);
|
|
13026
|
+
child.setAttribute('tab', '');
|
|
13027
|
+
child.classList.add('jqx-hidden');
|
|
13028
|
+
tab.content = child;
|
|
13029
|
+
tab.item = childItem;
|
|
13030
|
+
tab.group = item;
|
|
13031
|
+
|
|
13032
|
+
if (child.modifiers) {
|
|
13033
|
+
if (child.modifiers.indexOf('close') === -1) {
|
|
13034
|
+
tab.querySelector('.jqx-close-button').classList.add('jqx-hidden');
|
|
13035
|
+
}
|
|
13036
|
+
}
|
|
13037
|
+
else {
|
|
13038
|
+
tab.querySelector('.jqx-close-button').classList.add('jqx-hidden');
|
|
13039
|
+
}
|
|
13040
|
+
|
|
13041
|
+
if (undefined === group.selectedIndex || i === group.selectedIndex) {
|
|
13042
|
+
tab.classList.add('selected');
|
|
13043
|
+
child.classList.remove('jqx-hidden');
|
|
13044
|
+
group.selectedIndex = i;
|
|
13045
|
+
}
|
|
13046
|
+
|
|
13047
|
+
|
|
13048
|
+
tab.onpointerup = function (event) {
|
|
13049
|
+
if (event.target.classList.contains('jqx-close-button') && tab.close) {
|
|
13050
|
+
group.selectedIndex = 0;
|
|
13051
|
+
that._removeLayoutItem(that._selectedItem);
|
|
13052
|
+
that._handleItemClick(parent);
|
|
13053
|
+
}
|
|
13054
|
+
}
|
|
13055
|
+
tab.onpointerdown = function (event) {
|
|
13056
|
+
var parent = this.closest('.jqx-layout-group');
|
|
13057
|
+
that._handleItemClick(this.content);
|
|
13058
|
+
tab.close = false;
|
|
13059
|
+
if (!event.target.classList.contains('jqx-close-button')) {
|
|
13060
|
+
if (childItem.modifiers && childItem.modifiers.indexOf('drag') >= 0 && parent.modifiers.indexOf('drag') >= 0) {
|
|
13061
|
+
that._beginDrag(parent, this, event);
|
|
13062
|
+
}
|
|
13063
|
+
}
|
|
13064
|
+
else {
|
|
13065
|
+
tab.close = true;
|
|
13066
|
+
}
|
|
13067
|
+
}
|
|
13109
13068
|
|
|
13110
|
-
|
|
13111
|
-
continue;
|
|
13112
|
-
}
|
|
13069
|
+
}
|
|
13113
13070
|
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
if (child.modifiers) {
|
|
13125
|
-
if (child.modifiers.indexOf('close') === -1) {
|
|
13126
|
-
tab.querySelector('.jqx-close-button').classList.add('jqx-hidden');
|
|
13127
|
-
}
|
|
13128
|
-
} else {
|
|
13129
|
-
tab.querySelector('.jqx-close-button').classList.add('jqx-hidden');
|
|
13071
|
+
|
|
13072
|
+
group.tabs = header;
|
|
13073
|
+
|
|
13074
|
+
if (item.position === 'top' || item.position === 'left') {
|
|
13075
|
+
group.insertBefore(header, group.firstChild);
|
|
13076
|
+
}
|
|
13077
|
+
else {
|
|
13078
|
+
group.appendChild(header);
|
|
13079
|
+
}
|
|
13130
13080
|
}
|
|
13081
|
+
else {
|
|
13082
|
+
for (var i = 0; i < group.children.length; i++) {
|
|
13083
|
+
var child = group.children[i];
|
|
13084
|
+
|
|
13085
|
+
if (child.hasAttribute('size')) {
|
|
13086
|
+
var size = child.getAttribute('size');
|
|
13087
|
+
|
|
13088
|
+
var pixels = parseFloat(size);
|
|
13089
|
+
var groupSize = group.orientation === 'vertical' ? group.offsetWidth : group.offsetHeight;
|
|
13090
|
+
var percentage = size.indexOf('%') >= 0 ? parseFloat(size) : parseFloat((pixels / groupSize) * 100);
|
|
13091
|
+
|
|
13092
|
+
percentages += percentage;
|
|
13093
|
+
withSizeCount++;
|
|
13094
|
+
|
|
13095
|
+
if (withSizeCount === group.children.length) {
|
|
13096
|
+
if (percentages < 100) {
|
|
13097
|
+
template += '1fr ';
|
|
13098
|
+
percentages = 100;
|
|
13099
|
+
continue;
|
|
13100
|
+
}
|
|
13101
|
+
else if (percentages > 100) {
|
|
13102
|
+
percentages -= percentage;
|
|
13103
|
+
percentage = 100 - percentages;
|
|
13104
|
+
percentages = 100;
|
|
13105
|
+
}
|
|
13106
|
+
}
|
|
13107
|
+
else if (percentages > 100 || percentage === 0) {
|
|
13108
|
+
withSizeCount = group.children.length;
|
|
13109
|
+
percentages = 0;
|
|
13110
|
+
break;
|
|
13111
|
+
}
|
|
13112
|
+
|
|
13113
|
+
template += percentage + '% ';
|
|
13114
|
+
continue;
|
|
13115
|
+
}
|
|
13116
|
+
|
|
13117
|
+
template += '1fr ';
|
|
13118
|
+
}
|
|
13119
|
+
|
|
13120
|
+
if (withSizeCount === group.children.length) {
|
|
13121
|
+
if (percentages < 99 || percentages > 100) {
|
|
13122
|
+
template = '';
|
|
13123
|
+
|
|
13124
|
+
for (var i = 0; i < group.children.length; i++) {
|
|
13125
|
+
var child = group.children[i];
|
|
13131
13126
|
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13127
|
+
child.removeAttribute('size');
|
|
13128
|
+
template += '1fr ';
|
|
13129
|
+
}
|
|
13130
|
+
}
|
|
13131
|
+
}
|
|
13132
|
+
|
|
13133
|
+
if (group.orientation === 'vertical') {
|
|
13134
|
+
group.style.gridTemplateColumns = template;
|
|
13135
|
+
}
|
|
13136
|
+
else {
|
|
13137
|
+
group.style.gridTemplateRows = template;
|
|
13138
|
+
}
|
|
13136
13139
|
}
|
|
13137
13140
|
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
group.
|
|
13141
|
+
group.items = Array.from(group.children);
|
|
13142
|
+
group.items = group.items.filter(function (value) {
|
|
13143
|
+
return value !== group.tabs;
|
|
13144
|
+
});
|
|
13145
|
+
}
|
|
13141
13146
|
|
|
13142
|
-
|
|
13147
|
+
var layoutGroups = that.querySelectorAll('.jqx-layout-group');
|
|
13143
13148
|
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13149
|
+
for (var i = 0; i < layoutGroups.length; i++) {
|
|
13150
|
+
refreshLayoutGroup(layoutGroups[i]);
|
|
13151
|
+
}
|
|
13152
|
+
}
|
|
13147
13153
|
|
|
13148
|
-
|
|
13149
|
-
|
|
13154
|
+
_beginDrag(parent, element, event) {
|
|
13155
|
+
var that = this;
|
|
13150
13156
|
|
|
13151
|
-
|
|
13157
|
+
if (that._dragDetails) {
|
|
13158
|
+
that._dragDetails.feedback.remove();
|
|
13159
|
+
}
|
|
13152
13160
|
|
|
13153
|
-
|
|
13161
|
+
var feedback = document.createElement('div');
|
|
13162
|
+
var overlay = document.createElement('div');
|
|
13163
|
+
var tabs = parent.querySelector('.jqx-layout-tab-strip');
|
|
13164
|
+
var label = '';
|
|
13154
13165
|
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
} else {
|
|
13160
|
-
tab.close = true;
|
|
13161
|
-
}
|
|
13162
|
-
};
|
|
13163
|
-
}
|
|
13164
|
-
|
|
13165
|
-
group.tabs = header;
|
|
13166
|
-
|
|
13167
|
-
if (item.position === 'top' || item.position === 'left') {
|
|
13168
|
-
group.insertBefore(header, group.firstChild);
|
|
13169
|
-
} else {
|
|
13170
|
-
group.appendChild(header);
|
|
13171
|
-
}
|
|
13172
|
-
} else {
|
|
13173
|
-
for (var i = 0; i < group.children.length; i++) {
|
|
13174
|
-
var child = group.children[i];
|
|
13175
|
-
|
|
13176
|
-
if (child.hasAttribute('size')) {
|
|
13177
|
-
var size = child.getAttribute('size');
|
|
13178
|
-
var pixels = parseFloat(size);
|
|
13179
|
-
var groupSize = group.orientation === 'vertical' ? group.offsetWidth : group.offsetHeight;
|
|
13180
|
-
var percentage = size.indexOf('%') >= 0 ? parseFloat(size) : parseFloat(pixels / groupSize * 100);
|
|
13181
|
-
percentages += percentage;
|
|
13182
|
-
withSizeCount++;
|
|
13183
|
-
|
|
13184
|
-
if (withSizeCount === group.children.length) {
|
|
13185
|
-
if (percentages < 100) {
|
|
13186
|
-
template += '1fr ';
|
|
13187
|
-
percentages = 100;
|
|
13188
|
-
continue;
|
|
13189
|
-
} else if (percentages > 100) {
|
|
13190
|
-
percentages -= percentage;
|
|
13191
|
-
percentage = 100 - percentages;
|
|
13192
|
-
percentages = 100;
|
|
13166
|
+
if (tabs) {
|
|
13167
|
+
for (var i = 0; i < Array.from(tabs.children).length; i++) {
|
|
13168
|
+
if (i === parent.selectedIndex) {
|
|
13169
|
+
label = tabs.children[i].innerText;
|
|
13193
13170
|
}
|
|
13194
|
-
} else if (percentages > 100 || percentage === 0) {
|
|
13195
|
-
withSizeCount = group.children.length;
|
|
13196
|
-
percentages = 0;
|
|
13197
|
-
break;
|
|
13198
|
-
}
|
|
13199
|
-
|
|
13200
|
-
template += percentage + '% ';
|
|
13201
|
-
continue;
|
|
13202
13171
|
}
|
|
13172
|
+
}
|
|
13203
13173
|
|
|
13204
|
-
|
|
13205
|
-
|
|
13174
|
+
feedback.innerHTML = `<jqx-split-layout><jqx-tab-layout-group><jqx-tab-layout-item label="${label}"></jqx-tab-layout-item></jqx-tab-layout-group></jqx-split-layout>`
|
|
13175
|
+
that._feedback = feedback;
|
|
13176
|
+
that._feedback.classList.add('jqx-split-layout-feedback', 'jqx-split-layout', 'jqx-widget');
|
|
13177
|
+
|
|
13178
|
+
overlay.classList.add('jqx-split-layout-overlay');
|
|
13179
|
+
|
|
13180
|
+
that._dragDetails = {
|
|
13181
|
+
element: element.content,
|
|
13182
|
+
item: element.item,
|
|
13183
|
+
layoutGroup: element.group,
|
|
13184
|
+
parent: parent,
|
|
13185
|
+
overlay: overlay,
|
|
13186
|
+
feedback: feedback,
|
|
13187
|
+
pageX: event.pageX,
|
|
13188
|
+
pageY: event.pageY
|
|
13189
|
+
}
|
|
13190
|
+
}
|
|
13206
13191
|
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13192
|
+
moveChildren(oldItem, newItem) {
|
|
13193
|
+
newItem.innerHTML = '';
|
|
13194
|
+
var content = oldItem;
|
|
13210
13195
|
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13196
|
+
while (content.firstChild) {
|
|
13197
|
+
var child = content.firstChild;
|
|
13198
|
+
newItem.appendChild(child);
|
|
13199
|
+
}
|
|
13200
|
+
}
|
|
13201
|
+
|
|
13202
|
+
createLayoutItem(type, position) {
|
|
13203
|
+
var that = this;
|
|
13204
|
+
|
|
13205
|
+
var getLayoutItem = function () {
|
|
13206
|
+
var item = document.createElement('jqx-layout-item');
|
|
13207
|
+
|
|
13208
|
+
item.innerHTML = '';
|
|
13218
13209
|
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
group.style.gridTemplateRows = template;
|
|
13223
|
-
}
|
|
13210
|
+
that.dispatchEvent(new CustomEvent('createItem', { type: 'layoutItem', item: item }));
|
|
13211
|
+
|
|
13212
|
+
return item;
|
|
13224
13213
|
}
|
|
13225
13214
|
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
return value !== group.tabs;
|
|
13229
|
-
});
|
|
13230
|
-
};
|
|
13215
|
+
var getTabLayoutItem = function () {
|
|
13216
|
+
var item = document.createElement('jqx-tab-layout-item');
|
|
13231
13217
|
|
|
13232
|
-
|
|
13218
|
+
item.innerHTML = '';
|
|
13233
13219
|
|
|
13234
|
-
|
|
13235
|
-
refreshLayoutGroup(layoutGroups[i]);
|
|
13236
|
-
}
|
|
13237
|
-
}
|
|
13238
|
-
}, {
|
|
13239
|
-
key: "_beginDrag",
|
|
13240
|
-
value: function _beginDrag(parent, element, event) {
|
|
13241
|
-
var that = this;
|
|
13220
|
+
that.dispatchEvent(new CustomEvent('createItem', { type: 'tabLayoutItem', item: item }));
|
|
13242
13221
|
|
|
13243
|
-
|
|
13244
|
-
that._dragDetails.feedback.remove();
|
|
13245
|
-
}
|
|
13246
|
-
|
|
13247
|
-
var feedback = document.createElement('div');
|
|
13248
|
-
var overlay = document.createElement('div');
|
|
13249
|
-
var tabs = parent.querySelector('.jqx-layout-tab-strip');
|
|
13250
|
-
var label = '';
|
|
13251
|
-
|
|
13252
|
-
if (tabs) {
|
|
13253
|
-
for (var i = 0; i < Array.from(tabs.children).length; i++) {
|
|
13254
|
-
if (i === parent.selectedIndex) {
|
|
13255
|
-
label = tabs.children[i].innerText;
|
|
13256
|
-
}
|
|
13222
|
+
return item;
|
|
13257
13223
|
}
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
layoutGroup: element.group,
|
|
13270
|
-
parent: parent,
|
|
13271
|
-
overlay: overlay,
|
|
13272
|
-
feedback: feedback,
|
|
13273
|
-
pageX: event.pageX,
|
|
13274
|
-
pageY: event.pageY
|
|
13275
|
-
};
|
|
13276
|
-
}
|
|
13277
|
-
}, {
|
|
13278
|
-
key: "moveChildren",
|
|
13279
|
-
value: function moveChildren(oldItem, newItem) {
|
|
13280
|
-
newItem.innerHTML = '';
|
|
13281
|
-
var content = oldItem;
|
|
13282
|
-
|
|
13283
|
-
while (content.firstChild) {
|
|
13284
|
-
var child = content.firstChild;
|
|
13285
|
-
newItem.appendChild(child);
|
|
13286
|
-
}
|
|
13287
|
-
}
|
|
13288
|
-
}, {
|
|
13289
|
-
key: "createLayoutItem",
|
|
13290
|
-
value: function createLayoutItem(type, position) {
|
|
13291
|
-
var that = this;
|
|
13292
|
-
|
|
13293
|
-
var getLayoutItem = function getLayoutItem() {
|
|
13294
|
-
var item = document.createElement('jqx-layout-item');
|
|
13295
|
-
item.innerHTML = '';
|
|
13296
|
-
that.dispatchEvent(new CustomEvent('createItem', {
|
|
13297
|
-
type: 'layoutItem',
|
|
13298
|
-
item: item
|
|
13299
|
-
}));
|
|
13300
|
-
return item;
|
|
13301
|
-
};
|
|
13302
|
-
|
|
13303
|
-
var getTabLayoutItem = function getTabLayoutItem() {
|
|
13304
|
-
var item = document.createElement('jqx-tab-layout-item');
|
|
13305
|
-
item.innerHTML = '';
|
|
13306
|
-
that.dispatchEvent(new CustomEvent('createItem', {
|
|
13307
|
-
type: 'tabLayoutItem',
|
|
13308
|
-
item: item
|
|
13309
|
-
}));
|
|
13310
|
-
return item;
|
|
13311
|
-
};
|
|
13312
|
-
|
|
13313
|
-
var getLayoutGroup = function getLayoutGroup(position) {
|
|
13314
|
-
var item = document.createElement('jqx-layout-group');
|
|
13315
|
-
var orientation = position === 'top' || position === 'bottom' ? 'horizontal' : 'vertical';
|
|
13316
|
-
that.dispatchEvent(new CustomEvent('createGroup', {
|
|
13317
|
-
type: 'layoutGroup',
|
|
13318
|
-
item: item
|
|
13319
|
-
}));
|
|
13320
|
-
item.setAttribute('orientation', orientation);
|
|
13321
|
-
item.orientation = orientation;
|
|
13322
|
-
return item;
|
|
13323
|
-
};
|
|
13324
|
-
|
|
13325
|
-
var getTabLayoutGroup = function getTabLayoutGroup(position) {
|
|
13326
|
-
var item = document.createElement('jqx-tab-layout-group');
|
|
13327
|
-
var orientation = position === 'top' || position === 'bottom' ? 'horizontal' : 'vertical';
|
|
13328
|
-
item.setAttribute('orientation', orientation);
|
|
13329
|
-
item.orientation = orientation;
|
|
13330
|
-
that.dispatchEvent(new CustomEvent('tabLayoutGroup', {
|
|
13331
|
-
type: 'layoutGroup',
|
|
13332
|
-
item: item
|
|
13333
|
-
}));
|
|
13334
|
-
return item;
|
|
13335
|
-
};
|
|
13336
|
-
|
|
13337
|
-
if (type === 'layoutItem' || !type) {
|
|
13338
|
-
return getLayoutItem();
|
|
13339
|
-
} else if (type === 'tabLayoutItem' || !type) {
|
|
13340
|
-
return getTabLayoutItem();
|
|
13341
|
-
} else if (type === 'tabLayoutGroup') {
|
|
13342
|
-
return getTabLayoutGroup(position);
|
|
13343
|
-
} else {
|
|
13344
|
-
return getLayoutGroup(position);
|
|
13345
|
-
}
|
|
13346
|
-
}
|
|
13347
|
-
}, {
|
|
13348
|
-
key: "_addTabLayoutItem",
|
|
13349
|
-
value: function _addTabLayoutItem(targetItem, position, myItem) {
|
|
13350
|
-
var that = this;
|
|
13351
|
-
var newItem = that.createLayoutItem('tabLayoutItem');
|
|
13352
|
-
var parentLayoutGroup = targetItem.closest('jqx-tab-layout-group');
|
|
13353
|
-
var layoutGroup;
|
|
13354
|
-
|
|
13355
|
-
if (myItem) {
|
|
13356
|
-
newItem.label = myItem.label;
|
|
13357
|
-
newItem.modifiers = myItem.modifiers;
|
|
13358
|
-
that.moveChildren(myItem, newItem);
|
|
13359
|
-
}
|
|
13360
|
-
|
|
13361
|
-
var resetGroup = function resetGroup(group) {
|
|
13362
|
-
for (var i = 0; i < group.children.length; i++) {
|
|
13363
|
-
var child = group.children[i];
|
|
13364
|
-
child.removeAttribute('size');
|
|
13224
|
+
|
|
13225
|
+
var getLayoutGroup = function (position) {
|
|
13226
|
+
var item = document.createElement('jqx-layout-group');
|
|
13227
|
+
var orientation = position === 'top' || position === 'bottom' ? 'horizontal' : 'vertical';
|
|
13228
|
+
|
|
13229
|
+
that.dispatchEvent(new CustomEvent('createGroup', { type: 'layoutGroup', item: item }));
|
|
13230
|
+
|
|
13231
|
+
item.setAttribute('orientation', orientation);
|
|
13232
|
+
item.orientation = orientation;
|
|
13233
|
+
|
|
13234
|
+
return item;
|
|
13365
13235
|
}
|
|
13366
13236
|
|
|
13367
|
-
|
|
13368
|
-
|
|
13237
|
+
var getTabLayoutGroup = function (position) {
|
|
13238
|
+
var item = document.createElement('jqx-tab-layout-group');
|
|
13239
|
+
var orientation = position === 'top' || position === 'bottom' ? 'horizontal' : 'vertical';
|
|
13369
13240
|
|
|
13370
|
-
|
|
13371
|
-
|
|
13241
|
+
item.setAttribute('orientation', orientation);
|
|
13242
|
+
item.orientation = orientation;
|
|
13372
13243
|
|
|
13373
|
-
|
|
13374
|
-
that._addLayoutItem(targetItem.querySelector('jqx-layout-group'), position);
|
|
13375
|
-
} else {
|
|
13376
|
-
layoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13377
|
-
var newLayoutItem = that.createLayoutItem();
|
|
13378
|
-
that.moveChildren(targetItem, newLayoutItem);
|
|
13244
|
+
that.dispatchEvent(new CustomEvent('tabLayoutGroup', { type: 'layoutGroup', item: item }));
|
|
13379
13245
|
|
|
13380
|
-
|
|
13381
|
-
|
|
13382
|
-
layoutGroup.appendChild(newLayoutItem);
|
|
13383
|
-
} else {
|
|
13384
|
-
layoutGroup.appendChild(newLayoutItem);
|
|
13385
|
-
layoutGroup.appendChild(that.createLayoutItem());
|
|
13386
|
-
}
|
|
13246
|
+
return item;
|
|
13247
|
+
}
|
|
13387
13248
|
|
|
13388
|
-
|
|
13249
|
+
if (type === 'layoutItem' || !type) {
|
|
13250
|
+
return getLayoutItem();
|
|
13251
|
+
}
|
|
13252
|
+
else if (type === 'tabLayoutItem' || !type) {
|
|
13253
|
+
return getTabLayoutItem();
|
|
13389
13254
|
}
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
var addRootTab = function addRootTab(tabLayoutGroup, position) {
|
|
13393
|
-
var parentLayoutGroup = targetItem.parentElement;
|
|
13394
|
-
var layoutGroup = targetItem;
|
|
13395
|
-
var newLayoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13396
|
-
parentLayoutGroup.insertBefore(newLayoutGroup, layoutGroup);
|
|
13397
|
-
|
|
13398
|
-
if (position === 'top' || position === 'left') {
|
|
13399
|
-
newLayoutGroup.append(tabLayoutGroup);
|
|
13400
|
-
newLayoutGroup.appendChild(layoutGroup);
|
|
13401
|
-
} else {
|
|
13402
|
-
newLayoutGroup.appendChild(layoutGroup);
|
|
13403
|
-
newLayoutGroup.append(tabLayoutGroup);
|
|
13255
|
+
else if (type === 'tabLayoutGroup') {
|
|
13256
|
+
return getTabLayoutGroup(position);
|
|
13404
13257
|
}
|
|
13258
|
+
else {
|
|
13259
|
+
return getLayoutGroup(position);
|
|
13260
|
+
}
|
|
13261
|
+
}
|
|
13262
|
+
|
|
13263
|
+
_addTabLayoutItem(targetItem, position, myItem) {
|
|
13264
|
+
var that = this;
|
|
13265
|
+
var newItem = that.createLayoutItem('tabLayoutItem');
|
|
13266
|
+
|
|
13267
|
+
var parentLayoutGroup = targetItem.closest('jqx-tab-layout-group');
|
|
13268
|
+
var layoutGroup;
|
|
13405
13269
|
|
|
13406
|
-
if (
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13270
|
+
if (myItem) {
|
|
13271
|
+
newItem.label = myItem.label;
|
|
13272
|
+
newItem.modifiers = myItem.modifiers;
|
|
13273
|
+
that.moveChildren(myItem, newItem);
|
|
13410
13274
|
}
|
|
13411
13275
|
|
|
13412
|
-
resetGroup(
|
|
13413
|
-
|
|
13414
|
-
|
|
13276
|
+
var resetGroup = function (group) {
|
|
13277
|
+
for (var i = 0; i < group.children.length; i++) {
|
|
13278
|
+
var child = group.children[i];
|
|
13415
13279
|
|
|
13416
|
-
|
|
13417
|
-
switch (position) {
|
|
13418
|
-
case 'center':
|
|
13419
|
-
{
|
|
13420
|
-
if (targetItem instanceof TabLayoutGroup || targetItem instanceof TabLayoutItem) {
|
|
13421
|
-
parentLayoutGroup.appendChild(newItem);
|
|
13422
|
-
} else {
|
|
13423
|
-
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13424
|
-
tabLayoutGroup.appendChild(newItem);
|
|
13425
|
-
|
|
13426
|
-
if (targetItem instanceof LayoutGroup && !(targetItem instanceof TabLayoutItem)) {
|
|
13427
|
-
targetItem.appendChild(tabLayoutGroup);
|
|
13428
|
-
resetGroup(targetItem);
|
|
13429
|
-
} else if (targetItem instanceof LayoutItem) {
|
|
13430
|
-
layoutGroup = that.createLayoutItem('layoutGroup');
|
|
13431
|
-
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13432
|
-
layoutGroup.appendChild(targetItem);
|
|
13433
|
-
layoutGroup.appendChild(tabLayoutGroup);
|
|
13434
|
-
resetGroup(layoutGroup);
|
|
13435
|
-
}
|
|
13436
|
-
}
|
|
13437
|
-
}
|
|
13438
|
-
break;
|
|
13439
|
-
|
|
13440
|
-
case 'left':
|
|
13441
|
-
case 'right':
|
|
13442
|
-
{
|
|
13443
|
-
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13444
|
-
tabLayoutGroup.appendChild(newItem);
|
|
13445
|
-
|
|
13446
|
-
if (targetItem.getAttribute('data-id') === 'root') {
|
|
13447
|
-
tabLayoutGroup.position = position;
|
|
13448
|
-
addRootTab(tabLayoutGroup, position);
|
|
13449
|
-
} else {
|
|
13450
|
-
addRootTab(tabLayoutGroup, position);
|
|
13451
|
-
}
|
|
13452
|
-
}
|
|
13453
|
-
break;
|
|
13454
|
-
|
|
13455
|
-
case 'top':
|
|
13456
|
-
case 'bottom':
|
|
13457
|
-
{
|
|
13458
|
-
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13459
|
-
tabLayoutGroup.appendChild(newItem);
|
|
13460
|
-
|
|
13461
|
-
if (targetItem.getAttribute('data-id') === 'root') {
|
|
13462
|
-
tabLayoutGroup.position = position;
|
|
13463
|
-
addRootTab(tabLayoutGroup, position);
|
|
13464
|
-
} else {
|
|
13465
|
-
addRootTab(tabLayoutGroup, position);
|
|
13466
|
-
}
|
|
13467
|
-
|
|
13468
|
-
break;
|
|
13280
|
+
child.removeAttribute('size');
|
|
13469
13281
|
}
|
|
13282
|
+
|
|
13283
|
+
group.removeAttribute('size');
|
|
13470
13284
|
}
|
|
13471
13285
|
|
|
13472
|
-
|
|
13473
|
-
|
|
13286
|
+
var addTabItemChild = function (position) {
|
|
13287
|
+
targetItem.removeAttribute('size');
|
|
13474
13288
|
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
addTabItemChild();
|
|
13481
|
-
}
|
|
13289
|
+
if (targetItem.querySelector('jqx-layout-group')) {
|
|
13290
|
+
that._addLayoutItem(targetItem.querySelector('jqx-layout-group'), position);
|
|
13291
|
+
}
|
|
13292
|
+
else {
|
|
13293
|
+
layoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13482
13294
|
|
|
13483
|
-
|
|
13295
|
+
var newLayoutItem = that.createLayoutItem();
|
|
13296
|
+
that.moveChildren(targetItem, newLayoutItem)
|
|
13484
13297
|
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13298
|
+
if (position === 'top' || position === 'left') {
|
|
13299
|
+
layoutGroup.appendChild(that.createLayoutItem());
|
|
13300
|
+
layoutGroup.appendChild(newLayoutItem);
|
|
13301
|
+
}
|
|
13302
|
+
else {
|
|
13303
|
+
layoutGroup.appendChild(newLayoutItem);
|
|
13304
|
+
layoutGroup.appendChild(that.createLayoutItem());
|
|
13305
|
+
}
|
|
13489
13306
|
|
|
13490
|
-
|
|
13491
|
-
targetItem.insertBefore(newItem, firstItem);
|
|
13492
|
-
} else {
|
|
13493
|
-
targetItem.appendChild(newItem);
|
|
13307
|
+
targetItem.appendChild(layoutGroup);
|
|
13494
13308
|
}
|
|
13495
|
-
|
|
13496
|
-
|
|
13309
|
+
}
|
|
13310
|
+
|
|
13311
|
+
var addRootTab = function (tabLayoutGroup, position) {
|
|
13312
|
+
|
|
13497
13313
|
var parentLayoutGroup = targetItem.parentElement;
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13314
|
+
var layoutGroup = targetItem;
|
|
13315
|
+
var newLayoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13316
|
+
|
|
13317
|
+
parentLayoutGroup.insertBefore(newLayoutGroup, layoutGroup);
|
|
13318
|
+
|
|
13319
|
+
if (position === 'top' || position === 'left') {
|
|
13320
|
+
newLayoutGroup.append(tabLayoutGroup);
|
|
13321
|
+
newLayoutGroup.appendChild(layoutGroup);
|
|
13322
|
+
}
|
|
13323
|
+
else {
|
|
13324
|
+
newLayoutGroup.appendChild(layoutGroup);
|
|
13325
|
+
newLayoutGroup.append(tabLayoutGroup);
|
|
13508
13326
|
}
|
|
13509
|
-
} else if (myItem) {
|
|
13510
|
-
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13511
|
-
tabLayoutGroup.appendChild(newItem);
|
|
13512
13327
|
|
|
13513
|
-
if (
|
|
13514
|
-
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
layoutGroup.orientation = parentLayoutGroup.orientation;
|
|
13518
|
-
layoutGroup.setAttribute('orientation', parentLayoutGroup.orientation);
|
|
13519
|
-
targetItem.removeAttribute('size');
|
|
13520
|
-
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13521
|
-
layoutGroup.appendChild(targetItem);
|
|
13522
|
-
layoutGroup.appendChild(tabLayoutGroup);
|
|
13328
|
+
if (layoutGroup.getAttribute('data-id') === 'root') {
|
|
13329
|
+
layoutGroup.setAttribute('data-id', newLayoutGroup.getAttribute('data-id'));
|
|
13330
|
+
newLayoutGroup.setAttribute('data-id', 'root');
|
|
13331
|
+
that.$.itemsContainer = newLayoutGroup;
|
|
13523
13332
|
}
|
|
13524
|
-
} else {
|
|
13525
|
-
addTabItemChild(position);
|
|
13526
|
-
}
|
|
13527
13333
|
|
|
13528
|
-
|
|
13334
|
+
resetGroup(layoutGroup);
|
|
13335
|
+
resetGroup(parentLayoutGroup);
|
|
13336
|
+
}
|
|
13529
13337
|
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13338
|
+
if (myItem) {
|
|
13339
|
+
switch (position) {
|
|
13340
|
+
case 'center': {
|
|
13341
|
+
if (targetItem instanceof TabLayoutGroup || targetItem instanceof TabLayoutItem) {
|
|
13342
|
+
parentLayoutGroup.appendChild(newItem);
|
|
13343
|
+
}
|
|
13344
|
+
else {
|
|
13345
|
+
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13346
|
+
tabLayoutGroup.appendChild(newItem);
|
|
13347
|
+
|
|
13348
|
+
if (targetItem instanceof LayoutGroup && !(targetItem instanceof TabLayoutItem)) {
|
|
13349
|
+
targetItem.appendChild(tabLayoutGroup);
|
|
13350
|
+
resetGroup(targetItem);
|
|
13351
|
+
}
|
|
13352
|
+
else if (targetItem instanceof LayoutItem) {
|
|
13353
|
+
layoutGroup = that.createLayoutItem('layoutGroup');
|
|
13354
|
+
|
|
13355
|
+
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13356
|
+
layoutGroup.appendChild(targetItem);
|
|
13357
|
+
layoutGroup.appendChild(tabLayoutGroup);
|
|
13358
|
+
resetGroup(layoutGroup);
|
|
13359
|
+
}
|
|
13360
|
+
}
|
|
13361
|
+
}
|
|
13362
|
+
break;
|
|
13363
|
+
case 'left':
|
|
13364
|
+
case 'right': {
|
|
13365
|
+
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13366
|
+
tabLayoutGroup.appendChild(newItem);
|
|
13367
|
+
if (targetItem.getAttribute('data-id') === 'root') {
|
|
13368
|
+
tabLayoutGroup.position = position;
|
|
13369
|
+
addRootTab(tabLayoutGroup, position);
|
|
13370
|
+
}
|
|
13371
|
+
else {
|
|
13372
|
+
addRootTab(tabLayoutGroup, position);
|
|
13373
|
+
}
|
|
13374
|
+
}
|
|
13375
|
+
break;
|
|
13376
|
+
case 'top':
|
|
13377
|
+
case 'bottom': {
|
|
13378
|
+
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13379
|
+
tabLayoutGroup.appendChild(newItem);
|
|
13380
|
+
|
|
13381
|
+
if (targetItem.getAttribute('data-id') === 'root') {
|
|
13382
|
+
tabLayoutGroup.position = position;
|
|
13383
|
+
addRootTab(tabLayoutGroup, position);
|
|
13384
|
+
}
|
|
13385
|
+
else {
|
|
13386
|
+
addRootTab(tabLayoutGroup, position);
|
|
13387
|
+
}
|
|
13388
|
+
break;
|
|
13389
|
+
}
|
|
13543
13390
|
}
|
|
13544
|
-
} else {
|
|
13545
|
-
addTabItemChild(position);
|
|
13546
|
-
}
|
|
13547
13391
|
|
|
13548
|
-
|
|
13549
|
-
|
|
13392
|
+
return;
|
|
13393
|
+
}
|
|
13394
|
+
|
|
13395
|
+
switch (position) {
|
|
13396
|
+
case 'center':
|
|
13397
|
+
if (targetItem instanceof TabLayoutGroup || targetItem instanceof TabLayoutItem) {
|
|
13398
|
+
parentLayoutGroup.appendChild(newItem);
|
|
13399
|
+
}
|
|
13400
|
+
else {
|
|
13401
|
+
addTabItemChild();
|
|
13402
|
+
}
|
|
13403
|
+
break;
|
|
13404
|
+
case 'left':
|
|
13405
|
+
case 'right':
|
|
13406
|
+
if (targetItem instanceof TabLayoutGroup) {
|
|
13407
|
+
var firstItem = targetItem.querySelector('jqx-tab-layout-item');
|
|
13408
|
+
|
|
13409
|
+
if (firstItem && position === 'left') {
|
|
13410
|
+
targetItem.insertBefore(newItem, firstItem);
|
|
13411
|
+
}
|
|
13412
|
+
else {
|
|
13413
|
+
targetItem.appendChild(newItem);
|
|
13414
|
+
}
|
|
13415
|
+
}
|
|
13416
|
+
else if (targetItem instanceof TabLayoutItem) {
|
|
13417
|
+
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13418
|
+
var parentLayoutGroup = targetItem.parentElement;
|
|
13419
|
+
|
|
13420
|
+
tabLayoutGroup.appendChild(newItem);
|
|
13421
|
+
|
|
13422
|
+
layoutGroup = that.createLayoutItem('layoutGroup');
|
|
13423
|
+
|
|
13424
|
+
parentLayoutGroup.parentElement.insertBefore(layoutGroup, parentLayoutGroup);
|
|
13425
|
+
|
|
13426
|
+
if (position === 'right') {
|
|
13427
|
+
layoutGroup.appendChild(parentLayoutGroup);
|
|
13428
|
+
layoutGroup.appendChild(tabLayoutGroup);
|
|
13429
|
+
}
|
|
13430
|
+
else if (position === 'left') {
|
|
13431
|
+
layoutGroup.appendChild(tabLayoutGroup);
|
|
13432
|
+
layoutGroup.appendChild(parentLayoutGroup);
|
|
13433
|
+
}
|
|
13434
|
+
}
|
|
13435
|
+
else if (myItem) {
|
|
13436
|
+
var tabLayoutGroup = that.createLayoutItem('tabLayoutGroup', 'top');
|
|
13437
|
+
tabLayoutGroup.appendChild(newItem);
|
|
13438
|
+
|
|
13439
|
+
if (targetItem instanceof LayoutGroup) {
|
|
13440
|
+
targetItem.insertBefore(targetItem.firstChild, tabLayoutGroup);
|
|
13441
|
+
}
|
|
13442
|
+
else if (targetItem instanceof LayoutItem) {
|
|
13443
|
+
layoutGroup = that.createLayoutItem('layoutGroup');
|
|
13444
|
+
layoutGroup.orientation = parentLayoutGroup.orientation;
|
|
13445
|
+
layoutGroup.setAttribute('orientation', parentLayoutGroup.orientation);
|
|
13446
|
+
|
|
13447
|
+
targetItem.removeAttribute('size');
|
|
13448
|
+
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13449
|
+
layoutGroup.appendChild(targetItem);
|
|
13450
|
+
layoutGroup.appendChild(tabLayoutGroup);
|
|
13451
|
+
}
|
|
13452
|
+
}
|
|
13453
|
+
else {
|
|
13454
|
+
addTabItemChild(position);
|
|
13455
|
+
}
|
|
13456
|
+
break;
|
|
13457
|
+
case 'top':
|
|
13458
|
+
case 'bottom':
|
|
13459
|
+
if (targetItem instanceof TabLayoutGroup) {
|
|
13460
|
+
layoutGroup = that.createLayoutItem('layoutGroup', 'top');
|
|
13461
|
+
targetItem.removeAttribute('size');
|
|
13462
|
+
|
|
13463
|
+
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13464
|
+
|
|
13465
|
+
if (position === 'top') {
|
|
13466
|
+
layoutGroup.appendChild(that.createLayoutItem());
|
|
13467
|
+
layoutGroup.appendChild(targetItem);
|
|
13468
|
+
}
|
|
13469
|
+
else {
|
|
13470
|
+
layoutGroup.appendChild(targetItem);
|
|
13471
|
+
layoutGroup.appendChild(that.createLayoutItem());
|
|
13472
|
+
}
|
|
13473
|
+
}
|
|
13474
|
+
else {
|
|
13475
|
+
addTabItemChild(position);
|
|
13476
|
+
}
|
|
13477
|
+
break;
|
|
13478
|
+
}
|
|
13550
13479
|
|
|
13551
|
-
|
|
13480
|
+
that.refresh();
|
|
13552
13481
|
}
|
|
13482
|
+
|
|
13553
13483
|
/**
|
|
13554
13484
|
* Creates a new item by splitting the target Splitter
|
|
13555
13485
|
*/
|
|
13486
|
+
_addLayoutItem(targetItem, position, myItem) {
|
|
13487
|
+
var that = this;
|
|
13488
|
+
|
|
13489
|
+
if (!targetItem) {
|
|
13490
|
+
return;
|
|
13491
|
+
}
|
|
13556
13492
|
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
var that = this;
|
|
13493
|
+
var resetGroup = function (group) {
|
|
13494
|
+
for (var i = 0; i < group.children.length; i++) {
|
|
13495
|
+
var child = group.children[i];
|
|
13561
13496
|
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
}
|
|
13497
|
+
child.removeAttribute('size');
|
|
13498
|
+
}
|
|
13565
13499
|
|
|
13566
|
-
|
|
13567
|
-
for (var i = 0; i < group.children.length; i++) {
|
|
13568
|
-
var child = group.children[i];
|
|
13569
|
-
child.removeAttribute('size');
|
|
13500
|
+
group.removeAttribute('size');
|
|
13570
13501
|
}
|
|
13571
13502
|
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
if (isTabItem) {
|
|
13578
|
-
return that._addTabLayoutItem(targetItem, position, myItem);
|
|
13579
|
-
}
|
|
13580
|
-
|
|
13581
|
-
var newItem = that.createLayoutItem();
|
|
13582
|
-
var parentLayoutGroup = targetItem.closest('.jqx-layout-group');
|
|
13583
|
-
var layoutGroup;
|
|
13584
|
-
|
|
13585
|
-
if (myItem) {
|
|
13586
|
-
that.moveChildren(myItem, newItem);
|
|
13587
|
-
}
|
|
13588
|
-
|
|
13589
|
-
if (position === 'center') {
|
|
13590
|
-
if (targetItem instanceof LayoutGroup) {
|
|
13591
|
-
layoutGroup = parentLayoutGroup;
|
|
13592
|
-
layoutGroup.appendChild(newItem);
|
|
13593
|
-
resetGroup(layoutGroup);
|
|
13594
|
-
that.refresh();
|
|
13595
|
-
return newItem;
|
|
13596
|
-
} else if (targetItem instanceof LayoutItem) {
|
|
13597
|
-
layoutGroup = that.createLayoutItem('layoutGroup');
|
|
13598
|
-
layoutGroup.orientation = parentLayoutGroup.orientation;
|
|
13599
|
-
layoutGroup.setAttribute('orientation', parentLayoutGroup.orientation);
|
|
13600
|
-
targetItem.removeAttribute('size');
|
|
13601
|
-
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13602
|
-
layoutGroup.appendChild(targetItem);
|
|
13603
|
-
layoutGroup.appendChild(newItem);
|
|
13604
|
-
that.refresh();
|
|
13605
|
-
return layoutGroup;
|
|
13606
|
-
}
|
|
13607
|
-
}
|
|
13608
|
-
|
|
13609
|
-
if (parentLayoutGroup.orientation === 'vertical' && (position === 'left' || position === 'right') || parentLayoutGroup.orientation === 'horizontal' && (position === 'top' || position === 'bottom')) {
|
|
13610
|
-
layoutGroup = parentLayoutGroup;
|
|
13611
|
-
|
|
13612
|
-
if (targetItem instanceof LayoutGroup) {
|
|
13613
|
-
if (position === 'left' || position === 'top') {
|
|
13614
|
-
layoutGroup.insertBefore(newItem, layoutGroup.children[0]);
|
|
13615
|
-
} else {
|
|
13616
|
-
layoutGroup.appendChild(newItem);
|
|
13617
|
-
}
|
|
13618
|
-
|
|
13619
|
-
resetGroup(targetItem);
|
|
13620
|
-
} else {
|
|
13621
|
-
var layoutGroupItems = layoutGroup.items,
|
|
13622
|
-
newItemIndex = Math.max(0, layoutGroupItems.indexOf(targetItem) + (position === 'top' || position === 'left' ? 0 : 1));
|
|
13623
|
-
layoutGroup.insertBefore(newItem, layoutGroupItems[newItemIndex]);
|
|
13624
|
-
resetGroup(layoutGroup);
|
|
13625
|
-
}
|
|
13626
|
-
} else {
|
|
13627
|
-
if (targetItem instanceof LayoutGroup) {
|
|
13628
|
-
var parentLayoutGroup = targetItem.parentElement;
|
|
13629
|
-
layoutGroup = targetItem;
|
|
13630
|
-
var newLayoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13631
|
-
parentLayoutGroup.insertBefore(newLayoutGroup, layoutGroup);
|
|
13632
|
-
|
|
13633
|
-
if (position === 'top' || position === 'left') {
|
|
13634
|
-
newLayoutGroup.append(newItem);
|
|
13635
|
-
newLayoutGroup.appendChild(layoutGroup);
|
|
13636
|
-
} else {
|
|
13637
|
-
newLayoutGroup.appendChild(layoutGroup);
|
|
13638
|
-
newLayoutGroup.append(newItem);
|
|
13639
|
-
}
|
|
13640
|
-
|
|
13641
|
-
if (layoutGroup.getAttribute('data-id') === 'root') {
|
|
13642
|
-
layoutGroup.setAttribute('data-id', newLayoutGroup.getAttribute('data-id'));
|
|
13643
|
-
newLayoutGroup.setAttribute('data-id', 'root');
|
|
13644
|
-
that.$.itemsContainer = newLayoutGroup;
|
|
13645
|
-
}
|
|
13646
|
-
|
|
13647
|
-
resetGroup(parentLayoutGroup);
|
|
13648
|
-
} else {
|
|
13649
|
-
layoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13650
|
-
parentLayoutGroup.insertBefore(layoutGroup, targetItem);
|
|
13651
|
-
|
|
13652
|
-
if (position === 'top' || position === 'left') {
|
|
13653
|
-
layoutGroup.appendChild(newItem);
|
|
13654
|
-
layoutGroup.appendChild(targetItem);
|
|
13655
|
-
} else {
|
|
13656
|
-
layoutGroup.appendChild(targetItem);
|
|
13657
|
-
layoutGroup.appendChild(newItem);
|
|
13658
|
-
}
|
|
13659
|
-
|
|
13660
|
-
resetGroup(layoutGroup);
|
|
13503
|
+
var isTabItem = targetItem instanceof TabLayoutItem || targetItem instanceof TabLayoutGroup || (myItem && myItem instanceof TabLayoutItem);
|
|
13504
|
+
|
|
13505
|
+
if (isTabItem) {
|
|
13506
|
+
return that._addTabLayoutItem(targetItem, position, myItem);
|
|
13661
13507
|
}
|
|
13662
|
-
}
|
|
13663
13508
|
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13509
|
+
var newItem = that.createLayoutItem();
|
|
13510
|
+
|
|
13511
|
+
var parentLayoutGroup = targetItem.closest('.jqx-layout-group');
|
|
13512
|
+
var layoutGroup;
|
|
13513
|
+
|
|
13514
|
+
if (myItem) {
|
|
13515
|
+
that.moveChildren(myItem, newItem);
|
|
13516
|
+
}
|
|
13671
13517
|
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13518
|
+
if (position === 'center') {
|
|
13519
|
+
if (targetItem instanceof LayoutGroup) {
|
|
13520
|
+
layoutGroup = parentLayoutGroup;
|
|
13521
|
+
layoutGroup.appendChild(newItem);
|
|
13676
13522
|
|
|
13677
|
-
|
|
13678
|
-
|
|
13523
|
+
resetGroup(layoutGroup);
|
|
13524
|
+
that.refresh();
|
|
13679
13525
|
|
|
13680
|
-
|
|
13526
|
+
return newItem;
|
|
13527
|
+
}
|
|
13528
|
+
else if (targetItem instanceof LayoutItem) {
|
|
13529
|
+
layoutGroup = that.createLayoutItem('layoutGroup');
|
|
13530
|
+
layoutGroup.orientation = parentLayoutGroup.orientation;
|
|
13531
|
+
layoutGroup.setAttribute('orientation', parentLayoutGroup.orientation);
|
|
13681
13532
|
|
|
13682
|
-
|
|
13683
|
-
|
|
13533
|
+
targetItem.removeAttribute('size');
|
|
13534
|
+
targetItem.parentElement.insertBefore(layoutGroup, targetItem);
|
|
13535
|
+
layoutGroup.appendChild(targetItem);
|
|
13536
|
+
layoutGroup.appendChild(newItem);
|
|
13684
13537
|
|
|
13685
|
-
|
|
13686
|
-
if (that._buttons.parentElement) {
|
|
13687
|
-
that._buttons.parentElement.removeChild(that._buttons);
|
|
13538
|
+
that.refresh();
|
|
13688
13539
|
|
|
13689
|
-
|
|
13540
|
+
return layoutGroup;
|
|
13541
|
+
}
|
|
13690
13542
|
}
|
|
13691
|
-
}
|
|
13692
13543
|
|
|
13693
|
-
|
|
13694
|
-
|
|
13695
|
-
|
|
13544
|
+
if (parentLayoutGroup.orientation === 'vertical' && (position === 'left' || position === 'right') ||
|
|
13545
|
+
parentLayoutGroup.orientation === 'horizontal' && (position === 'top' || position === 'bottom')) {
|
|
13546
|
+
layoutGroup = parentLayoutGroup;
|
|
13696
13547
|
|
|
13697
|
-
|
|
13698
|
-
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13548
|
+
if (targetItem instanceof LayoutGroup) {
|
|
13549
|
+
if (position === 'left' || position === 'top') {
|
|
13550
|
+
layoutGroup.insertBefore(newItem, layoutGroup.children[0]);
|
|
13551
|
+
}
|
|
13552
|
+
else {
|
|
13553
|
+
layoutGroup.appendChild(newItem);
|
|
13554
|
+
}
|
|
13702
13555
|
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13556
|
+
resetGroup(targetItem);
|
|
13557
|
+
}
|
|
13558
|
+
else {
|
|
13559
|
+
var layoutGroupItems = layoutGroup.items,
|
|
13560
|
+
newItemIndex = Math.max(0, layoutGroupItems.indexOf(targetItem) + (position === 'top' || position === 'left' ? 0 : 1));
|
|
13706
13561
|
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13562
|
+
layoutGroup.insertBefore(newItem, layoutGroupItems[newItemIndex]);
|
|
13563
|
+
resetGroup(layoutGroup);
|
|
13564
|
+
}
|
|
13710
13565
|
}
|
|
13566
|
+
else {
|
|
13567
|
+
if (targetItem instanceof LayoutGroup) {
|
|
13568
|
+
var parentLayoutGroup = targetItem.parentElement;
|
|
13569
|
+
layoutGroup = targetItem;
|
|
13570
|
+
var newLayoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13571
|
+
|
|
13572
|
+
parentLayoutGroup.insertBefore(newLayoutGroup, layoutGroup);
|
|
13573
|
+
|
|
13574
|
+
if (position === 'top' || position === 'left') {
|
|
13575
|
+
newLayoutGroup.append(newItem);
|
|
13576
|
+
newLayoutGroup.appendChild(layoutGroup);
|
|
13577
|
+
}
|
|
13578
|
+
else {
|
|
13579
|
+
newLayoutGroup.appendChild(layoutGroup);
|
|
13580
|
+
newLayoutGroup.append(newItem);
|
|
13581
|
+
}
|
|
13582
|
+
|
|
13583
|
+
if (layoutGroup.getAttribute('data-id') === 'root') {
|
|
13584
|
+
layoutGroup.setAttribute('data-id', newLayoutGroup.getAttribute('data-id'));
|
|
13585
|
+
newLayoutGroup.setAttribute('data-id', 'root');
|
|
13586
|
+
that.$.itemsContainer = newLayoutGroup;
|
|
13587
|
+
}
|
|
13711
13588
|
|
|
13712
|
-
|
|
13713
|
-
|
|
13589
|
+
resetGroup(parentLayoutGroup);
|
|
13590
|
+
}
|
|
13591
|
+
else {
|
|
13592
|
+
layoutGroup = that.createLayoutItem('layoutGroup', position);
|
|
13593
|
+
|
|
13594
|
+
parentLayoutGroup.insertBefore(layoutGroup, targetItem);
|
|
13595
|
+
|
|
13596
|
+
if (position === 'top' || position === 'left') {
|
|
13597
|
+
layoutGroup.appendChild(newItem);
|
|
13598
|
+
layoutGroup.appendChild(targetItem);
|
|
13599
|
+
}
|
|
13600
|
+
else {
|
|
13601
|
+
layoutGroup.appendChild(targetItem);
|
|
13602
|
+
layoutGroup.appendChild(newItem);
|
|
13603
|
+
}
|
|
13604
|
+
|
|
13605
|
+
resetGroup(layoutGroup);
|
|
13606
|
+
}
|
|
13714
13607
|
}
|
|
13715
|
-
|
|
13608
|
+
|
|
13609
|
+
that.refresh();
|
|
13610
|
+
|
|
13611
|
+
return newItem;
|
|
13716
13612
|
}
|
|
13717
|
-
}, {
|
|
13718
|
-
key: "_handleDropArea",
|
|
13719
|
-
value: function _handleDropArea(item) {
|
|
13720
|
-
var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
|
|
13721
|
-
var that = this;
|
|
13722
13613
|
|
|
13723
|
-
|
|
13724
|
-
|
|
13614
|
+
/**
|
|
13615
|
+
* Shows/Hides the Add buttons
|
|
13616
|
+
* @param {any} item
|
|
13617
|
+
*/
|
|
13618
|
+
_handleButtonsVisibility(item) {
|
|
13619
|
+
var that = this;
|
|
13620
|
+
|
|
13621
|
+
if (!that._buttons) {
|
|
13622
|
+
that._buttons = document.createElement('div');
|
|
13623
|
+
that._buttons.classList.add('jqx-layout-buttons-container');
|
|
13624
|
+
that._buttons.innerHTML = `<div role="button" position="top"></div>
|
|
13625
|
+
<div role="button" position="bottom"></div>
|
|
13626
|
+
<div role="button" position="center"></div>
|
|
13627
|
+
<div role="button" position="left"></div>
|
|
13628
|
+
<div role="button" position="right"></div>`;
|
|
13725
13629
|
|
|
13726
|
-
switch (position) {
|
|
13727
|
-
case 'left':
|
|
13728
|
-
that._dropArea.style.top = '0px';
|
|
13729
|
-
that._dropArea.style.left = '0px';
|
|
13730
|
-
that._dropArea.style.width = areaSize + '%';
|
|
13731
|
-
that._dropArea.style.height = '100%';
|
|
13732
|
-
break;
|
|
13733
|
-
|
|
13734
|
-
case 'right':
|
|
13735
|
-
that._dropArea.style.top = '0px';
|
|
13736
|
-
that._dropArea.style.left = "calc(100% - ".concat(areaSize, "%)");
|
|
13737
|
-
that._dropArea.style.width = areaSize + '%';
|
|
13738
|
-
that._dropArea.style.height = '100%';
|
|
13739
|
-
break;
|
|
13740
|
-
|
|
13741
|
-
case 'top':
|
|
13742
|
-
that._dropArea.style.top = '0px';
|
|
13743
|
-
that._dropArea.style.left = '0px';
|
|
13744
|
-
that._dropArea.style.width = '100%';
|
|
13745
|
-
that._dropArea.style.height = areaSize + '%';
|
|
13746
|
-
break;
|
|
13747
|
-
|
|
13748
|
-
case 'bottom':
|
|
13749
|
-
that._dropArea.style.top = "calc(100% - ".concat(areaSize, "%)");
|
|
13750
|
-
that._dropArea.style.left = '0px';
|
|
13751
|
-
that._dropArea.style.width = '100%';
|
|
13752
|
-
that._dropArea.style.height = areaSize + '%';
|
|
13753
|
-
break;
|
|
13754
|
-
|
|
13755
|
-
case 'center':
|
|
13756
|
-
that._dropArea.style.top = '0px';
|
|
13757
|
-
that._dropArea.style.left = '0px';
|
|
13758
|
-
that._dropArea.style.width = '100%';
|
|
13759
|
-
that._dropArea.style.height = '100%';
|
|
13760
|
-
break;
|
|
13761
13630
|
}
|
|
13762
|
-
};
|
|
13763
13631
|
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
}
|
|
13632
|
+
if (!item) {
|
|
13633
|
+
if (that._buttons.parentElement) {
|
|
13634
|
+
that._buttons.parentElement.removeChild(that._buttons);
|
|
13768
13635
|
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13636
|
+
return;
|
|
13637
|
+
}
|
|
13638
|
+
}
|
|
13639
|
+
|
|
13640
|
+
if (item) {
|
|
13641
|
+
var buttonPosition = item._buttonPosition || [],
|
|
13642
|
+
buttons = that._buttons.children;
|
|
13772
13643
|
|
|
13773
|
-
if (!that._dragDetails || !item) {
|
|
13774
|
-
return;
|
|
13775
|
-
}
|
|
13776
13644
|
|
|
13777
|
-
|
|
13645
|
+
for (var b = 0; b < buttons.length; b++) {
|
|
13646
|
+
var button = buttons[b];
|
|
13778
13647
|
|
|
13779
|
-
|
|
13648
|
+
button.position = button.getAttribute('position');
|
|
13649
|
+
button.item = item;
|
|
13650
|
+
buttonPosition.length && buttonPosition.indexOf(button.getAttribute('position')) < 0 ? button.classList.add('jqx-hidden') : button.classList.remove('jqx-hidden');
|
|
13651
|
+
|
|
13652
|
+
button.onmouseenter = function () {
|
|
13653
|
+
button.setAttribute('hover', '');
|
|
13654
|
+
}
|
|
13655
|
+
button.onmouseleave = function () {
|
|
13656
|
+
button.removeAttribute('hover')
|
|
13657
|
+
}
|
|
13658
|
+
}
|
|
13780
13659
|
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13660
|
+
if (that.allowLiveSplit && that._buttons.parentElement !== item) {
|
|
13661
|
+
item.appendChild(that._buttons);
|
|
13662
|
+
}
|
|
13663
|
+
}
|
|
13784
13664
|
}
|
|
13785
|
-
}, {
|
|
13786
|
-
key: "_handleSplitter",
|
|
13787
|
-
value: function _handleSplitter(item) {
|
|
13788
|
-
var that = this;
|
|
13789
13665
|
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
|
|
13666
|
+
_handleDropArea(item, position = 'center') {
|
|
13667
|
+
var that = this;
|
|
13668
|
+
|
|
13669
|
+
var positionDropArea = function (position) {
|
|
13670
|
+
var areaSize = 50;
|
|
13671
|
+
|
|
13672
|
+
switch (position) {
|
|
13673
|
+
case 'left':
|
|
13674
|
+
that._dropArea.style.top = '0px';
|
|
13675
|
+
that._dropArea.style.left = '0px';
|
|
13676
|
+
that._dropArea.style.width = areaSize + '%';
|
|
13677
|
+
that._dropArea.style.height = '100%';
|
|
13678
|
+
break;
|
|
13679
|
+
case 'right':
|
|
13680
|
+
that._dropArea.style.top = '0px';
|
|
13681
|
+
that._dropArea.style.left = `calc(100% - ${areaSize}%)`;
|
|
13682
|
+
that._dropArea.style.width = areaSize + '%';
|
|
13683
|
+
that._dropArea.style.height = '100%';
|
|
13684
|
+
break;
|
|
13685
|
+
case 'top':
|
|
13686
|
+
that._dropArea.style.top = '0px';
|
|
13687
|
+
that._dropArea.style.left = '0px';
|
|
13688
|
+
that._dropArea.style.width = '100%';
|
|
13689
|
+
that._dropArea.style.height = areaSize + '%';
|
|
13690
|
+
break;
|
|
13691
|
+
case 'bottom':
|
|
13692
|
+
that._dropArea.style.top = `calc(100% - ${areaSize}%)`;
|
|
13693
|
+
that._dropArea.style.left = '0px';
|
|
13694
|
+
that._dropArea.style.width = '100%';
|
|
13695
|
+
that._dropArea.style.height = areaSize + '%';
|
|
13696
|
+
break;
|
|
13697
|
+
case 'center':
|
|
13698
|
+
that._dropArea.style.top = '0px';
|
|
13699
|
+
that._dropArea.style.left = '0px';
|
|
13700
|
+
that._dropArea.style.width = '100%';
|
|
13701
|
+
that._dropArea.style.height = '100%';
|
|
13702
|
+
break;
|
|
13703
|
+
}
|
|
13704
|
+
}
|
|
13793
13705
|
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
|
|
13706
|
+
if (that._dropArea && that._dropArea.parentElement === item) {
|
|
13707
|
+
positionDropArea(position);
|
|
13708
|
+
return;
|
|
13709
|
+
}
|
|
13797
13710
|
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13711
|
+
if (that._dropArea) {
|
|
13712
|
+
that._dropArea.remove();
|
|
13713
|
+
}
|
|
13714
|
+
|
|
13715
|
+
if (!that._dragDetails || !item) {
|
|
13716
|
+
return;
|
|
13717
|
+
}
|
|
13801
13718
|
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
}
|
|
13719
|
+
that._dropArea = document.createElement('div');
|
|
13720
|
+
that._dropArea.classList.add('jqx-layout-drop-area');
|
|
13805
13721
|
|
|
13806
|
-
|
|
13807
|
-
item._splitter.remove();
|
|
13722
|
+
item.appendChild(that._dropArea);
|
|
13808
13723
|
|
|
13809
|
-
|
|
13810
|
-
|
|
13724
|
+
that._dropArea.style.opacity = 1;
|
|
13725
|
+
positionDropArea(position);
|
|
13726
|
+
}
|
|
13811
13727
|
|
|
13812
|
-
|
|
13813
|
-
|
|
13814
|
-
}
|
|
13728
|
+
_handleSplitter(item) {
|
|
13729
|
+
var that = this;
|
|
13815
13730
|
|
|
13816
|
-
|
|
13817
|
-
|
|
13731
|
+
if (!item) {
|
|
13732
|
+
return;
|
|
13733
|
+
}
|
|
13818
13734
|
|
|
13819
|
-
|
|
13820
|
-
|
|
13821
|
-
|
|
13735
|
+
if (item.hasAttribute('tab')) {
|
|
13736
|
+
item = item.parentElement;
|
|
13737
|
+
}
|
|
13822
13738
|
|
|
13823
|
-
item._splitter
|
|
13739
|
+
if (item._splitter) {
|
|
13740
|
+
item._splitter.remove();
|
|
13741
|
+
}
|
|
13824
13742
|
|
|
13825
|
-
|
|
13743
|
+
if (!item._splitter) {
|
|
13744
|
+
item._splitter = document.createElement('div');
|
|
13745
|
+
}
|
|
13826
13746
|
|
|
13827
|
-
if (
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13747
|
+
if (that._dragDetails && that._dragDetails.dragging) {
|
|
13748
|
+
item._splitter.remove();
|
|
13749
|
+
return;
|
|
13750
|
+
}
|
|
13831
13751
|
|
|
13832
|
-
|
|
13752
|
+
if (item.modifiers.indexOf('resize') === -1) {
|
|
13753
|
+
return;
|
|
13833
13754
|
}
|
|
13834
13755
|
|
|
13835
|
-
|
|
13836
|
-
splitter.style.top = '';
|
|
13837
|
-
splitter.style.left = '';
|
|
13838
|
-
splitter.style.bottom = '';
|
|
13839
|
-
splitter.style.right = '';
|
|
13840
|
-
|
|
13841
|
-
splitter.onpointerdown = function (event) {
|
|
13842
|
-
var item = event.target.item;
|
|
13843
|
-
item.style.overflow = 'hidden';
|
|
13844
|
-
that._resizeDetails = {
|
|
13845
|
-
splitter: event.target,
|
|
13846
|
-
splitterRect: event.target.getBoundingClientRect(),
|
|
13847
|
-
itemRect: item.getBoundingClientRect(),
|
|
13848
|
-
item: item,
|
|
13849
|
-
itemSize: item.size,
|
|
13850
|
-
group: item.parentElement,
|
|
13851
|
-
clientX: event.clientX,
|
|
13852
|
-
clientY: event.clientY
|
|
13853
|
-
};
|
|
13756
|
+
item.appendChild(item._splitter);
|
|
13854
13757
|
|
|
13855
|
-
|
|
13856
|
-
that.querySelectorAll('[data-id]').forEach(function (i) {
|
|
13857
|
-
i.removeAttribute('selected');
|
|
13858
|
-
});
|
|
13859
|
-
that.selectedIndex = item.getAttribute('index');
|
|
13860
|
-
item.setAttribute('selected', '');
|
|
13861
|
-
that._selectedItem = item;
|
|
13758
|
+
var layoutGroup = item.parentElement;
|
|
13862
13759
|
|
|
13863
|
-
|
|
13864
|
-
|
|
13760
|
+
if (layoutGroup) {
|
|
13761
|
+
item._splitter.className = 'jqx-layout-splitter';
|
|
13865
13762
|
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
} else {
|
|
13872
|
-
that._resizeDetails.previousItemRect = null;
|
|
13873
|
-
that._resizeDetails.previousItem = null;
|
|
13874
|
-
}
|
|
13763
|
+
item._splitter.item = item;
|
|
13764
|
+
|
|
13765
|
+
item._splitter.removeAttribute('drag');
|
|
13766
|
+
|
|
13767
|
+
var orientation = layoutGroup.orientation;
|
|
13875
13768
|
|
|
13876
13769
|
if (item.nextElementSibling && item.nextElementSibling.hasAttribute('data-id')) {
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
that._resizeDetails.nextItemRect = null;
|
|
13883
|
-
that._resizeDetails.nextItem = null;
|
|
13770
|
+
item._splitter.classList.add(orientation);
|
|
13771
|
+
}
|
|
13772
|
+
else if (item.previousElementSibling && item.previousElementSibling.hasAttribute('data-id')) {
|
|
13773
|
+
item._splitter.classList.add(orientation);
|
|
13774
|
+
item._splitter.classList.add('last');
|
|
13884
13775
|
}
|
|
13885
|
-
};
|
|
13886
|
-
};
|
|
13887
13776
|
|
|
13888
|
-
|
|
13889
|
-
|
|
13777
|
+
var handleResize = function (splitter) {
|
|
13778
|
+
splitter.style.top = '';
|
|
13779
|
+
splitter.style.left = '';
|
|
13780
|
+
splitter.style.bottom = '';
|
|
13781
|
+
splitter.style.right = '';
|
|
13782
|
+
|
|
13783
|
+
splitter.onpointerdown = function (event) {
|
|
13784
|
+
var item = event.target.item;
|
|
13785
|
+
item.style.overflow = 'hidden';
|
|
13786
|
+
|
|
13787
|
+
that._resizeDetails = {
|
|
13788
|
+
splitter: event.target,
|
|
13789
|
+
splitterRect: event.target.getBoundingClientRect(),
|
|
13790
|
+
itemRect: item.getBoundingClientRect(),
|
|
13791
|
+
item: item,
|
|
13792
|
+
itemSize: item.size,
|
|
13793
|
+
group: item.parentElement,
|
|
13794
|
+
clientX: event.clientX,
|
|
13795
|
+
clientY: event.clientY
|
|
13796
|
+
}
|
|
13797
|
+
|
|
13798
|
+
if (that._selectedItem !== item) {
|
|
13799
|
+
that.querySelectorAll('[data-id]').forEach(function (i) { i.removeAttribute('selected') });
|
|
13800
|
+
that.selectedIndex = item.getAttribute('index');
|
|
13801
|
+
item.setAttribute('selected', '');
|
|
13802
|
+
that._selectedItem = item;
|
|
13803
|
+
that._handleButtonsVisibility(item);
|
|
13804
|
+
}
|
|
13805
|
+
|
|
13806
|
+
if (item.previousElementSibling && item.previousElementSibling.hasAttribute('data-id')) {
|
|
13807
|
+
that._resizeDetails.previousItemRect = item.previousElementSibling.getBoundingClientRect();
|
|
13808
|
+
that._resizeDetails.previousItem = item.previousElementSibling;
|
|
13809
|
+
that._resizeDetails.previousItemSize = item.previousElementSibling.size;
|
|
13810
|
+
that._resizeDetails.previousItem.style.overflow = 'hidden';
|
|
13811
|
+
}
|
|
13812
|
+
else {
|
|
13813
|
+
that._resizeDetails.previousItemRect = null;
|
|
13814
|
+
that._resizeDetails.previousItem = null;
|
|
13815
|
+
}
|
|
13816
|
+
|
|
13817
|
+
if (item.nextElementSibling && item.nextElementSibling.hasAttribute('data-id')) {
|
|
13818
|
+
that._resizeDetails.nextItemRect = item.nextElementSibling.getBoundingClientRect();
|
|
13819
|
+
that._resizeDetails.nextItem = item.nextElementSibling;
|
|
13820
|
+
that._resizeDetails.nextItemSize = item.nextElementSibling.size;
|
|
13821
|
+
that._resizeDetails.nextItem.style.overflow = 'hidden';
|
|
13822
|
+
}
|
|
13823
|
+
else {
|
|
13824
|
+
that._resizeDetails.nextItemRect = null;
|
|
13825
|
+
that._resizeDetails.nextItem = null;
|
|
13826
|
+
}
|
|
13827
|
+
}
|
|
13828
|
+
}
|
|
13829
|
+
|
|
13830
|
+
handleResize(item._splitter);
|
|
13831
|
+
}
|
|
13890
13832
|
}
|
|
13891
|
-
|
|
13833
|
+
}
|
|
13892
13834
|
|
|
13893
|
-
return SplitLayout;
|
|
13894
|
-
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
|
13895
13835
|
|
|
13896
13836
|
customElements.define('jqx-layout-group', LayoutGroup);
|
|
13897
13837
|
customElements.define('jqx-layout-item', LayoutItem);
|
|
@@ -13899,6 +13839,10 @@ customElements.define('jqx-tab-layout-group', TabLayoutGroup);
|
|
|
13899
13839
|
customElements.define('jqx-tab-layout-item', TabLayoutItem);
|
|
13900
13840
|
customElements.define('jqx-split-layout', SplitLayout);
|
|
13901
13841
|
|
|
13842
|
+
})();
|
|
13843
|
+
|
|
13844
|
+
|
|
13845
|
+
|
|
13902
13846
|
|
|
13903
13847
|
|
|
13904
13848
|
|
|
@@ -13921,7 +13865,7 @@ customElements.define('jqx-split-layout', SplitLayout);
|
|
|
13921
13865
|
/******/ var __webpack_module_cache__ = {};
|
|
13922
13866
|
/******/
|
|
13923
13867
|
/******/ // The require function
|
|
13924
|
-
/******/ function
|
|
13868
|
+
/******/ function __webpack_require__(moduleId) {
|
|
13925
13869
|
/******/ // Check if module is in cache
|
|
13926
13870
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
13927
13871
|
/******/ if (cachedModule !== undefined) {
|
|
@@ -13935,7 +13879,7 @@ customElements.define('jqx-split-layout', SplitLayout);
|
|
|
13935
13879
|
/******/ };
|
|
13936
13880
|
/******/
|
|
13937
13881
|
/******/ // Execute the module function
|
|
13938
|
-
/******/ __webpack_modules__[moduleId](module, module.exports,
|
|
13882
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
13939
13883
|
/******/
|
|
13940
13884
|
/******/ // Return the exports of the module
|
|
13941
13885
|
/******/ return module.exports;
|
|
@@ -13944,17 +13888,17 @@ customElements.define('jqx-split-layout', SplitLayout);
|
|
|
13944
13888
|
/************************************************************************/
|
|
13945
13889
|
/******/ /* webpack/runtime/amd options */
|
|
13946
13890
|
/******/ (() => {
|
|
13947
|
-
/******/
|
|
13891
|
+
/******/ __webpack_require__.amdO = {};
|
|
13948
13892
|
/******/ })();
|
|
13949
13893
|
/******/
|
|
13950
13894
|
/******/ /* webpack/runtime/compat get default export */
|
|
13951
13895
|
/******/ (() => {
|
|
13952
13896
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
13953
|
-
/******/
|
|
13897
|
+
/******/ __webpack_require__.n = (module) => {
|
|
13954
13898
|
/******/ var getter = module && module.__esModule ?
|
|
13955
13899
|
/******/ () => (module['default']) :
|
|
13956
13900
|
/******/ () => (module);
|
|
13957
|
-
/******/
|
|
13901
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
13958
13902
|
/******/ return getter;
|
|
13959
13903
|
/******/ };
|
|
13960
13904
|
/******/ })();
|
|
@@ -13962,9 +13906,9 @@ customElements.define('jqx-split-layout', SplitLayout);
|
|
|
13962
13906
|
/******/ /* webpack/runtime/define property getters */
|
|
13963
13907
|
/******/ (() => {
|
|
13964
13908
|
/******/ // define getter functions for harmony exports
|
|
13965
|
-
/******/
|
|
13909
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
13966
13910
|
/******/ for(var key in definition) {
|
|
13967
|
-
/******/ if(
|
|
13911
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13968
13912
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
13969
13913
|
/******/ }
|
|
13970
13914
|
/******/ }
|
|
@@ -13973,7 +13917,7 @@ customElements.define('jqx-split-layout', SplitLayout);
|
|
|
13973
13917
|
/******/
|
|
13974
13918
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
13975
13919
|
/******/ (() => {
|
|
13976
|
-
/******/
|
|
13920
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
13977
13921
|
/******/ })();
|
|
13978
13922
|
/******/
|
|
13979
13923
|
/************************************************************************/
|
|
@@ -13981,17 +13925,13 @@ var __webpack_exports__ = {};
|
|
|
13981
13925
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
13982
13926
|
(() => {
|
|
13983
13927
|
"use strict";
|
|
13984
|
-
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0__ =
|
|
13985
|
-
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/
|
|
13986
|
-
/* harmony import */ var _jqxsplitlayout__WEBPACK_IMPORTED_MODULE_1__ =
|
|
13987
|
-
/* harmony import */ var _jqxsplitlayout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/
|
|
13928
|
+
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5459);
|
|
13929
|
+
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jqxcore__WEBPACK_IMPORTED_MODULE_0__);
|
|
13930
|
+
/* harmony import */ var _jqxsplitlayout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
|
|
13931
|
+
/* harmony import */ var _jqxsplitlayout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jqxsplitlayout__WEBPACK_IMPORTED_MODULE_1__);
|
|
13988
13932
|
|
|
13989
13933
|
|
|
13990
13934
|
})();
|
|
13991
13935
|
|
|
13992
|
-
/******/ })()
|
|
13993
|
-
;
|
|
13994
|
-
/******/ })()
|
|
13995
|
-
;
|
|
13996
13936
|
/******/ })()
|
|
13997
13937
|
;
|