Merged PR 249216: Add ability to hide / show status bar
Add ability to hide / show status bar ![image.png](https://powerbi.visualstudio.com/4c7b5adb-c2d0-4f18-b23c-edc4ac30f4e1/_apis/git/repositories/3e42401e-931d-4a96-b4b9-3533d1cf56ce/pullRequests/249216/attachments/image.png)
This commit is contained in:
Родитель
b01b2d7bbf
Коммит
897284b6b5
|
@ -1162,10 +1162,13 @@ export interface ISettings {
|
||||||
|
|
||||||
export interface IReportBars {
|
export interface IReportBars {
|
||||||
actionBar?: IActionBar;
|
actionBar?: IActionBar;
|
||||||
|
statusBar?: IStatusBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IActionBar extends IHideable { }
|
export interface IActionBar extends IHideable { }
|
||||||
|
|
||||||
|
export interface IStatusBar extends IHideable { }
|
||||||
|
|
||||||
export interface IReportPanes extends IPanes {
|
export interface IReportPanes extends IPanes {
|
||||||
bookmarks?: IBookmarksPane;
|
bookmarks?: IBookmarksPane;
|
||||||
fields?: IFieldsPane;
|
fields?: IFieldsPane;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { ActionBarValidator, ReportBarsValidator } from '../models/barsValidator';
|
import { ActionBarValidator, StatusBarValidator, ReportBarsValidator } from '../models/barsValidator';
|
||||||
import { AddBookmarkRequestValidator, ApplyBookmarkByNameRequestValidator, ApplyBookmarkStateRequestValidator, CaptureBookmarkOptionsValidator, CaptureBookmarkRequestValidator, PlayBookmarkRequestValidator } from '../models/bookmarkValidator';
|
import { AddBookmarkRequestValidator, ApplyBookmarkByNameRequestValidator, ApplyBookmarkStateRequestValidator, CaptureBookmarkOptionsValidator, CaptureBookmarkRequestValidator, PlayBookmarkRequestValidator } from '../models/bookmarkValidator';
|
||||||
import { CommandsSettingsValidator, SingleCommandSettingsValidator, PaginatedReportCommandsValidator } from '../models/commandsSettingsValidator';
|
import { CommandsSettingsValidator, SingleCommandSettingsValidator, PaginatedReportCommandsValidator } from '../models/commandsSettingsValidator';
|
||||||
import { CustomThemeValidator } from '../models/customThemeValidator';
|
import { CustomThemeValidator } from '../models/customThemeValidator';
|
||||||
|
@ -81,6 +81,7 @@ export const Validators = {
|
||||||
anyFilterValidator: new AnyOfValidator([new BasicFilterValidator(), new AdvancedFilterValidator(), new IncludeExcludeFilterValidator(), new NotSupportedFilterValidator(), new RelativeDateFilterValidator(), new TopNFilterValidator(), new RelativeTimeFilterValidator(), new HierarchyFilterValidator()]),
|
anyFilterValidator: new AnyOfValidator([new BasicFilterValidator(), new AdvancedFilterValidator(), new IncludeExcludeFilterValidator(), new NotSupportedFilterValidator(), new RelativeDateFilterValidator(), new TopNFilterValidator(), new RelativeTimeFilterValidator(), new HierarchyFilterValidator()]),
|
||||||
anyValueValidator: new AnyOfValidator([new StringValidator(), new NumberValidator(), new BooleanValidator()]),
|
anyValueValidator: new AnyOfValidator([new StringValidator(), new NumberValidator(), new BooleanValidator()]),
|
||||||
actionBarValidator: new ActionBarValidator(),
|
actionBarValidator: new ActionBarValidator(),
|
||||||
|
statusBarValidator: new StatusBarValidator(),
|
||||||
applyBookmarkByNameRequestValidator: new ApplyBookmarkByNameRequestValidator(),
|
applyBookmarkByNameRequestValidator: new ApplyBookmarkByNameRequestValidator(),
|
||||||
applyBookmarkStateRequestValidator: new ApplyBookmarkStateRequestValidator(),
|
applyBookmarkStateRequestValidator: new ApplyBookmarkStateRequestValidator(),
|
||||||
applyBookmarkValidator: new AnyOfValidator([new ApplyBookmarkByNameRequestValidator(), new ApplyBookmarkStateRequestValidator()]),
|
applyBookmarkValidator: new AnyOfValidator([new ApplyBookmarkByNameRequestValidator(), new ApplyBookmarkStateRequestValidator()]),
|
||||||
|
|
|
@ -19,6 +19,10 @@ export class ReportBarsValidator extends ObjectValidator {
|
||||||
{
|
{
|
||||||
field: "actionBar",
|
field: "actionBar",
|
||||||
validators: [Validators.actionBarValidator]
|
validators: [Validators.actionBarValidator]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "statusBar",
|
||||||
|
validators: [Validators.statusBarValidator]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -48,3 +52,25 @@ export class ActionBarValidator extends ObjectValidator {
|
||||||
return multipleFieldsValidator.validate(input, path, field);
|
return multipleFieldsValidator.validate(input, path, field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class StatusBarValidator extends ObjectValidator {
|
||||||
|
public validate(input: any, path?: string, field?: string): IValidationError[] {
|
||||||
|
if (input == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const errors = super.validate(input, path, field);
|
||||||
|
if (errors) {
|
||||||
|
return errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
const fields: IFieldValidatorsPair[] = [
|
||||||
|
{
|
||||||
|
field: "visible",
|
||||||
|
validators: [Validators.booleanValidator]
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const multipleFieldsValidator = new MultipleFieldsValidator(fields);
|
||||||
|
return multipleFieldsValidator.validate(input, path, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче