@vixoniccom/aqi 0.0.2-dev.5 → 0.0.3-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/build.zip CHANGED
Binary file
@@ -1,9 +1,17 @@
1
- import { Label, NumberInput, SelectAssetKna, TextFormat, TextInput } from '@vixoniccom/modules'
1
+ import { Label, NumberInput, SelectAssetKna, SelectInput, TextFormat, TextInput } from '@vixoniccom/modules'
2
2
 
3
3
  export const appeareanceInputs = [
4
4
  new Label({ label: 'General' }),
5
5
  new SelectAssetKna({ id: 'backgroundImage', label: 'Fondo', required: false, extensions: ['jpg', 'png'] }),
6
-
6
+ new Label({ label: 'Posición' }),
7
+ new SelectInput({
8
+ id: 'positionCard',
9
+ label: 'Tipo de posición',
10
+ items: [
11
+ { label: 'Horizontal', value: 'horizontal' },
12
+ { label: 'Vertical', value: 'vertical' },
13
+ ],
14
+ }),
7
15
  new Label({ label: 'Diseño de la tarjeta' }),
8
16
  new NumberInput({
9
17
  id: 'topSeparationCard',
@@ -20,6 +20,25 @@
20
20
  ],
21
21
  "multiple": false
22
22
  },
23
+ {
24
+ "type": "label",
25
+ "label": "Posición"
26
+ },
27
+ {
28
+ "id": "positionCard",
29
+ "label": "Tipo de posición",
30
+ "type": "select-input",
31
+ "items": [
32
+ {
33
+ "value": "horizontal",
34
+ "label": "Horizontal"
35
+ },
36
+ {
37
+ "value": "vertical",
38
+ "label": "Vertical"
39
+ }
40
+ ]
41
+ },
23
42
  {
24
43
  "type": "label",
25
44
  "label": "Diseño de la tarjeta"
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "author": {
9
9
  "name": "Daniel Alvayay"
10
10
  },
11
- "version": "0.0.2-dev.5",
11
+ "version": "0.0.3-dev.2",
12
12
  "scripts": {
13
13
  "prepublish": "vixonic-module-packager --mode=build",
14
14
  "watch": "vixonic-module-packager --mode=watch",
@@ -28,8 +28,8 @@
28
28
  "devDependencies": {
29
29
  "@types/react": "^18.3.23",
30
30
  "@types/react-dom": "^18.3.7",
31
- "@vixoniccom/module-packager": "^2.13.0-dev.1",
32
- "@vixoniccom/modules": "^2.20.5-dev.1",
31
+ "@vixoniccom/module-packager": "^2.13.0",
32
+ "@vixoniccom/modules": "^2.25.0-dev.6",
33
33
  "standard-version": "^9.5.0"
34
34
  }
35
35
  }
@@ -1 +1,2 @@
1
- sonar.projectKey=Vixonic_store-air-quality-index_de6b8e55-8f87-4d53-b9d5-7e514a2702d9
1
+ sonar.projectKey=Vixonic_store-air-quality-index_de6b8e55-8f87-4d53-b9d5-7e514a2702d9
2
+ sonar.exclusions=.github/**/*
package/src/App.tsx CHANGED
@@ -67,7 +67,8 @@ export const App: React.FunctionComponent<Props> = ({ data, start }) => {
67
67
  cardGap: parameters?.cardGap,
68
68
  aqiFormat: parameters?.aqiFormat,
69
69
  stationFormat: parameters?.stationFormat,
70
- qualityFormat: parameters?.qualityFormat
70
+ qualityFormat: parameters?.qualityFormat,
71
+ positionCard: parameters?.positionCard
71
72
  }} />
72
73
  </div>
73
74
  ) : (
@@ -13,6 +13,7 @@ interface Props {
13
13
  aqiFormat?: TextFormat.Value;
14
14
  stationFormat?: TextFormat.Value;
15
15
  qualityFormat?: TextFormat.Value;
16
+ positionCard?: string;
16
17
  };
17
18
  }
18
19
 
@@ -25,7 +26,7 @@ export const Card: React.FunctionComponent<Props> = ({ data, format }) => {
25
26
  display: 'flex',
26
27
  width: `${format.cardWidth || 300}px`,
27
28
  height: `${format.cardHeight || 200}px`,
28
- flexDirection: 'column',
29
+ flexDirection: `${format.positionCard === 'vertical' ? 'column' : 'row'}`,
29
30
  backgroundColor: color,
30
31
  borderRadius: "10px"
31
32
  }}>
@@ -6,6 +6,7 @@ declare type VixonicData = {
6
6
 
7
7
  declare type VixonicParameters = Partial<{
8
8
  backgroundImage: { id?: string; filename?: string; extension?: string }
9
+ positionCard: 'horizontal' | 'vertical'
9
10
  topSeparationCard: number
10
11
  leftSeparationCard: number
11
12
  cardWidth: number
@@ -1,106 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - main
8
- - dalvayay/cd-con-variables-env
9
- pull_request:
10
- branches:
11
- - master
12
- - main
13
- types: [closed]
14
-
15
- jobs:
16
- publish:
17
- # Solo ejecutar si es un push a main/master o un merge a main/master
18
- if: github.event_name == 'push' || (github.event.pull_request.merged == true && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main'))
19
- runs-on: ubuntu-latest
20
-
21
- steps:
22
- - name: Checkout code
23
- uses: actions/checkout@v4
24
- with:
25
- fetch-depth: 0
26
-
27
- - name: Setup Node.js 20
28
- uses: actions/setup-node@v4
29
- with:
30
- node-version: '20'
31
- registry-url: 'https://registry.npmjs.org'
32
- scope: '@vixoniccom'
33
-
34
- - name: Configure npm authentication
35
- run: |
36
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
37
- echo "@vixoniccom:registry=https://registry.npmjs.org/" >> ~/.npmrc
38
- echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
39
-
40
- - name: Cache node modules
41
- uses: actions/cache@v3
42
- with:
43
- path: ~/.npm
44
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
45
- restore-keys: |
46
- ${{ runner.os }}-node-
47
-
48
- - name: Install dependencies
49
- run: npm ci
50
- env:
51
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52
-
53
- - name: Build package
54
- run: npm run prepublish
55
- env:
56
- AQI_TOKEN: ${{ secrets.AQI_TOKEN }}
57
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
58
-
59
- - name: Verify build.zip exists
60
- run: |
61
- if [ ! -f "build.zip" ]; then
62
- echo "❌ Error: build.zip not found after build process"
63
- exit 1
64
- fi
65
- echo "✅ build.zip found successfully"
66
- ls -la build.zip
67
-
68
- - name: Check if version already exists on npm
69
- id: check-version
70
- run: |
71
- PACKAGE_NAME=$(node -p "require('./package.json').name")
72
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
73
-
74
- echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
75
-
76
- if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
77
- echo "version-exists=true" >> $GITHUB_OUTPUT
78
- echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
79
- else
80
- echo "version-exists=false" >> $GITHUB_OUTPUT
81
- echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
82
- fi
83
-
84
- - name: Publish to npm
85
- if: steps.check-version.outputs.version-exists == 'false'
86
- run: |
87
- echo "Publishing to npm..."
88
- npm publish --access public
89
- env:
90
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
91
- AQI_TOKEN: ${{ secrets.AQI_TOKEN }}
92
-
93
- - name: Publication success
94
- if: steps.check-version.outputs.version-exists == 'false'
95
- run: |
96
- PACKAGE_NAME=$(node -p "require('./package.json').name")
97
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
98
- echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
99
- echo "📦 Package includes build.zip with the compiled application"
100
-
101
- - name: Skip publication
102
- if: steps.check-version.outputs.version-exists == 'true'
103
- run: |
104
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
105
- echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
106
- echo "💡 To publish a new version, update the version in package.json or run 'npm run release'"