@syncfusion/ej2-layouts 25.2.3 → 26.1.38
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/.eslintrc.json +3 -2
- package/dist/ej2-layouts.min.js +2 -2
- package/dist/ej2-layouts.umd.min.js +2 -2
- package/dist/ej2-layouts.umd.min.js.map +1 -1
- package/dist/es6/ej2-layouts.es2015.js +215 -140
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +243 -167
- package/dist/es6/ej2-layouts.es5.js.map +1 -1
- package/dist/global/ej2-layouts.min.js +2 -2
- package/dist/global/ej2-layouts.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/dashboard-layout/dashboard-layout.d.ts +2 -2
- package/src/dashboard-layout/dashboard-layout.js +55 -76
- package/src/splitter/splitter.js +81 -41
- package/src/timeline/timeline-model.d.ts +5 -5
- package/src/timeline/timeline.d.ts +6 -3
- package/src/timeline/timeline.js +107 -33
- package/styles/avatar/_bootstrap5.3-definition.scss +26 -0
- package/styles/avatar/_fluent2-definition.scss +28 -0
- package/styles/avatar/_layout.scss +22 -18
- package/styles/avatar/_material3-definition.scss +0 -7
- package/styles/avatar/bootstrap-dark.css +7 -4
- package/styles/avatar/bootstrap.css +7 -4
- package/styles/avatar/bootstrap4.css +7 -4
- package/styles/avatar/bootstrap5-dark.css +13 -10
- package/styles/avatar/bootstrap5.css +13 -10
- package/styles/avatar/fabric-dark.css +7 -4
- package/styles/avatar/fabric.css +7 -4
- package/styles/avatar/fluent-dark.css +11 -8
- package/styles/avatar/fluent.css +11 -8
- package/styles/avatar/fluent2.css +1097 -0
- package/styles/avatar/fluent2.scss +3 -0
- package/styles/avatar/highcontrast-light.css +7 -4
- package/styles/avatar/highcontrast.css +7 -4
- package/styles/avatar/material-dark.css +7 -4
- package/styles/avatar/material.css +7 -4
- package/styles/avatar/material3-dark.css +12 -9
- package/styles/avatar/material3.css +12 -9
- package/styles/avatar/tailwind-dark.css +11 -8
- package/styles/avatar/tailwind.css +11 -8
- package/styles/bootstrap-dark.css +359 -197
- package/styles/bootstrap-dark.scss +14 -5
- package/styles/bootstrap.css +359 -197
- package/styles/bootstrap.scss +14 -5
- package/styles/bootstrap4.css +357 -196
- package/styles/bootstrap4.scss +14 -5
- package/styles/bootstrap5-dark.css +370 -207
- package/styles/bootstrap5-dark.scss +14 -5
- package/styles/bootstrap5.css +370 -207
- package/styles/bootstrap5.scss +14 -5
- package/styles/card/_bootstrap5.3-definition.scss +125 -0
- package/styles/card/_fluent2-definition.scss +123 -0
- package/styles/card/_layout.scss +13 -4
- package/styles/card/_material3-definition.scss +0 -13
- package/styles/card/_theme.scss +4 -16
- package/styles/card/bootstrap-dark.css +95 -52
- package/styles/card/bootstrap.css +95 -52
- package/styles/card/bootstrap4.css +95 -52
- package/styles/card/bootstrap5-dark.css +95 -52
- package/styles/card/bootstrap5.css +95 -52
- package/styles/card/fabric-dark.css +95 -52
- package/styles/card/fabric.css +95 -52
- package/styles/card/fluent-dark.css +99 -54
- package/styles/card/fluent.css +99 -54
- package/styles/card/fluent2.css +1593 -0
- package/styles/card/fluent2.scss +3 -0
- package/styles/card/highcontrast-light.css +95 -52
- package/styles/card/highcontrast.css +95 -52
- package/styles/card/material-dark.css +95 -52
- package/styles/card/material.css +97 -53
- package/styles/card/material3-dark.css +99 -53
- package/styles/card/material3.css +99 -53
- package/styles/card/tailwind-dark.css +95 -52
- package/styles/card/tailwind.css +95 -52
- package/styles/dashboard-layout/_bootstrap5.3-definition.scss +108 -0
- package/styles/dashboard-layout/_fluent2-definition.scss +111 -0
- package/styles/dashboard-layout/_highcontrast-definition.scss +1 -1
- package/styles/dashboard-layout/_layout.scss +62 -60
- package/styles/dashboard-layout/_material3-definition.scss +0 -47
- package/styles/dashboard-layout/_theme.scss +19 -32
- package/styles/dashboard-layout/bootstrap-dark.css +41 -42
- package/styles/dashboard-layout/bootstrap.css +41 -42
- package/styles/dashboard-layout/bootstrap4.css +41 -42
- package/styles/dashboard-layout/bootstrap5-dark.css +48 -47
- package/styles/dashboard-layout/bootstrap5.css +48 -47
- package/styles/dashboard-layout/fabric-dark.css +41 -42
- package/styles/dashboard-layout/fabric.css +41 -42
- package/styles/dashboard-layout/fluent-dark.css +46 -46
- package/styles/dashboard-layout/fluent.css +46 -46
- package/styles/dashboard-layout/fluent2.css +1336 -0
- package/styles/dashboard-layout/fluent2.scss +4 -0
- package/styles/dashboard-layout/highcontrast-light.css +39 -41
- package/styles/dashboard-layout/highcontrast.css +43 -42
- package/styles/dashboard-layout/icons/_bootstrap5.3.scss +80 -0
- package/styles/dashboard-layout/icons/_fluent2.scss +80 -0
- package/styles/dashboard-layout/material-dark.css +41 -42
- package/styles/dashboard-layout/material.css +41 -42
- package/styles/dashboard-layout/material3-dark.css +48 -47
- package/styles/dashboard-layout/material3.css +48 -47
- package/styles/dashboard-layout/tailwind-dark.css +57 -55
- package/styles/dashboard-layout/tailwind.css +57 -55
- package/styles/fabric-dark.css +359 -197
- package/styles/fabric-dark.scss +14 -5
- package/styles/fabric.css +359 -197
- package/styles/fabric.scss +14 -5
- package/styles/fluent-dark.css +370 -206
- package/styles/fluent-dark.scss +14 -5
- package/styles/fluent.css +370 -206
- package/styles/fluent.scss +14 -5
- package/styles/fluent2.css +2803 -0
- package/styles/fluent2.scss +14 -0
- package/styles/highcontrast-light.css +357 -196
- package/styles/highcontrast-light.scss +13 -5
- package/styles/highcontrast.css +361 -197
- package/styles/highcontrast.scss +14 -5
- package/styles/material-dark.css +357 -196
- package/styles/material-dark.scss +14 -5
- package/styles/material.css +359 -197
- package/styles/material.scss +14 -5
- package/styles/material3-dark.css +370 -204
- package/styles/material3-dark.scss +14 -5
- package/styles/material3.css +370 -204
- package/styles/material3.scss +14 -5
- package/styles/splitter/_bootstrap5.3-definition.scss +31 -0
- package/styles/splitter/_fluent2-definition.scss +31 -0
- package/styles/splitter/_layout.scss +0 -4
- package/styles/splitter/_material3-definition.scss +0 -7
- package/styles/splitter/_theme.scss +0 -4
- package/styles/splitter/bootstrap-dark.css +115 -59
- package/styles/splitter/bootstrap.css +115 -59
- package/styles/splitter/bootstrap4.css +113 -58
- package/styles/splitter/bootstrap5-dark.css +113 -58
- package/styles/splitter/bootstrap5.css +113 -58
- package/styles/splitter/fabric-dark.css +115 -59
- package/styles/splitter/fabric.css +115 -59
- package/styles/splitter/fluent-dark.css +113 -58
- package/styles/splitter/fluent.css +113 -58
- package/styles/splitter/fluent2.css +1578 -0
- package/styles/splitter/fluent2.scss +4 -0
- package/styles/splitter/highcontrast-light.css +115 -59
- package/styles/splitter/highcontrast.css +115 -59
- package/styles/splitter/icons/_bootstrap5.3.scss +39 -0
- package/styles/splitter/icons/_fluent2.scss +39 -0
- package/styles/splitter/material-dark.css +113 -58
- package/styles/splitter/material.css +113 -58
- package/styles/splitter/material3-dark.css +114 -59
- package/styles/splitter/material3.css +114 -59
- package/styles/splitter/tailwind-dark.css +113 -58
- package/styles/splitter/tailwind.css +113 -58
- package/styles/tailwind-dark.css +377 -213
- package/styles/tailwind-dark.scss +14 -5
- package/styles/tailwind.css +377 -213
- package/styles/tailwind.scss +14 -5
- package/styles/timeline/_bootstrap5.3-definition.scss +18 -0
- package/styles/timeline/_fluent2-definition.scss +18 -0
- package/styles/timeline/_layout.scss +46 -7
- package/styles/timeline/bootstrap-dark.css +99 -39
- package/styles/timeline/bootstrap.css +99 -39
- package/styles/timeline/bootstrap4.css +99 -39
- package/styles/timeline/bootstrap5-dark.css +99 -39
- package/styles/timeline/bootstrap5.css +99 -39
- package/styles/timeline/fabric-dark.css +99 -39
- package/styles/timeline/fabric.css +99 -39
- package/styles/timeline/fluent-dark.css +99 -39
- package/styles/timeline/fluent.css +99 -39
- package/styles/timeline/fluent2.css +1332 -0
- package/styles/timeline/fluent2.scss +3 -0
- package/styles/timeline/highcontrast-light.css +99 -39
- package/styles/timeline/highcontrast.css +99 -39
- package/styles/timeline/material-dark.css +99 -39
- package/styles/timeline/material.css +99 -39
- package/styles/timeline/material3-dark.css +100 -40
- package/styles/timeline/material3.css +100 -40
- package/styles/timeline/tailwind-dark.css +99 -39
- package/styles/timeline/tailwind.css +99 -39
- package/CHANGELOG.md +0 -601
package/dist/global/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version :
|
3
|
+
* version : 26.1.38
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
5
5
|
* Use of this code is subject to the terms of our license.
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "@syncfusion/ej2-layouts@*",
|
3
|
-
"_id": "@syncfusion/ej2-layouts@
|
3
|
+
"_id": "@syncfusion/ej2-layouts@26.1.35",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512
|
5
|
+
"_integrity": "sha512-+LpjPEbFmjBxK53q+5R0P3hRCgbQeVUVO7OQsUjQhsYFGDKkKhczN7aHCH75VIPyBOs01TKT22YFBVnCC0ZmXA==",
|
6
6
|
"_location": "/@syncfusion/ej2-layouts",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -26,16 +26,16 @@
|
|
26
26
|
"/@syncfusion/ej2-react-layouts",
|
27
27
|
"/@syncfusion/ej2-vue-layouts"
|
28
28
|
],
|
29
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-layouts/-/ej2-layouts-
|
30
|
-
"_shasum": "
|
29
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-layouts/-/ej2-layouts-26.1.35.tgz",
|
30
|
+
"_shasum": "e6cb9dfa870a6fa4159d87792d291bd5380645eb",
|
31
31
|
"_spec": "@syncfusion/ej2-layouts@*",
|
32
|
-
"_where": "/jenkins/workspace/elease-
|
32
|
+
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
|
33
33
|
"author": {
|
34
34
|
"name": "Syncfusion Inc."
|
35
35
|
},
|
36
36
|
"bundleDependencies": false,
|
37
37
|
"dependencies": {
|
38
|
-
"@syncfusion/ej2-base": "~
|
38
|
+
"@syncfusion/ej2-base": "~26.1.37"
|
39
39
|
},
|
40
40
|
"deprecated": false,
|
41
41
|
"description": "A package of Essential JS 2 layout pure CSS components such as card and avatar. The card is used as small container to show content in specific structure, whereas the avatars are icons, initials or figures representing particular person.",
|
@@ -75,7 +75,7 @@
|
|
75
75
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/layouts"
|
76
76
|
},
|
77
77
|
"typings": "index.d.ts",
|
78
|
-
"version": "
|
78
|
+
"version": "26.1.38",
|
79
79
|
"sideEffects": false,
|
80
80
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
81
81
|
}
|
@@ -508,7 +508,7 @@ export declare class DashboardLayout extends Component<HTMLElement> implements I
|
|
508
508
|
* @returns void
|
509
509
|
*/
|
510
510
|
removePanel(id: string): void;
|
511
|
-
constructor(options?: DashboardLayoutModel, element?: string |
|
511
|
+
constructor(options?: DashboardLayoutModel, element?: string | HTMLElement);
|
512
512
|
/**
|
513
513
|
*Moves the panel in the DashboardLayout.
|
514
514
|
*
|
@@ -556,7 +556,7 @@ export declare class DashboardLayout extends Component<HTMLElement> implements I
|
|
556
556
|
*
|
557
557
|
* @private
|
558
558
|
*/
|
559
|
-
onPropertyChanged(newProp: DashboardLayoutModel
|
559
|
+
onPropertyChanged(newProp: DashboardLayoutModel): void;
|
560
560
|
/**
|
561
561
|
* Gets the properties to be maintained upon browser refresh.
|
562
562
|
*
|
@@ -17,6 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
19
19
|
};
|
20
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
20
21
|
import { Component, Property, NotifyPropertyChanges, isUndefined } from '@syncfusion/ej2-base';
|
21
22
|
import { Collection, Draggable, isNullOrUndefined, append, setValue } from '@syncfusion/ej2-base';
|
22
23
|
import { Event, formatUnit, ChildProperty, compile, closest, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';
|
@@ -291,9 +292,11 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
291
292
|
else {
|
292
293
|
this.cellSize[0] = this.element.parentElement &&
|
293
294
|
((this.element.parentElement.offsetWidth));
|
294
|
-
this.
|
295
|
-
|
296
|
-
|
295
|
+
if (!isNullOrUndefined(this.cellSpacing)) {
|
296
|
+
this.cellSize[0] = this.element.parentElement
|
297
|
+
&& ((this.element.parentElement.offsetWidth - ((this.maxCol() - 1) * this.cellSpacing[0]))
|
298
|
+
/ (this.maxCol()));
|
299
|
+
}
|
297
300
|
this.cellSize[1] = this.cellSize[0] / this.cellAspectRatio;
|
298
301
|
}
|
299
302
|
};
|
@@ -322,9 +325,9 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
322
325
|
DashboardLayout.prototype.updateOldRowColumn = function () {
|
323
326
|
for (var i = 0; i < this.panels.length; i++) {
|
324
327
|
var id = this.panels[i].id;
|
325
|
-
if (this.element.querySelector(
|
326
|
-
var row = parseInt(this.element.querySelector(
|
327
|
-
var col = parseInt(this.element.querySelector(
|
328
|
+
if (this.element.querySelector('[id=\'' + id + '\']')) {
|
329
|
+
var row = parseInt(this.element.querySelector('[id=\'' + id + '\']').getAttribute('data-row'), 10);
|
330
|
+
var col = parseInt(this.element.querySelector('[id=\'' + id + '\']').getAttribute('data-col'), 10);
|
328
331
|
this.oldRowCol[this.panels[i].id] = { row: row, col: col };
|
329
332
|
}
|
330
333
|
else {
|
@@ -383,7 +386,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
383
386
|
}
|
384
387
|
}
|
385
388
|
else {
|
386
|
-
// eslint-disable-next-line
|
387
389
|
var compilerFn = templateFn({}, this, prop, type, isStringTemplate, null, appendElement);
|
388
390
|
if (compilerFn) {
|
389
391
|
for (var _i = 0, compilerFn_1 = compilerFn; _i < compilerFn_1.length; _i++) {
|
@@ -463,7 +465,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
463
465
|
model.enabled = true;
|
464
466
|
}
|
465
467
|
panelElement.style.zIndex = '' + model.zIndex;
|
466
|
-
// eslint-disable-next-line
|
467
468
|
var panelProp = new Panel(this, 'panels', model, true);
|
468
469
|
this.panels.push(panelProp);
|
469
470
|
this.oldRowCol[model.id] = { row: model.row, col: model.col };
|
@@ -482,7 +483,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
482
483
|
};
|
483
484
|
DashboardLayout.prototype.bindEvents = function () {
|
484
485
|
this.refreshListener = this.refresh.bind(this);
|
485
|
-
// eslint-disable-next-line
|
486
486
|
EventHandler.add(window, 'resize', this.refreshListener);
|
487
487
|
this.resizeEvents();
|
488
488
|
};
|
@@ -895,7 +895,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
895
895
|
else {
|
896
896
|
if (this.element.classList.contains(responsive)) {
|
897
897
|
removeClass([this.element], [responsive]);
|
898
|
-
// eslint-disable-next-line
|
899
898
|
var internalPanels = this.element.querySelectorAll(((this.element.id) ? '#' + this.element.id + ' > ' : '') + '.e-panel');
|
900
899
|
for (var i = 0; i < internalPanels.length; i++) {
|
901
900
|
var ele = internalPanels[i];
|
@@ -973,7 +972,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
973
972
|
this.updatedRows = updatedPanel.length;
|
974
973
|
for (var i = 0; i < updatedPanel.length; i++) {
|
975
974
|
var panelElement = document.getElementById(updatedPanel[i].id);
|
976
|
-
// eslint-disable-next-line
|
977
975
|
var updatedHeight = void 0;
|
978
976
|
if (panelElement) {
|
979
977
|
setStyle(panelElement, { 'width': '100%' });
|
@@ -982,8 +980,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
982
980
|
if (updatedPanel[i].sizeY > 1) {
|
983
981
|
updatedHeight = ((this.element.parentElement
|
984
982
|
&& this.element.parentElement.offsetWidth / this.cellAspectRatio) * updatedPanel[i].sizeY) +
|
985
|
-
|
986
|
-
parseInt((Math.round(updatedPanel[i].sizeY / 2) * this.cellSpacing[1]).toString(), 0);
|
983
|
+
parseInt((Math.round(updatedPanel[i].sizeY / 2) * this.cellSpacing[1]).toString(), 10);
|
987
984
|
panelElement.style.height = '' + updatedHeight + 'px';
|
988
985
|
}
|
989
986
|
this.resizeHeight = true;
|
@@ -1020,7 +1017,9 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1020
1017
|
};
|
1021
1018
|
DashboardLayout.prototype.setHeightWidth = function () {
|
1022
1019
|
var heightValue;
|
1023
|
-
|
1020
|
+
if (isNullOrUndefined(this.cellSpacing)) {
|
1021
|
+
return;
|
1022
|
+
}
|
1024
1023
|
if (this.checkMediaQuery()) {
|
1025
1024
|
var entirePanelsY = 0;
|
1026
1025
|
for (var i = 0; i < this.panels.length; i++) {
|
@@ -1037,8 +1036,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1037
1036
|
(this.cellSize[0] / this.cellAspectRatio) + (this.maxRow() - 1) * this.cellSpacing[1]) + 'px';
|
1038
1037
|
}
|
1039
1038
|
setStyle(this.element, { 'height': heightValue });
|
1040
|
-
|
1041
|
-
widthValue = window.getComputedStyle(this.element).width;
|
1039
|
+
var widthValue = window.getComputedStyle(this.element).width;
|
1042
1040
|
setStyle(this.element, { 'width': widthValue });
|
1043
1041
|
};
|
1044
1042
|
DashboardLayout.prototype.setHeightAndWidth = function (panelElement, panelModel) {
|
@@ -1138,7 +1136,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1138
1136
|
}
|
1139
1137
|
};
|
1140
1138
|
DashboardLayout.prototype.panelPropertyChange = function (panel, value) {
|
1141
|
-
// eslint-disable-next-line
|
1142
1139
|
panel.setProperties(value, true);
|
1143
1140
|
};
|
1144
1141
|
DashboardLayout.prototype.renderDashBoardCells = function (cells) {
|
@@ -1181,9 +1178,9 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1181
1178
|
for (var h = 0; h < sizeY; ++h) {
|
1182
1179
|
for (var w = 0; w < sizeX; ++w) {
|
1183
1180
|
item = this.getPanel(row + h, col + w, ignore);
|
1184
|
-
if (item && (!ignore || ignore.indexOf(this.element.querySelector(
|
1185
|
-
items.indexOf(this.element.querySelector(
|
1186
|
-
items.push(this.element.querySelector(
|
1181
|
+
if (item && (!ignore || ignore.indexOf(this.element.querySelector('[id=\'' + item.id + '\']')) === -1) &&
|
1182
|
+
items.indexOf(this.element.querySelector('[id=\'' + item.id + '\']')) === -1) {
|
1183
|
+
items.push(this.element.querySelector('[id=\'' + item.id + '\']'));
|
1187
1184
|
}
|
1188
1185
|
}
|
1189
1186
|
}
|
@@ -1478,8 +1475,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1478
1475
|
exclusions.push(ele);
|
1479
1476
|
if (updatedCollision.length === 0) {
|
1480
1477
|
isRightAdjudtable = true;
|
1481
|
-
// eslint-disable-next-line no-self-assign
|
1482
|
-
this.spacedColumnValue = this.spacedColumnValue;
|
1483
1478
|
return isRightAdjudtable;
|
1484
1479
|
}
|
1485
1480
|
else {
|
@@ -1551,7 +1546,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1551
1546
|
}
|
1552
1547
|
if (this.mainElement && this.oldRowCol !== this.cloneObject) {
|
1553
1548
|
for (var i = 0; i < this.panels.length; i++) {
|
1554
|
-
var element = this.element.querySelector(
|
1549
|
+
var element = this.element.querySelector('[id=\'' + this.panels[i].id + '\']');
|
1555
1550
|
if (element === this.mainElement) {
|
1556
1551
|
continue;
|
1557
1552
|
}
|
@@ -1706,6 +1701,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1706
1701
|
});
|
1707
1702
|
};
|
1708
1703
|
DashboardLayout.prototype.updatePanelLayout = function (element, panelModel) {
|
1704
|
+
var _this = this;
|
1709
1705
|
this.collisionChecker = {};
|
1710
1706
|
var initialModel = [];
|
1711
1707
|
var checkForAdjustment;
|
@@ -1759,11 +1755,9 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1759
1755
|
}
|
1760
1756
|
}
|
1761
1757
|
if (collisionModels.length > 0) {
|
1762
|
-
// eslint-disable-next-line
|
1763
|
-
var proxy_1 = this;
|
1764
1758
|
collisionModels.forEach(function (item1) {
|
1765
|
-
if (
|
1766
|
-
|
1759
|
+
if (_this.overlapElement.indexOf(item1) === -1) {
|
1760
|
+
_this.overlapElement.push(item1);
|
1767
1761
|
}
|
1768
1762
|
});
|
1769
1763
|
if (this.overlapElement && this.overlapElement.indexOf(element) !== -1) {
|
@@ -1875,15 +1869,14 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1875
1869
|
}
|
1876
1870
|
};
|
1877
1871
|
DashboardLayout.prototype.collisionPanel = function (collisionModels, colValue, updatedRow, clone) {
|
1872
|
+
var _this = this;
|
1878
1873
|
var panelModel = this.getCellInstance(clone.id);
|
1879
1874
|
this.panelPropertyChange(panelModel, { row: updatedRow, col: colValue });
|
1880
1875
|
if (collisionModels.length > 0) {
|
1881
|
-
// eslint-disable-next-line
|
1882
|
-
var proxy_2 = this;
|
1883
1876
|
this.overlapElement = [];
|
1884
1877
|
this.shouldRestrict = true;
|
1885
1878
|
collisionModels.forEach(function (item1) {
|
1886
|
-
|
1879
|
+
_this.overlapElement.push(item1);
|
1887
1880
|
});
|
1888
1881
|
var overlapElementRow1 = parseInt(clone.getAttribute('data-row'), 10);
|
1889
1882
|
for (var m = 0; m < this.overlapElement.length; m++) {
|
@@ -1896,27 +1889,21 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1896
1889
|
this.sortedPanel();
|
1897
1890
|
}
|
1898
1891
|
if (this.overlapSubElementClone.length > 0) {
|
1899
|
-
var
|
1900
|
-
var rowVal = parseInt(
|
1901
|
-
var colValue_1 = parseInt(
|
1902
|
-
var sizeX = parseInt(
|
1903
|
-
var sizeY = parseInt(
|
1904
|
-
var collisionModels1 =
|
1905
|
-
if (
|
1906
|
-
collisionModels1.splice(collisionModels1.indexOf(
|
1892
|
+
for (var p = 0; p < this.overlapSubElementClone.length; p++) {
|
1893
|
+
var rowVal = parseInt(this.overlapSubElementClone[p].getAttribute('data-row'), 10);
|
1894
|
+
var colValue_1 = parseInt(this.overlapSubElementClone[p].getAttribute('data-col'), 10);
|
1895
|
+
var sizeX = parseInt(this.overlapSubElementClone[p].getAttribute('data-sizeX'), 10);
|
1896
|
+
var sizeY = parseInt(this.overlapSubElementClone[p].getAttribute('data-sizeY'), 10);
|
1897
|
+
var collisionModels1 = this.collisions(rowVal, colValue_1, sizeX, sizeY, this.overlapSubElementClone);
|
1898
|
+
if (this.mainElement && collisionModels1.indexOf(this.mainElement) !== -1) {
|
1899
|
+
collisionModels1.splice(collisionModels1.indexOf(this.mainElement), 1);
|
1907
1900
|
}
|
1908
|
-
// eslint-disable-next-line
|
1909
|
-
var proxy = this_3;
|
1910
1901
|
collisionModels1.forEach(function (item1) {
|
1911
|
-
|
1902
|
+
_this.overlapElement.push(item1);
|
1912
1903
|
});
|
1913
1904
|
if (collisionModels1.length > 0) {
|
1914
|
-
|
1905
|
+
this.updateRowColumn(rowVal, this.overlapElement, this.overlapSubElementClone[p]);
|
1915
1906
|
}
|
1916
|
-
};
|
1917
|
-
var this_3 = this;
|
1918
|
-
for (var p = 0; p < this.overlapSubElementClone.length; p++) {
|
1919
|
-
_loop_5(p);
|
1920
1907
|
}
|
1921
1908
|
}
|
1922
1909
|
this.overlapSubElementClone = [];
|
@@ -1976,14 +1963,14 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1976
1963
|
DashboardLayout.prototype.setXYAttributes = function (element, panelModel) {
|
1977
1964
|
var value = {
|
1978
1965
|
value: {
|
1979
|
-
sizeX: panelModel.sizeX.toString(),
|
1980
|
-
sizeY: panelModel.sizeY.toString(),
|
1981
|
-
minSizeX: panelModel.minSizeX.toString(),
|
1982
|
-
minSizeY: panelModel.minSizeY.toString(),
|
1966
|
+
sizeX: !isNullOrUndefined(panelModel.sizeX) ? panelModel.sizeX.toString() : undefined,
|
1967
|
+
sizeY: !isNullOrUndefined(panelModel.sizeY) ? panelModel.sizeY.toString() : undefined,
|
1968
|
+
minSizeX: !isNullOrUndefined(panelModel.minSizeX) ? panelModel.minSizeX.toString() : undefined,
|
1969
|
+
minSizeY: !isNullOrUndefined(panelModel.minSizeY) ? panelModel.minSizeY.toString() : undefined,
|
1983
1970
|
maxSizeX: !isNullOrUndefined(panelModel.maxSizeX) ? panelModel.maxSizeX.toString() : undefined,
|
1984
1971
|
maxSizeY: !isNullOrUndefined(panelModel.maxSizeY) ? panelModel.maxSizeY.toString() : undefined,
|
1985
|
-
row: panelModel.row.toString(),
|
1986
|
-
col: panelModel.col.toString()
|
1972
|
+
row: !isNullOrUndefined(panelModel.row) ? panelModel.row.toString() : undefined,
|
1973
|
+
col: !isNullOrUndefined(panelModel.col) ? panelModel.col.toString() : undefined
|
1987
1974
|
}
|
1988
1975
|
};
|
1989
1976
|
this.setAttributes(value, element);
|
@@ -2041,18 +2028,18 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2041
2028
|
};
|
2042
2029
|
DashboardLayout.prototype.enableDraggingContent = function (collections) {
|
2043
2030
|
var _this = this;
|
2044
|
-
var
|
2031
|
+
var _loop_5 = function (i) {
|
2045
2032
|
var abortArray = ['.e-resize', '.' + dragRestrict];
|
2046
2033
|
var cellElement = collections[i];
|
2047
2034
|
{
|
2048
|
-
|
2035
|
+
this_3.dragobj = new Draggable(cellElement, {
|
2049
2036
|
preventDefault: false,
|
2050
2037
|
clone: false,
|
2051
|
-
dragArea:
|
2038
|
+
dragArea: this_3.element,
|
2052
2039
|
isDragScroll: true,
|
2053
|
-
handle:
|
2040
|
+
handle: this_3.draggableHandle ? this_3.draggableHandle : '.e-panel',
|
2054
2041
|
abort: abortArray,
|
2055
|
-
dragStart:
|
2042
|
+
dragStart: this_3.onDraggingStart.bind(this_3),
|
2056
2043
|
dragStop: function (args) {
|
2057
2044
|
_this.trigger('dragStop', args);
|
2058
2045
|
if (isNullOrUndefined(args.cancel)) {
|
@@ -2136,15 +2123,15 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2136
2123
|
_this.onDragStart(args);
|
2137
2124
|
}
|
2138
2125
|
});
|
2139
|
-
if (
|
2140
|
-
|
2126
|
+
if (this_3.dragCollection.indexOf(this_3.dragobj) === -1) {
|
2127
|
+
this_3.dragCollection.push(this_3.dragobj);
|
2141
2128
|
}
|
2142
2129
|
}
|
2143
2130
|
out_i_1 = i;
|
2144
2131
|
};
|
2145
|
-
var
|
2132
|
+
var this_3 = this, out_i_1;
|
2146
2133
|
for (var i = 0; i < collections.length; i++) {
|
2147
|
-
|
2134
|
+
_loop_5(i);
|
2148
2135
|
i = out_i_1;
|
2149
2136
|
}
|
2150
2137
|
};
|
@@ -2155,7 +2142,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2155
2142
|
};
|
2156
2143
|
DashboardLayout.prototype.updateDragArea = function () {
|
2157
2144
|
this.dragCollection.forEach(function (dragobj) {
|
2158
|
-
// eslint-disable-next-line
|
2159
2145
|
dragobj.setDragArea();
|
2160
2146
|
});
|
2161
2147
|
};
|
@@ -2167,8 +2153,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2167
2153
|
};
|
2168
2154
|
DashboardLayout.prototype.onDraggingStart = function (args) {
|
2169
2155
|
var dragArgs = args;
|
2170
|
-
|
2171
|
-
this.trigger('dragStart', dragArgs, function (dragArgs) {
|
2156
|
+
this.trigger('dragStart', dragArgs, function () {
|
2172
2157
|
if (isNullOrUndefined(args.cancel)) {
|
2173
2158
|
args.cancel = false;
|
2174
2159
|
}
|
@@ -2202,13 +2187,11 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2202
2187
|
removeClass([args.element], [dragging]);
|
2203
2188
|
}
|
2204
2189
|
};
|
2205
|
-
// eslint-disable-next-line
|
2206
2190
|
DashboardLayout.prototype.cloneModels = function (source, target) {
|
2207
2191
|
if (target === undefined) {
|
2208
2192
|
target = [];
|
2209
2193
|
}
|
2210
2194
|
for (var i = 0; i < source.length; i++) {
|
2211
|
-
// tslint:disable-next-line
|
2212
2195
|
if (!target[i]) {
|
2213
2196
|
target[i] = {};
|
2214
2197
|
}
|
@@ -2252,7 +2235,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2252
2235
|
this.mainElement = args.element;
|
2253
2236
|
var model = panelModel;
|
2254
2237
|
this.checkCollision = this.collisions(model.row, model.col, model.sizeX, model.sizeY, args.element);
|
2255
|
-
if (panelModel.col >= this.checkColumnValue) {
|
2238
|
+
if (panelModel.col >= 0 || panelModel.col >= this.checkColumnValue) {
|
2256
2239
|
this.checkCollision = [];
|
2257
2240
|
}
|
2258
2241
|
this.updatePanelLayout(args.element, panelModel);
|
@@ -2368,7 +2351,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2368
2351
|
panel.id = 'layout_' + this.panelID.toString();
|
2369
2352
|
this.panelID = this.panelID + 1;
|
2370
2353
|
}
|
2371
|
-
// eslint-disable-next-line
|
2372
2354
|
var panelProp = new Panel(this, 'panels', panel, true);
|
2373
2355
|
this.panels.push(panelProp);
|
2374
2356
|
this.panelsInitialModel = this.cloneModels(this.panels);
|
@@ -2691,7 +2673,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2691
2673
|
* @returns void
|
2692
2674
|
*/
|
2693
2675
|
DashboardLayout.prototype.destroy = function () {
|
2694
|
-
// eslint-disable-next-line
|
2695
2676
|
EventHandler.remove(window, 'resize', this.refreshListener);
|
2696
2677
|
removeClass([this.element], ['e-dashboardlayout', 'e-lib', 'e-responsive', 'e-control']);
|
2697
2678
|
this.element.removeAttribute('style');
|
@@ -2792,8 +2773,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2792
2773
|
*
|
2793
2774
|
* @private
|
2794
2775
|
*/
|
2795
|
-
|
2796
|
-
DashboardLayout.prototype.onPropertyChanged = function (newProp, oldProp) {
|
2776
|
+
DashboardLayout.prototype.onPropertyChanged = function (newProp) {
|
2797
2777
|
var _this = this;
|
2798
2778
|
if (newProp.panels && newProp.panels.length > 0 && newProp.panels[0] instanceof Panel) {
|
2799
2779
|
this.checkForIDValues(newProp.panels);
|
@@ -2928,7 +2908,6 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2928
2908
|
var key = keys_1[_i];
|
2929
2909
|
if ((typeof getValue(key, this) === 'object' && !isNullOrUndefined(getValue(key, this)))) {
|
2930
2910
|
if (Array.isArray(getValue(key, this)) && key === 'panels') {
|
2931
|
-
// eslint-disable-next-line
|
2932
2911
|
this.mergePanels(dataObj[key], this[key]);
|
2933
2912
|
this[key] = dataObj[key];
|
2934
2913
|
}
|
@@ -2940,16 +2919,16 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2940
2919
|
/* istanbul ignore next */
|
2941
2920
|
DashboardLayout.prototype.mergePanels = function (sortedPanels, panels) {
|
2942
2921
|
var storedColumns = sortedPanels;
|
2943
|
-
var
|
2944
|
-
|
2922
|
+
var _loop_6 = function (i) {
|
2923
|
+
this_4.checkForIDValues(panels);
|
2945
2924
|
var localPanel = panels.filter(function (pan) { return pan.id === storedColumns[i].id; })[0];
|
2946
2925
|
if (!isNullOrUndefined(localPanel)) {
|
2947
2926
|
storedColumns[i] = extend(localPanel, storedColumns[i], {}, true);
|
2948
2927
|
}
|
2949
2928
|
};
|
2950
|
-
var
|
2929
|
+
var this_4 = this;
|
2951
2930
|
for (var i = 0; i < storedColumns.length; i++) {
|
2952
|
-
|
2931
|
+
_loop_6(i);
|
2953
2932
|
}
|
2954
2933
|
};
|
2955
2934
|
/**
|