pace-table-lib 1.0.26 → 1.0.27
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.
|
@@ -17,3 +17,4 @@ export declare function createBorder(bWidth: number, bType: string, bColor: stri
|
|
|
17
17
|
export declare function calculateWidthHeightDynamically(content: string, fontSize: number, fontFamily: string, fixedWidth?: number): number;
|
|
18
18
|
export declare function applyTextRelatedCss(headerArr: any[], flag: boolean): any[];
|
|
19
19
|
export declare function applyTextCssForCorners(headerArr: any[], flag: boolean): any[];
|
|
20
|
+
export declare function getIndex(str: string): number;
|
|
@@ -8324,6 +8324,9 @@ function applyTextCssForCorners(headerArr, flag) {
|
|
|
8324
8324
|
}
|
|
8325
8325
|
}));
|
|
8326
8326
|
}
|
|
8327
|
+
function getIndex(str) {
|
|
8328
|
+
return Number(str.split("~$~")[0]);
|
|
8329
|
+
}
|
|
8327
8330
|
var jquery$1 = { exports: {} };
|
|
8328
8331
|
/*!
|
|
8329
8332
|
* jQuery JavaScript Library v3.7.1
|
|
@@ -17325,7 +17328,7 @@ function StaticTable({
|
|
|
17325
17328
|
const outsideBorder = isOutsideBorderVisible ? createBorder(Border.LineWidth, Border.LineStyle, Border.LineColor) : null;
|
|
17326
17329
|
const insideVBorder = isInsideVerticalBVisible ? createBorder(Border.VerticalBorderLineWidth, Border.VerticalBorderLineStyle, Border.VerticalBorderLineColor) : null;
|
|
17327
17330
|
const insideHBorder = isInsideHorizontalBVisible ? createBorder(Border.HorizontalBorderLineWidth, Border.HorizontalBorderLineStyle, Border.HorizontalBorderLineColor) : null;
|
|
17328
|
-
const renderDataCell = (label, styles, className, childClassName, toolTip, dataBarBg) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...ToolTipVisibility ? { title: toolTip } : {}, className, style: styles, onContextMenu: styles.hasOwnProperty("oncontextmenu") ? styles.oncontextmenu : null, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: childClassName, style: { fontFamily: styles.fontFamily, textAlign: styles.justifyContent, background: dataBarBg ?? "none" }, children: label }) });
|
|
17331
|
+
const renderDataCell = (label, styles, className, childClassName, toolTip, dataBarBg) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...ToolTipVisibility ? { title: getCleanString(toolTip) ?? "" } : {}, className, style: styles, onContextMenu: styles.hasOwnProperty("oncontextmenu") ? styles.oncontextmenu : null, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: childClassName, style: { fontFamily: styles.fontFamily, textAlign: styles.justifyContent, background: dataBarBg ?? "none" }, children: label }) });
|
|
17329
17332
|
useEffect(() => {
|
|
17330
17333
|
const hide = () => setMenu((m) => ({ ...m, visible: false }));
|
|
17331
17334
|
document.addEventListener("click", hide);
|
|
@@ -17366,7 +17369,7 @@ function StaticTable({
|
|
|
17366
17369
|
if (!isColHeaderVisible) {
|
|
17367
17370
|
return headerAtStart && isColTotalOn ? 1 : 0;
|
|
17368
17371
|
}
|
|
17369
|
-
const base = Math.max(...dimensionMarks
|
|
17372
|
+
const base = Math.max(...dimensionMarks?.map((d) => d?.length));
|
|
17370
17373
|
return base + (headerAtStart && isColTotalOn ? 1 : 0);
|
|
17371
17374
|
}, [dimensionMarks, headerAtStart, isColTotalOn, isColHeaderVisible]);
|
|
17372
17375
|
const fixedColCount = useMemo(() => {
|
|
@@ -18120,7 +18123,8 @@ function StaticTable({
|
|
|
18120
18123
|
if (isConditionalFormatOn) return numberFormatConfig;
|
|
18121
18124
|
if (!measureFormatConfigs) return numberFormatConfig;
|
|
18122
18125
|
if (!givenMeasureName) return numberFormatConfig;
|
|
18123
|
-
const
|
|
18126
|
+
const mIndex = getIndex(givenMeasureName);
|
|
18127
|
+
const formattingObj = measureFormatConfigs?.[mIndex];
|
|
18124
18128
|
return formattingObj ?? numberFormatConfig;
|
|
18125
18129
|
}
|
|
18126
18130
|
function getConditionalFormat(value, formatFor, level) {
|
|
@@ -18254,8 +18258,8 @@ function StaticTable({
|
|
|
18254
18258
|
return getSparkLine(dataArr, baseStyle);
|
|
18255
18259
|
}
|
|
18256
18260
|
if (rawValue === void 0) return null;
|
|
18257
|
-
const
|
|
18258
|
-
const formattingObj = getMeasureFormattingObj(
|
|
18261
|
+
const mName = measuresBySlice[rowIdxHeat]?.measureNames[colIdxHeat] ?? void 0;
|
|
18262
|
+
const formattingObj = getMeasureFormattingObj(mName);
|
|
18259
18263
|
const conditionalFormatObj = getConditionalFormat(rawValue, CONDITIONAL_FORMAT_FOR.VALUE);
|
|
18260
18264
|
const numberFormat = conditionalFormatObj?.numberFormat ?? formattingObj.numberFormat;
|
|
18261
18265
|
const decimalPrecision = conditionalFormatObj?.decimalPrecision ?? formattingObj.decimalPrecision;
|