@datarailsshared/dr_renderer 1.2.91 → 1.2.92
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/package.json +1 -1
- package/src/dr_pivottable.js +25 -19
package/package.json
CHANGED
package/src/dr_pivottable.js
CHANGED
|
@@ -484,7 +484,7 @@ let initDRPivotTable = function($, window, document) {
|
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
SubtotalRenderer = function(pivotData, opts, charttype, tooMuch = false, error_params) {
|
|
487
|
-
var addClass, allTotal, arrowCollapsed, arrowExpanded, buildColHeaderHeader, buildColHeaderHeaders, buildColHeaderHeadersClickEvents, buildColHeaders, buildColTotals, buildColTotalsHeader, buildGrandTotal, buildRowHeaderHeaders, buildRowHeaderHeadersClickEvents, buildRowHeaders, buildRowTotalsHeader, buildValues, classColCollapsed, classColExpanded, classColHide, classColShow, classCollapsed, classExpanded, classRowCollapsed, classRowExpanded, classRowHide, classRowShow, clickStatusCollapsed, clickStatusExpanded, colAttrs, colDisableAfter, colKeys, colTotals, collapseCol, collapseColsAt, collapseHideDescendantRow, collapseRow, collapseRowsAt, collapseShowColSubtotal, collapseShowRowSubtotal, createElement, defaults, expandChildCol, expandChildRow, expandCol, expandColsAt, expandHideColSubtotal, expandHideRowSubtotal, expandRow, expandRowsAt, expandShowColSubtotal, expandShowRowSubtotal, getTableEventHandlers, hasClass, hideDescendantCol, isColDisable, isColDisableExpandCollapse, isColHideOnExpand, isRowDisable, isRowDisableExpandCollapse, isRowHideOnExpand, main, getSubtotalInBrackets, processKeys, encodeHtmlEntities, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, removeClass, replaceClass, rowAttrs, rowDisableAfter, rowKeys, rowTotals, setAttributes, showChildCol, showChildRow, toggleCol, toggleColHeaderHeader, toggleRow, toggleRowHeaderHeader, tree, assumptionSubscribe;
|
|
487
|
+
var addClass, allTotal, arrowCollapsed, arrowExpanded, buildColHeaderHeader, buildColHeaderHeaders, buildColHeaderHeadersClickEvents, buildColHeaders, buildColTotals, buildColTotalsHeader, buildGrandTotal, buildRowHeaderHeaders, buildRowHeaderHeadersClickEvents, buildRowHeaders, buildRowTotalsHeader, buildValues, classColCollapsed, classColExpanded, classColHide, classColShow, classCollapsed, classExpanded, classRowCollapsed, classRowExpanded, classRowHide, classRowShow, clickStatusCollapsed, clickStatusExpanded, colAttrs, colDisableAfter, colKeys, colTotals, collapseCol, collapseColsAt, collapseHideDescendantRow, collapseRow, collapseRowsAt, collapseShowColSubtotal, collapseShowRowSubtotal, applyInlineStyles, createElement, defaults, expandChildCol, expandChildRow, expandCol, expandColsAt, expandHideColSubtotal, expandHideRowSubtotal, expandRow, expandRowsAt, expandShowColSubtotal, expandShowRowSubtotal, getTableEventHandlers, hasClass, hideDescendantCol, isColDisable, isColDisableExpandCollapse, isColHideOnExpand, isRowDisable, isRowDisableExpandCollapse, isRowHideOnExpand, main, getSubtotalInBrackets, processKeys, encodeHtmlEntities, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, removeClass, replaceClass, rowAttrs, rowDisableAfter, rowKeys, rowTotals, setAttributes, showChildCol, showChildRow, toggleCol, toggleColHeaderHeader, toggleRow, toggleRowHeaderHeader, tree, assumptionSubscribe;
|
|
488
488
|
var createTotalValsBolder, createGrandTotalBolder, getHeaderColorProperties, colorizeRowLabelHeaders, colorizeTableIfNeed, valueNoDashes, getColorsWithOffsetForTable, offsetColors, handleFreezePanesScroll, selectFreezableElements, removeRowHeaderNullValue;
|
|
489
489
|
var getAdditionalAggregation, buildAdditionalHeaderCols, buildAdditionalHeaderRows, buildAdditionalColValues, buildAdditionalRowValues, buildAdditionalRowTotals, buildAdditionalColTotals;
|
|
490
490
|
var additionalFieldsCol, additionalFieldsRow, additionalFieldsList;
|
|
@@ -780,24 +780,30 @@ let initDRPivotTable = function($, window, document) {
|
|
|
780
780
|
applyInlineStyles = function(element, className) {
|
|
781
781
|
const tableDesignOptions = opts.chartOptions.table_design_options;
|
|
782
782
|
let optionName;
|
|
783
|
-
if (!className
|
|
784
|
-
|
|
785
|
-
if
|
|
786
|
-
element.className
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
783
|
+
if (!className) return element;
|
|
784
|
+
|
|
785
|
+
if(element.className){
|
|
786
|
+
if (_.includes(element.className, 'pvtAxisLabel') ||
|
|
787
|
+
_.includes(element.className, 'pvtColLabel')) {
|
|
788
|
+
optionName = 'columns';
|
|
789
|
+
}else if (_.includes(element.className,'pvtRowLabel')) {
|
|
790
|
+
optionName = 'rows';
|
|
791
|
+
} else if (_.includes(element.className,'pvtVal') &&
|
|
792
|
+
!_.includes(element.className,'pvtTotal')) {
|
|
793
|
+
optionName = 'values';
|
|
794
|
+
} else if (_.includes(element.className,'colTotal') ||
|
|
795
|
+
_.includes(element.className,'rowTotal') ||
|
|
796
|
+
_.includes(element.className,'pvtGrandTotal')) {
|
|
797
|
+
optionName = 'totals';
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
if(optionName && tableDesignOptions){
|
|
802
|
+
element.style.fontSize = tableDesignOptions[optionName + '_font_size'] + 'px';
|
|
803
|
+
element.style.textAlign = tableDesignOptions[optionName + '_align_text'];
|
|
804
|
+
element.style.fontFamily = tableDesignOptions[optionName + '_font_style'];
|
|
805
|
+
}
|
|
806
|
+
|
|
801
807
|
return element;
|
|
802
808
|
}
|
|
803
809
|
createElement = function(elementType, className, textContent, attributes, eventHandlers) {
|