@bino-bi/bn-template-engine 1.0.0-alpha.10 → 1.0.0-alpha.11

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.
@@ -324,19 +324,29 @@ export namespace Components {
324
324
  "static": boolean;
325
325
  }
326
326
  /**
327
- * Ingests raw JSON data and writes it to the scoped `datasources` store.
328
- * Data is provided as JSON text inside the element body (observed via
329
- * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
330
- * the stored data by the `name` prop to run queries against it.
331
- * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
327
+ * Ingests data and writes it to the scoped `datasources` store.
328
+ * Data can be provided in three ways:
329
+ * 1. **Inline JSON** — Place JSON text inside the element body (default).
330
+ * 2. **Compressed payload** — Set `raw="false"` and provide `<hash>:<base64_gzip>` format.
331
+ * 3. **URL** — Place an `http://` or `https://` URL in the body to fetch JSON
332
+ * from a remote endpoint.
333
+ * In URL mode the component fetches JSON from the URL. Set the `interval`
334
+ * prop (in seconds) to enable periodic re-fetching (polling).
335
+ * Other components (e.g. `bn-dataset`) reference the stored data by the
336
+ * `name` prop to run queries against it.
332
337
  */
333
338
  interface BnDatasource {
334
339
  /**
335
- * Unique (template scope) name of the datasource
340
+ * Polling interval in **seconds** for URL mode. When set and the body content is a URL, the component re-fetches data at this interval. Has no effect for inline JSON or compressed content. Set to `0` or leave unset to disable polling.
341
+ * @default 0
342
+ */
343
+ "interval": number;
344
+ /**
345
+ * Unique (template scope) name of the datasource.
336
346
  */
337
347
  "name": string;
338
348
  /**
339
- * When true (default), body content is plain JSON text. When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
349
+ * When true (default), body content is plain JSON text. When false, body content is a compressed payload (`<hash>:<base64_gzip>`). Ignored in URL mode.
340
350
  * @default true
341
351
  */
342
352
  "raw": boolean;
@@ -1365,11 +1375,16 @@ declare global {
1365
1375
  new (): HTMLBnDatasetElement;
1366
1376
  };
1367
1377
  /**
1368
- * Ingests raw JSON data and writes it to the scoped `datasources` store.
1369
- * Data is provided as JSON text inside the element body (observed via
1370
- * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
1371
- * the stored data by the `name` prop to run queries against it.
1372
- * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
1378
+ * Ingests data and writes it to the scoped `datasources` store.
1379
+ * Data can be provided in three ways:
1380
+ * 1. **Inline JSON** — Place JSON text inside the element body (default).
1381
+ * 2. **Compressed payload** — Set `raw="false"` and provide `<hash>:<base64_gzip>` format.
1382
+ * 3. **URL** — Place an `http://` or `https://` URL in the body to fetch JSON
1383
+ * from a remote endpoint.
1384
+ * In URL mode the component fetches JSON from the URL. Set the `interval`
1385
+ * prop (in seconds) to enable periodic re-fetching (polling).
1386
+ * Other components (e.g. `bn-dataset`) reference the stored data by the
1387
+ * `name` prop to run queries against it.
1373
1388
  */
1374
1389
  interface HTMLBnDatasourceElement extends Components.BnDatasource, HTMLStencilElement {
1375
1390
  }
@@ -1863,19 +1878,29 @@ declare namespace LocalJSX {
1863
1878
  "static"?: boolean;
1864
1879
  }
1865
1880
  /**
1866
- * Ingests raw JSON data and writes it to the scoped `datasources` store.
1867
- * Data is provided as JSON text inside the element body (observed via
1868
- * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
1869
- * the stored data by the `name` prop to run queries against it.
1870
- * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
1881
+ * Ingests data and writes it to the scoped `datasources` store.
1882
+ * Data can be provided in three ways:
1883
+ * 1. **Inline JSON** — Place JSON text inside the element body (default).
1884
+ * 2. **Compressed payload** — Set `raw="false"` and provide `<hash>:<base64_gzip>` format.
1885
+ * 3. **URL** — Place an `http://` or `https://` URL in the body to fetch JSON
1886
+ * from a remote endpoint.
1887
+ * In URL mode the component fetches JSON from the URL. Set the `interval`
1888
+ * prop (in seconds) to enable periodic re-fetching (polling).
1889
+ * Other components (e.g. `bn-dataset`) reference the stored data by the
1890
+ * `name` prop to run queries against it.
1871
1891
  */
1872
1892
  interface BnDatasource {
1873
1893
  /**
1874
- * Unique (template scope) name of the datasource
1894
+ * Polling interval in **seconds** for URL mode. When set and the body content is a URL, the component re-fetches data at this interval. Has no effect for inline JSON or compressed content. Set to `0` or leave unset to disable polling.
1895
+ * @default 0
1896
+ */
1897
+ "interval"?: number;
1898
+ /**
1899
+ * Unique (template scope) name of the datasource.
1875
1900
  */
1876
1901
  "name": string;
1877
1902
  /**
1878
- * When true (default), body content is plain JSON text. When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
1903
+ * When true (default), body content is plain JSON text. When false, body content is a compressed payload (`<hash>:<base64_gzip>`). Ignored in URL mode.
1879
1904
  * @default true
1880
1905
  */
1881
1906
  "raw"?: boolean;
@@ -2884,6 +2909,7 @@ declare namespace LocalJSX {
2884
2909
  interface BnDatasourceAttributes {
2885
2910
  "name": string;
2886
2911
  "raw": boolean;
2912
+ "interval": number;
2887
2913
  }
2888
2914
  interface BnFooterAttributes {
2889
2915
  "pageNumber": number | null;
@@ -3170,11 +3196,16 @@ declare module "@stencil/core" {
3170
3196
  */
3171
3197
  "bn-dataset": LocalJSX.IntrinsicElements["bn-dataset"] & JSXBase.HTMLAttributes<HTMLBnDatasetElement>;
3172
3198
  /**
3173
- * Ingests raw JSON data and writes it to the scoped `datasources` store.
3174
- * Data is provided as JSON text inside the element body (observed via
3175
- * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
3176
- * the stored data by the `name` prop to run queries against it.
3177
- * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
3199
+ * Ingests data and writes it to the scoped `datasources` store.
3200
+ * Data can be provided in three ways:
3201
+ * 1. **Inline JSON** — Place JSON text inside the element body (default).
3202
+ * 2. **Compressed payload** — Set `raw="false"` and provide `<hash>:<base64_gzip>` format.
3203
+ * 3. **URL** — Place an `http://` or `https://` URL in the body to fetch JSON
3204
+ * from a remote endpoint.
3205
+ * In URL mode the component fetches JSON from the URL. Set the `interval`
3206
+ * prop (in seconds) to enable periodic re-fetching (polling).
3207
+ * Other components (e.g. `bn-dataset`) reference the stored data by the
3208
+ * `name` prop to run queries against it.
3178
3209
  */
3179
3210
  "bn-datasource": LocalJSX.IntrinsicElements["bn-datasource"] & JSXBase.HTMLAttributes<HTMLBnDatasourceElement>;
3180
3211
  "bn-footer": LocalJSX.IntrinsicElements["bn-footer"] & JSXBase.HTMLAttributes<HTMLBnFooterElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bino-bi/bn-template-engine",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.11",
4
4
  "description": "IBCS-compliant web components for business intelligence tables and charts",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -54,7 +54,7 @@
54
54
  "typescript": "^5.9.3",
55
55
  "typescript-eslint": "^8.56.1"
56
56
  },
57
- "license": "MIT",
57
+ "license": "Apache-2.0",
58
58
  "dependencies": {
59
59
  "@corex/deepmerge": "^4.0.43",
60
60
  "@emotion/hash": "^0.9.2",
package/readme.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  IBCS-compliant web components for business intelligence visualizations.
4
4
 
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
6
6
  [![npm version](https://img.shields.io/npm/v/@bino-bi/bn-template-engine)](https://www.npmjs.com/package/@bino-bi/bn-template-engine)
7
7
 
8
8
  **bn-template-engine** is a [Stencil.js](https://stenciljs.com/) web component library that renders tables and charts following [IBCS (International Business Communication Standards)](https://www.ibcs.com/). It supports multi-scenario comparisons (actual, forecast, plan, previous period), variance calculations, hierarchical data grouping, and more — all as standard Web Components that work in any HTML page or framework.
@@ -160,4 +160,4 @@ bn-template-engine uses standard [Web Components](https://developer.mozilla.org/
160
160
 
161
161
  ## License
162
162
 
163
- [MIT](LICENSE)
163
+ [Apache 2.0](LICENSE)