@luzmo/embed 6.1.3 → 6.1.4

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.
@@ -62,7 +62,8 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
62
62
  position: YAxisLabelPosition;
63
63
  };
64
64
  /**
65
- * Another Y-axis label options
65
+ * !!! Y2 axis partially implemented in the Area Chart, so hide it for now in the docs
66
+ * @TJS-ignore
66
67
  */
67
68
  y2?: {
68
69
  /**
@@ -101,7 +102,7 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
101
102
  ticksStyle?: AxisTicksStyle;
102
103
  };
103
104
  /**
104
- * Y2-axis options
105
+ * Y-axis options
105
106
  */
106
107
  y?: {
107
108
  /**
@@ -140,7 +141,8 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
140
141
  type?: AreaChartMeasureAxisType;
141
142
  };
142
143
  /**
143
- * Y2-axis options
144
+ * !!! Y2 axis partially implemented in the Area Chart, so hide it for now in the docs
145
+ * @TJS-ignore
144
146
  */
145
147
  y2?: {
146
148
  /**
@@ -232,7 +234,8 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
232
234
  opacity?: number;
233
235
  };
234
236
  /**
235
- * Y-axis grid options
237
+ * !!! Y2 axis partially implemented in the Area Chart, so hide it for now in the docs
238
+ * @TJS-ignore
236
239
  */
237
240
  y2?: {
238
241
  /**
@@ -97,8 +97,7 @@ export interface DateFilterViewOptions extends DropObjectViewOptions, InfoToolti
97
97
  measureDimensionPicker?: NonNullable<NonNullable<InteractivityMeasureDimensionPickerViewOptions['interactivity']>['measureDimensionPicker']>;
98
98
  };
99
99
  }
100
- interface DateFilterInteractivityViewOptions extends InteractivityMeasureDimensionPickerViewOptions {
101
- }
100
+ type DateFilterInteractivityViewOptions = InteractivityMeasureDimensionPickerViewOptions;
102
101
  export interface DateFilterRange {
103
102
  /**
104
103
  * Predefined list of keys to select from
@@ -79,6 +79,5 @@ interface DropdownFilterDisplayViewOptions extends DisplayTitleViewOptions {
79
79
  clear?: boolean;
80
80
  };
81
81
  }
82
- interface DropdownFilterInteractivityViewOptions extends InteractivityMeasureDimensionPickerViewOptions {
83
- }
82
+ type DropdownFilterInteractivityViewOptions = InteractivityMeasureDimensionPickerViewOptions;
84
83
  export {};
@@ -27,3 +27,4 @@ export * from './sort';
27
27
  export * from './theme';
28
28
  export * from './title';
29
29
  export * from './item-filter-group';
30
+ export * from './viz-item';
@@ -1,5 +1,6 @@
1
1
  import { FilterableByViewOptions, FilterViewOptions } from './filters';
2
2
  import { ThemeViewOptions } from './theme';
3
3
  import { DisplayTitleViewOptions, TitleViewOptions } from './title';
4
- export interface ObjectViewOptions extends FilterViewOptions, ThemeViewOptions, TitleViewOptions, DisplayTitleViewOptions, FilterableByViewOptions {
4
+ import { VizItemCustomOptions } from './viz-item';
5
+ export interface ObjectViewOptions extends FilterViewOptions, ThemeViewOptions, TitleViewOptions, DisplayTitleViewOptions, FilterableByViewOptions, VizItemCustomOptions {
5
6
  }
@@ -100,7 +100,7 @@ export interface GenericSlotContent {
100
100
  */
101
101
  column?: string;
102
102
  /**
103
- * A dataset formula id or an ad-hoc formula. A formula is an entity similar to a column. You can add formulas on the dataset details page or use ad-hoc formulas.
103
+ * A dataset formula id or an ad-hoc formula. A formula is an entity similar to a column. You can add formulas on the dataset details page or use ad-hoc formulas. You can find more information about formulas in the article https://academy.luzmo.com/article/52tm82oo
104
104
  */
105
105
  formula?: string;
106
106
  /**
@@ -282,7 +282,7 @@ export interface GenericSlotContent {
282
282
  */
283
283
  model?: any;
284
284
  /**
285
- * Settings to configure period over period comparison
285
+ * Settings to configure period over period comparison. It can be used only in a measure slot.
286
286
  */
287
287
  periodOverPeriod?: {
288
288
  /**
@@ -293,19 +293,20 @@ export interface GenericSlotContent {
293
293
  */
294
294
  type: 'none' | 'past' | 'change';
295
295
  /**
296
+ * Period of time level
296
297
  * 0 - period, 1 - year, 2 - quarter, 3 - month, 4 - week, 5 - day... 9 - millisecond
297
298
  */
298
299
  level: number;
299
300
  /**
300
- * number of periods
301
+ * Number of periods
301
302
  */
302
303
  quantity: number;
303
304
  /**
304
- * period to date comparison
305
+ * Turn ON/OFF period to date comparison
305
306
  */
306
307
  periodToDate: boolean;
307
308
  /**
308
- * category date level to disallow smaller levels. For internal use only
309
+ * Category date level to disallow smaller Period-Over-Period levels. For internal use only
309
310
  * @TJS-ignore
310
311
  */
311
312
  minLevel: number;
@@ -341,7 +342,7 @@ export interface DateTimeSlotContent extends Omit<GenericSlotContent, 'formula'
341
342
  */
342
343
  aggregationFunc?: BasicItemQueryAggregation;
343
344
  }
344
- export interface SpatialSlotContent extends Omit<GenericSlotContent, 'formula' | 'format' | 'currency' | 'aggregationFunc' | 'aggregationWeight' | 'level' | 'lowestLevel' | 'bins' | 'duration' | 'datetimeDisplayMode' | 'grandTotals' | 'weekStart' | 'weekDayNameFormat' | 'monthNameFormat'> {
345
+ export interface SpatialSlotContent extends Omit<GenericSlotContent, 'formula' | 'format' | 'currency' | 'aggregationFunc' | 'aggregationWeight' | 'level' | 'lowestLevel' | 'bins' | 'duration' | 'datetimeDisplayMode' | 'grandTotals' | 'weekStart' | 'weekDayNameFormat' | 'monthNameFormat' | 'periodOverPeriod'> {
345
346
  /**
346
347
  * "spatial" column type
347
348
  */
@@ -0,0 +1,60 @@
1
+ export interface VizItemCustomOptions {
2
+ /**
3
+ * Locale to be used
4
+ * @default "en"
5
+ * @examples ["en", "fr"]
6
+ */
7
+ locale?: string;
8
+ /**
9
+ * The loader configuration
10
+ */
11
+ loader?: ChartLoader;
12
+ /**
13
+ * The timezone that will be used in the dashboard. This timezone id needs to be a valid id that is available in the IANA timezone database
14
+ * @examples ["Europe/Brussels", "America/New_York"]
15
+ */
16
+ timezoneId?: string;
17
+ }
18
+ export interface ChartLoader {
19
+ /**
20
+ * Background color of the chart loader element
21
+ * @default "#f9f9f9"
22
+ */
23
+ background?: string;
24
+ /**
25
+ * Font color of the text of the chart loaders
26
+ * @default "#5a5a5a"
27
+ */
28
+ fontColor?: string;
29
+ /**
30
+ * Locale to be used if "msg" is set
31
+ * @default "en"
32
+ * @examples ["en", "fr"]
33
+ */
34
+ locale?: string;
35
+ /**
36
+ * Light or dark loader
37
+ * @default "light"
38
+ */
39
+ mode?: string;
40
+ /**
41
+ * Loading message
42
+ * @examples ["Loading dashboard..."]
43
+ */
44
+ msg?: string;
45
+ /**
46
+ * Background color of the spinner
47
+ * @default "rgba(169, 169, 169, 0.14)"
48
+ */
49
+ spinnerBackground?: string;
50
+ /**
51
+ * Spinner color of the loader
52
+ * @default "rgba(255, 165, 0, 0.7)"
53
+ */
54
+ spinnerColor?: string;
55
+ /**
56
+ * Shows the branded "powered by" information
57
+ * @default false
58
+ */
59
+ showBranded?: boolean;
60
+ }
@@ -1,4 +1,4 @@
1
- import type { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
1
+ import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
2
2
  import { LimitViewOptions, RankingViewOptions } from '../shared/common';
3
3
  import { DropObjectViewOptions } from '../shared/drop-object-view-options';
4
4
  import { FilterViewOptions } from '../shared/filters';
@@ -1,4 +1,4 @@
1
- import type { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
1
+ import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
2
2
  import type { LimitViewOptions } from '../shared/common';
3
3
  import type { DropObjectViewOptions } from '../shared/drop-object-view-options';
4
4
  import type { InfoTooltipViewOptions } from '../shared/info-tooltip-options';
@@ -22,4 +22,4 @@ import { ScatterPlotViewOptions } from './lib/scatter-plot';
22
22
  import { SlicerFilterViewOptions } from './lib/slicer-filter';
23
23
  import { SliderFilterViewOptions } from './lib/slider-filter';
24
24
  import { TextViewOptions } from './lib/text';
25
- export type Options = AreaChartViewOptions | BarChartViewOptions | BoxPlotViewOptions | BubbleChartViewOptions | BulletChartViewOptions | ChoroplethMapViewOptions | CircularGaugeViewOptions | ColumnChartViewOptions | CombinationChartViewOptions | ConditionalNumberViewOptions | DateFilterViewOptions | DonutChartViewOptions | DropdownFilterViewOptions | EvolutionNumberViewOptions | FunnelChartViewOptions | ImageViewOptions | LineChartViewOptions | PivotTableViewOptions | RegularTableViewOptions | SankeyDiagramViewOptions | ScatterPlotViewOptions | SlicerFilterViewOptions | SliderFilterViewOptions | TextViewOptions;
25
+ export type VizItemOptions = AreaChartViewOptions | BarChartViewOptions | BoxPlotViewOptions | BubbleChartViewOptions | BulletChartViewOptions | ChoroplethMapViewOptions | CircularGaugeViewOptions | ColumnChartViewOptions | CombinationChartViewOptions | ConditionalNumberViewOptions | DateFilterViewOptions | DonutChartViewOptions | DropdownFilterViewOptions | EvolutionNumberViewOptions | FunnelChartViewOptions | ImageViewOptions | LineChartViewOptions | PivotTableViewOptions | RegularTableViewOptions | SankeyDiagramViewOptions | ScatterPlotViewOptions | SlicerFilterViewOptions | SliderFilterViewOptions | TextViewOptions;
@@ -1,5 +1,5 @@
1
1
  export * from '@luzmo/dashboard-contents-types';
2
- export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData, VizItemOptions, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent } from '@luzmo/shared-embed';
2
+ export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent } from '@luzmo/shared-embed';
3
3
  export { selectedDataUtils } from '@luzmo/shared-embed';
4
4
  export * from './lib/dashboard-component/dashboard-component';
5
5
  export * from './lib/viz-item/viz-item-component';
@@ -1,6 +1,6 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
2
  import * as SharedLib from '@luzmo/shared-embed';
3
- import type { VizItemType, VizItemSlots, FilterGroup } from '@luzmo/dashboard-contents-types';
3
+ import type { VizItemType, VizItemSlots, FilterGroup, VizItemOptions } from '@luzmo/dashboard-contents-types';
4
4
  /**
5
5
  * The version of the dashboard contents that is linked to the current library.
6
6
  *
@@ -12,7 +12,7 @@ import type { VizItemType, VizItemSlots, FilterGroup } from '@luzmo/dashboard-co
12
12
  export declare const dashboardContentsVersion = "0.1.89";
13
13
  type FunctionCall = [(...args: any) => any, any[]];
14
14
  interface LuzmoVizItemComponentInterface extends HTMLElement {
15
- options?: SharedLib.VizItemOptions;
15
+ options?: VizItemOptions;
16
16
  type?: VizItemType;
17
17
  appServer?: string;
18
18
  apiHost?: string;
@@ -36,7 +36,7 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
36
36
  appServer?: string;
37
37
  apiHost?: string;
38
38
  slots?: VizItemSlots;
39
- options?: SharedLib.VizItemOptions;
39
+ options?: VizItemOptions;
40
40
  type?: VizItemType;
41
41
  authKey?: string;
42
42
  authToken?: string;
@@ -1,6 +1,5 @@
1
- import { FilterGroup, FilterOrigin } from '@luzmo/dashboard-contents-types';
1
+ import { FilterGroup, FilterOrigin, VizItemOptions } from '@luzmo/dashboard-contents-types';
2
2
  import { ExportType } from '../methods/export-dashboard';
3
- import { VizItemOptions } from './viz-item.model';
4
3
  type VizItemPostMessageMetadata = {
5
4
  dashboardId?: string;
6
5
  itemId?: string;
@@ -1,22 +1,4 @@
1
- import type { Options, ThemeConfig } from '@luzmo/dashboard-contents-types';
2
1
  export declare const libraryTypeToWebComponentTypeMapping: Record<string, string>;
3
2
  export declare const libraryAcceptedParametersList: string[];
4
3
  export type CanFilter = string[] | 'all';
5
4
  export type VizItemCanFilter = CanFilter;
6
- type ChartLoader = {
7
- background: string;
8
- fontColor: string;
9
- locale: string;
10
- mode: string;
11
- msg: string;
12
- spinnerBackground: string;
13
- spinnerColor: string;
14
- showBranded: boolean;
15
- };
16
- export type VizItemOptions = Options & {
17
- theme?: string | ThemeConfig;
18
- locale?: string;
19
- loader?: ChartLoader;
20
- timezoneId?: string;
21
- };
22
- export {};