@luzmo/embed 5.0.5 → 5.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,48 @@
1
+
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## [5.0.7] - 2024-02-28
5
+
6
+ ### Updates
7
+
8
+ - Bugfixes in experimental mode for width height issue.
9
+
10
+
11
+ ## [5.0.6] - 2024-02-17
12
+
13
+ ### Updates
14
+
15
+ - Added type: "module" to package.json.
16
+ - Updated dependencies.
17
+
18
+ ## [5.0.5] - 2024-02-16
19
+
20
+ ### Updates
21
+
22
+ - Typing issue fixed.
23
+
24
+ ## [5.0.4] - 2024-02-08
25
+
26
+ ### Updates
27
+
28
+ - Changelog update / README updated.
29
+
30
+ ## [5.0.3] - 2024-02-01
31
+
32
+ ### Updates
33
+
34
+ - Added a parameter to allow testing upstream changes for clients.
35
+ - Performance improvements.
36
+
37
+ ## [5.0.2] - 2023-12-07
38
+
39
+ ### BUGFIX
40
+
41
+ - Fixed incorrect dependency version in library.
42
+
43
+
44
+ ## [5.0.1] - 2023-12-06
45
+
46
+ ### BUGFIX
47
+
48
+ - Fixed a bug where dimensions were calculated before dimension data was available which resulted in a crash.
package/MIGRATIONS.md ADDED
@@ -0,0 +1 @@
1
+ # Luzmo embed migrations
package/README.md CHANGED
@@ -33,14 +33,14 @@ OR In an HTML page:
33
33
 
34
34
  ```html
35
35
  <script type="module">
36
- import './node_modules/@luzmo/embed/index.umd.js';
36
+ import './node_modules/@luzmo/embed/index.js';
37
37
  </script>
38
38
  ```
39
39
 
40
40
  OR
41
41
 
42
42
  ```html
43
- <script type="module" src="./node_modules/@luzmo/embed/index.umd.js"></script>
43
+ <script type="module" src="./node_modules/@luzmo/embed/index.js"></script>
44
44
  ```
45
45
 
46
46
  ## Usage
@@ -109,6 +109,9 @@ getData(itemId: string): Promise<ItemData>
109
109
  getFilters(): Promise<FilterGroup[]>
110
110
  // Returns an array of active filters.
111
111
 
112
+ setFilters<K extends CombinedFilterInput>(itemId: string, filters: K): Promise<SetFilters>
113
+ // Sets filters to the dashboard. Accepts an itemId which is an id of the item on the dashboard (e.g. chart) and filters which is an object with filters' settings.
114
+
112
115
  setAuthorization(key: string, token: string): Promise<void>
113
116
  // Changes the authorization of all or one dashboard. To fetch data based on new authorization parameters, reloadDashboard() or refreshData() needs to be called.
114
117
 
@@ -197,6 +200,28 @@ dashboardComponent.getAccessibleDashboards().then((dashboards) => {
197
200
  });
198
201
  ```
199
202
 
203
+ Set filters for the Bar Chart:
204
+
205
+ ```typescript
206
+ const barChartId = '04ec1a76-1948-496f-8342-0177272f6695';
207
+ const filters: BarChartFilterInput = {
208
+ and: [
209
+ {
210
+ expression: '? between ?',
211
+ parameters: [
212
+ { slot: 'y-axis' },
213
+ [
214
+ ['2010-01-01T00:00:00.000Z', '2010-01-01T00:00:00.000Z'],
215
+ ['2012-01-01T00:00:00.000Z', '2012-01-01T00:00:00.000Z']
216
+ ]
217
+ ]
218
+ }
219
+ ]
220
+ }
221
+ dashboardComponent.setFilters<BarChartFilterInput>(barChartId, filters)
222
+ .then(() => {});
223
+ ```
224
+
200
225
  ## Changelog
201
226
 
202
227
  - [Changelog](https://embed-libs.luzmo.com/changelogs/embed/)