@vixoniccom/kpi-chart 0.0.2-dev.1 → 0.0.2-dev.11
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/.github/workflows/main.yml +20 -0
- package/.github/workflows/sonarqube.yml +4 -4
- package/CHANGELOG.md +46 -0
- package/build.zip +0 -0
- package/configuration/appearanceGroup/index.ts +73 -0
- package/configuration/chartGroup/index.ts +9 -125
- package/configuration/index.ts +3 -8
- package/configuration/utils.ts +12 -10
- package/configuration.json +60 -223
- package/package.json +5 -6
- package/renovate.json +4 -0
- package/sonar-project.properties +2 -1
- package/.github/workflows/npm-publish.yml +0 -98
- package/configuration/generalGroup/index.ts +0 -33
- package/configuration/styleGroup/index.ts +0 -49
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Deploy job
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
types: [closed]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
|
|
13
|
+
uses: Vixonic/github-workflows/.github/workflows/store-release.yml@d8dcbbbb14ef6f9b944ce0a079940fea4d7c9ba5 # main
|
|
14
|
+
with:
|
|
15
|
+
app-name: store-sheets-kpi
|
|
16
|
+
secrets:
|
|
17
|
+
PRIVATE_TOKEN_GITHUB: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
|
|
18
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
19
|
+
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
|
|
20
|
+
EP_JIRA_COMPONENT: ${{ secrets.EP_JIRA_COMPONENT }}
|
|
@@ -3,7 +3,7 @@ name: Sonarqube Analysis
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
-
|
|
6
|
+
- main
|
|
7
7
|
pull_request:
|
|
8
8
|
types: [opened, synchronize, reopened]
|
|
9
9
|
|
|
@@ -11,19 +11,19 @@ jobs:
|
|
|
11
11
|
sonarqube:
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
15
15
|
with:
|
|
16
16
|
# Disabling shallow clone is recommended for improving relevancy of reporting.
|
|
17
17
|
fetch-depth: 0
|
|
18
18
|
|
|
19
19
|
- name: SonarQube Scan
|
|
20
|
-
uses: sonarsource/sonarqube-scan-action@
|
|
20
|
+
uses: sonarsource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
|
|
21
21
|
env:
|
|
22
22
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
23
23
|
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
|
24
24
|
|
|
25
25
|
- name: SonarQube Quality Gate Check
|
|
26
|
-
uses: sonarsource/sonarqube-quality-gate-action@
|
|
26
|
+
uses: sonarsource/sonarqube-quality-gate-action@cf038b0e0cdecfa9e56c198bbb7d21d751d62c3b # v1.2.0
|
|
27
27
|
timeout-minutes: 5
|
|
28
28
|
env:
|
|
29
29
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
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.11](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.8...v0.0.2-dev.11) (2026-10-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* VXD-545 restructure configuration into chart and appearance groups ([3b20176](https://github.com/Vixonic/store-sheets-kpi/commit/3b20176be4f99830a519daf7dd6c8035455051ad))
|
|
11
|
+
* VXD-901 Add text formatting options for chart values and labels ([6cc17ad](https://github.com/Vixonic/store-sheets-kpi/commit/6cc17ad7f28337c973589784dfeca4544d3dbf73))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* fixed pipeline ([121e14c](https://github.com/Vixonic/store-sheets-kpi/commit/121e14c5f3f58a0c7c5f24a7a9ca5e44e40b84c2))
|
|
17
|
+
|
|
18
|
+
### [0.0.2-dev.10](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.9...v0.0.2-dev.10) (2026-08-04)
|
|
19
|
+
|
|
20
|
+
### [0.0.2-dev.9](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.8...v0.0.2-dev.9) (2026-08-04)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* VXD-901 Add text formatting options for chart values and labels ([6cc17ad](https://github.com/Vixonic/store-sheets-kpi/commit/6cc17ad7f28337c973589784dfeca4544d3dbf73))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* fixed pipeline ([121e14c](https://github.com/Vixonic/store-sheets-kpi/commit/121e14c5f3f58a0c7c5f24a7a9ca5e44e40b84c2))
|
|
31
|
+
|
|
32
|
+
### [0.0.2-dev.8](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.7...v0.0.2-dev.8) (2026-03-19)
|
|
33
|
+
|
|
34
|
+
### [0.0.2-dev.7](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.6...v0.0.2-dev.7) (2026-03-19)
|
|
35
|
+
|
|
36
|
+
### [0.0.2-dev.6](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.5...v0.0.2-dev.6) (2026-03-19)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* VXD-866 Adds option to show data labels in charts and removes alphabetical order when generating the chart ([f0b7a37](https://github.com/Vixonic/store-sheets-kpi/commit/f0b7a37d129366ca83e3fd96d612ecb7bb2f8d7d))
|
|
42
|
+
|
|
43
|
+
### [0.0.2-dev.5](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.4...v0.0.2-dev.5) (2026-03-04)
|
|
44
|
+
|
|
45
|
+
### [0.0.2-dev.4](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.3...v0.0.2-dev.4) (2026-03-04)
|
|
46
|
+
|
|
47
|
+
### [0.0.2-dev.3](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.2...v0.0.2-dev.3) (2026-03-04)
|
|
48
|
+
|
|
49
|
+
### [0.0.2-dev.2](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.1...v0.0.2-dev.2) (2026-03-04)
|
|
50
|
+
|
|
5
51
|
### [0.0.2-dev.1](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.0...v0.0.2-dev.1) (2025-09-11)
|
|
6
52
|
|
|
7
53
|
|
package/build.zip
CHANGED
|
Binary file
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ColorPicker,
|
|
3
|
+
Group,
|
|
4
|
+
Label,
|
|
5
|
+
NumberInput,
|
|
6
|
+
SelectAssetKna,
|
|
7
|
+
Switch,
|
|
8
|
+
TextFormat,
|
|
9
|
+
} from "@vixoniccom/modules";
|
|
10
|
+
|
|
11
|
+
export const appearanceGroup = new Group({
|
|
12
|
+
id: "appearanceGroup",
|
|
13
|
+
label: "Apariencia",
|
|
14
|
+
items: [
|
|
15
|
+
new Label({ label: 'Diseño' }),
|
|
16
|
+
new ColorPicker({
|
|
17
|
+
id: 'backgroundColor',
|
|
18
|
+
label: 'Color de fondo',
|
|
19
|
+
description: 'Si subes una imagen de fondo, esta tapa el color.'
|
|
20
|
+
}),
|
|
21
|
+
new SelectAssetKna({
|
|
22
|
+
id: 'backgroundImage',
|
|
23
|
+
label: 'Imagen de fondo',
|
|
24
|
+
extensions: ['jpg', 'png'],
|
|
25
|
+
multiple: false,
|
|
26
|
+
description: 'JPG o PNG 16:9. Usa imágenes sobrias para que el gráfico se lea.',
|
|
27
|
+
}),
|
|
28
|
+
new Label({ label: 'Colores' }),
|
|
29
|
+
new Switch({
|
|
30
|
+
id: 'showGuidelines',
|
|
31
|
+
label: 'Mostrar líneas guía y eje',
|
|
32
|
+
defaultValue: false
|
|
33
|
+
}),
|
|
34
|
+
new Label({ label: 'Texto' }),
|
|
35
|
+
new TextFormat({
|
|
36
|
+
id: 'titleTypography',
|
|
37
|
+
label: 'Tipografía del título'
|
|
38
|
+
}),
|
|
39
|
+
new TextFormat({
|
|
40
|
+
id: 'tagsTypography',
|
|
41
|
+
label: 'Tipografía de las etiquetas'
|
|
42
|
+
}),
|
|
43
|
+
new ColorPicker({
|
|
44
|
+
id: 'legendFontColor',
|
|
45
|
+
label: 'Color de fuente de la leyenda'
|
|
46
|
+
}),
|
|
47
|
+
new TextFormat({
|
|
48
|
+
id: 'valuesTypography',
|
|
49
|
+
label: 'Tipografía de los valores',
|
|
50
|
+
}),
|
|
51
|
+
new Label({ label: 'Márgenes' }),
|
|
52
|
+
new NumberInput({
|
|
53
|
+
id: 'marginTop',
|
|
54
|
+
label: 'Superior',
|
|
55
|
+
description: 'En px.',
|
|
56
|
+
}),
|
|
57
|
+
new NumberInput({
|
|
58
|
+
id: 'marginLeft',
|
|
59
|
+
label: 'Izquierdo',
|
|
60
|
+
description: 'En px.',
|
|
61
|
+
}),
|
|
62
|
+
new NumberInput({
|
|
63
|
+
id: 'marginRight',
|
|
64
|
+
label: 'Derecho',
|
|
65
|
+
description: 'En px.',
|
|
66
|
+
}),
|
|
67
|
+
new NumberInput({
|
|
68
|
+
id: 'marginBottom',
|
|
69
|
+
label: 'Inferior',
|
|
70
|
+
description: 'En px.',
|
|
71
|
+
}),
|
|
72
|
+
]
|
|
73
|
+
})
|
|
@@ -1,135 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Group,
|
|
3
|
-
|
|
4
|
-
TextInput,
|
|
5
|
-
SelectInput,
|
|
6
|
-
TextFormat,
|
|
7
|
-
Switch,
|
|
8
|
-
NumberInput,
|
|
3
|
+
ServiceInput,
|
|
9
4
|
} from "@vixoniccom/modules";
|
|
10
|
-
import {
|
|
5
|
+
import { SheetSelectionId } from "../utils";
|
|
11
6
|
|
|
12
|
-
// Configuración de estilo: gráfico, título, leyenda
|
|
13
7
|
export const chartGroup = new Group({
|
|
14
8
|
id: "chartGroup",
|
|
15
|
-
label: "
|
|
9
|
+
label: "Gráficos",
|
|
16
10
|
items: [
|
|
17
|
-
|
|
18
|
-
new
|
|
19
|
-
id:
|
|
20
|
-
label:
|
|
21
|
-
|
|
22
|
-
{ label: "Barras", value: "bar" },
|
|
23
|
-
{ label: "Líneas", value: "line" },
|
|
24
|
-
{ label: "Área", value: "area" },
|
|
25
|
-
{ label: "Dispersión", value: "bubble" },
|
|
26
|
-
],
|
|
27
|
-
defaultValue: "bar",
|
|
28
|
-
}),
|
|
29
|
-
new SelectInput({
|
|
30
|
-
id: "barOrientation",
|
|
31
|
-
label: "Orientación de barras",
|
|
32
|
-
items: [
|
|
33
|
-
{ label: "Vertical", value: "vertical" },
|
|
34
|
-
{ label: "Horizontal", value: "horizontal" },
|
|
35
|
-
],
|
|
36
|
-
defaultValue: "vertical",
|
|
37
|
-
show: ShowValidations.chartTypeIsBar,
|
|
38
|
-
}),
|
|
39
|
-
new Switch({
|
|
40
|
-
id: "barStacked",
|
|
41
|
-
label: "Barras",
|
|
42
|
-
displayOnTrue: "apiladas",
|
|
43
|
-
displayOnFalse: "normales",
|
|
44
|
-
defaultValue: false,
|
|
45
|
-
show: ShowValidations.chartTypeIsBar,
|
|
46
|
-
}),
|
|
47
|
-
new Switch({
|
|
48
|
-
id: "darkMode",
|
|
49
|
-
label: "Gráfico en modo",
|
|
50
|
-
displayOnTrue: "oscuro",
|
|
51
|
-
displayOnFalse: "claro",
|
|
52
|
-
defaultValue: false,
|
|
53
|
-
}),
|
|
54
|
-
new Label({ label: "Título" }),
|
|
55
|
-
new Switch({
|
|
56
|
-
id: "titleEnabled",
|
|
57
|
-
label: "Mostrar título",
|
|
58
|
-
defaultValue: false,
|
|
59
|
-
}),
|
|
60
|
-
new TextInput({
|
|
61
|
-
id: "title",
|
|
62
|
-
label: "Título",
|
|
63
|
-
show: ShowValidations.titleEnabled,
|
|
11
|
+
SheetSelectionId,
|
|
12
|
+
new ServiceInput({
|
|
13
|
+
id: 'documentServices',
|
|
14
|
+
label: 'Planillas',
|
|
15
|
+
serviceType: 'SheetsReaderService',
|
|
64
16
|
required: true,
|
|
65
17
|
}),
|
|
66
|
-
new TextFormat({
|
|
67
|
-
id: "titleTextFormat",
|
|
68
|
-
label: "Título",
|
|
69
|
-
description: "Formato de texto para el título del gráfico.",
|
|
70
|
-
show: ShowValidations.titleEnabled,
|
|
71
|
-
}),
|
|
72
|
-
new TextInput({
|
|
73
|
-
id: "titlePadding",
|
|
74
|
-
label: "Márgenes de título",
|
|
75
|
-
description: "Márgenes para dar espacio en cada lado al título.",
|
|
76
|
-
show: ShowValidations.titleEnabled,
|
|
77
|
-
}),
|
|
78
|
-
new Label({ label: "Leyenda" }),
|
|
79
|
-
new Switch({
|
|
80
|
-
id: "legendEnabled",
|
|
81
|
-
label: "Mostrar leyenda",
|
|
82
|
-
defaultValue: false,
|
|
83
|
-
}),
|
|
84
|
-
new TextFormat({
|
|
85
|
-
id: "legendTextFormat",
|
|
86
|
-
label: "Leyenda",
|
|
87
|
-
description: "Formato de texto para la leyenda del gráfico.",
|
|
88
|
-
show: ShowValidations.legendEnabled,
|
|
89
|
-
}),
|
|
90
|
-
new SelectInput({
|
|
91
|
-
id: "legendPosition",
|
|
92
|
-
label: "Posición de leyenda",
|
|
93
|
-
items: [
|
|
94
|
-
{ label: "Izquierda", value: "left" },
|
|
95
|
-
{ label: "Derecha", value: "right" },
|
|
96
|
-
],
|
|
97
|
-
defaultValue: "left",
|
|
98
|
-
show: ShowValidations.legendEnabled,
|
|
99
|
-
}),
|
|
100
|
-
new NumberInput({
|
|
101
|
-
id: "legendMargin",
|
|
102
|
-
label: "Separación",
|
|
103
|
-
description: "Distancia (en px.) entre leyenda y gráfico",
|
|
104
|
-
show: ShowValidations.legendEnabled,
|
|
105
|
-
}),
|
|
106
|
-
new NumberInput({
|
|
107
|
-
id: "circleSize",
|
|
108
|
-
label: "Tamaño círculo",
|
|
109
|
-
description: "Tamaño (en px.) del cículo de color en la leyenda.",
|
|
110
|
-
show: ShowValidations.legendEnabled,
|
|
111
|
-
}),
|
|
112
|
-
new Label({ label: "Eje vertical" }),
|
|
113
|
-
new Switch({
|
|
114
|
-
id: "yAxisEnabled",
|
|
115
|
-
label: "Mostrar métricas",
|
|
116
|
-
defaultValue: true,
|
|
117
|
-
}),
|
|
118
|
-
new Switch({
|
|
119
|
-
id: "showVerticalGrid",
|
|
120
|
-
label: "Mostrar líneas verticales",
|
|
121
|
-
defaultValue: true,
|
|
122
|
-
}),
|
|
123
|
-
new Label({ label: "Eje horizontal" }),
|
|
124
|
-
new Switch({
|
|
125
|
-
id: "xAxisEnabled",
|
|
126
|
-
label: "Mostrar métricas",
|
|
127
|
-
defaultValue: true,
|
|
128
|
-
}),
|
|
129
|
-
new Switch({
|
|
130
|
-
id: "showHorizontalGrid",
|
|
131
|
-
label: "Mostrar líneas horizontales",
|
|
132
|
-
defaultValue: true,
|
|
133
|
-
}),
|
|
134
18
|
],
|
|
135
|
-
})
|
|
19
|
+
})
|
package/configuration/index.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { Configuration } from "@vixoniccom/modules";
|
|
2
|
-
import { generalGroup } from "./generalGroup";
|
|
3
2
|
import { chartGroup } from "./chartGroup";
|
|
4
|
-
import {
|
|
3
|
+
import { appearanceGroup } from "./appearanceGroup";
|
|
5
4
|
|
|
6
|
-
/**
|
|
7
|
-
* Clase que dictamina el esquema y es utilizada para generación de archivos
|
|
8
|
-
de configuración.
|
|
9
|
-
*/
|
|
10
5
|
export const configuration: Configuration = new Configuration({
|
|
11
|
-
schema: [
|
|
12
|
-
})
|
|
6
|
+
schema: [chartGroup, appearanceGroup],
|
|
7
|
+
})
|
package/configuration/utils.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const chartTypeIsBar = "{{chartType}} === 'bar'";
|
|
5
|
-
const customMessageEnabled = "{{customMessageEnabled}} === true";
|
|
1
|
+
import { Switch } from "@vixoniccom/modules"
|
|
2
|
+
|
|
3
|
+
const showGuidelines = "{{showGuidelines}} === true"
|
|
6
4
|
|
|
7
5
|
export const ShowValidations = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
showGuidelines,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//Identificador para vista de configuración de planillas. Esconder siempre.
|
|
10
|
+
export const SheetSelectionId = new Switch({
|
|
11
|
+
id: 'isSheetSelection',
|
|
12
|
+
label: 'isSheetSelection',
|
|
13
|
+
show: 'false'
|
|
14
|
+
})
|
package/configuration.json
CHANGED
|
@@ -1,277 +1,114 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": [
|
|
3
3
|
{
|
|
4
|
-
"id": "
|
|
5
|
-
"label": "
|
|
4
|
+
"id": "chartGroup",
|
|
5
|
+
"label": "Gráficos",
|
|
6
6
|
"type": "group",
|
|
7
7
|
"items": [
|
|
8
8
|
{
|
|
9
|
-
"
|
|
10
|
-
"label": "
|
|
9
|
+
"id": "isSheetSelection",
|
|
10
|
+
"label": "isSheetSelection",
|
|
11
|
+
"show": "false",
|
|
12
|
+
"type": "switch"
|
|
11
13
|
},
|
|
12
14
|
{
|
|
13
|
-
"id": "
|
|
14
|
-
"label": "
|
|
15
|
+
"id": "documentServices",
|
|
16
|
+
"label": "Planillas",
|
|
15
17
|
"type": "service-input",
|
|
16
|
-
"serviceType": "SheetsReaderService"
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
"id": "updateTime",
|
|
20
|
-
"label": "Actualización",
|
|
21
|
-
"type": "select-input",
|
|
22
|
-
"description": "Periodo de actualización de datos.",
|
|
23
|
-
"items": [
|
|
24
|
-
{
|
|
25
|
-
"label": "5 minutos",
|
|
26
|
-
"value": 300000
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"label": "10 minutos",
|
|
30
|
-
"value": 600000
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"label": "15 minutos",
|
|
34
|
-
"value": 900000
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"label": "30 minutos",
|
|
38
|
-
"value": 1800000
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"label": "1 hora",
|
|
42
|
-
"value": 3600000
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"defaultValue": 600000
|
|
18
|
+
"serviceType": "SheetsReaderService",
|
|
19
|
+
"required": true
|
|
46
20
|
}
|
|
47
21
|
]
|
|
48
22
|
},
|
|
49
23
|
{
|
|
50
|
-
"id": "
|
|
51
|
-
"label": "
|
|
24
|
+
"id": "appearanceGroup",
|
|
25
|
+
"label": "Apariencia",
|
|
52
26
|
"type": "group",
|
|
53
27
|
"items": [
|
|
54
28
|
{
|
|
55
29
|
"type": "label",
|
|
56
|
-
"label": "
|
|
30
|
+
"label": "Diseño"
|
|
57
31
|
},
|
|
58
32
|
{
|
|
59
|
-
"id": "
|
|
60
|
-
"label": "
|
|
61
|
-
"type": "
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"label": "Barras",
|
|
65
|
-
"value": "bar"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"label": "Líneas",
|
|
69
|
-
"value": "line"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"label": "Área",
|
|
73
|
-
"value": "area"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"label": "Dispersión",
|
|
77
|
-
"value": "bubble"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"defaultValue": "bar"
|
|
33
|
+
"id": "backgroundColor",
|
|
34
|
+
"label": "Color de fondo",
|
|
35
|
+
"type": "color-picker",
|
|
36
|
+
"description": "Si subes una imagen de fondo, esta tapa el color.",
|
|
37
|
+
"output": "auto"
|
|
81
38
|
},
|
|
82
39
|
{
|
|
83
|
-
"id": "
|
|
84
|
-
"label": "
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"value": "vertical"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"label": "Horizontal",
|
|
94
|
-
"value": "horizontal"
|
|
95
|
-
}
|
|
40
|
+
"id": "backgroundImage",
|
|
41
|
+
"label": "Imagen de fondo",
|
|
42
|
+
"type": "select-asset-kna-input",
|
|
43
|
+
"description": "JPG o PNG 16:9. Usa imágenes sobrias para que el gráfico se lea.",
|
|
44
|
+
"extensions": [
|
|
45
|
+
"jpg",
|
|
46
|
+
"png"
|
|
96
47
|
],
|
|
97
|
-
"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"id": "barStacked",
|
|
101
|
-
"label": "Barras",
|
|
102
|
-
"show": "{{chartType}} === 'bar'",
|
|
103
|
-
"type": "switch",
|
|
104
|
-
"defaultValue": false,
|
|
105
|
-
"displayOnTrue": "apiladas",
|
|
106
|
-
"displayOnFalse": "normales"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"id": "darkMode",
|
|
110
|
-
"label": "Gráfico en modo",
|
|
111
|
-
"type": "switch",
|
|
112
|
-
"defaultValue": false,
|
|
113
|
-
"displayOnTrue": "oscuro",
|
|
114
|
-
"displayOnFalse": "claro"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"type": "label",
|
|
118
|
-
"label": "Título"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"id": "titleEnabled",
|
|
122
|
-
"label": "Mostrar título",
|
|
123
|
-
"type": "switch",
|
|
124
|
-
"defaultValue": false
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"id": "title",
|
|
128
|
-
"label": "Título",
|
|
129
|
-
"show": "{{titleEnabled}} === true",
|
|
130
|
-
"type": "text-input",
|
|
131
|
-
"required": true
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"id": "titleTextFormat",
|
|
135
|
-
"label": "Título",
|
|
136
|
-
"show": "{{titleEnabled}} === true",
|
|
137
|
-
"type": "text-format",
|
|
138
|
-
"description": "Formato de texto para el título del gráfico."
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"id": "titlePadding",
|
|
142
|
-
"label": "Márgenes de título",
|
|
143
|
-
"show": "{{titleEnabled}} === true",
|
|
144
|
-
"type": "text-input",
|
|
145
|
-
"description": "Márgenes para dar espacio en cada lado al título."
|
|
48
|
+
"multiple": false
|
|
146
49
|
},
|
|
147
50
|
{
|
|
148
51
|
"type": "label",
|
|
149
|
-
"label": "
|
|
52
|
+
"label": "Colores"
|
|
150
53
|
},
|
|
151
54
|
{
|
|
152
|
-
"id": "
|
|
153
|
-
"label": "Mostrar
|
|
55
|
+
"id": "showGuidelines",
|
|
56
|
+
"label": "Mostrar líneas guía y eje",
|
|
154
57
|
"type": "switch",
|
|
155
58
|
"defaultValue": false
|
|
156
59
|
},
|
|
157
|
-
{
|
|
158
|
-
"id": "legendTextFormat",
|
|
159
|
-
"label": "Leyenda",
|
|
160
|
-
"show": "{{legendEnabled}} === true",
|
|
161
|
-
"type": "text-format",
|
|
162
|
-
"description": "Formato de texto para la leyenda del gráfico."
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"id": "legendPosition",
|
|
166
|
-
"label": "Posición de leyenda",
|
|
167
|
-
"show": "{{legendEnabled}} === true",
|
|
168
|
-
"type": "select-input",
|
|
169
|
-
"items": [
|
|
170
|
-
{
|
|
171
|
-
"label": "Izquierda",
|
|
172
|
-
"value": "left"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"label": "Derecha",
|
|
176
|
-
"value": "right"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"defaultValue": "left"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"id": "legendMargin",
|
|
183
|
-
"label": "Separación",
|
|
184
|
-
"show": "{{legendEnabled}} === true",
|
|
185
|
-
"type": "number-input",
|
|
186
|
-
"description": "Distancia (en px.) entre leyenda y gráfico"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"id": "circleSize",
|
|
190
|
-
"label": "Tamaño círculo",
|
|
191
|
-
"show": "{{legendEnabled}} === true",
|
|
192
|
-
"type": "number-input",
|
|
193
|
-
"description": "Tamaño (en px.) del cículo de color en la leyenda."
|
|
194
|
-
},
|
|
195
60
|
{
|
|
196
61
|
"type": "label",
|
|
197
|
-
"label": "
|
|
62
|
+
"label": "Texto"
|
|
198
63
|
},
|
|
199
64
|
{
|
|
200
|
-
"id": "
|
|
201
|
-
"label": "
|
|
202
|
-
"type": "
|
|
203
|
-
"defaultValue": true
|
|
65
|
+
"id": "titleTypography",
|
|
66
|
+
"label": "Tipografía del título",
|
|
67
|
+
"type": "text-format"
|
|
204
68
|
},
|
|
205
69
|
{
|
|
206
|
-
"id": "
|
|
207
|
-
"label": "
|
|
208
|
-
"type": "
|
|
209
|
-
"defaultValue": true
|
|
70
|
+
"id": "tagsTypography",
|
|
71
|
+
"label": "Tipografía de las etiquetas",
|
|
72
|
+
"type": "text-format"
|
|
210
73
|
},
|
|
211
74
|
{
|
|
212
|
-
"
|
|
213
|
-
"label": "
|
|
75
|
+
"id": "legendFontColor",
|
|
76
|
+
"label": "Color de fuente de la leyenda",
|
|
77
|
+
"type": "color-picker",
|
|
78
|
+
"output": "auto"
|
|
214
79
|
},
|
|
215
80
|
{
|
|
216
|
-
"id": "
|
|
217
|
-
"label": "
|
|
218
|
-
"type": "
|
|
219
|
-
"defaultValue": true
|
|
81
|
+
"id": "valuesTypography",
|
|
82
|
+
"label": "Tipografía de los valores",
|
|
83
|
+
"type": "text-format"
|
|
220
84
|
},
|
|
221
|
-
{
|
|
222
|
-
"id": "showHorizontalGrid",
|
|
223
|
-
"label": "Mostrar líneas horizontales",
|
|
224
|
-
"type": "switch",
|
|
225
|
-
"defaultValue": true
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"id": "styleGroup",
|
|
231
|
-
"label": "Estilo",
|
|
232
|
-
"type": "group",
|
|
233
|
-
"items": [
|
|
234
85
|
{
|
|
235
86
|
"type": "label",
|
|
236
|
-
"label": "
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"id": "appPadding",
|
|
240
|
-
"label": "Márgenes de aplicación",
|
|
241
|
-
"type": "text-input",
|
|
242
|
-
"description": "Márgenes para dar espacio en cada lado."
|
|
87
|
+
"label": "Márgenes"
|
|
243
88
|
},
|
|
244
89
|
{
|
|
245
|
-
"id": "
|
|
246
|
-
"label": "
|
|
247
|
-
"type": "
|
|
248
|
-
"
|
|
249
|
-
"jpg",
|
|
250
|
-
"png"
|
|
251
|
-
],
|
|
252
|
-
"multiple": false
|
|
90
|
+
"id": "marginTop",
|
|
91
|
+
"label": "Superior",
|
|
92
|
+
"type": "number-input",
|
|
93
|
+
"description": "En px."
|
|
253
94
|
},
|
|
254
95
|
{
|
|
255
|
-
"id": "
|
|
256
|
-
"label": "
|
|
257
|
-
"type": "
|
|
258
|
-
"
|
|
259
|
-
"displayOnTrue": "personalizado",
|
|
260
|
-
"displayOnFalse": "del sistema"
|
|
96
|
+
"id": "marginLeft",
|
|
97
|
+
"label": "Izquierdo",
|
|
98
|
+
"type": "number-input",
|
|
99
|
+
"description": "En px."
|
|
261
100
|
},
|
|
262
101
|
{
|
|
263
|
-
"id": "
|
|
264
|
-
"label": "
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"description": "Mensaje para mostrar en caso de datos inexistentes.",
|
|
268
|
-
"required": true
|
|
102
|
+
"id": "marginRight",
|
|
103
|
+
"label": "Derecho",
|
|
104
|
+
"type": "number-input",
|
|
105
|
+
"description": "En px."
|
|
269
106
|
},
|
|
270
107
|
{
|
|
271
|
-
"id": "
|
|
272
|
-
"label": "
|
|
273
|
-
"type": "
|
|
274
|
-
"description": "
|
|
108
|
+
"id": "marginBottom",
|
|
109
|
+
"label": "Inferior",
|
|
110
|
+
"type": "number-input",
|
|
111
|
+
"description": "En px."
|
|
275
112
|
}
|
|
276
113
|
]
|
|
277
114
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixoniccom/kpi-chart",
|
|
3
3
|
"alias": "KPI Chart",
|
|
4
|
-
"description": "Muestra
|
|
4
|
+
"description": "Muestra uno o más gráficos en rotación según indicadores KPI.",
|
|
5
5
|
"color": "#009900",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"tags": [],
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Lorenzo Alfaro Bravo"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.0.2-dev.
|
|
11
|
+
"version": "0.0.2-dev.11",
|
|
12
12
|
"scripts": {
|
|
13
|
-
"
|
|
13
|
+
"prepublish": "vixonic-module-packager --mode=build",
|
|
14
14
|
"watch": "vixonic-module-packager --mode=watch",
|
|
15
15
|
"run": "vixonic-module-packager --mode=run",
|
|
16
16
|
"configuration": "vixonic-module-packager --mode generate-configuration",
|
|
@@ -21,15 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"react": "^17.0.2",
|
|
24
|
-
"react-charts": "^3.0.0-beta.57",
|
|
25
24
|
"react-dom": "^17.0.2",
|
|
26
25
|
"react-loader-spinner": "^6.1.6"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
28
|
"@types/react": "^17.0.2",
|
|
30
29
|
"@types/react-dom": "^17.0.11",
|
|
31
|
-
"@vixoniccom/module-packager": "
|
|
32
|
-
"@vixoniccom/modules": "^2.
|
|
30
|
+
"@vixoniccom/module-packager": "2.15.0-dev.7",
|
|
31
|
+
"@vixoniccom/modules": "^2.26.4",
|
|
33
32
|
"standard-version": "^9.5.0"
|
|
34
33
|
}
|
|
35
34
|
}
|
package/renovate.json
ADDED
package/sonar-project.properties
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
sonar.projectKey=Vixonic_store-sheets-kpi_12e7b95b-fc91-4f7e-a0e7-1dd33cc0de3d
|
|
1
|
+
sonar.projectKey=Vixonic_store-sheets-kpi_12e7b95b-fc91-4f7e-a0e7-1dd33cc0de3d
|
|
2
|
+
sonar.exclusions=.github/**/*
|
|
@@ -1,98 +0,0 @@
|
|
|
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'"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Group,
|
|
3
|
-
Label,
|
|
4
|
-
SelectInput,
|
|
5
|
-
ServiceInput,
|
|
6
|
-
} from "@vixoniccom/modules";
|
|
7
|
-
|
|
8
|
-
// Configuración general: URL fuente, cantidad de columnas y filas, tiempo de actualización y mensaje por defecto
|
|
9
|
-
export const generalGroup = new Group({
|
|
10
|
-
id: "generalGroup",
|
|
11
|
-
label: "General",
|
|
12
|
-
items: [
|
|
13
|
-
new Label({ label: "Datos" }),
|
|
14
|
-
new ServiceInput({
|
|
15
|
-
id: 'documentService',
|
|
16
|
-
label: 'Documento',
|
|
17
|
-
serviceType: 'SheetsReaderService',
|
|
18
|
-
}),
|
|
19
|
-
new SelectInput({
|
|
20
|
-
id: "updateTime",
|
|
21
|
-
label: "Actualización",
|
|
22
|
-
items: [
|
|
23
|
-
{ label: "5 minutos", value: 300000 },
|
|
24
|
-
{ label: "10 minutos", value: 600000 },
|
|
25
|
-
{ label: "15 minutos", value: 900000 },
|
|
26
|
-
{ label: "30 minutos", value: 1800000 },
|
|
27
|
-
{ label: "1 hora", value: 3600000 },
|
|
28
|
-
],
|
|
29
|
-
description: "Periodo de actualización de datos.",
|
|
30
|
-
defaultValue: 600000,
|
|
31
|
-
}),
|
|
32
|
-
],
|
|
33
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Group,
|
|
3
|
-
Label,
|
|
4
|
-
TextInput,
|
|
5
|
-
TextFormat,
|
|
6
|
-
SelectAssetKna,
|
|
7
|
-
Switch,
|
|
8
|
-
} from "@vixoniccom/modules";
|
|
9
|
-
import { ShowValidations } from "../utils";
|
|
10
|
-
|
|
11
|
-
// Configuración de estilo: padding, fondo y formato de texto por defecto
|
|
12
|
-
export const styleGroup = new Group({
|
|
13
|
-
id: "styleGroup",
|
|
14
|
-
label: "Estilo",
|
|
15
|
-
items: [
|
|
16
|
-
new Label({
|
|
17
|
-
label: "Contenido",
|
|
18
|
-
}),
|
|
19
|
-
new TextInput({
|
|
20
|
-
id: "appPadding",
|
|
21
|
-
label: "Márgenes de aplicación",
|
|
22
|
-
description: "Márgenes para dar espacio en cada lado.",
|
|
23
|
-
}),
|
|
24
|
-
new SelectAssetKna({
|
|
25
|
-
id: "backgroundImage",
|
|
26
|
-
label: "Fondo",
|
|
27
|
-
extensions: ["jpg", "png"],
|
|
28
|
-
}),
|
|
29
|
-
new Switch({
|
|
30
|
-
id: "customMessageEnabled",
|
|
31
|
-
label: "Mostrar mensaje",
|
|
32
|
-
displayOnFalse: "del sistema",
|
|
33
|
-
displayOnTrue: "personalizado",
|
|
34
|
-
defaultValue: false,
|
|
35
|
-
}),
|
|
36
|
-
new TextInput({
|
|
37
|
-
id: "customMessage",
|
|
38
|
-
label: "Mensaje personalizado",
|
|
39
|
-
description: "Mensaje para mostrar en caso de datos inexistentes.",
|
|
40
|
-
required: true,
|
|
41
|
-
show: ShowValidations.customMessageEnabled,
|
|
42
|
-
}),
|
|
43
|
-
new TextFormat({
|
|
44
|
-
id: "systemMessageTextFormat",
|
|
45
|
-
label: "Formato de mensaje",
|
|
46
|
-
description: "Formato de texto para mensaje del sistema/personalizado.",
|
|
47
|
-
}),
|
|
48
|
-
],
|
|
49
|
-
});
|