@gooddata/typings
Advanced tools
Comparing version 2.24.7-lanhuynh-lhq-sd-970-2020-06-22T09-12-19-588Z to 2.24.7-lanhuynh-lhq-sd-970-2020-06-23T10-16-50-965Z
@@ -1,2 +0,2 @@ | ||
import { CommandFailed, IObjectMeta, IGdcMessageEvent, IGdcMessageEnvelope, CommandFailedData, GdcProductName, IDrillableItemsCommandBody, GdcSetFilterContextCommandData, GdcSetFilterContextCommand, GdcRemoveFilterContextCommandData, GdcRemoveFilterContextCommand } from './common'; | ||
import { CommandFailed, IObjectMeta, IGdcMessageEvent, IGdcMessageEnvelope, CommandFailedData, GdcProductName, IDrillableItemsCommandBody, EmbeddedGdc } from './common'; | ||
import { IBaseExportConfig } from '../Export'; | ||
@@ -11,3 +11,3 @@ import { VisualizationObject } from '../VisualizationObject'; | ||
* | ||
* Note: AFM is ommitted on purpose; it should be added by AD itself; create new type using Omit<> | ||
* Note: AFM is omitted on purpose; it should be added by AD itself; create new type using Omit<> | ||
*/ | ||
@@ -64,3 +64,9 @@ interface IInsightExportConfig extends IBaseExportConfig { | ||
Redo = "redo", | ||
/** | ||
* The command to add or update filter context | ||
*/ | ||
SetFilterContext = "setFilterContext", | ||
/** | ||
* The command to remove filter item from current filter context | ||
*/ | ||
RemoveFilterContext = "removeFilterContext" | ||
@@ -110,3 +116,15 @@ } | ||
*/ | ||
Drill = "drill" | ||
Drill = "drill", | ||
/** | ||
* Type represent that the filter context is changed | ||
*/ | ||
FilterContextChanged = "filterContextChanged", | ||
/** | ||
* Type represent that the set filter context action is finished | ||
*/ | ||
SetFilterContextFinished = "setFilterContextFinished", | ||
/** | ||
* Type represent that the remove filter context action is finished | ||
*/ | ||
RemoveFilterContextFinished = "removeFilterContextFinished" | ||
} | ||
@@ -389,7 +407,39 @@ /** | ||
function isRedoCommandData(obj: any): obj is RedoCommandData; | ||
type SetFilterContextCommandData = GdcSetFilterContextCommandData<GdcProductName.ANALYTICAL_DESIGNER>; | ||
type SetFilterContextCommand = GdcSetFilterContextCommand<GdcProductName.ANALYTICAL_DESIGNER>; | ||
/** | ||
* Data type of SetFilterContext command | ||
*/ | ||
type SetFilterContextCommandData = IGdcAdMessageEnvelope<GdcAdCommandType.SetFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Add or update the filter context | ||
* | ||
* Contract: | ||
* - if filters is same with filters on the AD filter bar, then update the filters on the filter bar and apply the filters to insight | ||
* - if filters is new one, then add it to the AD filter bar and apply to insight | ||
* - in-case the AD can not apply the filters, a CommandFailed will be posted. The reason could be | ||
* - add new filter in view mode | ||
* - exceed the limit number of filter items for selected filter values | ||
*/ | ||
type SetFilterContextCommand = IGdcAdMessageEvent<GdcAdCommandType.SetFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link SetFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSetFilterContextCommandData(obj: any): obj is SetFilterContextCommandData; | ||
type RemoveFilterContextCommandData = GdcRemoveFilterContextCommandData<GdcProductName.ANALYTICAL_DESIGNER>; | ||
type RemoveFilterContextCommand = GdcRemoveFilterContextCommand<GdcProductName.ANALYTICAL_DESIGNER>; | ||
/** | ||
* Data type of removeFilterContext command | ||
*/ | ||
type RemoveFilterContextCommandData = IGdcAdMessageEnvelope<GdcAdCommandType.RemoveFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Remove the filter context | ||
* Contract: | ||
* - if filters is in the filter bar, then update the filters on the filter bar and apply the filters to insight | ||
* - if filters is not in the filter bar, then a CommandFailed will be posted. | ||
*/ | ||
type RemoveFilterContextCommand = IGdcAdMessageEvent<GdcAdCommandType.RemoveFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link RemoveFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isRemoveFilterContextCommandData(obj: any): obj is RemoveFilterContextCommandData; | ||
@@ -401,3 +451,3 @@ /** | ||
/** | ||
* Array of avaiable commands types | ||
* Array of available commands types | ||
*/ | ||
@@ -566,2 +616,24 @@ availableCommands: GdcAdCommandType[]; | ||
function isRedoFinishedData(obj: any): obj is RedoFinishedData; | ||
/** | ||
* Data type of event that was emitted after finish set filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type SetFilterContextFinishedData = IGdcAdMessageEnvelope<GdcAdEventType.SetFilterContextFinished, IAvailableCommands>; | ||
/** | ||
* Data type of event that was emitted after finish set filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type RemoveFilterContextFinishedData = IGdcAdMessageEnvelope<GdcAdEventType.RemoveFilterContextFinished, IAvailableCommands>; | ||
/** | ||
* Main data of Filter context changed event | ||
*/ | ||
type FilterContextChangedBody = IAvailableCommands & EmbeddedGdc.IFilterContextContent; | ||
/** | ||
* Data type of event that was emitted after finish set filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type FilterContextChangedData = IGdcAdMessageEnvelope<GdcAdEventType.FilterContextChanged, FilterContextChangedBody>; | ||
} |
@@ -47,3 +47,9 @@ "use strict"; | ||
GdcAdCommandType["Redo"] = "redo"; | ||
/** | ||
* The command to add or update filter context | ||
*/ | ||
GdcAdCommandType["SetFilterContext"] = "setFilterContext"; | ||
/** | ||
* The command to remove filter item from current filter context | ||
*/ | ||
GdcAdCommandType["RemoveFilterContext"] = "removeFilterContext"; | ||
@@ -95,2 +101,14 @@ })(GdcAdCommandType = EmbeddedAnalyticalDesigner.GdcAdCommandType || (EmbeddedAnalyticalDesigner.GdcAdCommandType = {})); | ||
GdcAdEventType["Drill"] = "drill"; | ||
/** | ||
* Type represent that the filter context is changed | ||
*/ | ||
GdcAdEventType["FilterContextChanged"] = "filterContextChanged"; | ||
/** | ||
* Type represent that the set filter context action is finished | ||
*/ | ||
GdcAdEventType["SetFilterContextFinished"] = "setFilterContextFinished"; | ||
/** | ||
* Type represent that the remove filter context action is finished | ||
*/ | ||
GdcAdEventType["RemoveFilterContextFinished"] = "removeFilterContextFinished"; | ||
})(GdcAdEventType = EmbeddedAnalyticalDesigner.GdcAdEventType || (EmbeddedAnalyticalDesigner.GdcAdEventType = {})); | ||
@@ -178,8 +196,18 @@ /** | ||
EmbeddedAnalyticalDesigner.isRedoCommandData = isRedoCommandData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link SetFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSetFilterContextCommandData(obj) { | ||
return common_1.getEventType(obj) === common_1.GdcCommandType.SetFilterContext; | ||
return common_1.getEventType(obj) === GdcAdCommandType.SetFilterContext; | ||
} | ||
EmbeddedAnalyticalDesigner.isSetFilterContextCommandData = isSetFilterContextCommandData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link RemoveFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isRemoveFilterContextCommandData(obj) { | ||
return common_1.getEventType(obj) === common_1.GdcCommandType.RemoveFilterContext; | ||
return common_1.getEventType(obj) === GdcAdCommandType.RemoveFilterContext; | ||
} | ||
@@ -186,0 +214,0 @@ EmbeddedAnalyticalDesigner.isRemoveFilterContextCommandData = isRemoveFilterContextCommandData; |
@@ -15,6 +15,2 @@ import { AFM } from "../AFM"; | ||
} | ||
export declare enum GdcCommandType { | ||
SetFilterContext = "setFilterContext", | ||
RemoveFilterContext = "removeFilterContext" | ||
} | ||
/** | ||
@@ -147,3 +143,3 @@ * Common event types in application | ||
/** | ||
* Addtional information for action payload. Use for internal reducers, sagas | ||
* Additional information for action payload. Use for internal reducers, sagas | ||
*/ | ||
@@ -182,15 +178,17 @@ export interface IPostMessageContextPayload { | ||
} | ||
export declare type IPositiveAttributeFilter = AFM.IPositiveAttributeFilter; | ||
export declare type INegativeAttributeFilter = AFM.INegativeAttributeFilter; | ||
export declare type IAbsoluteDateFilter = AFM.IAbsoluteDateFilter; | ||
export declare type IRelativeDateFilter = AFM.IRelativeDateFilter; | ||
export declare type AttributeFilterItem = IPositiveAttributeFilter | INegativeAttributeFilter; | ||
export declare type DateFilterItem = IAbsoluteDateFilter | IRelativeDateFilter; | ||
export declare type FilterItem = DateFilterItem | AttributeFilterItem; | ||
export interface IFilterContextContent { | ||
filters: FilterItem[]; | ||
export declare namespace EmbeddedGdc { | ||
type IPositiveAttributeFilter = AFM.IPositiveAttributeFilter; | ||
type INegativeAttributeFilter = AFM.INegativeAttributeFilter; | ||
type IAbsoluteDateFilter = AFM.IAbsoluteDateFilter; | ||
type IRelativeDateFilter = AFM.IRelativeDateFilter; | ||
type AttributeFilterItem = IPositiveAttributeFilter | INegativeAttributeFilter; | ||
type DateFilterItem = IAbsoluteDateFilter | IRelativeDateFilter; | ||
type FilterItem = DateFilterItem | AttributeFilterItem; | ||
/** | ||
* The filter context content that used to exchange the filter context | ||
* between AD, KD embedded page and parent application | ||
*/ | ||
interface IFilterContextContent { | ||
filters: FilterItem[]; | ||
} | ||
} | ||
export declare type GdcSetFilterContextCommandData<Product> = IGdcMessageEnvelope<Product, GdcCommandType.SetFilterContext, IFilterContextContent>; | ||
export declare type GdcSetFilterContextCommand<Product> = IGdcMessageEvent<Product, GdcCommandType.SetFilterContext, IFilterContextContent>; | ||
export declare type GdcRemoveFilterContextCommandData<Product> = IGdcMessageEnvelope<Product, GdcCommandType.RemoveFilterContext, IFilterContextContent>; | ||
export declare type GdcRemoveFilterContextCommand<Product> = IGdcMessageEvent<Product, GdcCommandType.RemoveFilterContext, IFilterContextContent>; |
@@ -18,7 +18,2 @@ "use strict"; | ||
})(GdcProductName = exports.GdcProductName || (exports.GdcProductName = {})); | ||
var GdcCommandType; | ||
(function (GdcCommandType) { | ||
GdcCommandType["SetFilterContext"] = "setFilterContext"; | ||
GdcCommandType["RemoveFilterContext"] = "removeFilterContext"; | ||
})(GdcCommandType = exports.GdcCommandType || (exports.GdcCommandType = {})); | ||
/** | ||
@@ -25,0 +20,0 @@ * Common event types in application |
@@ -1,2 +0,2 @@ | ||
import { IGdcMessageEvent, GdcProductName, IGdcMessageEnvelope, IDrillableItemsCommandBody, GdcSetFilterContextCommandData, GdcSetFilterContextCommand, GdcRemoveFilterContextCommandData, GdcRemoveFilterContextCommand } from './common'; | ||
import { IGdcMessageEvent, GdcProductName, IGdcMessageEnvelope, IDrillableItemsCommandBody, EmbeddedGdc } from './common'; | ||
export declare namespace EmbeddedKpiDashboard { | ||
@@ -51,3 +51,9 @@ /** | ||
ExportToPdf = "exportToPdf", | ||
/** | ||
* The command to add or update filter context | ||
*/ | ||
SetFilterContext = "setFilterContext", | ||
/** | ||
* The command to remove filter item from current filter context | ||
*/ | ||
RemoveFilterContext = "removeFilterContext" | ||
@@ -131,3 +137,15 @@ } | ||
*/ | ||
Drill = "drill" | ||
Drill = "drill", | ||
/** | ||
* Type represent that the filter context is changed | ||
*/ | ||
FilterContextChanged = "filterContextChanged", | ||
/** | ||
* Type represent that the set filter context action is finished | ||
*/ | ||
SetFilterContextFinished = "setFilterContextFinished", | ||
/** | ||
* Type represent that the remove filter context action is finished | ||
*/ | ||
RemoveFilterContextFinished = "removeFilterContextFinished" | ||
} | ||
@@ -251,3 +269,3 @@ /** | ||
*/ | ||
heigth: number; | ||
height: number; | ||
} | ||
@@ -262,7 +280,38 @@ type SetSizeCommand = IGdcKdMessageEvent<GdcKdCommandType.SetSize, ISetSizeCommandBody>; | ||
function isSetSizeCommandData(obj: any): obj is SetSizeCommandData; | ||
type SetFilterContextCommand = GdcSetFilterContextCommand<GdcProductName.KPI_DASHBOARD>; | ||
type SetFilterContextCommandData = GdcSetFilterContextCommandData<GdcProductName.KPI_DASHBOARD>; | ||
/** | ||
* Data type of SetFilterContext command | ||
*/ | ||
type SetFilterContextCommandData = IGdcKdMessageEnvelope<GdcKdCommandType.SetFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Add or update the filter context | ||
* | ||
* Contract: | ||
* - if filters is same with filters on the KD filter bar, then update the filters on the filter bar and apply the filters to dashboard | ||
* - if filters is new one, then add it to the KD filter bar and apply to dashboard | ||
* - in-case the AD can not apply the filters, a CommandFailed will be posted. The reason could be: | ||
* - exceed the limit number of filter items for selected filter values | ||
*/ | ||
type SetFilterContextCommand = IGdcKdMessageEvent<GdcKdCommandType.SetFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link SetFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSetFilterContextCommandData(obj: any): obj is SetFilterContextCommandData; | ||
type RemoveFilterContextCommandData = GdcRemoveFilterContextCommandData<GdcProductName.KPI_DASHBOARD>; | ||
type RemoveFilterContextCommand = GdcRemoveFilterContextCommand<GdcProductName.KPI_DASHBOARD>; | ||
/** | ||
* Data type of removeFilterContext command | ||
*/ | ||
type RemoveFilterContextCommandData = IGdcKdMessageEnvelope<GdcKdCommandType.RemoveFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Remove the filter context | ||
* Contract: | ||
* - if filters is in the filter bar, then update the filters on the filter bar and apply the filters to insight | ||
* - if filters is not in the filter bar, then a CommandFailed will be posted. | ||
*/ | ||
type RemoveFilterContextCommand = IGdcKdMessageEvent<GdcKdCommandType.RemoveFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link RemoveFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isRemoveFilterContextCommandData(obj: any): obj is RemoveFilterContextCommandData; | ||
@@ -351,3 +400,3 @@ interface IKpiWidget { | ||
* exporting | ||
* - if KD shwows dashboard in edit mode or not not showing any dashboard, CommandFailed will | ||
* - if KD shows dashboard in edit mode or not not showing any dashboard, CommandFailed will | ||
* be posted | ||
@@ -406,7 +455,7 @@ */ | ||
/** | ||
* Data type of event that was emited when a dashboard has been created and saved. | ||
* Data type of event that was emitted when a dashboard has been created and saved. | ||
*/ | ||
type IDashboardCreatedData = IGdcKdMessageEnvelope<GdcKdEventType.DashboardCreated, IDashboardBody>; | ||
/** | ||
* Data type of event that was emited when the content is fully loaded, | ||
* Data type of event that was emitted when the content is fully loaded, | ||
* and the user has permissions to access the dashboard. | ||
@@ -416,11 +465,11 @@ */ | ||
/** | ||
* Data type of event that was emited when the existing dashboard has been updated. | ||
* Data type of event that was emitted when the existing dashboard has been updated. | ||
*/ | ||
type IDashboardUpdatedData = IGdcKdMessageEnvelope<GdcKdEventType.DashboardUpdated, IDashboardBody>; | ||
/** | ||
* Data type of event that was emited when the dashboard has been saved. | ||
* Data type of event that was emitted when the dashboard has been saved. | ||
*/ | ||
type IDashboardSavedData = IGdcKdMessageEnvelope<GdcKdEventType.DashboardSaved, IDashboardBody>; | ||
/** | ||
* Data type of event that was emited when the dashboard has been deleted. | ||
* Data type of event that was emitted when the dashboard has been deleted. | ||
*/ | ||
@@ -479,2 +528,24 @@ type IDashboardDeletedData = IGdcKdMessageEnvelope<GdcKdEventType.DashboardDeleted, IDashboardBody>; | ||
type ExportToPdfFinishedData = IGdcKdMessageEnvelope<GdcKdEventType.ExportedToPdf, ExportToPdfFinishedBody>; | ||
/** | ||
* Data type of event that was emitted after finish set filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type SetFilterContextFinishedData = IGdcKdMessageEnvelope<GdcKdEventType.SetFilterContextFinished, IKdAvailableCommands>; | ||
/** | ||
* Data type of event that was emitted after finish set filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type RemoveFilterContextFinishedData = IGdcKdMessageEnvelope<GdcKdEventType.RemoveFilterContextFinished, IKdAvailableCommands>; | ||
/** | ||
* Main data of Filter context changed event | ||
*/ | ||
type FilterContextChangedBody = IKdAvailableCommands & EmbeddedGdc.IFilterContextContent; | ||
/** | ||
* Data type of event that was emitted after finish set filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type FilterContextChangedData = IGdcKdMessageEnvelope<GdcKdEventType.FilterContextChanged, FilterContextChangedBody>; | ||
} |
@@ -48,3 +48,9 @@ "use strict"; | ||
GdcKdCommandType["ExportToPdf"] = "exportToPdf"; | ||
/** | ||
* The command to add or update filter context | ||
*/ | ||
GdcKdCommandType["SetFilterContext"] = "setFilterContext"; | ||
/** | ||
* The command to remove filter item from current filter context | ||
*/ | ||
GdcKdCommandType["RemoveFilterContext"] = "removeFilterContext"; | ||
@@ -130,2 +136,14 @@ })(GdcKdCommandType = EmbeddedKpiDashboard.GdcKdCommandType || (EmbeddedKpiDashboard.GdcKdCommandType = {})); | ||
GdcKdEventType["Drill"] = "drill"; | ||
/** | ||
* Type represent that the filter context is changed | ||
*/ | ||
GdcKdEventType["FilterContextChanged"] = "filterContextChanged"; | ||
/** | ||
* Type represent that the set filter context action is finished | ||
*/ | ||
GdcKdEventType["SetFilterContextFinished"] = "setFilterContextFinished"; | ||
/** | ||
* Type represent that the remove filter context action is finished | ||
*/ | ||
GdcKdEventType["RemoveFilterContextFinished"] = "removeFilterContextFinished"; | ||
})(GdcKdEventType = EmbeddedKpiDashboard.GdcKdEventType || (EmbeddedKpiDashboard.GdcKdEventType = {})); | ||
@@ -177,8 +195,18 @@ /** | ||
EmbeddedKpiDashboard.isSetSizeCommandData = isSetSizeCommandData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link SetFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSetFilterContextCommandData(obj) { | ||
return common_1.getEventType(obj) === common_1.GdcCommandType.SetFilterContext; | ||
return common_1.getEventType(obj) === GdcKdCommandType.SetFilterContext; | ||
} | ||
EmbeddedKpiDashboard.isSetFilterContextCommandData = isSetFilterContextCommandData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link RemoveFilterContextCommand} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isRemoveFilterContextCommandData(obj) { | ||
return common_1.getEventType(obj) === common_1.GdcCommandType.RemoveFilterContext; | ||
return common_1.getEventType(obj) === GdcKdCommandType.RemoveFilterContext; | ||
} | ||
@@ -185,0 +213,0 @@ EmbeddedKpiDashboard.isRemoveFilterContextCommandData = isRemoveFilterContextCommandData; |
{ | ||
"name": "@gooddata/typings", | ||
"version": "2.24.7-lanhuynh-lhq-sd-970-2020-06-22T09-12-19-588Z", | ||
"version": "2.24.7-lanhuynh-lhq-sd-970-2020-06-23T10-16-50-965Z", | ||
"description": "TypeScript definition files for GoodData platform", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
349031
6005