@qrvey/utils 1.18.4 → 1.18.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/README.md
CHANGED
|
@@ -14,6 +14,7 @@ exports.mapOperatorToValidationType = mapOperatorToValidationType;
|
|
|
14
14
|
exports.buildComparisonExpressionValue = buildComparisonExpressionValue;
|
|
15
15
|
exports.buildComparativeChartComparison = buildComparativeChartComparison;
|
|
16
16
|
exports.resolveDeltaDiffInfo = resolveDeltaDiffInfo;
|
|
17
|
+
exports.resolveColumnOrder = resolveColumnOrder;
|
|
17
18
|
exports.computeDeltaCellContent = computeDeltaCellContent;
|
|
18
19
|
const get_1 = require("../general/object/get");
|
|
19
20
|
const format_1 = require("../format/format");
|
|
@@ -375,6 +376,10 @@ function resolveDeltaDiffInfo(dataField, comparativeVirtualColumns, getChartColu
|
|
|
375
376
|
}
|
|
376
377
|
return { origUniqueCode: "", diffIndex: -1 };
|
|
377
378
|
}
|
|
379
|
+
function resolveColumnOrder(chart) {
|
|
380
|
+
const order = (0, get_1._get)(chart, "data.v2.comparativeAnalisis.columnOrder");
|
|
381
|
+
return order?.length ? [...order] : undefined;
|
|
382
|
+
}
|
|
378
383
|
function computeDeltaCellContent(comparativeAnalisis, columnKey, rawValue, options) {
|
|
379
384
|
const match = columnKey.match(/^(.+?)__delta(?:_(\d+))?$/);
|
|
380
385
|
if (!match)
|
|
@@ -23,6 +23,7 @@ export declare function resolveDeltaDiffInfo(dataField: string, comparativeVirtu
|
|
|
23
23
|
origUniqueCode: string;
|
|
24
24
|
diffIndex: number;
|
|
25
25
|
};
|
|
26
|
+
export declare function resolveColumnOrder(chart: any): string[] | undefined;
|
|
26
27
|
export interface IDifferenceColumnStyle {
|
|
27
28
|
id: string;
|
|
28
29
|
name: string;
|
|
@@ -358,6 +358,10 @@ export function resolveDeltaDiffInfo(dataField, comparativeVirtualColumns, getCh
|
|
|
358
358
|
}
|
|
359
359
|
return { origUniqueCode: "", diffIndex: -1 };
|
|
360
360
|
}
|
|
361
|
+
export function resolveColumnOrder(chart) {
|
|
362
|
+
const order = _get(chart, "data.v2.comparativeAnalisis.columnOrder");
|
|
363
|
+
return order?.length ? [...order] : undefined;
|
|
364
|
+
}
|
|
361
365
|
export function computeDeltaCellContent(comparativeAnalisis, columnKey, rawValue, options) {
|
|
362
366
|
const match = columnKey.match(/^(.+?)__delta(?:_(\d+))?$/);
|
|
363
367
|
if (!match)
|