flexmonster 2.9.60 → 2.9.62
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/flexmonster.css +1 -1
- package/flexmonster.full.js +2574 -2568
- package/flexmonster.js +2470 -2464
- package/flexmonster.min.css +1 -1
- package/package.json +1 -1
- package/theme/accessible/flexmonster.css +1 -1
- package/theme/accessible/flexmonster.min.css +1 -1
- package/theme/blackorange/flexmonster.css +1 -1
- package/theme/blackorange/flexmonster.min.css +1 -1
- package/theme/brightorange/flexmonster.css +1 -1
- package/theme/brightorange/flexmonster.min.css +1 -1
- package/theme/dark/flexmonster.css +1 -1
- package/theme/dark/flexmonster.min.css +1 -1
- package/theme/flexmonster-base.less +1 -1
- package/theme/green/flexmonster.css +1 -1
- package/theme/green/flexmonster.min.css +1 -1
- package/theme/lightblue/flexmonster.css +1 -1
- package/theme/lightblue/flexmonster.min.css +1 -1
- package/theme/macos/flexmonster.css +1 -1
- package/theme/macos/flexmonster.min.css +1 -1
- package/theme/midnight/flexmonster.css +1 -1
- package/theme/midnight/flexmonster.min.css +1 -1
- package/theme/old/flexmonster.css +1 -1
- package/theme/old/flexmonster.min.css +1 -1
- package/theme/orange/flexmonster.css +1 -1
- package/theme/orange/flexmonster.min.css +1 -1
- package/theme/purple/flexmonster.css +1 -1
- package/theme/purple/flexmonster.min.css +1 -1
- package/theme/softdefault/flexmonster.css +1 -1
- package/theme/softdefault/flexmonster.min.css +1 -1
- package/theme/stripedblue/flexmonster.css +1 -1
- package/theme/stripedblue/flexmonster.min.css +1 -1
- package/theme/stripedteal/flexmonster.css +1 -1
- package/theme/stripedteal/flexmonster.min.css +1 -1
- package/theme/teal/flexmonster.css +1 -1
- package/theme/teal/flexmonster.min.css +1 -1
- package/theme/yellow/flexmonster.css +1 -1
- package/theme/yellow/flexmonster.min.css +1 -1
- package/toolbar/flexmonster.toolbar.js +65 -55
- package/types/flexmonster.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flexmonster Pivot Table & Charts [https://www.flexmonster.com/]
|
|
3
|
-
*
|
|
3
|
+
* October 2023 (v. 2.9.62)
|
|
4
4
|
* Copyright (c) 2023 Flexmonster. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Flexmonster Pivot Table & Charts commercial licenses may be obtained at
|
|
@@ -513,7 +513,7 @@ FlexmonsterToolbar.prototype.init = function () {
|
|
|
513
513
|
var fullscreenTab = _this.pivotContainer.querySelector("#fm-tab-fullscreen");
|
|
514
514
|
if (fullscreenTab) {
|
|
515
515
|
var isFullscreen = _this.isFullscreen();
|
|
516
|
-
fullscreenTab.querySelector(".fm-svg-icon").innerHTML = isFullscreen ? _this.icons.minimize : _this.icons.fullscreen;
|
|
516
|
+
fullscreenTab.querySelector(".fm-svg-icon").innerHTML = _this.toTrustedHtml(isFullscreen ? _this.icons.minimize : _this.icons.fullscreen);
|
|
517
517
|
_this.setText(fullscreenTab.querySelector(".fm-tab-label"), isFullscreen ? _this.Labels.minimize : _this.Labels.fullscreen);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
@@ -1320,7 +1320,7 @@ FlexmonsterToolbar.prototype.defaults.numberFormatting = {
|
|
|
1320
1320
|
}
|
|
1321
1321
|
FlexmonsterToolbar.prototype.ConfirmationPopUp = function () { }
|
|
1322
1322
|
FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, measureAggregation) {
|
|
1323
|
-
var
|
|
1323
|
+
var _this = this;
|
|
1324
1324
|
var Labels = this.Labels;
|
|
1325
1325
|
var currentFormatVO = undefined;
|
|
1326
1326
|
|
|
@@ -1334,8 +1334,8 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1334
1334
|
negativeCurrencyFormatDropDown.setEnabled(isEnabled);
|
|
1335
1335
|
negativeNumberFormatDropDown.setEnabled(isEnabled);
|
|
1336
1336
|
isPercentDropdown.setEnabled(isEnabled);
|
|
1337
|
-
|
|
1338
|
-
|
|
1337
|
+
_this.setEnabled(currencySymbInput, isEnabled);
|
|
1338
|
+
_this.setEnabled(nullValueInput, isEnabled);
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
1341
|
function applyCurrencySymbol(dataProvider, currencySymbol) {
|
|
@@ -1390,7 +1390,7 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1390
1390
|
|
|
1391
1391
|
ConfirmationPopUp.prototype.createPopUp = function () {
|
|
1392
1392
|
if (this.dialog == null) {
|
|
1393
|
-
this.dialog =
|
|
1393
|
+
this.dialog = _this.popupManager.createPopup(this);
|
|
1394
1394
|
this.dialog.content.style.zIndex = 152;
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
@@ -1398,15 +1398,15 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1398
1398
|
ConfirmationPopUp.prototype.addPopUp = function () {
|
|
1399
1399
|
var popup = this.dialog.content;
|
|
1400
1400
|
this.modalOverlay = this.createModalOverlay();
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
var
|
|
1401
|
+
_this.toolbarWrapper.appendChild(popup);
|
|
1402
|
+
_this.toolbarWrapper.appendChild(this.modalOverlay);
|
|
1403
|
+
_this.popupManager.addLayoutClasses(popup);
|
|
1404
|
+
_this.popupManager.centerPopup(popup);
|
|
1405
|
+
var self = this;
|
|
1406
1406
|
popup.resizeHandler = function () {
|
|
1407
1407
|
if (!popup) return;
|
|
1408
|
-
|
|
1409
|
-
|
|
1408
|
+
self.addLayoutClasses(popup);
|
|
1409
|
+
self.centerPopup(popup);
|
|
1410
1410
|
};
|
|
1411
1411
|
window.addEventListener("resize", popup.resizeHandler);
|
|
1412
1412
|
}
|
|
@@ -1427,7 +1427,7 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1427
1427
|
], false, this.removePopUp);
|
|
1428
1428
|
var content = document.createElement("div");
|
|
1429
1429
|
var contentLabel = document.createElement("label");
|
|
1430
|
-
contentLabel.innerHTML = Labels.confirm_message;
|
|
1430
|
+
contentLabel.innerHTML = _this.toTrustedHtml(Labels.confirm_message);
|
|
1431
1431
|
contentLabel.style.fontSize = "14px";
|
|
1432
1432
|
content.appendChild(contentLabel);
|
|
1433
1433
|
this.dialog.setContent(content);
|
|
@@ -1436,11 +1436,11 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1436
1436
|
ConfirmationPopUp.prototype.removePopUp = function (popup) {
|
|
1437
1437
|
var popupWindow = (popup || confirmPopUp.dialog.content);
|
|
1438
1438
|
if (confirmPopUp.modalOverlay != null) {
|
|
1439
|
-
|
|
1439
|
+
_this.toolbarWrapper.removeChild(confirmPopUp.modalOverlay);
|
|
1440
1440
|
confirmPopUp.modalOverlay = null;
|
|
1441
1441
|
}
|
|
1442
1442
|
if (popupWindow != null) {
|
|
1443
|
-
|
|
1443
|
+
_this.toolbarWrapper.removeChild(popupWindow);
|
|
1444
1444
|
confirmPopUp.dialog = null;
|
|
1445
1445
|
window.removeEventListener("resize", popupWindow.resizeHandler);
|
|
1446
1446
|
}
|
|
@@ -1451,9 +1451,9 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1451
1451
|
modalOverlay.style.zIndex = 151;
|
|
1452
1452
|
modalOverlay.classList.add("fm-modal-overlay");
|
|
1453
1453
|
modalOverlay.classList.add("fm-popup-confirm-modal-overlay");
|
|
1454
|
-
var
|
|
1454
|
+
var self = this;
|
|
1455
1455
|
modalOverlay.addEventListener('click', function (e) {
|
|
1456
|
-
|
|
1456
|
+
self.removePopUp(self.dialog.content);
|
|
1457
1457
|
restoreEditedMeasure();
|
|
1458
1458
|
});
|
|
1459
1459
|
return modalOverlay;
|
|
@@ -1481,11 +1481,11 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1481
1481
|
}
|
|
1482
1482
|
|
|
1483
1483
|
function isStringDataMode() {
|
|
1484
|
-
var options =
|
|
1484
|
+
var options = _this.pivot.getOptions({
|
|
1485
1485
|
withDefaults: true
|
|
1486
1486
|
});
|
|
1487
1487
|
if (options.grid.type === "flat" && currentMeasureNames && currentMeasureNames.length > 0) {
|
|
1488
|
-
var measures =
|
|
1488
|
+
var measures = _this.pivot.getMeasures();
|
|
1489
1489
|
var currentMeasure = null;
|
|
1490
1490
|
for (var i = 0; i < measures.length; i++) {
|
|
1491
1491
|
if (currentMeasureNames.indexOf(measures[i].uniqueName) !== -1) {
|
|
@@ -1524,8 +1524,8 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1524
1524
|
currentMeasureNames = valuesDropDown.getValue();
|
|
1525
1525
|
var currentMeasure = currentMeasureNames ? getMeasureFromUniqueName(currentMeasureNames[0]) : null;
|
|
1526
1526
|
var formatVO = currentMeasure ?
|
|
1527
|
-
|
|
1528
|
-
|
|
1527
|
+
_this.pivot.getFormat(currentMeasure[0], currentMeasure[1]) :
|
|
1528
|
+
_this.pivot.getFormat(null);
|
|
1529
1529
|
currentFormatVO = formatVO;
|
|
1530
1530
|
|
|
1531
1531
|
applyStringDataMode(isStringDataMode());
|
|
@@ -1535,9 +1535,9 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1535
1535
|
decimalSepDropDown.setValue(formatVO.decimalSeparator);
|
|
1536
1536
|
decimalPlacesDropDown.setValue(formatVO.decimalPlaces);
|
|
1537
1537
|
currencySymbInput.value = formatVO.currencySymbol;
|
|
1538
|
-
positiveCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(
|
|
1538
|
+
positiveCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(_this.defaults.numberFormatting.positiveCurrencyFormats, formatVO.currencySymbol));
|
|
1539
1539
|
positiveCurrencyFormatDropDown.setValue(formatVO.positiveCurrencyFormat);
|
|
1540
|
-
negativeCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(
|
|
1540
|
+
negativeCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(_this.defaults.numberFormatting.negativeCurrencyFormats, formatVO.currencySymbol));
|
|
1541
1541
|
negativeCurrencyFormatDropDown.setValue(formatVO.negativeCurrencyFormat);
|
|
1542
1542
|
negativeNumberFormatDropDown.setValue(formatVO.negativeNumberFormat);
|
|
1543
1543
|
nullValueInput.value = formatVO.nullValue;
|
|
@@ -1553,7 +1553,7 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
1555
|
var applyHandler = function () {
|
|
1556
|
-
var currentReport = (currentFormatVO.name != "" || valuesDropDown.getValue()[0] == "") ?
|
|
1556
|
+
var currentReport = (currentFormatVO.name != "" || valuesDropDown.getValue()[0] == "") ? _this.pivot.getReport() : {};
|
|
1557
1557
|
var formatVO = undefined;
|
|
1558
1558
|
if (currentReport.hasOwnProperty("formats") && currentReport.formats.length > 0) {
|
|
1559
1559
|
for (var i = 0; i < currentReport.formats.length; i++) {
|
|
@@ -1578,9 +1578,9 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1578
1578
|
var measure = null;
|
|
1579
1579
|
for (var i = 0; i < measuresList.length; i++) {
|
|
1580
1580
|
measure = getMeasureFromUniqueName(measuresList[i]);
|
|
1581
|
-
|
|
1581
|
+
_this.pivot.setFormat(formatVO,
|
|
1582
1582
|
(measure[0] == "" ? null : measure[0]),
|
|
1583
|
-
(
|
|
1583
|
+
(_this.singleAggregationFormatting ? undefined : measure[1]));
|
|
1584
1584
|
}
|
|
1585
1585
|
// if (valuesDropDown.getValue() === "" && currentReport.hasOwnProperty("formats")) {
|
|
1586
1586
|
// var reportMeasures = currentReport.slice.measures;
|
|
@@ -1590,7 +1590,7 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1590
1590
|
// }
|
|
1591
1591
|
// }
|
|
1592
1592
|
// }
|
|
1593
|
-
|
|
1593
|
+
_this.pivot.refresh();
|
|
1594
1594
|
}
|
|
1595
1595
|
|
|
1596
1596
|
var MEASURE_UNIQUENAME_DELIMETER = "_@@_@@_@@_";
|
|
@@ -1609,7 +1609,7 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1609
1609
|
var aggregation = aggregationLabelIndex === -1 || measure.aggregation === "none" || measure.calculated ?
|
|
1610
1610
|
null :
|
|
1611
1611
|
measure.availableAggregationsCaptions[aggregationLabelIndex];
|
|
1612
|
-
return aggregation === null ||
|
|
1612
|
+
return aggregation === null || _this.singleAggregationFormatting ?
|
|
1613
1613
|
measure.name :
|
|
1614
1614
|
measure.name + " (" + aggregation + ")";
|
|
1615
1615
|
}
|
|
@@ -1641,7 +1641,7 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1641
1641
|
label: Labels.default_value
|
|
1642
1642
|
}];
|
|
1643
1643
|
var _uniqueNames = {};
|
|
1644
|
-
var _measures =
|
|
1644
|
+
var _measures = _this.pivot.getMeasures();
|
|
1645
1645
|
for (var i = 0; i < _measures.length; i++) {
|
|
1646
1646
|
if (!_uniqueNames[_measures[i].uniqueName] ||
|
|
1647
1647
|
(_uniqueNames[_measures[i].uniqueName] && !_uniqueNames[_measures[i].uniqueName][_measures[i].aggregation] && !this.singleAggregationFormatting)) {
|
|
@@ -1725,10 +1725,10 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1725
1725
|
negativeCurrencyRow.classList.remove("fm-hide");
|
|
1726
1726
|
negativeNumberRow.classList.add("fm-hide");
|
|
1727
1727
|
var positiveCurrencyFormat = positiveCurrencyFormatDropDown.getValue();
|
|
1728
|
-
positiveCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(
|
|
1728
|
+
positiveCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(_this.defaults.numberFormatting.positiveCurrencyFormats, value));
|
|
1729
1729
|
positiveCurrencyFormatDropDown.setValue(positiveCurrencyFormat);
|
|
1730
1730
|
var negativeCurrencyFormat = negativeCurrencyFormatDropDown.getValue();
|
|
1731
|
-
negativeCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(
|
|
1731
|
+
negativeCurrencyFormatDropDown.setDataProvider(applyCurrencySymbol(_this.defaults.numberFormatting.negativeCurrencyFormats, value));
|
|
1732
1732
|
negativeCurrencyFormatDropDown.setValue(negativeCurrencyFormat);
|
|
1733
1733
|
} else {
|
|
1734
1734
|
positiveCurrencyRow.classList.add("fm-hide");
|
|
@@ -1757,14 +1757,14 @@ FlexmonsterToolbar.prototype.showFormatCellsDialog = function (measureName, meas
|
|
|
1757
1757
|
}
|
|
1758
1758
|
// Conditional formatting
|
|
1759
1759
|
FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measureName) {
|
|
1760
|
-
var
|
|
1760
|
+
var _this = this;
|
|
1761
1761
|
var Labels = this.Labels;
|
|
1762
1762
|
var conditions = this.pivot.getAllConditions();
|
|
1763
1763
|
var dataType = this.pivot.getReport().dataSource.type;
|
|
1764
1764
|
var isMSAS = dataType === "microsoft analysis services" || dataType === "mondrian";
|
|
1765
1765
|
|
|
1766
|
-
var _allMeasures =
|
|
1767
|
-
var _measures =
|
|
1766
|
+
var _allMeasures = _this.pivot.getAllMeasures();
|
|
1767
|
+
var _measures = _this.pivot.getMeasures();
|
|
1768
1768
|
var _conditionsMeasuresMap = {};
|
|
1769
1769
|
var _uniqueNames = [];
|
|
1770
1770
|
var _measureWithAggregations = {};
|
|
@@ -1804,14 +1804,14 @@ FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measure
|
|
|
1804
1804
|
_measureWithAggregations = undefined;
|
|
1805
1805
|
|
|
1806
1806
|
var applyHandler = function () {
|
|
1807
|
-
|
|
1807
|
+
_this.pivot.removeAllConditions();
|
|
1808
1808
|
for (var i = 0; i < conditions.length; i++) {
|
|
1809
1809
|
var formula = composeFormula(conditions[i].sign, conditions[i].value1, conditions[i].value2, [conditions[i].measure, conditions[i].aggregation]);
|
|
1810
1810
|
if (formula == null) return;
|
|
1811
1811
|
conditions[i].formula = formula;
|
|
1812
|
-
|
|
1812
|
+
_this.pivot.addCondition(conditions[i]);
|
|
1813
1813
|
}
|
|
1814
|
-
|
|
1814
|
+
_this.pivot.refresh();
|
|
1815
1815
|
};
|
|
1816
1816
|
var onAddConditionBtnClick = function () {
|
|
1817
1817
|
var condition = {
|
|
@@ -1826,14 +1826,14 @@ FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measure
|
|
|
1826
1826
|
}
|
|
1827
1827
|
};
|
|
1828
1828
|
conditions.unshift(condition);
|
|
1829
|
-
var item =
|
|
1829
|
+
var item = _this.createConditionalFormattingItem(condition, conditions, isMSAS);
|
|
1830
1830
|
content.insertBefore(item, content.firstChild);
|
|
1831
1831
|
item.focus();
|
|
1832
1832
|
content.scrollTop = 0;
|
|
1833
1833
|
if (conditions.length > 0) {
|
|
1834
1834
|
placeholder.style.display = "none";
|
|
1835
1835
|
}
|
|
1836
|
-
|
|
1836
|
+
_this.popupManager.centerPopup(dialog.content);
|
|
1837
1837
|
};
|
|
1838
1838
|
|
|
1839
1839
|
var composeFormula = function (sign, value1, value2, measureWithAggregation) {
|
|
@@ -1938,7 +1938,7 @@ FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measure
|
|
|
1938
1938
|
if (conditions.length == 0) {
|
|
1939
1939
|
placeholder.style.display = "block";
|
|
1940
1940
|
}
|
|
1941
|
-
|
|
1941
|
+
_this.popupManager.centerPopup(dialog.content);
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
1944
|
|
|
@@ -1948,7 +1948,7 @@ FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measure
|
|
|
1948
1948
|
|
|
1949
1949
|
var message = document.createElement("div");
|
|
1950
1950
|
message.classList.add("fm-popup-placeholder-text");
|
|
1951
|
-
|
|
1951
|
+
_this.setText(message, Labels.no_active_conditions);
|
|
1952
1952
|
placeholder.appendChild(message);
|
|
1953
1953
|
|
|
1954
1954
|
var addConditionBtn2 = document.createElement("button");
|
|
@@ -1958,7 +1958,7 @@ FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measure
|
|
|
1958
1958
|
addConditionBtn2.classList.add("fm-ui-btn-light");
|
|
1959
1959
|
addConditionBtn2.classList.add("fm-button-add-large");
|
|
1960
1960
|
addConditionBtn2.onclick = onAddConditionBtnClick;
|
|
1961
|
-
|
|
1961
|
+
_this.setText(addConditionBtn2, Labels.add_condition_button);
|
|
1962
1962
|
var icon = document.createElement("span");
|
|
1963
1963
|
icon.classList.add("fm-icon");
|
|
1964
1964
|
icon.classList.add("fm-icon-act_add");
|
|
@@ -1971,7 +1971,7 @@ FlexmonsterToolbar.prototype.showConditionalFormattingDialog = function (measure
|
|
|
1971
1971
|
conditions[i].value2 = formula.value2;
|
|
1972
1972
|
conditions[i].sign = formula.sign;
|
|
1973
1973
|
conditions[i].measures = measures;
|
|
1974
|
-
content.appendChild(
|
|
1974
|
+
content.appendChild(_this.createConditionalFormattingItem(conditions[i], conditions, isMSAS));
|
|
1975
1975
|
}
|
|
1976
1976
|
if (conditions.length > 0) {
|
|
1977
1977
|
placeholder.style.display = "none";
|
|
@@ -2641,6 +2641,15 @@ FlexmonsterToolbar.prototype.setText = function (target, text) {
|
|
|
2641
2641
|
target.textContent = text;
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
|
+
FlexmonsterToolbar.prototype.toTrustedHtml = function (html) {
|
|
2645
|
+
if (window['trustedTypes']) {
|
|
2646
|
+
var htmlPolicy = window['trustedTypes'].createPolicy("fmHtmlPolicy", {
|
|
2647
|
+
createHTML: function(x) { return x; }
|
|
2648
|
+
});
|
|
2649
|
+
return htmlPolicy.createHTML(html);
|
|
2650
|
+
}
|
|
2651
|
+
return html;
|
|
2652
|
+
}
|
|
2644
2653
|
FlexmonsterToolbar.prototype.makeSelectableByKeyboard = function (element) {
|
|
2645
2654
|
element.setAttribute("tabindex", "0");
|
|
2646
2655
|
element.addEventListener("keyup", function (e) {
|
|
@@ -2758,6 +2767,7 @@ FlexmonsterToolbar.prototype.createSelect = function (dataProvider, placeholder,
|
|
|
2758
2767
|
if (placeholder === undefined) {
|
|
2759
2768
|
placeholder = "";
|
|
2760
2769
|
}
|
|
2770
|
+
var _this = this;
|
|
2761
2771
|
var _dataProvider = dataProvider;
|
|
2762
2772
|
var _selectedItemIndexes = [];
|
|
2763
2773
|
var _activeItemIndex = -1;
|
|
@@ -2780,7 +2790,7 @@ FlexmonsterToolbar.prototype.createSelect = function (dataProvider, placeholder,
|
|
|
2780
2790
|
dropdownButton.addEventListener("click", onDropdownButtonClick);
|
|
2781
2791
|
dropdownButton.addEventListener("keydown", onDropdownButtonKeyDown);
|
|
2782
2792
|
dropdownButton.addEventListener("blur", hide);
|
|
2783
|
-
dropdownButton.innerHTML = placeholder;
|
|
2793
|
+
dropdownButton.innerHTML = _this.toTrustedHtml(placeholder);
|
|
2784
2794
|
dropdown.appendChild(dropdownButton);
|
|
2785
2795
|
dropdown.dropdownButton = dropdownButton;
|
|
2786
2796
|
|
|
@@ -2902,7 +2912,7 @@ FlexmonsterToolbar.prototype.createSelect = function (dataProvider, placeholder,
|
|
|
2902
2912
|
label = typeof data === "string" ? data : data.label;
|
|
2903
2913
|
}
|
|
2904
2914
|
}
|
|
2905
|
-
dropdownButton.innerHTML = label;
|
|
2915
|
+
dropdownButton.innerHTML = _this.toTrustedHtml(label);
|
|
2906
2916
|
}
|
|
2907
2917
|
|
|
2908
2918
|
function setActiveItemAt(index) {
|
|
@@ -2975,12 +2985,12 @@ FlexmonsterToolbar.prototype.createSelect = function (dataProvider, placeholder,
|
|
|
2975
2985
|
dropdown.setDataProvider = function (dataProvider) {
|
|
2976
2986
|
_dataProvider = dataProvider;
|
|
2977
2987
|
_selectedItemIndexes.length = 0;
|
|
2978
|
-
dropdownList.innerHTML = "";
|
|
2988
|
+
dropdownList.innerHTML = _this.toTrustedHtml("");
|
|
2979
2989
|
for (var i = 0; i < dataProvider.length; i++) {
|
|
2980
2990
|
var data = dataProvider[i];
|
|
2981
2991
|
var li = document.createElement("li");
|
|
2982
2992
|
li.id = dropdownList.id + i;
|
|
2983
|
-
li.innerHTML = typeof data === "string" ? data : data.label;
|
|
2993
|
+
li.innerHTML = _this.toTrustedHtml(typeof data === "string" ? data : data.label);
|
|
2984
2994
|
li.classList.add("fm-ui");
|
|
2985
2995
|
li.classList.add("fm-ui-element");
|
|
2986
2996
|
li.setAttribute("role", "option");
|
|
@@ -3078,7 +3088,7 @@ FlexmonsterToolbar.prototype.createTab = function (data, parent) {
|
|
|
3078
3088
|
var svgIcon = document.createElement("div");
|
|
3079
3089
|
svgIcon.classList.add("fm-svg-icon");
|
|
3080
3090
|
svgIcon.setAttribute("aria-hidden", "true");
|
|
3081
|
-
svgIcon.innerHTML = data.icon;
|
|
3091
|
+
svgIcon.innerHTML = this.toTrustedHtml(data.icon);
|
|
3082
3092
|
tabLink.appendChild(svgIcon);
|
|
3083
3093
|
}
|
|
3084
3094
|
|
|
@@ -3140,7 +3150,7 @@ FlexmonsterToolbar.prototype.createSubmenuItem = function (data, parentTab) {
|
|
|
3140
3150
|
var svgIcon = document.createElement("span");
|
|
3141
3151
|
svgIcon.classList.add("fm-svg-icon");
|
|
3142
3152
|
svgIcon.setAttribute("aria-hidden", "true");
|
|
3143
|
-
svgIcon.innerHTML = data.icon;
|
|
3153
|
+
svgIcon.innerHTML = _this.toTrustedHtml(data.icon);
|
|
3144
3154
|
tab.appendChild(svgIcon);
|
|
3145
3155
|
}
|
|
3146
3156
|
|
|
@@ -3496,7 +3506,7 @@ FlexmonsterToolbar.PopupManager.PopupWindow = function (popupManager) {
|
|
|
3496
3506
|
contentPanel.appendChild(focusGuardBottom);
|
|
3497
3507
|
}
|
|
3498
3508
|
this.setToolbar = function (buttons, toHeader, removePopupHandler) {
|
|
3499
|
-
toolbar.innerHTML = "";
|
|
3509
|
+
toolbar.innerHTML = FlexmonsterToolbar.prototype.toTrustedHtml("");
|
|
3500
3510
|
for (var i = buttons.length - 1; i >= 0; i--) {
|
|
3501
3511
|
var button = document.createElement("button");
|
|
3502
3512
|
button.setAttribute("type", "button");
|
|
@@ -3589,7 +3599,7 @@ FlexmonsterToolbar.ColorPicker = function (toolbar, popupContainer) {
|
|
|
3589
3599
|
colorBtn.setAttribute("type", "button");
|
|
3590
3600
|
colorBtn.classList.add("fm-cts-item");
|
|
3591
3601
|
colorBtn.classList.add("fm-current");
|
|
3592
|
-
colorBtn.innerHTML = toolbar.Labels.cp_text;
|
|
3602
|
+
colorBtn.innerHTML = FlexmonsterToolbar.prototype.toTrustedHtml(toolbar.Labels.cp_text);
|
|
3593
3603
|
colorBtn.onclick = function () {
|
|
3594
3604
|
onSwitchChange('font');
|
|
3595
3605
|
};
|
|
@@ -3598,7 +3608,7 @@ FlexmonsterToolbar.ColorPicker = function (toolbar, popupContainer) {
|
|
|
3598
3608
|
var bgColorBtn = document.createElement("button");
|
|
3599
3609
|
bgColorBtn.setAttribute("type", "button");
|
|
3600
3610
|
bgColorBtn.classList.add("fm-cts-item");
|
|
3601
|
-
bgColorBtn.innerHTML = toolbar.Labels.cp_highlight;
|
|
3611
|
+
bgColorBtn.innerHTML = FlexmonsterToolbar.prototype.toTrustedHtml(toolbar.Labels.cp_highlight);
|
|
3602
3612
|
bgColorBtn.onclick = function () {
|
|
3603
3613
|
onSwitchChange('bg');
|
|
3604
3614
|
};
|
|
@@ -3680,14 +3690,14 @@ FlexmonsterToolbar.ColorPicker = function (toolbar, popupContainer) {
|
|
|
3680
3690
|
|
|
3681
3691
|
var applyBtn = document.createElement("button");
|
|
3682
3692
|
applyBtn.setAttribute("type", "button");
|
|
3683
|
-
applyBtn.innerHTML = toolbar.Labels.apply;
|
|
3693
|
+
applyBtn.innerHTML = FlexmonsterToolbar.prototype.toTrustedHtml(toolbar.Labels.apply);
|
|
3684
3694
|
applyBtn.classList.add("fm-ui-btn");
|
|
3685
3695
|
applyBtn.classList.add("fm-ui-btn-dark");
|
|
3686
3696
|
applyBtn.addEventListener("click", onApplyClick);
|
|
3687
3697
|
|
|
3688
3698
|
var cancelBtn = document.createElement("button");
|
|
3689
3699
|
cancelBtn.setAttribute("type", "button");
|
|
3690
|
-
cancelBtn.innerHTML = toolbar.Labels.cancel;
|
|
3700
|
+
cancelBtn.innerHTML = FlexmonsterToolbar.prototype.toTrustedHtml(toolbar.Labels.cancel);
|
|
3691
3701
|
cancelBtn.classList.add("fm-ui-btn");
|
|
3692
3702
|
cancelBtn.addEventListener("click", onCancelClick);
|
|
3693
3703
|
|