@syncfusion/ej2-ribbon 31.1.17 → 31.2.2

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.
Files changed (186) hide show
  1. package/dist/ej2-ribbon.umd.min.js +3 -3
  2. package/dist/ej2-ribbon.umd.min.js.map +1 -1
  3. package/dist/es6/ej2-ribbon.es2015.js +24 -5
  4. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  5. package/dist/es6/ej2-ribbon.es5.js +24 -5
  6. package/dist/es6/ej2-ribbon.es5.js.map +1 -1
  7. package/dist/global/ej2-ribbon.min.js +3 -3
  8. package/dist/global/ej2-ribbon.min.js.map +1 -1
  9. package/dist/global/index.d.ts +2 -2
  10. package/package.json +19 -55
  11. package/src/ribbon/base/ribbon-model.d.ts +1 -1
  12. package/src/ribbon/base/ribbon.js +14 -5
  13. package/src/ribbon/items/ribbon-splitbutton.js +11 -0
  14. package/styles/bds-lite.css +9 -0
  15. package/styles/bds.css +9 -0
  16. package/styles/bootstrap-dark-lite.css +9 -0
  17. package/styles/bootstrap-dark.css +9 -0
  18. package/styles/bootstrap-lite.css +9 -0
  19. package/styles/bootstrap.css +9 -0
  20. package/styles/bootstrap4-lite.css +17 -0
  21. package/styles/bootstrap4.css +17 -0
  22. package/styles/bootstrap5-dark-lite.css +9 -0
  23. package/styles/bootstrap5-dark.css +9 -0
  24. package/styles/bootstrap5-lite.css +9 -0
  25. package/styles/bootstrap5.3-lite.css +9 -0
  26. package/styles/bootstrap5.3.css +9 -0
  27. package/styles/bootstrap5.css +9 -0
  28. package/styles/fabric-dark-lite.css +9 -0
  29. package/styles/fabric-dark.css +9 -0
  30. package/styles/fabric-lite.css +9 -0
  31. package/styles/fabric.css +9 -0
  32. package/styles/fluent-dark-lite.css +9 -0
  33. package/styles/fluent-dark.css +9 -0
  34. package/styles/fluent-lite.css +9 -0
  35. package/styles/fluent.css +9 -0
  36. package/styles/fluent2-lite.css +11 -2
  37. package/styles/fluent2.css +11 -2
  38. package/styles/highcontrast-light-lite.css +9 -0
  39. package/styles/highcontrast-light.css +9 -0
  40. package/styles/highcontrast-lite.css +9 -0
  41. package/styles/highcontrast.css +9 -0
  42. package/styles/material-dark-lite.css +9 -0
  43. package/styles/material-dark.css +9 -0
  44. package/styles/material-lite.css +9 -0
  45. package/styles/material.css +9 -0
  46. package/styles/material3-dark-lite.css +9 -0
  47. package/styles/material3-dark.css +9 -0
  48. package/styles/material3-lite.css +9 -0
  49. package/styles/material3.css +9 -0
  50. package/styles/ribbon/_fluent2-definition.scss +2 -2
  51. package/styles/ribbon/_layout.scss +7 -0
  52. package/styles/ribbon/bds.css +9 -0
  53. package/styles/ribbon/bootstrap-dark.css +9 -0
  54. package/styles/ribbon/bootstrap.css +9 -0
  55. package/styles/ribbon/bootstrap4.css +17 -0
  56. package/styles/ribbon/bootstrap5-dark.css +9 -0
  57. package/styles/ribbon/bootstrap5.3.css +9 -0
  58. package/styles/ribbon/bootstrap5.css +9 -0
  59. package/styles/ribbon/fabric-dark.css +9 -0
  60. package/styles/ribbon/fabric.css +9 -0
  61. package/styles/ribbon/fluent-dark.css +9 -0
  62. package/styles/ribbon/fluent.css +9 -0
  63. package/styles/ribbon/fluent2.css +11 -2
  64. package/styles/ribbon/highcontrast-light.css +9 -0
  65. package/styles/ribbon/highcontrast.css +9 -0
  66. package/styles/ribbon/material-dark.css +9 -0
  67. package/styles/ribbon/material.css +9 -0
  68. package/styles/ribbon/material3-dark.css +9 -0
  69. package/styles/ribbon/material3.css +9 -0
  70. package/styles/ribbon/tailwind-dark.css +9 -0
  71. package/styles/ribbon/tailwind.css +9 -0
  72. package/styles/ribbon/tailwind3.css +9 -0
  73. package/styles/tailwind-dark-lite.css +9 -0
  74. package/styles/tailwind-dark.css +9 -0
  75. package/styles/tailwind-lite.css +9 -0
  76. package/styles/tailwind.css +9 -0
  77. package/styles/tailwind3-lite.css +9 -0
  78. package/styles/tailwind3.css +9 -0
  79. package/dist/ts/index.d.ts +0 -1
  80. package/dist/ts/index.ts +0 -3
  81. package/dist/ts/ribbon/base/constant.d.ts +0 -201
  82. package/dist/ts/ribbon/base/constant.ts +0 -204
  83. package/dist/ts/ribbon/base/index.d.ts +0 -8
  84. package/dist/ts/ribbon/base/index.ts +0 -8
  85. package/dist/ts/ribbon/base/interface.d.ts +0 -398
  86. package/dist/ts/ribbon/base/interface.ts +0 -424
  87. package/dist/ts/ribbon/base/ribbon-model.d.ts +0 -195
  88. package/dist/ts/ribbon/base/ribbon.d.ts +0 -608
  89. package/dist/ts/ribbon/base/ribbon.ts +0 -4896
  90. package/dist/ts/ribbon/base/utils.d.ts +0 -139
  91. package/dist/ts/ribbon/base/utils.ts +0 -341
  92. package/dist/ts/ribbon/index.d.ts +0 -7
  93. package/dist/ts/ribbon/index.ts +0 -7
  94. package/dist/ts/ribbon/items/index.d.ts +0 -8
  95. package/dist/ts/ribbon/items/index.ts +0 -8
  96. package/dist/ts/ribbon/items/ribbon-button.d.ts +0 -64
  97. package/dist/ts/ribbon/items/ribbon-button.ts +0 -160
  98. package/dist/ts/ribbon/items/ribbon-checkbox.d.ts +0 -55
  99. package/dist/ts/ribbon/items/ribbon-checkbox.ts +0 -130
  100. package/dist/ts/ribbon/items/ribbon-colorpicker.d.ts +0 -72
  101. package/dist/ts/ribbon/items/ribbon-colorpicker.ts +0 -228
  102. package/dist/ts/ribbon/items/ribbon-combobox.d.ts +0 -77
  103. package/dist/ts/ribbon/items/ribbon-combobox.ts +0 -201
  104. package/dist/ts/ribbon/items/ribbon-dropdown.d.ts +0 -128
  105. package/dist/ts/ribbon/items/ribbon-dropdown.ts +0 -400
  106. package/dist/ts/ribbon/items/ribbon-gallery.d.ts +0 -97
  107. package/dist/ts/ribbon/items/ribbon-gallery.ts +0 -773
  108. package/dist/ts/ribbon/items/ribbon-groupbutton.d.ts +0 -73
  109. package/dist/ts/ribbon/items/ribbon-groupbutton.ts +0 -531
  110. package/dist/ts/ribbon/items/ribbon-splitbutton.d.ts +0 -85
  111. package/dist/ts/ribbon/items/ribbon-splitbutton.ts +0 -257
  112. package/dist/ts/ribbon/models/index.d.ts +0 -42
  113. package/dist/ts/ribbon/models/index.ts +0 -44
  114. package/dist/ts/ribbon/models/ribbon-back-button-model.d.ts +0 -29
  115. package/dist/ts/ribbon/models/ribbon-back-button.d.ts +0 -24
  116. package/dist/ts/ribbon/models/ribbon-back-button.ts +0 -31
  117. package/dist/ts/ribbon/models/ribbon-back-stage-settings-model.d.ts +0 -83
  118. package/dist/ts/ribbon/models/ribbon-back-stage-settings.d.ts +0 -81
  119. package/dist/ts/ribbon/models/ribbon-back-stage-settings.ts +0 -109
  120. package/dist/ts/ribbon/models/ribbon-backstage-item-model.d.ts +0 -69
  121. package/dist/ts/ribbon/models/ribbon-backstage-item.d.ts +0 -80
  122. package/dist/ts/ribbon/models/ribbon-backstage-item.ts +0 -102
  123. package/dist/ts/ribbon/models/ribbon-button-settings-model.d.ts +0 -64
  124. package/dist/ts/ribbon/models/ribbon-button-settings.d.ts +0 -63
  125. package/dist/ts/ribbon/models/ribbon-button-settings.ts +0 -80
  126. package/dist/ts/ribbon/models/ribbon-checkbox-settings-model.d.ts +0 -57
  127. package/dist/ts/ribbon/models/ribbon-checkbox-settings.d.ts +0 -58
  128. package/dist/ts/ribbon/models/ribbon-checkbox-settings.ts +0 -74
  129. package/dist/ts/ribbon/models/ribbon-collection-model.d.ts +0 -30
  130. package/dist/ts/ribbon/models/ribbon-collection.d.ts +0 -33
  131. package/dist/ts/ribbon/models/ribbon-collection.ts +0 -45
  132. package/dist/ts/ribbon/models/ribbon-colorpicker-settings-model.d.ts +0 -137
  133. package/dist/ts/ribbon/models/ribbon-colorpicker-settings.d.ts +0 -129
  134. package/dist/ts/ribbon/models/ribbon-colorpicker-settings.ts +0 -165
  135. package/dist/ts/ribbon/models/ribbon-combobox-settings-model.d.ts +0 -275
  136. package/dist/ts/ribbon/models/ribbon-combobox-settings.d.ts +0 -257
  137. package/dist/ts/ribbon/models/ribbon-combobox-settings.ts +0 -313
  138. package/dist/ts/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +0 -30
  139. package/dist/ts/ribbon/models/ribbon-contextual-tab-settings.d.ts +0 -33
  140. package/dist/ts/ribbon/models/ribbon-contextual-tab-settings.ts +0 -44
  141. package/dist/ts/ribbon/models/ribbon-dropdown-settings-model.d.ts +0 -114
  142. package/dist/ts/ribbon/models/ribbon-dropdown-settings.d.ts +0 -107
  143. package/dist/ts/ribbon/models/ribbon-dropdown-settings.ts +0 -139
  144. package/dist/ts/ribbon/models/ribbon-file-menu-settings-model.d.ts +0 -123
  145. package/dist/ts/ribbon/models/ribbon-file-menu-settings.d.ts +0 -173
  146. package/dist/ts/ribbon/models/ribbon-file-menu-settings.ts +0 -220
  147. package/dist/ts/ribbon/models/ribbon-gallery-group-model.d.ts +0 -44
  148. package/dist/ts/ribbon/models/ribbon-gallery-group.d.ts +0 -38
  149. package/dist/ts/ribbon/models/ribbon-gallery-group.ts +0 -50
  150. package/dist/ts/ribbon/models/ribbon-gallery-item-model.d.ts +0 -43
  151. package/dist/ts/ribbon/models/ribbon-gallery-item.d.ts +0 -38
  152. package/dist/ts/ribbon/models/ribbon-gallery-item.ts +0 -47
  153. package/dist/ts/ribbon/models/ribbon-gallery-settings-model.d.ts +0 -108
  154. package/dist/ts/ribbon/models/ribbon-gallery-settings.d.ts +0 -95
  155. package/dist/ts/ribbon/models/ribbon-gallery-settings.ts +0 -123
  156. package/dist/ts/ribbon/models/ribbon-group-button-item-model.d.ts +0 -64
  157. package/dist/ts/ribbon/models/ribbon-group-button-item.d.ts +0 -65
  158. package/dist/ts/ribbon/models/ribbon-group-button-item.ts +0 -85
  159. package/dist/ts/ribbon/models/ribbon-group-button-settings-model.d.ts +0 -32
  160. package/dist/ts/ribbon/models/ribbon-group-button-settings.d.ts +0 -29
  161. package/dist/ts/ribbon/models/ribbon-group-button-settings.ts +0 -38
  162. package/dist/ts/ribbon/models/ribbon-group-model.d.ts +0 -112
  163. package/dist/ts/ribbon/models/ribbon-group.d.ts +0 -105
  164. package/dist/ts/ribbon/models/ribbon-group.ts +0 -138
  165. package/dist/ts/ribbon/models/ribbon-item-model.d.ts +0 -144
  166. package/dist/ts/ribbon/models/ribbon-item.d.ts +0 -141
  167. package/dist/ts/ribbon/models/ribbon-item.ts +0 -190
  168. package/dist/ts/ribbon/models/ribbon-splitbutton-settings-model.d.ts +0 -114
  169. package/dist/ts/ribbon/models/ribbon-splitbutton-settings.d.ts +0 -107
  170. package/dist/ts/ribbon/models/ribbon-splitbutton-settings.ts +0 -140
  171. package/dist/ts/ribbon/models/ribbon-tab-model.d.ts +0 -44
  172. package/dist/ts/ribbon/models/ribbon-tab.d.ts +0 -45
  173. package/dist/ts/ribbon/models/ribbon-tab.ts +0 -61
  174. package/dist/ts/ribbon/models/ribbon-tooltip-model.d.ts +0 -43
  175. package/dist/ts/ribbon/models/ribbon-tooltip.d.ts +0 -36
  176. package/dist/ts/ribbon/models/ribbon-tooltip.ts +0 -47
  177. package/dist/ts/ribbon/modules/index.d.ts +0 -4
  178. package/dist/ts/ribbon/modules/index.ts +0 -5
  179. package/dist/ts/ribbon/modules/ribbon-backstage.d.ts +0 -117
  180. package/dist/ts/ribbon/modules/ribbon-backstage.ts +0 -620
  181. package/dist/ts/ribbon/modules/ribbon-contextualtab.d.ts +0 -27
  182. package/dist/ts/ribbon/modules/ribbon-contextualtab.ts +0 -93
  183. package/dist/ts/ribbon/modules/ribbon-filemenu.d.ts +0 -96
  184. package/dist/ts/ribbon/modules/ribbon-filemenu.ts +0 -353
  185. package/dist/ts/ribbon/modules/ribbon-keytip.d.ts +0 -56
  186. package/dist/ts/ribbon/modules/ribbon-keytip.ts +0 -580
@@ -1,77 +0,0 @@
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
- }
@@ -1,201 +0,0 @@
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
- }
@@ -1,128 +0,0 @@
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
- }