@gooddata/typings
Advanced tools
Comparing version 2.24.7 to 2.24.8
@@ -1,2 +0,2 @@ | ||
import { CommandFailed, IObjectMeta, IGdcMessageEvent, IGdcMessageEnvelope, CommandFailedData, GdcProductName, IDrillableItemsCommandBody } 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<> | ||
*/ | ||
@@ -63,3 +63,11 @@ interface IInsightExportConfig extends IBaseExportConfig { | ||
*/ | ||
Redo = "redo" | ||
Redo = "redo", | ||
/** | ||
* The command to add or update filter context | ||
*/ | ||
SetFilterContext = "setFilterContext", | ||
/** | ||
* The command to remove filter item from current filter context | ||
*/ | ||
RemoveFilterContext = "removeFilterContext" | ||
} | ||
@@ -108,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" | ||
} | ||
@@ -388,2 +408,42 @@ /** | ||
/** | ||
* Data type of SetFilterContext command | ||
*/ | ||
type SetFilterContextCommandData = IGdcAdMessageEnvelope<GdcAdCommandType.SetFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Add or update the filter context | ||
* | ||
* Contract: | ||
* - if filters are same with filters on the AD filter bar, then update the filters on the filter bar | ||
* and apply the filters to insight | ||
* - if filters are new, then add them 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 | ||
* - Filter is not existed in the dataset | ||
* - Filter is existed but wrong elements input data | ||
* - Exceed the limit number of filter items | ||
*/ | ||
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; | ||
/** | ||
* Data type of removeFilterContext command | ||
*/ | ||
type RemoveFilterContextCommandData = IGdcAdMessageEnvelope<GdcAdCommandType.RemoveFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Remove the filter context | ||
* Contract: | ||
* - if filters are in the filter bar, then remove the filters on the filter bar and update insight | ||
* - if filters are 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; | ||
/** | ||
* List of available commands; this is included in each event sent by AD. | ||
@@ -393,3 +453,3 @@ */ | ||
/** | ||
* Array of avaiable commands types | ||
* Array of available commands types | ||
*/ | ||
@@ -558,2 +618,24 @@ availableCommands: GdcAdCommandType[]; | ||
function isRedoFinishedData(obj: any): obj is RedoFinishedData; | ||
/** | ||
* Data type of event that was emitted after finishing 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 finishing remove 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 finishing change filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type FilterContextChangedData = IGdcAdMessageEnvelope<GdcAdEventType.FilterContextChanged, FilterContextChangedBody>; | ||
} |
@@ -47,2 +47,10 @@ "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"; | ||
})(GdcAdCommandType = EmbeddedAnalyticalDesigner.GdcAdCommandType || (EmbeddedAnalyticalDesigner.GdcAdCommandType = {})); | ||
@@ -93,2 +101,14 @@ /** | ||
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 = {})); | ||
@@ -177,2 +197,20 @@ /** | ||
/** | ||
* 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) === 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) === GdcAdCommandType.RemoveFilterContext; | ||
} | ||
EmbeddedAnalyticalDesigner.isRemoveFilterContextCommandData = isRemoveFilterContextCommandData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link NewInsightInitializedData} | ||
@@ -179,0 +217,0 @@ * |
@@ -0,1 +1,2 @@ | ||
import { AFM } from '../AFM'; | ||
/** | ||
@@ -141,3 +142,3 @@ * List of products using post events | ||
/** | ||
* Addtional information for action payload. Use for internal reducers, sagas | ||
* Additional information for action payload. Use for internal reducers, sagas | ||
*/ | ||
@@ -176,1 +177,23 @@ export interface IPostMessageContextPayload { | ||
} | ||
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; | ||
const isDateFilter: typeof AFM.isDateFilter; | ||
const isRelativeDateFilter: typeof AFM.isRelativeDateFilter; | ||
const isAbsoluteDateFilter: typeof AFM.isAbsoluteDateFilter; | ||
const isAttributeFilter: typeof AFM.isAttributeFilter; | ||
const isPositiveAttributeFilter: typeof AFM.isPositiveAttributeFilter; | ||
const isNegativeAttributeFilter: typeof AFM.isPositiveAttributeFilter; | ||
/** | ||
* The filter context content that is used to exchange the filter context | ||
* between AD, KD embedded page and parent application | ||
*/ | ||
interface IFilterContextContent { | ||
filters: FilterItem[]; | ||
} | ||
} |
"use strict"; | ||
// (C) 2020 GoodData Corporation | ||
exports.__esModule = true; | ||
var AFM_1 = require("../AFM"); | ||
/** | ||
@@ -71,2 +72,11 @@ * List of products using post events | ||
exports.getEventType = getEventType; | ||
var EmbeddedGdc; | ||
(function (EmbeddedGdc) { | ||
EmbeddedGdc.isDateFilter = AFM_1.AFM.isDateFilter; | ||
EmbeddedGdc.isRelativeDateFilter = AFM_1.AFM.isRelativeDateFilter; | ||
EmbeddedGdc.isAbsoluteDateFilter = AFM_1.AFM.isAbsoluteDateFilter; | ||
EmbeddedGdc.isAttributeFilter = AFM_1.AFM.isAttributeFilter; | ||
EmbeddedGdc.isPositiveAttributeFilter = AFM_1.AFM.isPositiveAttributeFilter; | ||
EmbeddedGdc.isNegativeAttributeFilter = AFM_1.AFM.isPositiveAttributeFilter; | ||
})(EmbeddedGdc = exports.EmbeddedGdc || (exports.EmbeddedGdc = {})); | ||
//# sourceMappingURL=common.js.map |
@@ -1,2 +0,2 @@ | ||
import { IGdcMessageEvent, GdcProductName, IGdcMessageEnvelope, IDrillableItemsCommandBody } from './common'; | ||
import { IGdcMessageEvent, GdcProductName, IGdcMessageEnvelope, IDrillableItemsCommandBody, EmbeddedGdc } from './common'; | ||
export declare namespace EmbeddedKpiDashboard { | ||
@@ -50,3 +50,11 @@ /** | ||
*/ | ||
ExportToPdf = "exportToPdf" | ||
ExportToPdf = "exportToPdf", | ||
/** | ||
* The command to add or update filter context | ||
*/ | ||
SetFilterContext = "setFilterContext", | ||
/** | ||
* The command to remove filter item from current filter context | ||
*/ | ||
RemoveFilterContext = "removeFilterContext" | ||
} | ||
@@ -129,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" | ||
} | ||
@@ -249,3 +269,3 @@ /** | ||
*/ | ||
heigth: number; | ||
height: number; | ||
} | ||
@@ -260,2 +280,43 @@ type SetSizeCommand = IGdcKdMessageEvent<GdcKdCommandType.SetSize, ISetSizeCommandBody>; | ||
function isSetSizeCommandData(obj: any): obj is SetSizeCommandData; | ||
/** | ||
* Data type of SetFilterContext command | ||
*/ | ||
type SetFilterContextCommandData = IGdcKdMessageEnvelope<GdcKdCommandType.SetFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Add or update the filter context | ||
* | ||
* Contract: | ||
* - If filters are same with filters on the KD filter bar, then update the filters on the filter bar | ||
* and apply the filters to dashboard | ||
* - In edit mode, if filters are new and then add them to the KD filter bar and apply to dashboard | ||
* - In-case the KD can not apply the filters, a CommandFailed will be posted. The reason could be: | ||
* - Add new filter in view mode | ||
* - Filter is not existed in the dataset | ||
* - Filter is existed but wrong elements input data | ||
* - Exceed the limit number of filter items | ||
*/ | ||
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; | ||
/** | ||
* Data type of removeFilterContext command | ||
*/ | ||
type RemoveFilterContextCommandData = IGdcKdMessageEnvelope<GdcKdCommandType.RemoveFilterContext, EmbeddedGdc.IFilterContextContent>; | ||
/** | ||
* Remove the filter context | ||
* Contract: | ||
* - if filters are in the filter bar, then remove the filters on the filter bar and update insight | ||
* - if filters are not in the filter bar and 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; | ||
interface IKpiWidget { | ||
@@ -343,3 +404,3 @@ type: 'kpi'; | ||
* 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 | ||
@@ -398,7 +459,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. | ||
@@ -408,11 +469,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. | ||
*/ | ||
@@ -471,2 +532,24 @@ type IDashboardDeletedData = IGdcKdMessageEnvelope<GdcKdEventType.DashboardDeleted, IDashboardBody>; | ||
type ExportToPdfFinishedData = IGdcKdMessageEnvelope<GdcKdEventType.ExportedToPdf, ExportToPdfFinishedBody>; | ||
/** | ||
* Data type of event that was emitted after finishing 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 finishing remove 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 finishing change filter context | ||
* | ||
* Note: The main event data was wrapped to application and product data structure | ||
*/ | ||
type FilterContextChangedData = IGdcKdMessageEnvelope<GdcKdEventType.FilterContextChanged, FilterContextChangedBody>; | ||
} |
@@ -48,2 +48,10 @@ "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"; | ||
})(GdcKdCommandType = EmbeddedKpiDashboard.GdcKdCommandType || (EmbeddedKpiDashboard.GdcKdCommandType = {})); | ||
@@ -128,2 +136,14 @@ /** | ||
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 = {})); | ||
@@ -176,2 +196,20 @@ /** | ||
/** | ||
* 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) === 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) === GdcKdCommandType.RemoveFilterContext; | ||
} | ||
EmbeddedKpiDashboard.isRemoveFilterContextCommandData = isRemoveFilterContextCommandData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link IdentifierInsightRef}. | ||
@@ -178,0 +216,0 @@ * |
{ | ||
"name": "@gooddata/typings", | ||
"version": "2.24.7", | ||
"version": "2.24.8", | ||
"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
350492
6027