@syncfusion/ej2-dropdowns 25.2.7 → 26.1.35
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-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +505 -224
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +498 -216
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +14 -13
- package/src/auto-complete/auto-complete.js +1 -1
- package/src/combo-box/combo-box.js +15 -0
- package/src/common/interface.js +0 -1
- package/src/common/virtual-scroll.js +1 -0
- package/src/drop-down-base/drop-down-base-model.d.ts +8 -1
- package/src/drop-down-base/drop-down-base.d.ts +28 -2
- package/src/drop-down-base/drop-down-base.js +64 -9
- package/src/drop-down-list/drop-down-list.d.ts +15 -2
- package/src/drop-down-list/drop-down-list.js +129 -13
- package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -15
- package/src/drop-down-tree/drop-down-tree.d.ts +17 -13
- package/src/drop-down-tree/drop-down-tree.js +52 -38
- package/src/list-box/list-box.js +30 -9
- package/src/mention/mention.js +23 -8
- package/src/multi-select/interface.js +0 -1
- package/src/multi-select/multi-select.d.ts +15 -0
- package/src/multi-select/multi-select.js +135 -12
- package/styles/auto-complete/_bootstrap5.3-definition.scss +2 -0
- package/styles/auto-complete/_fluent2-definition.scss +2 -0
- package/styles/auto-complete/bootstrap-dark.css +5 -2
- package/styles/auto-complete/bootstrap.css +5 -2
- package/styles/auto-complete/bootstrap4.css +6 -2
- package/styles/auto-complete/bootstrap5-dark.css +6 -2
- package/styles/auto-complete/bootstrap5.css +6 -2
- package/styles/auto-complete/fabric-dark.css +3 -1
- package/styles/auto-complete/fabric.css +3 -1
- package/styles/auto-complete/fluent-dark.css +6 -2
- package/styles/auto-complete/fluent.css +6 -2
- package/styles/auto-complete/fluent2.css +1140 -0
- package/styles/auto-complete/fluent2.scss +4 -0
- package/styles/auto-complete/highcontrast-light.css +3 -1
- package/styles/auto-complete/highcontrast.css +3 -1
- package/styles/auto-complete/material-dark.css +16 -5
- package/styles/auto-complete/material.css +16 -5
- package/styles/auto-complete/material3-dark.css +17 -6
- package/styles/auto-complete/material3.css +17 -6
- package/styles/auto-complete/tailwind-dark.css +16 -5
- package/styles/auto-complete/tailwind.css +16 -5
- package/styles/bootstrap-dark.css +196 -228
- package/styles/bootstrap-dark.scss +28 -8
- package/styles/bootstrap.css +196 -228
- package/styles/bootstrap.scss +28 -8
- package/styles/bootstrap4.css +199 -229
- package/styles/bootstrap4.scss +28 -8
- package/styles/bootstrap5-dark.css +196 -221
- package/styles/bootstrap5-dark.scss +28 -8
- package/styles/bootstrap5.css +196 -221
- package/styles/bootstrap5.scss +28 -8
- package/styles/combo-box/_bootstrap5.3-definition.scss +2 -0
- package/styles/combo-box/_fluent2-definition.scss +2 -0
- package/styles/combo-box/bootstrap-dark.css +5 -2
- package/styles/combo-box/bootstrap.css +5 -2
- package/styles/combo-box/bootstrap4.css +6 -2
- package/styles/combo-box/bootstrap5-dark.css +6 -2
- package/styles/combo-box/bootstrap5.css +6 -2
- package/styles/combo-box/fabric-dark.css +3 -1
- package/styles/combo-box/fabric.css +3 -1
- package/styles/combo-box/fluent-dark.css +6 -2
- package/styles/combo-box/fluent.css +6 -2
- package/styles/combo-box/fluent2.css +1140 -0
- package/styles/combo-box/fluent2.scss +4 -0
- package/styles/combo-box/highcontrast-light.css +3 -1
- package/styles/combo-box/highcontrast.css +3 -1
- package/styles/combo-box/material-dark.css +16 -5
- package/styles/combo-box/material.css +16 -5
- package/styles/combo-box/material3-dark.css +17 -6
- package/styles/combo-box/material3.css +17 -6
- package/styles/combo-box/tailwind-dark.css +16 -5
- package/styles/combo-box/tailwind.css +16 -5
- package/styles/drop-down-base/_bds-definition.scss +2 -2
- package/styles/drop-down-base/_bootstrap5.3-definition.scss +117 -0
- package/styles/drop-down-base/_fluent2-definition.scss +134 -0
- package/styles/drop-down-base/_layout.scss +12 -2
- package/styles/drop-down-base/_material3-definition.scss +0 -11
- package/styles/drop-down-base/_theme.scss +2 -11
- package/styles/drop-down-base/bootstrap-dark.css +2 -1
- package/styles/drop-down-base/bootstrap.css +2 -1
- package/styles/drop-down-base/bootstrap4.css +2 -1
- package/styles/drop-down-base/bootstrap5-dark.css +2 -1
- package/styles/drop-down-base/bootstrap5.css +2 -1
- package/styles/drop-down-base/fabric-dark.css +2 -1
- package/styles/drop-down-base/fabric.css +2 -1
- package/styles/drop-down-base/fluent-dark.css +2 -1
- package/styles/drop-down-base/fluent.css +2 -1
- package/styles/drop-down-base/fluent2.css +1447 -0
- package/styles/drop-down-base/fluent2.scss +3 -0
- package/styles/drop-down-base/highcontrast-light.css +2 -1
- package/styles/drop-down-base/highcontrast.css +2 -1
- package/styles/drop-down-base/material-dark.css +2 -1
- package/styles/drop-down-base/material.css +2 -1
- package/styles/drop-down-base/material3-dark.css +9 -2
- package/styles/drop-down-base/material3.css +9 -2
- package/styles/drop-down-base/tailwind-dark.css +2 -1
- package/styles/drop-down-base/tailwind.css +2 -1
- package/styles/drop-down-list/_bootstrap5.3-definition.scss +201 -0
- package/styles/drop-down-list/_fluent2-definition.scss +134 -0
- package/styles/drop-down-list/_layout.scss +5 -3
- package/styles/drop-down-list/_material3-definition.scss +0 -8
- package/styles/drop-down-list/bootstrap-dark.css +38 -3
- package/styles/drop-down-list/bootstrap.css +38 -3
- package/styles/drop-down-list/bootstrap4.css +39 -3
- package/styles/drop-down-list/bootstrap5-dark.css +39 -3
- package/styles/drop-down-list/bootstrap5.css +39 -3
- package/styles/drop-down-list/fabric-dark.css +36 -2
- package/styles/drop-down-list/fabric.css +36 -2
- package/styles/drop-down-list/fluent-dark.css +39 -3
- package/styles/drop-down-list/fluent.css +39 -3
- package/styles/drop-down-list/fluent2.css +1684 -0
- package/styles/drop-down-list/fluent2.scss +9 -0
- package/styles/drop-down-list/highcontrast-light.css +36 -2
- package/styles/drop-down-list/highcontrast.css +36 -2
- package/styles/drop-down-list/icons/_bootstrap5.3.scss +14 -0
- package/styles/drop-down-list/icons/_fluent2.scss +14 -0
- package/styles/drop-down-list/material-dark.css +58 -7
- package/styles/drop-down-list/material.css +72 -9
- package/styles/drop-down-list/material3-dark.css +74 -10
- package/styles/drop-down-list/material3.css +74 -10
- package/styles/drop-down-list/tailwind-dark.css +49 -6
- package/styles/drop-down-list/tailwind.css +49 -6
- package/styles/drop-down-tree/_bds-definition.scss +5 -0
- package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -0
- package/styles/drop-down-tree/_bootstrap5-definition.scss +5 -0
- package/styles/drop-down-tree/_bootstrap5.3-definition.scss +66 -0
- package/styles/drop-down-tree/_fluent-definition.scss +4 -0
- package/styles/drop-down-tree/_fluent2-definition.scss +75 -0
- package/styles/drop-down-tree/_layout.scss +289 -327
- package/styles/drop-down-tree/_material3-definition.scss +3 -5
- package/styles/drop-down-tree/_tailwind-definition.scss +7 -2
- package/styles/drop-down-tree/_theme.scss +24 -41
- package/styles/drop-down-tree/bootstrap-dark.css +63 -29
- package/styles/drop-down-tree/bootstrap.css +63 -29
- package/styles/drop-down-tree/bootstrap4.css +64 -30
- package/styles/drop-down-tree/bootstrap5-dark.css +63 -27
- package/styles/drop-down-tree/bootstrap5.css +63 -27
- package/styles/drop-down-tree/fabric-dark.css +63 -29
- package/styles/drop-down-tree/fabric.css +63 -29
- package/styles/drop-down-tree/fluent-dark.css +71 -35
- package/styles/drop-down-tree/fluent.css +71 -35
- package/styles/drop-down-tree/fluent2.css +1732 -0
- package/styles/drop-down-tree/fluent2.scss +9 -0
- package/styles/drop-down-tree/highcontrast-light.css +63 -29
- package/styles/drop-down-tree/highcontrast.css +63 -23
- package/styles/drop-down-tree/icons/_bootstrap5.3.scss +11 -0
- package/styles/drop-down-tree/icons/_fluent2.scss +14 -0
- package/styles/drop-down-tree/material-dark.css +80 -43
- package/styles/drop-down-tree/material.css +97 -51
- package/styles/drop-down-tree/material3-dark.css +85 -32
- package/styles/drop-down-tree/material3.css +85 -32
- package/styles/drop-down-tree/tailwind-dark.css +72 -28
- package/styles/drop-down-tree/tailwind.css +72 -28
- package/styles/fabric-dark.css +194 -227
- package/styles/fabric-dark.scss +28 -8
- package/styles/fabric.css +194 -227
- package/styles/fabric.scss +28 -8
- package/styles/fluent-dark.css +206 -236
- package/styles/fluent-dark.scss +28 -8
- package/styles/fluent.css +206 -236
- package/styles/fluent.scss +28 -8
- package/styles/fluent2.css +4771 -0
- package/styles/fluent2.scss +28 -0
- package/styles/highcontrast-light.css +197 -227
- package/styles/highcontrast-light.scss +28 -8
- package/styles/highcontrast.css +197 -221
- package/styles/highcontrast.scss +28 -8
- package/styles/list-box/_bootstrap-dark-definition.scss +0 -2
- package/styles/list-box/_bootstrap5.3-definition.scss +120 -0
- package/styles/list-box/_fabric-dark-definition.scss +0 -2
- package/styles/list-box/_fluent2-definition.scss +121 -0
- package/styles/list-box/_highcontrast-light-definition.scss +0 -2
- package/styles/list-box/_layout.scss +65 -44
- package/styles/list-box/_material-dark-definition.scss +0 -2
- package/styles/list-box/_tailwind-definition.scss +1 -1
- package/styles/list-box/_theme.scss +36 -65
- package/styles/list-box/bootstrap-dark.css +72 -112
- package/styles/list-box/bootstrap.css +72 -112
- package/styles/list-box/bootstrap4.css +72 -112
- package/styles/list-box/bootstrap5-dark.css +72 -106
- package/styles/list-box/bootstrap5.css +72 -106
- package/styles/list-box/fabric-dark.css +72 -112
- package/styles/list-box/fabric.css +72 -112
- package/styles/list-box/fluent-dark.css +72 -112
- package/styles/list-box/fluent.css +72 -112
- package/styles/list-box/fluent2.css +2029 -0
- package/styles/list-box/fluent2.scss +5 -0
- package/styles/list-box/highcontrast-light.css +72 -112
- package/styles/list-box/highcontrast.css +72 -112
- package/styles/list-box/icons/_bootstrap5.3.scss +25 -0
- package/styles/list-box/icons/_fluent2.scss +25 -0
- package/styles/list-box/material-dark.css +72 -112
- package/styles/list-box/material.css +72 -112
- package/styles/list-box/material3-dark.css +73 -113
- package/styles/list-box/material3.css +73 -113
- package/styles/list-box/tailwind-dark.css +74 -114
- package/styles/list-box/tailwind.css +74 -114
- package/styles/material-dark.css +236 -260
- package/styles/material-dark.scss +28 -8
- package/styles/material.css +253 -284
- package/styles/material.scss +28 -8
- package/styles/material3-dark.css +253 -266
- package/styles/material3-dark.scss +28 -8
- package/styles/material3.css +253 -266
- package/styles/material3.scss +28 -8
- package/styles/mention/_bootstrap5.3-definition.scss +1 -0
- package/styles/mention/_fluent2-definition.scss +1 -0
- package/styles/mention/bootstrap-dark.css +24 -0
- package/styles/mention/bootstrap.css +24 -0
- package/styles/mention/bootstrap4.css +24 -0
- package/styles/mention/bootstrap5-dark.css +24 -0
- package/styles/mention/bootstrap5.css +24 -0
- package/styles/mention/fabric-dark.css +24 -0
- package/styles/mention/fabric.css +24 -0
- package/styles/mention/fluent-dark.css +24 -0
- package/styles/mention/fluent.css +24 -0
- package/styles/mention/fluent2.css +1130 -0
- package/styles/mention/fluent2.scss +6 -0
- package/styles/mention/highcontrast-light.css +24 -0
- package/styles/mention/highcontrast.css +24 -0
- package/styles/mention/material-dark.css +24 -0
- package/styles/mention/material.css +24 -0
- package/styles/mention/material3-dark.css +25 -1
- package/styles/mention/material3.css +25 -1
- package/styles/mention/tailwind-dark.css +24 -0
- package/styles/mention/tailwind.css +24 -0
- package/styles/multi-select/_bootstrap5.3-definition.scss +230 -0
- package/styles/multi-select/_fluent2-definition.scss +236 -0
- package/styles/multi-select/_layout.scss +32 -38
- package/styles/multi-select/_material3-definition.scss +0 -15
- package/styles/multi-select/_theme.scss +0 -4
- package/styles/multi-select/bootstrap-dark.css +67 -28
- package/styles/multi-select/bootstrap.css +67 -28
- package/styles/multi-select/bootstrap4.css +70 -29
- package/styles/multi-select/bootstrap5-dark.css +67 -28
- package/styles/multi-select/bootstrap5.css +67 -28
- package/styles/multi-select/fabric-dark.css +67 -28
- package/styles/multi-select/fabric.css +67 -28
- package/styles/multi-select/fluent-dark.css +69 -29
- package/styles/multi-select/fluent.css +69 -29
- package/styles/multi-select/fluent2.css +2663 -0
- package/styles/multi-select/fluent2.scss +9 -0
- package/styles/multi-select/highcontrast-light.css +70 -28
- package/styles/multi-select/highcontrast.css +70 -28
- package/styles/multi-select/icons/_bootstrap5.3.scss +26 -0
- package/styles/multi-select/icons/_fluent2.scss +692 -0
- package/styles/multi-select/material-dark.css +88 -32
- package/styles/multi-select/material.css +102 -34
- package/styles/multi-select/material3-dark.css +109 -35
- package/styles/multi-select/material3.css +109 -35
- package/styles/multi-select/tailwind-dark.css +67 -28
- package/styles/multi-select/tailwind.css +67 -28
- package/styles/tailwind-dark.css +217 -233
- package/styles/tailwind-dark.scss +28 -8
- package/styles/tailwind.css +217 -233
- package/styles/tailwind.scss +28 -8
- package/CHANGELOG.md +0 -2200
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Input, InputObject, FloatLabelType, TextBox, InputEventArgs } from '@syncfusion/ej2-inputs';import { createCheckBox } from '@syncfusion/ej2-buttons';import { NotifyPropertyChanges, INotifyPropertyChanged, Property, Event, EmitType, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Component, EventHandler, attributes, formatUnit, ChildProperty, remove, L10n, extend } from '@syncfusion/ej2-base';import { addClass, removeClass, detach, prepend, Complex, closest, setValue, getValue, compile, append } from '@syncfusion/ej2-base';import { select, selectAll, isNullOrUndefined as isNOU, matches, Browser, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { DataManager, Query, DataUtil } from '@syncfusion/ej2-data';import { Popup } from '@syncfusion/ej2-popups';import { TreeView, NodeSelectEventArgs, DataBoundEventArgs, FieldsSettingsModel, NodeClickEventArgs
|
|
1
|
+
import { Input, InputObject, FloatLabelType, TextBox, InputEventArgs } from '@syncfusion/ej2-inputs';import { createCheckBox } from '@syncfusion/ej2-buttons';import { NotifyPropertyChanges, INotifyPropertyChanged, Property, Event, EmitType, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Component, EventHandler, attributes, formatUnit, ChildProperty, remove, L10n, extend } from '@syncfusion/ej2-base';import { addClass, removeClass, detach, prepend, Complex, closest, setValue, getValue, compile, append } from '@syncfusion/ej2-base';import { select, selectAll, isNullOrUndefined as isNOU, matches, Browser, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { DataManager, Query, DataUtil } from '@syncfusion/ej2-data';import { Popup } from '@syncfusion/ej2-popups';import { TreeView, NodeSelectEventArgs, DataBoundEventArgs, FieldsSettingsModel, NodeClickEventArgs } from '@syncfusion/ej2-navigations';import { NodeCheckEventArgs, FailureEventArgs} from '@syncfusion/ej2-navigations';
|
|
2
2
|
import {Mode,ExpandOn,TreeFilterType,SortOrder,DdtBeforeOpenEventArgs,DdtChangeEventArgs,DdtPopupEventArgs,DdtDataBoundEventArgs,DdtFilteringEventArgs,DdtFocusEventArgs,DdtKeyPressEventArgs,DdtSelectEventArgs} from "./drop-down-tree";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -393,7 +393,7 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
393
393
|
/**
|
|
394
394
|
* Specifies whether to destroy the popup or to maintain it in DOM when it is closed.
|
|
395
395
|
* When this property is set to false, then the popup will not be removed from DOM once it is closed.
|
|
396
|
-
*
|
|
396
|
+
*
|
|
397
397
|
* @default true
|
|
398
398
|
|
|
399
399
|
*/
|
|
@@ -488,91 +488,91 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
488
488
|
/**
|
|
489
489
|
* Triggers when the data fetch request from the remote server fails.
|
|
490
490
|
*
|
|
491
|
-
* @event
|
|
491
|
+
* @event actionFailure
|
|
492
492
|
*/
|
|
493
493
|
actionFailure?: EmitType<Object>;
|
|
494
494
|
|
|
495
495
|
/**
|
|
496
496
|
* Fires when popup opens before animation.
|
|
497
497
|
*
|
|
498
|
-
* @event
|
|
498
|
+
* @event beforeOpen
|
|
499
499
|
*/
|
|
500
500
|
beforeOpen?: EmitType<DdtBeforeOpenEventArgs>;
|
|
501
501
|
|
|
502
502
|
/**
|
|
503
503
|
* Triggers when an item in a popup is selected or when the model value is changed by user.
|
|
504
504
|
*
|
|
505
|
-
* @event
|
|
505
|
+
* @event change
|
|
506
506
|
*/
|
|
507
507
|
change?: EmitType<DdtChangeEventArgs>;
|
|
508
508
|
|
|
509
509
|
/**
|
|
510
510
|
* Fires when popup close after animation completion.
|
|
511
511
|
*
|
|
512
|
-
* @event
|
|
512
|
+
* @event close
|
|
513
513
|
*/
|
|
514
514
|
close?: EmitType<DdtPopupEventArgs>;
|
|
515
515
|
|
|
516
516
|
/**
|
|
517
517
|
* Triggers when the Dropdown Tree input element gets focus-out.
|
|
518
518
|
*
|
|
519
|
-
* @event
|
|
519
|
+
* @event blur
|
|
520
520
|
*/
|
|
521
521
|
blur?: EmitType<Object>;
|
|
522
522
|
|
|
523
523
|
/**
|
|
524
524
|
* Triggers when the Dropdown Tree is created successfully.
|
|
525
525
|
*
|
|
526
|
-
* @event
|
|
526
|
+
* @event created
|
|
527
527
|
*/
|
|
528
528
|
created?: EmitType<Object>;
|
|
529
529
|
|
|
530
530
|
/**
|
|
531
531
|
* Triggers when data source is populated in the Dropdown Tree.
|
|
532
532
|
*
|
|
533
|
-
* @event
|
|
533
|
+
* @event dataBound
|
|
534
534
|
*/
|
|
535
535
|
dataBound?: EmitType<DdtDataBoundEventArgs>;
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* Triggers when the Dropdown Tree is destroyed successfully.
|
|
539
539
|
*
|
|
540
|
-
* @event
|
|
540
|
+
* @event destroyed
|
|
541
541
|
*/
|
|
542
542
|
destroyed?: EmitType<Object>;
|
|
543
543
|
|
|
544
544
|
/**
|
|
545
545
|
* Triggers on typing a character in the filter bar when the **allowFiltering** is enabled.
|
|
546
546
|
*
|
|
547
|
-
* @event
|
|
547
|
+
* @event filtering
|
|
548
548
|
*/
|
|
549
549
|
filtering?: EmitType<DdtFilteringEventArgs>;
|
|
550
550
|
|
|
551
551
|
/**
|
|
552
552
|
* Triggers when the Dropdown Tree input element is focused.
|
|
553
553
|
*
|
|
554
|
-
* @event
|
|
554
|
+
* @event focus
|
|
555
555
|
*/
|
|
556
556
|
focus?: EmitType<DdtFocusEventArgs>;
|
|
557
557
|
|
|
558
558
|
/**
|
|
559
559
|
* Triggers when key press is successful. It helps to customize the operations at key press.
|
|
560
560
|
*
|
|
561
|
-
* @event
|
|
561
|
+
* @event keyPress
|
|
562
562
|
*/
|
|
563
563
|
keyPress?: EmitType<DdtKeyPressEventArgs>;
|
|
564
564
|
|
|
565
565
|
/**
|
|
566
566
|
* Fires when popup opens after animation completion.
|
|
567
567
|
*
|
|
568
|
-
* @event
|
|
568
|
+
* @event open
|
|
569
569
|
*/
|
|
570
570
|
open?: EmitType<DdtPopupEventArgs>;
|
|
571
571
|
|
|
572
572
|
/**
|
|
573
573
|
* Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.
|
|
574
574
|
*
|
|
575
|
-
* @event
|
|
575
|
+
* @event select
|
|
576
576
|
*/
|
|
577
577
|
select?: EmitType<DdtSelectEventArgs>;
|
|
578
578
|
|
|
@@ -147,6 +147,10 @@ export interface DdtPopupEventArgs {
|
|
|
147
147
|
* Specifies the pop-up object.
|
|
148
148
|
*/
|
|
149
149
|
popup: Popup;
|
|
150
|
+
/**
|
|
151
|
+
* Determines whether the current popup close action needs to be prevented or not.
|
|
152
|
+
*/
|
|
153
|
+
cancel?: boolean;
|
|
150
154
|
}
|
|
151
155
|
export interface DdtDataBoundEventArgs {
|
|
152
156
|
/**
|
|
@@ -641,79 +645,79 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
641
645
|
/**
|
|
642
646
|
* Triggers when the data fetch request from the remote server fails.
|
|
643
647
|
*
|
|
644
|
-
* @event
|
|
648
|
+
* @event actionFailure
|
|
645
649
|
*/
|
|
646
650
|
actionFailure: EmitType<Object>;
|
|
647
651
|
/**
|
|
648
652
|
* Fires when popup opens before animation.
|
|
649
653
|
*
|
|
650
|
-
* @event
|
|
654
|
+
* @event beforeOpen
|
|
651
655
|
*/
|
|
652
656
|
beforeOpen: EmitType<DdtBeforeOpenEventArgs>;
|
|
653
657
|
/**
|
|
654
658
|
* Triggers when an item in a popup is selected or when the model value is changed by user.
|
|
655
659
|
*
|
|
656
|
-
* @event
|
|
660
|
+
* @event change
|
|
657
661
|
*/
|
|
658
662
|
change: EmitType<DdtChangeEventArgs>;
|
|
659
663
|
/**
|
|
660
664
|
* Fires when popup close after animation completion.
|
|
661
665
|
*
|
|
662
|
-
* @event
|
|
666
|
+
* @event close
|
|
663
667
|
*/
|
|
664
668
|
close: EmitType<DdtPopupEventArgs>;
|
|
665
669
|
/**
|
|
666
670
|
* Triggers when the Dropdown Tree input element gets focus-out.
|
|
667
671
|
*
|
|
668
|
-
* @event
|
|
672
|
+
* @event blur
|
|
669
673
|
*/
|
|
670
674
|
blur: EmitType<Object>;
|
|
671
675
|
/**
|
|
672
676
|
* Triggers when the Dropdown Tree is created successfully.
|
|
673
677
|
*
|
|
674
|
-
* @event
|
|
678
|
+
* @event created
|
|
675
679
|
*/
|
|
676
680
|
created: EmitType<Object>;
|
|
677
681
|
/**
|
|
678
682
|
* Triggers when data source is populated in the Dropdown Tree.
|
|
679
683
|
*
|
|
680
|
-
* @event
|
|
684
|
+
* @event dataBound
|
|
681
685
|
*/
|
|
682
686
|
dataBound: EmitType<DdtDataBoundEventArgs>;
|
|
683
687
|
/**
|
|
684
688
|
* Triggers when the Dropdown Tree is destroyed successfully.
|
|
685
689
|
*
|
|
686
|
-
* @event
|
|
690
|
+
* @event destroyed
|
|
687
691
|
*/
|
|
688
692
|
destroyed: EmitType<Object>;
|
|
689
693
|
/**
|
|
690
694
|
* Triggers on typing a character in the filter bar when the **allowFiltering** is enabled.
|
|
691
695
|
*
|
|
692
|
-
* @event
|
|
696
|
+
* @event filtering
|
|
693
697
|
*/
|
|
694
698
|
filtering: EmitType<DdtFilteringEventArgs>;
|
|
695
699
|
/**
|
|
696
700
|
* Triggers when the Dropdown Tree input element is focused.
|
|
697
701
|
*
|
|
698
|
-
* @event
|
|
702
|
+
* @event focus
|
|
699
703
|
*/
|
|
700
704
|
focus: EmitType<DdtFocusEventArgs>;
|
|
701
705
|
/**
|
|
702
706
|
* Triggers when key press is successful. It helps to customize the operations at key press.
|
|
703
707
|
*
|
|
704
|
-
* @event
|
|
708
|
+
* @event keyPress
|
|
705
709
|
*/
|
|
706
710
|
keyPress: EmitType<DdtKeyPressEventArgs>;
|
|
707
711
|
/**
|
|
708
712
|
* Fires when popup opens after animation completion.
|
|
709
713
|
*
|
|
710
|
-
* @event
|
|
714
|
+
* @event open
|
|
711
715
|
*/
|
|
712
716
|
open: EmitType<DdtPopupEventArgs>;
|
|
713
717
|
/**
|
|
714
718
|
* Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.
|
|
715
719
|
*
|
|
716
|
-
* @event
|
|
720
|
+
* @event select
|
|
717
721
|
*/
|
|
718
722
|
select: EmitType<DdtSelectEventArgs>;
|
|
719
723
|
constructor(options?: DropDownTreeModel, element?: string | HTMLElement);
|
|
@@ -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 { Input, TextBox } from '@syncfusion/ej2-inputs';
|
|
21
22
|
import { createCheckBox } from '@syncfusion/ej2-buttons';
|
|
22
23
|
import { NotifyPropertyChanges, Property, Event, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
|
|
@@ -413,7 +414,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
413
414
|
if (args.text === '') {
|
|
414
415
|
_this.isFilteredData = false;
|
|
415
416
|
_this.isFilterRestore = true;
|
|
416
|
-
_this.isFromFilterChange = false;
|
|
417
417
|
fields = _this.cloneFields(_this.fields);
|
|
418
418
|
}
|
|
419
419
|
else if (args.preventDefaultAction) {
|
|
@@ -498,8 +498,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
498
498
|
DropDownTree.prototype.nestedFilter = function (value, filteredFields) {
|
|
499
499
|
var matchedDataSource = [];
|
|
500
500
|
for (var i = 0; i < this.treeData.length; i++) {
|
|
501
|
-
|
|
502
|
-
var filteredChild = this.nestedChildFilter(value, this.treeData[i]);
|
|
501
|
+
var filteredChild = this.nestedChildFilter(value, this.treeData[parseInt(i.toString(), 10)]);
|
|
503
502
|
if (!isNOU(filteredChild)) {
|
|
504
503
|
matchedDataSource.push(filteredChild);
|
|
505
504
|
}
|
|
@@ -515,8 +514,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
515
514
|
else {
|
|
516
515
|
var matchedChildren = [];
|
|
517
516
|
for (var i = 0; i < children.length; i++) {
|
|
518
|
-
|
|
519
|
-
var filteredChild = this.nestedChildFilter(value, children[i]);
|
|
517
|
+
var filteredChild = this.nestedChildFilter(value, children[parseInt(i.toString(), 10)]);
|
|
520
518
|
if (!isNOU(filteredChild)) {
|
|
521
519
|
matchedChildren.push(filteredChild);
|
|
522
520
|
}
|
|
@@ -543,13 +541,11 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
543
541
|
for (var i = 0; i < matchedData.length; i++) {
|
|
544
542
|
if (matchedDataSource.indexOf(matchedData[i]) === -1) {
|
|
545
543
|
matchedDataSource.push(matchedData[i]);
|
|
546
|
-
|
|
547
|
-
var parentId = matchedData[i][this.fields.parentValue];
|
|
544
|
+
var parentId = matchedData[parseInt(i.toString(), 10)][this.fields.parentValue];
|
|
548
545
|
while (!isNOU(parentId)) {
|
|
549
546
|
var parent_1 = null;
|
|
550
547
|
for (var j = 0; j < this.treeData.length; j++) {
|
|
551
|
-
|
|
552
|
-
var value_1 = this.treeData[j][this.fields.value];
|
|
548
|
+
var value_1 = this.treeData[parseInt(j.toString(), 10)][this.fields.value];
|
|
553
549
|
if (!isNOU(value_1) && (value_1 === parentId)) {
|
|
554
550
|
parent_1 = this.treeData[j];
|
|
555
551
|
break;
|
|
@@ -643,6 +639,11 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
643
639
|
if (formElement) {
|
|
644
640
|
EventHandler.remove(formElement, 'reset', this.resetValueHandler);
|
|
645
641
|
}
|
|
642
|
+
this.keyboardModule.destroy();
|
|
643
|
+
if (this.showSelectAll && this.checkAllParent) {
|
|
644
|
+
EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
|
|
645
|
+
}
|
|
646
|
+
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
646
647
|
};
|
|
647
648
|
/* Trigger when the dropdown is clicked */
|
|
648
649
|
DropDownTree.prototype.dropDownClick = function (e) {
|
|
@@ -917,6 +918,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
917
918
|
cancel: false,
|
|
918
919
|
event: e
|
|
919
920
|
};
|
|
921
|
+
var focusedElement;
|
|
920
922
|
this.trigger('keyPress', eventArgs, function (observedArgs) {
|
|
921
923
|
if (!observedArgs.cancel) {
|
|
922
924
|
switch (e.action) {
|
|
@@ -924,9 +926,10 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
924
926
|
_this.clickHandler(e);
|
|
925
927
|
break;
|
|
926
928
|
case 'moveDown':
|
|
927
|
-
|
|
929
|
+
focusedElement = _this.treeObj.element.querySelector('li');
|
|
928
930
|
focusedElement.focus();
|
|
929
931
|
addClass([focusedElement], ['e-node-focus']);
|
|
932
|
+
break;
|
|
930
933
|
}
|
|
931
934
|
}
|
|
932
935
|
});
|
|
@@ -1085,8 +1088,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1085
1088
|
return remainElement;
|
|
1086
1089
|
};
|
|
1087
1090
|
DropDownTree.prototype.getOverflowVal = function (index) {
|
|
1088
|
-
|
|
1089
|
-
var selectedData = this.getSelectedData(this.value[index]);
|
|
1091
|
+
var selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
|
|
1090
1092
|
return getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
|
|
1091
1093
|
};
|
|
1092
1094
|
DropDownTree.prototype.updateDelimMode = function () {
|
|
@@ -1458,8 +1460,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1458
1460
|
var data;
|
|
1459
1461
|
if (this.treeDataType === 1) {
|
|
1460
1462
|
for (var i = 0; i < this.treeItems.length; i++) {
|
|
1461
|
-
|
|
1462
|
-
var text = getValue(this.fields.text, this.treeItems[i]);
|
|
1463
|
+
var text = getValue(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
|
|
1463
1464
|
if (!isNOU(this.treeItems[i]) && !isNOU(text) && text === givenText) {
|
|
1464
1465
|
data = this.treeItems[i];
|
|
1465
1466
|
break;
|
|
@@ -1474,14 +1475,12 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1474
1475
|
DropDownTree.prototype.getNestedItems = function (data, field, givenText) {
|
|
1475
1476
|
var newData;
|
|
1476
1477
|
for (var i = 0, objlen = data.length; i < objlen; i++) {
|
|
1477
|
-
|
|
1478
|
-
var dataId = getValue(this.fields.text, data[i]);
|
|
1478
|
+
var dataId = getValue(this.fields.text, data[parseInt(i.toString(), 10)]);
|
|
1479
1479
|
if (data[i] && dataId && dataId.toString() === givenText) {
|
|
1480
1480
|
return data[i];
|
|
1481
1481
|
}
|
|
1482
1482
|
else if (typeof field.child === 'string' && !isNOU(getValue(field.child, data[i]))) {
|
|
1483
|
-
|
|
1484
|
-
var childData = getValue(field.child, data[i]);
|
|
1483
|
+
var childData = getValue(field.child, data[parseInt(i.toString(), 10)]);
|
|
1485
1484
|
newData = this.getNestedItems(childData, this.getChildType(field), givenText);
|
|
1486
1485
|
if (newData !== undefined) {
|
|
1487
1486
|
break;
|
|
@@ -1489,8 +1488,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1489
1488
|
}
|
|
1490
1489
|
else if (this.fields.dataSource instanceof DataManager && !isNOU(getValue('child', data[i]))) {
|
|
1491
1490
|
var child = 'child';
|
|
1492
|
-
|
|
1493
|
-
newData = this.getNestedItems(getValue(child, data[i]), this.getChildType(field), givenText);
|
|
1491
|
+
newData = this.getNestedItems(getValue(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
|
|
1494
1492
|
if (newData !== undefined) {
|
|
1495
1493
|
break;
|
|
1496
1494
|
}
|
|
@@ -1580,12 +1578,12 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1580
1578
|
_this.setFooterTemplate();
|
|
1581
1579
|
}
|
|
1582
1580
|
_this.isFirstRender = false;
|
|
1583
|
-
/* eslint-disable */
|
|
1584
1581
|
if (_this.hasTemplate && _this.portals) {
|
|
1585
1582
|
if (_this.treeObj.portals) {
|
|
1586
|
-
_this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) {
|
|
1583
|
+
_this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) {
|
|
1584
|
+
return !_this.portals.includes(item);
|
|
1585
|
+
}));
|
|
1587
1586
|
}
|
|
1588
|
-
/* eslint-enable */
|
|
1589
1587
|
if (_this.isReact) {
|
|
1590
1588
|
_this.renderReactTemplates(_this.reactCallBack);
|
|
1591
1589
|
}
|
|
@@ -1608,7 +1606,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1608
1606
|
else {
|
|
1609
1607
|
var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
|
|
1610
1608
|
focusedElement = _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
|
|
1611
|
-
if (oldFocussedNode && oldFocussedNode
|
|
1609
|
+
if (oldFocussedNode && oldFocussedNode !== focusedElement) {
|
|
1612
1610
|
oldFocussedNode.setAttribute('tabindex', '-1');
|
|
1613
1611
|
removeClass([oldFocussedNode], 'e-node-focus');
|
|
1614
1612
|
}
|
|
@@ -1735,7 +1733,8 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1735
1733
|
var isFooter = closest(target, '.' + FOOTER);
|
|
1736
1734
|
var isScroller = target.classList.contains(DROPDOWN) ? true :
|
|
1737
1735
|
(matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
|
|
1738
|
-
if ((this.isPopupOpen && ((!isNOU(this.inputWrapper) &&
|
|
1736
|
+
if ((this.isPopupOpen && ((!isNOU(this.inputWrapper) &&
|
|
1737
|
+
this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
|
|
1739
1738
|
((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
|
|
1740
1739
|
(this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
|
|
1741
1740
|
|| target.classList.contains(CHECKBOXFRAME)))))) {
|
|
@@ -1762,7 +1761,9 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1762
1761
|
removeClass([this.popupDiv], NODATA);
|
|
1763
1762
|
this.hideCheckAll(false);
|
|
1764
1763
|
}
|
|
1765
|
-
|
|
1764
|
+
if (!this.isFilteredData) {
|
|
1765
|
+
this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
|
|
1766
|
+
}
|
|
1766
1767
|
if (this.isFirstRender && this.isRemoteData) {
|
|
1767
1768
|
this.setTreeValue();
|
|
1768
1769
|
this.setTreeText();
|
|
@@ -1858,7 +1859,8 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1858
1859
|
dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
|
|
1859
1860
|
child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
|
|
1860
1861
|
expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
|
|
1861
|
-
query: fields.query, selected: fields.selected, selectable: fields.selectable,
|
|
1862
|
+
query: fields.query, selected: fields.selected, selectable: fields.selectable,
|
|
1863
|
+
tableName: fields.tableName, tooltip: fields.tooltip
|
|
1862
1864
|
};
|
|
1863
1865
|
return clonedField;
|
|
1864
1866
|
}
|
|
@@ -1912,7 +1914,8 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1912
1914
|
if ((typeof field.child === 'string') && !isNOU(getValue(field.child, this.fields.dataSource[i]))) {
|
|
1913
1915
|
return 2;
|
|
1914
1916
|
}
|
|
1915
|
-
if (!isNOU(getValue(field.parentValue, this.fields.dataSource[i])) ||
|
|
1917
|
+
if (!isNOU(getValue(field.parentValue, this.fields.dataSource[i])) ||
|
|
1918
|
+
!isNOU(getValue(field.hasChildren, this.fields.dataSource[i]))) {
|
|
1916
1919
|
return 1;
|
|
1917
1920
|
}
|
|
1918
1921
|
}
|
|
@@ -2061,14 +2064,13 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2061
2064
|
this.oldValue = this.value ? this.value.slice() : this.value;
|
|
2062
2065
|
}
|
|
2063
2066
|
};
|
|
2064
|
-
DropDownTree.prototype.onNodeExpanded = function (
|
|
2067
|
+
DropDownTree.prototype.onNodeExpanded = function () {
|
|
2065
2068
|
if (this.hasTemplate && this.portals && this.treeObj.portals) {
|
|
2066
2069
|
for (var i = 0; i < this.treeObj.portals.length; i++) {
|
|
2067
2070
|
if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
|
|
2068
2071
|
this.portals.push(this.treeObj.portals[i]);
|
|
2069
2072
|
}
|
|
2070
2073
|
}
|
|
2071
|
-
/* eslint-enable */
|
|
2072
2074
|
this.renderReactTemplates();
|
|
2073
2075
|
}
|
|
2074
2076
|
};
|
|
@@ -2164,7 +2166,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2164
2166
|
if (!this.isFilteredData) {
|
|
2165
2167
|
this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
|
|
2166
2168
|
this.isFromFilterChange = false;
|
|
2167
|
-
if (newValues && newValues.length !== 0 && !this.showCheckBox) {
|
|
2169
|
+
if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
|
|
2168
2170
|
this.treeObj.selectedNodes = this.value.slice();
|
|
2169
2171
|
this.treeObj.dataBind();
|
|
2170
2172
|
}
|
|
@@ -2446,8 +2448,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2446
2448
|
};
|
|
2447
2449
|
DropDownTree.prototype.templateComplier = function (template) {
|
|
2448
2450
|
if (template) {
|
|
2449
|
-
// eslint-disable-next-line
|
|
2450
|
-
var e = void 0;
|
|
2451
2451
|
try {
|
|
2452
2452
|
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
2453
2453
|
return compile(document.querySelector(template).innerHTML.trim());
|
|
@@ -2533,7 +2533,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2533
2533
|
this.ensurePlaceHolder();
|
|
2534
2534
|
};
|
|
2535
2535
|
DropDownTree.prototype.resetValue = function (isDynamicChange) {
|
|
2536
|
-
if (this.value ===
|
|
2536
|
+
if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
|
|
2537
2537
|
return;
|
|
2538
2538
|
}
|
|
2539
2539
|
Input.setValue(null, this.inputEle, this.floatLabelType);
|
|
@@ -2647,9 +2647,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2647
2647
|
DropDownTree.prototype.updateTemplate = function () {
|
|
2648
2648
|
if (this.popupObj) {
|
|
2649
2649
|
this.clearTemplate();
|
|
2650
|
-
/* eslint-disable */
|
|
2651
2650
|
this.portals = [];
|
|
2652
|
-
/* eslint-enable */
|
|
2653
2651
|
this.popupObj.destroy();
|
|
2654
2652
|
if (this.isPopupOpen) {
|
|
2655
2653
|
this.hidePopup();
|
|
@@ -3026,22 +3024,35 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
3026
3024
|
detach(this.inputWrapper);
|
|
3027
3025
|
detach(this.popupDiv);
|
|
3028
3026
|
detach(this.hiddenElement);
|
|
3027
|
+
Input.setRipple(false, [this.inputObj]);
|
|
3029
3028
|
this.element.classList.remove('e-input');
|
|
3030
3029
|
if (this.showCheckBox || this.allowMultiSelection) {
|
|
3031
3030
|
this.element.classList.remove(CHIP_INPUT);
|
|
3032
3031
|
}
|
|
3032
|
+
detach(this.inputObj.container);
|
|
3033
|
+
if (this.inputObj.buttons.length) {
|
|
3034
|
+
detach(this.inputObj.buttons[0]);
|
|
3035
|
+
}
|
|
3033
3036
|
this.inputObj = null;
|
|
3034
3037
|
while (this.hiddenElement.options.length > 0) {
|
|
3035
3038
|
this.hiddenElement.remove(0);
|
|
3036
3039
|
}
|
|
3037
3040
|
this.hiddenElement.innerHTML = '';
|
|
3038
3041
|
this.hiddenElement = null;
|
|
3042
|
+
this.inputWrapper.innerHTML = '';
|
|
3039
3043
|
this.inputWrapper = null;
|
|
3040
3044
|
this.popupDiv = null;
|
|
3041
3045
|
this.tree = null;
|
|
3042
3046
|
this.popupObj = null;
|
|
3043
3047
|
this.treeObj = null;
|
|
3044
3048
|
this.overAllClear = null;
|
|
3049
|
+
if (this.chipCollection) {
|
|
3050
|
+
var chipsIcons = selectAll('.e-chips-close', this.chipCollection);
|
|
3051
|
+
for (var _i = 0, chipsIcons_1 = chipsIcons; _i < chipsIcons_1.length; _i++) {
|
|
3052
|
+
var element = chipsIcons_1[_i];
|
|
3053
|
+
EventHandler.remove(element, 'mousedown', this.removeChip);
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3045
3056
|
this.chipWrapper = null;
|
|
3046
3057
|
this.chipCollection = null;
|
|
3047
3058
|
this.checkAllParent = null;
|
|
@@ -3100,7 +3111,11 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
3100
3111
|
* @returns {void}
|
|
3101
3112
|
*/
|
|
3102
3113
|
DropDownTree.prototype.hidePopup = function () {
|
|
3103
|
-
var eventArgs = { popup: this.popupObj };
|
|
3114
|
+
var eventArgs = { popup: this.popupObj, cancel: false };
|
|
3115
|
+
this.trigger('close', eventArgs);
|
|
3116
|
+
if (eventArgs.cancel) {
|
|
3117
|
+
return;
|
|
3118
|
+
}
|
|
3104
3119
|
this.inputWrapper.classList.remove(ICONANIMATION);
|
|
3105
3120
|
if (this.popupEle) {
|
|
3106
3121
|
addClass([this.popupEle], DDTHIDEICON);
|
|
@@ -3114,7 +3129,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
3114
3129
|
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
3115
3130
|
}
|
|
3116
3131
|
}
|
|
3117
|
-
this.trigger('close', eventArgs);
|
|
3118
3132
|
if (this.destroyPopupOnHide) {
|
|
3119
3133
|
this.isFirstRender = true;
|
|
3120
3134
|
this.destroyPopup();
|
package/src/list-box/list-box.js
CHANGED
|
@@ -29,7 +29,6 @@ import { cssClass, Sortable, moveTo } from '@syncfusion/ej2-lists';
|
|
|
29
29
|
import { Button } from '@syncfusion/ej2-buttons';
|
|
30
30
|
import { createSpinner, showSpinner, hideSpinner, getZindexPartial } from '@syncfusion/ej2-popups';
|
|
31
31
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
32
|
-
var ITEMTEMPLATE_PROPERTY = 'ItemTemplate';
|
|
33
32
|
/**
|
|
34
33
|
* Defines the Selection settings of List Box.
|
|
35
34
|
*/
|
|
@@ -145,6 +144,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
145
144
|
var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
|
|
146
145
|
hiddenSelect.style.visibility = 'hidden';
|
|
147
146
|
this.list.classList.add('e-listbox-wrapper');
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
148
148
|
this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
|
|
149
149
|
var groupHdrs = this.list.querySelectorAll('.e-list-group-item');
|
|
150
150
|
for (var i = 0; i < groupHdrs.length; i++) {
|
|
@@ -163,7 +163,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
166
|
-
if (this.initLoad) {
|
|
166
|
+
if (this.initLoad && this.element.parentElement) {
|
|
167
167
|
this.element.parentElement.insertBefore(this.list, this.element);
|
|
168
168
|
}
|
|
169
169
|
this.list.insertBefore(this.element, this.list.firstChild);
|
|
@@ -231,6 +231,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
231
231
|
ListBox.prototype.initToolbar = function () {
|
|
232
232
|
var pos = this.toolbarSettings.position;
|
|
233
233
|
var prevScope = this.element.getAttribute('data-value');
|
|
234
|
+
this.toolbarSettings.items = isNullOrUndefined(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
|
|
234
235
|
if (this.toolbarSettings.items.length) {
|
|
235
236
|
var toolElem = this.createElement('div', { className: 'e-listbox-tool', attrs: { 'role': 'toolbar' } });
|
|
236
237
|
var wrapper = this.createElement('div', {
|
|
@@ -325,7 +326,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
325
326
|
this.spinner = this.createElement('div', { className: 'e-listbox-wrapper' });
|
|
326
327
|
}
|
|
327
328
|
this.spinner.style.height = formatUnit(this.height);
|
|
328
|
-
this.element.parentElement
|
|
329
|
+
if (this.element.parentElement) {
|
|
330
|
+
this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
|
|
331
|
+
}
|
|
329
332
|
createSpinner({ target: this.spinner }, this.createElement);
|
|
330
333
|
showSpinner(this.spinner);
|
|
331
334
|
};
|
|
@@ -631,7 +634,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
631
634
|
}
|
|
632
635
|
var fListData_1 = [].slice.call(this.listData);
|
|
633
636
|
var fSortData_1 = [].slice.call(this.sortedData);
|
|
634
|
-
selectedOptions.forEach(function (value
|
|
637
|
+
selectedOptions.forEach(function (value) {
|
|
635
638
|
droppedData = _this.getDataByValue(value);
|
|
636
639
|
var srcIdx = _this.listData.indexOf(droppedData);
|
|
637
640
|
var jsonSrcIdx = _this.jsonData.indexOf(droppedData);
|
|
@@ -1182,6 +1185,10 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1182
1185
|
}
|
|
1183
1186
|
};
|
|
1184
1187
|
ListBox.prototype.clickHandler = function (e) {
|
|
1188
|
+
var li = closest(e.target, '.' + 'e-list-item');
|
|
1189
|
+
if (isNullOrUndefined(li)) {
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1185
1192
|
this.selectHandler(e);
|
|
1186
1193
|
};
|
|
1187
1194
|
ListBox.prototype.checkSelectAll = function () {
|
|
@@ -1674,6 +1681,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1674
1681
|
}
|
|
1675
1682
|
var _loop_3 = function (i) {
|
|
1676
1683
|
if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
|
|
1684
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
1677
1685
|
flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
|
|
1678
1686
|
tempLiColl.push(fListBox.ulElement.childNodes[i]);
|
|
1679
1687
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2094,7 +2102,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
2094
2102
|
});
|
|
2095
2103
|
}
|
|
2096
2104
|
};
|
|
2097
|
-
ListBox.prototype.setSelection = function (
|
|
2105
|
+
ListBox.prototype.setSelection = function (
|
|
2106
|
+
// eslint-disable-next-line max-len
|
|
2107
|
+
values, isSelect, isText, canFocus) {
|
|
2098
2108
|
var _this = this;
|
|
2099
2109
|
if (values === void 0) { values = this.value; }
|
|
2100
2110
|
if (isSelect === void 0) { isSelect = true; }
|
|
@@ -2119,21 +2129,21 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
2119
2129
|
li = _this.list.querySelector('[data-value="' + text + '"]');
|
|
2120
2130
|
}
|
|
2121
2131
|
if (li) {
|
|
2122
|
-
if (_this.selectionSettings.showCheckbox) {
|
|
2132
|
+
if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
|
|
2123
2133
|
liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
|
|
2124
2134
|
}
|
|
2125
2135
|
else {
|
|
2126
2136
|
liselect = li.classList.contains('e-selected');
|
|
2127
2137
|
}
|
|
2128
2138
|
if (!isSelect && liselect || isSelect && !liselect && li) {
|
|
2129
|
-
if (_this.selectionSettings.showCheckbox) {
|
|
2139
|
+
if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
|
|
2130
2140
|
_this.notify('updatelist', { li: li, module: 'listbox' });
|
|
2131
2141
|
if (canFocus) {
|
|
2132
2142
|
li.focus();
|
|
2133
2143
|
}
|
|
2134
2144
|
}
|
|
2135
2145
|
else {
|
|
2136
|
-
if (isSelect) {
|
|
2146
|
+
if (isSelect && !li.classList.contains('e-disabled')) {
|
|
2137
2147
|
li.classList.add(cssClass.selected);
|
|
2138
2148
|
li.setAttribute('aria-selected', 'true');
|
|
2139
2149
|
if (canFocus) {
|
|
@@ -2167,7 +2177,17 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
2167
2177
|
this.checkSelectAll();
|
|
2168
2178
|
};
|
|
2169
2179
|
ListBox.prototype.checkDisabledState = function (inst) {
|
|
2170
|
-
|
|
2180
|
+
if (isNullOrUndefined(inst.ulElement)) {
|
|
2181
|
+
if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
|
|
2182
|
+
return false;
|
|
2183
|
+
}
|
|
2184
|
+
else {
|
|
2185
|
+
return true;
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
else {
|
|
2189
|
+
return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
|
|
2190
|
+
}
|
|
2171
2191
|
};
|
|
2172
2192
|
ListBox.prototype.updateToolBarState = function () {
|
|
2173
2193
|
var _this = this;
|
|
@@ -2405,6 +2425,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
2405
2425
|
}
|
|
2406
2426
|
}
|
|
2407
2427
|
if (newProp.toolbarSettings.items) {
|
|
2428
|
+
oldProp.toolbarSettings.items = isNullOrUndefined(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
|
|
2408
2429
|
if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
|
|
2409
2430
|
ele = this.list.parentElement;
|
|
2410
2431
|
ele.parentElement.insertBefore(this.list, ele);
|