@syncfusion/ej2-dropdowns 21.2.10 → 22.1.34
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 +260 -0
- package/CHANGELOG.md +3 -0
- package/README.md +201 -103
- 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 +125 -34
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +125 -34
- 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 +11 -11
- package/src/auto-complete/auto-complete-model.d.ts +2 -1
- package/src/auto-complete/auto-complete.d.ts +2 -1
- package/src/auto-complete/auto-complete.js +1 -1
- package/src/combo-box/combo-box-model.d.ts +6 -3
- package/src/combo-box/combo-box.d.ts +6 -3
- package/src/drop-down-base/drop-down-base-model.d.ts +8 -4
- package/src/drop-down-base/drop-down-base.d.ts +8 -4
- package/src/drop-down-base/drop-down-base.js +18 -7
- package/src/drop-down-list/drop-down-list-model.d.ts +6 -3
- package/src/drop-down-list/drop-down-list.d.ts +6 -3
- package/src/drop-down-list/drop-down-list.js +22 -13
- package/src/drop-down-tree/drop-down-tree-model.d.ts +21 -6
- package/src/drop-down-tree/drop-down-tree.d.ts +55 -62
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/list-box/list-box.d.ts +14 -0
- package/src/list-box/list-box.js +33 -3
- package/src/mention/mention-model.d.ts +4 -2
- package/src/mention/mention.d.ts +4 -2
- package/src/multi-select/multi-select-model.d.ts +14 -7
- package/src/multi-select/multi-select.d.ts +15 -7
- package/src/multi-select/multi-select.js +50 -9
- package/styles/auto-complete/_material3-dark-definition.scss +1 -0
- package/styles/auto-complete/_material3-definition.scss +2 -0
- package/styles/auto-complete/material3-dark.css +198 -0
- package/styles/auto-complete/material3-dark.scss +5 -0
- package/styles/auto-complete/material3.css +254 -0
- package/styles/auto-complete/material3.scss +5 -0
- package/styles/bootstrap-dark.css +5 -1
- package/styles/bootstrap.css +5 -1
- package/styles/bootstrap4.css +5 -1
- package/styles/bootstrap5-dark.css +5 -1
- package/styles/bootstrap5.css +5 -1
- package/styles/combo-box/_material3-dark-definition.scss +1 -0
- package/styles/combo-box/_material3-definition.scss +2 -0
- package/styles/combo-box/material3-dark.css +198 -0
- package/styles/combo-box/material3-dark.scss +5 -0
- package/styles/combo-box/material3.css +254 -0
- package/styles/combo-box/material3.scss +5 -0
- package/styles/drop-down-base/_layout.scss +3 -1
- package/styles/drop-down-base/_material3-dark-definition.scss +1 -0
- package/styles/drop-down-base/_material3-definition.scss +87 -0
- package/styles/drop-down-base/_theme.scss +10 -0
- package/styles/drop-down-base/bootstrap-dark.css +4 -0
- package/styles/drop-down-base/bootstrap.css +4 -0
- package/styles/drop-down-base/bootstrap4.css +4 -0
- package/styles/drop-down-base/bootstrap5-dark.css +4 -0
- package/styles/drop-down-base/bootstrap5.css +4 -0
- package/styles/drop-down-base/fabric-dark.css +4 -0
- package/styles/drop-down-base/fabric.css +4 -0
- package/styles/drop-down-base/fluent-dark.css +4 -0
- package/styles/drop-down-base/fluent.css +4 -0
- package/styles/drop-down-base/highcontrast-light.css +4 -0
- package/styles/drop-down-base/highcontrast.css +4 -0
- package/styles/drop-down-base/material-dark.css +4 -0
- package/styles/drop-down-base/material.css +4 -0
- package/styles/drop-down-base/material3-dark.css +439 -0
- package/styles/drop-down-base/material3-dark.scss +4 -0
- package/styles/drop-down-base/material3.css +495 -0
- package/styles/drop-down-base/material3.scss +4 -0
- package/styles/drop-down-base/tailwind-dark.css +4 -0
- package/styles/drop-down-base/tailwind.css +4 -0
- package/styles/drop-down-list/_layout.scss +15 -1
- package/styles/drop-down-list/_material3-dark-definition.scss +1 -0
- package/styles/drop-down-list/_material3-definition.scss +180 -0
- package/styles/drop-down-list/icons/_material3-dark.scss +1 -0
- package/styles/drop-down-list/material3-dark.css +503 -0
- package/styles/drop-down-list/material3-dark.scss +9 -0
- package/styles/drop-down-list/material3.css +559 -0
- package/styles/drop-down-list/material3.scss +9 -0
- package/styles/drop-down-tree/_layout.scss +13 -7
- package/styles/drop-down-tree/_material3-dark-definition.scss +1 -0
- package/styles/drop-down-tree/_material3-definition.scss +76 -0
- package/styles/drop-down-tree/_theme.scss +14 -2
- package/styles/drop-down-tree/icons/_material3-dark.scss +1 -0
- package/styles/drop-down-tree/icons/_material3.scss +1 -1
- package/styles/drop-down-tree/material3-dark.css +466 -0
- package/styles/drop-down-tree/material3-dark.scss +10 -0
- package/styles/drop-down-tree/material3.css +522 -0
- package/styles/drop-down-tree/material3.scss +10 -0
- package/styles/fabric-dark.css +5 -1
- package/styles/fabric.css +5 -1
- package/styles/fluent-dark.css +5 -1
- package/styles/fluent.css +5 -1
- package/styles/highcontrast-light.css +5 -1
- package/styles/highcontrast.css +5 -1
- package/styles/list-box/_layout.scss +9 -1
- package/styles/list-box/_material3-dark-definition.scss +1 -0
- package/styles/list-box/_material3-definition.scss +117 -0
- package/styles/list-box/icons/_material3-dark.scss +1 -0
- package/styles/list-box/material3-dark.css +956 -0
- package/styles/list-box/material3-dark.scss +6 -0
- package/styles/list-box/material3.css +1012 -0
- package/styles/list-box/material3.scss +6 -0
- package/styles/material-dark.css +5 -1
- package/styles/material.css +5 -1
- package/styles/material3-dark.css +4664 -0
- package/styles/material3-dark.scss +10 -0
- package/styles/material3.css +4720 -0
- package/styles/material3.scss +10 -0
- package/styles/mention/_material3-dark-definition.scss +1 -0
- package/styles/mention/_material3-definition.scss +1 -0
- package/styles/mention/material3-dark.css +87 -0
- package/styles/mention/material3-dark.scss +7 -0
- package/styles/mention/material3.css +143 -0
- package/styles/mention/material3.scss +7 -0
- package/styles/multi-select/_layout.scss +160 -7
- package/styles/multi-select/_material3-dark-definition.scss +1 -0
- package/styles/multi-select/_material3-definition.scss +246 -0
- package/styles/multi-select/_theme.scss +6 -0
- package/styles/multi-select/bootstrap-dark.css +1 -1
- package/styles/multi-select/bootstrap.css +1 -1
- package/styles/multi-select/bootstrap4.css +1 -1
- package/styles/multi-select/bootstrap5-dark.css +1 -1
- package/styles/multi-select/bootstrap5.css +1 -1
- package/styles/multi-select/fabric-dark.css +1 -1
- package/styles/multi-select/fabric.css +1 -1
- package/styles/multi-select/fluent-dark.css +1 -1
- package/styles/multi-select/fluent.css +1 -1
- package/styles/multi-select/highcontrast-light.css +1 -1
- package/styles/multi-select/highcontrast.css +1 -1
- package/styles/multi-select/icons/_material3-dark.scss +1 -0
- package/styles/multi-select/icons/_material3.scss +3 -4
- package/styles/multi-select/material-dark.css +1 -1
- package/styles/multi-select/material.css +1 -1
- package/styles/multi-select/material3-dark.css +2547 -0
- package/styles/multi-select/material3-dark.scss +10 -0
- package/styles/multi-select/material3.css +2603 -0
- package/styles/multi-select/material3.scss +10 -0
- package/styles/multi-select/tailwind-dark.css +1 -1
- package/styles/multi-select/tailwind.css +1 -1
- package/styles/tailwind-dark.css +5 -1
- package/styles/tailwind.css +5 -1
- package/tslint.json +111 -0
|
@@ -5,19 +5,15 @@ import { KeyboardEventArgs } from '@syncfusion/ej2-base';
|
|
|
5
5
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
6
6
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
7
7
|
import { DropDownTreeModel, FieldsModel, TreeSettingsModel } from './drop-down-tree-model';
|
|
8
|
-
export declare type TreeFilterType =
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* Checks whether a value
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* Checks whether a value contains with specified value.
|
|
19
|
-
*/
|
|
20
|
-
'Contains';
|
|
9
|
+
* Specifies the different ways to filter values
|
|
10
|
+
* ```props
|
|
11
|
+
* StartsWith :- Checks whether a value begins with the specified value.
|
|
12
|
+
* EndsWith :- Checks whether a value ends with the specified value.
|
|
13
|
+
* Contains :- Checks whether a value contains with specified value.
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare type TreeFilterType = 'StartsWith' | 'EndsWith' | 'Contains';
|
|
21
17
|
export declare class Fields extends ChildProperty<Fields> {
|
|
22
18
|
/**
|
|
23
19
|
* This field specifies the child items or mapping field for the nested child items that contains an array of JSON objects.
|
|
@@ -222,53 +218,35 @@ export interface DdtKeyPressEventArgs {
|
|
|
222
218
|
*/
|
|
223
219
|
event: KeyboardEventArgs;
|
|
224
220
|
}
|
|
225
|
-
export declare type Mode =
|
|
226
|
-
/**
|
|
227
|
-
* On blur component will act in the delimiter mode.
|
|
228
|
-
*/
|
|
229
|
-
'Default' |
|
|
230
|
-
/**
|
|
231
|
-
* Selected items will be visualized in the text content.
|
|
232
|
-
*/
|
|
233
|
-
'Delimiter' |
|
|
234
|
-
/**
|
|
235
|
-
* Selected items will be visualized in chip.
|
|
236
|
-
*/
|
|
237
|
-
'Box' |
|
|
238
|
-
/**
|
|
239
|
-
* Selected items will be visualized with the given custom template value
|
|
240
|
-
*/
|
|
241
|
-
'Custom';
|
|
242
|
-
export declare type SortOrder =
|
|
243
|
-
/**
|
|
244
|
-
* Indicates that the nodes are not sorted.
|
|
245
|
-
*/
|
|
246
|
-
'None' |
|
|
247
221
|
/**
|
|
248
|
-
*
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
*
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
* Determines automatically whether to trigger the single click or double-click event.
|
|
258
|
-
*/
|
|
259
|
-
'Auto' |
|
|
260
|
-
/**
|
|
261
|
-
* Triggers the single click event when an item is double-clicekd.
|
|
262
|
-
*/
|
|
263
|
-
'Click' |
|
|
222
|
+
* Configures visibility mode for component interaction when allowMultiSelection or checkbox is enabled.
|
|
223
|
+
* ```props
|
|
224
|
+
* Default :- On blur component will act in the delimiter mode.
|
|
225
|
+
* Delimiter :- Selected items will be visualized in the text content.
|
|
226
|
+
* Box :- Selected items will be visualized in chip.
|
|
227
|
+
* Custom :- Selected items will be visualized with the given custom template value.
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export declare type Mode = 'Default' | 'Delimiter' | 'Box' | 'Custom';
|
|
264
231
|
/**
|
|
265
|
-
*
|
|
266
|
-
|
|
267
|
-
|
|
232
|
+
* Specifies a value that indicates whether the items are sorted in the ascending or descending order, or not sorted at all.
|
|
233
|
+
* ```props
|
|
234
|
+
* None :- Indicates that the nodes are not sorted.
|
|
235
|
+
* Ascending :- Indicates that the nodes are sorted in the ascending order.
|
|
236
|
+
* Descending :- Indicates that the nodes are sorted in the descending order.
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
export declare type SortOrder = 'None' | 'Ascending' | 'Descending';
|
|
268
240
|
/**
|
|
269
|
-
*
|
|
270
|
-
|
|
271
|
-
|
|
241
|
+
* Specifies the expansion of tree nodes within the Dropdown Tree.
|
|
242
|
+
* ```props
|
|
243
|
+
* Auto :- In desktop, the expand or collapse operation happens when you double-click the node, and in mobile devices it happens on single-tap.
|
|
244
|
+
* Click :- The expand or collapse operation happens when you perform single-click/tap on the pop-up item in both desktop and mobile devices.
|
|
245
|
+
* DblClick :- The expand or collapse operation happens when you perform a double-click/tap on the pop-up item in both desktop and mobile devices.
|
|
246
|
+
* None :- The expand or collapse operation will not happen when you perform single-click/tap or double-click/tap on the pop-up items in both desktop and mobile devices.
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
export declare type ExpandOn = 'Auto' | 'Click' | 'DblClick' | 'None';
|
|
272
250
|
/**
|
|
273
251
|
* The Dropdown Tree control allows you to select single or multiple values from hierarchical data in a tree-like structure.
|
|
274
252
|
* It has several out-of-the-box features, such as data binding, check boxes, templates, filter,
|
|
@@ -351,8 +329,9 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
351
329
|
* Dropdown Tree component when the data fetch request from the remote server fails.
|
|
352
330
|
*
|
|
353
331
|
* @default 'The Request Failed'
|
|
332
|
+
* @aspType string
|
|
354
333
|
*/
|
|
355
|
-
actionFailureTemplate: string;
|
|
334
|
+
actionFailureTemplate: string | Function;
|
|
356
335
|
/**
|
|
357
336
|
* When allowFiltering is set to true, it shows the filter bar (search text box) of the component.
|
|
358
337
|
* The filter action retrieves matched items through the **filtering** event based on the characters typed in the search text box.
|
|
@@ -388,8 +367,9 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
388
367
|
* added to the input instead of the selected item text in the Dropdown Tree when the multi-selection or checkbox support is enabled.
|
|
389
368
|
*
|
|
390
369
|
* @default "${value.length} item(s) selected"
|
|
370
|
+
* @aspType string
|
|
391
371
|
*/
|
|
392
|
-
customTemplate: string;
|
|
372
|
+
customTemplate: string | Function;
|
|
393
373
|
/**
|
|
394
374
|
* Defines the value separator character in the input element when multi-selection or checkbox is enabled in the Dropdown Tree.
|
|
395
375
|
* The delimiter character is applicable only for **default** and **delimiter** visibility modes.
|
|
@@ -466,8 +446,12 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
466
446
|
* By default, the footerTemplate will be null and there will be no footer container for the pop-up list.
|
|
467
447
|
*
|
|
468
448
|
* @default null
|
|
449
|
+
* @angularType string | object
|
|
450
|
+
* @reactType string | function | JSX.Element
|
|
451
|
+
* @vueType string | function
|
|
452
|
+
* @aspType string
|
|
469
453
|
*/
|
|
470
|
-
footerTemplate: string;
|
|
454
|
+
footerTemplate: string | Function;
|
|
471
455
|
/**
|
|
472
456
|
* When **ignoreAccent** is set to true, then it ignores the diacritic characters or accents when filtering.
|
|
473
457
|
*/
|
|
@@ -483,8 +467,12 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
483
467
|
* By default, the headerTemplate will be null and there will be no header container for the pop-up list.
|
|
484
468
|
*
|
|
485
469
|
* @default null
|
|
470
|
+
* @angularType string | object
|
|
471
|
+
* @reactType string | function | JSX.Element
|
|
472
|
+
* @vueType string | function
|
|
473
|
+
* @aspType string
|
|
486
474
|
*/
|
|
487
|
-
headerTemplate: string;
|
|
475
|
+
headerTemplate: string | Function;
|
|
488
476
|
/**
|
|
489
477
|
* Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
|
|
490
478
|
*
|
|
@@ -500,8 +488,12 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
500
488
|
* or HTML element ID holding the content.
|
|
501
489
|
*
|
|
502
490
|
* @default null
|
|
491
|
+
* @angularType string | object
|
|
492
|
+
* @reactType string | function | JSX.Element
|
|
493
|
+
* @vueType string | function
|
|
494
|
+
* @aspType string
|
|
503
495
|
*/
|
|
504
|
-
itemTemplate: string;
|
|
496
|
+
itemTemplate: string | Function;
|
|
505
497
|
/**
|
|
506
498
|
* Configures visibility mode for component interaction when allowMultiSelection or checkbox is enabled.
|
|
507
499
|
* Different modes are:
|
|
@@ -517,8 +509,9 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
517
509
|
* to be displayed within the pop-up.
|
|
518
510
|
*
|
|
519
511
|
* @default 'No Records Found'
|
|
512
|
+
* @aspType string
|
|
520
513
|
*/
|
|
521
|
-
noRecordsTemplate: string;
|
|
514
|
+
noRecordsTemplate: string | Function;
|
|
522
515
|
/**
|
|
523
516
|
* Specifies a short hint that describes the expected value of the Dropdown Tree component.
|
|
524
517
|
*
|
|
@@ -2372,7 +2372,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2372
2372
|
// eslint-disable-next-line
|
|
2373
2373
|
var e = void 0;
|
|
2374
2374
|
try {
|
|
2375
|
-
if (document.querySelectorAll(template).length) {
|
|
2375
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
2376
2376
|
return compile(document.querySelector(template).innerHTML.trim());
|
|
2377
2377
|
}
|
|
2378
2378
|
else {
|
|
@@ -458,6 +458,20 @@ export declare class ListBox extends DropDownBase {
|
|
|
458
458
|
* @returns {void}
|
|
459
459
|
*/
|
|
460
460
|
moveDown(value?: string[] | number[] | boolean[]): void;
|
|
461
|
+
/**
|
|
462
|
+
* Moves the given value(s) / selected value(s) in Top of the list.
|
|
463
|
+
*
|
|
464
|
+
* @param { string[] | number[] | boolean[] } value - Specifies the value(s).
|
|
465
|
+
* @returns {void}
|
|
466
|
+
*/
|
|
467
|
+
moveTop(value?: string[] | number[] | boolean[]): void;
|
|
468
|
+
/**
|
|
469
|
+
* Moves the given value(s) / selected value(s) in bottom of the list.
|
|
470
|
+
*
|
|
471
|
+
* @param { string[] | number[] | boolean[] } value - Specifies the value(s).
|
|
472
|
+
* @returns {void}
|
|
473
|
+
*/
|
|
474
|
+
moveBottom(value?: string[] | number[] | boolean[]): void;
|
|
461
475
|
/**
|
|
462
476
|
* Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
|
|
463
477
|
*
|
package/src/list-box/list-box.js
CHANGED
|
@@ -910,6 +910,26 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
910
910
|
var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
|
|
911
911
|
this.moveUpDown(false, false, elem);
|
|
912
912
|
};
|
|
913
|
+
/**
|
|
914
|
+
* Moves the given value(s) / selected value(s) in Top of the list.
|
|
915
|
+
*
|
|
916
|
+
* @param { string[] | number[] | boolean[] } value - Specifies the value(s).
|
|
917
|
+
* @returns {void}
|
|
918
|
+
*/
|
|
919
|
+
ListBox.prototype.moveTop = function (value) {
|
|
920
|
+
var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
|
|
921
|
+
this.moveUpDown(null, false, elem, true);
|
|
922
|
+
};
|
|
923
|
+
/**
|
|
924
|
+
* Moves the given value(s) / selected value(s) in bottom of the list.
|
|
925
|
+
*
|
|
926
|
+
* @param { string[] | number[] | boolean[] } value - Specifies the value(s).
|
|
927
|
+
* @returns {void}
|
|
928
|
+
*/
|
|
929
|
+
ListBox.prototype.moveBottom = function (value) {
|
|
930
|
+
var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
|
|
931
|
+
this.moveUpDown(true, false, elem, false, true);
|
|
932
|
+
};
|
|
913
933
|
/**
|
|
914
934
|
* Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
|
|
915
935
|
*
|
|
@@ -1368,7 +1388,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1368
1388
|
}
|
|
1369
1389
|
}
|
|
1370
1390
|
};
|
|
1371
|
-
ListBox.prototype.moveUpDown = function (isUp, isKey, value) {
|
|
1391
|
+
ListBox.prototype.moveUpDown = function (isUp, isKey, value, isTop, isBottom) {
|
|
1372
1392
|
var _this = this;
|
|
1373
1393
|
var elems = this.getSelectedItems();
|
|
1374
1394
|
if (value) {
|
|
@@ -1387,8 +1407,18 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1387
1407
|
(isUp ? elems : elems.reverse()).forEach(function (ele) {
|
|
1388
1408
|
var jsonToIdx = Array.prototype.indexOf.call(_this.ulElement.querySelectorAll('.e-list-item'), ele);
|
|
1389
1409
|
var idx = Array.prototype.indexOf.call(_this.ulElement.children, ele);
|
|
1390
|
-
|
|
1391
|
-
|
|
1410
|
+
if (isTop) {
|
|
1411
|
+
moveTo(_this.ulElement, _this.ulElement, [idx], 0);
|
|
1412
|
+
_this.changeData(idx, 0, jsonToIdx, ele);
|
|
1413
|
+
}
|
|
1414
|
+
else if (isBottom) {
|
|
1415
|
+
moveTo(_this.ulElement, _this.ulElement, [idx], _this.ulElement.querySelectorAll('.e-list-item').length);
|
|
1416
|
+
_this.changeData(idx, _this.ulElement.querySelectorAll('.e-list-item').length, jsonToIdx, ele);
|
|
1417
|
+
}
|
|
1418
|
+
else {
|
|
1419
|
+
moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
|
|
1420
|
+
_this.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
|
|
1421
|
+
}
|
|
1392
1422
|
});
|
|
1393
1423
|
this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
1394
1424
|
elems[0].focus();
|
|
@@ -112,8 +112,9 @@ export interface MentionModel {
|
|
|
112
112
|
* Specifies the template for the selected value from the suggestion list.
|
|
113
113
|
*
|
|
114
114
|
* @default null
|
|
115
|
+
* @aspType string
|
|
115
116
|
*/
|
|
116
|
-
displayTemplate?: string;
|
|
117
|
+
displayTemplate?: string | Function;
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
120
|
* Specifies the template for the suggestion list.
|
|
@@ -133,8 +134,9 @@ export interface MentionModel {
|
|
|
133
134
|
* Specifies the template for showing until data is loaded in the popup.
|
|
134
135
|
*
|
|
135
136
|
* @default null
|
|
137
|
+
* @aspType string
|
|
136
138
|
*/
|
|
137
|
-
spinnerTemplate?: string;
|
|
139
|
+
spinnerTemplate?: string | Function;
|
|
138
140
|
|
|
139
141
|
/**
|
|
140
142
|
* Specifies the target selector where the mention component needs to be displayed.
|
package/src/mention/mention.d.ts
CHANGED
|
@@ -149,8 +149,9 @@ export declare class Mention extends DropDownBase {
|
|
|
149
149
|
* Specifies the template for the selected value from the suggestion list.
|
|
150
150
|
*
|
|
151
151
|
* @default null
|
|
152
|
+
* @aspType string
|
|
152
153
|
*/
|
|
153
|
-
displayTemplate: string;
|
|
154
|
+
displayTemplate: string | Function;
|
|
154
155
|
/**
|
|
155
156
|
* Specifies the template for the suggestion list.
|
|
156
157
|
*
|
|
@@ -167,8 +168,9 @@ export declare class Mention extends DropDownBase {
|
|
|
167
168
|
* Specifies the template for showing until data is loaded in the popup.
|
|
168
169
|
*
|
|
169
170
|
* @default null
|
|
171
|
+
* @aspType string
|
|
170
172
|
*/
|
|
171
|
-
spinnerTemplate: string;
|
|
173
|
+
spinnerTemplate: string | Function;
|
|
172
174
|
/**
|
|
173
175
|
* Specifies the target selector where the mention component needs to be displayed.
|
|
174
176
|
* The mention component listens to the target's user input and displays suggestions as soon as the user inputs the mention character.
|
|
@@ -43,24 +43,27 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
43
43
|
* Accepts the template design and assigns it to the group headers present in the MultiSelect popup list.
|
|
44
44
|
*
|
|
45
45
|
* @default null
|
|
46
|
+
* @aspType string
|
|
46
47
|
*/
|
|
47
|
-
groupTemplate?: string;
|
|
48
|
+
groupTemplate?: string | Function;
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* Accepts the template design and assigns it to popup list of MultiSelect component
|
|
51
52
|
* when no data is available on the component.
|
|
52
53
|
*
|
|
53
54
|
* @default 'No records found'
|
|
55
|
+
* @aspType string
|
|
54
56
|
*/
|
|
55
|
-
noRecordsTemplate?: string;
|
|
57
|
+
noRecordsTemplate?: string | Function;
|
|
56
58
|
|
|
57
59
|
/**
|
|
58
60
|
* Accepts the template and assigns it to the popup list content of the MultiSelect component
|
|
59
61
|
* when the data fetch request from the remote server fails.
|
|
60
62
|
*
|
|
61
63
|
* @default 'Request failed'
|
|
64
|
+
* @aspType string
|
|
62
65
|
*/
|
|
63
|
-
actionFailureTemplate?: string;
|
|
66
|
+
actionFailureTemplate?: string | Function;
|
|
64
67
|
|
|
65
68
|
/**
|
|
66
69
|
* Specifies the `sortOrder` to sort the data source. The available type of sort orders are
|
|
@@ -240,24 +243,27 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
240
243
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
241
244
|
*
|
|
242
245
|
* @default null
|
|
246
|
+
* @aspType string
|
|
243
247
|
*/
|
|
244
|
-
valueTemplate?: string;
|
|
248
|
+
valueTemplate?: string | Function;
|
|
245
249
|
|
|
246
250
|
/**
|
|
247
251
|
* Accepts the template design and assigns it to the header container of the popup list.
|
|
248
252
|
* > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
|
|
249
253
|
*
|
|
250
254
|
* @default null
|
|
255
|
+
* @aspType string
|
|
251
256
|
*/
|
|
252
|
-
headerTemplate?: string;
|
|
257
|
+
headerTemplate?: string | Function;
|
|
253
258
|
|
|
254
259
|
/**
|
|
255
260
|
* Accepts the template design and assigns it to the footer container of the popup list.
|
|
256
261
|
* > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
|
|
257
262
|
*
|
|
258
263
|
* @default null
|
|
264
|
+
* @aspType string
|
|
259
265
|
*/
|
|
260
|
-
footerTemplate?: string;
|
|
266
|
+
footerTemplate?: string | Function;
|
|
261
267
|
|
|
262
268
|
/**
|
|
263
269
|
* Accepts the template design and assigns it to each list item present in the popup.
|
|
@@ -268,8 +274,9 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
268
274
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
269
275
|
*
|
|
270
276
|
* @default null
|
|
277
|
+
* @aspType string
|
|
271
278
|
*/
|
|
272
|
-
itemTemplate?: string;
|
|
279
|
+
itemTemplate?: string | Function;
|
|
273
280
|
|
|
274
281
|
/**
|
|
275
282
|
* To enable the filtering option in this component.
|
|
@@ -48,6 +48,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
48
48
|
private clearIconWidth;
|
|
49
49
|
private previousFilterText;
|
|
50
50
|
private selectedElementID;
|
|
51
|
+
private focusFirstListItem;
|
|
51
52
|
/**
|
|
52
53
|
* The `fields` property maps the columns of the data table and binds the data to the component.
|
|
53
54
|
* * text - Maps the text column from data table for each list item.
|
|
@@ -82,22 +83,25 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
82
83
|
* Accepts the template design and assigns it to the group headers present in the MultiSelect popup list.
|
|
83
84
|
*
|
|
84
85
|
* @default null
|
|
86
|
+
* @aspType string
|
|
85
87
|
*/
|
|
86
|
-
groupTemplate: string;
|
|
88
|
+
groupTemplate: string | Function;
|
|
87
89
|
/**
|
|
88
90
|
* Accepts the template design and assigns it to popup list of MultiSelect component
|
|
89
91
|
* when no data is available on the component.
|
|
90
92
|
*
|
|
91
93
|
* @default 'No records found'
|
|
94
|
+
* @aspType string
|
|
92
95
|
*/
|
|
93
|
-
noRecordsTemplate: string;
|
|
96
|
+
noRecordsTemplate: string | Function;
|
|
94
97
|
/**
|
|
95
98
|
* Accepts the template and assigns it to the popup list content of the MultiSelect component
|
|
96
99
|
* when the data fetch request from the remote server fails.
|
|
97
100
|
*
|
|
98
101
|
* @default 'Request failed'
|
|
102
|
+
* @aspType string
|
|
99
103
|
*/
|
|
100
|
-
actionFailureTemplate: string;
|
|
104
|
+
actionFailureTemplate: string | Function;
|
|
101
105
|
/**
|
|
102
106
|
* Specifies the `sortOrder` to sort the data source. The available type of sort orders are
|
|
103
107
|
* * `None` - The data source is not sorting.
|
|
@@ -263,22 +267,25 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
263
267
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
264
268
|
*
|
|
265
269
|
* @default null
|
|
270
|
+
* @aspType string
|
|
266
271
|
*/
|
|
267
|
-
valueTemplate: string;
|
|
272
|
+
valueTemplate: string | Function;
|
|
268
273
|
/**
|
|
269
274
|
* Accepts the template design and assigns it to the header container of the popup list.
|
|
270
275
|
* > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
|
|
271
276
|
*
|
|
272
277
|
* @default null
|
|
278
|
+
* @aspType string
|
|
273
279
|
*/
|
|
274
|
-
headerTemplate: string;
|
|
280
|
+
headerTemplate: string | Function;
|
|
275
281
|
/**
|
|
276
282
|
* Accepts the template design and assigns it to the footer container of the popup list.
|
|
277
283
|
* > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
|
|
278
284
|
*
|
|
279
285
|
* @default null
|
|
286
|
+
* @aspType string
|
|
280
287
|
*/
|
|
281
|
-
footerTemplate: string;
|
|
288
|
+
footerTemplate: string | Function;
|
|
282
289
|
/**
|
|
283
290
|
* Accepts the template design and assigns it to each list item present in the popup.
|
|
284
291
|
* > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
|
|
@@ -288,8 +295,9 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
288
295
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
289
296
|
*
|
|
290
297
|
* @default null
|
|
298
|
+
* @aspType string
|
|
291
299
|
*/
|
|
292
|
-
itemTemplate: string;
|
|
300
|
+
itemTemplate: string | Function;
|
|
293
301
|
/**
|
|
294
302
|
* To enable the filtering option in this component.
|
|
295
303
|
* Filter action performs when type in search box and collect the matched item through `filtering` event.
|
|
@@ -907,7 +907,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
907
907
|
parseInt(getComputedStyle(this.dropIcon).marginRight);
|
|
908
908
|
elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));
|
|
909
909
|
}
|
|
910
|
-
|
|
910
|
+
if (this.floatLabelType === 'Auto') {
|
|
911
|
+
Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
|
|
912
|
+
}
|
|
911
913
|
}
|
|
912
914
|
};
|
|
913
915
|
MultiSelect.prototype.checkPlaceholderSize = function () {
|
|
@@ -1257,6 +1259,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1257
1259
|
+ ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
1258
1260
|
}
|
|
1259
1261
|
var focuseElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
|
|
1262
|
+
this.focusFirstListItem = !isNullOrUndefined(this.liCollections[0]) ? this.liCollections[0].classList.contains('e-item-focus') : false;
|
|
1260
1263
|
var index = Array.prototype.slice.call(list).indexOf(focuseElem);
|
|
1261
1264
|
if (index <= 0 && (this.mode === 'CheckBox' && this.allowFiltering)) {
|
|
1262
1265
|
this.keyAction = false;
|
|
@@ -1380,6 +1383,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1380
1383
|
var limit = this.value && this.value.length ? this.value.length : 0;
|
|
1381
1384
|
var target;
|
|
1382
1385
|
if (li !== null) {
|
|
1386
|
+
e.preventDefault();
|
|
1383
1387
|
if (li.classList.contains('e-active')) {
|
|
1384
1388
|
limit = limit - 1;
|
|
1385
1389
|
}
|
|
@@ -1425,6 +1429,35 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1425
1429
|
this.hidePopup(e);
|
|
1426
1430
|
}
|
|
1427
1431
|
}
|
|
1432
|
+
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
1433
|
+
if (selectAllParent && !selectAllParent.classList.contains('e-item-focus')) {
|
|
1434
|
+
e.preventDefault();
|
|
1435
|
+
}
|
|
1436
|
+
if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
|
|
1437
|
+
var selectAllCheckBox = selectAllParent.childNodes[0];
|
|
1438
|
+
if (!selectAllCheckBox.classList.contains('e-check')) {
|
|
1439
|
+
selectAllCheckBox.classList.add('e-check');
|
|
1440
|
+
var args = {
|
|
1441
|
+
module: 'CheckBoxSelection',
|
|
1442
|
+
enable: this.mode === 'CheckBox',
|
|
1443
|
+
value: 'check',
|
|
1444
|
+
name: 'checkSelectAll'
|
|
1445
|
+
};
|
|
1446
|
+
this.notify('checkSelectAll', args);
|
|
1447
|
+
this.selectAllItem(true, e, li);
|
|
1448
|
+
}
|
|
1449
|
+
else {
|
|
1450
|
+
selectAllCheckBox.classList.remove('e-check');
|
|
1451
|
+
var args = {
|
|
1452
|
+
module: 'CheckBoxSelection',
|
|
1453
|
+
enable: this.mode === 'CheckBox',
|
|
1454
|
+
value: 'check',
|
|
1455
|
+
name: 'checkSelectAll'
|
|
1456
|
+
};
|
|
1457
|
+
this.notify('checkSelectAll', args);
|
|
1458
|
+
this.selectAllItem(false, e, li);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1428
1461
|
this.refreshPlaceHolder();
|
|
1429
1462
|
};
|
|
1430
1463
|
MultiSelect.prototype.refreshListItems = function (data) {
|
|
@@ -1484,7 +1517,17 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1484
1517
|
}
|
|
1485
1518
|
var selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
|
|
1486
1519
|
var temp = -1;
|
|
1487
|
-
|
|
1520
|
+
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
1521
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && position == 1 && !isNullOrUndefined(selectAllParent) && !selectAllParent.classList.contains('e-item-focus') && this.list.getElementsByClassName('e-item-focus').length == 0 && this.liCollections.length > 1) {
|
|
1522
|
+
selectAllParent.classList.add('e-item-focus');
|
|
1523
|
+
}
|
|
1524
|
+
else if (elements.length) {
|
|
1525
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && !isNullOrUndefined(selectAllParent)) {
|
|
1526
|
+
selectAllParent.classList.remove('e-item-focus');
|
|
1527
|
+
if (this.showSelectAll && position == -1 && !isNullOrUndefined(selectAllParent) && this.liCollections.length > 1 && (this.focusFirstListItem || this.list.getElementsByClassName('e-item-focus').length == 0)) {
|
|
1528
|
+
selectAllParent.classList.add('e-item-focus');
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1488
1531
|
for (var index = 0; index < elements.length; index++) {
|
|
1489
1532
|
if (elements[index] === selectedElem) {
|
|
1490
1533
|
temp = index;
|
|
@@ -1903,7 +1946,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1903
1946
|
};
|
|
1904
1947
|
MultiSelect.prototype.multiCompiler = function (multiselectTemplate) {
|
|
1905
1948
|
var checkTemplate = false;
|
|
1906
|
-
if (multiselectTemplate) {
|
|
1949
|
+
if (typeof multiselectTemplate !== 'function' && multiselectTemplate) {
|
|
1907
1950
|
try {
|
|
1908
1951
|
checkTemplate = (selectAll(multiselectTemplate, document).length) ? true : false;
|
|
1909
1952
|
}
|
|
@@ -1928,7 +1971,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1928
1971
|
}
|
|
1929
1972
|
if (this.valueTemplate && !isNullOrUndefined(itemData)) {
|
|
1930
1973
|
var valuecheck = this.multiCompiler(this.valueTemplate);
|
|
1931
|
-
if (valuecheck) {
|
|
1974
|
+
if (typeof this.valueTemplate !== 'function' && valuecheck) {
|
|
1932
1975
|
compiledString = compile(select(this.valueTemplate, document).innerHTML.trim());
|
|
1933
1976
|
}
|
|
1934
1977
|
else {
|
|
@@ -2132,7 +2175,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2132
2175
|
this.header = this.createElement('div');
|
|
2133
2176
|
addClass([this.header], HEADER);
|
|
2134
2177
|
var headercheck = this.multiCompiler(this.headerTemplate);
|
|
2135
|
-
if (headercheck) {
|
|
2178
|
+
if (typeof this.headerTemplate !== 'function' && headercheck) {
|
|
2136
2179
|
compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());
|
|
2137
2180
|
}
|
|
2138
2181
|
else {
|
|
@@ -2159,7 +2202,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2159
2202
|
this.footer = this.createElement('div');
|
|
2160
2203
|
addClass([this.footer], FOOTER);
|
|
2161
2204
|
var footercheck = this.multiCompiler(this.footerTemplate);
|
|
2162
|
-
if (footercheck) {
|
|
2205
|
+
if (typeof this.footerTemplate !== 'function' && footercheck) {
|
|
2163
2206
|
compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());
|
|
2164
2207
|
}
|
|
2165
2208
|
else {
|
|
@@ -2415,7 +2458,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2415
2458
|
if (delim) {
|
|
2416
2459
|
this.updateWrapperText(this.delimiterWrapper, data);
|
|
2417
2460
|
this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
|
|
2418
|
-
this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
|
|
2419
2461
|
this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
|
|
2420
2462
|
}
|
|
2421
2463
|
var targetEle = e && e.target;
|
|
@@ -3390,7 +3432,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3390
3432
|
this.hiddenElement.innerHTML = hiddenValue;
|
|
3391
3433
|
this.updateWrapperText(this.delimiterWrapper, wrapperText);
|
|
3392
3434
|
this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
|
|
3393
|
-
this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
|
|
3394
3435
|
this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
|
|
3395
3436
|
this.setProperties({ text: text.toString() }, true);
|
|
3396
3437
|
this.refreshInputHight();
|
|
@@ -3893,7 +3934,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3893
3934
|
}
|
|
3894
3935
|
});
|
|
3895
3936
|
if (this.mode === 'Default' || this.mode === 'Box') {
|
|
3896
|
-
this.inputElement.setAttribute('aria-
|
|
3937
|
+
this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
|
|
3897
3938
|
}
|
|
3898
3939
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
3899
3940
|
this.element.style.display = 'none';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './material3-definition.scss';
|