@bino-bi/bn-template-engine 1.0.0-next.34 → 1.0.0-next.35
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/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-4ef6683e.entry.js +1 -0
- package/dist/bn-template-engine/{p-7d475277.entry.js → p-5a64f90f.entry.js} +1 -1
- package/dist/bn-template-engine/{p-789bfd06.entry.js → p-93b8387f.entry.js} +1 -1
- package/dist/bn-template-engine/{p-66ed6259.entry.js → p-9a61f59d.entry.js} +1 -1
- package/dist/bn-template-engine/p-BVU4bIsi.js +1 -0
- package/dist/bn-template-engine/{p-CJfJQT0m.js → p-D0tNATZq.js} +1 -1
- package/dist/bn-template-engine/p-DF9sfwBN.js +1 -0
- package/dist/bn-template-engine/{p-CAvWZ3a5.js → p-DyupX-Z-.js} +1 -1
- package/dist/bn-template-engine/{p-14d021be.entry.js → p-b0dfc113.entry.js} +1 -1
- package/dist/bn-template-engine/{p-dec6837c.entry.js → p-eea538f1.entry.js} +1 -1
- package/dist/bn-template-engine/{p-CHZ50kEY.js → p-qpZjVnX5.js} +1 -1
- package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +206 -48
- package/dist/cjs/bn-grid.cjs.entry.js +3 -3
- package/dist/cjs/bn-image.cjs.entry.js +2 -2
- package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
- package/dist/cjs/bn-ruleset.cjs.entry.js +2 -2
- package/dist/cjs/bn-text.cjs.entry.js +3 -3
- package/dist/cjs/{localFrame-P5SDUOto.js → localFrame-U3Qs0psw.js} +1 -1
- package/dist/cjs/{withBodyObserver-B1_hmuUz.js → withBodyObserver-S-FGHpAX.js} +1 -1
- package/dist/cjs/{withHasError-3kR2tdhJ.js → withHasError-BkBrsCpI.js} +8 -7
- package/dist/cjs/{withStyled-eHD8Yt2K.js → withStyled-DfE0aW7D.js} +63 -3
- package/dist/cjs/{withTranslation-yJ-j0lsu.js → withTranslation-0gkn9xoC.js} +2 -2
- package/dist/collection/components/bn-table/bn-table-renderer/bn-table-renderer.js +9 -2
- package/dist/collection/components/bn-table/bn-table.js +19 -10
- package/dist/collection/components/bn-table/utils/Table.js +34 -8
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +84 -13
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +57 -10
- package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +5 -5
- package/dist/collection/stores/ruleSets.js +8 -7
- package/dist/collection/utils/ibcsRuleSet.js +2 -1
- package/dist/collection/utils/model/Order.js +49 -2
- package/dist/collection/utils/validate.js +11 -1
- package/dist/components/bn-annotation-layer.js +1 -1
- package/dist/components/bn-annotation-list.js +1 -1
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body.js +1 -1
- package/dist/components/bn-card.js +1 -1
- package/dist/components/bn-chart-bubble-renderer.js +1 -1
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet-renderer.js +1 -1
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter-renderer.js +1 -1
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure-renderer.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time-renderer.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message.js +1 -1
- package/dist/components/bn-page.js +1 -1
- package/dist/components/bn-ruleset.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- package/dist/components/bn-table-renderer.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title-renderer.js +1 -1
- package/dist/components/bn-title.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/p-16rjcQ0t.js +1 -0
- package/dist/components/{p-8a2-IS-y.js → p-2eicD9rF.js} +1 -1
- package/dist/components/p-4vVbchX2.js +1 -0
- package/dist/components/{p-VIw66ez1.js → p-7ieJFBUk.js} +1 -1
- package/dist/components/{p-Dn3DJxQQ.js → p-9mUU4itF.js} +1 -1
- package/dist/components/{p-D5LDmR4u.js → p-B5tixDPM.js} +1 -1
- package/dist/components/p-BPGLOHUe.js +1 -0
- package/dist/components/{p-B3F_c9GB.js → p-BU_53KVT.js} +1 -1
- package/dist/components/p-BW842XlW.js +1 -0
- package/dist/components/p-BXXjh6We.js +1 -0
- package/dist/components/{p-C-oNdJj9.js → p-BXg3v5AO.js} +1 -1
- package/dist/components/{p-B7UDMyar.js → p-BhEdmPjm.js} +1 -1
- package/dist/components/{p-nHZ8466v.js → p-BmOWXYHF.js} +1 -1
- package/dist/components/{p-DLLljAll.js → p-Bo_R7f_T.js} +1 -1
- package/dist/components/{p-DdG2Ylar.js → p-BqUB56k1.js} +1 -1
- package/dist/components/{p-DHAoxu6M.js → p-BzjGUtYh.js} +1 -1
- package/dist/components/{p-BtH2oezK.js → p-C-KX1_tw.js} +1 -1
- package/dist/components/{p-BldMZbAf.js → p-C3gYq-HU.js} +1 -1
- package/dist/components/{p-CPC9Vkmg.js → p-CQVAHG6w.js} +1 -1
- package/dist/components/{p-4BanAktr.js → p-C_6KHDYv.js} +1 -1
- package/dist/components/{p-ClGOhg6P.js → p-Cel0a6ma.js} +1 -1
- package/dist/components/{p-Ku08TQL1.js → p-Chuj-LpI.js} +1 -1
- package/dist/components/{p-M6hn0BuZ.js → p-CniN8ALm.js} +1 -1
- package/dist/components/{p-BcOud3dQ.js → p-DDvWTgk1.js} +1 -1
- package/dist/components/p-DJUffGeB.js +1 -0
- package/dist/components/p-DQl2K2Xl.js +1 -0
- package/dist/components/p-DT04Cka0.js +1 -0
- package/dist/components/{p-BVnYDfb8.js → p-DTmqMQpw.js} +1 -1
- package/dist/components/{p-DSkyHSIL.js → p-DaOm9YwQ.js} +1 -1
- package/dist/components/p-DjPWZfry.js +1 -0
- package/dist/components/{p-BXt0ers2.js → p-Dm6EAaJ9.js} +1 -1
- package/dist/components/p-Do4oPrkE.js +1 -0
- package/dist/components/{p-DEHnizot.js → p-Dq9dG0Kr.js} +1 -1
- package/dist/components/{p-D6cWoDk1.js → p-M2k_I8lv.js} +1 -1
- package/dist/components/{p-B4pmO5QQ.js → p-NBaq67dL.js} +1 -1
- package/dist/components/p-OquycEMA.js +1 -0
- package/dist/components/{p-CJtE8Pyr.js → p-eWxolPDU.js} +1 -1
- package/dist/components/{p-De82WP7z.js → p-fKJx8WtW.js} +1 -1
- package/dist/components/{p-xhiPDAZa.js → p-sLbQ7yZ1.js} +1 -1
- package/dist/components/{p-GrpYAVHb.js → p-sar8m7th.js} +1 -1
- package/dist/components/{p-CYqHwYgQ.js → p-tkB96Ena.js} +1 -1
- package/dist/esm/bn-annotation-layer_30.entry.js +206 -48
- package/dist/esm/bn-grid.entry.js +3 -3
- package/dist/esm/bn-image.entry.js +2 -2
- package/dist/esm/bn-internationalization.entry.js +2 -2
- package/dist/esm/bn-ruleset.entry.js +2 -2
- package/dist/esm/bn-text.entry.js +3 -3
- package/dist/esm/{localFrame-IW84cmdb.js → localFrame-BNWPPaQa.js} +1 -1
- package/dist/esm/{withBodyObserver-CAnnvrE_.js → withBodyObserver-AHQAUV85.js} +1 -1
- package/dist/esm/{withHasError-Cj_MzZ8Q.js → withHasError-B6Lvj9Cq.js} +8 -7
- package/dist/esm/{withStyled-Cxua0iTP.js → withStyled-CIoJ86RM.js} +61 -4
- package/dist/esm/{withTranslation-BeAbw2--.js → withTranslation-BX9T3dfm.js} +2 -2
- package/dist/types/components/bn-table/bn-table.d.ts +17 -4
- package/dist/types/components/bn-table/utils/Table.d.ts +2 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -1
- package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +8 -0
- package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +3 -2
- package/dist/types/components.d.ts +4 -4
- package/dist/types/stores/ruleSets.d.ts +2 -1
- package/dist/types/utils/ibcsRuleSet.d.ts +2 -1
- package/dist/types/utils/model/Order.d.ts +18 -1
- package/dist/types/utils/validate.d.ts +2 -0
- package/package.json +1 -1
- package/dist/bn-template-engine/p-BNCLKXjM.js +0 -1
- package/dist/bn-template-engine/p-_SKPuKfK.js +0 -1
- package/dist/bn-template-engine/p-dc12ff1b.entry.js +0 -1
- package/dist/components/p-BNWZoAip.js +0 -1
- package/dist/components/p-BT2WH_CP.js +0 -1
- package/dist/components/p-BVtD8O36.js +0 -1
- package/dist/components/p-BWRE5w0i.js +0 -1
- package/dist/components/p-C6XrNN2m.js +0 -1
- package/dist/components/p-CGI6XIaK.js +0 -1
- package/dist/components/p-CLkpoHdg.js +0 -1
- package/dist/components/p-CYv_8LrR.js +0 -1
- package/dist/components/p-Ckl1aEvn.js +0 -1
- package/dist/components/p-CurWSJkH.js +0 -1
- package/dist/components/p-D7X69xMg.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DGis1BzT.js');
|
|
4
|
-
var withHasError = require('./withHasError-
|
|
5
|
-
var withStyled = require('./withStyled-
|
|
6
|
-
var withTranslation = require('./withTranslation-
|
|
7
|
-
var withBodyObserver = require('./withBodyObserver-
|
|
8
|
-
var localFrame = require('./localFrame-
|
|
4
|
+
var withHasError = require('./withHasError-BkBrsCpI.js');
|
|
5
|
+
var withStyled = require('./withStyled-DfE0aW7D.js');
|
|
6
|
+
var withTranslation = require('./withTranslation-0gkn9xoC.js');
|
|
7
|
+
var withBodyObserver = require('./withBodyObserver-S-FGHpAX.js');
|
|
8
|
+
var localFrame = require('./localFrame-U3Qs0psw.js');
|
|
9
9
|
var index$1 = require('./index.cjs.js');
|
|
10
10
|
var queryError = require('./queryError-BZjnIW_w.js');
|
|
11
11
|
|
|
@@ -2641,7 +2641,8 @@ function ruleSetLabels(config) {
|
|
|
2641
2641
|
* - 50 = PL: outlined (no fill)
|
|
2642
2642
|
*
|
|
2643
2643
|
* Sort indices determine column display order: PP(100s) < PL(200s) < FC(300s) < AC(400s).
|
|
2644
|
-
* Variance columns add +1000 (absolute) or +
|
|
2644
|
+
* Variance columns add +1000 (absolute) or +1005 (relative) to the base sort index,
|
|
2645
|
+
* so a relative variance sorts directly after the absolute variance with the same reference.
|
|
2645
2646
|
* Within each group, variant number (1-4) adds multiples of 10.
|
|
2646
2647
|
*
|
|
2647
2648
|
* The built-in rules live in `SYSTEM_RULESET_DEFAULTS` (stores/ruleSets); an
|
|
@@ -26903,11 +26904,20 @@ const Table$1 = class Table {
|
|
|
26903
26904
|
* ```[{"rowGroup": "Umsatz", "category": "Applications"}]```
|
|
26904
26905
|
*/
|
|
26905
26906
|
this.partof = "[]";
|
|
26906
|
-
/**
|
|
26907
|
-
* If order is set to a scenario it has also exists in scenariolist
|
|
26907
|
+
/** Comma list of the columns the rows are sorted by, left to right. `orderDirection` applies to all of them.
|
|
26908
26908
|
* <br /><br />
|
|
26909
26909
|
* values: <br />
|
|
26910
|
-
* ```category // categoryindex // rowgroup //
|
|
26910
|
+
* ```category // categoryindex // rowgroup // rowgroupindex // subcategory // subcategoryindex // ac[1-4] // fc[1-4] // pp[1-4] // pl[1-4] // auto```
|
|
26911
|
+
* <br />
|
|
26912
|
+
* or a variance, written like a scenario column, the sentiment is optional and ignored: ```dac1_pp1```, ```drfc1_pp1_pos```
|
|
26913
|
+
* <br /><br />
|
|
26914
|
+
* With `interval="setname"` a scenario or variance can name one bucket after `@`: ```dac1_pp1@_November``` sorts
|
|
26915
|
+
* by that block only. Without a bucket the sum over all buckets is used.
|
|
26916
|
+
* <br /><br />
|
|
26917
|
+
* The scenario or variance does not have to be a shown column; the sort arrow appears only on a shown one.
|
|
26918
|
+
* A plain scenario also sorts the row groups by their sum. A variance or a token with `@` sorts only the rows
|
|
26919
|
+
* inside each group, the groups keep their rowgroupindex order. With a variance or `@`, rows without data
|
|
26920
|
+
* (and a relative variance with a zero reference) sort last.
|
|
26911
26921
|
* <br /><br />
|
|
26912
26922
|
* When set to ```auto```, order is detected from the dataset silently.
|
|
26913
26923
|
*/
|
|
@@ -27262,7 +27272,7 @@ const Table$1 = class Table {
|
|
|
27262
27272
|
this.errors.remove(errId);
|
|
27263
27273
|
return;
|
|
27264
27274
|
}
|
|
27265
|
-
const invalidElements = withStyled.
|
|
27275
|
+
const invalidElements = withStyled.validateTableOrderList(newValue);
|
|
27266
27276
|
if (invalidElements.length > 0) {
|
|
27267
27277
|
this.errors.addOrReplace({
|
|
27268
27278
|
id: errId,
|
|
@@ -27590,7 +27600,7 @@ const Table$1 = class Table {
|
|
|
27590
27600
|
orderStr = this.datasetMeta.suggestedOrder;
|
|
27591
27601
|
}
|
|
27592
27602
|
const tableOrder = {
|
|
27593
|
-
hierarchy: orderStr.split(",").map((entry) => withStyled.
|
|
27603
|
+
hierarchy: orderStr.split(",").map((entry) => withStyled.normalizeOrderToken(entry)),
|
|
27594
27604
|
direction: withStyled.OrderDirection[effectiveDirection === null || effectiveDirection === void 0 ? void 0 : effectiveDirection.toUpperCase()],
|
|
27595
27605
|
};
|
|
27596
27606
|
return tableOrder;
|
|
@@ -28038,7 +28048,7 @@ const Table$1 = class Table {
|
|
|
28038
28048
|
render() {
|
|
28039
28049
|
const fontStyles = this.getFontStyles();
|
|
28040
28050
|
const effectiveFactor = this.getEffectiveScaleFactor();
|
|
28041
|
-
return (index.h(index.Host, { key: '
|
|
28051
|
+
return (index.h(index.Host, { key: '2f24deddc4e58f57ef27443a27b4706b5f1b90db', style: fontStyles }, index.h("div", { key: 'b6368e143f868d9c2a7ad8ec753a14813b60e197' }, index.h("bn-table-renderer", { key: '399b2dc8d5cf3e7a8093a9a486635ea4d1bb74b9', tableName: this.datasetName, dataVersion: this.dataVersion, sumTitle: this.prepareSumTitle(), scenarios: this.prepareScenarios(), scenariosDataFormat: this.prepareDataFormat(), grouped: this.prepareGrouped(), limit: this.prepareLimit(), showGroupTitle: this.prepareShowGroupTitle(), thereof: this.prepareThereOf(), partof: this.preparePartOf(), order: this.prepareOrder(), categorythereof: this.prepareColumnThereOf(), attributeColumns: this.prepareAttributes(), type: this.prepareTableType(), categoryWidth: this.prepareCategoryWidth(), dataFormatDigits: this.prepareDataFormatDigits(), i18n: this.prepareI18n(), i18nMode: this.prepareI18nMode(), measureScale: this.prepareMeasureScale(), measureType: this.prepareMeasureType(), measureUnit: this.prepareMeasureUnit(), showMeasureScale: this.prepareShowMeasureScale(), filter: this.prepareFilter(), barColumns: this.prepareBarColumns(), interval: this.prepareInterval(), barColumnMaxWidth: this.prepareBarColumnWidth(), unitScaling: this.prepareUnitScaling(), percentageScaling: this.preparePercentageScaling(), reportAutoScaling: this.handleAutoScalingReport, errors: this.errors, scaleFactor: effectiveFactor, ruleSetConfig: this.ruleSetConfig(), selectedStyle: this.selectedStyle }))));
|
|
28042
28052
|
}
|
|
28043
28053
|
get element() { return index.getElement(this); }
|
|
28044
28054
|
static get watchers() { return {
|
|
@@ -28343,17 +28353,17 @@ function absoluteBarGeometry(widthEm, emPx, hasNeg, hasPos) {
|
|
|
28343
28353
|
function relativePinGeometry(widthEm, emPx, hasNeg, hasPos) {
|
|
28344
28354
|
const totalWidth = contentWidth(widthEm, emPx);
|
|
28345
28355
|
const sides = sideCount(hasNeg, hasPos);
|
|
28346
|
-
const labelAreaWidth = Math.min(PIN_LABEL_EM * emPx, totalWidth / 2);
|
|
28347
|
-
const
|
|
28348
|
-
|
|
28356
|
+
const labelAreaWidth = Math.min(PIN_LABEL_EM * emPx, totalWidth / (2 * sides));
|
|
28357
|
+
const sideWidth = (totalWidth - labelAreaWidth * sides) / sides;
|
|
28358
|
+
// also leaves room for the outer half of the pin head
|
|
28349
28359
|
const pinPadding = Math.min(PIN_PADDING_EM * emPx, sideWidth * 0.2);
|
|
28350
28360
|
return {
|
|
28351
28361
|
totalWidth,
|
|
28352
28362
|
labelAreaWidth,
|
|
28353
28363
|
maxPinLength: Math.max(0, sideWidth - pinPadding),
|
|
28354
28364
|
pinPadding,
|
|
28355
|
-
axisX: hasNeg ? sideWidth : 0,
|
|
28356
|
-
|
|
28365
|
+
axisX: hasNeg ? labelAreaWidth + sideWidth : 0,
|
|
28366
|
+
labelGap: LABEL_GAP_EM * emPx,
|
|
28357
28367
|
};
|
|
28358
28368
|
}
|
|
28359
28369
|
function waterfallGeometry(widthEm, emPx) {
|
|
@@ -28389,6 +28399,13 @@ const DEFAULT_STYLES = {
|
|
|
28389
28399
|
scaleFactor: 1,
|
|
28390
28400
|
};
|
|
28391
28401
|
const AXIS_COLOR = "#666666";
|
|
28402
|
+
/** Width of the axis of a variance bar or pin, in em: near the 0.3em scenario marker in the header. */
|
|
28403
|
+
const VARIANCE_AXIS_EM = 0.25;
|
|
28404
|
+
/** Side of the square pin head and width of the pin line, in px before scaleFactor. */
|
|
28405
|
+
const PIN_HEAD_SIZE = 10;
|
|
28406
|
+
const PIN_LINE_WIDTH = 3;
|
|
28407
|
+
/** Rough average glyph width, in label font sizes, to tell if an outlier label fits inside its pin. */
|
|
28408
|
+
const LABEL_CHAR_WIDTH = 0.6;
|
|
28392
28409
|
/**
|
|
28393
28410
|
* Creates a unique pattern ID for the SVG defs
|
|
28394
28411
|
*/
|
|
@@ -28478,6 +28495,43 @@ function getScenarioStyle(scenario, styles) {
|
|
|
28478
28495
|
const type = getScenarioType(scenario);
|
|
28479
28496
|
return styles.scenarios[type];
|
|
28480
28497
|
}
|
|
28498
|
+
function getVarianceLook(scenario, styles) {
|
|
28499
|
+
if (isScenarioColumn(scenario))
|
|
28500
|
+
return null;
|
|
28501
|
+
const variance = new VarianceScenario(scenario);
|
|
28502
|
+
if (!variance.isValid)
|
|
28503
|
+
return null;
|
|
28504
|
+
const minuendSlot = getScenarioType(variance.base);
|
|
28505
|
+
const referenceSlot = getScenarioType(variance.delta);
|
|
28506
|
+
return {
|
|
28507
|
+
minuend: styles.scenarios[minuendSlot],
|
|
28508
|
+
minuendSlot,
|
|
28509
|
+
reference: styles.scenarios[referenceSlot],
|
|
28510
|
+
referenceSlot,
|
|
28511
|
+
};
|
|
28512
|
+
}
|
|
28513
|
+
/**
|
|
28514
|
+
* Axis of a variance bar or pin in the look of the reference scenario: solid (AC, PY),
|
|
28515
|
+
* a double line (PL, outlined) or dashed (FC, hatched). Lines only, so the bar stays the
|
|
28516
|
+
* one direct-child rect of the svg.
|
|
28517
|
+
*/
|
|
28518
|
+
const VarianceAxis = ({ x, height, look, styles }) => {
|
|
28519
|
+
const s = styles.scaleFactor;
|
|
28520
|
+
const width = VARIANCE_AXIS_EM * styles.emPx;
|
|
28521
|
+
const { reference, referenceSlot } = look;
|
|
28522
|
+
let lines;
|
|
28523
|
+
if (reference.fillpattern === "outlined") {
|
|
28524
|
+
const offset = width / 2 - 0.5 * s;
|
|
28525
|
+
lines = [x - offset, x + offset].map((lineX) => (index.h("line", { x1: lineX, y1: 0, x2: lineX, y2: height, stroke: reference.stroke, "stroke-width": 1 * s })));
|
|
28526
|
+
}
|
|
28527
|
+
else if (reference.fillpattern === "hatched") {
|
|
28528
|
+
lines = (index.h("line", { x1: x, y1: 0, x2: x, y2: height, stroke: reference.stroke, "stroke-width": width, "stroke-dasharray": `${2 * s}` }));
|
|
28529
|
+
}
|
|
28530
|
+
else {
|
|
28531
|
+
lines = index.h("line", { x1: x, y1: 0, x2: x, y2: height, stroke: reference.fill, "stroke-width": width });
|
|
28532
|
+
}
|
|
28533
|
+
return index.h("g", { class: `variance-axis axis-${referenceSlot}` }, lines);
|
|
28534
|
+
};
|
|
28481
28535
|
/**
|
|
28482
28536
|
* Gets the variance style based on value and sentiment direction.
|
|
28483
28537
|
* pos suffix = positive values are good (green), negative are bad (red)
|
|
@@ -28587,7 +28641,12 @@ const AbsoluteVarianceBar = (props) => {
|
|
|
28587
28641
|
const barY = padding;
|
|
28588
28642
|
const isPositive = value >= 0;
|
|
28589
28643
|
// Get style based on column type (scenario vs variance)
|
|
28590
|
-
const
|
|
28644
|
+
const look = getVarianceLook(scenario, styles);
|
|
28645
|
+
const sentimentStyle = getBarStyle(scenario, value, isPositiveGood, styles);
|
|
28646
|
+
const minuendPattern = look === null || look === void 0 ? void 0 : look.minuend.fillpattern;
|
|
28647
|
+
// the colour stays the sentiment, the pattern follows the minuend (AC solid, FC hatched, PL outlined)
|
|
28648
|
+
const barStyle = minuendPattern === "hatched" || minuendPattern === "outlined"
|
|
28649
|
+
? Object.assign(Object.assign({}, sentimentStyle), { fillpattern: minuendPattern }) : sentimentStyle;
|
|
28591
28650
|
const patternPrefix = isScenarioColumn(scenario)
|
|
28592
28651
|
? getScenarioType(scenario)
|
|
28593
28652
|
: isPositiveGood
|
|
@@ -28598,52 +28657,73 @@ const AbsoluteVarianceBar = (props) => {
|
|
|
28598
28657
|
? "neg"
|
|
28599
28658
|
: "pos";
|
|
28600
28659
|
const fillValue = getBarFill(barStyle, patternPrefix);
|
|
28601
|
-
|
|
28660
|
+
// a hatched variance bar keeps an outline, the shared getBarStroke also serves the waterfall
|
|
28661
|
+
const { stroke: barStroke, strokeWidth: barStrokeWidth } = look && barStyle.fillpattern === "hatched" ? { stroke: barStyle.stroke, strokeWidth: 1 } : getBarStroke(barStyle);
|
|
28602
28662
|
const displayValue = formattedValue || formatValue(value, false, measureScale, locale);
|
|
28663
|
+
// bars start at the outer edge of the thick variance axis
|
|
28664
|
+
const axisOffset = look ? (VARIANCE_AXIS_EM * styles.emPx) / 2 : 0;
|
|
28665
|
+
const rootX = isPositive ? axisX + axisOffset : axisX - axisOffset;
|
|
28603
28666
|
// Normal bar width (clamped to cutWidth when extreme)
|
|
28604
28667
|
const baseBarWidth = isExtreme ? cutWidth : scaledWidth;
|
|
28605
28668
|
// Label position accounts for overdrive
|
|
28606
28669
|
const totalVisualWidth = isExtreme ? cutWidth + breakGap + overdriveWidth : scaledWidth;
|
|
28607
|
-
const labelX = isPositive ?
|
|
28670
|
+
const labelX = isPositive ? rootX + totalVisualWidth + labelGap : rootX - totalVisualWidth - labelGap;
|
|
28608
28671
|
const labelAnchor = isPositive ? "start" : "end";
|
|
28609
|
-
return (index.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, index.h(PatternDefs, { styles: styles }), index.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), baseBarWidth > 0 && (index.h("rect", { x: isPositive ?
|
|
28610
|
-
renderZigzagBreak(isPositive ?
|
|
28672
|
+
return (index.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, index.h(PatternDefs, { styles: styles }), !look && index.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), baseBarWidth > 0 && (index.h("rect", { x: isPositive ? rootX : rootX - baseBarWidth, y: barY, width: baseBarWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme && overdriveWidth > 0 && (index.h("rect", { x: isPositive ? rootX + cutWidth + breakGap : rootX - cutWidth - breakGap - overdriveWidth, y: barY, width: overdriveWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme &&
|
|
28673
|
+
renderZigzagBreak(isPositive ? rootX + cutWidth : rootX - cutWidth - breakGap, breakGap, barY, barHeight, s), look && index.h(VarianceAxis, { x: axisX, height: height, look: look, styles: styles }), index.h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": labelAnchor, fill: styles.fontColor, "font-size": fs, "font-family": styles.fontFamily }, displayValue)));
|
|
28611
28674
|
};
|
|
28612
28675
|
/**
|
|
28613
28676
|
* Renders a relative variance pin chart (dr_ prefix).
|
|
28614
|
-
*
|
|
28677
|
+
* Line from the axis in the sentiment colour, ending in a square head in the look of the
|
|
28678
|
+
* minuend, with the value label beside the head like an absolute bar label. A pin beyond
|
|
28679
|
+
* the pin area is cut and ends in an arrow, its label inside the pin before the arrow.
|
|
28615
28680
|
*
|
|
28616
|
-
* Layout: [pin area with axis][label area
|
|
28681
|
+
* Layout: [left label area][pin area with axis][right label area], summing to exactly
|
|
28617
28682
|
* `columnWidthEm` em - see barColumnGeometry.ts.
|
|
28618
28683
|
* Uses percentageScaling to determine pin length (pixels per percentage point).
|
|
28619
28684
|
*/
|
|
28620
28685
|
const RelativeVariancePin = (props) => {
|
|
28686
|
+
var _a, _b;
|
|
28621
28687
|
const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, locale, percentDigits, columnWidthEm = 10, styles = DEFAULT_STYLES, } = props;
|
|
28622
28688
|
const s = styles.scaleFactor;
|
|
28623
28689
|
const fs = styles.fontSize;
|
|
28624
28690
|
// Adaptive axis placement based on data range
|
|
28625
28691
|
const hasNeg = columnStats.min < 0;
|
|
28626
28692
|
const hasPos = columnStats.max > 0;
|
|
28627
|
-
const { totalWidth, maxPinLength, axisX,
|
|
28693
|
+
const { totalWidth, maxPinLength, axisX, labelGap } = relativePinGeometry(columnWidthEm, styles.emPx, hasNeg, hasPos);
|
|
28628
28694
|
const centerY = height / 2;
|
|
28629
28695
|
// Direct unit scaling via fontSize
|
|
28630
28696
|
const percentValue = Math.abs(value) * 100;
|
|
28631
28697
|
const scaledLength = percentValue * styles.percentageScaling * fs;
|
|
28632
28698
|
const isExtreme = scaledLength > maxPinLength;
|
|
28633
28699
|
const pinLength = Math.min(scaledLength, maxPinLength);
|
|
28634
|
-
|
|
28635
|
-
const
|
|
28700
|
+
// a zero label goes to the side that has a label gutter
|
|
28701
|
+
const isPositive = value > 0 || (value === 0 && (hasPos || !hasNeg));
|
|
28702
|
+
const direction = isPositive ? 1 : -1;
|
|
28703
|
+
const pinEndX = axisX + direction * pinLength;
|
|
28636
28704
|
// Get style based on column type (scenario vs variance)
|
|
28637
28705
|
const barStyle = getBarStyle(scenario, value, isPositiveGood, styles);
|
|
28638
|
-
const
|
|
28706
|
+
const look = getVarianceLook(scenario, styles);
|
|
28707
|
+
const headStyle = (_a = look === null || look === void 0 ? void 0 : look.minuend) !== null && _a !== void 0 ? _a : styles.scenarios.ac;
|
|
28708
|
+
const headSize = PIN_HEAD_SIZE * s;
|
|
28639
28709
|
const displayValue = formattedValue || formatValue(value, true, measureScale, locale, percentDigits);
|
|
28640
|
-
|
|
28710
|
+
// the arrow tip lands on the outer edge of a full-length head
|
|
28711
|
+
const tipX = axisX + direction * (maxPinLength + headSize / 2);
|
|
28712
|
+
const arrowBaseX = tipX - direction * headSize;
|
|
28713
|
+
const labelFitsInside = maxPinLength - headSize / 2 - labelGap >= displayValue.length * LABEL_CHAR_WIDTH * fs;
|
|
28714
|
+
const labelInside = isExtreme && labelFitsInside;
|
|
28715
|
+
let labelX = pinEndX + direction * (headSize / 2 + labelGap);
|
|
28716
|
+
if (isExtreme) {
|
|
28717
|
+
labelX = labelInside ? arrowBaseX - direction * labelGap : tipX + direction * labelGap;
|
|
28718
|
+
}
|
|
28719
|
+
const labelAtStart = isPositive !== labelInside;
|
|
28720
|
+
return (index.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, index.h(PatternDefs, { styles: styles }), look ? (index.h(VarianceAxis, { x: axisX, height: height, look: look, styles: styles })) : (index.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s })), index.h("line", { x1: axisX, y1: centerY, x2: isExtreme ? arrowBaseX : pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": PIN_LINE_WIDTH * s }), isExtreme ? (index.h("polygon", { points: `${tipX},${centerY} ${arrowBaseX},${centerY - headSize / 2} ${arrowBaseX},${centerY + headSize / 2}`, fill: barStyle.fill })) : (index.h("rect", { x: pinEndX - headSize / 2, y: centerY - headSize / 2, width: headSize, height: headSize, fill: headStyle.fillpattern === "outlined" ? "#ffffff" : getBarFill(headStyle, (_b = look === null || look === void 0 ? void 0 : look.minuendSlot) !== null && _b !== void 0 ? _b : "ac"), stroke: headStyle.stroke, "stroke-width": 1 * s })), index.h("text", Object.assign({ x: labelX, y: height / 2, dy: "0.35em", "text-anchor": labelAtStart ? "start" : "end", fill: styles.fontColor, "font-size": fs, "font-style": "italic", "font-family": styles.fontFamily }, (labelInside ? { stroke: "#ffffff", "stroke-width": 3 * s, "paint-order": "stroke" } : {})), displayValue)));
|
|
28641
28721
|
};
|
|
28642
28722
|
/**
|
|
28643
28723
|
* CellBarChart - Renders IBCS-compliant variance bar charts.
|
|
28644
28724
|
*
|
|
28645
28725
|
* Absolute variance (d_ prefix): Horizontal bars with centered axis
|
|
28646
|
-
* Relative variance (dr_ prefix): Pin
|
|
28726
|
+
* Relative variance (dr_ prefix): Pin charts with a square head and value indication
|
|
28647
28727
|
*
|
|
28648
28728
|
* Uses componentStyle patterns from chart components for consistent styling.
|
|
28649
28729
|
*/
|
|
@@ -28755,6 +28835,8 @@ class DataQuery {
|
|
|
28755
28835
|
this.hasPartOf = false;
|
|
28756
28836
|
/** Values bound as AlaSQL parameters ($0, $1, ...): row values and free-text config never become SQL text. */
|
|
28757
28837
|
this.params = [];
|
|
28838
|
+
/** Select fragment (leading comma) of the sort keys for variance and bucketed order tokens. */
|
|
28839
|
+
this.sortSelect = "";
|
|
28758
28840
|
/** Set by execute: the grouped table has rows with a blank rowGroup (null, '' or missing). */
|
|
28759
28841
|
this.hasBlankRowGroup = false;
|
|
28760
28842
|
this.config = config;
|
|
@@ -28800,15 +28882,22 @@ class DataQuery {
|
|
|
28800
28882
|
const relativeScenarios = this.getRelativeScenarios();
|
|
28801
28883
|
const attributesSQL = this.config.attributes.map((attribute) => this.translateAttributeSQL(attribute)).toString();
|
|
28802
28884
|
const groups = new QueryGroups(this.config);
|
|
28885
|
+
// a bucket only applies under interval setname, else the token sorts like its bare column
|
|
28886
|
+
const sortOrder = this.config.interval === INTERVAL_SETNAME
|
|
28887
|
+
? this.config.sortOrder
|
|
28888
|
+
: {
|
|
28889
|
+
hierarchy: this.config.sortOrder.hierarchy.map((column) => { var _a, _b; return (_b = (_a = withStyled.parseOrderToken(column)) === null || _a === void 0 ? void 0 : _a.column) !== null && _b !== void 0 ? _b : column; }),
|
|
28890
|
+
direction: this.config.sortOrder.direction,
|
|
28891
|
+
};
|
|
28803
28892
|
let order = ["", ""];
|
|
28804
|
-
if (
|
|
28805
|
-
order = this.createOrderString(
|
|
28893
|
+
if (sortOrder.hierarchy.length > 0) {
|
|
28894
|
+
order = this.createOrderString(sortOrder);
|
|
28806
28895
|
}
|
|
28807
28896
|
this.hasPartOf = this.checkConfigForPartOf();
|
|
28808
28897
|
// meta defines groups and the number detail rows in each group
|
|
28809
28898
|
// Bsp: 0: Object { totalrowcnt: 7, rowgroup: "Umsatz" }
|
|
28810
28899
|
// groups follow the order entries that exist per group (rowGroup, rowGroupIndex, scenario sum), else rowGroupIndex
|
|
28811
|
-
const { hierarchy, direction } =
|
|
28900
|
+
const { hierarchy, direction } = sortOrder;
|
|
28812
28901
|
const groupOrderColumns = hierarchy.filter((column) => column === QueryColumnNames.ROWGROUP ||
|
|
28813
28902
|
column === QueryColumnNames.ROWGROUPINDEX ||
|
|
28814
28903
|
column.toUpperCase() in withStyled.Scenarios);
|
|
@@ -28942,7 +29031,7 @@ class DataQuery {
|
|
|
28942
29031
|
? `, CASE WHEN MAX(transformOperator(operation)) = -1 THEN '-' ELSE '+' END as restOperation`
|
|
28943
29032
|
: "";
|
|
28944
29033
|
querys.push(`SELECT ${QueryColumnNames.ROWNR}, 1 as ${QueryColumnNames.ROWGROUPINDEX} , 'ENTRY' as ${QueryColumnNames.TYPE}, 'NO_GROUP' as ${QueryColumnNames.ROWGROUP}, ${this.bind(String((_a = rowGroupEntry.rowGroup) !== null && _a !== void 0 ? _a : ""))} as restRowGroup, 'REST' as ${QueryColumnNames.CATEGORY}${restOperation} ${restScenarios.length > 0 ? ", " + restScenarios : ""} FROM` +
|
|
28945
|
-
` (SELECT ROWNUM() AS ${QueryColumnNames.ROWNR}, ${querys.length} as ${QueryColumnNames.ROWGROUPINDEX} , 'ENTRY' as ${QueryColumnNames.TYPE}, ${this.bind(String(rowGroupEntry.rowGroup || "NO_GROUP"))} as ${QueryColumnNames.ROWGROUP}, ${groups.select()} ${scenarios.length > 0 ? ",".concat(scenarios) : ""} FROM ${this.fromExpr} ${queryWhereSection} GROUP BY ${groups} ORDER BY ${order[0]})` +
|
|
29034
|
+
` (SELECT ROWNUM() AS ${QueryColumnNames.ROWNR}, ${querys.length} as ${QueryColumnNames.ROWGROUPINDEX} , 'ENTRY' as ${QueryColumnNames.TYPE}, ${this.bind(String(rowGroupEntry.rowGroup || "NO_GROUP"))} as ${QueryColumnNames.ROWGROUP}, ${groups.select()} ${scenarios.length > 0 ? ",".concat(scenarios) : ""}${this.sortSelect} FROM ${this.fromExpr} ${queryWhereSection} GROUP BY ${groups} ORDER BY ${order[0]})` +
|
|
28946
29035
|
` t WHERE t.rowNr > ${this.config.limit}`);
|
|
28947
29036
|
}
|
|
28948
29037
|
}
|
|
@@ -28954,7 +29043,7 @@ class DataQuery {
|
|
|
28954
29043
|
'ENTRY' as ${QueryColumnNames.TYPE},
|
|
28955
29044
|
${this.bind(String(rowGroupEntry.rowGroup || "NO_GROUP"))} as ${QueryColumnNames.ROWGROUP},
|
|
28956
29045
|
'${QueryColumnNames.CATEGORYINDEX}',
|
|
28957
|
-
${groups.select()} ${scenarios.length > 0 ? ",".concat(scenarios) : ""} ${attributes.length > 0 ? ",".concat(attributes) : ""}
|
|
29046
|
+
${groups.select()} ${scenarios.length > 0 ? ",".concat(scenarios) : ""} ${attributes.length > 0 ? ",".concat(attributes) : ""}${this.sortSelect}
|
|
28958
29047
|
FROM ${this.fromExpr} ${queryWhereSection}
|
|
28959
29048
|
GROUP BY ${groups}
|
|
28960
29049
|
ORDER BY ${order[0]} ${queryLimitSection}`);
|
|
@@ -29144,7 +29233,7 @@ class DataQuery {
|
|
|
29144
29233
|
${QueryColumnNames.CATEGORY},
|
|
29145
29234
|
${QueryColumnNames.SUBCATEGORY},
|
|
29146
29235
|
${this.drillRowGroup} as ${QueryColumnNames.ROWGROUP},
|
|
29147
|
-
${scenarios} ${attributes.length > 0 ? ",".concat(attributes) : ""}
|
|
29236
|
+
${scenarios} ${attributes.length > 0 ? ",".concat(attributes) : ""}${this.sortSelect}
|
|
29148
29237
|
FROM ${this.fromExpr}
|
|
29149
29238
|
WHERE ${fromString}
|
|
29150
29239
|
GROUP BY ${this.drillRowGroup}, ${QueryColumnNames.CATEGORY}, ${QueryColumnNames.SUBCATEGORY}
|
|
@@ -29602,10 +29691,47 @@ class DataQuery {
|
|
|
29602
29691
|
*/
|
|
29603
29692
|
createOrderString(orderComponent) {
|
|
29604
29693
|
const inverse = OrderDirection.ASC === orderComponent.direction ? OrderDirection.DESC : OrderDirection.ASC;
|
|
29605
|
-
const
|
|
29606
|
-
|
|
29694
|
+
const sortKeys = new Map();
|
|
29695
|
+
orderComponent.hierarchy.forEach((column, i) => {
|
|
29696
|
+
const token = withStyled.parseOrderToken(column);
|
|
29697
|
+
const bucket = token === null || token === void 0 ? void 0 : token.bucket;
|
|
29698
|
+
if ((token === null || token === void 0 ? void 0 : token.kind) === "variance" || ((token === null || token === void 0 ? void 0 : token.kind) === "scenario" && bucket !== undefined)) {
|
|
29699
|
+
sortKeys.set(i, this.translateSortKeySQL(token, bucket, i));
|
|
29700
|
+
}
|
|
29701
|
+
});
|
|
29702
|
+
this.sortSelect = [...sortKeys.values()].map((key) => `, ${key}`).join("");
|
|
29703
|
+
// rows without a value sort last in both directions
|
|
29704
|
+
const orderBy = (column, i, direction) => sortKeys.has(i) ? `__sortnull${i} asc, __sort${i} ${direction}` : `${column} ${direction}`;
|
|
29705
|
+
const base = orderComponent.hierarchy.map((column, i) => orderBy(column, i, orderComponent.direction)).toString();
|
|
29706
|
+
const inverted = orderComponent.hierarchy.map((column, i) => orderBy(column, i, inverse)).toString();
|
|
29607
29707
|
return [base, inverted];
|
|
29608
29708
|
}
|
|
29709
|
+
/**
|
|
29710
|
+
* Sort key `__sort<i>` of a scenario or variance order token, as printed in an entry cell
|
|
29711
|
+
* (OPT entry rows unsigned), restricted to one setname bucket when given.
|
|
29712
|
+
* `__sortnull<i>` is 1 when the cell has no value: no data, or a relative variance with a zero reference.
|
|
29713
|
+
*/
|
|
29714
|
+
translateSortKeySQL(token, bucket, i) {
|
|
29715
|
+
const isOpt = TableType.OPT === this.config.type || TableType.OPTNOTOTAL === this.config.type;
|
|
29716
|
+
const sign = isOpt ? "" : " * transformOperator(operation)";
|
|
29717
|
+
const inBucket = bucket === undefined ? "" : `TRIM(CAST(${intervalBucketSQL(INTERVAL_SETNAME)} AS STRING)) = ${this.bind(bucket)}`;
|
|
29718
|
+
const value = (x) => `SUM(${inBucket ? `(CASE WHEN ${inBucket} THEN ${x} ELSE 0 END)` : x}${sign})`;
|
|
29719
|
+
const missing = (x) => `SUM(CASE WHEN ${inBucket ? `${inBucket} AND ` : ""}${x} IS NOT NULL THEN 1 ELSE 0 END) = 0`;
|
|
29720
|
+
if (token.kind === "scenario") {
|
|
29721
|
+
return `${value(token.column)} as __sort${i}, CASE WHEN ${missing(token.column)} THEN 1 ELSE 0 END as __sortnull${i}`;
|
|
29722
|
+
}
|
|
29723
|
+
const difference = `(${value(token.base)} - ${value(token.delta)})`;
|
|
29724
|
+
let key = difference;
|
|
29725
|
+
let noValue = `${missing(token.base)} OR ${missing(token.delta)}`;
|
|
29726
|
+
if (token.type === "dr") {
|
|
29727
|
+
const reference = value(token.delta);
|
|
29728
|
+
// same rule as relativeVariance(); a decimal literal, alasql reads 1e-9 as a column name
|
|
29729
|
+
const zeroReference = `ABS(${reference}) <= ABS(${difference}) * 0.000000001`;
|
|
29730
|
+
key = `CASE WHEN ${zeroReference} THEN 0 ELSE ${difference} / ABS(${reference}) END`;
|
|
29731
|
+
noValue += ` OR ${zeroReference}`;
|
|
29732
|
+
}
|
|
29733
|
+
return `${key} as __sort${i}, CASE WHEN ${noValue} THEN 1 ELSE 0 END as __sortnull${i}`;
|
|
29734
|
+
}
|
|
29609
29735
|
/** Returns a key/value pair mapping a relative variance column to its denominator, or null for non-relative scenarios. */
|
|
29610
29736
|
createRelativeScenario(scenario) {
|
|
29611
29737
|
const scenarios = new VarianceScenario(scenario);
|
|
@@ -29660,7 +29786,7 @@ class DataQuery {
|
|
|
29660
29786
|
'PARTELEMENT' as ${QueryColumnNames.TYPE},
|
|
29661
29787
|
${QueryColumnNames.CATEGORY},
|
|
29662
29788
|
${groupName},
|
|
29663
|
-
${scenarios}
|
|
29789
|
+
${scenarios}${this.sortSelect}
|
|
29664
29790
|
FROM ${this.fromExpr}
|
|
29665
29791
|
WHERE ${fromString}
|
|
29666
29792
|
GROUP BY ${this.drillRowGroup}, ${QueryColumnNames.CATEGORY}, ${QueryColumnNames.TYPE}
|
|
@@ -30744,8 +30870,19 @@ class Table {
|
|
|
30744
30870
|
}
|
|
30745
30871
|
}
|
|
30746
30872
|
normalizeScenarios(scenarios, categoryThereOf, order, intervalBuckets = []) {
|
|
30747
|
-
var _a
|
|
30873
|
+
var _a;
|
|
30748
30874
|
const normalizedScenarios = [];
|
|
30875
|
+
// the arrow marks the first scenario or variance token; a bucket only counts under interval setname
|
|
30876
|
+
const sortToken = (_a = order === null || order === void 0 ? void 0 : order.hierarchy) === null || _a === void 0 ? void 0 : _a.map((entry) => withStyled.parseOrderToken(entry)).find((token) => (token === null || token === void 0 ? void 0 : token.kind) !== "dim");
|
|
30877
|
+
const sortBucket = this.config.interval === INTERVAL_SETNAME ? sortToken === null || sortToken === void 0 ? void 0 : sortToken.bucket : undefined;
|
|
30878
|
+
const sortDirection = (scenario, bucket) => {
|
|
30879
|
+
var _a;
|
|
30880
|
+
return sortToken != null &&
|
|
30881
|
+
((_a = withStyled.parseOrderToken(scenario)) === null || _a === void 0 ? void 0 : _a.column) === sortToken.column &&
|
|
30882
|
+
(sortBucket === undefined || sortBucket === bucket)
|
|
30883
|
+
? order.direction
|
|
30884
|
+
: undefined;
|
|
30885
|
+
};
|
|
30749
30886
|
if (intervalBuckets.length > 0) {
|
|
30750
30887
|
for (const bucket of intervalBuckets) {
|
|
30751
30888
|
for (const scenario of scenarios) {
|
|
@@ -30753,7 +30890,7 @@ class Table {
|
|
|
30753
30890
|
name: scenario,
|
|
30754
30891
|
group: scenario,
|
|
30755
30892
|
type: scenario,
|
|
30756
|
-
order: (
|
|
30893
|
+
order: sortDirection(scenario, bucket.key),
|
|
30757
30894
|
bucket: bucket.key,
|
|
30758
30895
|
bucketLabel: bucket.label,
|
|
30759
30896
|
});
|
|
@@ -30782,17 +30919,31 @@ class Table {
|
|
|
30782
30919
|
}
|
|
30783
30920
|
normalizedScenarios.push({ name: "REST", group: "REST", type: scenario, order: undefined });
|
|
30784
30921
|
}
|
|
30785
|
-
|
|
30786
|
-
if (((_b = order === null || order === void 0 ? void 0 : order.hierarchy) === null || _b === void 0 ? void 0 : _b.at(0)) === scenario) {
|
|
30787
|
-
orderDirection = order.direction;
|
|
30788
|
-
}
|
|
30789
|
-
normalizedScenarios.push({ name: scenario, group: scenario, type: scenario, order: orderDirection });
|
|
30922
|
+
normalizedScenarios.push({ name: scenario, group: scenario, type: scenario, order: sortDirection(scenario) });
|
|
30790
30923
|
}
|
|
30791
30924
|
return normalizedScenarios;
|
|
30792
30925
|
}
|
|
30793
30926
|
hasNoData() {
|
|
30794
30927
|
return this.rowCount === 0;
|
|
30795
30928
|
}
|
|
30929
|
+
/** Warning for an order `@bucket` that cannot apply, once the body was built; undefined when all apply. */
|
|
30930
|
+
orderBucketWarning() {
|
|
30931
|
+
var _a, _b;
|
|
30932
|
+
if (this.hasNoData() || this.state !== FactoryState$1.UP_TO_DATE) {
|
|
30933
|
+
return undefined;
|
|
30934
|
+
}
|
|
30935
|
+
const buckets = ((_b = (_a = this.config.sortOrder) === null || _a === void 0 ? void 0 : _a.hierarchy) !== null && _b !== void 0 ? _b : [])
|
|
30936
|
+
.map((entry) => { var _a; return (_a = withStyled.parseOrderToken(entry)) === null || _a === void 0 ? void 0 : _a.bucket; })
|
|
30937
|
+
.filter((bucket) => bucket !== undefined);
|
|
30938
|
+
if (buckets.length === 0) {
|
|
30939
|
+
return undefined;
|
|
30940
|
+
}
|
|
30941
|
+
if (this.config.interval !== INTERVAL_SETNAME) {
|
|
30942
|
+
return `order: '@${buckets[0]}' needs interval setname, the bucket is ignored.`;
|
|
30943
|
+
}
|
|
30944
|
+
const unknown = buckets.find((bucket) => !this.intervalBuckets.some((b) => b.key === bucket));
|
|
30945
|
+
return unknown === undefined ? undefined : `order: setname '${unknown}' not found, the rows are not sorted by it.`;
|
|
30946
|
+
}
|
|
30796
30947
|
/** True once the body was built and the grouped table has rows with a blank rowGroup. */
|
|
30797
30948
|
hasBlankRowGroup() {
|
|
30798
30949
|
return this.dataSetFactory.hasBlankRowGroup;
|
|
@@ -31202,7 +31353,7 @@ const BnTableRenderer = class {
|
|
|
31202
31353
|
return index.h(index.Host, { class: { "no-data": ((_a = this.table) === null || _a === void 0 ? void 0 : _a.hasNoData()) === true } }, helper());
|
|
31203
31354
|
}
|
|
31204
31355
|
componentWillRender() {
|
|
31205
|
-
var _a, _b, _c, _d, _e;
|
|
31356
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
31206
31357
|
if (!this.stores)
|
|
31207
31358
|
this.stores = withHasError.getStores(this.element);
|
|
31208
31359
|
const db = this.stores.db.db;
|
|
@@ -31235,12 +31386,19 @@ const BnTableRenderer = class {
|
|
|
31235
31386
|
else {
|
|
31236
31387
|
(_e = this.errors) === null || _e === void 0 ? void 0 : _e.remove("WARN_blankRowGroup");
|
|
31237
31388
|
}
|
|
31389
|
+
const orderBucketWarning = (_f = this.table) === null || _f === void 0 ? void 0 : _f.orderBucketWarning();
|
|
31390
|
+
if (orderBucketWarning) {
|
|
31391
|
+
(_g = this.errors) === null || _g === void 0 ? void 0 : _g.addOrReplace({ id: "WARN_orderBucket", type: "warning", message: orderBucketWarning });
|
|
31392
|
+
}
|
|
31393
|
+
else {
|
|
31394
|
+
(_h = this.errors) === null || _h === void 0 ? void 0 : _h.remove("WARN_orderBucket");
|
|
31395
|
+
}
|
|
31238
31396
|
this.barChartStyles = this.prepareBarChartStyles();
|
|
31239
31397
|
}
|
|
31240
31398
|
prepareConfig(db) {
|
|
31241
31399
|
var _a, _b, _c;
|
|
31242
31400
|
const fromExpr = withHasError.sourceExpr(db, this.tableName, this.filter);
|
|
31243
|
-
const config = new TableComponentConfigAdapter(new TableDrillGroupAdapter(), new StringAdapter(), new withStyled.OrderAdapter(new StringAdapter()), db, fromExpr,
|
|
31401
|
+
const config = new TableComponentConfigAdapter(new TableDrillGroupAdapter(), new StringAdapter(), new withStyled.OrderAdapter(new StringAdapter(), true), db, fromExpr,
|
|
31244
31402
|
// a failed measure-scale query ends in the ERR_sql of componentWillRender
|
|
31245
31403
|
(e) => {
|
|
31246
31404
|
throw e;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DGis1BzT.js');
|
|
4
4
|
var index$1 = require('./index.cjs.js');
|
|
5
|
-
var localFrame = require('./localFrame-
|
|
6
|
-
var withHasError = require('./withHasError-
|
|
7
|
-
var withStyled = require('./withStyled-
|
|
5
|
+
var localFrame = require('./localFrame-U3Qs0psw.js');
|
|
6
|
+
var withHasError = require('./withHasError-BkBrsCpI.js');
|
|
7
|
+
var withStyled = require('./withStyled-DfE0aW7D.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Header configuration types and parsing utilities for bn-grid component.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DGis1BzT.js');
|
|
4
|
-
var withStyled = require('./withStyled-
|
|
5
|
-
var withHasError = require('./withHasError-
|
|
4
|
+
var withStyled = require('./withStyled-DfE0aW7D.js');
|
|
5
|
+
var withHasError = require('./withHasError-BkBrsCpI.js');
|
|
6
6
|
|
|
7
7
|
const bnImageCss = () => `:host{display:inline-block;position:relative;overflow:hidden}img{max-width:100%;height:auto}`;
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DGis1BzT.js');
|
|
4
|
-
var withBodyObserver = require('./withBodyObserver-
|
|
5
|
-
var withHasError = require('./withHasError-
|
|
4
|
+
var withBodyObserver = require('./withBodyObserver-S-FGHpAX.js');
|
|
5
|
+
var withHasError = require('./withHasError-BkBrsCpI.js');
|
|
6
6
|
var queryError = require('./queryError-BZjnIW_w.js');
|
|
7
7
|
|
|
8
8
|
const bnInternationalizationCss = () => `bn-internationalization{display:none}`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DGis1BzT.js');
|
|
4
|
-
var withBodyObserver = require('./withBodyObserver-
|
|
5
|
-
var withHasError = require('./withHasError-
|
|
4
|
+
var withBodyObserver = require('./withBodyObserver-S-FGHpAX.js');
|
|
5
|
+
var withHasError = require('./withHasError-BkBrsCpI.js');
|
|
6
6
|
|
|
7
7
|
const bnRulesetCss = () => `bn-ruleset{display:none}`;
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DGis1BzT.js');
|
|
4
|
-
var withTranslation = require('./withTranslation-
|
|
5
|
-
var withHasError = require('./withHasError-
|
|
6
|
-
var withStyled = require('./withStyled-
|
|
4
|
+
var withTranslation = require('./withTranslation-0gkn9xoC.js');
|
|
5
|
+
var withHasError = require('./withHasError-BkBrsCpI.js');
|
|
6
|
+
var withStyled = require('./withStyled-DfE0aW7D.js');
|
|
7
7
|
|
|
8
8
|
const NAME = "[A-Za-z_$\\u00C0-\\uFFFF][\\w$\\u00C0-\\uFFFF]*";
|
|
9
9
|
const STRING = `'[^'\\\\]*'|"[^"\\\\]*"`;
|
|
@@ -832,7 +832,8 @@ const SYSTEM_I18N_DEFAULTS = { _system: { de, en } };
|
|
|
832
832
|
/**
|
|
833
833
|
* Built-in IBCS rule-set defaults per IBCS notation standard v1.2.
|
|
834
834
|
* Sort order: PP(100s) < PL(200s) < FC(300s) < AC(400s); variance prefixes
|
|
835
|
-
* add +1000 (absolute) or +
|
|
835
|
+
* add +1000 (absolute) or +1005 (relative), so a relative variance sorts
|
|
836
|
+
* directly after the absolute variance with the same reference.
|
|
836
837
|
*/
|
|
837
838
|
const SYSTEM_RULESET_DEFAULTS = {
|
|
838
839
|
scenarios: {
|
|
@@ -848,12 +849,12 @@ const SYSTEM_RULESET_DEFAULTS = {
|
|
|
848
849
|
dbu: { name: "dBU", colorIndex: 50, sortIndex: 1200 },
|
|
849
850
|
dpp: { name: "dPP", colorIndex: 20, sortIndex: 1100 },
|
|
850
851
|
dpy: { name: "dPY", colorIndex: 20, sortIndex: 1100 },
|
|
851
|
-
drac: { name: "drAC", colorIndex: 10, sortIndex:
|
|
852
|
-
drfc: { name: "drFC", colorIndex: 30, sortIndex:
|
|
853
|
-
drpl: { name: "drPL", colorIndex: 50, sortIndex:
|
|
854
|
-
drbu: { name: "drBU", colorIndex: 50, sortIndex:
|
|
855
|
-
drpp: { name: "drPP", colorIndex: 20, sortIndex:
|
|
856
|
-
drpy: { name: "drPY", colorIndex: 20, sortIndex:
|
|
852
|
+
drac: { name: "drAC", colorIndex: 10, sortIndex: 1405 },
|
|
853
|
+
drfc: { name: "drFC", colorIndex: 30, sortIndex: 1305 },
|
|
854
|
+
drpl: { name: "drPL", colorIndex: 50, sortIndex: 1205 },
|
|
855
|
+
drbu: { name: "drBU", colorIndex: 50, sortIndex: 1205 },
|
|
856
|
+
drpp: { name: "drPP", colorIndex: 20, sortIndex: 1105 },
|
|
857
|
+
drpy: { name: "drPY", colorIndex: 20, sortIndex: 1105 },
|
|
857
858
|
},
|
|
858
859
|
fallback: {
|
|
859
860
|
name: "Series",
|