Releases: microsoft/powerbi-visuals-utils-formattingmodel
Releases · microsoft/powerbi-visuals-utils-formattingmodel
v6.2.2
v6.2.1
- Improved type definitions and JSDoc documentation for
ItemFlagsSelectionandAutoFlagsSelectioncomponents - Added clarification that both flag selection components require bitwise values (powers of 2) for proper flag functionality
v6.2.0
- All Slices, Groups and Cards now can be
disabledand provided withdisabledReasonordisabledReasonKeyfor localized version. - Container card can have
Groupsinside - Bug with delaySaveSlices was fixed for Containers
- Localization support for
AutoDropdownandItemFlagsSelection
v6.1.1
Fixed nullable values (#28)
v6.1.0
ItemDropdownnow supports new interfaceILocalizedItemMemberfor localization of dropdown items.ItemDropdowngot new methodsetValue(value: powerbi.EnumMemberValue, localizationManager?: powerbi.extensibility.ILocalizationManager)to set value by unique enum member value.- Fixed empty groups exception
Full Changelog: 6.0.4...6.1.0
v6.0.4
v6.0.3
v6.0.2
- powerbi-visuals-api update to 5.9.0
v6.0.1
- Updated dependencies
v6.0.0
- Added support for creating custom Formatting groups
- Replaced
topLevelTogglewithtopLevelSliceattribute to card and group interfaces. - Added extra (optional)
visibleslice/card/group attribute for easier show/hide in a dynamic way - Interface
Cardis removed. UseCompositeCardorSimpleCardinstead.
Composite card is designed to handle multiple Groups inside. - Added extra (optional)
visibleslice/card/group attribute for easier show/hide in a dynamic way
Example:
class GroupSettings extends formattingSettings.Group { // Formatting Group
fontSize = new formattingSettings.NumUpDown({
name: "fontSize",
displayName: "Text Size",
value: 10
});
name: string = "font";
displayName: string = "Font Group";
slices: formattingSettings.Slice[] = [this.fontSize];
visible: boolean = true // `true` by default. Group will be hidden if `visible == false`
}
class FormattingCard extends formattingSettings.SimpleCard { // Simple card example
show = new formattingSettings.ToggleSwitch({
name: "show",
displayNameKey: "Visual_Show",
value: true,
visible: true // `true` by default. Slice will be hidden if `visible == false`
// topLevelToggle: true - Old version of topLevelSlice
});
topLevelSlice: formattingSettings.SimpleSlice = this.show // New version of topLevelToggle
name: string = "formatting";
displayName: string = "Formatting Settings";
groupsSettings = new GroupSettings(Object());
groups: formattingSettings.Group[] = [this.groupsSettings];
visible: boolean = true // `true` by default. Card will be hidden if `visible == false`
}populateFormattingSettingsModelnow should receive only onedataViewas second argument.
formattingSettingsService.populateFormattingSettingsModel(Settings, options.dataViews[0])