@syncfusion/ej2-ribbon 30.1.42 → 31.1.17
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/aceconfig.js +17 -0
- package/dist/ej2-ribbon.umd.min.js +1 -1
- package/dist/global/ej2-ribbon.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/index.d.ts +1 -0
- package/dist/ts/index.ts +3 -0
- package/dist/ts/ribbon/base/constant.d.ts +201 -0
- package/dist/ts/ribbon/base/constant.ts +204 -0
- package/dist/ts/ribbon/base/index.d.ts +8 -0
- package/dist/ts/ribbon/base/index.ts +8 -0
- package/dist/ts/ribbon/base/interface.d.ts +398 -0
- package/dist/ts/ribbon/base/interface.ts +424 -0
- package/dist/ts/ribbon/base/ribbon-model.d.ts +195 -0
- package/dist/ts/ribbon/base/ribbon.d.ts +608 -0
- package/dist/ts/ribbon/base/ribbon.ts +4896 -0
- package/dist/ts/ribbon/base/utils.d.ts +139 -0
- package/dist/ts/ribbon/base/utils.ts +341 -0
- package/dist/ts/ribbon/index.d.ts +7 -0
- package/dist/ts/ribbon/index.ts +7 -0
- package/dist/ts/ribbon/items/index.d.ts +8 -0
- package/dist/ts/ribbon/items/index.ts +8 -0
- package/dist/ts/ribbon/items/ribbon-button.d.ts +64 -0
- package/dist/ts/ribbon/items/ribbon-button.ts +160 -0
- package/dist/ts/ribbon/items/ribbon-checkbox.d.ts +55 -0
- package/dist/ts/ribbon/items/ribbon-checkbox.ts +130 -0
- package/dist/ts/ribbon/items/ribbon-colorpicker.d.ts +72 -0
- package/dist/ts/ribbon/items/ribbon-colorpicker.ts +228 -0
- package/dist/ts/ribbon/items/ribbon-combobox.d.ts +77 -0
- package/dist/ts/ribbon/items/ribbon-combobox.ts +201 -0
- package/dist/ts/ribbon/items/ribbon-dropdown.d.ts +128 -0
- package/dist/ts/ribbon/items/ribbon-dropdown.ts +400 -0
- package/dist/ts/ribbon/items/ribbon-gallery.d.ts +97 -0
- package/dist/ts/ribbon/items/ribbon-gallery.ts +773 -0
- package/dist/ts/ribbon/items/ribbon-groupbutton.d.ts +73 -0
- package/dist/ts/ribbon/items/ribbon-groupbutton.ts +531 -0
- package/dist/ts/ribbon/items/ribbon-splitbutton.d.ts +85 -0
- package/dist/ts/ribbon/items/ribbon-splitbutton.ts +257 -0
- package/dist/ts/ribbon/models/index.d.ts +42 -0
- package/dist/ts/ribbon/models/index.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-back-button-model.d.ts +29 -0
- package/dist/ts/ribbon/models/ribbon-back-button.d.ts +24 -0
- package/dist/ts/ribbon/models/ribbon-back-button.ts +31 -0
- package/dist/ts/ribbon/models/ribbon-back-stage-settings-model.d.ts +83 -0
- package/dist/ts/ribbon/models/ribbon-back-stage-settings.d.ts +81 -0
- package/dist/ts/ribbon/models/ribbon-back-stage-settings.ts +109 -0
- package/dist/ts/ribbon/models/ribbon-backstage-item-model.d.ts +69 -0
- package/dist/ts/ribbon/models/ribbon-backstage-item.d.ts +80 -0
- package/dist/ts/ribbon/models/ribbon-backstage-item.ts +102 -0
- package/dist/ts/ribbon/models/ribbon-button-settings-model.d.ts +64 -0
- package/dist/ts/ribbon/models/ribbon-button-settings.d.ts +63 -0
- package/dist/ts/ribbon/models/ribbon-button-settings.ts +80 -0
- package/dist/ts/ribbon/models/ribbon-checkbox-settings-model.d.ts +57 -0
- package/dist/ts/ribbon/models/ribbon-checkbox-settings.d.ts +58 -0
- package/dist/ts/ribbon/models/ribbon-checkbox-settings.ts +74 -0
- package/dist/ts/ribbon/models/ribbon-collection-model.d.ts +30 -0
- package/dist/ts/ribbon/models/ribbon-collection.d.ts +33 -0
- package/dist/ts/ribbon/models/ribbon-collection.ts +45 -0
- package/dist/ts/ribbon/models/ribbon-colorpicker-settings-model.d.ts +137 -0
- package/dist/ts/ribbon/models/ribbon-colorpicker-settings.d.ts +129 -0
- package/dist/ts/ribbon/models/ribbon-colorpicker-settings.ts +165 -0
- package/dist/ts/ribbon/models/ribbon-combobox-settings-model.d.ts +275 -0
- package/dist/ts/ribbon/models/ribbon-combobox-settings.d.ts +257 -0
- package/dist/ts/ribbon/models/ribbon-combobox-settings.ts +313 -0
- package/dist/ts/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +30 -0
- package/dist/ts/ribbon/models/ribbon-contextual-tab-settings.d.ts +33 -0
- package/dist/ts/ribbon/models/ribbon-contextual-tab-settings.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-dropdown-settings-model.d.ts +114 -0
- package/dist/ts/ribbon/models/ribbon-dropdown-settings.d.ts +107 -0
- package/dist/ts/ribbon/models/ribbon-dropdown-settings.ts +139 -0
- package/dist/ts/ribbon/models/ribbon-file-menu-settings-model.d.ts +123 -0
- package/dist/ts/ribbon/models/ribbon-file-menu-settings.d.ts +173 -0
- package/dist/ts/ribbon/models/ribbon-file-menu-settings.ts +220 -0
- package/dist/ts/ribbon/models/ribbon-gallery-group-model.d.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-gallery-group.d.ts +38 -0
- package/dist/ts/ribbon/models/ribbon-gallery-group.ts +50 -0
- package/dist/ts/ribbon/models/ribbon-gallery-item-model.d.ts +43 -0
- package/dist/ts/ribbon/models/ribbon-gallery-item.d.ts +38 -0
- package/dist/ts/ribbon/models/ribbon-gallery-item.ts +47 -0
- package/dist/ts/ribbon/models/ribbon-gallery-settings-model.d.ts +108 -0
- package/dist/ts/ribbon/models/ribbon-gallery-settings.d.ts +95 -0
- package/dist/ts/ribbon/models/ribbon-gallery-settings.ts +123 -0
- package/dist/ts/ribbon/models/ribbon-group-button-item-model.d.ts +64 -0
- package/dist/ts/ribbon/models/ribbon-group-button-item.d.ts +65 -0
- package/dist/ts/ribbon/models/ribbon-group-button-item.ts +85 -0
- package/dist/ts/ribbon/models/ribbon-group-button-settings-model.d.ts +32 -0
- package/dist/ts/ribbon/models/ribbon-group-button-settings.d.ts +29 -0
- package/dist/ts/ribbon/models/ribbon-group-button-settings.ts +38 -0
- package/dist/ts/ribbon/models/ribbon-group-model.d.ts +112 -0
- package/dist/ts/ribbon/models/ribbon-group.d.ts +105 -0
- package/dist/ts/ribbon/models/ribbon-group.ts +138 -0
- package/dist/ts/ribbon/models/ribbon-item-model.d.ts +144 -0
- package/dist/ts/ribbon/models/ribbon-item.d.ts +141 -0
- package/dist/ts/ribbon/models/ribbon-item.ts +190 -0
- package/dist/ts/ribbon/models/ribbon-splitbutton-settings-model.d.ts +114 -0
- package/dist/ts/ribbon/models/ribbon-splitbutton-settings.d.ts +107 -0
- package/dist/ts/ribbon/models/ribbon-splitbutton-settings.ts +140 -0
- package/dist/ts/ribbon/models/ribbon-tab-model.d.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-tab.d.ts +45 -0
- package/dist/ts/ribbon/models/ribbon-tab.ts +61 -0
- package/dist/ts/ribbon/models/ribbon-tooltip-model.d.ts +43 -0
- package/dist/ts/ribbon/models/ribbon-tooltip.d.ts +36 -0
- package/dist/ts/ribbon/models/ribbon-tooltip.ts +47 -0
- package/dist/ts/ribbon/modules/index.d.ts +4 -0
- package/dist/ts/ribbon/modules/index.ts +5 -0
- package/dist/ts/ribbon/modules/ribbon-backstage.d.ts +117 -0
- package/dist/ts/ribbon/modules/ribbon-backstage.ts +620 -0
- package/dist/ts/ribbon/modules/ribbon-contextualtab.d.ts +27 -0
- package/dist/ts/ribbon/modules/ribbon-contextualtab.ts +93 -0
- package/dist/ts/ribbon/modules/ribbon-filemenu.d.ts +96 -0
- package/dist/ts/ribbon/modules/ribbon-filemenu.ts +353 -0
- package/dist/ts/ribbon/modules/ribbon-keytip.d.ts +56 -0
- package/dist/ts/ribbon/modules/ribbon-keytip.ts +580 -0
- package/package.json +55 -19
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { FieldSettingsModel } from '@syncfusion/ej2-dropdowns';
|
|
2
|
+
import { Query } from '@syncfusion/ej2-data';
|
|
3
|
+
import { RibbonComboBoxSettingsModel, RibbonItemModel } from '../models/index';
|
|
4
|
+
import { Ribbon } from '../base/index';
|
|
5
|
+
import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
|
|
6
|
+
/**
|
|
7
|
+
* Defines the items of Ribbon.
|
|
8
|
+
*/
|
|
9
|
+
export declare class RibbonComboBox {
|
|
10
|
+
private parent;
|
|
11
|
+
constructor(parent: Ribbon);
|
|
12
|
+
protected getModuleName(): string;
|
|
13
|
+
protected destroy(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Creates the combobox.
|
|
16
|
+
*
|
|
17
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
18
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
19
|
+
* @returns {void}
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
createComboBox(item: RibbonItemModel, itemEle: HTMLElement): void;
|
|
23
|
+
/**
|
|
24
|
+
* Adds the additional event handlers as the item moved into overflow popup.
|
|
25
|
+
*
|
|
26
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
27
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
28
|
+
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
29
|
+
* @returns {void}
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
addOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement, overflowButton: DropDownButton): void;
|
|
33
|
+
/**
|
|
34
|
+
* Removes the additional event handlers as the item moved from overflow popup.
|
|
35
|
+
*
|
|
36
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
37
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
38
|
+
* @returns {void}
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
removeOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement): void;
|
|
42
|
+
private getComboBoxObj;
|
|
43
|
+
/**
|
|
44
|
+
* To filter the data from given data source by using query
|
|
45
|
+
*
|
|
46
|
+
* @param {string } controlId - set the id of the control in which methods needs to be called.
|
|
47
|
+
* @param {Object[] } dataSource - Set the data source to filter.
|
|
48
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
49
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
50
|
+
* @returns {void}
|
|
51
|
+
*/
|
|
52
|
+
filter(controlId: string, dataSource: {
|
|
53
|
+
[key: string]: Object;
|
|
54
|
+
}[] | string[] | number[] | boolean[], query?: Query, fields?: FieldSettingsModel): void;
|
|
55
|
+
/**
|
|
56
|
+
* To open/close DropDownButton popup based on current state of the combobox.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} controlId - Gets the id of the control.
|
|
59
|
+
* @returns {void}
|
|
60
|
+
*/
|
|
61
|
+
hidePopup(controlId: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* To open/close DropDownButton popup based on current state of the combobox.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} controlId - Gets the id of the control.
|
|
66
|
+
* @returns {void}
|
|
67
|
+
*/
|
|
68
|
+
showPopup(controlId: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Updates the combobox properties.
|
|
71
|
+
*
|
|
72
|
+
* @param {RibbonComboBoxSettingsModel} prop - Gets the combobox property.
|
|
73
|
+
* @param {string} id - Gets the ID of combobox.
|
|
74
|
+
* @returns {void}
|
|
75
|
+
*/
|
|
76
|
+
updateComboBox(prop: RibbonComboBoxSettingsModel, id: string): void;
|
|
77
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { getComponent, merge } from '@syncfusion/ej2-base';
|
|
2
|
+
import { ComboBox, FieldSettingsModel, PopupEventArgs } from '@syncfusion/ej2-dropdowns';
|
|
3
|
+
import { Query } from '@syncfusion/ej2-data';
|
|
4
|
+
import { RibbonComboBoxSettingsModel, RibbonItemModel } from '../models/index';
|
|
5
|
+
import { itemProps, getItem, Ribbon, getItemElement, RIBBON_CONTROL, SPACE, RIBBON_POPUP_CONTROL } from '../base/index';
|
|
6
|
+
import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Defines the items of Ribbon.
|
|
10
|
+
*/
|
|
11
|
+
export class RibbonComboBox {
|
|
12
|
+
private parent: Ribbon;
|
|
13
|
+
|
|
14
|
+
constructor(parent: Ribbon) {
|
|
15
|
+
this.parent = parent;
|
|
16
|
+
}
|
|
17
|
+
protected getModuleName(): string {
|
|
18
|
+
return 'ribbonComboBox';
|
|
19
|
+
}
|
|
20
|
+
protected destroy(): void {
|
|
21
|
+
this.parent = null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Creates the combobox.
|
|
26
|
+
*
|
|
27
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
28
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
29
|
+
* @returns {void}
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
public createComboBox(item: RibbonItemModel, itemEle: HTMLElement): void {
|
|
33
|
+
const inputEle: HTMLInputElement = this.parent.createElement('input', {
|
|
34
|
+
id: item.id
|
|
35
|
+
});
|
|
36
|
+
itemEle.appendChild(inputEle);
|
|
37
|
+
const comboBoxSettings: RibbonComboBoxSettingsModel = item.comboBoxSettings;
|
|
38
|
+
if (comboBoxSettings.htmlAttributes) {
|
|
39
|
+
if (comboBoxSettings.htmlAttributes.id) {
|
|
40
|
+
delete comboBoxSettings.htmlAttributes.id;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
new ComboBox({
|
|
44
|
+
locale: this.parent.locale,
|
|
45
|
+
enableRtl: this.parent.enableRtl,
|
|
46
|
+
enablePersistence: this.parent.enablePersistence,
|
|
47
|
+
allowCustom: false,
|
|
48
|
+
floatLabelType: 'Never',
|
|
49
|
+
ignoreAccent: true,
|
|
50
|
+
ignoreCase: true,
|
|
51
|
+
allowFiltering: comboBoxSettings.allowFiltering,
|
|
52
|
+
autofill: comboBoxSettings.autofill,
|
|
53
|
+
cssClass: (RIBBON_CONTROL + SPACE + (comboBoxSettings.cssClass ? comboBoxSettings.cssClass : '')).trim(),
|
|
54
|
+
dataSource: comboBoxSettings.dataSource,
|
|
55
|
+
enabled: !item.disabled,
|
|
56
|
+
fields: comboBoxSettings.fields,
|
|
57
|
+
filterType: comboBoxSettings.filterType,
|
|
58
|
+
footerTemplate: comboBoxSettings.footerTemplate as string | Function,
|
|
59
|
+
groupTemplate: comboBoxSettings.groupTemplate as string | Function,
|
|
60
|
+
headerTemplate: comboBoxSettings.headerTemplate as string | Function,
|
|
61
|
+
index: comboBoxSettings.index,
|
|
62
|
+
itemTemplate: comboBoxSettings.itemTemplate as string | Function,
|
|
63
|
+
noRecordsTemplate: comboBoxSettings.noRecordsTemplate as string | Function,
|
|
64
|
+
placeholder: comboBoxSettings.placeholder,
|
|
65
|
+
popupHeight: comboBoxSettings.popupHeight,
|
|
66
|
+
popupWidth: comboBoxSettings.popupWidth,
|
|
67
|
+
showClearButton: comboBoxSettings.showClearButton,
|
|
68
|
+
sortOrder: comboBoxSettings.sortOrder,
|
|
69
|
+
text: comboBoxSettings.text,
|
|
70
|
+
value: comboBoxSettings.value,
|
|
71
|
+
width: comboBoxSettings.width,
|
|
72
|
+
beforeOpen: comboBoxSettings.beforeOpen,
|
|
73
|
+
open: comboBoxSettings.open,
|
|
74
|
+
htmlAttributes: comboBoxSettings.htmlAttributes,
|
|
75
|
+
close: (e: PopupEventArgs) => {
|
|
76
|
+
if (comboBoxSettings.close) { comboBoxSettings.close.call(this, e); }
|
|
77
|
+
},
|
|
78
|
+
filtering: comboBoxSettings.filtering,
|
|
79
|
+
change: comboBoxSettings.change,
|
|
80
|
+
select: comboBoxSettings.select,
|
|
81
|
+
created: comboBoxSettings.created
|
|
82
|
+
}, inputEle);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Adds the additional event handlers as the item moved into overflow popup.
|
|
86
|
+
*
|
|
87
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
88
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
89
|
+
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
90
|
+
* @returns {void}
|
|
91
|
+
* @hidden
|
|
92
|
+
*/
|
|
93
|
+
public addOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement, overflowButton: DropDownButton): void {
|
|
94
|
+
const comboBoxSettings: RibbonComboBoxSettingsModel = item.comboBoxSettings;
|
|
95
|
+
if (comboBoxSettings.label && this.parent.activeLayout === 'Simplified') {
|
|
96
|
+
const label: HTMLElement = this.parent.createElement('div', {
|
|
97
|
+
className: 'e-ribbon-combobox-label',
|
|
98
|
+
id: item.id + '_label',
|
|
99
|
+
innerHTML: comboBoxSettings.label
|
|
100
|
+
});
|
|
101
|
+
itemEle.insertBefore(label, itemEle.firstChild);
|
|
102
|
+
}
|
|
103
|
+
const inputEle: HTMLElement = itemEle.querySelector('#' + item.id);
|
|
104
|
+
inputEle.setAttribute('data-control', item.type.toString());
|
|
105
|
+
const comboBoxObj: ComboBox = getComponent(inputEle, ComboBox);
|
|
106
|
+
comboBoxObj.setProperties({ cssClass: comboBoxObj.cssClass + SPACE + RIBBON_POPUP_CONTROL });
|
|
107
|
+
comboBoxObj.close = (e: PopupEventArgs) => {
|
|
108
|
+
const target: HTMLElement = (e.event as MouseEvent) ? (e.event as MouseEvent).target as HTMLElement : null;
|
|
109
|
+
if (item.comboBoxSettings.close) { item.comboBoxSettings.close.call(this, e); }
|
|
110
|
+
if (target && !target.closest('.e-ribbon-group-overflow-ddb')) {
|
|
111
|
+
if (overflowButton.element.classList.contains('e-active')) {
|
|
112
|
+
overflowButton.toggle();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Removes the additional event handlers as the item moved from overflow popup.
|
|
119
|
+
*
|
|
120
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
121
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
122
|
+
* @returns {void}
|
|
123
|
+
* @hidden
|
|
124
|
+
*/
|
|
125
|
+
public removeOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement): void {
|
|
126
|
+
const comboBoxSettings: RibbonComboBoxSettingsModel = item.comboBoxSettings;
|
|
127
|
+
if (comboBoxSettings.label) {
|
|
128
|
+
const label: HTMLElement = itemEle.querySelector('#' + item.id + '_label');
|
|
129
|
+
if (label) {
|
|
130
|
+
label.remove();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const inputEle: HTMLElement = itemEle.querySelector('#' + item.id);
|
|
134
|
+
const comboBoxObj: ComboBox = getComponent(inputEle, ComboBox);
|
|
135
|
+
let cssClass: string[] = comboBoxObj.cssClass.split(SPACE);
|
|
136
|
+
cssClass = cssClass.filter((value: string) => value !== RIBBON_POPUP_CONTROL);
|
|
137
|
+
comboBoxObj.setProperties({ cssClass: cssClass.join(SPACE) });
|
|
138
|
+
comboBoxObj.close = (e: PopupEventArgs) => {
|
|
139
|
+
if (item.comboBoxSettings.close) { item.comboBoxSettings.close.call(this, e); }
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
private getComboBoxObj(controlId: string): ComboBox {
|
|
143
|
+
const inputEle: HTMLElement = getItemElement(this.parent, controlId);
|
|
144
|
+
return inputEle ? getComponent(inputEle, ComboBox) : null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* To filter the data from given data source by using query
|
|
148
|
+
*
|
|
149
|
+
* @param {string } controlId - set the id of the control in which methods needs to be called.
|
|
150
|
+
* @param {Object[] } dataSource - Set the data source to filter.
|
|
151
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
152
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
153
|
+
* @returns {void}
|
|
154
|
+
*/
|
|
155
|
+
public filter(
|
|
156
|
+
controlId: string,
|
|
157
|
+
dataSource: { [key: string]: Object }[] | string[] | number[] | boolean[],
|
|
158
|
+
query?: Query, fields?: FieldSettingsModel): void {
|
|
159
|
+
this.getComboBoxObj(controlId).filter(dataSource, query, fields);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* To open/close DropDownButton popup based on current state of the combobox.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} controlId - Gets the id of the control.
|
|
165
|
+
* @returns {void}
|
|
166
|
+
*/
|
|
167
|
+
public hidePopup(controlId: string): void {
|
|
168
|
+
const comboBoxObj: ComboBox = this.getComboBoxObj(controlId);
|
|
169
|
+
if (!comboBoxObj) { return; }
|
|
170
|
+
comboBoxObj.hidePopup();
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* To open/close DropDownButton popup based on current state of the combobox.
|
|
174
|
+
*
|
|
175
|
+
* @param {string} controlId - Gets the id of the control.
|
|
176
|
+
* @returns {void}
|
|
177
|
+
*/
|
|
178
|
+
public showPopup(controlId: string): void {
|
|
179
|
+
const comboBoxObj: ComboBox = this.getComboBoxObj(controlId);
|
|
180
|
+
if (!comboBoxObj) { return; }
|
|
181
|
+
comboBoxObj.showPopup();
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Updates the combobox properties.
|
|
185
|
+
*
|
|
186
|
+
* @param {RibbonComboBoxSettingsModel} prop - Gets the combobox property.
|
|
187
|
+
* @param {string} id - Gets the ID of combobox.
|
|
188
|
+
* @returns {void}
|
|
189
|
+
*/
|
|
190
|
+
public updateComboBox(prop: RibbonComboBoxSettingsModel, id: string): void {
|
|
191
|
+
const itemProp: itemProps = getItem(this.parent.tabs, id);
|
|
192
|
+
if (!itemProp) { return; }
|
|
193
|
+
merge(itemProp.item.comboBoxSettings, prop);
|
|
194
|
+
const inputEle: HTMLElement = getItemElement(this.parent, id, itemProp);
|
|
195
|
+
if (!inputEle) { return; }
|
|
196
|
+
if (prop.cssClass) { prop.cssClass = (RIBBON_CONTROL + SPACE + prop.cssClass).trim(); }
|
|
197
|
+
delete prop.close;
|
|
198
|
+
const comboBoxObj: ComboBox = getComponent(inputEle, ComboBox);
|
|
199
|
+
comboBoxObj.setProperties(prop);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { DropDownButton, ItemModel } from '@syncfusion/ej2-splitbuttons';
|
|
2
|
+
import { Ribbon, itemProps } from '../base/index';
|
|
3
|
+
import { RibbonDropDownSettingsModel, RibbonItemModel } from '../models/index';
|
|
4
|
+
/**
|
|
5
|
+
* Defines the items of Ribbon.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RibbonDropDown {
|
|
8
|
+
private parent;
|
|
9
|
+
constructor(parent: Ribbon);
|
|
10
|
+
protected getModuleName(): string;
|
|
11
|
+
protected destroy(): void;
|
|
12
|
+
private itemIndex;
|
|
13
|
+
private enableRtl;
|
|
14
|
+
/**
|
|
15
|
+
* Creates DropDown.
|
|
16
|
+
*
|
|
17
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
18
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
19
|
+
* @returns {void}
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
createDropDown(item: RibbonItemModel, itemEle: HTMLElement): void;
|
|
23
|
+
/**
|
|
24
|
+
* Adds the additional event handlers as the item moved into overflow popup.
|
|
25
|
+
*
|
|
26
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
27
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
28
|
+
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
29
|
+
* @returns {void}
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
addOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement, overflowButton: DropDownButton): void;
|
|
33
|
+
/**
|
|
34
|
+
* Removes the additional event handlers as the item moved from overflow popup.
|
|
35
|
+
*
|
|
36
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
37
|
+
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
38
|
+
* @returns {void}
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
removeOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement): void;
|
|
42
|
+
/**
|
|
43
|
+
* Creates Overflow DropDown.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} id - Gets the ID of the dropdown item.
|
|
46
|
+
* @param {string} name - Gets the name of the dropdown item.
|
|
47
|
+
* @param {string} iconCss - Gets the icon of the dropdown item.
|
|
48
|
+
* @param {HTMLElement} groupEle - Gets the overflow group element.
|
|
49
|
+
* @param {HTMLElement} overflowEle - Gets the overflow element.
|
|
50
|
+
* @returns {void}
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
createOverFlowDropDown(id: string, name: string, iconCss: string, groupEle: HTMLElement, overflowEle: HTMLElement, enableRtl?: boolean): DropDownButton;
|
|
54
|
+
private keyActionHandler;
|
|
55
|
+
private handleNavigation;
|
|
56
|
+
private focusLauncherIcon;
|
|
57
|
+
private updateItemIndex;
|
|
58
|
+
/**
|
|
59
|
+
* Removes Overflow DropDown.
|
|
60
|
+
*
|
|
61
|
+
* @param {HTMLElement} dropdownElement - Gets the ribbon DropDown element.
|
|
62
|
+
* @returns {void}
|
|
63
|
+
* @hidden
|
|
64
|
+
*/
|
|
65
|
+
removeOverFlowDropDown(dropdownElement: HTMLElement): void;
|
|
66
|
+
/**
|
|
67
|
+
* Gets DropDown item element.
|
|
68
|
+
*
|
|
69
|
+
* @param {HTMLElement} dropdownElement - Gets the ribbon DropDown element.
|
|
70
|
+
* @param {string} id - Gets the ID of ribbon DropDown element.
|
|
71
|
+
* @returns {HTMLElement} - Returns the DropDown item element.
|
|
72
|
+
* @hidden
|
|
73
|
+
*/
|
|
74
|
+
getDDBItemElement(dropdownElement: HTMLElement, id: string): HTMLElement;
|
|
75
|
+
/**
|
|
76
|
+
* Gets Overflow DropDown Popup.
|
|
77
|
+
*
|
|
78
|
+
* @param {itemProps} itemProp - Gets the property of ribbon item.
|
|
79
|
+
* @param {HTMLElement} contentEle - Gets the content element.
|
|
80
|
+
* @returns {HTMLElement} - Returns the Overflow DropDown Popup.
|
|
81
|
+
* @hidden
|
|
82
|
+
*/
|
|
83
|
+
getOverflowDropDownPopup(itemProp: itemProps, contentEle: HTMLElement): HTMLElement;
|
|
84
|
+
private getDropDownObj;
|
|
85
|
+
/**
|
|
86
|
+
* Adds a new item to the menu. By default, new item appends to
|
|
87
|
+
* the list as the last item, but you can insert based on the text parameter.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} controlId - Gets the control ID.
|
|
90
|
+
* @param {ItemModel[]} Items - Gets the DropDown items.
|
|
91
|
+
* @param {string} text - Gets the text of the dropdown item where the new item needs to be inserted.
|
|
92
|
+
* @returns {void}
|
|
93
|
+
*/
|
|
94
|
+
addItems(controlId: string, Items: ItemModel[], text?: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Removes the items from the menu.
|
|
97
|
+
*
|
|
98
|
+
* @param {string} controlId - Gets the control ID.
|
|
99
|
+
* @param {string[]} Items -
|
|
100
|
+
* @param {string} isUniqueId -
|
|
101
|
+
* @returns {void}
|
|
102
|
+
*/
|
|
103
|
+
removeItems(controlId: string, Items: string[], isUniqueId?: boolean): void;
|
|
104
|
+
/**
|
|
105
|
+
* To open/close DropDownButton popup based on current state of the DropDownButton.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} controlId - Gets the control ID.
|
|
108
|
+
* @returns {void}
|
|
109
|
+
*/
|
|
110
|
+
toggle(controlId: string): void;
|
|
111
|
+
/**
|
|
112
|
+
* Updates the dropdown.
|
|
113
|
+
*
|
|
114
|
+
* @param {RibbonDropDownSettingsModel} prop - Gets the dropdown property.
|
|
115
|
+
* @param {string} id - Gets the ID of dropdown.
|
|
116
|
+
* @returns {void}
|
|
117
|
+
*/
|
|
118
|
+
updateDropDown(prop: RibbonDropDownSettingsModel, id: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Updated DropDown size
|
|
121
|
+
*
|
|
122
|
+
* @param {HTMLElement} element - Gets the dropdown element.
|
|
123
|
+
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
124
|
+
* @returns {void}
|
|
125
|
+
* @hidden
|
|
126
|
+
*/
|
|
127
|
+
updateDropDownSize(element: HTMLElement, item: RibbonItemModel): void;
|
|
128
|
+
}
|