@syncfusion/ej2-navigations 20.3.58 → 20.4.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 +16 -1
- package/CHANGELOG.md +25 -2
- 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 +271 -216
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +269 -213
- 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 +11 -11
- package/src/accordion/accordion.js +20 -19
- package/src/appbar/appbar-model.d.ts +15 -15
- package/src/appbar/appbar.d.ts +15 -15
- package/src/appbar/appbar.js +3 -3
- package/src/breadcrumb/breadcrumb-model.d.ts +1 -1
- package/src/breadcrumb/breadcrumb.js +10 -5
- package/src/carousel/carousel.js +10 -10
- package/src/common/menu-base.js +9 -5
- package/src/menu/menu.js +2 -2
- package/src/sidebar/sidebar.d.ts +1 -0
- package/src/sidebar/sidebar.js +6 -2
- package/src/tab/tab-model.d.ts +9 -0
- package/src/tab/tab.d.ts +9 -0
- package/src/tab/tab.js +28 -18
- package/src/toolbar/toolbar-model.d.ts +9 -0
- package/src/toolbar/toolbar.d.ts +11 -0
- package/src/toolbar/toolbar.js +132 -123
- package/src/treeview/treeview-model.d.ts +133 -45
- package/src/treeview/treeview.d.ts +135 -48
- package/src/treeview/treeview.js +49 -25
- package/styles/accordion/_bootstrap-dark-definition.scss +100 -0
- package/styles/accordion/_bootstrap-definition.scss +100 -0
- package/styles/accordion/_bootstrap4-definition.scss +95 -1
- package/styles/accordion/_bootstrap5-definition.scss +99 -3
- package/styles/accordion/_fabric-dark-definition.scss +100 -0
- package/styles/accordion/_fabric-definition.scss +100 -0
- package/styles/accordion/_fluent-definition.scss +98 -2
- package/styles/accordion/_fusionnew-definition.scss +99 -3
- package/styles/accordion/_highcontrast-definition.scss +98 -3
- package/styles/accordion/_highcontrast-light-definition.scss +98 -3
- package/styles/accordion/_layout.scss +25 -91
- package/styles/accordion/_material-dark-definition.scss +100 -0
- package/styles/accordion/_material-definition.scss +100 -0
- package/styles/accordion/_material3-definition.scss +99 -3
- package/styles/accordion/_tailwind-definition.scss +99 -2
- package/styles/accordion/_theme.scss +184 -345
- package/styles/accordion/bootstrap-dark.css +202 -16
- package/styles/accordion/bootstrap.css +202 -16
- package/styles/accordion/bootstrap4.css +171 -17
- package/styles/accordion/bootstrap5-dark.css +202 -13
- package/styles/accordion/bootstrap5.css +202 -13
- package/styles/accordion/fabric-dark.css +209 -11
- package/styles/accordion/fabric.css +209 -11
- package/styles/accordion/fluent-dark.css +217 -5
- package/styles/accordion/fluent.css +217 -5
- package/styles/accordion/highcontrast-light.css +186 -52
- package/styles/accordion/highcontrast.css +186 -52
- package/styles/accordion/material-dark.css +210 -16
- package/styles/accordion/material.css +209 -15
- package/styles/accordion/tailwind-dark.css +199 -8
- package/styles/accordion/tailwind.css +199 -8
- package/styles/bootstrap-dark.css +999 -145
- package/styles/bootstrap.css +986 -132
- package/styles/bootstrap4.css +888 -167
- package/styles/bootstrap5-dark.css +949 -179
- package/styles/bootstrap5.css +949 -179
- package/styles/context-menu/_layout.scss +0 -3
- package/styles/context-menu/bootstrap5-dark.css +0 -1
- package/styles/context-menu/bootstrap5.css +0 -1
- package/styles/context-menu/fluent-dark.css +0 -1
- package/styles/context-menu/fluent.css +0 -1
- package/styles/context-menu/tailwind-dark.css +0 -1
- package/styles/context-menu/tailwind.css +0 -1
- package/styles/fabric-dark.css +1068 -232
- package/styles/fabric.css +1067 -231
- package/styles/fluent-dark.css +1014 -123
- package/styles/fluent.css +1012 -121
- package/styles/h-scroll/_bootstrap-dark-definition.scss +8 -0
- package/styles/h-scroll/_bootstrap-definition.scss +8 -0
- package/styles/h-scroll/_bootstrap4-definition.scss +8 -0
- package/styles/h-scroll/_bootstrap5-definition.scss +8 -0
- package/styles/h-scroll/_fabric-dark-definition.scss +8 -0
- package/styles/h-scroll/_fabric-definition.scss +8 -0
- package/styles/h-scroll/_fluent-definition.scss +8 -0
- package/styles/h-scroll/_fusionnew-definition.scss +8 -0
- package/styles/h-scroll/_highcontrast-definition.scss +6 -1
- package/styles/h-scroll/_highcontrast-light-definition.scss +6 -1
- package/styles/h-scroll/_layout.scss +1 -4
- package/styles/h-scroll/_material-dark-definition.scss +8 -0
- package/styles/h-scroll/_material-definition.scss +8 -0
- package/styles/h-scroll/_material3-definition.scss +8 -0
- package/styles/h-scroll/_tailwind-definition.scss +8 -0
- package/styles/h-scroll/_theme.scss +12 -40
- package/styles/h-scroll/bootstrap-dark.css +13 -0
- package/styles/h-scroll/bootstrap.css +13 -0
- package/styles/h-scroll/bootstrap4.css +7 -0
- package/styles/h-scroll/bootstrap5-dark.css +12 -0
- package/styles/h-scroll/bootstrap5.css +12 -0
- package/styles/h-scroll/fabric-dark.css +15 -2
- package/styles/h-scroll/fabric.css +15 -2
- package/styles/h-scroll/fluent-dark.css +13 -0
- package/styles/h-scroll/fluent.css +13 -0
- package/styles/h-scroll/highcontrast-light.css +8 -7
- package/styles/h-scroll/highcontrast.css +10 -9
- package/styles/h-scroll/icons/_fabric-dark.scss +2 -2
- package/styles/h-scroll/icons/_fabric.scss +2 -2
- package/styles/h-scroll/icons/_highcontrast.scss +2 -2
- package/styles/h-scroll/material-dark.css +13 -2
- package/styles/h-scroll/material.css +13 -2
- package/styles/h-scroll/tailwind-dark.css +12 -0
- package/styles/h-scroll/tailwind.css +12 -0
- package/styles/highcontrast-light.css +918 -369
- package/styles/highcontrast.css +925 -370
- package/styles/material-dark.css +1184 -114
- package/styles/material.css +1162 -92
- package/styles/menu/_theme.scss +1 -1
- package/styles/menu/fluent-dark.css +1 -1
- package/styles/menu/fluent.css +1 -1
- package/styles/tab/_bootstrap-dark-definition.scss +271 -15
- package/styles/tab/_bootstrap-definition.scss +266 -9
- package/styles/tab/_bootstrap4-definition.scss +266 -9
- package/styles/tab/_bootstrap5-definition.scss +270 -13
- package/styles/tab/_fabric-dark-definition.scss +270 -13
- package/styles/tab/_fabric-definition.scss +270 -13
- package/styles/tab/_fluent-definition.scss +269 -12
- package/styles/tab/_fusionnew-definition.scss +268 -11
- package/styles/tab/_highcontrast-definition.scss +271 -14
- package/styles/tab/_highcontrast-light-definition.scss +271 -14
- package/styles/tab/_layout.scss +295 -988
- package/styles/tab/_material-dark-definition.scss +266 -9
- package/styles/tab/_material-definition.scss +266 -9
- package/styles/tab/_material3-definition.scss +268 -11
- package/styles/tab/_tailwind-definition.scss +267 -10
- package/styles/tab/_theme.scss +305 -843
- package/styles/tab/bootstrap-dark.css +587 -109
- package/styles/tab/bootstrap.css +574 -96
- package/styles/tab/bootstrap4.css +546 -114
- package/styles/tab/bootstrap5-dark.css +523 -134
- package/styles/tab/bootstrap5.css +523 -134
- package/styles/tab/fabric-dark.css +614 -199
- package/styles/tab/fabric.css +612 -197
- package/styles/tab/fluent-dark.css +546 -102
- package/styles/tab/fluent.css +546 -102
- package/styles/tab/highcontrast-light.css +520 -250
- package/styles/tab/highcontrast.css +520 -244
- package/styles/tab/icons/_bootstrap-dark.scss +0 -33
- package/styles/tab/icons/_bootstrap.scss +0 -33
- package/styles/tab/icons/_bootstrap4.scss +0 -26
- package/styles/tab/icons/_bootstrap5.scss +0 -37
- package/styles/tab/icons/_fabric-dark.scss +0 -33
- package/styles/tab/icons/_fabric.scss +0 -33
- package/styles/tab/icons/_fluent.scss +0 -33
- package/styles/tab/icons/_fusionnew.scss +0 -37
- package/styles/tab/icons/_highcontrast-light.scss +0 -37
- package/styles/tab/icons/_highcontrast.scss +0 -26
- package/styles/tab/icons/_material-dark.scss +0 -37
- package/styles/tab/icons/_material.scss +0 -37
- package/styles/tab/icons/_material3.scss +0 -37
- package/styles/tab/icons/_tailwind.scss +0 -37
- package/styles/tab/material-dark.css +705 -54
- package/styles/tab/material.css +705 -54
- package/styles/tab/tailwind-dark.css +706 -71
- package/styles/tab/tailwind.css +706 -71
- package/styles/tailwind-dark.css +1145 -99
- package/styles/tailwind.css +1144 -98
- package/styles/toolbar/_bootstrap-dark-definition.scss +93 -0
- package/styles/toolbar/_bootstrap-definition.scss +93 -0
- package/styles/toolbar/_bootstrap4-definition.scss +94 -1
- package/styles/toolbar/_bootstrap5-definition.scss +94 -8
- package/styles/toolbar/_fabric-dark-definition.scss +92 -3
- package/styles/toolbar/_fabric-definition.scss +92 -3
- package/styles/toolbar/_fluent-definition.scss +96 -8
- package/styles/toolbar/_fusionnew-definition.scss +94 -8
- package/styles/toolbar/_highcontrast-definition.scss +93 -4
- package/styles/toolbar/_highcontrast-light-definition.scss +93 -4
- package/styles/toolbar/_layout.scss +48 -177
- package/styles/toolbar/_material-dark-definition.scss +93 -0
- package/styles/toolbar/_material-definition.scss +93 -0
- package/styles/toolbar/_material3-definition.scss +94 -8
- package/styles/toolbar/_tailwind-definition.scss +94 -6
- package/styles/toolbar/_theme.scss +169 -278
- package/styles/toolbar/bootstrap-dark.css +196 -19
- package/styles/toolbar/bootstrap.css +196 -19
- package/styles/toolbar/bootstrap4.css +164 -36
- package/styles/toolbar/bootstrap5-dark.css +210 -29
- package/styles/toolbar/bootstrap5.css +210 -29
- package/styles/toolbar/fabric-dark.css +219 -9
- package/styles/toolbar/fabric.css +220 -10
- package/styles/toolbar/fluent-dark.css +233 -10
- package/styles/toolbar/fluent.css +233 -10
- package/styles/toolbar/highcontrast-light.css +199 -43
- package/styles/toolbar/highcontrast.css +200 -44
- package/styles/toolbar/material-dark.css +233 -19
- package/styles/toolbar/material.css +233 -19
- package/styles/toolbar/tailwind-dark.css +224 -15
- package/styles/toolbar/tailwind.css +223 -14
- package/styles/treeview/_material-definition.scss +1 -1
- package/styles/treeview/_theme.scss +11 -1
- package/styles/treeview/fluent-dark.css +2 -2
- package/styles/treeview/material.css +2 -2
- package/styles/treeview/tailwind.css +2 -2
- package/styles/v-scroll/_highcontrast-definition.scss +0 -1
- package/styles/v-scroll/_highcontrast-light-definition.scss +0 -1
- package/styles/v-scroll/_theme.scss +0 -26
- package/styles/v-scroll/bootstrap5-dark.css +2 -2
- package/styles/v-scroll/bootstrap5.css +2 -2
- package/styles/v-scroll/fabric-dark.css +2 -2
- package/styles/v-scroll/fabric.css +2 -2
- package/styles/v-scroll/fluent-dark.css +2 -2
- package/styles/v-scroll/fluent.css +2 -2
- package/styles/v-scroll/highcontrast-light.css +2 -14
- package/styles/v-scroll/highcontrast.css +2 -14
- package/styles/v-scroll/icons/_bootstrap5.scss +2 -2
- package/styles/v-scroll/icons/_fabric-dark.scss +2 -2
- package/styles/v-scroll/icons/_fabric.scss +2 -2
- package/styles/v-scroll/icons/_fluent.scss +2 -2
- package/styles/v-scroll/icons/_fusionnew.scss +2 -2
- package/styles/v-scroll/icons/_highcontrast-light.scss +2 -2
- package/styles/v-scroll/icons/_highcontrast.scss +2 -2
- package/styles/v-scroll/icons/_material3.scss +2 -2
- package/styles/v-scroll/icons/_tailwind.scss +2 -2
- package/styles/v-scroll/tailwind-dark.css +2 -2
- package/styles/v-scroll/tailwind.css +2 -2
|
@@ -373,6 +373,11 @@ export declare class FieldsSettings extends ChildProperty<FieldsSettings> {
|
|
|
373
373
|
* @default null
|
|
374
374
|
*/
|
|
375
375
|
query: Query;
|
|
376
|
+
/**
|
|
377
|
+
* Specifies whether the node can be selected by users or not
|
|
378
|
+
* When set to false, the user interaction is prevented for the corresponding node.
|
|
379
|
+
*/
|
|
380
|
+
selectable: string;
|
|
376
381
|
/**
|
|
377
382
|
* Specifies the mapping field for selected state of the TreeView node.
|
|
378
383
|
*/
|
|
@@ -446,11 +451,11 @@ export declare class NodeAnimationSettings extends ChildProperty<NodeAnimationSe
|
|
|
446
451
|
* The TreeView component is used to represent hierarchical data in a tree like structure with advanced
|
|
447
452
|
* functions to perform edit, drag and drop, selection with check-box, and more.
|
|
448
453
|
* ```html
|
|
449
|
-
*
|
|
454
|
+
* <div id="tree"></div>
|
|
450
455
|
* ```
|
|
451
456
|
* ```typescript
|
|
452
|
-
*
|
|
453
|
-
*
|
|
457
|
+
* let treeObj: TreeView = new TreeView();
|
|
458
|
+
* treeObj.appendTo('#tree');
|
|
454
459
|
* ```
|
|
455
460
|
*/
|
|
456
461
|
export declare class TreeView extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
@@ -565,18 +570,45 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
565
570
|
*/
|
|
566
571
|
animation: NodeAnimationSettingsModel;
|
|
567
572
|
/**
|
|
568
|
-
* The `checkedNodes` property is used to set the nodes that need to be checked
|
|
569
|
-
*
|
|
573
|
+
* The `checkedNodes` property is used to set the nodes that need to be checked.
|
|
574
|
+
* This property returns the checked nodes ID in the TreeView component.
|
|
570
575
|
* The `checkedNodes` property depends upon the value of `showCheckBox` property.
|
|
571
576
|
* For more information on checkedNodes, refer to
|
|
572
577
|
* [checkedNodes](../../treeview/check-box#checked-nodes).
|
|
573
|
-
*
|
|
578
|
+
* ```html
|
|
579
|
+
* <div id="tree"></div>
|
|
580
|
+
* ```
|
|
581
|
+
* ```typescript
|
|
582
|
+
* let treeObj: TreeView = new TreeView({
|
|
583
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
584
|
+
* showCheckBox: true,
|
|
585
|
+
* checkedNodes: ['01-01','02']
|
|
586
|
+
* });
|
|
587
|
+
* treeObj.appendTo('#tree');
|
|
588
|
+
* ```
|
|
574
589
|
* @default []
|
|
575
590
|
*/
|
|
576
591
|
checkedNodes: string[];
|
|
577
592
|
/**
|
|
578
|
-
* Specifies
|
|
579
|
-
*
|
|
593
|
+
* Specifies one or more than one CSS classes to be added with root element of the TreeView to help customize the appearance of the component.
|
|
594
|
+
* ```html
|
|
595
|
+
* <div id="tree"></div>
|
|
596
|
+
* ```
|
|
597
|
+
* ```typescript
|
|
598
|
+
* let treeObj: TreeView = new TreeView({
|
|
599
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
600
|
+
* cssClass: 'e-custom e-tree'
|
|
601
|
+
* });
|
|
602
|
+
* treeObj.appendTo('#tree');
|
|
603
|
+
* ```
|
|
604
|
+
* ```css
|
|
605
|
+
* .e-custom .e-tree {
|
|
606
|
+
* max-width: 600px;
|
|
607
|
+
* }
|
|
608
|
+
* .e-custom .e-list-item {
|
|
609
|
+
* padding: 10px 0;
|
|
610
|
+
* }
|
|
611
|
+
* ```
|
|
580
612
|
* @default ''
|
|
581
613
|
*/
|
|
582
614
|
cssClass: string;
|
|
@@ -588,15 +620,40 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
588
620
|
*/
|
|
589
621
|
disabled: boolean;
|
|
590
622
|
/**
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
623
|
+
* Specifies the target in which the draggable element can be moved and dropped.
|
|
624
|
+
* By default, the draggable element movement occurs in the page.
|
|
625
|
+
* ```html
|
|
626
|
+
* <div id="tree"></div>
|
|
627
|
+
* ```
|
|
628
|
+
* ```typescript
|
|
629
|
+
* let treeObj: TreeView = new TreeView({
|
|
630
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
631
|
+
* dragArea: '.control_wrapper'
|
|
632
|
+
* });
|
|
633
|
+
* treeObj.appendTo('#tree');
|
|
634
|
+
* ```
|
|
635
|
+
* ```css
|
|
636
|
+
* .control_wrapper {
|
|
637
|
+
* width: 500px;
|
|
638
|
+
* margin-left: 100px;
|
|
639
|
+
* }
|
|
640
|
+
* ```
|
|
594
641
|
* @default null
|
|
595
642
|
*/
|
|
596
643
|
dragArea: HTMLElement | string;
|
|
597
644
|
/**
|
|
598
|
-
*
|
|
599
|
-
*
|
|
645
|
+
* Specifies whether to allow rendering of untrusted HTML values in the TreeView component.
|
|
646
|
+
* While enable this property, it sanitize suspected untrusted strings and script, and update in the TreeView component.
|
|
647
|
+
* ```html
|
|
648
|
+
* <div id="tree"></div>
|
|
649
|
+
* ```
|
|
650
|
+
* ```typescript
|
|
651
|
+
* let treeObj: TreeView = new TreeView({
|
|
652
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
653
|
+
* enableHtmlSanitizer: true
|
|
654
|
+
* });
|
|
655
|
+
* treeObj.appendTo('#tree');
|
|
656
|
+
* ```
|
|
600
657
|
* @default false
|
|
601
658
|
*/
|
|
602
659
|
enableHtmlSanitizer: boolean;
|
|
@@ -612,19 +669,39 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
612
669
|
/**
|
|
613
670
|
* Represents the expanded nodes in the TreeView component. We can set the nodes that need to be
|
|
614
671
|
* expanded or get the ID of the nodes that are currently expanded by using this property.
|
|
615
|
-
*
|
|
672
|
+
* ```html
|
|
673
|
+
* <div id='tree'></div>
|
|
674
|
+
* ```
|
|
675
|
+
* ```typescript
|
|
676
|
+
* <script>
|
|
677
|
+
* var treeObj = new TreeView({
|
|
678
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
679
|
+
* expandedNodes: ['01','01-01','02']
|
|
680
|
+
* });
|
|
681
|
+
* treeObj.appendTo('#tree');
|
|
682
|
+
* </script>
|
|
683
|
+
* ```
|
|
616
684
|
* @default []
|
|
617
685
|
*/
|
|
618
686
|
expandedNodes: string[];
|
|
619
687
|
/**
|
|
620
|
-
* Specifies the action on which the node expands or collapses.
|
|
621
|
-
*
|
|
622
|
-
* happens
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*
|
|
688
|
+
* Specifies the action on which the node expands or collapses.
|
|
689
|
+
* The available actions :
|
|
690
|
+
* `Click` - The expand/collapse operation happens when you single-click on the node in desktop.
|
|
691
|
+
* `DblClick` - The expand/collapse operation happens when you double-click on the node in desktop.
|
|
692
|
+
* `None` - The expand/collapse operation will not happen.
|
|
693
|
+
* In mobile devices, the node expand/collapse action happens on single tap.
|
|
694
|
+
* Here ExpandOn attribute is set to single click property also can use double click and none property.
|
|
695
|
+
* ```html
|
|
696
|
+
* <div id="tree"></div>
|
|
697
|
+
* ```
|
|
698
|
+
* ```typescript
|
|
699
|
+
* let treeObj: TreeView = new TreeView({
|
|
700
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
701
|
+
* expandOn: 'Click'
|
|
702
|
+
* });
|
|
703
|
+
* treeObj.appendTo('#tree');
|
|
704
|
+
* ```
|
|
628
705
|
* @default 'Auto'
|
|
629
706
|
*/
|
|
630
707
|
expandOn: ExpandOnSettings;
|
|
@@ -675,7 +752,17 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
675
752
|
* it we can select only a single node.
|
|
676
753
|
* For more information on selectedNodes, refer to
|
|
677
754
|
* [selectedNodes](../../treeview/multiple-selection#selected-nodes).
|
|
678
|
-
*
|
|
755
|
+
* ```html
|
|
756
|
+
* <div id="tree"></div>
|
|
757
|
+
* ```
|
|
758
|
+
* ```typescript
|
|
759
|
+
* let treeObj: TreeView = new TreeView({
|
|
760
|
+
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
761
|
+
* allowMultiSelection: true,
|
|
762
|
+
* selectedNodes: ['01','02']
|
|
763
|
+
* });
|
|
764
|
+
* treeObj.appendTo('#tree');
|
|
765
|
+
* ```
|
|
679
766
|
* @default []
|
|
680
767
|
*/
|
|
681
768
|
selectedNodes: string[];
|
|
@@ -710,135 +797,135 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
710
797
|
*/
|
|
711
798
|
fullRowNavigable: boolean;
|
|
712
799
|
/**
|
|
713
|
-
*
|
|
800
|
+
* Event callback that is raised while any TreeView action failed to fetch the desired results.
|
|
714
801
|
*
|
|
715
802
|
* @event
|
|
716
803
|
*/
|
|
717
804
|
actionFailure: EmitType<FailureEventArgs>;
|
|
718
805
|
/**
|
|
719
|
-
*
|
|
806
|
+
* Event callback that is raised when the TreeView component is created successfully.
|
|
720
807
|
*
|
|
721
808
|
* @event
|
|
722
809
|
*/
|
|
723
810
|
created: EmitType<Object>;
|
|
724
811
|
/**
|
|
725
|
-
*
|
|
812
|
+
* Event callback that is raised when data source is populated in the TreeView.
|
|
726
813
|
*
|
|
727
814
|
* @event
|
|
728
815
|
*/
|
|
729
816
|
dataBound: EmitType<DataBoundEventArgs>;
|
|
730
817
|
/**
|
|
731
|
-
*
|
|
818
|
+
* Event callback that is raised when data source is changed in the TreeView. The data source will be changed after performing some operation like
|
|
732
819
|
* drag and drop, node editing, adding and removing node.
|
|
733
820
|
*
|
|
734
821
|
* @event
|
|
735
822
|
*/
|
|
736
823
|
dataSourceChanged: EmitType<DataSourceChangedEventArgs>;
|
|
737
824
|
/**
|
|
738
|
-
*
|
|
825
|
+
* Event callback that is raised before the TreeView node is appended to the TreeView element. It helps to customize specific nodes.
|
|
739
826
|
*
|
|
740
827
|
* @event
|
|
741
828
|
*/
|
|
742
829
|
drawNode: EmitType<DrawNodeEventArgs>;
|
|
743
830
|
/**
|
|
744
|
-
*
|
|
831
|
+
* Event callback that is raised when the TreeView control is destroyed successfully.
|
|
745
832
|
*
|
|
746
833
|
* @event
|
|
747
834
|
*/
|
|
748
835
|
destroyed: EmitType<Object>;
|
|
749
836
|
/**
|
|
750
|
-
*
|
|
837
|
+
* Event callback that is raised when key press is successful. It helps to customize the operations at key press.
|
|
751
838
|
*
|
|
752
839
|
* @event
|
|
753
840
|
*/
|
|
754
841
|
keyPress: EmitType<NodeKeyPressEventArgs>;
|
|
755
842
|
/**
|
|
756
|
-
*
|
|
843
|
+
* Event callback that is raised when the TreeView node is checked/unchecked successfully.
|
|
757
844
|
*
|
|
758
845
|
* @event
|
|
759
846
|
*/
|
|
760
847
|
nodeChecked: EmitType<NodeCheckEventArgs>;
|
|
761
848
|
/**
|
|
762
|
-
*
|
|
849
|
+
* Event callback that is raised before the TreeView node is to be checked/unchecked.
|
|
763
850
|
*
|
|
764
851
|
* @event
|
|
765
852
|
*/
|
|
766
853
|
nodeChecking: EmitType<NodeCheckEventArgs>;
|
|
767
854
|
/**
|
|
768
|
-
*
|
|
855
|
+
* Event callback that is raised when the TreeView node is clicked successfully.
|
|
769
856
|
*
|
|
770
857
|
* @event
|
|
771
858
|
*/
|
|
772
859
|
nodeClicked: EmitType<NodeClickEventArgs>;
|
|
773
860
|
/**
|
|
774
|
-
*
|
|
861
|
+
* Event callback that is raised when the TreeView node collapses successfully.
|
|
775
862
|
*
|
|
776
863
|
* @event
|
|
777
864
|
*/
|
|
778
865
|
nodeCollapsed: EmitType<NodeExpandEventArgs>;
|
|
779
866
|
/**
|
|
780
|
-
*
|
|
867
|
+
* Event callback that is raised before the TreeView node collapses.
|
|
781
868
|
*
|
|
782
869
|
* @event
|
|
783
870
|
*/
|
|
784
871
|
nodeCollapsing: EmitType<NodeExpandEventArgs>;
|
|
785
872
|
/**
|
|
786
|
-
*
|
|
873
|
+
* Event callback that is raised when the TreeView node is dragged (moved) continuously.
|
|
787
874
|
*
|
|
788
875
|
|
|
789
876
|
* @event
|
|
790
877
|
*/
|
|
791
878
|
nodeDragging: EmitType<DragAndDropEventArgs>;
|
|
792
879
|
/**
|
|
793
|
-
*
|
|
880
|
+
* Event callback that is raised when the TreeView node drag (move) starts.
|
|
794
881
|
*
|
|
795
882
|
* @event
|
|
796
883
|
*/
|
|
797
884
|
nodeDragStart: EmitType<DragAndDropEventArgs>;
|
|
798
885
|
/**
|
|
799
|
-
*
|
|
886
|
+
* Event callback that is raised when the TreeView node drag (move) is stopped.
|
|
800
887
|
*
|
|
801
888
|
* @event
|
|
802
889
|
*/
|
|
803
890
|
nodeDragStop: EmitType<DragAndDropEventArgs>;
|
|
804
891
|
/**
|
|
805
|
-
*
|
|
892
|
+
* Event callback that is raised when the TreeView node is dropped on target element successfully.
|
|
806
893
|
*
|
|
807
894
|
* @event
|
|
808
895
|
*/
|
|
809
896
|
nodeDropped: EmitType<DragAndDropEventArgs>;
|
|
810
897
|
/**
|
|
811
|
-
*
|
|
898
|
+
* Event callback that is raised when the TreeView node is renamed successfully.
|
|
812
899
|
*
|
|
813
900
|
* @event
|
|
814
901
|
*/
|
|
815
902
|
nodeEdited: EmitType<NodeEditEventArgs>;
|
|
816
903
|
/**
|
|
817
|
-
*
|
|
904
|
+
* Event callback that is raised before the TreeView node is renamed.
|
|
818
905
|
*
|
|
819
906
|
* @event
|
|
820
907
|
*/
|
|
821
908
|
nodeEditing: EmitType<NodeEditEventArgs>;
|
|
822
909
|
/**
|
|
823
|
-
*
|
|
910
|
+
* Event callback that is raised when the TreeView node expands successfully.
|
|
824
911
|
*
|
|
825
912
|
* @event
|
|
826
913
|
*/
|
|
827
914
|
nodeExpanded: EmitType<NodeExpandEventArgs>;
|
|
828
915
|
/**
|
|
829
|
-
*
|
|
916
|
+
* Event callback that is raised before the TreeView node is to be expanded.
|
|
830
917
|
*
|
|
831
918
|
* @event
|
|
832
919
|
*/
|
|
833
920
|
nodeExpanding: EmitType<NodeExpandEventArgs>;
|
|
834
921
|
/**
|
|
835
|
-
*
|
|
922
|
+
* Event callback that is raised when the TreeView node is selected/unselected successfully.
|
|
836
923
|
*
|
|
837
924
|
* @event
|
|
838
925
|
*/
|
|
839
926
|
nodeSelected: EmitType<NodeSelectEventArgs>;
|
|
840
927
|
/**
|
|
841
|
-
*
|
|
928
|
+
* Event callback that is raised before the TreeView node is selected/unselected.
|
|
842
929
|
*
|
|
843
930
|
* @event
|
|
844
931
|
*/
|
|
@@ -1148,8 +1235,8 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1148
1235
|
[key: string]: Object;
|
|
1149
1236
|
}[], target?: string | Element, index?: number, preventTargetExpand?: boolean): void;
|
|
1150
1237
|
/**
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1238
|
+
* Editing can also be enabled by using the `beginEdit` property, instead of clicking on the
|
|
1239
|
+
* TreeView node. On passing the node ID or element through this property, the edit textBox
|
|
1153
1240
|
* will be created for the particular node thus allowing us to edit it.
|
|
1154
1241
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
1155
1242
|
*/
|
|
@@ -1204,7 +1291,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1204
1291
|
*/
|
|
1205
1292
|
getDisabledNodes(): string[];
|
|
1206
1293
|
/**
|
|
1207
|
-
*
|
|
1294
|
+
* Gets the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
|
|
1208
1295
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
1209
1296
|
*/
|
|
1210
1297
|
getNode(node: string | Element): {
|
package/src/treeview/treeview.js
CHANGED
|
@@ -80,6 +80,7 @@ var SMALL = 'e-small';
|
|
|
80
80
|
var CHILD = 'e-has-child';
|
|
81
81
|
var ITEM_ANIMATION_ACTIVE = 'e-animation-active';
|
|
82
82
|
var DISABLED = 'e-disabled';
|
|
83
|
+
var PREVENTSELECT = 'e-prevent';
|
|
83
84
|
var treeAriaAttr = {
|
|
84
85
|
treeRole: 'group',
|
|
85
86
|
itemRole: 'treeitem',
|
|
@@ -128,6 +129,9 @@ var FieldsSettings = /** @class */ (function (_super) {
|
|
|
128
129
|
__decorate([
|
|
129
130
|
Property(null)
|
|
130
131
|
], FieldsSettings.prototype, "query", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
Property('selectable')
|
|
134
|
+
], FieldsSettings.prototype, "selectable", void 0);
|
|
131
135
|
__decorate([
|
|
132
136
|
Property('selected')
|
|
133
137
|
], FieldsSettings.prototype, "selected", void 0);
|
|
@@ -187,11 +191,11 @@ export { NodeAnimationSettings };
|
|
|
187
191
|
* The TreeView component is used to represent hierarchical data in a tree like structure with advanced
|
|
188
192
|
* functions to perform edit, drag and drop, selection with check-box, and more.
|
|
189
193
|
* ```html
|
|
190
|
-
*
|
|
194
|
+
* <div id="tree"></div>
|
|
191
195
|
* ```
|
|
192
196
|
* ```typescript
|
|
193
|
-
*
|
|
194
|
-
*
|
|
197
|
+
* let treeObj: TreeView = new TreeView();
|
|
198
|
+
* treeObj.appendTo('#tree');
|
|
195
199
|
* ```
|
|
196
200
|
*/
|
|
197
201
|
var TreeView = /** @class */ (function (_super) {
|
|
@@ -210,7 +214,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
210
214
|
_this.changeDataSource = false;
|
|
211
215
|
_this.hasTemplate = false;
|
|
212
216
|
_this.isFirstRender = false;
|
|
213
|
-
// Specifies whether the node is dropped or not
|
|
217
|
+
// Specifies whether the node is dropped or not
|
|
214
218
|
_this.isNodeDropped = false;
|
|
215
219
|
_this.mouseDownStatus = false;
|
|
216
220
|
return _this;
|
|
@@ -262,7 +266,9 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
262
266
|
csEnter: 'ctrl+shift+enter',
|
|
263
267
|
csHome: 'ctrl+shift+home',
|
|
264
268
|
csEnd: 'ctrl+shift+end',
|
|
265
|
-
space: 'space'
|
|
269
|
+
space: 'space',
|
|
270
|
+
shiftSpace: 'shift+space',
|
|
271
|
+
ctrlSpace: 'ctrl+space'
|
|
266
272
|
};
|
|
267
273
|
this.listBaseOption = {
|
|
268
274
|
expandCollapse: true,
|
|
@@ -786,6 +792,10 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
786
792
|
};
|
|
787
793
|
if (!this.isRefreshed) {
|
|
788
794
|
this.trigger('drawNode', eventArgs);
|
|
795
|
+
if (e.curData[this.fields.selectable] === false && !this.showCheckBox) {
|
|
796
|
+
e.item.classList.add(PREVENTSELECT);
|
|
797
|
+
e.item.firstElementChild.setAttribute('style', 'cursor: not-allowed');
|
|
798
|
+
}
|
|
789
799
|
}
|
|
790
800
|
};
|
|
791
801
|
TreeView.prototype.frameMouseHandler = function (e) {
|
|
@@ -1475,7 +1485,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1475
1485
|
else {
|
|
1476
1486
|
var classList = target.classList;
|
|
1477
1487
|
var li = closest(target, '.' + LISTITEM);
|
|
1478
|
-
if (!li) {
|
|
1488
|
+
if (!li || (li.classList.contains(PREVENTSELECT) && !(classList.contains(EXPANDABLE) || classList.contains(COLLAPSIBLE)))) {
|
|
1479
1489
|
return;
|
|
1480
1490
|
}
|
|
1481
1491
|
else if (event.originalEvent.which !== 3) {
|
|
@@ -1857,6 +1867,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1857
1867
|
return (typeof mapper.child === 'string' || isNOU(mapper.child)) ? mapper : mapper.child;
|
|
1858
1868
|
};
|
|
1859
1869
|
TreeView.prototype.getChildNodes = function (obj, parentId, isRoot) {
|
|
1870
|
+
var _this = this;
|
|
1860
1871
|
if (isRoot === void 0) { isRoot = false; }
|
|
1861
1872
|
var childNodes;
|
|
1862
1873
|
if (isNOU(obj)) {
|
|
@@ -1867,15 +1878,22 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1867
1878
|
}
|
|
1868
1879
|
else {
|
|
1869
1880
|
if (typeof this.fields.child === 'string') {
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1881
|
+
var index = obj.findIndex(function (data) { return data[_this.fields.id] && data[_this.fields.id].toString() === parentId; });
|
|
1882
|
+
if (index !== -1) {
|
|
1883
|
+
return getValue(this.fields.child, obj[index]);
|
|
1884
|
+
}
|
|
1885
|
+
if (index === -1) {
|
|
1886
|
+
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
1887
|
+
var tempArray = getValue(this.fields.child, obj[i]);
|
|
1888
|
+
var childIndex = !isNOU(tempArray) ? tempArray.findIndex(function (data) { return data[_this.fields.id] && data[_this.fields.id].toString() === parentId; }) : -1;
|
|
1889
|
+
if (childIndex !== -1) {
|
|
1890
|
+
return getValue(this.fields.child, tempArray[childIndex]);
|
|
1891
|
+
}
|
|
1892
|
+
else if (!isNOU(tempArray)) {
|
|
1893
|
+
childNodes = this.getChildNodes(tempArray, parentId);
|
|
1894
|
+
if (childNodes !== undefined) {
|
|
1895
|
+
break;
|
|
1896
|
+
}
|
|
1879
1897
|
}
|
|
1880
1898
|
}
|
|
1881
1899
|
}
|
|
@@ -1942,7 +1960,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1942
1960
|
if (this.isLoaded) {
|
|
1943
1961
|
eventArgs = this.getSelectEvent(li, 'select', e);
|
|
1944
1962
|
this.trigger('nodeSelecting', eventArgs, function (observedArgs) {
|
|
1945
|
-
if (!observedArgs.cancel) {
|
|
1963
|
+
if (!observedArgs.cancel && !observedArgs.node.classList.contains(PREVENTSELECT)) {
|
|
1946
1964
|
_this.nodeSelectAction(li, e, observedArgs, multiSelect);
|
|
1947
1965
|
}
|
|
1948
1966
|
});
|
|
@@ -2160,6 +2178,9 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2160
2178
|
if (_this.showCheckBox) {
|
|
2161
2179
|
_this.checkNode(e);
|
|
2162
2180
|
}
|
|
2181
|
+
else {
|
|
2182
|
+
_this.toggleSelect(focusedNode, e);
|
|
2183
|
+
}
|
|
2163
2184
|
break;
|
|
2164
2185
|
case 'moveRight':
|
|
2165
2186
|
_this.openNode(_this.enableRtl ? false : true, e);
|
|
@@ -2199,6 +2220,8 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2199
2220
|
case 'ctrlEnter':
|
|
2200
2221
|
case 'shiftEnter':
|
|
2201
2222
|
case 'csEnter':
|
|
2223
|
+
case 'shiftSpace':
|
|
2224
|
+
case 'ctrlSpace':
|
|
2202
2225
|
_this.toggleSelect(focusedNode, e);
|
|
2203
2226
|
break;
|
|
2204
2227
|
case 'f2':
|
|
@@ -2592,7 +2615,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2592
2615
|
};
|
|
2593
2616
|
TreeView.prototype.setFocus = function (preNode, nextNode) {
|
|
2594
2617
|
removeClass([preNode], [HOVER, FOCUS]);
|
|
2595
|
-
if (!nextNode.classList.contains('e-disable')) {
|
|
2618
|
+
if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
|
|
2596
2619
|
addClass([nextNode], [HOVER, FOCUS]);
|
|
2597
2620
|
this.updateIdAttr(preNode, nextNode);
|
|
2598
2621
|
}
|
|
@@ -2629,7 +2652,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2629
2652
|
}
|
|
2630
2653
|
};
|
|
2631
2654
|
TreeView.prototype.setHover = function (li) {
|
|
2632
|
-
if (!li.classList.contains(HOVER)) {
|
|
2655
|
+
if (!li.classList.contains(HOVER) && !li.classList.contains(PREVENTSELECT)) {
|
|
2633
2656
|
this.removeHover();
|
|
2634
2657
|
addClass([li], HOVER);
|
|
2635
2658
|
}
|
|
@@ -2653,6 +2676,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2653
2676
|
var pNode = closest(currLi.parentNode, '.' + LISTITEM);
|
|
2654
2677
|
var pid = pNode ? pNode.getAttribute('data-uid') : null;
|
|
2655
2678
|
var selected = currLi.classList.contains(ACTIVE);
|
|
2679
|
+
var selectable = currLi.classList.contains(PREVENTSELECT) ? false : true;
|
|
2656
2680
|
var expanded = (currLi.getAttribute('aria-expanded') === 'true') ? true : false;
|
|
2657
2681
|
var hasChildren = currLi.getAttribute('aria-expanded') !== null ? true : (select('.' + EXPANDABLE, currLi) || select('.' + COLLAPSIBLE, currLi)) != null ? true : false;
|
|
2658
2682
|
var checked = null;
|
|
@@ -2661,7 +2685,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2661
2685
|
checked = checkboxElement.getAttribute('aria-checked');
|
|
2662
2686
|
}
|
|
2663
2687
|
return {
|
|
2664
|
-
id: id, text: text, parentID: pid, selected: selected, expanded: expanded,
|
|
2688
|
+
id: id, text: text, parentID: pid, selected: selected, selectable: selectable, expanded: expanded,
|
|
2665
2689
|
isChecked: checked, hasChildren: hasChildren
|
|
2666
2690
|
};
|
|
2667
2691
|
}
|
|
@@ -3675,7 +3699,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3675
3699
|
if (!isNullOrUndefined(dropLi)) {
|
|
3676
3700
|
dropIcon1 = select('div.' + ICON, dropLi);
|
|
3677
3701
|
}
|
|
3678
|
-
if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE)) {
|
|
3702
|
+
if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
3679
3703
|
this.preventExpand = true;
|
|
3680
3704
|
}
|
|
3681
3705
|
if (this.dataType !== 1) {
|
|
@@ -3690,12 +3714,12 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3690
3714
|
dropUl = dropEle;
|
|
3691
3715
|
}
|
|
3692
3716
|
refNode = dropUl.childNodes[index];
|
|
3693
|
-
if (!this.isFirstRender ||
|
|
3717
|
+
if (!this.isFirstRender || this.dataType === 1) {
|
|
3694
3718
|
if (refNode || this.sortOrder === 'None') {
|
|
3695
3719
|
for (var i = 0; i < li.length; i++) {
|
|
3696
3720
|
dropUl.insertBefore(li[i], refNode);
|
|
3697
3721
|
}
|
|
3698
|
-
if (this.dataType === 1 && !isNullOrUndefined(dropLi)) {
|
|
3722
|
+
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
3699
3723
|
this.preventExpand = false;
|
|
3700
3724
|
var dropIcon = select('div.' + ICON, dropLi);
|
|
3701
3725
|
if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
|
|
@@ -4623,8 +4647,8 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
4623
4647
|
}
|
|
4624
4648
|
};
|
|
4625
4649
|
/**
|
|
4626
|
-
*
|
|
4627
|
-
*
|
|
4650
|
+
* Editing can also be enabled by using the `beginEdit` property, instead of clicking on the
|
|
4651
|
+
* TreeView node. On passing the node ID or element through this property, the edit textBox
|
|
4628
4652
|
* will be created for the particular node thus allowing us to edit it.
|
|
4629
4653
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
4630
4654
|
*/
|
|
@@ -4735,7 +4759,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
4735
4759
|
return disabledNodes;
|
|
4736
4760
|
};
|
|
4737
4761
|
/**
|
|
4738
|
-
*
|
|
4762
|
+
* Gets the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
|
|
4739
4763
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
4740
4764
|
*/
|
|
4741
4765
|
TreeView.prototype.getNode = function (node) {
|