Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14144 “DataViewUtils - add unit tests” #11

Merged
merged 1 commit into from
Jan 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ declare module powerbi.extensibility.utils.dataview {
module DataViewTransform {
function createValueColumns(values?: DataViewValueColumn[], valueIdentityFields?: ISQExpr[], source?: DataViewMetadataColumn): DataViewValueColumns;
function setGrouped(values: DataViewValueColumns, groupedResult?: DataViewValueColumnGroup[]): void;
/** Group together the values with a common identity. */
function groupValues(values: DataViewValueColumn[]): DataViewValueColumnGroup[];
}
}
declare module powerbi.extensibility.utils.dataview {
Expand All @@ -24,8 +26,14 @@ declare module powerbi.extensibility.utils.dataview {
}
}
declare module powerbi.extensibility.utils.dataview {
import DataViewObjects = powerbi.DataViewObjects;
import DataViewObjectPropertyIdentifier = powerbi.DataViewObjectPropertyIdentifier;
import IDataViewObject = powerbi.DataViewObject;
module DataViewObject {
function getValue<T>(object: IDataViewObject, propertyName: string, defaultValue?: T): T;
/** Gets the solid color from a fill property using only a propertyName */
function getFillColorByPropertyName(object: IDataViewObject, propertyName: string, defaultColor?: string): string;
}
}
declare module powerbi.extensibility.utils.dataview {
import IDataViewObject = powerbi.DataViewObject;
module DataViewObjects {
/** Gets the value of the given object/property pair. */
Expand All @@ -36,22 +44,19 @@ declare module powerbi.extensibility.utils.dataview {
function getFillColor(objects: DataViewObjects, propertyId: DataViewObjectPropertyIdentifier, defaultColor?: string): string;
function getCommonValue(objects: DataViewObjects, propertyId: DataViewObjectPropertyIdentifier, defaultValue?: any): any;
}
module DataViewObject {
function getValue<T>(object: IDataViewObject, propertyName: string, defaultValue?: T): T;
/** Gets the solid color from a fill property using only a propertyName */
function getFillColorByPropertyName(object: IDataViewObject, propertyName: string, defaultColor?: string): string;
}
}
declare module powerbi.extensibility.utils.dataview {
import DataViewCategorical = powerbi.DataViewCategorical;
import DataViewMetadataColumn = powerbi.DataViewMetadataColumn;
import PrimitiveValue = powerbi.PrimitiveValue;
import MiscellaneousTypeDescriptor = powerbi.MiscellaneousTypeDescriptor;
import DataView = powerbi.DataView;
module converterHelper {
function categoryIsAlsoSeriesRole(dataView: DataViewCategorical, seriesRoleName: string, categoryRoleName: string): boolean;
function getSeriesName(source: DataViewMetadataColumn): PrimitiveValue;
function isImageUrlColumn(column: DataViewMetadataColumn): boolean;
function isWebUrlColumn(column: DataViewMetadataColumn): boolean;
function getMiscellaneousTypeDescriptor(column: DataViewMetadataColumn): MiscellaneousTypeDescriptor;
function hasImageUrlColumn(dataView: DataView): boolean;
}
}
Expand All @@ -68,7 +73,6 @@ declare module powerbi.extensibility.utils.dataview {
}
class DataViewObjectsParser {
private static InnumerablePropertyPrefix;
private static createFillColorRegExp(fillColorNames);
static getDefault(): DataViewObjectsParser;
private static createPropertyIdentifier(objectName, propertyName);
static parse<T extends DataViewObjectsParser>(dataView: DataView): T;
Expand Down
99 changes: 67 additions & 32 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.