@bino-bi/bn-template-engine 1.0.0-next.19 → 1.0.0-next.21

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.
Files changed (144) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/{p-7bdc0e28.entry.js → p-28d5c266.entry.js} +1 -1
  3. package/dist/bn-template-engine/{p-2e6dc267.entry.js → p-2d3ea756.entry.js} +1 -1
  4. package/dist/bn-template-engine/{p-9879c9b2.entry.js → p-2fba7c99.entry.js} +1 -1
  5. package/dist/bn-template-engine/{p-eca8e2e2.entry.js → p-6077155f.entry.js} +1 -1
  6. package/dist/bn-template-engine/{p-74c5a95d.entry.js → p-687032d5.entry.js} +1 -1
  7. package/dist/bn-template-engine/{p-22d0fb7a.entry.js → p-6c7f0076.entry.js} +1 -1
  8. package/dist/bn-template-engine/{p-Dg9OcXAO.js → p-6lOdN-fB.js} +1 -1
  9. package/dist/bn-template-engine/{p-83c71b16.entry.js → p-7e9dbc93.entry.js} +1 -1
  10. package/dist/bn-template-engine/{p-b25455a7.entry.js → p-99477a27.entry.js} +1 -1
  11. package/dist/bn-template-engine/p-A8xyE4b1.js +1 -0
  12. package/dist/bn-template-engine/p-BgIpdpfH.js +1 -0
  13. package/dist/bn-template-engine/p-BpWWgN6k.js +1 -0
  14. package/dist/bn-template-engine/{p-Bdfxd_Ke.js → p-C5uvAEKI.js} +1 -1
  15. package/dist/bn-template-engine/p-C8Q0lsaU.js +1 -0
  16. package/dist/bn-template-engine/{p-DY7YYmpa.js → p-C9i1Xsib.js} +1 -1
  17. package/dist/bn-template-engine/{p-BWKdb9ym.js → p-CJThzFZm.js} +1 -1
  18. package/dist/bn-template-engine/{p-rdqTC0_5.js → p-CYE0I1Mx.js} +1 -1
  19. package/dist/bn-template-engine/{p-X6CxL6W-.js → p-DwYUTvvI.js} +1 -1
  20. package/dist/bn-template-engine/{p-19bbac66.entry.js → p-a1380d7c.entry.js} +1 -1
  21. package/dist/bn-template-engine/{p-485d23d7.entry.js → p-a4ea9a79.entry.js} +1 -1
  22. package/dist/bn-template-engine/p-b5274369.entry.js +1 -0
  23. package/dist/bn-template-engine/{p-e96da91f.entry.js → p-b9e94127.entry.js} +1 -1
  24. package/dist/bn-template-engine/p-ba912130.entry.js +1 -0
  25. package/dist/bn-template-engine/{p-f9dfd120.entry.js → p-de29986f.entry.js} +1 -1
  26. package/dist/bn-template-engine/{p-BZV1b5VH.js → p-eEfqksk-.js} +1 -1
  27. package/dist/bn-template-engine/{p-aakBGfzL.js → p-fFtEvsY-.js} +1 -1
  28. package/dist/cjs/{AxisConfig-VnVelfSV.js → AxisConfig-D7CAyPLO.js} +1 -1
  29. package/dist/cjs/{LabelCollisionManager-nfD5P__k.js → LabelCollisionManager-DkdQ9Xdg.js} +2 -2
  30. package/dist/cjs/{Order-DobBozQC.js → Order-IPfAP0q8.js} +1 -1
  31. package/dist/cjs/{SVGStyle-BQOmGWLX.js → SVGStyle-BD8jApd4.js} +2 -2
  32. package/dist/cjs/{SVGVariancesStyleGroup-DCGfHrqh.js → SVGVariancesStyleGroup-BaWzR951.js} +1 -1
  33. package/dist/cjs/{VarianceMeasure-NY9yhiNV.js → VarianceMeasure-BBWTgv2e.js} +1 -1
  34. package/dist/cjs/{XYChartDataRow-B7OKrAcC.js → XYChartDataRow-BoR0CTfl.js} +4 -4
  35. package/dist/cjs/bn-asset_21.cjs.entry.js +93 -35
  36. package/dist/cjs/bn-chart-bubble.cjs.entry.js +8 -8
  37. package/dist/cjs/bn-chart-bullet.cjs.entry.js +7 -7
  38. package/dist/cjs/bn-chart-scatter.cjs.entry.js +7 -7
  39. package/dist/cjs/bn-grid.cjs.entry.js +5 -5
  40. package/dist/cjs/bn-image.cjs.entry.js +4 -4
  41. package/dist/cjs/bn-internationalization.cjs.entry.js +1 -1
  42. package/dist/cjs/bn-ruleset.cjs.entry.js +1 -1
  43. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  44. package/dist/cjs/bn-text.cjs.entry.js +5 -5
  45. package/dist/cjs/bn-tree.cjs.entry.js +4 -4
  46. package/dist/cjs/{context-protocol-BDrMkhc4.js → context-protocol-BBhT9B52.js} +9 -3
  47. package/dist/cjs/editor-companion.cjs.entry.js +1 -1
  48. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +5 -5
  49. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +5 -5
  50. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +5 -5
  51. package/dist/cjs/{layoutObserver-o03YUfn_.js → layoutObserver-DUYYkDMQ.js} +3 -3
  52. package/dist/cjs/loader.cjs.js +1 -1
  53. package/dist/cjs/{scaling-DKZyjWj5.js → scaling-BIJQ2NV1.js} +4 -2
  54. package/dist/cjs/{withScalingGroup-BmcRlWBs.js → withScalingGroup-D5clRvRe.js} +1 -1
  55. package/dist/cjs/{withStyled-CRiC9fzc.js → withStyled-Cm9dWQhu.js} +34 -3
  56. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +2 -2
  57. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +1 -1
  58. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +19 -2
  59. package/dist/collection/components/bn-chart-time/bn-chart-time.js +2 -2
  60. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +3 -1
  61. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +19 -1
  62. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +5 -0
  63. package/dist/collection/components/bn-context/bn-context.js +20 -1
  64. package/dist/collection/components/bn-grid/bn-grid.js +20 -1
  65. package/dist/collection/components/bn-layout-card/bn-layout-card.js +3 -3
  66. package/dist/collection/components/bn-layout-page/bn-layout-page.js +3 -3
  67. package/dist/collection/components/bn-table/bn-table.js +2 -2
  68. package/dist/collection/components/bn-table/ibcs-table.js +1 -1
  69. package/dist/collection/components/bn-table/utils/Table.js +0 -1
  70. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +3 -1
  71. package/dist/collection/components/bn-title/bn-title.js +5 -1
  72. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +25 -2
  73. package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +4 -4
  74. package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js +6 -2
  75. package/dist/collection/components/bn-title/ibcs-title/utils/model/TitleConfig.js +5 -0
  76. package/dist/collection/components/bn-tree/bn-tree.js +19 -0
  77. package/dist/collection/stores/internationalization.js +9 -3
  78. package/dist/collection/utils/DateStringFactory.js +31 -0
  79. package/dist/collection/utils/withTranslation.js +3 -1
  80. package/dist/components/DateStringFactory.js +1 -1
  81. package/dist/components/bn-chart-structure.js +1 -1
  82. package/dist/components/bn-chart-time.js +1 -1
  83. package/dist/components/bn-context.js +1 -1
  84. package/dist/components/bn-grid.js +1 -1
  85. package/dist/components/bn-layout-card.js +1 -1
  86. package/dist/components/bn-layout-page.js +1 -1
  87. package/dist/components/bn-table.js +1 -1
  88. package/dist/components/bn-title2.js +1 -1
  89. package/dist/components/bn-tree.js +1 -1
  90. package/dist/components/context-protocol.js +1 -1
  91. package/dist/components/ibcs-chart-structure2.js +1 -1
  92. package/dist/components/ibcs-chart-time2.js +1 -1
  93. package/dist/components/ibcs-table2.js +1 -1
  94. package/dist/components/ibcs-title2.js +1 -1
  95. package/dist/esm/{AxisConfig-C_zWCKlL.js → AxisConfig-ByIP5J-9.js} +1 -1
  96. package/dist/esm/{LabelCollisionManager-8swVQHKA.js → LabelCollisionManager-DaNiDiM9.js} +2 -2
  97. package/dist/esm/{Order-BPeWfygb.js → Order-BQeJE_yi.js} +1 -1
  98. package/dist/esm/{SVGStyle-BxEDw9zh.js → SVGStyle-BwBlY3Km.js} +2 -2
  99. package/dist/esm/{SVGVariancesStyleGroup-DRQYvSDD.js → SVGVariancesStyleGroup-BpGW4CvN.js} +1 -1
  100. package/dist/esm/{VarianceMeasure-DnwNKspZ.js → VarianceMeasure-CE3N8Bea.js} +1 -1
  101. package/dist/esm/{XYChartDataRow-DeV4r-Wm.js → XYChartDataRow-DeMI1JKU.js} +4 -4
  102. package/dist/esm/bn-asset_21.entry.js +93 -35
  103. package/dist/esm/bn-chart-bubble.entry.js +8 -8
  104. package/dist/esm/bn-chart-bullet.entry.js +7 -7
  105. package/dist/esm/bn-chart-scatter.entry.js +7 -7
  106. package/dist/esm/bn-grid.entry.js +5 -5
  107. package/dist/esm/bn-image.entry.js +4 -4
  108. package/dist/esm/bn-internationalization.entry.js +1 -1
  109. package/dist/esm/bn-ruleset.entry.js +1 -1
  110. package/dist/esm/bn-template-engine.js +1 -1
  111. package/dist/esm/bn-text.entry.js +5 -5
  112. package/dist/esm/bn-tree.entry.js +4 -4
  113. package/dist/esm/{context-protocol-1Yj1uKvh.js → context-protocol-d8MHrEo8.js} +9 -3
  114. package/dist/esm/editor-companion.entry.js +1 -1
  115. package/dist/esm/ibcs-chart-bubble.entry.js +5 -5
  116. package/dist/esm/ibcs-chart-bullet.entry.js +5 -5
  117. package/dist/esm/ibcs-chart-scatter.entry.js +5 -5
  118. package/dist/esm/{layoutObserver-BG5dOBYH.js → layoutObserver-BJBEyhNf.js} +3 -3
  119. package/dist/esm/loader.js +1 -1
  120. package/dist/esm/{scaling-CeSRcRl1.js → scaling-BGnpSN1j.js} +4 -2
  121. package/dist/esm/{withScalingGroup-Br70pAv9.js → withScalingGroup-CC3UcvC5.js} +1 -1
  122. package/dist/esm/{withStyled-Br2DGTPs.js → withStyled-2l5Tx3cf.js} +34 -3
  123. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +5 -0
  124. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +5 -0
  125. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +2 -0
  126. package/dist/types/components/bn-context/bn-context.d.ts +8 -0
  127. package/dist/types/components/bn-grid/bn-grid.d.ts +8 -0
  128. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +4 -0
  129. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +4 -0
  130. package/dist/types/components/bn-title/bn-title.d.ts +1 -0
  131. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +2 -0
  132. package/dist/types/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.d.ts +3 -1
  133. package/dist/types/components/bn-title/ibcs-title/utils/model/TitleConfig.d.ts +2 -0
  134. package/dist/types/components/bn-tree/bn-tree.d.ts +8 -0
  135. package/dist/types/components.d.ts +42 -4
  136. package/dist/types/utils/DateStringFactory.d.ts +19 -0
  137. package/dist/types/utils/withTranslation.d.ts +3 -1
  138. package/package.json +1 -1
  139. package/dist/bn-template-engine/p-209351c9.entry.js +0 -1
  140. package/dist/bn-template-engine/p-90806e7a.entry.js +0 -1
  141. package/dist/bn-template-engine/p-BqhIhYr1.js +0 -1
  142. package/dist/bn-template-engine/p-C0Pwqx-O.js +0 -1
  143. package/dist/bn-template-engine/p-CiudZRQr.js +0 -1
  144. package/dist/bn-template-engine/p-DTuaq8Pj.js +0 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-CDKG4xmO.js');
4
- var contextProtocol = require('./context-protocol-BDrMkhc4.js');
4
+ var contextProtocol = require('./context-protocol-BBhT9B52.js');
5
5
  var withHasError = require('./withHasError-Cl2gTQzA.js');
6
- var VarianceMeasure = require('./VarianceMeasure-NY9yhiNV.js');
7
- var Order = require('./Order-DobBozQC.js');
6
+ var VarianceMeasure = require('./VarianceMeasure-BBWTgv2e.js');
7
+ var Order = require('./Order-IPfAP0q8.js');
8
8
 
9
9
  /**
10
10
  * Mixin that provides themed styling to a Stencil component using a
@@ -196,6 +196,9 @@ class DateStringFactory {
196
196
  none: "[DATE]",
197
197
  };
198
198
  this.locale = "de";
199
+ /** Set once a caller supplies an explicit map, so `setLocale` stops overwriting it. */
200
+ this.dateFormatPinned = false;
201
+ this.dateFormatShortPinned = false;
199
202
  this.dateFormat = this._dateFormat;
200
203
  this.dateLinkFormat = this._dateLinkFormat;
201
204
  this.dateFormatShort = this._dateFormatShort;
@@ -205,12 +208,25 @@ class DateStringFactory {
205
208
  }
206
209
  setDateFormat(dateFormat) {
207
210
  this.dateFormat = dateFormat;
211
+ this.dateFormatPinned = true;
208
212
  }
209
213
  setDateFormatShort(dateFormatShort) {
210
214
  this.dateFormatShort = dateFormatShort;
215
+ this.dateFormatShortPinned = true;
211
216
  }
217
+ /**
218
+ * Selects the locale used for Luxon's localized tokens and swaps in the
219
+ * locale's pattern overrides. An explicit `setDateFormat` /
220
+ * `setDateFormatShort` always wins, whatever the call order.
221
+ */
212
222
  setLocale(locale) {
213
223
  this.locale = locale;
224
+ if (!this.dateFormatPinned) {
225
+ this.dateFormat = Object.assign(Object.assign({}, this._dateFormat), (DateStringFactory.LOCALE_DATE_FORMAT[locale] || {}));
226
+ }
227
+ if (!this.dateFormatShortPinned) {
228
+ this.dateFormatShort = Object.assign(Object.assign({}, this._dateFormatShort), (DateStringFactory.LOCALE_DATE_FORMAT_SHORT[locale] || {}));
229
+ }
214
230
  }
215
231
  /**
216
232
  * Converts date string based on dateFormatMap and the selected Type
@@ -567,6 +583,21 @@ class DateStringFactory {
567
583
  }
568
584
  }
569
585
  }
586
+ /**
587
+ * Per-locale overrides for the patterns whose literals are language-specific.
588
+ *
589
+ * The base maps above are German (`KW` = Kalenderwoche, `dd.MM.yyyy`); a
590
+ * locale listed here replaces only the entries it names. Locales that are not
591
+ * listed keep the base patterns, so adding a bundle never silently reformats
592
+ * existing reports. Luxon's `LLL` (month) and `q` (quarter) tokens are already
593
+ * locale-aware through `setLocale`, so they need no override.
594
+ */
595
+ DateStringFactory.LOCALE_DATE_FORMAT = {
596
+ en: { week: "'W'WW yyyy", day: "MM/dd/yyyy", fallback: "MM/dd/yyyy" },
597
+ };
598
+ DateStringFactory.LOCALE_DATE_FORMAT_SHORT = {
599
+ en: { week: "'W'WW", fallback: "MM/dd/yyyy" },
600
+ };
570
601
 
571
602
  /**
572
603
  * Prop validators for Stencil @Watch handlers.
@@ -534,7 +534,7 @@ export class Chart {
534
534
  return idx >= 1 || this.showCategories !== "true";
535
535
  }
536
536
  prepareI18n() {
537
- const i18nMetaLabelsLocal = [];
537
+ const i18nMetaLabelsLocal = ["no-data", "REST"];
538
538
  const i18nMetaLabelsGlobal = globalLabelKeys;
539
539
  const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
540
540
  const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
@@ -827,7 +827,7 @@ export class Chart {
827
827
  scenariosArray = [...scenariosArray, ...variancesArray];
828
828
  }
829
829
  const fontStyles = this.getFontStyles();
830
- return (h(Host, { key: 'dd704d2ab46ee7a34213eab0188671e3df4ca592', style: fontStyles }, h("div", { key: '71c53b1dbd77e68a46e63fdf252cd11efb6a79a6', class: "container" }, scenariosArray.map(this.chartTemplate))));
830
+ return (h(Host, { key: '472aabc33cfbf293c44cd93537e91c42cdc9e0d7', style: fontStyles }, h("div", { key: 'd48365a9ef3a48df6cd42807f7375414dd6714ef', class: "container" }, scenariosArray.map(this.chartTemplate))));
831
831
  }
832
832
  static get is() { return "bn-chart-structure"; }
833
833
  static get encapsulation() { return "shadow"; }
@@ -62,7 +62,7 @@ export class IbcsChartStructure {
62
62
  return h(Host, null);
63
63
  }
64
64
  if (this.chart.hasNoData()) {
65
- const errorMsg = this.i18n.get("NO_DATA") || "==No Data==";
65
+ const errorMsg = this.i18n.get("no-data") || "==No Data==";
66
66
  return (h(Host, null, h("p", { class: "warning" }, errorMsg)));
67
67
  }
68
68
  return (h(Host, null, h("div", { innerHTML: (_a = this.pattern) === null || _a === void 0 ? void 0 : _a.toString(), class: "hidePatternContainer" }), h("div", { class: this.showMeasureScale ? "footer" : "footer-hide" }, (_b = this.chart) === null || _b === void 0 ? void 0 : _b.getFooter()), h("div", { innerHTML: (_c = this.chart) === null || _c === void 0 ? void 0 : _c.toString() })));
@@ -39,6 +39,9 @@ export class StructureChart {
39
39
  this.dataModel = [];
40
40
  this.variancesDataModel = [];
41
41
  this.title = "";
42
+ /** Raw config inputs the title derives from; kept so setI18n can recompute it. */
43
+ this.configTitle = "";
44
+ this.configVariances = [];
42
45
  this.smallestDataPointValue = new DataPoint(0, Scenario.AC1, 1, Scenario.NEU);
43
46
  this.highestDataPointValue = new DataPoint(0, Scenario.AC1, 1, Scenario.NEU);
44
47
  this.smallestVarianceDataPointValue = new DataPoint(0, Scenario.AC1, 1, Scenario.NEU);
@@ -103,7 +106,9 @@ export class StructureChart {
103
106
  this.populateDimensionStackSegments(scenarios, config.stackConfig, config.level);
104
107
  }
105
108
  this.variancesDataModel = this.populateVarianceModel(config.variances, this.dataModel);
106
- this.title = config.title || Formatter.translateScenarioLabel((_a = config === null || config === void 0 ? void 0 : config.variances) === null || _a === void 0 ? void 0 : _a.toString(), this.i18n);
109
+ this.configTitle = config.title;
110
+ this.configVariances = (_a = config === null || config === void 0 ? void 0 : config.variances) !== null && _a !== void 0 ? _a : [];
111
+ this.updateTitle();
107
112
  this.smallestDataPointValue = this.findSmallestDataPointValue(this.dataModel);
108
113
  this.smallestVarianceDataPointValue = this.findSmallestDataPointValue(this.variancesDataModel);
109
114
  this.highestDataPointValue = this.findHighestDataPointValue(this.dataModel);
@@ -140,6 +145,15 @@ export class StructureChart {
140
145
  */
141
146
  setI18n(i18n) {
142
147
  this.i18n = this.createI18n(i18n);
148
+ // The variance title bakes translated scenario labels in, and setI18n
149
+ // arrives after the constructor's setConfig — recompute it here so the
150
+ // first render doesn't keep the built-in labels (e.g. ΔPY vs ΔVorjahr).
151
+ this.updateTitle();
152
+ }
153
+ /** Derives the variance title from the stored config and the current i18n map. */
154
+ updateTitle() {
155
+ var _a;
156
+ this.title = this.configTitle || Formatter.translateScenarioLabel((_a = this.configVariances) === null || _a === void 0 ? void 0 : _a.toString(), this.i18n);
143
157
  }
144
158
  createI18n(i18n) {
145
159
  this.state = FactoryState.DIRTY;
@@ -625,7 +639,10 @@ export class StructureChart {
625
639
  textHook = HookLocation.Left;
626
640
  isPositive = false;
627
641
  }
628
- new Label(axisLabelGroup, this.position.getCategoryPositionX(isPositive), this.position.getBarCenterPositionY(index), "", elements.category, this.styles, HookLocation.Center, textHook).draw();
642
+ new Label(axisLabelGroup, this.position.getCategoryPositionX(isPositive), this.position.getBarCenterPositionY(index), "",
643
+ // Category labels come from the data, but the synthetic "REST"
644
+ // overflow bucket is engine-generated and translatable, as in bn-table.
645
+ this.i18n.get(elements.category) || elements.category, this.styles, HookLocation.Center, textHook).draw();
629
646
  });
630
647
  }
631
648
  new Axis({
@@ -715,7 +715,7 @@ export class Chart {
715
715
  return idx >= 1 || this.showCategories !== "true";
716
716
  }
717
717
  prepareI18n() {
718
- const i18nMetaLabelsLocal = [];
718
+ const i18nMetaLabelsLocal = ["no-data"];
719
719
  const i18nMetaLabelsGlobal = globalLabelKeys;
720
720
  const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
721
721
  const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
@@ -1068,7 +1068,7 @@ export class Chart {
1068
1068
  scenariosArray = [...scenariosArray, ...variancesArray];
1069
1069
  }
1070
1070
  const fontStyles = this.getFontStyles();
1071
- return (h(Host, { key: 'df8b91008f6f0d178bd3df91eb99a338f1734f27', style: fontStyles }, h("div", { key: '094f47f7f698b8cd87096066ae608b67c1258d71', class: "container" }, scenariosArray.map(this.chartTemplate))));
1071
+ return (h(Host, { key: '104f7786a091dd6826e780981c6f9304727294d7', style: fontStyles }, h("div", { key: 'b8730bc1ecfe26feb450881e97de7ef407163a21', class: "container" }, scenariosArray.map(this.chartTemplate))));
1072
1072
  }
1073
1073
  static get is() { return "bn-chart-time"; }
1074
1074
  static get encapsulation() { return "shadow"; }
@@ -65,7 +65,7 @@ export class IbcsChartTime {
65
65
  return h(Host, null);
66
66
  }
67
67
  if (this.chart.hasNoData()) {
68
- const errorMsg = this.i18n.get("NO_DATA") || "==No Data==";
68
+ const errorMsg = this.i18n.get("no-data") || "==No Data==";
69
69
  return (h(Host, null, h("p", { class: "warning" }, errorMsg)));
70
70
  }
71
71
  return (h(Host, null, h("div", { innerHTML: (_a = this.pattern) === null || _a === void 0 ? void 0 : _a.toString(), class: "hidePatternContainer" }), h("div", { class: this.showMeasureScale ? "footer" : "footer-hide" }, (_b = this.chart) === null || _b === void 0 ? void 0 : _b.getFooter()), h("div", { innerHTML: (_c = this.chart) === null || _c === void 0 ? void 0 : _c.toString() })));
@@ -166,6 +166,7 @@ export class IbcsChartTime {
166
166
  //}
167
167
  }
168
168
  prepareConfig() {
169
+ var _a, _b, _c;
169
170
  const db = this.getDb();
170
171
  const fromExpr = this.tableName ? buildFromExpr(this.tableName, this.filter) : "";
171
172
  return new TimeChartComponentConfigAdapter(new TimeChartDataRowAdapter(), new OrderAdapter(new StringAdapter()), new StringAdapter(), new DataFormatDigitsAdapter(), db, fromExpr).adapt({
@@ -193,6 +194,7 @@ export class IbcsChartTime {
193
194
  maxBars: this.maxBars,
194
195
  stackConfig: this.stackConfig,
195
196
  lineFullWidth: this.lineFullWidth,
197
+ locale: ((_c = (_b = (_a = this.stores) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.state) === null || _c === void 0 ? void 0 : _c.locale) || "de",
196
198
  });
197
199
  }
198
200
  prepareStyle() {
@@ -55,6 +55,9 @@ export class TimeChart {
55
55
  this.dataModel = [];
56
56
  this.variancesDataModel = [];
57
57
  this.title = "";
58
+ /** Raw config inputs the title derives from; kept so setI18n can recompute it. */
59
+ this.configTitle = "";
60
+ this.configVariances = [];
58
61
  this.smallestDataPointValue = new DataPoint(0, Scenario.AC1, 1, Scenario.NEU);
59
62
  this.highestDataPointValue = new DataPoint(0, Scenario.AC1, 1, Scenario.NEU);
60
63
  this.smallestVarianceDataPointValue = new DataPoint(0, Scenario.AC1, 1, Scenario.NEU);
@@ -167,6 +170,9 @@ export class TimeChart {
167
170
  setConfig(config) {
168
171
  var _a;
169
172
  this.state = FactoryState.DIRTY;
173
+ // Must precede setSource/populateModel: the locale is baked into the
174
+ // normalizeDate() SQL as well as into the axis date labels.
175
+ this.locale = config.locale;
170
176
  this.scenarioPropOrder = [...config.scenarios];
171
177
  const scenarios = this.sortScenariosbyVisualisationRules(config.scenarios);
172
178
  this.setSource(config.filter);
@@ -178,7 +184,9 @@ export class TimeChart {
178
184
  this.dateInterval = this.findDateInterval(config.dateInterval);
179
185
  this.dataModel = this.populateModel(scenarios, this.dateInterval, config.level, config.sortOrder);
180
186
  this.variancesDataModel = this.populateVarianceModel(config.variances, this.dataModel);
181
- this.title = config.title || Formatter.translateScenarioLabel((_a = config === null || config === void 0 ? void 0 : config.variances) === null || _a === void 0 ? void 0 : _a.toString(), this.i18n);
187
+ this.configTitle = config.title;
188
+ this.configVariances = (_a = config === null || config === void 0 ? void 0 : config.variances) !== null && _a !== void 0 ? _a : [];
189
+ this.updateTitle();
182
190
  this.smallestDataPointValue = this.findSmallestDataPointValue(this.dataModel);
183
191
  this.smallestVarianceDataPointValue = this.findSmallestDataPointValue(this.variancesDataModel);
184
192
  this.highestDataPointValue = this.findHighestDataPointValue(this.dataModel);
@@ -227,6 +235,15 @@ export class TimeChart {
227
235
  */
228
236
  setI18n(i18n) {
229
237
  this.i18n = this.createI18n(i18n);
238
+ // The variance title bakes translated scenario labels in, and setI18n
239
+ // arrives after the constructor's setConfig — recompute it here so the
240
+ // first render doesn't keep the built-in labels (e.g. ΔPY vs ΔVorjahr).
241
+ this.updateTitle();
242
+ }
243
+ /** Derives the variance title from the stored config and the current i18n map. */
244
+ updateTitle() {
245
+ var _a;
246
+ this.title = this.configTitle || Formatter.translateScenarioLabel((_a = this.configVariances) === null || _a === void 0 ? void 0 : _a.toString(), this.i18n);
230
247
  }
231
248
  /**
232
249
  * Resolves the dataset (a table or view in the shared alasql database) and
@@ -762,6 +779,7 @@ export class TimeChart {
762
779
  }
763
780
  createDateFactory() {
764
781
  const factory = new DateStringFactory();
782
+ factory.setLocale(this.locale);
765
783
  return factory;
766
784
  }
767
785
  drawAxisAndLabels(dataModel, svgContainer) {
@@ -54,6 +54,8 @@ export class TimeChartComponentConfig {
54
54
  this.stackConfig = null;
55
55
  /** When true, line charts extend to the full width of the chart area. */
56
56
  this.lineFullWidth = true;
57
+ /** Locale used for date-axis labels and SQL date normalization; set from the bn-context locale. */
58
+ this.locale = "de";
57
59
  }
58
60
  }
59
61
  /**
@@ -143,6 +145,9 @@ export class TimeChartComponentConfigAdapter {
143
145
  if (CompareUtil.isBoolean(data.lineFullWidth)) {
144
146
  config.lineFullWidth = data.lineFullWidth;
145
147
  }
148
+ if (CompareUtil.isString(data.locale)) {
149
+ config.locale = data.locale;
150
+ }
146
151
  return config;
147
152
  }
148
153
  default() {
@@ -49,7 +49,7 @@ export class Context {
49
49
  componentWillUpdate() { }
50
50
  componentDidUpdate() { }
51
51
  render() {
52
- return (h(Host, { key: 'f4f3a64c06e0cd8fa4863007ba25cacc74194e45' }, h("slot", { key: 'ee5dd7d7065107f657f1d92cdf91eedbd94f8f81' })));
52
+ return (h(Host, { key: '3c27b95cb769f4871f06453c73faa2a15dd04aa6' }, h("slot", { key: '4965ab0122454b1b84d463146e949e432adbd06c' })));
53
53
  }
54
54
  static get is() { return "bn-context"; }
55
55
  static get encapsulation() { return "shadow"; }
@@ -83,6 +83,25 @@ export class Context {
83
83
  "setter": false,
84
84
  "reflect": false,
85
85
  "attribute": "locale"
86
+ },
87
+ "i18nNamespace": {
88
+ "type": "string",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "string",
92
+ "resolved": "string",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": false,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": "Default i18n namespace for every component inside this context.\nResolved at runtime from the `i18n-namespace` attribute by the nearest\nancestor lookup in `withTranslation`; a namespace set on a page, card,\ntree, grid, or the component itself wins. Declared so the attribute is\npart of the typed public API rather than a bare DOM attribute."
100
+ },
101
+ "getter": false,
102
+ "setter": false,
103
+ "reflect": true,
104
+ "attribute": "i18n-namespace"
86
105
  }
87
106
  };
88
107
  }
@@ -262,7 +262,7 @@ export class Grid {
262
262
  "grid-template-rows": this.getGridTemplateRows(),
263
263
  gap: this.cellGap,
264
264
  };
265
- return (h(Host, { key: '05d4b729414b87446a98ea2f98552e8c17e3f4e1', style: this.getFontStyles() }, h("div", { key: 'dd2325babb734553c8661e2e18c0ab12f59e0c9f', class: "grid-container", style: gridContainerStyle }, this.renderTitle(), this.renderColumnHeaders(), this.renderDataCells()), h("slot", { key: '30cab0c8effc88704e781ff48e9295aa3cc9c954' })));
265
+ return (h(Host, { key: '9522911b83a725994d62b657469bfcdbcae4a795', style: this.getFontStyles() }, h("div", { key: 'c3d4fe8e552c31b0e10ca930a784867e1f711d01', class: "grid-container", style: gridContainerStyle }, this.renderTitle(), this.renderColumnHeaders(), this.renderDataCells()), h("slot", { key: '9772d659471df1d3588a1372fedd09d6b3bb459d' })));
266
266
  }
267
267
  static get is() { return "bn-grid"; }
268
268
  static get encapsulation() { return "shadow"; }
@@ -378,6 +378,25 @@ export class Grid {
378
378
  "attribute": "show-column-headers",
379
379
  "defaultValue": "\"true\""
380
380
  },
381
+ "i18nNamespace": {
382
+ "type": "string",
383
+ "mutable": false,
384
+ "complexType": {
385
+ "original": "string",
386
+ "resolved": "string",
387
+ "references": {}
388
+ },
389
+ "required": false,
390
+ "optional": false,
391
+ "docs": {
392
+ "tags": [],
393
+ "text": "I18n namespace inherited by this grid's children (their own namespace\nwins). Resolved at runtime from the `i18n-namespace` attribute by the\nnearest ancestor lookup in `withTranslation`; the grid renders no\ntranslated text itself. Declared so the attribute is part of the typed\npublic API rather than a bare DOM attribute."
394
+ },
395
+ "getter": false,
396
+ "setter": false,
397
+ "reflect": true,
398
+ "attribute": "i18n-namespace"
399
+ },
381
400
  "showBorders": {
382
401
  "type": "string",
383
402
  "mutable": false,
@@ -274,7 +274,7 @@ export class LayoutCard {
274
274
  var _a, _b, _c, _d, _e, _f;
275
275
  const style = this.getLayoutStyle();
276
276
  const arrOfSlots = this.extractSlotNames(style["grid-template-areas"]);
277
- return (h("bn-card", { key: '9148aa9fc6d2567543e1c0175cfb8af68ed6c1f9', styles: this.styles, "selected-style": this.selectedStyle, class: this.setCardClass() }, h("div", { key: '07c41c719d7cc76976e1f31e2ce4f53001453709', class: "cardtitle" }, h("bn-title", { key: '07e1781e077221ca20abbbce471a06044c2aac63', "i18n-namespace": (_a = this.i18nNamespace) !== null && _a !== void 0 ? _a : this.titleNamespace, ruleset: (_b = this.resolveInherited("ruleset", this.ruleset)) !== null && _b !== void 0 ? _b : this.ruleset, "business-unit": this.titleBusinessUnit, scenarios: (_c = this.resolveInherited("titleScenarios", this.titleScenarios)) !== null && _c !== void 0 ? _c : this.titleScenarios, variances: (_d = this.resolveInherited("titleVariances", this.titleVariances)) !== null && _d !== void 0 ? _d : this.titleVariances, order: (_e = this.resolveInherited("titleOrder", this.titleOrder)) !== null && _e !== void 0 ? _e : this.titleOrder, "order-direction": (_f = this.resolveInherited("titleOrderDirection", this.titleOrderDirection)) !== null && _f !== void 0 ? _f : this.titleOrderDirection, measures: this.titleMeasures, "date-start": this.titleDateStart, "date-end": this.titleDateEnd, "date-format": this.titleDateFormat, "date-link": this.titleDateLink }), this.titleImage != null && this.titleImage !== "" ? (h("img", { class: "image", src: this.prepareTitleImage(this.titleImage) })) : ("")), h("bn-body", { key: 'b862d9122c3f1afcdb1ab13a0a273a455cf5c340' }, h("div", { key: 'b91f90de3f73393c198decf8c59dc1a016bbc4d6', style: style, "data-bn-fit-content": this.cardFitToContent ? String(this.getRowCount(this.cardLayout)) : null }, this.getSlots(arrOfSlots))), h("bn-footer", { key: 'b79caec1a428d999b8edb58d938c754e3ccdd884', text: this.footerText, "page-number": 0, "display-page-number": "false" })));
277
+ return (h("bn-card", { key: '2aa7bd3e3beb1a6b6b0dc0b06c7d7eda324299a0', styles: this.styles, "selected-style": this.selectedStyle, class: this.setCardClass() }, h("div", { key: '65fe54ff342691b7f2b7df747af88499ffdbebc0', class: "cardtitle" }, h("bn-title", { key: 'be70a8c4e5cef0be0fb264fe74dc3732c2a42939', "i18n-namespace": (_a = this.i18nNamespace) !== null && _a !== void 0 ? _a : this.titleNamespace, ruleset: (_b = this.resolveInherited("ruleset", this.ruleset)) !== null && _b !== void 0 ? _b : this.ruleset, "business-unit": this.titleBusinessUnit, scenarios: (_c = this.resolveInherited("titleScenarios", this.titleScenarios)) !== null && _c !== void 0 ? _c : this.titleScenarios, variances: (_d = this.resolveInherited("titleVariances", this.titleVariances)) !== null && _d !== void 0 ? _d : this.titleVariances, order: (_e = this.resolveInherited("titleOrder", this.titleOrder)) !== null && _e !== void 0 ? _e : this.titleOrder, "order-direction": (_f = this.resolveInherited("titleOrderDirection", this.titleOrderDirection)) !== null && _f !== void 0 ? _f : this.titleOrderDirection, measures: this.titleMeasures, "date-start": this.titleDateStart, "date-end": this.titleDateEnd, "date-format": this.titleDateFormat, "date-link": this.titleDateLink }), this.titleImage != null && this.titleImage !== "" ? (h("img", { class: "image", src: this.prepareTitleImage(this.titleImage) })) : ("")), h("bn-body", { key: '5875c3e62ca38095588f13907936974259816215' }, h("div", { key: 'c845d5f8c130f2dd0ae48fc4c2301a55842f001a', style: style, "data-bn-fit-content": this.cardFitToContent ? String(this.getRowCount(this.cardLayout)) : null }, this.getSlots(arrOfSlots))), h("bn-footer", { key: '388596894d04dc2f93d6d71b9f8a0348fb46195f', text: this.footerText, "page-number": 0, "display-page-number": "false" })));
278
278
  }
279
279
  static get is() { return "bn-layout-card"; }
280
280
  static get encapsulation() { return "shadow"; }
@@ -605,12 +605,12 @@ export class LayoutCard {
605
605
  "optional": false,
606
606
  "docs": {
607
607
  "tags": [],
608
- "text": "I18n namespace for this card's title and, via default inheritance, every\ndescendant component (their own `i18n-namespace` wins). Reflected so\ndescendants can resolve it from the `i18n-namespace` attribute. Takes\nprecedence over the deprecated `titleNamespace`."
608
+ "text": "I18n namespace for this card's title and, via default inheritance, every\ndescendant component (their own `i18n-namespace` wins). Reflected so\ndescendants can resolve it from the `i18n-namespace` attribute. Takes\nprecedence over the deprecated `titleNamespace`.\n\nThe attribute name is pinned: Stencil's default dash-casing would turn\n`i18nNamespace` into `i-1-8n-namespace`, which `findAncestorWithAttr` does\nnot match, silently breaking inheritance for anyone setting the property."
609
609
  },
610
610
  "getter": false,
611
611
  "setter": false,
612
612
  "reflect": true,
613
- "attribute": "i-1-8n-namespace"
613
+ "attribute": "i18n-namespace"
614
614
  },
615
615
  "footerText": {
616
616
  "type": "string",
@@ -246,7 +246,7 @@ export class LayoutPage {
246
246
  var _a;
247
247
  const style = this.getLayoutStyle();
248
248
  const arrOfSlots = this.extractSlotNames(style["grid-template-areas"]);
249
- return (h("bn-page", { key: 'bd2068a212a1253d1fc0881c3590aee35cfab518', styles: this.styles, "selected-style": this.selectedStyle, format: this.pageFormat, orientation: this.pageOrientation }, h("bn-message", { key: '94b0ff4609038bb1cc256ce2446563fb5f7fbaa4', text: this.messageText, image: this.messageImage }), h("bn-title", { key: '8d6613939479b23f911011c29b55d5260f174e33', "i18n-namespace": (_a = this.i18nNamespace) !== null && _a !== void 0 ? _a : this.titleNamespace, ruleset: this.ruleset, "business-unit": this.titleBusinessUnit, scenarios: this.titleScenarios, variances: this.titleVariances, order: this.titleOrder, "order-direction": this.titleOrderDirection, measures: this.titleMeasures, "date-start": this.titleDateStart, "date-end": this.titleDateEnd, "date-format": this.titleDateFormat, "date-link": this.titleDateLink }), h("bn-body", { key: '25ede6efeb2b72f70c7f697f7ff2b89c3d8677ba' }, h("div", { key: '09f247d484b22b32773ea0a1147a64f89f90eb0e', style: style, "data-bn-fit-content": this.pageFitToContent ? String(this.getRowCount(this.pageLayout)) : null }, this.getSlots(arrOfSlots))), h("bn-footer", { key: '36f6359d925e9fda92cd4dc2091ac0b7d6c294fb', text: this.footerText, "page-number": this.pageNumber, "display-page-number": this.footerDisplayPageNumber })));
249
+ return (h("bn-page", { key: '6ce75e58dfb8ccab0686d8f34cc6f7830fd42db7', styles: this.styles, "selected-style": this.selectedStyle, format: this.pageFormat, orientation: this.pageOrientation }, h("bn-message", { key: '0b7f297afe281b0df05691485a93ba6c3d8abbae', text: this.messageText, image: this.messageImage }), h("bn-title", { key: 'b02de31fa8f7e03c38e12cd45ec7f02e2d986d70', "i18n-namespace": (_a = this.i18nNamespace) !== null && _a !== void 0 ? _a : this.titleNamespace, ruleset: this.ruleset, "business-unit": this.titleBusinessUnit, scenarios: this.titleScenarios, variances: this.titleVariances, order: this.titleOrder, "order-direction": this.titleOrderDirection, measures: this.titleMeasures, "date-start": this.titleDateStart, "date-end": this.titleDateEnd, "date-format": this.titleDateFormat, "date-link": this.titleDateLink }), h("bn-body", { key: '8d43429effcb755ee69665820120838c60b8b9d1' }, h("div", { key: 'f2d61818b1272551c73bf174f91f61904799a780', style: style, "data-bn-fit-content": this.pageFitToContent ? String(this.getRowCount(this.pageLayout)) : null }, this.getSlots(arrOfSlots))), h("bn-footer", { key: '8d6a6d76c7bef823ee7063586e87084654705771', text: this.footerText, "page-number": this.pageNumber, "display-page-number": this.footerDisplayPageNumber })));
250
250
  }
251
251
  static get is() { return "bn-layout-page"; }
252
252
  static get encapsulation() { return "shadow"; }
@@ -600,12 +600,12 @@ export class LayoutPage {
600
600
  "optional": false,
601
601
  "docs": {
602
602
  "tags": [],
603
- "text": "I18n namespace for this page's title and, via default inheritance, every\ndescendant component (their own `i18n-namespace` wins). Reflected so\ndescendants can resolve it from the `i18n-namespace` attribute. Takes\nprecedence over the deprecated `titleNamespace`."
603
+ "text": "I18n namespace for this page's title and, via default inheritance, every\ndescendant component (their own `i18n-namespace` wins). Reflected so\ndescendants can resolve it from the `i18n-namespace` attribute. Takes\nprecedence over the deprecated `titleNamespace`.\n\nThe attribute name is pinned: Stencil's default dash-casing would turn\n`i18nNamespace` into `i-1-8n-namespace`, which `findAncestorWithAttr` does\nnot match, silently breaking inheritance for anyone setting the property."
604
604
  },
605
605
  "getter": false,
606
606
  "setter": false,
607
607
  "reflect": true,
608
- "attribute": "i-1-8n-namespace"
608
+ "attribute": "i18n-namespace"
609
609
  },
610
610
  "pageFormat": {
611
611
  "type": "string",
@@ -824,7 +824,7 @@ export class Table {
824
824
  return I18nMode.META;
825
825
  }
826
826
  prepareI18n() {
827
- const i18nMetaLabelsLocal = ["in", "category", "operation", "there_of", "part_of", "SUM_TOTAL"];
827
+ const i18nMetaLabelsLocal = ["in", "category", "operation", "there_of", "part_of", "SUM_TOTAL", "no-data", "REST"];
828
828
  const i18nMetaLabelsGlobal = globalLabelKeys;
829
829
  // system
830
830
  const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
@@ -1127,7 +1127,7 @@ export class Table {
1127
1127
  render() {
1128
1128
  const fontStyles = this.getFontStyles();
1129
1129
  const effectiveFactor = this.getEffectiveScaleFactor();
1130
- return (h(Host, { key: 'eafc5b48a4de327d63a8850d1b65790de2fbe354', style: fontStyles }, h("div", { key: 'c775731928bc3f359714b98b42aab2072491e309' }, h("ibcs-table", { key: 'e7ff2c8a89ca29d57ecc9f246ec90fad767e3131', 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(), scaleFactor: effectiveFactor, ruleSetConfig: this.ruleSetConfig(), selectedStyle: this.selectedStyle }))));
1130
+ return (h(Host, { key: '71fe0e81888c25970edcaab0803cbdbd3b73d1fd', style: fontStyles }, h("div", { key: '5afa87ac3a8b4d5864bb34acb8a4e84de12261ea' }, h("ibcs-table", { key: '8a276ca87e342f8c3b3aac76c9915681c4b2a005', 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(), scaleFactor: effectiveFactor, ruleSetConfig: this.ruleSetConfig(), selectedStyle: this.selectedStyle }))));
1131
1131
  }
1132
1132
  static get is() { return "bn-table"; }
1133
1133
  static get encapsulation() { return "shadow"; }
@@ -76,7 +76,7 @@ export class IbcsTable {
76
76
  return;
77
77
  }
78
78
  if (this.table.hasNoData()) {
79
- const errorMsg = this.i18n.get("NO_DATA") || "==No Data==";
79
+ const errorMsg = this.i18n.get("no-data") || "==No Data==";
80
80
  return h("p", { class: "warning" }, errorMsg);
81
81
  }
82
82
  return (h("table", null, h("thead", null, this.table.getHeader().map((row) => (h("tr", { class: row.cssStyle }, row.getCells().map((cell) => (h("th", { colSpan: cell.colSpan, class: cell.cssStyle }, cell.getAsHeaderList().map((line, i, arr) => (h("span", null, i === arr.length - 1 ? (h("span", { class: line === " " ? "table-footer" : "" }, line, cell.drawPrefix(), " ")) : (h("span", null, line, cell.drawPrefix(), h("br", null))))))))))))), h("tbody", null, this.table.getBody().map((row) => (h("tr", { class: row.cssStyle }, row === null || row === void 0 ? void 0 : row.getCells().map((cell) => (h("td", { colSpan: cell.colSpan, class: cell.type ? `${cell.cssStyle} ${cell.type}` : cell.cssStyle }, cell.prefix != null ? (h("span", { class: cell.cssStyle + " " + cell.prefixStyle }, cell.drawPrefix())) : (""), cell.isBarChart &&
@@ -74,7 +74,6 @@ export class Table {
74
74
  ["pp4", "PY4"],
75
75
  ["fc4", "FC4"],
76
76
  ["pl4", "PL4"],
77
- ["in", "in"],
78
77
  ["category", " "],
79
78
  ["operation", " "],
80
79
  ["there_of", "davon"],
@@ -357,7 +357,9 @@ export class TableDataSetFactory {
357
357
  return value;
358
358
  }
359
359
  if (this.isEntryCategory(type, scenario)) {
360
- if (i18nMode === I18nMode.ALL) {
360
+ // "REST" is always translated, like SUM_TOTAL below: it is not a data
361
+ // value but the engine's own label for the limit-overflow row.
362
+ if (i18nMode === I18nMode.ALL || value === "REST") {
361
363
  return `${i18n.get(value) || value}`;
362
364
  }
363
365
  return value;
@@ -11,6 +11,7 @@ import withHasError from "../../utils/withHasError";
11
11
  import { I18nMode } from "../../utils/constants";
12
12
  import { OrderDirection } from "../../utils/model/Order";
13
13
  import { DateDistance, DateLink } from "../../utils/DateStringFactory";
14
+ import { getStores } from "../../context/context-protocol";
14
15
  /**
15
16
  * Composes an IBCS-compliant report title block.
16
17
  *
@@ -227,6 +228,9 @@ export class Title {
227
228
  prepareI18nMode() {
228
229
  return I18nMode.META;
229
230
  }
231
+ prepareLocale() {
232
+ return getStores(this.element).context.state.locale || "de";
233
+ }
230
234
  prepareTitleOrder() {
231
235
  var _a;
232
236
  if (isBlankInput(this.order) || isBlankInput(this.orderDirection)) {
@@ -291,7 +295,7 @@ export class Title {
291
295
  }
292
296
  render() {
293
297
  const fontStyles = this.getFontStyles();
294
- return (h(Host, { key: 'de097e2e8afe7fcf3268487b45b380e42448feab', style: fontStyles }, h("ibcs-title", { key: 'af0cb1c88c434e92d3fea1a71bf4d0687158353f', businessUnit: this.prepareBusinessUnit(), scenarios: this.prepareScenarios(), measures: this.prepareMeasures(), timeperiod: this.prepareTitleTimePeriod(), order: this.prepareTitleOrder(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode(), ruleSetConfig: this.ruleSetConfig() })));
298
+ return (h(Host, { key: '9b9c216010209bd5acaaeee39b6b5d8a8972710f', style: fontStyles }, h("ibcs-title", { key: '5ccf7ddc7a4fbf1308d1d09d80f5b8aa3cbf6cbd', businessUnit: this.prepareBusinessUnit(), scenarios: this.prepareScenarios(), measures: this.prepareMeasures(), timeperiod: this.prepareTitleTimePeriod(), order: this.prepareTitleOrder(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode(), locale: this.prepareLocale(), ruleSetConfig: this.ruleSetConfig() })));
295
299
  }
296
300
  static get is() { return "bn-title"; }
297
301
  static get encapsulation() { return "shadow"; }
@@ -20,6 +20,8 @@ export class IbcsTitle {
20
20
  };
21
21
  this.i18n = new Map(); // I18nMode;
22
22
  this.i18nMode = I18nMode.ALL;
23
+ /** Locale used to format the date-link labels (e.g. "en", "de"). */
24
+ this.locale = "de";
23
25
  this.title = new Title(new IBCSRuleSet());
24
26
  }
25
27
  // so
@@ -34,7 +36,7 @@ export class IbcsTitle {
34
36
  });
35
37
  }
36
38
  render() {
37
- return (h("div", { key: '7a95748a4576c654c9066efb2bfd7531238d2ed0' }, h("div", { key: '6a34ba1043660dc75b57cd029f6438d1178c34e4', innerHTML: sanitizeHtml(this.title.unit) }), h("div", { key: '6ec241e7cd6ac8a2061aab1b822973e77e2fb7cd' }, this.title.measures.map((measure, index) => (h("span", null, this.isFirstElement(index) ? this.title.i18n.get("SEPERATOR_WS") : "", h("span", { class: "measure" }, measure.name), " ", measure.unit ? this.title.i18n.get("in") : "", " ", measure.unit)))), h("div", { key: 'd6bc97cd78ec8734d4d42b2537cf61dfcac28ae4' }, this.title.dimension)));
39
+ return (h("div", { key: '4a675a92695130e13bd690587098cf70d81028c9' }, h("div", { key: '54c98ac466109f4ea1306aa57379f5cb25cf654f', innerHTML: sanitizeHtml(this.title.unit) }), h("div", { key: '35e8592454c45c06db9e3b6db5525165a3ee4a00' }, this.title.measures.map((measure, index) => (h("span", null, this.isFirstElement(index) ? this.title.i18n.get("SEPERATOR_WS") : "", h("span", { class: "measure" }, measure.name), " ", measure.unit ? this.title.i18n.get("in") : "", " ", measure.unit)))), h("div", { key: '29c93306567a592ac956d5c97501dc5e7acf90ec' }, this.title.dimension)));
38
40
  }
39
41
  componentWillLoad() {
40
42
  const config = this.prepareConfig();
@@ -63,6 +65,7 @@ export class IbcsTitle {
63
65
  intervalSpanLimit: this.intervalSpanLimit,
64
66
  i18nMode: this.i18nMode,
65
67
  order: this.order,
68
+ locale: this.locale,
66
69
  });
67
70
  }
68
71
  static get is() { return "ibcs-title"; }
@@ -261,6 +264,26 @@ export class IbcsTitle {
261
264
  "attribute": "i18n-mode",
262
265
  "defaultValue": "I18nMode.ALL"
263
266
  },
267
+ "locale": {
268
+ "type": "string",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "string",
272
+ "resolved": "string",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": false,
277
+ "docs": {
278
+ "tags": [],
279
+ "text": "Locale used to format the date-link labels (e.g. \"en\", \"de\")."
280
+ },
281
+ "getter": false,
282
+ "setter": false,
283
+ "reflect": false,
284
+ "attribute": "locale",
285
+ "defaultValue": "\"de\""
286
+ },
264
287
  "ruleSetConfig": {
265
288
  "type": "unknown",
266
289
  "mutable": false,
@@ -315,7 +338,7 @@ export class IbcsTitle {
315
338
  "signature": "(data: Partial<IbcsTitle>) => Promise<void>",
316
339
  "parameters": [{
317
340
  "name": "data",
318
- "type": "{ businessUnit?: string; setBusinessUnit?: (businessUnit: string) => Promise<void>; setProps?: (data: Partial<IbcsTitle>) => Promise<void>; scenarios?: string[]; measures?: MeasureEntry[]; timeperiod?: TimePeriod; intervalSpanLimit?: number; order?: Order; i18n?: Map<string, string>; i18nMode?: I18nMode; ruleSetConfig?: RuleSetConfig; render?: () => any; componentWillLoad?: () => void; componentWillUpdate?: () => void; componentWillRender?: () => void; }",
341
+ "type": "{ businessUnit?: string; setBusinessUnit?: (businessUnit: string) => Promise<void>; setProps?: (data: Partial<IbcsTitle>) => Promise<void>; scenarios?: string[]; measures?: MeasureEntry[]; timeperiod?: TimePeriod; intervalSpanLimit?: number; order?: Order; i18n?: Map<string, string>; i18nMode?: I18nMode; locale?: string; ruleSetConfig?: RuleSetConfig; render?: () => any; componentWillLoad?: () => void; componentWillUpdate?: () => void; componentWillRender?: () => void; }",
319
342
  "docs": ""
320
343
  }],
321
344
  "references": {
@@ -44,11 +44,11 @@ export class Title {
44
44
  ["ac3", "AC3"],
45
45
  ["pp3", "PY3"],
46
46
  ["fc3", "FC3"],
47
- ["pp3", "PL3"],
47
+ ["pl3", "PL3"],
48
48
  ["ac4", "AC4"],
49
- ["py4", "PY4"],
49
+ ["pp4", "PY4"],
50
50
  ["fc4", "FC4"],
51
- ["pp4", "PL4"],
51
+ ["pl4", "PL4"],
52
52
  ["category", " "],
53
53
  ["operation", " "],
54
54
  ["there_of", "davon"],
@@ -72,7 +72,7 @@ export class Title {
72
72
  if (FactoryState.DIRTY === this.state) {
73
73
  this.unit = this.config.businessunit;
74
74
  this.measures = this.dataSetFactory.createMeasures(this.config.measures, this.i18n, this.config.i18nMode);
75
- this.dimension = this.dataSetFactory.createDimension(this.config.scenarios, this.config.timeperiod, this.config.order, this.i18n, this.config.intervalSpanLimit);
75
+ this.dimension = this.dataSetFactory.createDimension(this.config.scenarios, this.config.timeperiod, this.config.order, this.i18n, this.config.intervalSpanLimit, this.config.locale);
76
76
  this.state = FactoryState.UP_TO_DATE;
77
77
  }
78
78
  return this;
@@ -51,11 +51,15 @@ export class TitleDataSetFactory {
51
51
  * @param time
52
52
  * @param order
53
53
  * @param i18n
54
+ * @param spanLimit
55
+ * @param locale Locale used to format the date-link labels.
54
56
  */
55
- createDimension(scenarios, time, order, i18n, spanLimit) {
57
+ createDimension(scenarios, time, order, i18n, spanLimit, locale = "de") {
56
58
  let formatedTime = "";
57
59
  if (time !== undefined) {
58
- formatedTime = new DateStringFactory().getDateLinkString(time.start, time.end, time.link, time.format, spanLimit);
60
+ const dateStringFactory = new DateStringFactory();
61
+ dateStringFactory.setLocale(locale);
62
+ formatedTime = dateStringFactory.getDateLinkString(time.start, time.end, time.link, time.format, spanLimit);
59
63
  }
60
64
  const formatedScenarios = scenarios
61
65
  .map((scenario) => {
@@ -8,6 +8,8 @@ export class TitleConfig {
8
8
  this.scenarios = [];
9
9
  this.i18nMode = I18nMode.ALL;
10
10
  this.intervalSpanLimit = 32;
11
+ /** Locale used for the date-link labels; set from the bn-context locale. */
12
+ this.locale = "de";
11
13
  }
12
14
  }
13
15
  export class TitleConifgAdapter {
@@ -40,6 +42,9 @@ export class TitleConifgAdapter {
40
42
  if (CompareUtil.isExisting(data.order)) {
41
43
  config.order = this.orderAdapter.adapt(data.order);
42
44
  }
45
+ if (CompareUtil.isString(data.locale)) {
46
+ config.locale = data.locale;
47
+ }
43
48
  return config;
44
49
  }
45
50
  default() {