@syncfusion/ej2-navigations 32.2.6 → 32.2.8
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/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +65 -11
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +65 -11
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +5 -5
- package/src/common/menu-base.d.ts +2 -0
- package/src/common/menu-base.js +50 -3
- package/src/sidebar/sidebar.js +6 -0
- package/src/tab/tab.js +4 -2
- package/src/treeview/treeview-model.d.ts +12 -0
- package/src/treeview/treeview.d.ts +11 -0
- package/src/treeview/treeview.js +6 -7
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 32.2.
|
|
3
|
+
* version : 32.2.8
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-navigations",
|
|
3
|
-
"version": "32.2.
|
|
3
|
+
"version": "32.2.8",
|
|
4
4
|
"description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"es2015": "./dist/es6/ej2-navigations.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~32.2.6",
|
|
12
|
-
"@syncfusion/ej2-buttons": "~32.2.
|
|
12
|
+
"@syncfusion/ej2-buttons": "~32.2.7",
|
|
13
13
|
"@syncfusion/ej2-data": "~32.2.3",
|
|
14
|
-
"@syncfusion/ej2-inputs": "~32.2.
|
|
15
|
-
"@syncfusion/ej2-lists": "~32.2.
|
|
16
|
-
"@syncfusion/ej2-popups": "~32.2.
|
|
14
|
+
"@syncfusion/ej2-inputs": "~32.2.8",
|
|
15
|
+
"@syncfusion/ej2-lists": "~32.2.7",
|
|
16
|
+
"@syncfusion/ej2-popups": "~32.2.8"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
19
19
|
"keywords": [
|
|
@@ -192,6 +192,7 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
|
|
|
192
192
|
protected isOpenCalled: boolean;
|
|
193
193
|
private isAnimationNone;
|
|
194
194
|
private isKBDAction;
|
|
195
|
+
private skipNextArrowDown;
|
|
195
196
|
private touchStartFn;
|
|
196
197
|
private touchMoveFn;
|
|
197
198
|
/**
|
|
@@ -448,6 +449,7 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
|
|
|
448
449
|
private toggleAnimation;
|
|
449
450
|
private triggerOpen;
|
|
450
451
|
private end;
|
|
452
|
+
protected getAppendToElement(): HTMLElement;
|
|
451
453
|
/**
|
|
452
454
|
* Get the properties to be maintained in the persisted state.
|
|
453
455
|
*
|
package/src/common/menu-base.js
CHANGED
|
@@ -158,6 +158,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
158
158
|
_this.isOpenCalled = false;
|
|
159
159
|
_this.isAnimationNone = false;
|
|
160
160
|
_this.isKBDAction = false;
|
|
161
|
+
_this.skipNextArrowDown = false;
|
|
161
162
|
return _this;
|
|
162
163
|
}
|
|
163
164
|
/**
|
|
@@ -265,7 +266,8 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
265
266
|
this.element.parentElement.insertBefore(wrapper, this.element);
|
|
266
267
|
}
|
|
267
268
|
else {
|
|
268
|
-
|
|
269
|
+
var appendToElement = this.getAppendToElement();
|
|
270
|
+
appendToElement.appendChild(wrapper);
|
|
269
271
|
}
|
|
270
272
|
}
|
|
271
273
|
if (this.cssClass) {
|
|
@@ -402,8 +404,38 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
402
404
|
e.action = ESCAPE;
|
|
403
405
|
this.leftEscKeyHandler(e);
|
|
404
406
|
}
|
|
407
|
+
var isDown = e.key ? (e.key === 'ArrowDown') : e.keyCode === 40;
|
|
408
|
+
if (!isDown) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
var hostPopup = closest(this.element, '.e-popup-open');
|
|
412
|
+
if (!hostPopup) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
if (closest(document.activeElement, '#' + this.element.id)) {
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
var active = document.activeElement;
|
|
419
|
+
if (!active) {
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
var expanded = active.getAttribute('aria-expanded') === 'true';
|
|
423
|
+
if (!expanded) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
var ul = this.element;
|
|
427
|
+
var firstItem = select('.e-menu-item', ul);
|
|
428
|
+
if (firstItem) {
|
|
429
|
+
ul.focus();
|
|
430
|
+
firstItem.classList.add('e-focused');
|
|
431
|
+
this.skipNextArrowDown = true;
|
|
432
|
+
}
|
|
405
433
|
};
|
|
406
434
|
MenuBase.prototype.keyBoardHandler = function (e) {
|
|
435
|
+
if (e.action === DOWNARROW && this.skipNextArrowDown) {
|
|
436
|
+
this.skipNextArrowDown = false;
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
407
439
|
var actionName = '';
|
|
408
440
|
var trgt = e.target;
|
|
409
441
|
var actionNeeded = this.isMenu && !this.hamburgerMode && !this.element.classList.contains('e-vertical')
|
|
@@ -503,6 +535,9 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
503
535
|
fliIdx = this.isValidLI(cli, fliIdx, e.action);
|
|
504
536
|
cul.children[fliIdx].classList.add(FOCUSED);
|
|
505
537
|
cul.children[fliIdx].focus();
|
|
538
|
+
if (closest(this.element, '.e-popup')) {
|
|
539
|
+
cul.focus();
|
|
540
|
+
}
|
|
506
541
|
};
|
|
507
542
|
MenuBase.prototype.isValidLI = function (cli, index, action) {
|
|
508
543
|
var cul = this.getUlByNavIdx();
|
|
@@ -546,7 +581,8 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
546
581
|
return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
|
|
547
582
|
}
|
|
548
583
|
else {
|
|
549
|
-
|
|
584
|
+
var appendToElement = this.getAppendToElement();
|
|
585
|
+
if (!appendToElement.contains(this.element) && navIdxLen === 0) {
|
|
550
586
|
return null;
|
|
551
587
|
}
|
|
552
588
|
return this.getWrapper().children[navIdxLen];
|
|
@@ -902,7 +938,8 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
902
938
|
li.appendChild(this.popupWrapper);
|
|
903
939
|
}
|
|
904
940
|
else {
|
|
905
|
-
|
|
941
|
+
var appendToElement = this.getAppendToElement();
|
|
942
|
+
appendToElement.appendChild(this.popupWrapper);
|
|
906
943
|
}
|
|
907
944
|
this.isNestedOrVertical = this.element.classList.contains('e-vertical') || this.navIdx.length !== 1;
|
|
908
945
|
this.popupObj = this.generatePopup(this.popupWrapper, this.uList, li, this.isNestedOrVertical);
|
|
@@ -2203,6 +2240,16 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
2203
2240
|
}
|
|
2204
2241
|
}
|
|
2205
2242
|
};
|
|
2243
|
+
MenuBase.prototype.getAppendToElement = function () {
|
|
2244
|
+
if (this.isAngular) {
|
|
2245
|
+
var cdkPane = this.element.closest('.cdk-overlay-pane');
|
|
2246
|
+
var popoverEl = this.element.closest('[popover]');
|
|
2247
|
+
if (cdkPane && popoverEl) {
|
|
2248
|
+
return cdkPane;
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
return document.body;
|
|
2252
|
+
};
|
|
2206
2253
|
/**
|
|
2207
2254
|
* Get the properties to be maintained in the persisted state.
|
|
2208
2255
|
*
|
package/src/sidebar/sidebar.js
CHANGED
|
@@ -563,6 +563,12 @@ var Sidebar = /** @class */ (function (_super) {
|
|
|
563
563
|
if (!this.getState()) {
|
|
564
564
|
this.setDock();
|
|
565
565
|
}
|
|
566
|
+
if (!this.enableDock) {
|
|
567
|
+
removeClass([this.element], DOCKER);
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
addClass([this.element], DOCKER);
|
|
571
|
+
}
|
|
566
572
|
break;
|
|
567
573
|
case 'zIndex':
|
|
568
574
|
this.setZindex();
|
package/src/tab/tab.js
CHANGED
|
@@ -1046,9 +1046,11 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
else if (this.heightAdjustMode === 'Fill') {
|
|
1048
1048
|
addClass([this.element], [CLS_FILL]);
|
|
1049
|
-
|
|
1049
|
+
var parent_1 = this.element.parentElement;
|
|
1050
|
+
var heightVal = parent_1.style.height || parent_1.getAttribute('height');
|
|
1051
|
+
setStyle(this.element, { 'height': heightVal != null ? heightVal : '100%' });
|
|
1050
1052
|
this.loadContentElement();
|
|
1051
|
-
this.cntEle.style.height = 'calc(
|
|
1053
|
+
this.cntEle.style.height = heightVal != null ? "calc(" + heightVal + " - " + this.hdrEle.offsetHeight + "px)" : 'calc(100vh - ' + this.hdrEle.offsetHeight + 'px)';
|
|
1052
1054
|
}
|
|
1053
1055
|
else if (this.heightAdjustMode === 'Auto') {
|
|
1054
1056
|
if (this.isTemplate === true) {
|
|
@@ -307,11 +307,23 @@ export interface TreeViewModel extends ComponentModel{
|
|
|
307
307
|
* });
|
|
308
308
|
* treeObj.appendTo('#tree');
|
|
309
309
|
* ```
|
|
310
|
+
* **Note:** To correctly remove untrusted HTML values, `disableHtmlEncode` must also be set to true. When `enableHtmlSanitizer` is set to false, `disableHtmlEncode` must also be set to false.
|
|
310
311
|
*
|
|
311
312
|
* @default true
|
|
312
313
|
*/
|
|
313
314
|
enableHtmlSanitizer?: boolean;
|
|
314
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Enables rendering of raw text content in the Treeview component without HTML encoding.
|
|
318
|
+
* When set to true, the text will be displayed exactly as provided (including HTML tags or special characters),
|
|
319
|
+
* instead of being encoded or truncated (e.g., `hiiih<hihi` will be shown as-is).
|
|
320
|
+
*
|
|
321
|
+
* **Note:** To preserve and render raw HTML content correctly, `enableHtmlSanitizer` must also be set to false.
|
|
322
|
+
*
|
|
323
|
+
* @default true
|
|
324
|
+
*/
|
|
325
|
+
disableHtmlEncode?: boolean;
|
|
326
|
+
|
|
315
327
|
/**
|
|
316
328
|
* Enables or disables persisting TreeView state between page reloads. If enabled, following APIs will persist.
|
|
317
329
|
* 1. `selectedNodes` - Represents the nodes that are selected in the TreeView component.
|
|
@@ -693,10 +693,21 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
693
693
|
* });
|
|
694
694
|
* treeObj.appendTo('#tree');
|
|
695
695
|
* ```
|
|
696
|
+
* **Note:** To correctly remove untrusted HTML values, `disableHtmlEncode` must also be set to true. When `enableHtmlSanitizer` is set to false, `disableHtmlEncode` must also be set to false.
|
|
696
697
|
*
|
|
697
698
|
* @default true
|
|
698
699
|
*/
|
|
699
700
|
enableHtmlSanitizer: boolean;
|
|
701
|
+
/**
|
|
702
|
+
* Enables rendering of raw text content in the Treeview component without HTML encoding.
|
|
703
|
+
* When set to true, the text will be displayed exactly as provided (including HTML tags or special characters),
|
|
704
|
+
* instead of being encoded or truncated (e.g., `hiiih<hihi` will be shown as-is).
|
|
705
|
+
*
|
|
706
|
+
* **Note:** To preserve and render raw HTML content correctly, `enableHtmlSanitizer` must also be set to false.
|
|
707
|
+
*
|
|
708
|
+
* @default true
|
|
709
|
+
*/
|
|
710
|
+
disableHtmlEncode: boolean;
|
|
700
711
|
/**
|
|
701
712
|
* Enables or disables persisting TreeView state between page reloads. If enabled, following APIs will persist.
|
|
702
713
|
* 1. `selectedNodes` - Represents the nodes that are selected in the TreeView component.
|
package/src/treeview/treeview.js
CHANGED
|
@@ -17,7 +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
|
-
import { Component, isUndefined, Browser, compile, isNullOrUndefined,
|
|
20
|
+
import { Component, isUndefined, Browser, compile, isNullOrUndefined, animationMode } from '@syncfusion/ej2-base';
|
|
21
21
|
import { Property, NotifyPropertyChanges, ChildProperty, Complex } from '@syncfusion/ej2-base';
|
|
22
22
|
import { Event, EventHandler, KeyboardEvents } from '@syncfusion/ej2-base';
|
|
23
23
|
import { rippleEffect, Animation, remove } from '@syncfusion/ej2-base';
|
|
@@ -285,6 +285,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
285
285
|
_this.beforeNodeCreate(e);
|
|
286
286
|
},
|
|
287
287
|
enableHtmlSanitizer: this.enableHtmlSanitizer,
|
|
288
|
+
disableHtmlEncode: this.disableHtmlEncode,
|
|
288
289
|
itemNavigable: this.fullRowNavigable
|
|
289
290
|
};
|
|
290
291
|
this.updateListProp(this.fields);
|
|
@@ -3375,12 +3376,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3375
3376
|
this.renderReactTemplates();
|
|
3376
3377
|
}
|
|
3377
3378
|
else {
|
|
3378
|
-
|
|
3379
|
-
txtEle.innerText = SanitizeHtmlHelper.sanitize(newText);
|
|
3380
|
-
}
|
|
3381
|
-
else {
|
|
3382
|
-
txtEle.innerHTML = newText;
|
|
3383
|
-
}
|
|
3379
|
+
txtEle[ListBase.getDomSetter(this.listBaseOption)] = ListBase.getSanitizedText(newText, this.listBaseOption);
|
|
3384
3380
|
}
|
|
3385
3381
|
if (isInput) {
|
|
3386
3382
|
removeClass([liEle], EDITING);
|
|
@@ -5824,6 +5820,9 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5824
5820
|
__decorate([
|
|
5825
5821
|
Property(true)
|
|
5826
5822
|
], TreeView.prototype, "enableHtmlSanitizer", void 0);
|
|
5823
|
+
__decorate([
|
|
5824
|
+
Property(true)
|
|
5825
|
+
], TreeView.prototype, "disableHtmlEncode", void 0);
|
|
5827
5826
|
__decorate([
|
|
5828
5827
|
Property(false)
|
|
5829
5828
|
], TreeView.prototype, "enablePersistence", void 0);
|