@syncfusion/ej2-ribbon 25.1.41 → 25.2.5
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 +8 -0
- package/dist/ej2-ribbon.umd.min.js +2 -2
- package/dist/ej2-ribbon.umd.min.js.map +1 -1
- package/dist/es6/ej2-ribbon.es2015.js +63 -7
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +129 -7
- package/dist/es6/ej2-ribbon.es5.js.map +1 -1
- package/dist/global/ej2-ribbon.min.js +2 -2
- package/dist/global/ej2-ribbon.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/ribbon/base/ribbon.d.ts +1 -0
- package/src/ribbon/base/ribbon.js +27 -1
- package/src/ribbon/items/ribbon-button.js +16 -1
- package/src/ribbon/items/ribbon-checkbox.js +19 -1
- package/src/ribbon/items/ribbon-colorpicker.js +16 -1
- package/src/ribbon/items/ribbon-combobox.js +19 -1
- package/src/ribbon/items/ribbon-dropdown.js +16 -1
- package/src/ribbon/items/ribbon-splitbutton.js +16 -1
|
@@ -1388,7 +1388,11 @@ class RibbonButton {
|
|
|
1388
1388
|
created: btnSettings.created
|
|
1389
1389
|
}, buttonEle);
|
|
1390
1390
|
if (btnSettings.htmlAttributes) {
|
|
1391
|
-
|
|
1391
|
+
const htmlAttr = Object.assign({}, btnSettings.htmlAttributes);
|
|
1392
|
+
if (htmlAttr.id) {
|
|
1393
|
+
delete htmlAttr.id;
|
|
1394
|
+
}
|
|
1395
|
+
setCustomAttributes(buttonEle, htmlAttr);
|
|
1392
1396
|
}
|
|
1393
1397
|
buttonEle.onclick = (e) => {
|
|
1394
1398
|
if (btnSettings.clicked) {
|
|
@@ -1527,6 +1531,13 @@ class RibbonCheckBox {
|
|
|
1527
1531
|
});
|
|
1528
1532
|
itemEle.appendChild(inputEle);
|
|
1529
1533
|
const checkBoxSettings = item.checkBoxSettings;
|
|
1534
|
+
let htmlAttr = {};
|
|
1535
|
+
if (checkBoxSettings.htmlAttributes) {
|
|
1536
|
+
htmlAttr = Object.assign({}, checkBoxSettings.htmlAttributes);
|
|
1537
|
+
if (htmlAttr.id) {
|
|
1538
|
+
delete htmlAttr.id;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1530
1541
|
new CheckBox({
|
|
1531
1542
|
locale: this.parent.locale,
|
|
1532
1543
|
enableRtl: this.parent.enableRtl,
|
|
@@ -1537,7 +1548,7 @@ class RibbonCheckBox {
|
|
|
1537
1548
|
labelPosition: checkBoxSettings.labelPosition,
|
|
1538
1549
|
disabled: item.disabled,
|
|
1539
1550
|
created: checkBoxSettings.created,
|
|
1540
|
-
htmlAttributes:
|
|
1551
|
+
htmlAttributes: htmlAttr,
|
|
1541
1552
|
change: (e) => {
|
|
1542
1553
|
if (checkBoxSettings.change) {
|
|
1543
1554
|
checkBoxSettings.change.call(this, e);
|
|
@@ -1693,7 +1704,11 @@ class RibbonColorPicker {
|
|
|
1693
1704
|
select: colorPickerSettings.select
|
|
1694
1705
|
}, inputEle);
|
|
1695
1706
|
if (colorPickerSettings.htmlAttributes) {
|
|
1696
|
-
|
|
1707
|
+
const htmlAttr = Object.assign({}, colorPickerSettings.htmlAttributes);
|
|
1708
|
+
if (htmlAttr.id) {
|
|
1709
|
+
delete htmlAttr.id;
|
|
1710
|
+
}
|
|
1711
|
+
setCustomAttributes(inputEle, htmlAttr);
|
|
1697
1712
|
}
|
|
1698
1713
|
const wrapper = colorPicker.element.parentElement;
|
|
1699
1714
|
EventHandler.add(wrapper, 'mouseenter', this.toggleWrapperHover.bind(this, wrapper, true), this);
|
|
@@ -1871,6 +1886,13 @@ class RibbonComboBox {
|
|
|
1871
1886
|
});
|
|
1872
1887
|
itemEle.appendChild(inputEle);
|
|
1873
1888
|
const comboBoxSettings = item.comboBoxSettings;
|
|
1889
|
+
let htmlAttr = {};
|
|
1890
|
+
if (comboBoxSettings.htmlAttributes) {
|
|
1891
|
+
htmlAttr = Object.assign({}, comboBoxSettings.htmlAttributes);
|
|
1892
|
+
if (htmlAttr.id) {
|
|
1893
|
+
delete htmlAttr.id;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1874
1896
|
new ComboBox({
|
|
1875
1897
|
locale: this.parent.locale,
|
|
1876
1898
|
enableRtl: this.parent.enableRtl,
|
|
@@ -1902,7 +1924,7 @@ class RibbonComboBox {
|
|
|
1902
1924
|
width: comboBoxSettings.width,
|
|
1903
1925
|
beforeOpen: comboBoxSettings.beforeOpen,
|
|
1904
1926
|
open: comboBoxSettings.open,
|
|
1905
|
-
htmlAttributes:
|
|
1927
|
+
htmlAttributes: htmlAttr,
|
|
1906
1928
|
close: (e) => {
|
|
1907
1929
|
if (comboBoxSettings.close) {
|
|
1908
1930
|
comboBoxSettings.close.call(this, e);
|
|
@@ -2101,7 +2123,11 @@ class RibbonDropDown {
|
|
|
2101
2123
|
select: dropDownSettings.select
|
|
2102
2124
|
}).appendTo(buttonEle);
|
|
2103
2125
|
if (dropDownSettings.htmlAttributes) {
|
|
2104
|
-
|
|
2126
|
+
const htmlAttr = Object.assign({}, dropDownSettings.htmlAttributes);
|
|
2127
|
+
if (htmlAttr.id) {
|
|
2128
|
+
delete htmlAttr.id;
|
|
2129
|
+
}
|
|
2130
|
+
setCustomAttributes(buttonEle, htmlAttr);
|
|
2105
2131
|
}
|
|
2106
2132
|
}
|
|
2107
2133
|
/**
|
|
@@ -2543,7 +2569,11 @@ class RibbonSplitButton {
|
|
|
2543
2569
|
}
|
|
2544
2570
|
}, buttonEle);
|
|
2545
2571
|
if (splitButtonSettings.htmlAttributes) {
|
|
2546
|
-
|
|
2572
|
+
const htmlAttr = Object.assign({}, splitButtonSettings.htmlAttributes);
|
|
2573
|
+
if (htmlAttr.id) {
|
|
2574
|
+
delete htmlAttr.id;
|
|
2575
|
+
}
|
|
2576
|
+
setCustomAttributes(buttonEle, htmlAttr);
|
|
2547
2577
|
}
|
|
2548
2578
|
const dropdownEle = buttonEle.parentElement.querySelector('.e-dropdown-btn');
|
|
2549
2579
|
dropdownEle.onkeydown = (e) => {
|
|
@@ -7096,7 +7126,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
7096
7126
|
for (let i = 0; i < list.length; i++) {
|
|
7097
7127
|
const listitem = list[parseInt(i.toString(), 10)];
|
|
7098
7128
|
if (!listitem.id) {
|
|
7099
|
-
|
|
7129
|
+
let htmlAttrID;
|
|
7130
|
+
if (type === 'item') {
|
|
7131
|
+
htmlAttrID = this.hasHtmlAtrrID(listitem);
|
|
7132
|
+
}
|
|
7133
|
+
listitem.setProperties({ id: htmlAttrID ? htmlAttrID : initId + key + (this.idIndex++) }, true);
|
|
7100
7134
|
}
|
|
7101
7135
|
switch (type) {
|
|
7102
7136
|
case 'tab':
|
|
@@ -7114,6 +7148,28 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
7114
7148
|
}
|
|
7115
7149
|
return list;
|
|
7116
7150
|
}
|
|
7151
|
+
hasHtmlAtrrID(listItem) {
|
|
7152
|
+
let id = '';
|
|
7153
|
+
if (listItem.buttonSettings.htmlAttributes.id) {
|
|
7154
|
+
id = listItem.buttonSettings.htmlAttributes.id;
|
|
7155
|
+
}
|
|
7156
|
+
else if (listItem.checkBoxSettings.htmlAttributes.id) {
|
|
7157
|
+
id = listItem.checkBoxSettings.htmlAttributes.id;
|
|
7158
|
+
}
|
|
7159
|
+
else if (listItem.colorPickerSettings.htmlAttributes.id) {
|
|
7160
|
+
id = listItem.colorPickerSettings.htmlAttributes.id;
|
|
7161
|
+
}
|
|
7162
|
+
else if (listItem.comboBoxSettings.htmlAttributes.id) {
|
|
7163
|
+
id = listItem.comboBoxSettings.htmlAttributes.id;
|
|
7164
|
+
}
|
|
7165
|
+
else if (listItem.dropDownSettings.htmlAttributes.id) {
|
|
7166
|
+
id = listItem.dropDownSettings.htmlAttributes.id;
|
|
7167
|
+
}
|
|
7168
|
+
else if (listItem.splitButtonSettings.htmlAttributes.id) {
|
|
7169
|
+
id = listItem.splitButtonSettings.htmlAttributes.id;
|
|
7170
|
+
}
|
|
7171
|
+
return id;
|
|
7172
|
+
}
|
|
7117
7173
|
updateCommonProperty(commonProp) {
|
|
7118
7174
|
this.tabObj.setProperties(commonProp);
|
|
7119
7175
|
if (this.ribbonFileMenuModule) {
|