@vizzly/services 0.12.6 → 0.12.7-dev-6bb80acabd3d88f49c6f9b94167a5bd323b113d5
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/dist/index.js +1 -1
- package/dist/shared-logic/src/ComponentInterface/types.d.ts +1 -0
- package/dist/shared-logic/src/CustomField/Conditional/index.d.ts +8 -0
- package/dist/shared-logic/src/CustomField/CustomField.d.ts +2 -1
- package/dist/shared-logic/src/CustomField/index.d.ts +1 -0
- package/dist/shared-logic/src/CustomField/types.d.ts +8 -2
- package/dist/shared-logic/src/DataSet/types.d.ts +1 -0
- package/dist/shared-logic/src/QueryEngineConfig/types.d.ts +1 -1
- package/dist/shared-logic/src/Theme/types.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataSet } from '../../DataSet/types';
|
|
2
|
+
import { Query } from '../../Query/types';
|
|
3
|
+
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
4
|
+
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
5
|
+
import { ConditionalField } from '../types';
|
|
6
|
+
import * as Filter from '../../Filter';
|
|
7
|
+
export declare const init: (publicName: string, fieldId: string, func: string, rule: QueryAttributes.Filter[][], queryEngineConfig: QueryEngineConfig) => ConditionalField;
|
|
8
|
+
export declare const build: (field: ConditionalField, queryEngineConfig: QueryEngineConfig, dataSet: DataSet) => Query['measure'][number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSet as DataSetType } from '../DataSet/types';
|
|
2
|
-
import { AggregateMathField, CustomField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
|
|
2
|
+
import { AggregateMathField, ConditionalField, CustomField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
|
|
3
3
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
4
4
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
5
5
|
import { Query } from '../Query/types';
|
|
@@ -10,6 +10,7 @@ export declare const isRoundedNumberField: (field: DataSetType.Field) => field i
|
|
|
10
10
|
export declare const isAggregateMathField: (field: DataSetType.Field) => field is AggregateMathField;
|
|
11
11
|
export declare const isPercentageField: (field: DataSetType.Field) => field is PercentageField;
|
|
12
12
|
export declare const isRules: (field: DataSetType.Field) => field is RulesField;
|
|
13
|
+
export declare const isConditional: (field: DataSetType.Field) => field is ConditionalField;
|
|
13
14
|
export declare const isDateCalculation: (field: DataSetType.Field) => field is RulesField;
|
|
14
15
|
export declare const getCustomFieldCategory: (field: CustomField) => CustomFieldCategory;
|
|
15
16
|
export declare const isCustomField: (field: DataSetType.Field) => field is CustomField;
|
|
@@ -6,6 +6,7 @@ export declare type PercentageField = BaseCustomField & Percentage;
|
|
|
6
6
|
export declare type RoundedNumberField = BaseCustomField & RoundedNumber;
|
|
7
7
|
export declare type DateCalculationField = BaseCustomField & DateCalculation;
|
|
8
8
|
export declare type AggregateMathField = BaseCustomField & AggregateMath;
|
|
9
|
+
export declare type ConditionalField = BaseCustomField & Conditional;
|
|
9
10
|
export declare type SimpleMathField = BaseCustomField & SimpleMath & {
|
|
10
11
|
dataType: 'number';
|
|
11
12
|
};
|
|
@@ -13,7 +14,12 @@ export interface RulesField extends BaseField {
|
|
|
13
14
|
rules: Rules[];
|
|
14
15
|
dataType: 'string';
|
|
15
16
|
}
|
|
16
|
-
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField;
|
|
17
|
+
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField;
|
|
18
|
+
export declare type Conditional = {
|
|
19
|
+
fieldId: string;
|
|
20
|
+
function: string;
|
|
21
|
+
rule: QueryAttributes.Filter[][];
|
|
22
|
+
};
|
|
17
23
|
export declare type Percentage = {
|
|
18
24
|
version: 2;
|
|
19
25
|
denominatorFieldId: string;
|
|
@@ -60,6 +66,6 @@ export declare type DateCalculation = {
|
|
|
60
66
|
dateCalculationFunction: 'seconds_between' | 'minutes_between' | 'hours_between' | 'days_between';
|
|
61
67
|
};
|
|
62
68
|
export declare type MathOperator = '*' | '-' | '/' | '+';
|
|
63
|
-
export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation';
|
|
69
|
+
export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation' | 'conditional';
|
|
64
70
|
export declare type MaybeOldCustomField = CustomField;
|
|
65
71
|
export {};
|
|
@@ -25,6 +25,7 @@ export declare type FieldFilterOptions = {
|
|
|
25
25
|
removeSimpleMaths?: boolean;
|
|
26
26
|
removeAggregateMaths?: boolean;
|
|
27
27
|
removeDateCalculations?: boolean;
|
|
28
|
+
removeConditional?: boolean;
|
|
28
29
|
onlyDimensions?: boolean;
|
|
29
30
|
onlyMeasures?: boolean;
|
|
30
31
|
forComponent?: ComponentType;
|
|
@@ -2,7 +2,7 @@ import { SupportedAggregates } from '../Aggregate';
|
|
|
2
2
|
import { SupportedTimeTruncFunctions } from '../TimeDimension/types';
|
|
3
3
|
import { SupportedOperators } from '../QueryAttributes/types';
|
|
4
4
|
import { SupportedTransformationFunctions } from '../Functions/types';
|
|
5
|
-
export declare type SupportedFeature = 'subquery' | 'simpleMaths' | 'aggregateMaths' | 'switchField' | 'configManagerUi' | 'roundedNumbers' | 'sqlDefinedDataSet' | 'encryptedDashboards' | 'sqlViews' | 'dateMaths';
|
|
5
|
+
export declare type SupportedFeature = 'subquery' | 'simpleMaths' | 'aggregateMaths' | 'switchField' | 'configManagerUi' | 'roundedNumbers' | 'sqlDefinedDataSet' | 'encryptedDashboards' | 'sqlViews' | 'dateMaths' | 'conditional';
|
|
6
6
|
export declare type QueryEngineConfig = {
|
|
7
7
|
origin?: 'in-browser' | 'query-engine' | 'custom';
|
|
8
8
|
supportedFeatures: SupportedFeature[];
|
|
@@ -209,7 +209,7 @@ export declare namespace VizzlyTheming {
|
|
|
209
209
|
type ModalOptions = {
|
|
210
210
|
disableOutsideClick?: boolean;
|
|
211
211
|
/** By default this property is set to "outside" */
|
|
212
|
-
closeButton?: 'none' | 'outside';
|
|
212
|
+
closeButton?: 'none' | 'outside' | 'inside';
|
|
213
213
|
showTitle?: {
|
|
214
214
|
editor?: boolean;
|
|
215
215
|
library?: boolean;
|
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.
|
|
29
|
+
"version": "0.12.7-dev-6bb80acabd3d88f49c6f9b94167a5bd323b113d5",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vizzly/api-client": "
|
|
31
|
+
"@vizzly/api-client": "0.0.34",
|
|
32
32
|
"@vizzly/joi": "^17.11.0",
|
|
33
33
|
"lodash": "^4.17.21"
|
|
34
34
|
}
|