@sit-onyx/chartjs-plugin 1.0.0-beta.270 → 1.0.0-beta.271

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@sit-onyx/chartjs-plugin",
3
3
  "description": "A Chart.js plugin for the onyx design system created by Schwarz IT",
4
- "version": "1.0.0-beta.270",
4
+ "version": "1.0.0-beta.271",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
8
+ "engines": {
9
+ "node": ">=20"
10
+ },
8
11
  "files": [
9
12
  "src"
10
13
  ],
@@ -24,16 +27,16 @@
24
27
  },
25
28
  "peerDependencies": {
26
29
  "chart.js": ">= 4.0.0",
27
- "sit-onyx": "^1.0.0-beta.270"
30
+ "sit-onyx": "^1.0.0-beta.271"
28
31
  },
29
32
  "devDependencies": {
30
33
  "@vue/compiler-dom": "3.5.16",
31
34
  "chart.js": "4.5.0",
32
35
  "vue": "3.5.16",
33
36
  "vue-chartjs": "^5.3.2",
34
- "@sit-onyx/shared": "^1.0.0-beta.3",
35
- "@sit-onyx/storybook-utils": "^1.0.0-beta.95",
36
- "sit-onyx": "^1.0.0-beta.270"
37
+ "@sit-onyx/shared": "^1.0.0-beta.4",
38
+ "@sit-onyx/storybook-utils": "^1.0.0-beta.96",
39
+ "sit-onyx": "^1.0.0-beta.271"
37
40
  },
38
41
  "scripts": {
39
42
  "dev": "storybook dev -p 6006 --no-open",
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./plugin";
2
- export * from "./utils";
1
+ export * from "./plugin.js";
2
+ export * from "./utils.js";
package/src/plugin.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
- Chart,
3
2
  DoughnutController,
4
3
  PieController,
5
4
  PolarAreaController,
5
+ type Chart,
6
6
  type ChartDataset,
7
7
  type ChartType,
8
8
  type Color,
@@ -10,7 +10,7 @@ import {
10
10
  type ScaleOptionsByType,
11
11
  type ScaleTypeRegistry,
12
12
  } from "chart.js";
13
- import { QUANTITATIVE_COLOR_STEPS, getCSSVariableValue, hexToRgb } from "./utils";
13
+ import { QUANTITATIVE_COLOR_STEPS, getCSSVariableValue, hexToRgb } from "./utils.js";
14
14
 
15
15
  /**
16
16
  * Registers the onyx Chart.js plugin and updates the default styles (colors, fonts etc.) to match
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import BarChart from "./BarChart.vue";
4
4
 
5
5
  test("should render bar chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Bar } from "vue-chartjs";
4
- import { chartOptions } from "../data";
4
+ import { chartOptions } from "../data.js";
5
5
 
6
6
  const labels = ["01.01.2024", "01.02.2024", "01.03.2024", "01.04.2024", "01.05.2024"];
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import BubbleChart from "./BubbleChart.vue";
4
4
 
5
5
  test("should render bubble chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Bubble } from "vue-chartjs";
4
- import { chartOptions } from "../data";
4
+ import { chartOptions } from "../data.js";
5
5
 
6
6
  const chartData: ChartData<"bubble"> = {
7
7
  datasets: [
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import DoughnutChart from "./DoughnutChart.vue";
4
4
 
5
5
  test("should render doughnut chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Doughnut } from "vue-chartjs";
4
- import { chartOptions } from "../data";
4
+ import { chartOptions } from "../data.js";
5
5
 
6
6
  const chartData: ChartData<"doughnut"> = {
7
7
  labels: ["Label 1", "Label 2", "Label 3", "Label 4"],
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import LineChart from "./LineChart.vue";
4
4
 
5
5
  test("should render line chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Line } from "vue-chartjs";
4
- import { chartOptions } from "../data";
4
+ import { chartOptions } from "../data.js";
5
5
 
6
6
  const labels = ["01.01.2024", "01.02.2024", "01.03.2024", "01.04.2024", "01.05.2024"];
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import PieChart from "./PieChart.vue";
4
4
 
5
5
  test("should render pie chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Pie } from "vue-chartjs";
4
- import { chartOptions } from "../data";
4
+ import { chartOptions } from "../data.js";
5
5
 
6
6
  const chartData: ChartData<"pie"> = {
7
7
  labels: ["Label 1", "Label 2", "Label 3", "Label 4"],
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import PolarAreaChart from "./PolarAreaChart.vue";
4
4
 
5
5
  test("should render polar area chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { PolarArea } from "vue-chartjs";
4
- import { chartOptionsWithoutScales } from "../data";
4
+ import { chartOptionsWithoutScales } from "../data.js";
5
5
 
6
6
  const chartData: ChartData<"polarArea"> = {
7
7
  labels: ["Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6", "Label 7"],
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import RadarChart from "./RadarChart.vue";
4
4
 
5
5
  test("should render radar chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Radar } from "vue-chartjs";
4
- import { chartOptionsWithoutScales } from "../data";
4
+ import { chartOptionsWithoutScales } from "../data.js";
5
5
 
6
6
  const chartData: ChartData<"radar"> = {
7
7
  labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
@@ -1,5 +1,5 @@
1
1
  import { test } from "@playwright/experimental-ct-vue";
2
- import { executeChartScreenshotTest } from "../playwright-utils";
2
+ import { executeChartScreenshotTest } from "../playwright-utils.js";
3
3
  import ScatterChart from "./ScatterChart.vue";
4
4
 
5
5
  test("should render scatter chart", async ({ mount, page }) => {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ChartData } from "chart.js";
3
3
  import { Scatter } from "vue-chartjs";
4
- import { chartOptions } from "../data";
4
+ import { chartOptions } from "../data.js";
5
5
 
6
6
  const chartData: ChartData<"scatter"> = {
7
7
  datasets: [
package/src/utils.spec.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, test } from "vitest";
2
- import { hexToRgb } from "./utils";
2
+ import { hexToRgb } from "./utils.js";
3
3
 
4
4
  describe("utils.ts", () => {
5
5
  test("should convert hex to rgb", () => {