@luzmo/embed 6.1.2 → 6.1.3

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.
@@ -22,6 +22,7 @@ export * from './lib/scatter-plot';
22
22
  export * from './lib/conditional-number';
23
23
  export * from './lib/sankey-diagram';
24
24
  export * from './lib/funnel-chart';
25
+ export * from './lib/search-filter';
25
26
  export * from './lib/shared';
26
27
  export * from './options';
27
28
  export * from './slots';
@@ -167,7 +167,7 @@ interface ScatterPlotDisplayViewOptions extends DisplayLegendViewOptions, Displa
167
167
  legend?: NonNullable<NonNullable<DisplayLegendViewOptions['display']>['legend']>;
168
168
  };
169
169
  }
170
- interface ScatterPlotInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions {
170
+ interface ScatterPlotInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
171
171
  /**
172
172
  * Interactivity options
173
173
  */
@@ -0,0 +1,3 @@
1
+ export * from './search-filter';
2
+ export * from './search-filter-options';
3
+ export * from './search-filter-slots';
@@ -0,0 +1,56 @@
1
+ import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
2
+ import { DropObjectViewOptions } from '../shared/drop-object-view-options';
3
+ import { InfoTooltipViewOptions } from '../shared/info-tooltip-options';
4
+ import { PlaceholderViewOptions } from '../shared/placeholder';
5
+ import { DisplayTitleViewOptions, TitleViewOptions } from '../shared/title';
6
+ export interface SearchFilterViewOptions extends Omit<DropObjectViewOptions, 'display' | 'interactivity'>, InfoTooltipViewOptions, TitleViewOptions, PlaceholderViewOptions, SearchFilterDisplayViewOptions, SearchFilterInteractivityViewOptions {
7
+ /**
8
+ * Whether to auto apply filters or add the apply button
9
+ */
10
+ applyFiltersWithButton?: boolean;
11
+ /**
12
+ * Update left or right padding of the Search filter
13
+ */
14
+ padding?: {
15
+ /**
16
+ * Update left padding of the Search filter
17
+ */
18
+ left?: number;
19
+ /**
20
+ * Update right padding of the Search filter
21
+ */
22
+ right?: number;
23
+ };
24
+ }
25
+ interface SearchFilterDisplayViewOptions extends DisplayTitleViewOptions {
26
+ /**
27
+ * General display options of the Search filter: title, label, placeholder, search and clear
28
+ */
29
+ display: {
30
+ /**
31
+ * Show or hide the title
32
+ */
33
+ title: NonNullable<NonNullable<DisplayTitleViewOptions['display']>['title']>;
34
+ /**
35
+ * Show or hide the label of the Search filter
36
+ */
37
+ label?: boolean;
38
+ /**
39
+ * Show or hide the placeholder
40
+ */
41
+ placeholder?: boolean;
42
+ };
43
+ }
44
+ interface SearchFilterInteractivityViewOptions extends InteractivityMeasureDimensionPickerViewOptions {
45
+ /**
46
+ * Interactivity options
47
+ */
48
+ interactivity?: {
49
+ /**
50
+ * An array of measure dimension picker configurations
51
+ * @default [[]]
52
+ */
53
+ measureDimensionPicker?: NonNullable<NonNullable<InteractivityMeasureDimensionPickerViewOptions['interactivity']>['measureDimensionPicker']>;
54
+ };
55
+ }
56
+ export {};
@@ -0,0 +1,17 @@
1
+ import { DashboardContentVizItemSlot, DateTimeSlotContent, HierarchySlotContent, NumericSlotContent } from '../shared/slots';
2
+ /**
3
+ * Dimension slot definition of the search filter. Dimension slot is a required slot and it can have multiple columns.
4
+ */
5
+ interface DimensionSlot extends DashboardContentVizItemSlot {
6
+ name: 'dimension';
7
+ /**
8
+ * Dimension slot definition
9
+ */
10
+ content: (HierarchySlotContent | NumericSlotContent | DateTimeSlotContent)[];
11
+ }
12
+ /**
13
+ * Data definition of the Search filter
14
+ * @maxItems 1
15
+ */
16
+ export type SearchFilterSlots = DimensionSlot[];
17
+ export {};
@@ -0,0 +1,23 @@
1
+ import { VizItemType } from '../shared/common';
2
+ import { SearchFilterViewOptions } from './search-filter-options';
3
+ import { SearchFilterSlots } from './search-filter-slots';
4
+ /**
5
+ * Search filter item
6
+ */
7
+ export interface SearchFilter {
8
+ /**
9
+ * Type of the item
10
+ */
11
+ type: Extract<VizItemType, 'search-filter'>;
12
+ /**
13
+ * Options of the search filter item
14
+ * @$ref ./search-filter-options.schema.json/
15
+ */
16
+ options: SearchFilterViewOptions;
17
+ /**
18
+ * Data definition of the search filter
19
+ * @maxItems 1
20
+ * @$ref ./search-filter-slots.schema.json
21
+ */
22
+ slots: SearchFilterSlots;
23
+ }
@@ -97,7 +97,7 @@ export interface RankingViewOptions {
97
97
  ranking?: ItemQueryRanking;
98
98
  }
99
99
  export type SortDirection = OrderDirection | '';
100
- export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plot' | 'bullet-chart' | 'choropleth-map' | 'circular-gauge' | 'circle-pack-chart' | 'column-chart' | 'combination-chart' | 'date-filter' | 'donut-chart' | 'dropdown-filter' | 'dynamic-imageobject' | 'evolution-number' | 'funnel-chart' | 'heat-map' | 'heat-table' | 'hexbin-map' | 'iframeobject' | 'image' | 'line-chart' | 'line-chart-forecast' | 'marker-map' | 'conditional-number' | 'ohlc-chart' | 'parallel-coordinates-plot' | 'pivot-table' | 'pyramid-chart' | 'radar-chart' | 'regular-table' | 'route-map' | 'sankey-diagram' | 'scatter-plot' | 'slicer-filter' | 'slider-filter' | 'spacer' | 'speedometer-chart' | 'spike-map' | 'strip-plot' | 'sunburst-chart' | 'symbol-map' | 'text' | 'treemap-chart' | 'venn-diagram' | 'video' | 'wordcloud-chart';
100
+ export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plot' | 'bullet-chart' | 'choropleth-map' | 'circular-gauge' | 'circle-pack-chart' | 'column-chart' | 'combination-chart' | 'date-filter' | 'donut-chart' | 'dropdown-filter' | 'dynamic-imageobject' | 'evolution-number' | 'funnel-chart' | 'heat-map' | 'heat-table' | 'hexbin-map' | 'iframeobject' | 'image' | 'line-chart' | 'line-chart-forecast' | 'marker-map' | 'conditional-number' | 'ohlc-chart' | 'parallel-coordinates-plot' | 'pivot-table' | 'pyramid-chart' | 'radar-chart' | 'regular-table' | 'route-map' | 'sankey-diagram' | 'scatter-plot' | 'search-filter' | 'slicer-filter' | 'slider-filter' | 'spacer' | 'speedometer-chart' | 'spike-map' | 'strip-plot' | 'sunburst-chart' | 'symbol-map' | 'text' | 'treemap-chart' | 'venn-diagram' | 'video' | 'wordcloud-chart';
101
101
  export type ItemType = VizItemType;
102
102
  export type DatetimeDisplayMode = 'default' | 'weekday_number' | 'weekday_name' | 'day_in_month' | 'day_in_year' | 'month_name' | 'month_number' | 'week_number' | 'second_in_minute' | 'minute_in_hour' | 'hour_in_day' | 'quarter_number';
103
103
  export type ScreenMode = 'desktop' | 'tablet' | 'mobile' | 'largeScreen' | 'fixed';
@@ -1,16 +1,37 @@
1
1
  export interface ItemQueryDimension {
2
2
  /**
3
3
  * @format uuid
4
+ * @TJS-ignore
5
+ * @deprecated user columnId instead.
4
6
  */
5
7
  column_id?: string;
6
8
  /**
7
9
  * @format uuid
10
+ * @TJS-ignore
11
+ * @deprecated use formulaId instead.
8
12
  */
9
13
  formula_id?: string;
10
14
  /**
11
15
  * @format uuid
16
+ * @TJS-ignore
17
+ * @deprecated use datasetId instead.
12
18
  */
13
19
  dataset_id?: string;
20
+ /**
21
+ * Column id
22
+ * @format uuid
23
+ */
24
+ columnId?: string;
25
+ /**
26
+ * Formula id
27
+ * @format uuid
28
+ */
29
+ formulaId?: string;
30
+ /**
31
+ * Dataset id
32
+ * @format uuid
33
+ */
34
+ datasetId?: string;
14
35
  level?: number;
15
36
  expression?: string;
16
37
  include_nonoccurring?: boolean;
@@ -22,7 +43,7 @@ export interface ItemQueryDiscretization {
22
43
  over?: ItemQueryDimension[];
23
44
  }
24
45
  export type ItemFilterOrigin = 'filterFromVizItem' | 'filterFromFilterItem' | 'itemFilter' | 'global';
25
- export type ItemQueryFilterExpression = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? between ?' | 'last_now' | 'to_date' | 'last_available' | 'last_completed' | 'next_now' | 'next_full' | 'WTD' | 'MTD' | 'QTD' | 'YTD' | '? is null' | '? is not null';
46
+ export type ItemQueryFilterExpression = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? between ?' | 'last_now' | 'to_date' | 'last_available' | 'last_completed' | 'next_now' | 'next_full' | 'ago' | 'WTD' | 'MTD' | 'QTD' | 'YTD' | '? is null' | '? is not null';
26
47
  export interface ItemFilterProperties {
27
48
  /**
28
49
  * @format uuid
@@ -30,7 +51,17 @@ export interface ItemFilterProperties {
30
51
  id?: string;
31
52
  origin?: ItemFilterOrigin;
32
53
  type?: 'where' | 'having';
54
+ /**
55
+ * @format uuid
56
+ * @TJS-ignore
57
+ * @deprecated use itemId instead.
58
+ */
33
59
  viz?: string;
60
+ /**
61
+ * itemId of the chart.
62
+ * @format uuid
63
+ */
64
+ itemId?: string;
34
65
  ignore?: string[];
35
66
  objects?: string[];
36
67
  }
@@ -46,12 +77,26 @@ export interface ItemFilter {
46
77
  {
47
78
  /**
48
79
  * @format uuid
80
+ * @TJS-ignore
81
+ * @deprecated use datasetId instead.
49
82
  */
50
- dataset_id: string;
83
+ dataset_id?: string;
51
84
  /**
52
85
  * @format uuid
86
+ * @TJS-ignore
87
+ * @deprecated use columnId instead.
53
88
  */
54
89
  column_id?: string;
90
+ /**
91
+ * Dataset id
92
+ * @format uuid
93
+ */
94
+ datasetId?: string;
95
+ /**
96
+ * Column id
97
+ * @format uuid
98
+ */
99
+ columnId?: string;
55
100
  level?: number;
56
101
  lowestLevel?: number;
57
102
  discretization?: ItemQueryDiscretization;
@@ -102,8 +147,15 @@ export interface ItemFilterGroup {
102
147
  *
103
148
  * @format uuid
104
149
  * @TJS-ignore
150
+ * @deprecated use itemId instead.
105
151
  */
106
152
  vizId?: string;
153
+ /**
154
+ * Stores vizItem (chart) id if origin is not 'global'.
155
+ *
156
+ * @format uuid
157
+ */
158
+ itemId?: string;
107
159
  /**
108
160
  * Specifies if it's a drilldown filter group.
109
161
  * @TJS-ignore
@@ -88,18 +88,31 @@ export interface GenericSlotContent {
88
88
  /**
89
89
  * Dataset id
90
90
  * @format uuid
91
+ * @TJS-ignore
92
+ * @deprecated use datasetId instead.
91
93
  */
92
94
  set?: string;
93
95
  /**
94
96
  * Column id
95
97
  * @format uuid
98
+ * @TJS-ignore
99
+ * @deprecated use columnId instead.
96
100
  */
97
101
  column?: string;
98
102
  /**
99
- * Dataset formula id. Formula is an entity similar to a column. Formula can be added on the dataset details page.
100
- * @format uuid
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.
101
104
  */
102
105
  formula?: string;
106
+ /**
107
+ * Dataset id
108
+ * @format uuid
109
+ */
110
+ datasetId?: string;
111
+ /**
112
+ * Column id
113
+ * @format uuid
114
+ */
115
+ columnId?: string;
103
116
  /**
104
117
  * D3 format, it is used for "numeric" formatting (https://observablehq.com/@d3/d3-format), for "datetime" formatting (https://d3js.org/d3-time-format).
105
118
  * It can also be used for "hierarchy" formatting but when it's used in the measure slot.
@@ -120,13 +133,27 @@ export interface GenericSlotContent {
120
133
  /**
121
134
  * Dataset id
122
135
  * @format uuid
136
+ * @TJS-ignore
137
+ * @deprecated use datasetId instead.
123
138
  */
124
139
  set: string;
125
140
  /**
126
141
  * Column id
127
142
  * @format uuid
143
+ * @TJS-ignore
144
+ * @deprecated use columnId instead.
128
145
  */
129
146
  column: string;
147
+ /**
148
+ * Dataset id
149
+ * @format uuid
150
+ */
151
+ datasetId?: string;
152
+ /**
153
+ * Column id
154
+ * @format uuid
155
+ */
156
+ columnId?: string;
130
157
  /**
131
158
  * Column subtype
132
159
  */
@@ -254,6 +281,35 @@ export interface GenericSlotContent {
254
281
  * @TJS-ignore
255
282
  */
256
283
  model?: any;
284
+ /**
285
+ * Settings to configure period over period comparison
286
+ */
287
+ periodOverPeriod?: {
288
+ /**
289
+ * Period over period comparison type:
290
+ * 'none' - turned off,
291
+ * 'past' - absolute value comparison to the past,
292
+ * 'change' - percentage change comparison to the past
293
+ */
294
+ type: 'none' | 'past' | 'change';
295
+ /**
296
+ * 0 - period, 1 - year, 2 - quarter, 3 - month, 4 - week, 5 - day... 9 - millisecond
297
+ */
298
+ level: number;
299
+ /**
300
+ * number of periods
301
+ */
302
+ quantity: number;
303
+ /**
304
+ * period to date comparison
305
+ */
306
+ periodToDate: boolean;
307
+ /**
308
+ * category date level to disallow smaller levels. For internal use only
309
+ * @TJS-ignore
310
+ */
311
+ minLevel: number;
312
+ };
257
313
  }
258
314
  export interface NumericSlotContent extends Omit<GenericSlotContent, 'level' | 'lowestLevel' | 'include_nonoccurring' | 'datetimeDisplayMode' | 'weekStart' | 'weekDayNameFormat' | 'monthNameFormat'> {
259
315
  /**
@@ -68,6 +68,5 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
68
68
  private createAndAppendElement;
69
69
  private updateVizItemProperties;
70
70
  updated(changedProperties: PropertyValues): Promise<void>;
71
- private parseAndValidate;
72
71
  protected render(): unknown;
73
72
  }