@gooddata/typings
Advanced tools
Comparing version 2.24.1-alpha-khanh.le-kl-SD-937-2020-05-06T07-36-22-546Z to 2.24.1-alpha-khanh.le-kl-SD-937-2020-05-07T08-14-37-670Z
@@ -1,2 +0,2 @@ | ||
import { CommandFailed, IObjectMeta, IGdcMessageEvent, IGdcMessageEnvelope, CommandFailedData, GdcProductName, IDrillableItemsCommandBody } from './common'; | ||
import { CommandFailed, IObjectMeta, IGdcMessageEvent, IGdcMessageEnvelope, CommandFailedData, GdcProductName, ISimpleDrillableItemsCommandBody } from './common'; | ||
import { IBaseExportConfig } from '../Export'; | ||
@@ -118,2 +118,11 @@ import { VisualizationObject } from '../VisualizationObject'; | ||
/** | ||
* The main data type for furture processing of drillable items command | ||
*/ | ||
interface IDrillableItemsCommandBody extends ISimpleDrillableItemsCommandBody { | ||
/** | ||
* Master measures items - In-case, a derived measure is composed from a master measure. | ||
*/ | ||
composedFrom?: ISimpleDrillableItemsCommandBody; | ||
} | ||
/** | ||
* Set drillable items. | ||
@@ -120,0 +129,0 @@ * |
@@ -166,10 +166,1 @@ /** | ||
} | ||
/** | ||
* The main data type for furture processing of drillable items command | ||
*/ | ||
export interface IDrillableItemsCommandBody extends ISimpleDrillableItemsCommandBody { | ||
/** | ||
* Master measures items - In-case, a derived measure is composed from a master measure. | ||
*/ | ||
composedFrom?: ISimpleDrillableItemsCommandBody; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { IGdcMessageEvent, GdcProductName, IGdcMessageEnvelope, CommandFailed, IDrillableItemsCommandBody, IObjectMeta, GdcErrorType, CommandFailedData } from './common'; | ||
import { IGdcMessageEvent, GdcProductName, IGdcMessageEnvelope, ISimpleDrillableItemsCommandBody } from './common'; | ||
export declare namespace EmbeddedKpiDashboard { | ||
@@ -32,14 +32,2 @@ /** | ||
/** | ||
* The command export a dashboard. | ||
*/ | ||
Export = "exportDashboard", | ||
/** | ||
* The command add filter to dashboard. | ||
*/ | ||
AddFilter = "addFilter", | ||
/** | ||
* The command add widget to dashboard. | ||
*/ | ||
AddWidget = "addWidget", | ||
/** | ||
* The command set drillable items. | ||
@@ -109,16 +97,2 @@ */ | ||
/** | ||
* Type represent that the widget is added to dashboard. | ||
* | ||
*/ | ||
WidgetAdded = "widgetAdded", | ||
/** | ||
* Type represent that the filter is added to dashboard. | ||
* | ||
*/ | ||
FilterAdded = "filterAdded", | ||
/** | ||
* Type represent that the export action is finished. | ||
*/ | ||
ExportFinished = "exportDashboardFinished", | ||
/** | ||
* Type represent that the platform is down. | ||
@@ -138,19 +112,2 @@ */ | ||
/** | ||
* This event will be emitted if KD runs into errors while processing the posted command. | ||
* | ||
* @remarks see {@link GdcErrorType} for types of errors that may fly | ||
*/ | ||
type KdCommandFailed = CommandFailed<GdcErrorType>; | ||
/** | ||
* Base type for the data of error events sent by AD | ||
* in case command processing comes to an expected or unexpected halt. | ||
*/ | ||
type KdCommandFailedData = CommandFailedData<GdcProductName.KPI_DASHBOARD>; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link KdCommandFailedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isAdCommandFailedData(obj: any): obj is KdCommandFailedData; | ||
/** | ||
* Save command body sent by outer application | ||
@@ -169,5 +126,5 @@ */ | ||
* | ||
* - if currently edited dashboard IS NOT eligible for save (empty, in-error), then KdCommandFailed event | ||
* - if currently edited dashboard IS NOT eligible for save (empty, in-error), then CommandFailed event | ||
* will be posted | ||
* - if the specified title is invalid / does not match title validation rules, then KdCommandFailed event | ||
* - if the specified title is invalid / does not match title validation rules, then CommandFailed event | ||
* will be posted | ||
@@ -192,6 +149,2 @@ * - otherwise dashboard WILL be saved with the title as specified in the body and the DashboardSaved event | ||
/** | ||
* It's main content is empty. | ||
*/ | ||
type CancelEditBody = IKdAvailableCommands; | ||
/** | ||
* Cancels editing and switches dashboard to view mode. | ||
@@ -204,10 +157,10 @@ * | ||
* - if KD is currently viewing dashboard, SwitchedToView will be posted back immediately | ||
* - if KD is not currently showing any dashboard, KdCommandFailed is posted | ||
* - if KD is not currently showing any dashboard, CommandFailed is posted | ||
* | ||
* @remarks use {@link CancelEditCommand} factory function to instantiate | ||
*/ | ||
type CancelEditCommand = IKdMessageEvent<GdcKdCommandType.CancelEdit, CancelEditBody>; | ||
type CancelEditData = IKdGdcMessageEnvelope<GdcKdCommandType.CancelEdit, CancelEditBody>; | ||
type CancelEditCommand = IKdMessageEvent<GdcKdCommandType.CancelEdit, null>; | ||
type CancelEditData = IKdGdcMessageEnvelope<GdcKdCommandType.CancelEdit, null>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link CancelEdit}. | ||
* Type-guard checking whether object is an instance of {@link CancelEditData}. | ||
* | ||
@@ -218,6 +171,2 @@ * @param obj - object to test | ||
/** | ||
* It's main content is empty. | ||
*/ | ||
type DeleteDashboardBody = IKdAvailableCommands; | ||
/** | ||
* Deleted currently edited dashboard. | ||
@@ -230,3 +179,3 @@ * | ||
* | ||
* - if KD is currently viewing dashboard or not not showing any dashboard, KdCommandFailed will | ||
* - if KD is currently viewing dashboard or not not showing any dashboard, CommandFailed will | ||
* be posted | ||
@@ -236,15 +185,5 @@ * | ||
*/ | ||
type DeleteDashboardCommand = IKdMessageEvent<GdcKdCommandType.Delete, DeleteDashboardBody>; | ||
type DeleteDashboardCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.Delete, DeleteDashboardBody>; | ||
type DeleteDashboardCommand = IKdMessageEvent<GdcKdCommandType.Delete, null>; | ||
type DeleteDashboardCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.Delete, null>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link DeleteDashboardData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDeleteDashboardCommandData(obj: any): obj is DeleteDashboardCommandData; | ||
/** | ||
* It's main content is empty. | ||
*/ | ||
type SwitchToEditBody = IKdAvailableCommands; | ||
/** | ||
* Switches current dashboard to edit mode. | ||
@@ -258,10 +197,10 @@ * | ||
* from view mode | ||
* - if no dashboard currently displayed, posts KdCommandFailed | ||
* - if no dashboard currently displayed, posts CommandFailed | ||
* | ||
* @remarks use {@link SwitchToEditCommand} factory function to instantiate | ||
*/ | ||
type SwitchToEditCommand = IKdMessageEvent<GdcKdCommandType.SwitchToEdit, SwitchToEditBody>; | ||
type SwitchToEditCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.SwitchToEdit, SwitchToEditBody>; | ||
type SwitchToEditCommand = IKdMessageEvent<GdcKdCommandType.SwitchToEdit, null>; | ||
type SwitchToEditCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.SwitchToEdit, null>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isSwitchToEditCommandData}. | ||
* Type-guard checking whether object is an instance of {@link SwitchToEditCommandData}. | ||
* | ||
@@ -272,94 +211,11 @@ * @param obj - object to test | ||
/** | ||
* It's main content is empty. | ||
* The main data type for furture processing of drillable items command | ||
*/ | ||
type ExportBody = IKdAvailableCommands; | ||
interface IKdDrillableItemsCommandBody extends ISimpleDrillableItemsCommandBody { | ||
/** | ||
* Master measures items - In-case, a derived measure is composed from a master measure. | ||
*/ | ||
composedFrom?: ISimpleDrillableItemsCommandBody; | ||
} | ||
/** | ||
* Exports dashboard to PDF. | ||
* | ||
* Contract: | ||
* | ||
* - if KD shows dashboard in view mode, will export dashboard to PDF and post ExportFinished once ready for | ||
* exporting | ||
* - if KD shwows dashboard in edit mode or not not showing any dashboard, KdCommandFailed will | ||
* be posted | ||
* @remarks use {@link ExportCommand} factory function to instantiate | ||
*/ | ||
type ExportCommand = IKdMessageEvent<GdcKdCommandType.Export, ExportBody>; | ||
type ExportCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.SwitchToEdit, SwitchToEditBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isExportCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isExportCommandData(obj: any): obj is ExportCommandData; | ||
type IAddfilterBody = IKdAvailableCommands; | ||
/** | ||
* Adds new attribute filter to filter bar and starts the filter customization flow. | ||
* | ||
* Contract: | ||
* | ||
* - if KD is currently editing a dashboard, adds new attribute filter, starts customization flow; FilterAdded | ||
* will be posted right after customization starts | ||
* | ||
* - if KD is currently in view mode or does not show any dashboard, will post KdCommandFailed | ||
* | ||
* @remarks use {@link AddFilterCommand} factory function to instantiate | ||
*/ | ||
type AddFilterCommand = IKdMessageEvent<GdcKdCommandType.AddFilter, IAddfilterBody>; | ||
type AddFilterCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.AddFilter, IAddfilterBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isAddFilterCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isAddFilterCommandData(obj: any): obj is AddFilterCommandData; | ||
type KpiWidget = { | ||
type: 'kpi'; | ||
}; | ||
type InsightRef = { | ||
identifier: string; | ||
} | { | ||
uri: string; | ||
}; | ||
type InsightWidget = { | ||
type: 'insight'; | ||
ref: InsightRef; | ||
}; | ||
type AddWidgetBody = { | ||
payload: { | ||
widget: KpiWidget | InsightWidget; | ||
}; | ||
}; | ||
/** | ||
* Adds new widget onto dashboard. New row will be created on top of the dashboard, the widget | ||
* will be placed into its first column. | ||
* | ||
* It is currently possible to add either a KPI or an Insight. When adding either of these, KD will | ||
* scroll to top so that the newly added widget is visible. | ||
* | ||
* For KPI, the KD will start the KPI customization flow right after the KPI is placed. | ||
* Insights are placed without need for further customization | ||
* | ||
* Contract: | ||
* | ||
* - if KD is currently editing a dashboard, then depending on widget type: | ||
* - KPI is added to dashboard, customization flow is started, WidgetAdded will be posted | ||
* - Insight is added to dashboard, WidgetAdded will be posted | ||
* | ||
* - if insight reference included in command payload does not refer to a valid insight, KdCommandFailed | ||
* will be posted | ||
* | ||
* - if KD is in view mode or not showing any dashboard, then KdCommandFailed will be posted | ||
* | ||
* @remarks use {@link AddWidgetCommand} to create instances of AddWidget | ||
*/ | ||
type AddWidgetCommand = IKdMessageEvent<GdcKdCommandType.AddWidget, AddWidgetBody>; | ||
type AddWidgetCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.AddWidget, AddWidgetBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isAddWidgetCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isAddWidgetCommandData(obj: any): obj is AddWidgetCommandData; | ||
/** | ||
* Set drillable items. | ||
@@ -371,3 +227,3 @@ * | ||
*/ | ||
type DrillableItemsCommand = IKdMessageEvent<GdcKdCommandType.DrillableItems, IDrillableItemsCommandBody>; | ||
type DrillableItemsCommand = IKdMessageEvent<GdcKdCommandType.DrillableItems, IKdDrillableItemsCommandBody>; | ||
/** | ||
@@ -379,3 +235,3 @@ * Data type of drillable items command | ||
*/ | ||
type DrillableItemsCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.DrillableItems, IDrillableItemsCommandBody>; | ||
type DrillableItemsCommandData = IKdGdcMessageEnvelope<GdcKdCommandType.DrillableItems, IKdDrillableItemsCommandBody>; | ||
/** | ||
@@ -411,8 +267,9 @@ * Type-guard checking whether object is an instance of {@link DrillableItemsCommandData}. | ||
type NoPermissionsEventData = IKdGdcMessageEnvelope<GdcKdEventType.NoPermissions, INoPermissionsBody>; | ||
interface IResizedBody { | ||
height: number; | ||
} | ||
/** | ||
* Type-guard checking whether object is an instance of {@link NoPermissionsEventData}. | ||
* | ||
* @param obj - object to test | ||
* This event is emitted when the content is fully loaded | ||
*/ | ||
function isNoPermissionsEventData(obj: any): obj is NoPermissionsEventData; | ||
type ResizedEventData = IKdGdcMessageEnvelope<GdcKdEventType.Resized, IResizedBody>; | ||
interface IDashboardObjectMeta { | ||
@@ -448,8 +305,2 @@ /** | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardCreatedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardCreatedData(obj: any): obj is IDashboardCreatedData; | ||
/** | ||
* Data type of event that was emit when the content is fully loaded, | ||
@@ -460,8 +311,2 @@ * and the user has permissions to access the dashboard. | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardLoadedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardLoadedData(obj: any): obj is IDashboardLoadedData; | ||
/** | ||
* Data type of event that was emit when the existing dashboard has been updated. | ||
@@ -471,8 +316,2 @@ */ | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardUpdatedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardUpdatedData(obj: any): obj is IDashboardUpdatedData; | ||
/** | ||
* Data type of event that was emit when the dashboard has been saved. | ||
@@ -482,8 +321,2 @@ */ | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardSavedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardSavedData(obj: any): obj is IDashboardSavedData; | ||
/** | ||
* Data type of event that was emit when the dashboard has been deleted. | ||
@@ -493,74 +326,9 @@ */ | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardDeletedData} | ||
* | ||
* @param obj - object to test | ||
* This event is emitted after KD switched a dashboard from view mode to edit mode. | ||
*/ | ||
function isDashboardDeletedData(obj: any): obj is IDashboardDeletedData; | ||
/** | ||
* This event is emitted after KD switched a dashboard from edit mode to view mode. | ||
*/ | ||
type SwitchedToEditData = IKdGdcMessageEnvelope<GdcKdEventType.SwitchedToEdit, IDashboardBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isSwitchedToEditData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSwitchedToEditData(obj: any): obj is SwitchedToEditData; | ||
/** | ||
* This event is emitted after KD switched a dashboard from edit mode to view mode. | ||
*/ | ||
type SwitchedToViewData = IKdGdcMessageEnvelope<GdcKdEventType.SwitchedToView, IDashboardBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isSwitchedToViewData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSwitchedToViewData(obj: any): obj is SwitchedToViewData; | ||
/** | ||
* This event is emitted after KD switched a dashboard from edit mode to view mode. | ||
*/ | ||
interface IWidgetAddedBody { | ||
insight?: IObjectMeta; | ||
} | ||
/** | ||
* This event is emitted after KD added a new widget to a dashboard. If the widget is | ||
* an insight, then meta information about the insight will be returned. | ||
* | ||
* Note: when this event is added for a KPI widget, it means the customization flow for the KPI has | ||
* started. The user may still 'just' click somewhere outside of the KPI configuration and the KPI will | ||
* be discarded. | ||
*/ | ||
type WidgetAddedData = IKdGdcMessageEnvelope<GdcKdEventType.WidgetAdded, IWidgetAddedBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isWidgetAddedData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isWidgetAddedData(obj: any): obj is WidgetAddedData; | ||
type FilterAddedBody = IKdAvailableCommands; | ||
/** | ||
* This event is emitted after KD added a new filter to dashboard's filter bar and started its | ||
* customization flow. | ||
* | ||
* Note: users can still cancel the filter customization flow meaning no new attribute filter | ||
* will end on the filter bar. | ||
*/ | ||
type FilterAddedData = IKdGdcMessageEnvelope<GdcKdEventType.FilterAdded, FilterAddedBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isFilterAddedData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isFilterAddedData(obj: any): obj is FilterAddedData; | ||
type ExportFinishedBody = IKdAvailableCommands; | ||
/** | ||
* This event is emitted after dashboard has been exported to PDF | ||
*/ | ||
type ExportFinishedData = IKdGdcMessageEnvelope<GdcKdEventType.ExportFinished, ExportFinishedBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isExportFinishedData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isExportFinishedData(obj: any): obj is ExportFinishedData; | ||
interface IPlaformBody { | ||
@@ -572,8 +340,2 @@ status?: string; | ||
type PlaformData = IKdGdcMessageEnvelope<GdcKdEventType.Platform, IPlaformBody>; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isPlaformData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isPlaformData(obj: any): obj is PlaformData; | ||
} |
@@ -29,14 +29,2 @@ "use strict"; | ||
/** | ||
* The command export a dashboard. | ||
*/ | ||
GdcKdCommandType["Export"] = "exportDashboard"; | ||
/** | ||
* The command add filter to dashboard. | ||
*/ | ||
GdcKdCommandType["AddFilter"] = "addFilter"; | ||
/** | ||
* The command add widget to dashboard. | ||
*/ | ||
GdcKdCommandType["AddWidget"] = "addWidget"; | ||
/** | ||
* The command set drillable items. | ||
@@ -107,16 +95,2 @@ */ | ||
/** | ||
* Type represent that the widget is added to dashboard. | ||
* | ||
*/ | ||
GdcKdEventType["WidgetAdded"] = "widgetAdded"; | ||
/** | ||
* Type represent that the filter is added to dashboard. | ||
* | ||
*/ | ||
GdcKdEventType["FilterAdded"] = "filterAdded"; | ||
/** | ||
* Type represent that the export action is finished. | ||
*/ | ||
GdcKdEventType["ExportFinished"] = "exportDashboardFinished"; | ||
/** | ||
* Type represent that the platform is down. | ||
@@ -127,11 +101,2 @@ */ | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link KdCommandFailedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isAdCommandFailedData(obj) { | ||
return common_1.isCommandFailedData(obj); | ||
} | ||
EmbeddedKpiDashboard.isAdCommandFailedData = isAdCommandFailedData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link SaveDashboardCommandData}. | ||
@@ -146,3 +111,3 @@ * | ||
/** | ||
* Type-guard checking whether object is an instance of {@link CancelEdit}. | ||
* Type-guard checking whether object is an instance of {@link CancelEditData}. | ||
* | ||
@@ -156,15 +121,6 @@ * @param obj - object to test | ||
/** | ||
* Type-guard checking whether object is an instance of {@link DeleteDashboardData}. | ||
* Type-guard checking whether object is an instance of {@link SwitchToEditCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDeleteDashboardCommandData(obj) { | ||
return common_1.getEventType(obj) === GdcKdCommandType.Delete; | ||
} | ||
EmbeddedKpiDashboard.isDeleteDashboardCommandData = isDeleteDashboardCommandData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isSwitchToEditCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSwitchToEditCommandData(obj) { | ||
@@ -175,29 +131,2 @@ return common_1.getEventType(obj) === GdcKdCommandType.SwitchToEdit; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isExportCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isExportCommandData(obj) { | ||
return common_1.getEventType(obj) === GdcKdCommandType.Export; | ||
} | ||
EmbeddedKpiDashboard.isExportCommandData = isExportCommandData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isAddFilterCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isAddFilterCommandData(obj) { | ||
return common_1.getEventType(obj) === GdcKdCommandType.AddFilter; | ||
} | ||
EmbeddedKpiDashboard.isAddFilterCommandData = isAddFilterCommandData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isAddWidgetCommandData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isAddWidgetCommandData(obj) { | ||
return common_1.getEventType(obj) === GdcKdCommandType.AddWidget; | ||
} | ||
EmbeddedKpiDashboard.isAddWidgetCommandData = isAddWidgetCommandData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link DrillableItemsCommandData}. | ||
@@ -220,111 +149,3 @@ * | ||
EmbeddedKpiDashboard.isSetSizeCommandData = isSetSizeCommandData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link NoPermissionsEventData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isNoPermissionsEventData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.NoPermissions; | ||
} | ||
EmbeddedKpiDashboard.isNoPermissionsEventData = isNoPermissionsEventData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardCreatedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardCreatedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.DashboardCreated; | ||
} | ||
EmbeddedKpiDashboard.isDashboardCreatedData = isDashboardCreatedData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardLoadedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardLoadedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.DashboardLoaded; | ||
} | ||
EmbeddedKpiDashboard.isDashboardLoadedData = isDashboardLoadedData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardUpdatedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardUpdatedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.DashboardUpdated; | ||
} | ||
EmbeddedKpiDashboard.isDashboardUpdatedData = isDashboardUpdatedData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardSavedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardSavedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.DashboardSaved; | ||
} | ||
EmbeddedKpiDashboard.isDashboardSavedData = isDashboardSavedData; | ||
/** | ||
* Type-guard checking whether an object is an instance of {@link isDashboardDeletedData} | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isDashboardDeletedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.DashboardCreationCanceled; | ||
} | ||
EmbeddedKpiDashboard.isDashboardDeletedData = isDashboardDeletedData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isSwitchedToEditData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSwitchedToEditData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.SwitchedToEdit; | ||
} | ||
EmbeddedKpiDashboard.isSwitchedToEditData = isSwitchedToEditData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isSwitchedToViewData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isSwitchedToViewData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.SwitchedToView; | ||
} | ||
EmbeddedKpiDashboard.isSwitchedToViewData = isSwitchedToViewData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isWidgetAddedData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isWidgetAddedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.WidgetAdded; | ||
} | ||
EmbeddedKpiDashboard.isWidgetAddedData = isWidgetAddedData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isFilterAddedData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isFilterAddedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.FilterAdded; | ||
} | ||
EmbeddedKpiDashboard.isFilterAddedData = isFilterAddedData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isExportFinishedData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isExportFinishedData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.ExportFinished; | ||
} | ||
EmbeddedKpiDashboard.isExportFinishedData = isExportFinishedData; | ||
/** | ||
* Type-guard checking whether object is an instance of {@link isPlaformData}. | ||
* | ||
* @param obj - object to test | ||
*/ | ||
function isPlaformData(obj) { | ||
return common_1.getEventType(obj) === GdcKdEventType.Platform; | ||
} | ||
EmbeddedKpiDashboard.isPlaformData = isPlaformData; | ||
})(EmbeddedKpiDashboard = exports.EmbeddedKpiDashboard || (exports.EmbeddedKpiDashboard = {})); | ||
//# sourceMappingURL=kd.js.map |
{ | ||
"name": "@gooddata/typings", | ||
"version": "2.24.1-alpha-khanh.le-kl-SD-937-2020-05-06T07-36-22-546Z", | ||
"version": "2.24.1-alpha-khanh.le-kl-SD-937-2020-05-07T08-14-37-670Z", | ||
"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
326004
5493