@vixoniccom/kpi-chart 0.0.1 → 0.0.2-dev.0

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.
@@ -0,0 +1,98 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - main
8
+
9
+ jobs:
10
+ publish:
11
+ # Solo ejecutar si es un push a main/master
12
+ if: github.event_name == 'push'
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Setup Node.js 20
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: '20'
25
+ registry-url: 'https://registry.npmjs.org'
26
+ scope: '@vixoniccom'
27
+
28
+ - name: Configure npm authentication
29
+ run: |
30
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
31
+ echo "@vixoniccom:registry=https://registry.npmjs.org/" >> ~/.npmrc
32
+ echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
33
+
34
+ - name: Cache node modules
35
+ uses: actions/cache@v4
36
+ with:
37
+ path: ~/.npm
38
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
39
+ restore-keys: |
40
+ ${{ runner.os }}-node-
41
+
42
+ - name: Install dependencies
43
+ run: npm ci
44
+ env:
45
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46
+
47
+ - name: Build package
48
+ run: npm run prepublish
49
+ env:
50
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51
+
52
+ - name: Verify build.zip exists
53
+ run: |
54
+ if [ ! -f "build.zip" ]; then
55
+ echo "❌ Error: build.zip not found after build process"
56
+ exit 1
57
+ fi
58
+ echo "✅ build.zip found successfully"
59
+ ls -la build.zip
60
+
61
+ - name: Check if version already exists on npm
62
+ id: check-version
63
+ run: |
64
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
65
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
66
+
67
+ echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
68
+
69
+ if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
70
+ echo "version-exists=true" >> $GITHUB_OUTPUT
71
+ echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
72
+ else
73
+ echo "version-exists=false" >> $GITHUB_OUTPUT
74
+ echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
75
+ fi
76
+
77
+ - name: Publish to npm
78
+ if: steps.check-version.outputs.version-exists == 'false'
79
+ run: |
80
+ echo "Publishing to npm..."
81
+ npm publish --access public
82
+ env:
83
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
84
+
85
+ - name: Publication success
86
+ if: steps.check-version.outputs.version-exists == 'false'
87
+ run: |
88
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
89
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
90
+ echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
91
+ echo "📦 Package includes build.zip with the compiled application"
92
+
93
+ - name: Skip publication
94
+ if: steps.check-version.outputs.version-exists == 'true'
95
+ run: |
96
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
97
+ echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
98
+ echo "💡 To publish a new version, update the version in package.json or run 'npm run release'"
@@ -0,0 +1,30 @@
1
+ name: Sonarqube Analysis
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - development
7
+ pull_request:
8
+ types: [opened, synchronize, reopened]
9
+
10
+ jobs:
11
+ sonarqube:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ # Disabling shallow clone is recommended for improving relevancy of reporting.
17
+ fetch-depth: 0
18
+
19
+ - name: SonarQube Scan
20
+ uses: sonarsource/sonarqube-scan-action@master
21
+ env:
22
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
23
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
24
+
25
+ - name: SonarQube Quality Gate Check
26
+ uses: sonarsource/sonarqube-quality-gate-action@master
27
+ timeout-minutes: 5
28
+ env:
29
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.2-dev.0](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-beta.0...v0.0.2-dev.0) (2025-09-11)
6
+
7
+
8
+ ### Features
9
+
10
+ * service logic added on main ([4a808dc](https://github.com/Vixonic/store-sheets-kpi/commit/4a808dc062b46d16b8e5fc91b4687f87aa913d83))
11
+ * sonarqube config & CI/CD ([4d10ebc](https://github.com/Vixonic/store-sheets-kpi/commit/4d10ebc6ad00c7a44cd8cb3fa21820eeaa3f7083))
12
+
13
+ ### [0.0.2-beta.0](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.1...v0.0.2-beta.0) (2025-09-11)
14
+
15
+
16
+ ### Features
17
+
18
+ * data loader & new config ([f67699f](https://github.com/Vixonic/store-sheets-kpi/commit/f67699f6057cdf37fc744f5149d0907f31607acb))
19
+ * old data logic removed ([0d675e3](https://github.com/Vixonic/store-sheets-kpi/commit/0d675e31b3298bcc9c39a5c786f90b35a4e3b1e5))
20
+
5
21
  ### [0.0.1](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.1-dev.8...v0.0.1) (2025-04-07)
6
22
 
7
23
  ### [0.0.1-dev.8](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.1-dev.7...v0.0.1-dev.8) (2025-03-20)
package/build.zip CHANGED
Binary file
@@ -1,11 +1,8 @@
1
1
  import {
2
2
  Group,
3
3
  Label,
4
- NumberInput,
5
- NumberRangeValue,
6
- RedirectButton,
7
4
  SelectInput,
8
- TextInput,
5
+ ServiceInput,
9
6
  } from "@vixoniccom/modules";
10
7
 
11
8
  // Configuración general: URL fuente, cantidad de columnas y filas, tiempo de actualización y mensaje por defecto
@@ -14,29 +11,10 @@ export const generalGroup = new Group({
14
11
  label: "General",
15
12
  items: [
16
13
  new Label({ label: "Datos" }),
17
- new TextInput({
18
- id: "url",
19
- label: "URL de planilla",
20
- description: "URL de la fuente de datos.",
21
- required: true,
22
- }),
23
- new RedirectButton({
24
- id: "url",
25
- label: "Ir al documento",
26
- }),
27
- new NumberInput({
28
- id: "maxColumnsNumber",
29
- label: "Cantidad de columnas",
30
- range: new NumberRangeValue(1, 10, 1),
31
- description:
32
- "Máxima cantidad de columnas por mostrar (sin considerar categoría). Entre 1 y 10 (3 por defecto).",
33
- }),
34
- new NumberInput({
35
- id: "maxRowsNumber",
36
- label: "Cantidad de filas",
37
- range: new NumberRangeValue(1, 100, 1),
38
- description:
39
- "Máxima cantidad de filas por mostrar. Entre 1 y 100 (6 por defecto).",
14
+ new ServiceInput({
15
+ id: 'documentService',
16
+ label: 'Documento',
17
+ serviceType: 'SheetsReaderService',
40
18
  }),
41
19
  new SelectInput({
42
20
  id: "updateTime",
@@ -10,30 +10,10 @@
10
10
  "label": "Datos"
11
11
  },
12
12
  {
13
- "id": "url",
14
- "label": "URL de planilla",
15
- "type": "text-input",
16
- "description": "URL de la fuente de datos.",
17
- "required": true
18
- },
19
- {
20
- "id": "url",
21
- "label": "Ir al documento",
22
- "type": "redirect-button"
23
- },
24
- {
25
- "id": "maxColumnsNumber",
26
- "label": "Cantidad de columnas",
27
- "type": "number-input",
28
- "range": "[1:10:1]",
29
- "description": "Máxima cantidad de columnas por mostrar (sin considerar categoría). Entre 1 y 10 (3 por defecto)."
30
- },
31
- {
32
- "id": "maxRowsNumber",
33
- "label": "Cantidad de filas",
34
- "type": "number-input",
35
- "range": "[1:100:1]",
36
- "description": "Máxima cantidad de filas por mostrar. Entre 1 y 100 (6 por defecto)."
13
+ "id": "documentService",
14
+ "label": "Documento",
15
+ "type": "service-input",
16
+ "serviceType": "SheetsReaderService"
37
17
  },
38
18
  {
39
19
  "id": "updateTime",
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "author": {
9
9
  "name": "Lorenzo Alfaro Bravo"
10
10
  },
11
- "version": "0.0.1",
11
+ "version": "0.0.2-dev.0",
12
12
  "scripts": {
13
13
  "prepublishOnly": "vixonic-module-packager --mode=build",
14
14
  "watch": "vixonic-module-packager --mode=watch",
@@ -20,8 +20,6 @@
20
20
  "prerelease-dev": "standard-version --prerelease dev"
21
21
  },
22
22
  "dependencies": {
23
- "axios": "^1.6.0",
24
- "localforage": "^1.10.0",
25
23
  "react": "^17.0.2",
26
24
  "react-charts": "^3.0.0-beta.57",
27
25
  "react-dom": "^17.0.2",
@@ -30,8 +28,8 @@
30
28
  "devDependencies": {
31
29
  "@types/react": "^17.0.2",
32
30
  "@types/react-dom": "^17.0.11",
33
- "@vixoniccom/module-packager": "^2.10.1",
34
- "@vixoniccom/modules": "^2.20.0",
31
+ "@vixoniccom/module-packager": "^2.13.0",
32
+ "@vixoniccom/modules": "^2.23.1",
35
33
  "standard-version": "^9.5.0"
36
34
  }
37
35
  }
@@ -0,0 +1 @@
1
+ sonar.projectKey=Vixonic_store-sheets-kpi_12e7b95b-fc91-4f7e-a0e7-1dd33cc0de3d
package/tsconfig.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "es2015",
4
- "module": "es2015",
3
+ "target": "es6",
4
+ "module": "esnext",
5
+ "jsx": "react-jsx",
5
6
  "moduleResolution": "node",
6
- "jsx": "preserve",
7
7
  "allowJs": true,
8
8
  "checkJs": true,
9
9
  "allowSyntheticDefaultImports": true,
@@ -24,4 +24,4 @@
24
24
  },
25
25
  "include": ["./src/**/*"],
26
26
  "exclude": ["./node_modules/**/*"]
27
- }
27
+ }
package/build/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><html style="position: absolute; height: 100%; width: 100%; overflow: hidden"><head><title>KPI Charts</title><meta charset="utf-8"/><script src="main.js"></script></head><body style="margin: 0"><div id="root" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0"></div></body></html>