@bino-bi/bn-template-engine 1.0.0-alpha.5 → 1.0.0-alpha.6

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 (157) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-06946f44.entry.js +1 -0
  3. package/dist/bn-template-engine/p-0fabe296.entry.js +1 -0
  4. package/dist/bn-template-engine/p-1164c0b0.entry.js +1 -0
  5. package/dist/bn-template-engine/p-355abdf0.entry.js +1 -0
  6. package/dist/bn-template-engine/p-79KuA4Ox.js +1 -0
  7. package/dist/bn-template-engine/p-859cc06d.entry.js +1 -0
  8. package/dist/bn-template-engine/p-8acec99e.entry.js +1 -0
  9. package/dist/bn-template-engine/p-8f490c45.entry.js +1 -0
  10. package/dist/bn-template-engine/p-98cf512f.entry.js +1 -0
  11. package/dist/bn-template-engine/p-9a564f8f.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-CL1RYuNU.js → p-B0lsgVuN.js} +1 -1
  13. package/dist/bn-template-engine/p-B7p8beYH.js +1 -0
  14. package/dist/bn-template-engine/p-BDh7GfC5.js +1 -0
  15. package/dist/bn-template-engine/p-BoMtoHJB.js +1 -0
  16. package/dist/bn-template-engine/p-Bs8BqBsb.js +1 -0
  17. package/dist/bn-template-engine/p-CYjZRKdI.js +1 -0
  18. package/dist/bn-template-engine/{p-P7pGJBgc.js → p-DG-1MR_T.js} +1 -1
  19. package/dist/bn-template-engine/p-bdd2b243.entry.js +1 -0
  20. package/dist/bn-template-engine/p-e6b24f15.entry.js +1 -0
  21. package/dist/bn-template-engine/p-f27995c9.entry.js +1 -0
  22. package/dist/bn-template-engine/{p-Bnhh02CF.js → p-sRO-lj7X.js} +1 -1
  23. package/dist/bn-template-engine/p-tzFCK9qn.js +1 -0
  24. package/dist/cjs/{Order-iG11HI4R.js → Order-BGx39pS5.js} +448 -0
  25. package/dist/cjs/{alasql.min-C_nHTuEQ.js → SVGVariancesStyleGroup-BqAdPYtL.js} +8228 -3
  26. package/dist/cjs/bn-asset_16.cjs.entry.js +9018 -0
  27. package/dist/cjs/bn-card.cjs.entry.js +3 -4
  28. package/dist/cjs/bn-chart-time.cjs.entry.js +11 -16
  29. package/dist/cjs/bn-grid.cjs.entry.js +5 -8
  30. package/dist/cjs/bn-image.cjs.entry.js +5 -8
  31. package/dist/cjs/bn-internationalization.cjs.entry.js +3 -4
  32. package/dist/cjs/bn-layout-card.cjs.entry.js +125 -6
  33. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  34. package/dist/cjs/bn-template.cjs.entry.js +2 -3
  35. package/dist/cjs/bn-text.cjs.entry.js +7 -11
  36. package/dist/cjs/bn-tree.cjs.entry.js +5 -8
  37. package/dist/cjs/{formatter-DIJL_crx.js → formatter-4XCS0d2B.js} +8 -2
  38. package/dist/cjs/ibcs-chart-time.cjs.entry.js +37 -42
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/cjs/{scaling-9Tz595RQ.js → scaling-BidPsO53.js} +115 -12
  41. package/dist/cjs/{withBodyObserver-CKpSD8UT.js → withBodyObserver-C6gLgq_e.js} +3 -3
  42. package/dist/cjs/{withComponentStatus-Bw70BhO0.js → withComponentStatus-_x4LQZ0N.js} +5 -5
  43. package/dist/cjs/{withComponentStyle-aIbTCtfj.js → withComponentStyle-ClSJfCku.js} +4 -4
  44. package/dist/cjs/{utils-CwHIVbbL.js → withHasError-B8gHkfV2.js} +69 -1
  45. package/dist/cjs/{withStyled-CS1Yp4sv.js → withStyled-9tG024gQ.js} +62 -9
  46. package/dist/collection/components/bn-layout-card/bn-layout-card.css +1 -0
  47. package/dist/collection/components/bn-layout-card/bn-layout-card.js +162 -27
  48. package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -0
  49. package/dist/collection/components/bn-layout-page/bn-layout-page.js +151 -33
  50. package/dist/collection/utils/parentDimensions.js +38 -6
  51. package/dist/components/bn-layout-card.js +1 -1
  52. package/dist/components/bn-layout-page.js +1 -1
  53. package/dist/components/scaling.js +1 -1
  54. package/dist/esm/{Order-Bnhh02CF.js → Order-sRO-lj7X.js} +448 -1
  55. package/dist/esm/{alasql.min-CWu4NkIt.js → SVGVariancesStyleGroup-DOIT-zvI.js} +8212 -2
  56. package/dist/esm/bn-asset_16.entry.js +9001 -0
  57. package/dist/esm/bn-card.entry.js +4 -5
  58. package/dist/esm/bn-chart-time.entry.js +8 -13
  59. package/dist/esm/bn-grid.entry.js +6 -9
  60. package/dist/esm/bn-image.entry.js +6 -9
  61. package/dist/esm/bn-internationalization.entry.js +4 -5
  62. package/dist/esm/bn-layout-card.entry.js +126 -7
  63. package/dist/esm/bn-template-engine.js +1 -1
  64. package/dist/esm/bn-template.entry.js +2 -3
  65. package/dist/esm/bn-text.entry.js +7 -11
  66. package/dist/esm/bn-tree.entry.js +6 -9
  67. package/dist/esm/{context-protocol-BHnQsVsr.js → context-protocol-2peaD4y8.js} +1 -1
  68. package/dist/esm/editor-companion.entry.js +1 -1
  69. package/dist/esm/{formatter-DTMEZ6d8.js → formatter-BDh7GfC5.js} +6 -2
  70. package/dist/esm/ibcs-chart-time.entry.js +3 -8
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/esm/{scaling-Cehc74IE.js → scaling-BOcjT8M0.js} +112 -10
  73. package/dist/esm/{withBodyObserver-FQ8NwCIz.js → withBodyObserver-DczL5ia8.js} +1 -1
  74. package/dist/esm/{withComponentStatus-DWjDYtZ7.js → withComponentStatus-DodoSXe-.js} +1 -1
  75. package/dist/esm/{withComponentStyle-9uP_hcDq.js → withComponentStyle-D3VWOsto.js} +2 -2
  76. package/dist/esm/{utils-DvvwfRQG.js → withHasError-B3QX2emi.js} +69 -1
  77. package/dist/esm/{withStyled--qQWquTH.js → withStyled-CE3_3taP.js} +57 -5
  78. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +139 -0
  79. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +154 -0
  80. package/dist/types/components.d.ts +168 -0
  81. package/dist/types/utils/parentDimensions.d.ts +6 -1
  82. package/package.json +1 -1
  83. package/dist/bn-template-engine/p-1265d8d3.entry.js +0 -1
  84. package/dist/bn-template-engine/p-15516dac.entry.js +0 -1
  85. package/dist/bn-template-engine/p-1c716641.entry.js +0 -1
  86. package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
  87. package/dist/bn-template-engine/p-27cc8dc0.entry.js +0 -1
  88. package/dist/bn-template-engine/p-3b4c7425.entry.js +0 -1
  89. package/dist/bn-template-engine/p-4426d484.entry.js +0 -1
  90. package/dist/bn-template-engine/p-51f8dc9e.entry.js +0 -1
  91. package/dist/bn-template-engine/p-53d4e690.entry.js +0 -1
  92. package/dist/bn-template-engine/p-5KQYRQLK.js +0 -1
  93. package/dist/bn-template-engine/p-7337e03d.entry.js +0 -1
  94. package/dist/bn-template-engine/p-75e97c87.entry.js +0 -1
  95. package/dist/bn-template-engine/p-7a560278.entry.js +0 -1
  96. package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
  97. package/dist/bn-template-engine/p-BYBpC0EO.js +0 -1
  98. package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
  99. package/dist/bn-template-engine/p-BfXY5dsy.js +0 -1
  100. package/dist/bn-template-engine/p-BgnHJQ9Q.js +0 -1
  101. package/dist/bn-template-engine/p-Bhd_WSML.js +0 -1
  102. package/dist/bn-template-engine/p-Bka-Z6jo.js +0 -1
  103. package/dist/bn-template-engine/p-C7dQL8CS.js +0 -1
  104. package/dist/bn-template-engine/p-CYwd_ZNM.js +0 -1
  105. package/dist/bn-template-engine/p-ChlK-T9I.js +0 -1
  106. package/dist/bn-template-engine/p-DHezf8pZ.js +0 -1
  107. package/dist/bn-template-engine/p-DlppAFq9.js +0 -1
  108. package/dist/bn-template-engine/p-DvDDgmcV.js +0 -1
  109. package/dist/bn-template-engine/p-DvvwfRQG.js +0 -1
  110. package/dist/bn-template-engine/p-abc0067c.entry.js +0 -1
  111. package/dist/bn-template-engine/p-b34eaf86.entry.js +0 -1
  112. package/dist/bn-template-engine/p-bdb8b44c.entry.js +0 -1
  113. package/dist/bn-template-engine/p-c44fcb8e.entry.js +0 -1
  114. package/dist/bn-template-engine/p-c7e1a49b.entry.js +0 -1
  115. package/dist/bn-template-engine/p-d9003041.entry.js +0 -1
  116. package/dist/bn-template-engine/p-daa7ffa3.entry.js +0 -1
  117. package/dist/bn-template-engine/p-e084f50a.entry.js +0 -1
  118. package/dist/bn-template-engine/p-eaba6658.entry.js +0 -1
  119. package/dist/bn-template-engine/p-u8igQLRZ.js +0 -1
  120. package/dist/cjs/DataFormatDigits-DKcOeLNK.js +0 -142
  121. package/dist/cjs/DateStringFactory-CSKvbS8K.js +0 -452
  122. package/dist/cjs/SVGVariancesStyleGroup-K-Tw6lOD.js +0 -7960
  123. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
  124. package/dist/cjs/bn-asset.cjs.entry.js +0 -42
  125. package/dist/cjs/bn-body_4.cjs.entry.js +0 -748
  126. package/dist/cjs/bn-chart-structure_5.cjs.entry.js +0 -3948
  127. package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
  128. package/dist/cjs/bn-dataset.cjs.entry.js +0 -306
  129. package/dist/cjs/bn-layout-page.cjs.entry.js +0 -143
  130. package/dist/cjs/bn-message.cjs.entry.js +0 -52
  131. package/dist/cjs/bn-table.cjs.entry.js +0 -981
  132. package/dist/cjs/contentDecoder-JxOldq1e.js +0 -419
  133. package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +0 -57
  134. package/dist/cjs/ibcs-table.cjs.entry.js +0 -2276
  135. package/dist/cjs/ibcsRuleSet-DgUoXOfd.js +0 -136
  136. package/dist/cjs/index-Dm85hG6t.js +0 -65
  137. package/dist/cjs/withHasError-D7ue5vAv.js +0 -72
  138. package/dist/cjs/withTranslation-rwgyITqe.js +0 -77
  139. package/dist/esm/DataFormatDigits-oSZ1hBKE.js +0 -137
  140. package/dist/esm/DateStringFactory-CSGz6TDk.js +0 -450
  141. package/dist/esm/SVGVariancesStyleGroup-CqTjrZYg.js +0 -7950
  142. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
  143. package/dist/esm/bn-asset.entry.js +0 -40
  144. package/dist/esm/bn-body_4.entry.js +0 -743
  145. package/dist/esm/bn-chart-structure_5.entry.js +0 -3942
  146. package/dist/esm/bn-component-style.entry.js +0 -42
  147. package/dist/esm/bn-dataset.entry.js +0 -304
  148. package/dist/esm/bn-layout-page.entry.js +0 -141
  149. package/dist/esm/bn-message.entry.js +0 -50
  150. package/dist/esm/bn-table.entry.js +0 -979
  151. package/dist/esm/contentDecoder-oMmxz6nJ.js +0 -416
  152. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +0 -55
  153. package/dist/esm/ibcs-table.entry.js +0 -2274
  154. package/dist/esm/ibcsRuleSet-K4ytuA1f.js +0 -133
  155. package/dist/esm/index-DHezf8pZ.js +0 -65
  156. package/dist/esm/withHasError-FyY5mQ_3.js +0 -70
  157. package/dist/esm/withTranslation-BqD0Kp7b.js +0 -75
@@ -2,18 +2,109 @@ import { h, Fragment } from "@stencil/core";
2
2
  import withHasError from "../../utils/withHasError";
3
3
  export class LayoutPage {
4
4
  constructor() {
5
+ /**
6
+ * Message text displayed in the message row above the title.
7
+ * If empty, the message row is omitted.
8
+ */
5
9
  this.messageText = "";
10
+ /**
11
+ * URL or asset name of the image displayed in the message row.
12
+ * If the value is not an HTTP URL it is looked up in the asset store.
13
+ * If empty, the image is omitted.
14
+ *
15
+ * @example
16
+ * <bn-layout-page message-image="debug/concordia.png"></bn-layout-page>
17
+ */
6
18
  this.messageImage = "";
19
+ /**
20
+ * Name of the business unit displayed in the title header row.
21
+ * If empty, the business unit row is omitted.
22
+ *
23
+ * @example
24
+ * <bn-layout-page title-business-unit="Group Controlling"></bn-layout-page>
25
+ */
7
26
  this.titleBusinessUnit = "";
27
+ /**
28
+ * Primary column on which the order direction is applied.
29
+ * <br /><br />
30
+ * values:<br />
31
+ * ```category // categoryindex // rowgroup // rowgroupindex // ac // fc // py // pl```
32
+ */
8
33
  this.titleOrder = "category";
34
+ /**
35
+ * Sorting order direction for the column specified by `titleOrder`.
36
+ * <br /><br />
37
+ * values:<br />
38
+ * ```asc // desc```
39
+ */
9
40
  this.titleOrderDirection = "asc";
41
+ /**
42
+ * Date display format used in the title row.
43
+ * <br /><br />
44
+ * values:<br />
45
+ * ```year // quarter // month // week // day // time // auto // none```
46
+ * <br /><br />
47
+ * `year`: YYYY, `quarter`: Q[Q] YYYY, `month`: MMM YYYY,
48
+ * `week`: [KW]WW YYYY, `day`: DD.MM.YYYY, `time`: DD.MM.YYYY HH:mm:ss,
49
+ * `auto`: automatic detection, `none`: DD.MM.YYYY.
50
+ */
10
51
  this.titleDateFormat = "none";
52
+ /**
53
+ * Format in which the start and end dates are linked in the title.
54
+ * If set to `none` a plain date is shown.
55
+ * <br /><br />
56
+ * values:<br />
57
+ * ```avg // interval // cum // start // end // ytd // ytg // mat // none```
58
+ * <br /><br />
59
+ * `avg`: Ø[DATE], `interval`: [DATE]..[DATE2], `start`: .[DATE],
60
+ * `end`: [DATE]., `ytd`: _[DATE], `ytg`: [DATE]_, `cum`: [DATE]_[DATE2],
61
+ * `mat`: ~[DATE], `none`: [DATE].
62
+ */
11
63
  this.titleDateLink = "none";
64
+ /**
65
+ * Namespace used for title translations via the internationalization store.
66
+ */
12
67
  this.titleNamespace = "_system";
68
+ /**
69
+ * Whether to display the page number in the footer.
70
+ */
13
71
  this.footerDisplayPageNumber = true;
72
+ /**
73
+ * Layout mode that controls how child components are arranged in the
74
+ * page body using CSS Grid.
75
+ * <br /><br />
76
+ * values:<br />
77
+ * ```full // split-vertical // split-horizontal // 2x2 // 3x3 // 4x4 // 1-over-2 // 1-over-3 // 2-over-1 // 3-over-1 // custom-template```
78
+ * <br /><br />
79
+ * `full`: single slot. `split-vertical`: two side-by-side slots.
80
+ * `split-horizontal`: two stacked slots. `NxN`: equal grid.
81
+ * `1-over-2`: one full-width slot on top, two below. `custom-template`:
82
+ * uses the `pageCustomTemplate` CSS grid-template-areas string.
83
+ *
84
+ * @example
85
+ * <bn-layout-page page-layout="2x2"></bn-layout-page>
86
+ */
14
87
  this.pageLayout = "full";
88
+ /**
89
+ * CSS `grid-template-areas` string used when `pageLayout` is set to
90
+ * `custom-template`. Each quoted row defines a grid row; letters map to
91
+ * slot indices in order of first appearance.
92
+ *
93
+ * @example
94
+ * <bn-layout-page page-layout="custom-template"
95
+ * page-custom-template='"a a" "b c"'></bn-layout-page>
96
+ */
15
97
  this.pageCustomTemplate = '"a b" "c d"';
98
+ /**
99
+ * Gap between grid cells in pixels.
100
+ */
16
101
  this.pageGridGap = "0";
102
+ /**
103
+ * When `true`, the page body height shrinks to fit its content
104
+ * (`fit-content`). When `false`, the body stretches to fill the
105
+ * full page height (`100%`). Width is always `100%` regardless
106
+ * of this setting.
107
+ */
17
108
  this.pageFitToContent = true;
18
109
  this.templateMap = new Map([
19
110
  ["split-vertical", '"a b"'],
@@ -33,20 +124,32 @@ export class LayoutPage {
33
124
  }
34
125
  getCommonStyles() {
35
126
  let height = "100%";
36
- let width = "100%";
37
127
  if (this.pageFitToContent === true) {
38
- width = "fit-content";
39
128
  height = "fit-content";
40
129
  }
130
+ // Width is always 100% — page width is fixed by page format (XGA, A4, etc.).
131
+ // Using fit-content for width makes the grid indefinite, causing CSS Grid to
132
+ // treat percentage column tracks as "auto" (content-sized), which breaks
133
+ // equal column splits and auto-scaling in child components.
41
134
  return {
42
135
  display: "grid",
43
136
  height: height,
44
- width: width,
137
+ width: "100%",
45
138
  gap: this.pageGridGap + "px",
46
139
  };
47
140
  }
141
+ getGridTemplateRows(name) {
142
+ const template = this.getTemplateAreas(name);
143
+ const pattern = /"[\w\d\s.]+"/g;
144
+ const matches = template.match(pattern);
145
+ const rowCount = matches ? matches.length : 1;
146
+ if (this.pageFitToContent) {
147
+ return Array(rowCount).fill("auto").join(" ");
148
+ }
149
+ return Array(rowCount).fill("1fr").join(" ");
150
+ }
48
151
  getLayoutStyle() {
49
- return Object.assign(Object.assign({}, this.getCommonStyles()), { "grid-template-areas": this.getTemplateAreas(this.pageLayout), "grid-template-columns": this.getGridTemplateColumns(this.pageLayout) });
152
+ return Object.assign(Object.assign({}, this.getCommonStyles()), { "grid-template-areas": this.getTemplateAreas(this.pageLayout), "grid-template-columns": this.getGridTemplateColumns(this.pageLayout), "grid-template-rows": this.getGridTemplateRows(this.pageLayout) });
50
153
  }
51
154
  createDivAreaStyles(elements) {
52
155
  return elements.map((x) => ({
@@ -127,7 +230,7 @@ export class LayoutPage {
127
230
  const arrOfSlots = this.extractSlotNames(style["grid-template-areas"]);
128
231
  return (
129
232
  // @ts-ignore
130
- h("bn-page", { key: '2f67c9b949ab18de247ea492c95b1e53e450fcca', styles: this.styles, format: this.pageFormat, orientation: this.pageOrientation }, h("bn-message", { key: '6fb865fe6cf9785c6a3932967d9969d5e0a4eda5', text: this.messageText, image: this.messageImage }), h("bn-title", { key: '3ba10325d834b364d0a68012f589ba5508877652', namespace: this.titleNamespace, "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: '16bcb1e231d65b2f0e90c82d8e3ec1a84cc79c59' }, h("div", { key: '1408692a37d04686e5d9ad00bca7f1d24787b595', style: style }, this.getSlots(arrOfSlots))), h("bn-footer", { key: '83e924e38db44fb678490a8a4d12b264699fc3e2', text: this.footerText, "page-number": this.pageNumber, "display-page-number": this.footerDisplayPageNumber })));
233
+ h("bn-page", { key: '1c262428d9e69966f3089f5018b5a71e348c31b7', styles: this.styles, format: this.pageFormat, orientation: this.pageOrientation }, h("bn-message", { key: 'c687e6d660a7301202663644f2bce0e20d148420', text: this.messageText, image: this.messageImage }), h("bn-title", { key: '6e30d548765d8b32f7ab85c6203c1af2142d55c5', namespace: this.titleNamespace, "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: 'a691c212bcf2ed7c95792de989be4a5c5d30aa5f' }, h("div", { key: '150f9e5941e723f527166ef9071b721b194101fe', style: style }, this.getSlots(arrOfSlots))), h("bn-footer", { key: '9868b2deab6302fc029b6d9f9780d84269245979', text: this.footerText, "page-number": this.pageNumber, "display-page-number": this.footerDisplayPageNumber })));
131
234
  }
132
235
  static get is() { return "bn-layout-page"; }
133
236
  static get encapsulation() { return "shadow"; }
@@ -155,7 +258,7 @@ export class LayoutPage {
155
258
  "optional": true,
156
259
  "docs": {
157
260
  "tags": [],
158
- "text": ""
261
+ "text": "JSON string of component-style overrides passed through to the inner\n`<bn-page>` element. Typically set via a `ComponentStyle` manifest\nrather than directly on the component."
159
262
  },
160
263
  "getter": false,
161
264
  "setter": false,
@@ -174,7 +277,7 @@ export class LayoutPage {
174
277
  "optional": false,
175
278
  "docs": {
176
279
  "tags": [],
177
- "text": ""
280
+ "text": "Message text displayed in the message row above the title.\nIf empty, the message row is omitted."
178
281
  },
179
282
  "getter": false,
180
283
  "setter": false,
@@ -193,8 +296,11 @@ export class LayoutPage {
193
296
  "required": false,
194
297
  "optional": false,
195
298
  "docs": {
196
- "tags": [],
197
- "text": ""
299
+ "tags": [{
300
+ "name": "example",
301
+ "text": "<bn-layout-page message-image=\"debug/concordia.png\"></bn-layout-page>"
302
+ }],
303
+ "text": "URL or asset name of the image displayed in the message row.\nIf the value is not an HTTP URL it is looked up in the asset store.\nIf empty, the image is omitted."
198
304
  },
199
305
  "getter": false,
200
306
  "setter": false,
@@ -213,8 +319,11 @@ export class LayoutPage {
213
319
  "required": false,
214
320
  "optional": false,
215
321
  "docs": {
216
- "tags": [],
217
- "text": ""
322
+ "tags": [{
323
+ "name": "example",
324
+ "text": "<bn-layout-page title-business-unit=\"Group Controlling\"></bn-layout-page>"
325
+ }],
326
+ "text": "Name of the business unit displayed in the title header row.\nIf empty, the business unit row is omitted."
218
327
  },
219
328
  "getter": false,
220
329
  "setter": false,
@@ -234,7 +343,7 @@ export class LayoutPage {
234
343
  "optional": true,
235
344
  "docs": {
236
345
  "tags": [],
237
- "text": ""
346
+ "text": "List of scenarios displayed in the title header.\n<br /><br />\nComma-separated string or omitted. If empty, the scenarios row is omitted.\n<br /><br />\nvalues:<br />\n```ac // fc // py // pl```"
238
347
  },
239
348
  "getter": false,
240
349
  "setter": false,
@@ -253,7 +362,7 @@ export class LayoutPage {
253
362
  "optional": true,
254
363
  "docs": {
255
364
  "tags": [],
256
- "text": ""
365
+ "text": "List of variances calculated from the given scenarios.\nThe scenarios used in the variances must also be defined in\nthe `titleScenarios` property. The variance is defined as\n(ScenarioA \u2212 ScenarioB). The pos/neg/neu postfix defines\nwhich direction is considered \"good\".\n<br /><br />\nIf empty, variance indicators are hidden.\n<br /><br />\npattern:<br />\n```d<scenarioB>_<scenarioA>_[pos/neg/neu]```"
257
366
  },
258
367
  "getter": false,
259
368
  "setter": false,
@@ -272,7 +381,7 @@ export class LayoutPage {
272
381
  "optional": false,
273
382
  "docs": {
274
383
  "tags": [],
275
- "text": ""
384
+ "text": "Primary column on which the order direction is applied.\n<br /><br />\nvalues:<br />\n```category // categoryindex // rowgroup // rowgroupindex // ac // fc // py // pl```"
276
385
  },
277
386
  "getter": false,
278
387
  "setter": false,
@@ -292,7 +401,7 @@ export class LayoutPage {
292
401
  "optional": false,
293
402
  "docs": {
294
403
  "tags": [],
295
- "text": ""
404
+ "text": "Sorting order direction for the column specified by `titleOrder`.\n<br /><br />\nvalues:<br />\n```asc // desc```"
296
405
  },
297
406
  "getter": false,
298
407
  "setter": false,
@@ -311,8 +420,11 @@ export class LayoutPage {
311
420
  "required": false,
312
421
  "optional": true,
313
422
  "docs": {
314
- "tags": [],
315
- "text": ""
423
+ "tags": [{
424
+ "name": "example",
425
+ "text": "<bn-layout-page title-measures='[{\"name\":\"Revenue\",\"unit\":\"mEUR\"}]'></bn-layout-page>"
426
+ }],
427
+ "text": "Array of measure objects with `name` and `unit` displayed in the title.\nPassed as a JSON string. If all units are the same, redundant units are\nreduced and names concatenated. If empty, the measure row is omitted."
316
428
  },
317
429
  "getter": false,
318
430
  "setter": false,
@@ -331,7 +443,7 @@ export class LayoutPage {
331
443
  "optional": true,
332
444
  "docs": {
333
445
  "tags": [],
334
- "text": ""
446
+ "text": "Start date displayed in the title date row.\nAccepts `yyyy-MM-dd` (e.g. `2024-01-01`) or ISO 8601 datetime\n(e.g. `2024-01-01T14:30:00Z`)."
335
447
  },
336
448
  "getter": false,
337
449
  "setter": false,
@@ -350,7 +462,7 @@ export class LayoutPage {
350
462
  "optional": true,
351
463
  "docs": {
352
464
  "tags": [],
353
- "text": ""
465
+ "text": "End date displayed in the title date row.\nAccepts `yyyy-MM-dd` (e.g. `2024-12-31`) or ISO 8601 datetime\n(e.g. `2024-12-31T23:59:59Z`)."
354
466
  },
355
467
  "getter": false,
356
468
  "setter": false,
@@ -369,7 +481,7 @@ export class LayoutPage {
369
481
  "optional": false,
370
482
  "docs": {
371
483
  "tags": [],
372
- "text": ""
484
+ "text": "Date display format used in the title row.\n<br /><br />\nvalues:<br />\n```year // quarter // month // week // day // time // auto // none```\n<br /><br />\n`year`: YYYY, `quarter`: Q[Q] YYYY, `month`: MMM YYYY,\n`week`: [KW]WW YYYY, `day`: DD.MM.YYYY, `time`: DD.MM.YYYY HH:mm:ss,\n`auto`: automatic detection, `none`: DD.MM.YYYY."
373
485
  },
374
486
  "getter": false,
375
487
  "setter": false,
@@ -389,7 +501,7 @@ export class LayoutPage {
389
501
  "optional": false,
390
502
  "docs": {
391
503
  "tags": [],
392
- "text": ""
504
+ "text": "Format in which the start and end dates are linked in the title.\nIf set to `none` a plain date is shown.\n<br /><br />\nvalues:<br />\n```avg // interval // cum // start // end // ytd // ytg // mat // none```\n<br /><br />\n`avg`: \u00D8[DATE], `interval`: [DATE]..[DATE2], `start`: .[DATE],\n`end`: [DATE]., `ytd`: _[DATE], `ytg`: [DATE]_, `cum`: [DATE]_[DATE2],\n`mat`: ~[DATE], `none`: [DATE]."
393
505
  },
394
506
  "getter": false,
395
507
  "setter": false,
@@ -409,7 +521,7 @@ export class LayoutPage {
409
521
  "optional": false,
410
522
  "docs": {
411
523
  "tags": [],
412
- "text": ""
524
+ "text": "Namespace used for title translations via the internationalization store."
413
525
  },
414
526
  "getter": false,
415
527
  "setter": false,
@@ -429,7 +541,7 @@ export class LayoutPage {
429
541
  "optional": true,
430
542
  "docs": {
431
543
  "tags": [],
432
- "text": ""
544
+ "text": "Page size format. Determines the pixel dimensions of the rendered page.\n<br /><br />\nvalues:<br />\n```xga // hd // full-hd // 4k // 4k2k // a4 // a3 // a2 // a1 // a0 // letter // legal```"
433
545
  },
434
546
  "getter": false,
435
547
  "setter": false,
@@ -448,7 +560,7 @@ export class LayoutPage {
448
560
  "optional": true,
449
561
  "docs": {
450
562
  "tags": [],
451
- "text": ""
563
+ "text": "Page orientation. Default depends on the chosen format.\n<br /><br />\nvalues:<br />\n```landscape // portrait```"
452
564
  },
453
565
  "getter": false,
454
566
  "setter": false,
@@ -467,7 +579,7 @@ export class LayoutPage {
467
579
  "optional": true,
468
580
  "docs": {
469
581
  "tags": [],
470
- "text": ""
582
+ "text": "Page number displayed in the footer. If empty, no page number is shown\n(unless `footerDisplayPageNumber` is also set)."
471
583
  },
472
584
  "getter": false,
473
585
  "setter": false,
@@ -486,7 +598,7 @@ export class LayoutPage {
486
598
  "optional": true,
487
599
  "docs": {
488
600
  "tags": [],
489
- "text": ""
601
+ "text": "Text displayed in the page footer. If empty, the footer text is omitted."
490
602
  },
491
603
  "getter": false,
492
604
  "setter": false,
@@ -505,7 +617,7 @@ export class LayoutPage {
505
617
  "optional": true,
506
618
  "docs": {
507
619
  "tags": [],
508
- "text": ""
620
+ "text": "Whether to display the page number in the footer."
509
621
  },
510
622
  "getter": false,
511
623
  "setter": false,
@@ -524,8 +636,11 @@ export class LayoutPage {
524
636
  "required": false,
525
637
  "optional": false,
526
638
  "docs": {
527
- "tags": [],
528
- "text": ""
639
+ "tags": [{
640
+ "name": "example",
641
+ "text": "<bn-layout-page page-layout=\"2x2\"></bn-layout-page>"
642
+ }],
643
+ "text": "Layout mode that controls how child components are arranged in the\npage body using CSS Grid.\n<br /><br />\nvalues:<br />\n```full // split-vertical // split-horizontal // 2x2 // 3x3 // 4x4 // 1-over-2 // 1-over-3 // 2-over-1 // 3-over-1 // custom-template```\n<br /><br />\n`full`: single slot. `split-vertical`: two side-by-side slots.\n`split-horizontal`: two stacked slots. `NxN`: equal grid.\n`1-over-2`: one full-width slot on top, two below. `custom-template`:\nuses the `pageCustomTemplate` CSS grid-template-areas string."
529
644
  },
530
645
  "getter": false,
531
646
  "setter": false,
@@ -544,8 +659,11 @@ export class LayoutPage {
544
659
  "required": false,
545
660
  "optional": false,
546
661
  "docs": {
547
- "tags": [],
548
- "text": ""
662
+ "tags": [{
663
+ "name": "example",
664
+ "text": "<bn-layout-page page-layout=\"custom-template\"\n page-custom-template='\"a a\" \"b c\"'></bn-layout-page>"
665
+ }],
666
+ "text": "CSS `grid-template-areas` string used when `pageLayout` is set to\n`custom-template`. Each quoted row defines a grid row; letters map to\nslot indices in order of first appearance."
549
667
  },
550
668
  "getter": false,
551
669
  "setter": false,
@@ -565,7 +683,7 @@ export class LayoutPage {
565
683
  "optional": false,
566
684
  "docs": {
567
685
  "tags": [],
568
- "text": ""
686
+ "text": "Gap between grid cells in pixels."
569
687
  },
570
688
  "getter": false,
571
689
  "setter": false,
@@ -585,7 +703,7 @@ export class LayoutPage {
585
703
  "optional": false,
586
704
  "docs": {
587
705
  "tags": [],
588
- "text": ""
706
+ "text": "When `true`, the page body height shrinks to fit its content\n(`fit-content`). When `false`, the body stretches to fill the\nfull page height (`100%`). Width is always `100%` regardless\nof this setting."
589
707
  },
590
708
  "getter": false,
591
709
  "setter": false,
@@ -1,13 +1,18 @@
1
1
  /**
2
2
  * Returns the available dimensions for a component.
3
3
  *
4
- * Width: parent content-box width (excluding padding).
4
+ * Width: visual parent's content-box width (excluding padding).
5
5
  * Height: walks up the DOM to find the nearest ancestor with a constrained
6
6
  * height (overflow !== 'visible' or explicit max-height). Falls back to
7
7
  * the viewport height when every ancestor auto-grows with its content.
8
+ *
9
+ * When the component is slotted into a shadow DOM (e.g. inside
10
+ * bn-layout-page or bn-layout-card), the light DOM parentElement is NOT the
11
+ * visual container. We cross the light→shadow boundary via assignedSlot to
12
+ * find the actual slot wrapper that determines layout.
8
13
  */
9
14
  export function getParentDimensions(element) {
10
- const parent = element.parentElement;
15
+ const parent = findLayoutParent(element);
11
16
  if (!parent) {
12
17
  return { width: 0, height: 0 };
13
18
  }
@@ -16,13 +21,40 @@ export function getParentDimensions(element) {
16
21
  const height = findConstrainedHeight(element);
17
22
  return { width: Math.max(0, width), height: Math.max(0, height) };
18
23
  }
24
+ /**
25
+ * Returns the visual layout parent of an element, crossing the
26
+ * light→shadow DOM boundary when the element's parent is slotted.
27
+ *
28
+ * For a slotted element, the light DOM parentElement is NOT where
29
+ * the element renders visually. The actual container is the shadow
30
+ * DOM element that wraps the <slot>. We reach it via assignedSlot.
31
+ */
32
+ function findLayoutParent(element) {
33
+ var _a;
34
+ const lightParent = element.parentElement;
35
+ if ((_a = lightParent === null || lightParent === void 0 ? void 0 : lightParent.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentElement) {
36
+ return lightParent.assignedSlot.parentElement;
37
+ }
38
+ return lightParent;
39
+ }
40
+ /**
41
+ * Returns the visual parent, crossing shadow DOM boundaries via assignedSlot.
42
+ */
43
+ function getVisualParent(element) {
44
+ var _a;
45
+ if ((_a = element.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentElement) {
46
+ return element.assignedSlot.parentElement;
47
+ }
48
+ return element.parentElement;
49
+ }
19
50
  /**
20
51
  * Walks up the ancestor chain to find a height that is actually constrained
21
- * (not just "whatever my content needs"). Returns viewport height as a
22
- * last resort.
52
+ * (not just "whatever my content needs"). Crosses shadow DOM boundaries
53
+ * via assignedSlot when encountering slotted elements. Returns viewport
54
+ * height as a last resort.
23
55
  */
24
56
  function findConstrainedHeight(element) {
25
- let current = element.parentElement;
57
+ let current = findLayoutParent(element);
26
58
  while (current) {
27
59
  const style = getComputedStyle(current);
28
60
  const overflow = style.overflowY;
@@ -37,7 +69,7 @@ function findConstrainedHeight(element) {
37
69
  return Math.min(mh, current.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom));
38
70
  }
39
71
  }
40
- current = current.parentElement;
72
+ current = getVisualParent(current);
41
73
  }
42
74
  // No constrained ancestor found — use viewport
43
75
  return typeof window !== "undefined" ? window.innerHeight : 0;
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as a,Fragment as s,transformTag as i}from"@stencil/core/internal/client";import{g as r}from"./context-protocol.js";import{a as o}from"./withHasError.js";import{d as n}from"./bn-body2.js";import{d as c}from"./bn-card2.js";import{d as l}from"./bn-footer2.js";import{d}from"./bn-title2.js";import{d as b}from"./ibcs-title2.js";const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.titleImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerText="",this.cardLayout="full",this.cardCustomTemplate='"a b" "c d"',this.cardGridGap="0",this.cardFitToContent=!0,this.cardShowBorder=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=o(this)}connectedCallback(){this.stores=r(this.element)}getCommonStyles(){let t="100%",e="100%";return!0===this.cardFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.cardGridGap+"px"}}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplatePattern(this.cardLayout)})}createDivAreaStyles(t){return t.map((t=>({overflow:"hidden","grid-area":t})))}getSlots(t){const e=this.createDivAreaStyles(t);return a(s,null,e.map(((t,e)=>a("div",{style:t},a("slot",{name:"card-slot-"+e})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplatePattern(t){return console.warn("getTemplatePattern",{name:t}),!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.cardCustomTemplate:this.templateMap.get(t)}async getNumberOfSlot(t){const e=this.getTemplatePattern(t);return this.extractSlotNames(e).length}componentDidUpdate(){}setCardClass(){return!0===this.cardShowBorder?"card_box border":"card_box"}prepareTitleImage(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){const t=this.getLayoutStyle(),e=this.extractSlotNames(t["grid-template-areas"]);return a("bn-card",{key:"cdc04f3414fa80148fc8be40cbaf0cac1035fca1",styles:this.styles,class:this.setCardClass()},a("div",{key:"3374b14ec8a8a73de58f866b0c6a691ee0b8d2ae",class:"cardtitle"},a("bn-title",{key:"23a6f991ad6b1a8b74066943b108f3666ae0c863",namespace:this.titleNamespace,"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}),null!=this.titleImage&&""!==this.titleImage?a("img",{class:"image",src:this.prepareTitleImage(this.titleImage)}):""),a("bn-body",{key:"06d86283489ea2db12d448b1d4b72b540ad352f8"},a("div",{key:"659cfb06f4d756ffd4e1d08910c66a0751d71f9d",style:t},this.getSlots(e))),a("bn-footer",{key:"8aa67fdf3bcbb465c7861f83f6371bc7f73ae75e",text:this.footerText,"page-number":0,"display-page-number":"false"}))}get element(){return this}static get style(){return':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}'}},[257,"bn-layout-card",{styles:[1],titleImage:[1,"title-image"],titleBusinessUnit:[1,"title-business-unit"],titleScenarios:[1,"title-scenarios"],titleVariances:[1,"title-variances"],titleOrder:[1,"title-order"],titleOrderDirection:[1,"title-order-direction"],titleMeasures:[1,"title-measures"],titleDateStart:[1,"title-date-start"],titleDateEnd:[1,"title-date-end"],titleDateFormat:[1,"title-date-format"],titleDateLink:[1,"title-date-link"],titleNamespace:[1,"title-namespace"],footerText:[1,"footer-text"],cardLayout:[1,"card-layout"],cardCustomTemplate:[1,"card-custom-template"],cardGridGap:[1,"card-grid-gap"],cardFitToContent:[4,"card-fit-to-content"],cardShowBorder:[4,"card-show-border"],getNumberOfSlot:[64]}]),h=m,f=function(){"undefined"!=typeof customElements&&["bn-layout-card","bn-body","bn-card","bn-footer","bn-title","ibcs-title"].forEach((t=>{switch(t){case"bn-layout-card":customElements.get(i(t))||customElements.define(i(t),m);break;case"bn-body":customElements.get(i(t))||n();break;case"bn-card":customElements.get(i(t))||c();break;case"bn-footer":customElements.get(i(t))||l();break;case"bn-title":customElements.get(i(t))||d();break;case"ibcs-title":customElements.get(i(t))||b()}}))};export{h as BnLayoutCard,f as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as s,Fragment as a,transformTag as r}from"@stencil/core/internal/client";import{g as i}from"./context-protocol.js";import{a as o}from"./withHasError.js";import{d as n}from"./bn-body2.js";import{d as c}from"./bn-card2.js";import{d as l}from"./bn-footer2.js";import{d}from"./bn-title2.js";import{d as b}from"./ibcs-title2.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.titleImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerText="",this.cardLayout="full",this.cardCustomTemplate='"a b" "c d"',this.cardGridGap="0",this.cardFitToContent=!0,this.cardShowBorder=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=o(this)}connectedCallback(){this.stores=i(this.element)}getCommonStyles(){let t="100%",e="100%";return!0===this.cardFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.cardGridGap+"px"}}calculatePercentages(t){const e=t.trim().split(/\s+/).length;if(0===e)return"100%";const s=(100/e).toFixed(0)+"%";return Array(e).fill(s).join(" ")}getGridTemplateColumns(t){const e=this.getTemplatePattern(t).match(/"[\w\d\s.]+"/g);return e&&0!==e.length?this.calculatePercentages(e[0]):"100%"}getGridTemplateRows(t){const e=this.getTemplatePattern(t).match(/"[\w\d\s.]+"/g),s=e?e.length:1;return this.cardFitToContent?Array(s).fill("auto").join(" "):Array(s).fill("1fr").join(" ")}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplatePattern(this.cardLayout),"grid-template-columns":this.getGridTemplateColumns(this.cardLayout),"grid-template-rows":this.getGridTemplateRows(this.cardLayout)})}createDivAreaStyles(t){return t.map((t=>({width:"100%",overflow:"hidden","grid-area":t,height:"100%"})))}getSlots(t){const e=this.createDivAreaStyles(t);return s(a,null,e.map(((t,e)=>s("div",{style:t},s("slot",{name:"card-slot-"+e})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplatePattern(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.cardCustomTemplate:this.templateMap.get(t)}async getNumberOfSlot(t){const e=this.getTemplatePattern(t);return this.extractSlotNames(e).length}componentDidUpdate(){}setCardClass(){return!0===this.cardShowBorder?"card_box border":"card_box"}prepareTitleImage(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){const t=this.getLayoutStyle(),e=this.extractSlotNames(t["grid-template-areas"]);return s("bn-card",{key:"e920b128510046289f0960c19abb1eadb2751204",styles:this.styles,class:this.setCardClass()},s("div",{key:"de7b2ed78aade1a7c2d0a8a69cd1f7b47eef2414",class:"cardtitle"},s("bn-title",{key:"72fd36fe7e0bc2d628825b69114b81e04669143d",namespace:this.titleNamespace,"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}),null!=this.titleImage&&""!==this.titleImage?s("img",{class:"image",src:this.prepareTitleImage(this.titleImage)}):""),s("bn-body",{key:"1d3a6da80bcaab5ab2d9442edd548bc408f10563"},s("div",{key:"e24cfa54735c0b401e34825a8da7327555c120c5",style:t},this.getSlots(e))),s("bn-footer",{key:"c2307c5dcb8058d49465fbafa7d5aaa6e5dc4488",text:this.footerText,"page-number":0,"display-page-number":"false"}))}get element(){return this}static get style(){return':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);display:block;flex-direction:column;overflow:hidden;float:left;clear:left}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}'}},[257,"bn-layout-card",{styles:[1],titleImage:[1,"title-image"],titleBusinessUnit:[1,"title-business-unit"],titleScenarios:[1,"title-scenarios"],titleVariances:[1,"title-variances"],titleOrder:[1,"title-order"],titleOrderDirection:[1,"title-order-direction"],titleMeasures:[1,"title-measures"],titleDateStart:[1,"title-date-start"],titleDateEnd:[1,"title-date-end"],titleDateFormat:[1,"title-date-format"],titleDateLink:[1,"title-date-link"],titleNamespace:[1,"title-namespace"],footerText:[1,"footer-text"],cardLayout:[1,"card-layout"],cardCustomTemplate:[1,"card-custom-template"],cardGridGap:[1,"card-grid-gap"],cardFitToContent:[4,"card-fit-to-content"],cardShowBorder:[4,"card-show-border"],getNumberOfSlot:[64]}]),m=h,u=function(){"undefined"!=typeof customElements&&["bn-layout-card","bn-body","bn-card","bn-footer","bn-title","ibcs-title"].forEach((t=>{switch(t){case"bn-layout-card":customElements.get(r(t))||customElements.define(r(t),h);break;case"bn-body":customElements.get(r(t))||n();break;case"bn-card":customElements.get(r(t))||c();break;case"bn-footer":customElements.get(r(t))||l();break;case"bn-title":customElements.get(r(t))||d();break;case"ibcs-title":customElements.get(r(t))||b()}}))};export{m as BnLayoutCard,u as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as s,Fragment as a,transformTag as i}from"@stencil/core/internal/client";import{a as r}from"./withHasError.js";import{d as n}from"./bn-body2.js";import{d as o}from"./bn-footer2.js";import{d as c}from"./bn-message2.js";import{d as l}from"./bn-page2.js";import{d as m}from"./bn-title2.js";import{d as b}from"./ibcs-title2.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.messageText="",this.messageImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerDisplayPageNumber=!0,this.pageLayout="full",this.pageCustomTemplate='"a b" "c d"',this.pageGridGap="0",this.pageFitToContent=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=r(this)}getCommonStyles(){let t="100%",e="100%";return!0===this.pageFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.pageGridGap+"px"}}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplateAreas(this.pageLayout),"grid-template-columns":this.getGridTemplateColumns(this.pageLayout)})}createDivAreaStyles(t){return t.map((t=>({width:"100%",overflow:"hidden","grid-area":t,height:"100%"})))}getSlots(t){const e=this.createDivAreaStyles(t);return s(a,null,e.map(((t,e)=>s("div",{style:t},s("slot",{name:"slot-"+e})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplateAreas(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t)}calculatePercentages(t){const e=t.trim().split(/\s+/).length;if(0===e)return"100%";const s=(100/e).toFixed(0)+"%";return Array(e).fill(s).join(" ")}getGridTemplateColumns(t){if(!1===this.templateMap.has(t)&&"custom-template"!==t)return"100%";let e;e="custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t);const s=e.match(/"[\w\d\s.]+"/g);return this.calculatePercentages(s[0])}async getNumberOfSlot(t){const e=this.getTemplateAreas(t);return this.extractSlotNames(e).length}componentDidUpdate(){const t=this.element.closest("bn-context").getAttribute("render-orientation");if(t&&t!==this.pageOrientation){const t=this.element.shadowRoot.querySelector("bn-page"),e=this.element.closest("bn-layout-page");e&&t&&(t.style.transform="rotate(-90deg) translate(-100%)",t.style.transformOrigin="top left",e.style.width=t.clientHeight+"px",e.style.height=t.clientWidth+"px")}}render(){const t=this.getLayoutStyle(),e=this.extractSlotNames(t["grid-template-areas"]);return s("bn-page",{key:"2f67c9b949ab18de247ea492c95b1e53e450fcca",styles:this.styles,format:this.pageFormat,orientation:this.pageOrientation},s("bn-message",{key:"6fb865fe6cf9785c6a3932967d9969d5e0a4eda5",text:this.messageText,image:this.messageImage}),s("bn-title",{key:"3ba10325d834b364d0a68012f589ba5508877652",namespace:this.titleNamespace,"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}),s("bn-body",{key:"16bcb1e231d65b2f0e90c82d8e3ec1a84cc79c59"},s("div",{key:"1408692a37d04686e5d9ad00bca7f1d24787b595",style:t},this.getSlots(e))),s("bn-footer",{key:"83e924e38db44fb678490a8a4d12b264699fc3e2",text:this.footerText,"page-number":this.pageNumber,"display-page-number":this.footerDisplayPageNumber}))}get element(){return this}static get style(){return':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}'}},[257,"bn-layout-page",{styles:[1],messageText:[1,"message-text"],messageImage:[1,"message-image"],titleBusinessUnit:[1,"title-business-unit"],titleScenarios:[1,"title-scenarios"],titleVariances:[1,"title-variances"],titleOrder:[1,"title-order"],titleOrderDirection:[1,"title-order-direction"],titleMeasures:[1,"title-measures"],titleDateStart:[1,"title-date-start"],titleDateEnd:[1,"title-date-end"],titleDateFormat:[1,"title-date-format"],titleDateLink:[1,"title-date-link"],titleNamespace:[1,"title-namespace"],pageFormat:[1,"page-format"],pageOrientation:[1,"page-orientation"],pageNumber:[1,"page-number"],footerText:[1,"footer-text"],footerDisplayPageNumber:[4,"footer-display-page-number"],pageLayout:[1,"page-layout"],pageCustomTemplate:[1,"page-custom-template"],pageGridGap:[1,"page-grid-gap"],pageFitToContent:[4,"page-fit-to-content"],getNumberOfSlot:[64]}]),h=d,p=function(){"undefined"!=typeof customElements&&["bn-layout-page","bn-body","bn-footer","bn-message","bn-page","bn-title","ibcs-title"].forEach((t=>{switch(t){case"bn-layout-page":customElements.get(i(t))||customElements.define(i(t),d);break;case"bn-body":customElements.get(i(t))||n();break;case"bn-footer":customElements.get(i(t))||o();break;case"bn-message":customElements.get(i(t))||c();break;case"bn-page":customElements.get(i(t))||l();break;case"bn-title":customElements.get(i(t))||m();break;case"ibcs-title":customElements.get(i(t))||b()}}))};export{h as BnLayoutPage,p as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as s,Fragment as a,transformTag as i}from"@stencil/core/internal/client";import{a as r}from"./withHasError.js";import{d as o}from"./bn-body2.js";import{d as n}from"./bn-footer2.js";import{d as l}from"./bn-message2.js";import{d as c}from"./bn-page2.js";import{d as m}from"./bn-title2.js";import{d}from"./ibcs-title2.js";const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.messageText="",this.messageImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerDisplayPageNumber=!0,this.pageLayout="full",this.pageCustomTemplate='"a b" "c d"',this.pageGridGap="0",this.pageFitToContent=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=r(this)}getCommonStyles(){let t="100%";return!0===this.pageFitToContent&&(t="fit-content"),{display:"grid",height:t,width:"100%",gap:this.pageGridGap+"px"}}getGridTemplateRows(t){const e=this.getTemplateAreas(t).match(/"[\w\d\s.]+"/g),s=e?e.length:1;return this.pageFitToContent?Array(s).fill("auto").join(" "):Array(s).fill("1fr").join(" ")}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplateAreas(this.pageLayout),"grid-template-columns":this.getGridTemplateColumns(this.pageLayout),"grid-template-rows":this.getGridTemplateRows(this.pageLayout)})}createDivAreaStyles(t){return t.map((t=>({width:"100%",overflow:"hidden","grid-area":t,height:"100%"})))}getSlots(t){const e=this.createDivAreaStyles(t);return s(a,null,e.map(((t,e)=>s("div",{style:t},s("slot",{name:"slot-"+e})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplateAreas(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t)}calculatePercentages(t){const e=t.trim().split(/\s+/).length;if(0===e)return"100%";const s=(100/e).toFixed(0)+"%";return Array(e).fill(s).join(" ")}getGridTemplateColumns(t){if(!1===this.templateMap.has(t)&&"custom-template"!==t)return"100%";let e;e="custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t);const s=e.match(/"[\w\d\s.]+"/g);return this.calculatePercentages(s[0])}async getNumberOfSlot(t){const e=this.getTemplateAreas(t);return this.extractSlotNames(e).length}componentDidUpdate(){const t=this.element.closest("bn-context").getAttribute("render-orientation");if(t&&t!==this.pageOrientation){const t=this.element.shadowRoot.querySelector("bn-page"),e=this.element.closest("bn-layout-page");e&&t&&(t.style.transform="rotate(-90deg) translate(-100%)",t.style.transformOrigin="top left",e.style.width=t.clientHeight+"px",e.style.height=t.clientWidth+"px")}}render(){const t=this.getLayoutStyle(),e=this.extractSlotNames(t["grid-template-areas"]);return s("bn-page",{key:"1c262428d9e69966f3089f5018b5a71e348c31b7",styles:this.styles,format:this.pageFormat,orientation:this.pageOrientation},s("bn-message",{key:"c687e6d660a7301202663644f2bce0e20d148420",text:this.messageText,image:this.messageImage}),s("bn-title",{key:"6e30d548765d8b32f7ab85c6203c1af2142d55c5",namespace:this.titleNamespace,"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}),s("bn-body",{key:"a691c212bcf2ed7c95792de989be4a5c5d30aa5f"},s("div",{key:"150f9e5941e723f527166ef9071b721b194101fe",style:t},this.getSlots(e))),s("bn-footer",{key:"9868b2deab6302fc029b6d9f9780d84269245979",text:this.footerText,"page-number":this.pageNumber,"display-page-number":this.footerDisplayPageNumber}))}get element(){return this}static get style(){return':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);display:block;flex-direction:column;overflow:hidden;float:left;clear:left}'}},[257,"bn-layout-page",{styles:[1],messageText:[1,"message-text"],messageImage:[1,"message-image"],titleBusinessUnit:[1,"title-business-unit"],titleScenarios:[1,"title-scenarios"],titleVariances:[1,"title-variances"],titleOrder:[1,"title-order"],titleOrderDirection:[1,"title-order-direction"],titleMeasures:[1,"title-measures"],titleDateStart:[1,"title-date-start"],titleDateEnd:[1,"title-date-end"],titleDateFormat:[1,"title-date-format"],titleDateLink:[1,"title-date-link"],titleNamespace:[1,"title-namespace"],pageFormat:[1,"page-format"],pageOrientation:[1,"page-orientation"],pageNumber:[1,"page-number"],footerText:[1,"footer-text"],footerDisplayPageNumber:[4,"footer-display-page-number"],pageLayout:[1,"page-layout"],pageCustomTemplate:[1,"page-custom-template"],pageGridGap:[1,"page-grid-gap"],pageFitToContent:[4,"page-fit-to-content"],getNumberOfSlot:[64]}]),h=b,p=function(){"undefined"!=typeof customElements&&["bn-layout-page","bn-body","bn-footer","bn-message","bn-page","bn-title","ibcs-title"].forEach((t=>{switch(t){case"bn-layout-page":customElements.get(i(t))||customElements.define(i(t),b);break;case"bn-body":customElements.get(i(t))||o();break;case"bn-footer":customElements.get(i(t))||n();break;case"bn-message":customElements.get(i(t))||l();break;case"bn-page":customElements.get(i(t))||c();break;case"bn-title":customElements.get(i(t))||m();break;case"ibcs-title":customElements.get(i(t))||d()}}))};export{h as BnLayoutPage,p as defineCustomElement}
@@ -1 +1 @@
1
- import{g as t,c as e}from"./context-protocol.js";import{r as o}from"./utils.js";import{getElement as r}from"@stencil/core/internal/client";const s=(t,e)=>{const o=[],r=[];for(const s of e)(t(s)?o:r).push(s);return[o,r]},a="WARN_use_dataset",n=(t,e)=>{const o=t.errors;if(o)if(e.length>0){const t=e.map((t=>t.substring(1))).join(", ");o.addOrReplace({id:a,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else o.remove(a)},i=(a,i,u)=>{let c,d,f,l,p=[],m=[];const g=t=>{if(u){const e=l.datasetsMeta.get(t);e&&u(t,e)}},h=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,p]=s((t=>t.startsWith("$")),r(a).getAttribute("datasets").split(",")),n(a,m),p.forEach((t=>{i(t,l.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,l.datasources.get(t.substring(1)))})))}))})),w=a.connectedCallback;a.connectedCallback=()=>{const e=r(a);l=t(e),[m,p]=s((t=>t.startsWith("$")),(e.getAttribute("datasets")||"").split(",")),n(a,m),p.forEach((t=>{i(t,l.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,l.datasources.get(t.substring(1)))})),h.observe(e,{attributes:!0,attributeFilter:["datasets"]}),c=l.datasets.on("set",((t,e)=>{p.includes(t)&&i(t,e)})),d=l.datasources.on("set",((t,e)=>{m.includes("$"+t)&&i("$"+t,e)})),u&&(f=l.datasetsMeta.on("set",((t,e)=>{p.includes(t)&&u(t,e)}))),o(w,a)};const y=a.disconnectedCallback;return a.disconnectedCallback=()=>{h.disconnect(),o(c),o(d),o(f),e(r(a)),o(y,a)},t=>{p=t,t.forEach((t=>{i(t,l.datasets.get(t)),g(t)}))}};function u(t){const e=t.parentElement;if(!e)return{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),s=function(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e),o=t.overflowY;if("hidden"===o||"scroll"===o||"auto"===o)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const o=parseFloat(t.maxHeight);if(!isNaN(o)&&o>0)return Math.min(o,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=e.parentElement}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,r),height:Math.max(0,s)}}function c(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{u as g,c as p,i as w}
1
+ import{g as t,c as e}from"./context-protocol.js";import{r as o}from"./utils.js";import{getElement as n}from"@stencil/core/internal/client";const r=(t,e)=>{const o=[],n=[];for(const r of e)(t(r)?o:n).push(r);return[o,n]},s="WARN_use_dataset",a=(t,e)=>{const o=t.errors;if(o)if(e.length>0){const t=e.map((t=>t.substring(1))).join(", ");o.addOrReplace({id:s,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else o.remove(s)},i=(s,i,u)=>{let d,c,l,f,p=[],m=[];const g=t=>{if(u){const e=f.datasetsMeta.get(t);e&&u(t,e)}},h=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,p]=r((t=>t.startsWith("$")),n(s).getAttribute("datasets").split(",")),a(s,m),p.forEach((t=>{i(t,f.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,f.datasources.get(t.substring(1)))})))}))})),w=s.connectedCallback;s.connectedCallback=()=>{const e=n(s);f=t(e),[m,p]=r((t=>t.startsWith("$")),(e.getAttribute("datasets")||"").split(",")),a(s,m),p.forEach((t=>{i(t,f.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,f.datasources.get(t.substring(1)))})),h.observe(e,{attributes:!0,attributeFilter:["datasets"]}),d=f.datasets.on("set",((t,e)=>{p.includes(t)&&i(t,e)})),c=f.datasources.on("set",((t,e)=>{m.includes("$"+t)&&i("$"+t,e)})),u&&(l=f.datasetsMeta.on("set",((t,e)=>{p.includes(t)&&u(t,e)}))),o(w,s)};const v=s.disconnectedCallback;return s.disconnectedCallback=()=>{h.disconnect(),o(d),o(c),o(l),e(n(s)),o(v,s)},t=>{p=t,t.forEach((t=>{i(t,f.datasets.get(t)),g(t)}))}};function u(t){const e=d(t);if(!e)return{width:0,height:0};const o=getComputedStyle(e),n=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),r=function(t){let e=d(t);for(;e;){const t=getComputedStyle(e),o=t.overflowY;if("hidden"===o||"scroll"===o||"auto"===o)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const o=parseFloat(t.maxHeight);if(!isNaN(o)&&o>0)return Math.min(o,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=c(e)}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,n),height:Math.max(0,r)}}function d(t){var e;const o=t.parentElement;return(null===(e=null==o?void 0:o.assignedSlot)||void 0===e?void 0:e.parentElement)?o.assignedSlot.parentElement:o}function c(t){var e;return(null===(e=t.assignedSlot)||void 0===e?void 0:e.parentElement)?t.assignedSlot.parentElement:t.parentElement}function l(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{u as g,l as p,i as w}