@vizzly/services 0.12.4 → 0.12.5-dev-a18496d02899bae936c058e82e04bdbcaa118ea4

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.
@@ -9,6 +9,7 @@ export declare const allowedDataTypesForFilter: (type: AdditionalFilter['type'])
9
9
  export declare const dump: (hydrated: AdditionalFilter) => AdditionalFilter;
10
10
  export declare const load: (dumped: AdditionalFilter, componentInterfaceConfig?: import("../ComponentInterface/types").ComponentInterfaceConfig | undefined) => AdditionalFilter;
11
11
  export declare const toQueryAttributesFilter: (dataSet: DataSet, filter: AdditionalFilter, customTimeRangeFuncs: TimeRangeOptions) => QueryAttributes.Filter[];
12
+ export declare const toRelativeQueryAttributesFilters: (filters: DateAndTimeFilter | DateFilter, startDate?: Date) => QueryAttributes.Filter[];
12
13
  export declare const fromFilterConfig: (filterConfig: FilterConfig, dataSet: DataSet, timeRangeOptions: TimeRangeOptions) => QueryAttributes.Filter[];
13
14
  export declare const hasActiveFilter: (additionalFilters: AdditionalFilter[]) => boolean;
14
15
  export declare const getTitle: (additionalFilter: AdditionalFilter, dataSets: DataSet[], textOverride?: TextOverride) => string;
@@ -38,6 +38,10 @@ declare type BaseAdditionalFilter<T extends AdditionalFilterType> = {
38
38
  }>;
39
39
  hidden?: boolean;
40
40
  };
41
+ export declare type RelativeRangeValue = {
42
+ type: 'relativeRange';
43
+ filters: Array<QueryAttributes.Filter>[];
44
+ };
41
45
  declare type FixedRangeValue = {
42
46
  type: 'fixedRange';
43
47
  before: Date | null;
@@ -48,11 +52,11 @@ declare type RelativeValue = {
48
52
  value: string;
49
53
  };
50
54
  export declare type DateFilter = BaseAdditionalFilter<typeof FilterType.DATE_FILTER> & {
51
- value: FixedRangeValue | RelativeValue | null;
55
+ value: FixedRangeValue | RelativeValue | RelativeRangeValue | null;
52
56
  inclusiveDate?: boolean;
53
57
  };
54
58
  export declare type DateAndTimeFilter = BaseAdditionalFilter<typeof FilterType.DATE_AND_TIME_FILTER> & {
55
- value: FixedRangeValue | RelativeValue | null;
59
+ value: FixedRangeValue | RelativeValue | RelativeRangeValue | null;
56
60
  inclusiveDate?: boolean;
57
61
  };
58
62
  /**
@@ -1,3 +1,5 @@
1
+ import { Field } from '../AdditionalFilter/types';
2
+ import { QueryAttributes } from '../QueryAttributes/types';
1
3
  import { TextOverride } from '../Translations/types';
2
4
  import { RelativeDate } from './types';
3
5
  import Joi from '@vizzly/joi';
@@ -44,4 +46,5 @@ export declare function isRelative(value: any): any;
44
46
  export declare function isRelativeDateDefined(value: RelativeDate): boolean;
45
47
  export declare const init: () => RelativeDate;
46
48
  export declare const calculateRelativeDate: (relativeDate: RelativeDate, startDate?: Date) => Date;
49
+ export declare const buildRelativeRange: (relativeFilters: QueryAttributes.Filter[][], appliesToFields?: Field[]) => QueryAttributes.Filter[][];
47
50
  export {};
@@ -179,10 +179,24 @@ export declare namespace VizzlyTheming {
179
179
  interface Calendar {
180
180
  title?: FontStyle;
181
181
  selected?: CalendarState;
182
+ unselected?: CalendarState & {
183
+ '&:hover'?: CalendarState;
184
+ };
185
+ arrows?: {
186
+ background?: CSSProperties['background'];
187
+ fill?: CSSProperties['fill'];
188
+ borderRadius?: string;
189
+ border?: string;
190
+ '&:hover'?: {
191
+ background?: CSSProperties['background'];
192
+ border?: string;
193
+ };
194
+ };
182
195
  }
183
196
  interface CalendarState {
184
197
  color?: CSSProperties['color'];
185
198
  background?: CSSProperties['background'];
199
+ border?: CSSProperties['border'];
186
200
  }
187
201
  type Modal = {
188
202
  overlay?: Overlay;
@@ -1,33 +1,39 @@
1
1
  import { TranslationInterpolation } from './types';
2
2
  export declare type VizzlyTranslations = {
3
3
  /**
4
- * @default 'Start Date'
4
+ * @default 'Remove [[label]]'
5
+ *
6
+ * @params
7
+ * Fixed Variables: [[label]]
5
8
  *
6
9
  * @returns
7
10
  * String containing the translation.
8
11
  */
9
- start_date: string;
12
+ remove_pill: string;
10
13
  /**
11
- * @default 'Time'
14
+ * @default '[[numberOfPills]] more'
15
+ *
16
+ * @params
17
+ * Fixed Variables: [[numberOfPills]]
12
18
  *
13
19
  * @returns
14
20
  * String containing the translation.
15
21
  */
16
- time: string;
22
+ more_pill: string;
17
23
  /**
18
- * @default 'End Date'
24
+ * @default 'Fixed'
19
25
  *
20
26
  * @returns
21
27
  * String containing the translation.
22
28
  */
23
- end_date: string;
29
+ 'date_picker.fixed': string;
24
30
  /**
25
- * @default 'Clear Dates'
31
+ * @default 'Relative'
26
32
  *
27
33
  * @returns
28
34
  * String containing the translation.
29
35
  */
30
- clear_date: string;
36
+ 'date_picker.relative': string;
31
37
  /**
32
38
  * @default 'Clear'
33
39
  *
@@ -57,36 +63,64 @@ export declare type VizzlyTranslations = {
57
63
  */
58
64
  custom_range: string;
59
65
  /**
60
- * @default 'Function'
66
+ * @default 'Start Date'
61
67
  *
62
68
  * @returns
63
69
  * String containing the translation.
64
70
  */
65
- function: string;
71
+ start_date: string;
66
72
  /**
67
- * @default 'Remove'
73
+ * @default 'Time'
68
74
  *
69
75
  * @returns
70
76
  * String containing the translation.
71
77
  */
72
- remove: string;
78
+ time: string;
73
79
  /**
74
- * @default 'No Options'
80
+ * @default 'End Date'
75
81
  *
76
82
  * @returns
77
83
  * String containing the translation.
78
84
  */
79
- no_options: string;
85
+ end_date: string;
80
86
  /**
81
- * @default 'Remove [[label]]'
87
+ * @default 'Clear Dates'
88
+ *
89
+ * @returns
90
+ * String containing the translation.
91
+ */
92
+ clear_date: string;
93
+ /**
94
+ * @default '[[value]] [[duration]] in [[timeframe]]'
82
95
  *
83
96
  * @params
84
- * Fixed Variables: [[label]]
97
+ * Fixed Variables: [[value]]
85
98
  *
86
99
  * @returns
87
100
  * String containing the translation.
88
101
  */
89
- remove_pill: string;
102
+ 'date_picker.relative_date': string;
103
+ /**
104
+ * @default 'Function'
105
+ *
106
+ * @returns
107
+ * String containing the translation.
108
+ */
109
+ function: string;
110
+ /**
111
+ * @default 'Remove'
112
+ *
113
+ * @returns
114
+ * String containing the translation.
115
+ */
116
+ remove: string;
117
+ /**
118
+ * @default 'No Options'
119
+ *
120
+ * @returns
121
+ * String containing the translation.
122
+ */
123
+ no_options: string;
90
124
  /**
91
125
  * @default 'Page'
92
126
  *
@@ -731,16 +765,6 @@ export declare type VizzlyTranslations = {
731
765
  * String containing the translation.
732
766
  */
733
767
  format: string;
734
- /**
735
- * @default '[[value]] [[duration]] in [[timeframe]]'
736
- *
737
- * @params
738
- * Fixed Variables: [[value]]
739
- *
740
- * @returns
741
- * String containing the translation.
742
- */
743
- 'date_picker.relative_date': string;
744
768
  /**
745
769
  * @default 'Relative Value'
746
770
  *
package/package.json CHANGED
@@ -26,9 +26,9 @@
26
26
  "fix-type-alias": "tsc-alias -p tsconfig.json",
27
27
  "prepare": "yarn build"
28
28
  },
29
- "version": "0.12.4",
29
+ "version": "0.12.5-dev-a18496d02899bae936c058e82e04bdbcaa118ea4",
30
30
  "dependencies": {
31
- "@vizzly/api-client": "^0.0.29",
31
+ "@vizzly/api-client": "^0.0.33",
32
32
  "@vizzly/joi": "^17.11.0",
33
33
  "lodash": "^4.17.21"
34
34
  }