@syncfusion/ej2-splitbuttons 25.1.35 → 25.1.37
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/CHANGELOG.md +51 -1
- package/dist/ej2-splitbuttons.min.js +1 -1
- package/dist/ej2-splitbuttons.umd.min.js +1 -1
- package/dist/global/ej2-splitbuttons.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/ts/button-group/button-group.ts +0 -84
- package/dist/ts/common/common.ts +0 -212
- package/dist/ts/drop-down-button/drop-down-button.ts +0 -920
- package/dist/ts/progress-button/progress-button.ts +0 -709
- package/dist/ts/split-button/split-button.ts +0 -534
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,68 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
### DropDownButton
|
|
6
|
+
|
|
7
|
+
#### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- Now, the default value of [`enableHtmlSanitizer`](https://helpej2.syncfusion.com/documentation/api/drop-down-button/#enablehtmlsanitizer) property is true to prevent the XSS attacks in the DropDownButton component.
|
|
10
|
+
|
|
11
|
+
### ProgressButton
|
|
12
|
+
|
|
13
|
+
#### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- Now, the default value of [`enableHtmlSanitizer`](https://helpej2.syncfusion.com/documentation/api/progress-button/#enablehtmlsanitizer) property is true to prevent the XSS attacks in the ProgressButton component.
|
|
16
|
+
|
|
5
17
|
### SplitButton
|
|
6
18
|
|
|
7
|
-
####
|
|
19
|
+
#### Breaking Changes
|
|
20
|
+
|
|
21
|
+
- Now, the default value of [`enableHtmlSanitizer`](https://helpej2.syncfusion.com/documentation/api/split-button/#enablehtmlsanitizer) property is true to prevent the XSS attacks in the SplitButton component.
|
|
22
|
+
|
|
23
|
+
## 24.2.7 (2024-02-20)
|
|
24
|
+
|
|
25
|
+
### ProgressButton
|
|
8
26
|
|
|
9
27
|
- `#I554000` - Console error is thrown when clicking the progress button has been resolved.
|
|
10
28
|
|
|
29
|
+
## 24.2.5 (2024-02-13)
|
|
30
|
+
|
|
31
|
+
### SplitButton
|
|
32
|
+
|
|
33
|
+
#### Bug Fixes
|
|
34
|
+
|
|
35
|
+
- `#I552152` - Issue in "Split button select event not triggered while using keyboard action" has been resolved.
|
|
36
|
+
|
|
37
|
+
## 24.1.46 (2024-01-17)
|
|
38
|
+
|
|
39
|
+
### DropDownButton
|
|
40
|
+
|
|
41
|
+
#### Bug Fixes
|
|
42
|
+
|
|
43
|
+
- `#I863317` - Issue in "DropDownButton list items do not meet WCAG AA standards for focus indicators" has been resolved.
|
|
44
|
+
|
|
45
|
+
### ButtonGroup
|
|
46
|
+
|
|
47
|
+
#### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- `#I534148` - Issue in "Focus Css style not removed after clicking outside from button group button in bootstrap4 theme" has been resolved.
|
|
50
|
+
|
|
51
|
+
## 24.1.45 (2024-01-09)
|
|
52
|
+
|
|
11
53
|
### DropDownButton
|
|
12
54
|
|
|
13
55
|
#### Bug Fixes
|
|
14
56
|
|
|
15
57
|
- `#I863317` - `Dropdownitems` not disabled initially when updating the property dynamically has been resolved.
|
|
16
58
|
|
|
59
|
+
## 24.1.41 (2023-12-18)
|
|
60
|
+
|
|
61
|
+
### DropDownButton
|
|
62
|
+
|
|
63
|
+
#### Bug Fixes
|
|
64
|
+
|
|
65
|
+
- `#I524330` - Issue DropDownButton Popup not repositioning on the resizing window has been resolved.
|
|
66
|
+
|
|
17
67
|
### DropDownButton
|
|
18
68
|
|
|
19
69
|
#### Bug Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-splitbuttons.min.js
|
|
3
|
-
* version : 25.1.
|
|
3
|
+
* version : 25.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-splitbuttons.umd.min.js
|
|
3
|
-
* version : 25.1.
|
|
3
|
+
* version : 25.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-splitbuttons.min.js
|
|
3
|
-
* version : 25.1.
|
|
3
|
+
* version : 25.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 25.1.
|
|
3
|
+
* version : 25.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-splitbuttons@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-splitbuttons@
|
|
3
|
+
"_id": "@syncfusion/ej2-splitbuttons@19.16.4",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-GuWnAJmoZRK129vdhPY6RwM8xZ7Tw/D6imDRLTY6Z2L1I/Sl102gu81/FVZgZczCu/faGBJkUT356sIW4cqNIA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-splitbuttons",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"/@syncfusion/ej2-richtexteditor",
|
|
34
34
|
"/@syncfusion/ej2-vue-splitbuttons"
|
|
35
35
|
],
|
|
36
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
|
37
|
-
"_shasum": "
|
|
36
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-19.16.4.tgz",
|
|
37
|
+
"_shasum": "7d57e5fea80e9d1f57312b2aaaab87a7d0e1f235",
|
|
38
38
|
"_spec": "@syncfusion/ej2-splitbuttons@*",
|
|
39
39
|
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
|
|
40
40
|
"author": {
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
90
90
|
},
|
|
91
91
|
"typings": "index.d.ts",
|
|
92
|
-
"version": "25.1.
|
|
92
|
+
"version": "25.1.37",
|
|
93
93
|
"sideEffects": false
|
|
94
94
|
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { addClass, createElement as internalCreateElement, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
-
import { ButtonModel, Button } from '@syncfusion/ej2-buttons';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Initialize ButtonGroup CSS component with specified properties.
|
|
6
|
-
* ```html
|
|
7
|
-
* <div id='buttongroup'>
|
|
8
|
-
* <button></button>
|
|
9
|
-
* <button></button>
|
|
10
|
-
* <button></button>
|
|
11
|
-
* </div>
|
|
12
|
-
* ```
|
|
13
|
-
* ```typescript
|
|
14
|
-
* createButtonGroup('#buttongroup', {
|
|
15
|
-
* cssClass: 'e-outline',
|
|
16
|
-
* buttons: [
|
|
17
|
-
* { content: 'Day' },
|
|
18
|
-
* { content: 'Week' },
|
|
19
|
-
* { content: 'Work Week'}
|
|
20
|
-
* ]
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @param {string} selector
|
|
25
|
-
* @param {CreateButtonGroupModel} options
|
|
26
|
-
* @returns HTMLElement
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Creates button group.
|
|
31
|
-
*
|
|
32
|
-
* @param {string} selector - Specifies the selector.
|
|
33
|
-
* @param {CreateButtonGroupModel} options - Specifies the button group model.
|
|
34
|
-
* @param {Function} createElement - Specifies the element.
|
|
35
|
-
* @returns {HTMLElement} - Button group element.
|
|
36
|
-
*/
|
|
37
|
-
export function createButtonGroup(selector: string, options: CreateButtonGroupModel = {}, createElement?: Function): HTMLElement {
|
|
38
|
-
let child: Element;
|
|
39
|
-
let btnElem: Element;
|
|
40
|
-
let nextChild: Element;
|
|
41
|
-
let btnModel: ButtonModel | null;
|
|
42
|
-
if (isNullOrUndefined(createElement)) {
|
|
43
|
-
createElement = internalCreateElement;
|
|
44
|
-
}
|
|
45
|
-
const wrapper: HTMLElement = document.querySelector(selector) as HTMLElement;
|
|
46
|
-
addClass([wrapper], ['e-btn-group', 'e-css']);
|
|
47
|
-
wrapper.setAttribute('role', 'group');
|
|
48
|
-
const childs: HTMLCollection = wrapper.children;
|
|
49
|
-
options.buttons = options.buttons || [] as ButtonModel[];
|
|
50
|
-
for (let i: number = 0, j: number = 0; j < childs.length; i++, j++) {
|
|
51
|
-
child = childs[j as number];
|
|
52
|
-
btnModel = options.buttons[i as number];
|
|
53
|
-
if (btnModel !== null) {
|
|
54
|
-
if (child.tagName === 'BUTTON') {
|
|
55
|
-
btnElem = child;
|
|
56
|
-
} else {
|
|
57
|
-
btnElem = createElement('label');
|
|
58
|
-
nextChild = childs[j + 1];
|
|
59
|
-
if (nextChild) {
|
|
60
|
-
wrapper.insertBefore(btnElem, nextChild);
|
|
61
|
-
} else {
|
|
62
|
-
wrapper.appendChild(btnElem);
|
|
63
|
-
}
|
|
64
|
-
if (child.id) {
|
|
65
|
-
btnElem.setAttribute('for', child.id);
|
|
66
|
-
}
|
|
67
|
-
if (btnModel && btnModel.disabled) {
|
|
68
|
-
(child as HTMLInputElement).disabled = true;
|
|
69
|
-
}
|
|
70
|
-
j++;
|
|
71
|
-
}
|
|
72
|
-
if (options.cssClass && btnModel && !btnModel.cssClass) {
|
|
73
|
-
btnModel.cssClass = options.cssClass;
|
|
74
|
-
}
|
|
75
|
-
new Button(btnModel || {}, btnElem as HTMLButtonElement);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return wrapper;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface CreateButtonGroupModel {
|
|
82
|
-
cssClass?: string;
|
|
83
|
-
buttons?: (ButtonModel | null)[];
|
|
84
|
-
}
|
package/dist/ts/common/common.ts
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { ChildProperty, extend, deleteObject, Property, BaseEventArgs, addClass, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
-
import { ItemModel } from './common-model';
|
|
3
|
-
/**
|
|
4
|
-
* Defines the icon position of Split Button.
|
|
5
|
-
*/
|
|
6
|
-
export type SplitButtonIconPosition = 'Left' | 'Top';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @param {Object} props - Specifies the properties
|
|
10
|
-
* @param {string[]} model - Specifies the model
|
|
11
|
-
* @returns {Object} Component Model
|
|
12
|
-
*/
|
|
13
|
-
export function getModel(props: Object, model: string[]): Object {
|
|
14
|
-
|
|
15
|
-
const obj: Object = extend({}, props);
|
|
16
|
-
for (const prop of Object.keys(obj)) {
|
|
17
|
-
if ((model).indexOf(prop) < 0) {
|
|
18
|
-
deleteObject(obj, prop);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return obj as Object;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** @hidden
|
|
26
|
-
* @param {HTMLElement} ul - Specifies the UL element
|
|
27
|
-
* @param {number} keyCode - Specifies the keycode
|
|
28
|
-
* @returns {void}
|
|
29
|
-
*/
|
|
30
|
-
export function upDownKeyHandler(ul: HTMLElement, keyCode: number): void {
|
|
31
|
-
const defaultIdx: number = keyCode === 40 ? 0 : ul.childElementCount - 1;
|
|
32
|
-
let liIdx: number = defaultIdx;
|
|
33
|
-
let li: Element;
|
|
34
|
-
const selectedLi: Element = ul.querySelector('.e-selected');
|
|
35
|
-
if (selectedLi) { selectedLi.classList.remove('e-selected'); }
|
|
36
|
-
for (let i: number = 0, len: number = ul.children.length; i < len; i++) {
|
|
37
|
-
if (ul.children[i as number].classList.contains('e-focused')) {
|
|
38
|
-
li = ul.children[i as number];
|
|
39
|
-
liIdx = i;
|
|
40
|
-
li.classList.remove('e-focused');
|
|
41
|
-
if (keyCode === 40) {
|
|
42
|
-
liIdx++;
|
|
43
|
-
} else {
|
|
44
|
-
liIdx--;
|
|
45
|
-
}
|
|
46
|
-
if (liIdx === (keyCode === 40 ? ul.childElementCount : -1)) {
|
|
47
|
-
liIdx = defaultIdx;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
li = ul.children[liIdx as number];
|
|
52
|
-
liIdx = isValidLI(ul, li, liIdx, keyCode);
|
|
53
|
-
if (liIdx !== -1) {
|
|
54
|
-
addClass([ul.children[liIdx as number]], 'e-focused');
|
|
55
|
-
(ul.children[liIdx as number] as HTMLElement).focus();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Get Valid LI element
|
|
61
|
-
*
|
|
62
|
-
* @param {HTMLElement} ul - Specifies the UL element
|
|
63
|
-
* @param {Element} li - Specifies the LI element
|
|
64
|
-
* @param {number} index - Specifies the index
|
|
65
|
-
* @param {number} keyCode - Specifies the keycode
|
|
66
|
-
* @param {number} count - Specifies the count
|
|
67
|
-
* @returns {number} - Index
|
|
68
|
-
*/
|
|
69
|
-
function isValidLI(ul: HTMLElement, li: Element, index: number, keyCode: number, count: number = 0): number {
|
|
70
|
-
if (li.classList.contains('e-separator') || li.classList.contains('e-disabled')) {
|
|
71
|
-
if (index === (keyCode === 40 ? ul.childElementCount - 1 : 0)) {
|
|
72
|
-
index = keyCode === 40 ? 0 : ul.childElementCount - 1;
|
|
73
|
-
} else {
|
|
74
|
-
if (keyCode === 40) {
|
|
75
|
-
index++;
|
|
76
|
-
} else {
|
|
77
|
-
index--;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
li = ul.children[index as number];
|
|
82
|
-
if (li.classList.contains('e-separator') || li.classList.contains('e-disabled')) {
|
|
83
|
-
count++;
|
|
84
|
-
if (count === ul.childElementCount) {
|
|
85
|
-
return index = -1;
|
|
86
|
-
}
|
|
87
|
-
index = isValidLI(ul, li, index, keyCode, count);
|
|
88
|
-
}
|
|
89
|
-
return index;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** @hidden
|
|
93
|
-
* @param {HTMLElement} popup - Specifies the popup element.
|
|
94
|
-
* @returns {void}
|
|
95
|
-
*/
|
|
96
|
-
export function setBlankIconStyle(popup: HTMLElement, blankIcon?: boolean): void {
|
|
97
|
-
const blankIconList: HTMLElement[] = [].slice.call(popup.getElementsByClassName('e-blank-icon'));
|
|
98
|
-
if (blankIcon) {
|
|
99
|
-
const menuItem: HTMLElement[] = [].slice.call(popup.getElementsByClassName('e-item'));
|
|
100
|
-
menuItem.forEach((li: HTMLElement): void => {
|
|
101
|
-
if (li.style.paddingLeft || li.style.paddingRight) {
|
|
102
|
-
li.removeAttribute('style');
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
if (!blankIconList.length) { return; }
|
|
107
|
-
let iconLi: HTMLElement = popup.querySelector('.e-item:not(.e-blank-icon):not(.e-separator)') as HTMLElement;
|
|
108
|
-
if (isNullOrUndefined(iconLi)) {return; }
|
|
109
|
-
if (iconLi.classList.contains('e-url')) { iconLi = iconLi.querySelector('.e-menu-url'); }
|
|
110
|
-
const icon: HTMLElement = iconLi.querySelector('.e-menu-icon') as HTMLElement;
|
|
111
|
-
let cssProp: { padding: string, margin: string };
|
|
112
|
-
const enableRtl: boolean = popup.classList.contains('e-rtl');
|
|
113
|
-
if (enableRtl) {
|
|
114
|
-
cssProp = { padding: 'paddingRight', margin: 'marginLeft' };
|
|
115
|
-
} else {
|
|
116
|
-
cssProp = { padding: 'paddingLeft', margin: 'marginRight' };
|
|
117
|
-
}
|
|
118
|
-
/* eslint-disable */
|
|
119
|
-
let size: string = `${parseInt(getComputedStyle(icon).fontSize, 10) + parseInt(
|
|
120
|
-
(enableRtl ? (getComputedStyle(icon) as any)[cssProp.margin] : (getComputedStyle(icon) as any)[cssProp.margin]), 10)
|
|
121
|
-
+ parseInt(getComputedStyle(iconLi).paddingLeft, 10)}px`;
|
|
122
|
-
blankIconList.forEach((li: HTMLElement): void => {
|
|
123
|
-
if (li.classList.contains('e-url')) {
|
|
124
|
-
((li.querySelector('.e-menu-url') as HTMLElement).style as any)[cssProp.padding] = size;
|
|
125
|
-
} else {
|
|
126
|
-
(li.style as any)[cssProp.padding] = size;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
/* eslint-enable */
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Defines the items of Split Button/DropDownButton.
|
|
134
|
-
*/
|
|
135
|
-
export class Item extends ChildProperty<Item> {
|
|
136
|
-
/**
|
|
137
|
-
* Defines class/multiple classes separated by a space for the item that is used to include an icon.
|
|
138
|
-
* Action item can include font icon and sprite image.
|
|
139
|
-
*
|
|
140
|
-
* @default ''
|
|
141
|
-
*/
|
|
142
|
-
@Property('')
|
|
143
|
-
public iconCss: string;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Specifies the id for item.
|
|
147
|
-
*
|
|
148
|
-
* @default ''
|
|
149
|
-
*/
|
|
150
|
-
@Property('')
|
|
151
|
-
public id: string;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Specifies separator between the items. Separator are horizontal lines used to group action items.
|
|
155
|
-
*
|
|
156
|
-
* @default false
|
|
157
|
-
*/
|
|
158
|
-
@Property(false)
|
|
159
|
-
public separator: boolean;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Specifies text for item.
|
|
163
|
-
*
|
|
164
|
-
* @default ''
|
|
165
|
-
*/
|
|
166
|
-
@Property('')
|
|
167
|
-
public text: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Specifies url for item that creates the anchor link to navigate to the url provided.
|
|
171
|
-
*
|
|
172
|
-
* @default ''
|
|
173
|
-
*/
|
|
174
|
-
@Property('')
|
|
175
|
-
public url: string;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Used to enable or disable the item.
|
|
179
|
-
*
|
|
180
|
-
* @default false
|
|
181
|
-
*/
|
|
182
|
-
@Property(false)
|
|
183
|
-
public disabled: boolean;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Interface for before item render / select event.
|
|
188
|
-
*/
|
|
189
|
-
export interface MenuEventArgs extends BaseEventArgs {
|
|
190
|
-
element: HTMLElement;
|
|
191
|
-
item: ItemModel;
|
|
192
|
-
event?: Event;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Interface for before open / close event.
|
|
197
|
-
*/
|
|
198
|
-
export interface BeforeOpenCloseMenuEventArgs extends BaseEventArgs {
|
|
199
|
-
element: HTMLElement;
|
|
200
|
-
items: ItemModel[];
|
|
201
|
-
event: Event;
|
|
202
|
-
cancel?: boolean;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Interface for open/close event.
|
|
207
|
-
*/
|
|
208
|
-
export interface OpenCloseMenuEventArgs extends BaseEventArgs {
|
|
209
|
-
element: HTMLElement;
|
|
210
|
-
items: ItemModel[];
|
|
211
|
-
parentItem?: ItemModel;
|
|
212
|
-
}
|