@vixoniccom/kpi-chart 0.0.2-dev.19 → 0.0.2-dev.2
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/npm-publish.yml +98 -0
- package/.github/workflows/sonarqube.yml +4 -4
- package/CHANGELOG.md +0 -107
- package/build.zip +0 -0
- package/configuration/chartGroup/index.ts +125 -13
- package/configuration/generalGroup/index.ts +33 -0
- package/configuration/index.ts +8 -5
- package/configuration/styleGroup/index.ts +49 -0
- package/configuration/utils.ts +10 -3
- package/configuration.json +240 -233
- package/package.json +6 -5
- package/sonar-project.properties +1 -2
- package/.github/workflows/main.yml +0 -20
- package/configuration/appearanceGroup/index.ts +0 -183
- package/renovate.json +0 -4
|
@@ -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'"
|
|
@@ -3,7 +3,7 @@ name: Sonarqube Analysis
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
-
|
|
6
|
+
- development
|
|
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@v4
|
|
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@master
|
|
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@master
|
|
27
27
|
timeout-minutes: 5
|
|
28
28
|
env:
|
|
29
29
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,113 +2,6 @@
|
|
|
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.19](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.18...v0.0.2-dev.19) (2026-11-17)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* VXD-545 address the review of the PR ([c68ce56](https://github.com/Vixonic/store-sheets-kpi/commit/c68ce567802e52529934f1a71146c1c5a2bdbd61))
|
|
11
|
-
|
|
12
|
-
### [0.0.2-dev.18](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.17...v0.0.2-dev.18) (2026-11-10)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Features
|
|
16
|
-
|
|
17
|
-
* VXD-545 allow uploading the background image only from a PC ([6e62fc2](https://github.com/Vixonic/store-sheets-kpi/commit/6e62fc2546eff70bf026bfad9122e4ab1f987f01))
|
|
18
|
-
|
|
19
|
-
### [0.0.2-dev.17](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.16...v0.0.2-dev.17) (2026-11-10)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### Bug Fixes
|
|
23
|
-
|
|
24
|
-
* VXD-545 avoid CSS that older player browsers do not support ([90114c7](https://github.com/Vixonic/store-sheets-kpi/commit/90114c78750ffe91aa18d82192592c9d6f404744))
|
|
25
|
-
|
|
26
|
-
### [0.0.2-dev.16](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.15...v0.0.2-dev.16) (2026-11-10)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Bug Fixes
|
|
30
|
-
|
|
31
|
-
* VXD-545 keep the no data message on a single line ([2ca7466](https://github.com/Vixonic/store-sheets-kpi/commit/2ca746645f0fd0f7e869864ea6c0da21eacb7f65))
|
|
32
|
-
* VXD-545 parse header units without backtracking regex ([0b7efa8](https://github.com/Vixonic/store-sheets-kpi/commit/0b7efa83529f52b751332d2509b32f6c8a45bd9e))
|
|
33
|
-
|
|
34
|
-
### [0.0.2-dev.15](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.14...v0.0.2-dev.15) (2026-11-09)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Features
|
|
38
|
-
|
|
39
|
-
* VXD-545 plot the charts kept by the app over the KpiService tabs ([2f96e60](https://github.com/Vixonic/store-sheets-kpi/commit/2f96e60a352a1e37aec28b0bfe7a65d206407381))
|
|
40
|
-
|
|
41
|
-
### [0.0.2-dev.14](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.13...v0.0.2-dev.14) (2026-11-05)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Features
|
|
45
|
-
|
|
46
|
-
* VXD-545 use the KpiService type for the documents service ([e115d3f](https://github.com/Vixonic/store-sheets-kpi/commit/e115d3f64bbbb7a2f7476a5b2e6100db0cb2a353))
|
|
47
|
-
|
|
48
|
-
### [0.0.2-dev.13](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.12...v0.0.2-dev.13) (2026-11-05)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Features
|
|
52
|
-
|
|
53
|
-
* VXD-545 adjust appearance inputs to the new design ([5fc0c94](https://github.com/Vixonic/store-sheets-kpi/commit/5fc0c94bb40d0361a6bc83716ae14dc99c7f375d))
|
|
54
|
-
* VXD-545 show the charts of the kpi service in rotation ([bcd5b90](https://github.com/Vixonic/store-sheets-kpi/commit/bcd5b9030dd0d24aff494ca6390bbb344b0f8958))
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### Bug Fixes
|
|
58
|
-
|
|
59
|
-
* VXD-545 use left value for title alignment and update modules ([2bcd34a](https://github.com/Vixonic/store-sheets-kpi/commit/2bcd34ae1a2aa4fdf5cc804ca8e1377ae6bce49f))
|
|
60
|
-
|
|
61
|
-
### [0.0.2-dev.12](https://github.com/Vixonic/store-sheets-kpi/compare/v0.0.2-dev.11...v0.0.2-dev.12) (2026-10-30)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Features
|
|
65
|
-
|
|
66
|
-
* VXD-545 organize appearance configuration into sections and blocks ([d5cc6f6](https://github.com/Vixonic/store-sheets-kpi/commit/d5cc6f63e08609856489fbb97056dab070d74503))
|
|
67
|
-
|
|
68
|
-
### [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)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Features
|
|
72
|
-
|
|
73
|
-
* VXD-545 restructure configuration into chart and appearance groups ([3b20176](https://github.com/Vixonic/store-sheets-kpi/commit/3b20176be4f99830a519daf7dd6c8035455051ad))
|
|
74
|
-
* VXD-901 Add text formatting options for chart values and labels ([6cc17ad](https://github.com/Vixonic/store-sheets-kpi/commit/6cc17ad7f28337c973589784dfeca4544d3dbf73))
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### Bug Fixes
|
|
78
|
-
|
|
79
|
-
* fixed pipeline ([121e14c](https://github.com/Vixonic/store-sheets-kpi/commit/121e14c5f3f58a0c7c5f24a7a9ca5e44e40b84c2))
|
|
80
|
-
|
|
81
|
-
### [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)
|
|
82
|
-
|
|
83
|
-
### [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)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### Features
|
|
87
|
-
|
|
88
|
-
* VXD-901 Add text formatting options for chart values and labels ([6cc17ad](https://github.com/Vixonic/store-sheets-kpi/commit/6cc17ad7f28337c973589784dfeca4544d3dbf73))
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
### Bug Fixes
|
|
92
|
-
|
|
93
|
-
* fixed pipeline ([121e14c](https://github.com/Vixonic/store-sheets-kpi/commit/121e14c5f3f58a0c7c5f24a7a9ca5e44e40b84c2))
|
|
94
|
-
|
|
95
|
-
### [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)
|
|
96
|
-
|
|
97
|
-
### [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)
|
|
98
|
-
|
|
99
|
-
### [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)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
### Features
|
|
103
|
-
|
|
104
|
-
* 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))
|
|
105
|
-
|
|
106
|
-
### [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)
|
|
107
|
-
|
|
108
|
-
### [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)
|
|
109
|
-
|
|
110
|
-
### [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)
|
|
111
|
-
|
|
112
5
|
### [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)
|
|
113
6
|
|
|
114
7
|
### [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)
|
package/build.zip
CHANGED
|
Binary file
|
|
@@ -1,23 +1,135 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Group,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Label,
|
|
4
|
+
TextInput,
|
|
5
|
+
SelectInput,
|
|
6
|
+
TextFormat,
|
|
7
|
+
Switch,
|
|
8
|
+
NumberInput,
|
|
5
9
|
} from "@vixoniccom/modules";
|
|
10
|
+
import { ShowValidations } from "../utils";
|
|
6
11
|
|
|
12
|
+
// Configuración de estilo: gráfico, título, leyenda
|
|
7
13
|
export const chartGroup = new Group({
|
|
8
14
|
id: "chartGroup",
|
|
9
|
-
label: "
|
|
10
|
-
groupType: "sheetSelection",
|
|
15
|
+
label: "Gráfico",
|
|
11
16
|
items: [
|
|
12
|
-
new
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
new Label({ label: "General" }),
|
|
18
|
+
new SelectInput({
|
|
19
|
+
id: "chartType",
|
|
20
|
+
label: "Tipo de gŕafico",
|
|
21
|
+
items: [
|
|
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",
|
|
16
28
|
}),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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,
|
|
64
|
+
required: true,
|
|
65
|
+
}),
|
|
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,
|
|
21
133
|
}),
|
|
22
134
|
],
|
|
23
|
-
})
|
|
135
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
});
|
package/configuration/index.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Configuration } from "@vixoniccom/modules";
|
|
2
|
+
import { generalGroup } from "./generalGroup";
|
|
2
3
|
import { chartGroup } from "./chartGroup";
|
|
3
|
-
import {
|
|
4
|
+
import { styleGroup } from "./styleGroup";
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Clase que dictamina el esquema y es utilizada para generación de archivos
|
|
8
|
+
de configuración.
|
|
9
|
+
*/
|
|
5
10
|
export const configuration: Configuration = new Configuration({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
schema: [chartGroup, appearanceGroup],
|
|
9
|
-
})
|
|
11
|
+
schema: [generalGroup, chartGroup, styleGroup],
|
|
12
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
});
|
package/configuration/utils.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
// Declaración de condiciones de visualización de configuraciones
|
|
2
|
+
const titleEnabled = "{{titleEnabled}} === true";
|
|
3
|
+
const legendEnabled = "{{legendEnabled}} === true";
|
|
4
|
+
const chartTypeIsBar = "{{chartType}} === 'bar'";
|
|
5
|
+
const customMessageEnabled = "{{customMessageEnabled}} === true";
|
|
2
6
|
|
|
3
7
|
export const ShowValidations = {
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
titleEnabled,
|
|
9
|
+
legendEnabled,
|
|
10
|
+
chartTypeIsBar,
|
|
11
|
+
customMessageEnabled,
|
|
12
|
+
};
|
package/configuration.json
CHANGED
|
@@ -1,270 +1,277 @@
|
|
|
1
1
|
{
|
|
2
|
-
"durationFormula": "(_values.documentCharts ? Object.keys(_values.documentCharts).filter(function(name) { var chart = _values.documentCharts[name]; return chart && chart.inRotation && chart.plotType; }).length : 0) * (_values.chartDuration || 12)",
|
|
3
2
|
"schema": [
|
|
4
3
|
{
|
|
5
|
-
"id": "
|
|
6
|
-
"label": "
|
|
4
|
+
"id": "generalGroup",
|
|
5
|
+
"label": "General",
|
|
7
6
|
"type": "group",
|
|
8
7
|
"items": [
|
|
9
8
|
{
|
|
10
|
-
"
|
|
11
|
-
"label": "
|
|
9
|
+
"type": "label",
|
|
10
|
+
"label": "Datos"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "documentService",
|
|
14
|
+
"label": "Documento",
|
|
12
15
|
"type": "service-input",
|
|
13
|
-
"serviceType": "
|
|
16
|
+
"serviceType": "SheetsReaderService"
|
|
14
17
|
},
|
|
15
18
|
{
|
|
16
|
-
"id": "
|
|
17
|
-
"label": "",
|
|
18
|
-
"type": "
|
|
19
|
-
"
|
|
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
|
|
20
46
|
}
|
|
21
|
-
]
|
|
22
|
-
"groupType": "sheetSelection"
|
|
47
|
+
]
|
|
23
48
|
},
|
|
24
49
|
{
|
|
25
|
-
"id": "
|
|
26
|
-
"label": "
|
|
50
|
+
"id": "chartGroup",
|
|
51
|
+
"label": "Gráfico",
|
|
27
52
|
"type": "group",
|
|
28
53
|
"items": [
|
|
29
54
|
{
|
|
30
|
-
"
|
|
31
|
-
"label": "
|
|
32
|
-
"type": "section",
|
|
33
|
-
"labelContent": false,
|
|
34
|
-
"icon": "timer",
|
|
35
|
-
"items": [
|
|
36
|
-
{
|
|
37
|
-
"type": "block",
|
|
38
|
-
"id": "rotationBlock",
|
|
39
|
-
"divider": false,
|
|
40
|
-
"items": [
|
|
41
|
-
{
|
|
42
|
-
"id": "chartDuration",
|
|
43
|
-
"label": "Duración por gráfico",
|
|
44
|
-
"type": "number-input",
|
|
45
|
-
"range": "[4:90:]",
|
|
46
|
-
"description": "Segundos que se muestra cada gráfico, entre 4 y 90. Por defecto 12. Aplica a todos los gráficos."
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"id": "chartAnimation",
|
|
50
|
-
"label": "Animación de entrada",
|
|
51
|
-
"type": "select-input",
|
|
52
|
-
"description": "Se repite en cada cambio de gráfico y al iniciar el turno.",
|
|
53
|
-
"items": [
|
|
54
|
-
{
|
|
55
|
-
"label": "Crecer",
|
|
56
|
-
"value": "grow"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"label": "Ninguna",
|
|
60
|
-
"value": "none"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"defaultValue": "grow",
|
|
64
|
-
"inLine": true
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
]
|
|
55
|
+
"type": "label",
|
|
56
|
+
"label": "General"
|
|
69
57
|
},
|
|
70
58
|
{
|
|
71
|
-
"id": "
|
|
72
|
-
"label": "
|
|
73
|
-
"type": "
|
|
74
|
-
"labelContent": false,
|
|
75
|
-
"icon": "brush",
|
|
59
|
+
"id": "chartType",
|
|
60
|
+
"label": "Tipo de gŕafico",
|
|
61
|
+
"type": "select-input",
|
|
76
62
|
"items": [
|
|
77
63
|
{
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"label": "Imagen de fondo",
|
|
93
|
-
"type": "select-asset-kna-input",
|
|
94
|
-
"description": "JPG o PNG 16:9. Usa imágenes sobrias para que el gráfico se lea.",
|
|
95
|
-
"extensions": [
|
|
96
|
-
"jpg",
|
|
97
|
-
"png"
|
|
98
|
-
],
|
|
99
|
-
"multiple": false,
|
|
100
|
-
"pcOnly": true
|
|
101
|
-
}
|
|
102
|
-
]
|
|
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"
|
|
103
78
|
}
|
|
104
|
-
]
|
|
79
|
+
],
|
|
80
|
+
"defaultValue": "bar"
|
|
105
81
|
},
|
|
106
82
|
{
|
|
107
|
-
"id": "
|
|
108
|
-
"label": "
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"icon": "color-lens",
|
|
83
|
+
"id": "barOrientation",
|
|
84
|
+
"label": "Orientación de barras",
|
|
85
|
+
"show": "{{chartType}} === 'bar'",
|
|
86
|
+
"type": "select-input",
|
|
112
87
|
"items": [
|
|
113
88
|
{
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"label": "Colores de las series",
|
|
121
|
-
"type": "color-list-input",
|
|
122
|
-
"description": "Colores de las series para todos los gráficos, salvo que un gráfico defina los suyos. En tortas, cada porción toma el color en el mismo orden.",
|
|
123
|
-
"defaultValue": [
|
|
124
|
-
"#336AEA",
|
|
125
|
-
"#5FBFB1",
|
|
126
|
-
"#E8A33D"
|
|
127
|
-
],
|
|
128
|
-
"range": "[3:6:]",
|
|
129
|
-
"itemLabel": "Serie"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"id": "showGuidelines",
|
|
133
|
-
"label": "Mostrar líneas guía y eje",
|
|
134
|
-
"type": "switch",
|
|
135
|
-
"defaultValue": false
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"id": "guidelineColor",
|
|
139
|
-
"label": "Líneas guía",
|
|
140
|
-
"show": "{{showGuidelines}} === true",
|
|
141
|
-
"type": "color-picker",
|
|
142
|
-
"output": "auto",
|
|
143
|
-
"inLine": true
|
|
144
|
-
}
|
|
145
|
-
]
|
|
89
|
+
"label": "Vertical",
|
|
90
|
+
"value": "vertical"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"label": "Horizontal",
|
|
94
|
+
"value": "horizontal"
|
|
146
95
|
}
|
|
147
|
-
]
|
|
96
|
+
],
|
|
97
|
+
"defaultValue": "vertical"
|
|
148
98
|
},
|
|
149
99
|
{
|
|
150
|
-
"id": "
|
|
151
|
-
"label": "
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
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."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"type": "label",
|
|
149
|
+
"label": "Leyenda"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "legendEnabled",
|
|
153
|
+
"label": "Mostrar leyenda",
|
|
154
|
+
"type": "switch",
|
|
155
|
+
"defaultValue": false
|
|
156
|
+
},
|
|
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",
|
|
155
169
|
"items": [
|
|
156
170
|
{
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"label": "Título",
|
|
160
|
-
"description": "Nombre del gráfico, arriba.",
|
|
161
|
-
"divider": false,
|
|
162
|
-
"items": [
|
|
163
|
-
{
|
|
164
|
-
"id": "titleTypography",
|
|
165
|
-
"label": "Tipografía",
|
|
166
|
-
"type": "text-format",
|
|
167
|
-
"hidePicker": true
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"id": "titleAlignment",
|
|
171
|
-
"label": "Alineación",
|
|
172
|
-
"type": "select-input",
|
|
173
|
-
"items": [
|
|
174
|
-
{
|
|
175
|
-
"label": "Izquierda",
|
|
176
|
-
"value": "left"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"label": "Centro",
|
|
180
|
-
"value": "center"
|
|
181
|
-
}
|
|
182
|
-
],
|
|
183
|
-
"defaultValue": "left",
|
|
184
|
-
"inLine": true
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"id": "titleFontColor",
|
|
188
|
-
"label": "Color",
|
|
189
|
-
"type": "color-picker",
|
|
190
|
-
"output": "auto",
|
|
191
|
-
"inLine": true
|
|
192
|
-
}
|
|
193
|
-
]
|
|
171
|
+
"label": "Izquierda",
|
|
172
|
+
"value": "left"
|
|
194
173
|
},
|
|
195
174
|
{
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"label": "Etiquetas",
|
|
199
|
-
"description": "Categorías, leyenda y número de los ejes.",
|
|
200
|
-
"divider": true,
|
|
201
|
-
"items": [
|
|
202
|
-
{
|
|
203
|
-
"id": "tagsTypography",
|
|
204
|
-
"label": "Tipografía",
|
|
205
|
-
"type": "text-format",
|
|
206
|
-
"hidePicker": true
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"id": "legendFontColor",
|
|
210
|
-
"label": "Color",
|
|
211
|
-
"type": "color-picker",
|
|
212
|
-
"output": "auto",
|
|
213
|
-
"inLine": true
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"type": "block",
|
|
219
|
-
"id": "valuesTextBlock",
|
|
220
|
-
"label": "Valores",
|
|
221
|
-
"description": "Cifra de cada barra, punto o porción.",
|
|
222
|
-
"divider": true,
|
|
223
|
-
"items": [
|
|
224
|
-
{
|
|
225
|
-
"id": "valuesTypography",
|
|
226
|
-
"label": "Tipografía",
|
|
227
|
-
"type": "text-format",
|
|
228
|
-
"hidePicker": true
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"id": "valuesFontColor",
|
|
232
|
-
"label": "Color",
|
|
233
|
-
"type": "color-picker",
|
|
234
|
-
"output": "auto",
|
|
235
|
-
"inLine": true
|
|
236
|
-
}
|
|
237
|
-
]
|
|
175
|
+
"label": "Derecha",
|
|
176
|
+
"value": "right"
|
|
238
177
|
}
|
|
239
|
-
]
|
|
178
|
+
],
|
|
179
|
+
"defaultValue": "left"
|
|
240
180
|
},
|
|
241
181
|
{
|
|
242
|
-
"id": "
|
|
243
|
-
"label": "
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
+
{
|
|
196
|
+
"type": "label",
|
|
197
|
+
"label": "Eje vertical"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "yAxisEnabled",
|
|
201
|
+
"label": "Mostrar métricas",
|
|
202
|
+
"type": "switch",
|
|
203
|
+
"defaultValue": true
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "showVerticalGrid",
|
|
207
|
+
"label": "Mostrar líneas verticales",
|
|
208
|
+
"type": "switch",
|
|
209
|
+
"defaultValue": true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"type": "label",
|
|
213
|
+
"label": "Eje horizontal"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "xAxisEnabled",
|
|
217
|
+
"label": "Mostrar métricas",
|
|
218
|
+
"type": "switch",
|
|
219
|
+
"defaultValue": true
|
|
220
|
+
},
|
|
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
|
+
{
|
|
235
|
+
"type": "label",
|
|
236
|
+
"label": "Contenido"
|
|
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."
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"id": "backgroundImage",
|
|
246
|
+
"label": "Fondo",
|
|
247
|
+
"type": "select-asset-kna-input",
|
|
248
|
+
"extensions": [
|
|
249
|
+
"jpg",
|
|
250
|
+
"png"
|
|
251
|
+
],
|
|
252
|
+
"multiple": false
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "customMessageEnabled",
|
|
256
|
+
"label": "Mostrar mensaje",
|
|
257
|
+
"type": "switch",
|
|
258
|
+
"defaultValue": false,
|
|
259
|
+
"displayOnTrue": "personalizado",
|
|
260
|
+
"displayOnFalse": "del sistema"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"id": "customMessage",
|
|
264
|
+
"label": "Mensaje personalizado",
|
|
265
|
+
"show": "{{customMessageEnabled}} === true",
|
|
266
|
+
"type": "text-input",
|
|
267
|
+
"description": "Mensaje para mostrar en caso de datos inexistentes.",
|
|
268
|
+
"required": true
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "systemMessageTextFormat",
|
|
272
|
+
"label": "Formato de mensaje",
|
|
273
|
+
"type": "text-format",
|
|
274
|
+
"description": "Formato de texto para mensaje del sistema/personalizado."
|
|
268
275
|
}
|
|
269
276
|
]
|
|
270
277
|
}
|
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 un gráfico 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.2",
|
|
12
12
|
"scripts": {
|
|
13
|
-
"
|
|
13
|
+
"prepublishOnly": "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,14 +21,15 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"react": "^17.0.2",
|
|
24
|
+
"react-charts": "^3.0.0-beta.57",
|
|
24
25
|
"react-dom": "^17.0.2",
|
|
25
26
|
"react-loader-spinner": "^6.1.6"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@types/react": "^17.0.2",
|
|
29
30
|
"@types/react-dom": "^17.0.11",
|
|
30
|
-
"@vixoniccom/module-packager": "^2.
|
|
31
|
-
"@vixoniccom/modules": "^2.
|
|
31
|
+
"@vixoniccom/module-packager": "^2.13.0",
|
|
32
|
+
"@vixoniccom/modules": "^2.23.1",
|
|
32
33
|
"standard-version": "^9.5.0"
|
|
33
34
|
}
|
|
34
35
|
}
|
package/sonar-project.properties
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
sonar.projectKey=Vixonic_store-sheets-kpi_12e7b95b-fc91-4f7e-a0e7-1dd33cc0de3d
|
|
2
|
-
sonar.exclusions=.github/**/*
|
|
1
|
+
sonar.projectKey=Vixonic_store-sheets-kpi_12e7b95b-fc91-4f7e-a0e7-1dd33cc0de3d
|
|
@@ -1,20 +0,0 @@
|
|
|
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 }}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Block,
|
|
3
|
-
ColorListInput,
|
|
4
|
-
ColorPicker,
|
|
5
|
-
Group,
|
|
6
|
-
MarginInput,
|
|
7
|
-
NumberInput,
|
|
8
|
-
NumberRangeValue,
|
|
9
|
-
Section,
|
|
10
|
-
SelectAssetKna,
|
|
11
|
-
SelectInput,
|
|
12
|
-
Switch,
|
|
13
|
-
TextFormat,
|
|
14
|
-
} from "@vixoniccom/modules";
|
|
15
|
-
import { ShowValidations } from "../utils";
|
|
16
|
-
|
|
17
|
-
export const appearanceGroup = new Group({
|
|
18
|
-
id: "appearanceGroup",
|
|
19
|
-
label: "Apariencia",
|
|
20
|
-
items: [
|
|
21
|
-
new Section({
|
|
22
|
-
id: 'rotationSection',
|
|
23
|
-
label: 'Rotación',
|
|
24
|
-
icon: 'timer',
|
|
25
|
-
items: [
|
|
26
|
-
new Block({
|
|
27
|
-
id: 'rotationBlock',
|
|
28
|
-
items: [
|
|
29
|
-
new NumberInput({
|
|
30
|
-
id: 'chartDuration',
|
|
31
|
-
label: 'Duración por gráfico',
|
|
32
|
-
description: 'Segundos que se muestra cada gráfico, entre 4 y 90. Por defecto 12. Aplica a todos los gráficos.',
|
|
33
|
-
range: new NumberRangeValue(4, 90),
|
|
34
|
-
}),
|
|
35
|
-
new SelectInput({
|
|
36
|
-
id: 'chartAnimation',
|
|
37
|
-
label: 'Animación de entrada',
|
|
38
|
-
description: 'Se repite en cada cambio de gráfico y al iniciar el turno.',
|
|
39
|
-
items: [{ label: 'Crecer', value: 'grow' }, { label: 'Ninguna', value: 'none' }],
|
|
40
|
-
defaultValue: 'grow',
|
|
41
|
-
inLine: true,
|
|
42
|
-
}),
|
|
43
|
-
],
|
|
44
|
-
}),
|
|
45
|
-
],
|
|
46
|
-
}),
|
|
47
|
-
new Section({
|
|
48
|
-
id: 'designSection',
|
|
49
|
-
label: 'Diseño',
|
|
50
|
-
icon: 'brush',
|
|
51
|
-
items: [
|
|
52
|
-
new Block({
|
|
53
|
-
id: 'designBlock',
|
|
54
|
-
items: [
|
|
55
|
-
new ColorPicker({
|
|
56
|
-
id: 'backgroundColor',
|
|
57
|
-
label: 'Color de fondo',
|
|
58
|
-
description: 'Si subes una imagen de fondo, esta tapa el color.',
|
|
59
|
-
}),
|
|
60
|
-
new SelectAssetKna({
|
|
61
|
-
id: 'backgroundImage',
|
|
62
|
-
label: 'Imagen de fondo',
|
|
63
|
-
extensions: ['jpg', 'png'],
|
|
64
|
-
multiple: false,
|
|
65
|
-
description: 'JPG o PNG 16:9. Usa imágenes sobrias para que el gráfico se lea.',
|
|
66
|
-
pcOnly: true,
|
|
67
|
-
}),
|
|
68
|
-
],
|
|
69
|
-
}),
|
|
70
|
-
],
|
|
71
|
-
}),
|
|
72
|
-
new Section({
|
|
73
|
-
id: 'colorsSection',
|
|
74
|
-
label: 'Colores',
|
|
75
|
-
icon: 'color-lens',
|
|
76
|
-
items: [
|
|
77
|
-
new Block({
|
|
78
|
-
id: 'colorsBlock',
|
|
79
|
-
items: [
|
|
80
|
-
new ColorListInput({
|
|
81
|
-
id: 'seriesColors',
|
|
82
|
-
label: 'Colores de las series',
|
|
83
|
-
description: 'Colores de las series para todos los gráficos, salvo que un gráfico defina los suyos. En tortas, cada porción toma el color en el mismo orden.',
|
|
84
|
-
itemLabel: 'Serie',
|
|
85
|
-
range: new NumberRangeValue(3, 6),
|
|
86
|
-
defaultValue: ['#336AEA', '#5FBFB1', '#E8A33D'],
|
|
87
|
-
}),
|
|
88
|
-
new Switch({
|
|
89
|
-
id: 'showGuidelines',
|
|
90
|
-
label: 'Mostrar líneas guía y eje',
|
|
91
|
-
defaultValue: false
|
|
92
|
-
}),
|
|
93
|
-
new ColorPicker({
|
|
94
|
-
id: 'guidelineColor',
|
|
95
|
-
label: 'Líneas guía',
|
|
96
|
-
show: ShowValidations.showGuidelines
|
|
97
|
-
}),
|
|
98
|
-
],
|
|
99
|
-
}),
|
|
100
|
-
],
|
|
101
|
-
}),
|
|
102
|
-
new Section({
|
|
103
|
-
id: 'textSection',
|
|
104
|
-
label: 'Texto',
|
|
105
|
-
icon: 'title',
|
|
106
|
-
items: [
|
|
107
|
-
new Block({
|
|
108
|
-
id: 'titleTextBlock',
|
|
109
|
-
label: 'Título',
|
|
110
|
-
description: 'Nombre del gráfico, arriba.',
|
|
111
|
-
items: [
|
|
112
|
-
new TextFormat({
|
|
113
|
-
id: 'titleTypography',
|
|
114
|
-
label: 'Tipografía',
|
|
115
|
-
hidePicker: true,
|
|
116
|
-
}),
|
|
117
|
-
new SelectInput({
|
|
118
|
-
id: 'titleAlignment',
|
|
119
|
-
label: 'Alineación',
|
|
120
|
-
items: [{ label: 'Izquierda', value: 'left' }, { label: 'Centro', value: 'center'}],
|
|
121
|
-
defaultValue: 'left',
|
|
122
|
-
inLine: true,
|
|
123
|
-
}),
|
|
124
|
-
new ColorPicker({
|
|
125
|
-
id: 'titleFontColor',
|
|
126
|
-
label: 'Color',
|
|
127
|
-
}),
|
|
128
|
-
],
|
|
129
|
-
}),
|
|
130
|
-
new Block({
|
|
131
|
-
id: 'tagTextBlock',
|
|
132
|
-
label: 'Etiquetas',
|
|
133
|
-
description: 'Categorías, leyenda y número de los ejes.',
|
|
134
|
-
items: [
|
|
135
|
-
new TextFormat({
|
|
136
|
-
id: 'tagsTypography',
|
|
137
|
-
label: 'Tipografía',
|
|
138
|
-
hidePicker: true,
|
|
139
|
-
}),
|
|
140
|
-
new ColorPicker({
|
|
141
|
-
id: 'legendFontColor',
|
|
142
|
-
label: 'Color',
|
|
143
|
-
}),
|
|
144
|
-
],
|
|
145
|
-
divider: true,
|
|
146
|
-
}),
|
|
147
|
-
new Block({
|
|
148
|
-
id: 'valuesTextBlock',
|
|
149
|
-
label: 'Valores',
|
|
150
|
-
description: 'Cifra de cada barra, punto o porción.',
|
|
151
|
-
items: [
|
|
152
|
-
new TextFormat({
|
|
153
|
-
id: 'valuesTypography',
|
|
154
|
-
label: 'Tipografía',
|
|
155
|
-
hidePicker: true,
|
|
156
|
-
}),
|
|
157
|
-
new ColorPicker({
|
|
158
|
-
id: 'valuesFontColor',
|
|
159
|
-
label: 'Color',
|
|
160
|
-
}),
|
|
161
|
-
],
|
|
162
|
-
divider: true,
|
|
163
|
-
}),
|
|
164
|
-
],
|
|
165
|
-
}),
|
|
166
|
-
new Section({
|
|
167
|
-
id: 'marginSection',
|
|
168
|
-
label: 'Márgenes',
|
|
169
|
-
icon: 'fit-screen',
|
|
170
|
-
items: [
|
|
171
|
-
new Block({
|
|
172
|
-
id: 'marginBlock',
|
|
173
|
-
items: [
|
|
174
|
-
new MarginInput({
|
|
175
|
-
id: 'appMargin',
|
|
176
|
-
defaultValue: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
177
|
-
}),
|
|
178
|
-
],
|
|
179
|
-
}),
|
|
180
|
-
],
|
|
181
|
-
}),
|
|
182
|
-
],
|
|
183
|
-
})
|
package/renovate.json
DELETED