Skip to content

Commit

Permalink
Updated templates (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksSavelev authored Oct 11, 2023
1 parent e8b378b commit 60e8686
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion templates/visuals/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/d3": "7.4.0",
"d3": "7.8.5",
"powerbi-visuals-api": "5.4.0",
"powerbi-visuals-utils-formattingmodel": "5.0.0"
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.11",
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/default/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";

import FormattingSettingsCard = formattingSettings.Card;
import FormattingSettingsCard = formattingSettings.SimpleCard;
import FormattingSettingsSlice = formattingSettings.Slice;
import FormattingSettingsModel = formattingSettings.Model;

Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/default/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Visual implements IVisual {
}

public update(options: VisualUpdateOptions) {
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);

console.log('Visual update', options);
if (this.textNode) {
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/rhtml/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "visual",
"dependencies": {
"powerbi-visuals-utils-formattingmodel": "5.0.0"
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"powerbi-visuals-api": "5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/rhtml/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";

import FormattingSettingsCard = formattingSettings.Card;
import FormattingSettingsCard = formattingSettings.SimpleCard;
import FormattingSettingsSlice = formattingSettings.Slice;
import FormattingSettingsModel = formattingSettings.Model;

Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/rhtml/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class Visual implements IVisual {
}

const dataView: DataView = options.dataViews[0];
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);

let payloadBase64: string = null;
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/rvisual/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "visual",
"dependencies": {
"powerbi-visuals-utils-formattingmodel": "5.0.0"
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"powerbi-visuals-api": "5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/rvisual/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";

import FormattingSettingsCard = formattingSettings.Card;
import FormattingSettingsCard = formattingSettings.SimpleCard;
import FormattingSettingsSlice = formattingSettings.Slice;
import FormattingSettingsModel = formattingSettings.Model;

Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/rvisual/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Visual implements IVisual {
}

const dataView: DataView = options.dataViews[0];
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);

let imageUrl: string = null;
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/slicer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"d3": "7.8.5",
"powerbi-visuals-utils-formattingmodel": "5.0.0"
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"@types/d3": "7.4.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/slicer/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";

import FormattingSettingsCard = formattingSettings.Card;
import FormattingSettingsCard = formattingSettings.SimpleCard;
import FormattingSettingsSlice = formattingSettings.Slice;
import FormattingSettingsModel = formattingSettings.Model;

Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/slicer/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Visual implements IVisual {
}

public update(options: VisualUpdateOptions) {
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
console.log("Visual update", options);
if (this.textNode) {
this.textNode.textContent = (this.updateCount++).toString();
Expand Down
2 changes: 1 addition & 1 deletion templates/visuals/table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"d3": "7.8.5",
"powerbi-visuals-utils-formattingmodel": "5.0.0"
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"powerbi-visuals-api": "5.4.0",
Expand Down

0 comments on commit 60e8686

Please sign in to comment.