@vixoniccom/news-internal 0.4.2--dev
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/CHANGELOG.md +41 -0
- package/README.md +15 -0
- package/build.zip +0 -0
- package/configuration/appearanceGroup/elementsInputs.ts +64 -0
- package/configuration/appearanceGroup/generalInputs.ts +40 -0
- package/configuration/appearanceGroup/index.ts +12 -0
- package/configuration/index.ts +29 -0
- package/configuration/utils.ts +19 -0
- package/configuration.json +402 -0
- package/icon.png +0 -0
- package/package.json +34 -0
- package/tsconfig.json +37 -0
- package/tslint.json +5 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## [0.4.2](https://bitbucket.org/vixonicmodules/news-internal/compare/v0.4.1...v0.4.2) (2019-04-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* app starting timers during preload ([93ad98d](https://bitbucket.org/vixonicmodules/news-internal/commits/93ad98d))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.4.1](https://bitbucket.org/vixonicmodules/news-internal/compare/v0.4.0...v0.4.1) (2019-03-25)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* negative image separation now working ([136ed10](https://bitbucket.org/vixonicmodules/news-internal/commits/136ed10))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<a name="0.4.0"></a>
|
|
24
|
+
# 0.4.0 (2018-09-24)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* image logic & custom size ([3a7a8d8](https://bitbucket.org/vixonicmodules/news-internal/commits/3a7a8d8))
|
|
30
|
+
* multiline texts ([829954c](https://bitbucket.org/vixonicmodules/news-internal/commits/829954c))
|
|
31
|
+
* only apply exitDelay in gallery mode. ([f0eb638](https://bitbucket.org/vixonicmodules/news-internal/commits/f0eb638))
|
|
32
|
+
* removed ellipsis due to malfunctioning. ([460611d](https://bitbucket.org/vixonicmodules/news-internal/commits/460611d))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
* hex ([0c2722d](https://bitbucket.org/vixonicmodules/news-internal/commits/0c2722d))
|
|
38
|
+
* Image styles ([a702842](https://bitbucket.org/vixonicmodules/news-internal/commits/a702842))
|
|
39
|
+
* refactor to react ([27e2ea6](https://bitbucket.org/vixonicmodules/news-internal/commits/27e2ea6))
|
|
40
|
+
* release 0.1.1 ([4aa1044](https://bitbucket.org/vixonicmodules/news-internal/commits/4aa1044))
|
|
41
|
+
* update configuration ([b6bcdca](https://bitbucket.org/vixonicmodules/news-internal/commits/b6bcdca))
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# News internal
|
|
2
|
+
## Changelog
|
|
3
|
+
|
|
4
|
+
### [0.3.0]
|
|
5
|
+
#### Features
|
|
6
|
+
- Now works on web target.
|
|
7
|
+
|
|
8
|
+
### [0.2.2]
|
|
9
|
+
#### Fixes
|
|
10
|
+
- [A4007] Image disapears on electron 2 when no clip is set.
|
|
11
|
+
|
|
12
|
+
### [0.1.3] - 2017/07/20
|
|
13
|
+
#### Changed
|
|
14
|
+
- Updated news visualizer dependency to version [1.1.1].
|
|
15
|
+
- Fixed missing url quotes in background images and fonts.
|
package/build.zip
ADDED
|
Binary file
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Label, Switch, TextFormat, NumberInput, SelectInput } from '@vixonic/modules'
|
|
2
|
+
import { NumberRangeValue, ColorPicker, Slider, SelectAssetKna, TextInput } from '@vixonic/modules/dist/lib'
|
|
3
|
+
|
|
4
|
+
import { ShowValidations } from '../utils'
|
|
5
|
+
|
|
6
|
+
const createTextInputs = (scope: string, label: string, show: string) => {
|
|
7
|
+
return [
|
|
8
|
+
new Switch({ id: `${scope}Enabled`, label, defaultValue: true }),
|
|
9
|
+
new TextFormat({ id: `${scope}Format`, label: 'Formato', show }),
|
|
10
|
+
new NumberInput({ id: `${scope}MaxLength`, label: 'Caracteres máximos', show }),
|
|
11
|
+
new NumberInput({ id: `${scope}LineHeight`, label: 'Altura de línea', range: new NumberRangeValue(.8, 100), show })
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const elementsInputs = [
|
|
16
|
+
new Label({ label: 'Elementos' }),
|
|
17
|
+
...createTextInputs('title', 'Título', ShowValidations.titleEnabled),
|
|
18
|
+
...createTextInputs('description', 'Descripción', ShowValidations.descriptionEnabled),
|
|
19
|
+
new NumberInput({ id: 'textSeparation', label: 'Separación de textos', description: 'En pixeles.',
|
|
20
|
+
show: ShowValidations.titleAndDescription }),
|
|
21
|
+
new Switch({ id: 'imageEnabled', label: 'Imagen', defaultValue: true }),
|
|
22
|
+
new SelectInput({ id: 'imageSize', required: true, label: 'Tamaño', description: 'Relación de tamaño entre la imagen y los textos.', items: [
|
|
23
|
+
{ label : 'Pequeña', value : 'small' },
|
|
24
|
+
{ label : 'Mediana', value : 'medium' },
|
|
25
|
+
{ label : 'Grande', value : 'large' },
|
|
26
|
+
{ label: 'Personalizado', value: 'custom' }
|
|
27
|
+
], show: ShowValidations.isNotGallery}),
|
|
28
|
+
new NumberInput({ id: 'imageCustomSize', label: 'Tamaño personalizado', required: true, description: 'En porcentaje.',
|
|
29
|
+
range: new NumberRangeValue(1, 100), show: ShowValidations.isCustomSize }),
|
|
30
|
+
new SelectInput({ id: 'imagePosition', required: true, label: 'Posición', description: 'Posición de la imagen respecto al texto.', defaultValue: 'left', items: [
|
|
31
|
+
{label : 'Arriba', value : 'top'},
|
|
32
|
+
{label : 'Derecha', value : 'right'},
|
|
33
|
+
{label : 'Abajo', value : 'bottom'},
|
|
34
|
+
{label : 'Izquierda', value : 'left'}
|
|
35
|
+
], show: ShowValidations.isNotGallery }),
|
|
36
|
+
new SelectInput({ id: 'imageMode', required : true, label : 'Modo', description : 'Modo de ajuste de la imagen.', defaultValue : 'contain',
|
|
37
|
+
items : [
|
|
38
|
+
{label : 'Ajustar', value : 'contain'},
|
|
39
|
+
{label : 'Cubrir', value : 'cover'},
|
|
40
|
+
{label : 'Estirar', value : 'fill'},
|
|
41
|
+
{label : 'No ajustar', value : 'none'}
|
|
42
|
+
],
|
|
43
|
+
show : ShowValidations.imageEnabled }),
|
|
44
|
+
new SelectInput({ id: 'imageStyle', label: 'Estilo', items: [
|
|
45
|
+
{label: 'Normal', value: 'normal'},
|
|
46
|
+
{label: 'Redondeado', value: 'rounded'},
|
|
47
|
+
{label: 'Circular', value: 'circle'},
|
|
48
|
+
{label: 'Hexagonal', value: 'hex'}
|
|
49
|
+
], show: ShowValidations.isNotGallery }),
|
|
50
|
+
new NumberInput({ label: 'Separación', id: 'imageSeparation', description: 'En pixeles. Por defecto 10.', show: ShowValidations.isNotGallery }),
|
|
51
|
+
new Label({ label: 'Galeria', show: ShowValidations.isGallery }),
|
|
52
|
+
new SelectInput({ id: 'barSize', label: 'Tamaño de la barra', items: [
|
|
53
|
+
{ label: 'Pequeña', value: 'small' },
|
|
54
|
+
{ label: 'Mediana', value: 'medium' },
|
|
55
|
+
{ label: 'Grande', value: 'big' }
|
|
56
|
+
], show: ShowValidations.isGallery }),
|
|
57
|
+
new ColorPicker({ id: 'barColor', label: 'Color de la barra', show: ShowValidations.isGallery }),
|
|
58
|
+
new Slider({ id: 'barOpacity', label: 'Opacidad de la barra', min: 0, max: 1, step: 0.01, show: ShowValidations.isGallery }),
|
|
59
|
+
new Switch({ id: 'iconVisible', defaultValue: true, label: 'Ícono', show: ShowValidations.isGallery }),
|
|
60
|
+
new ColorPicker({ id: 'iconColor', label: 'Color del ícono', show: ShowValidations.galleryIconEnabled }),
|
|
61
|
+
new Label({ label: 'Avanzado' }),
|
|
62
|
+
new SelectAssetKna({ id: 'background', label: 'Fondo', extensions: ['jpg', 'jpeg', 'png'] }),
|
|
63
|
+
new TextInput({ id: 'padding', required: false, label: 'Márgenes', description: 'CSS para dar espacio arriba/derecha/abajo/izquieda.' })
|
|
64
|
+
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Label, SelectInput, NumberInput } from '@vixonic/modules'
|
|
2
|
+
import { NumberRangeValue, Slider } from '@vixonic/modules/dist/lib'
|
|
3
|
+
|
|
4
|
+
export const generalInputs = [
|
|
5
|
+
new Label({ label: 'General' }),
|
|
6
|
+
new SelectInput({ id: 'template', label: 'Modo', required: true, defaultValue: 'standard', items: [
|
|
7
|
+
{label: 'Estandar', value: 'standard'},
|
|
8
|
+
{label: 'Galeria', value: 'gallery'}
|
|
9
|
+
] }),
|
|
10
|
+
new NumberInput({
|
|
11
|
+
id: 'showTime', label: 'Persistencia',
|
|
12
|
+
description: 'Tiempo en segundos por noticia. Por defecto 10',
|
|
13
|
+
range: new NumberRangeValue(5, 9999)
|
|
14
|
+
}),
|
|
15
|
+
new Slider({
|
|
16
|
+
id: 'animationSpeed', label: 'Velocidad', required: true,
|
|
17
|
+
description: 'Rapidez de las transiciones',
|
|
18
|
+
min: 0.25, max: 3.25, step: 0.25, defaultValue: 1.75,
|
|
19
|
+
leftTip: 'Lento', rightTip: 'Rápido'
|
|
20
|
+
}),
|
|
21
|
+
new SelectInput({
|
|
22
|
+
id: 'animationType', label: 'Tipo de animación', required: true,
|
|
23
|
+
defaultValue: 'fade',
|
|
24
|
+
items: [
|
|
25
|
+
{label: 'Fundido', value: 'fade'},
|
|
26
|
+
{label: 'Fundido cruzado', value: 'crossFade'}
|
|
27
|
+
]
|
|
28
|
+
}),
|
|
29
|
+
new SelectInput({
|
|
30
|
+
id: 'textAlignment', label: 'Alineado vertical', description: 'La posición vertical de los textos.',
|
|
31
|
+
required: true, defaultValue: 'center',
|
|
32
|
+
items: [
|
|
33
|
+
{ label: 'Arriba', value: 'flex-start' },
|
|
34
|
+
{ label: 'Abajo', value: 'flex-end' },
|
|
35
|
+
{ label: 'Centrados', value: 'center' },
|
|
36
|
+
{ label: 'Distribuidos', value: 'space-around' },
|
|
37
|
+
{ label: 'Separados', value: 'space-between' }
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Group } from '@vixonic/modules'
|
|
2
|
+
import { generalInputs } from './generalInputs'
|
|
3
|
+
import { elementsInputs } from './elementsInputs'
|
|
4
|
+
|
|
5
|
+
export const appereanceGroup = new Group({
|
|
6
|
+
id: 'appaeranceGroup',
|
|
7
|
+
label: 'Apariencia',
|
|
8
|
+
items: [
|
|
9
|
+
...generalInputs,
|
|
10
|
+
...elementsInputs
|
|
11
|
+
]
|
|
12
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Configuration, List, TextInput, SelectAssetKna, TextArea } from '@vixonic/modules'
|
|
2
|
+
import { appereanceGroup } from './appearanceGroup'
|
|
3
|
+
import { ShowValidations } from './utils'
|
|
4
|
+
|
|
5
|
+
const newsList = new List({
|
|
6
|
+
id: 'news',
|
|
7
|
+
label: 'Noticias',
|
|
8
|
+
description: 'Lista de noticias',
|
|
9
|
+
sortable: true,
|
|
10
|
+
itemSchema: [
|
|
11
|
+
new TextInput({ id: 'title', label: 'Título', required: true, show: ShowValidations.titleEnabled }),
|
|
12
|
+
new TextArea({ id: 'description', label: 'Descripción', required: true, show: ShowValidations.descriptionEnabled }),
|
|
13
|
+
new SelectAssetKna({ id: 'image', label: 'Imágen', required: true,
|
|
14
|
+
extensions: ['jpg', 'jpeg', 'png', 'svg'], show: ShowValidations.imageEnabled})
|
|
15
|
+
],
|
|
16
|
+
itemDisplayClass: '2-lines',
|
|
17
|
+
itemDisplayAttributes: {
|
|
18
|
+
title: 'title',
|
|
19
|
+
subtitle: 'description'
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export const configuration: Configuration = new Configuration({
|
|
24
|
+
durationFormula: `({{news}} && {{news}}.length || 1) * ({{showTime}} || 10)`,
|
|
25
|
+
schema: [
|
|
26
|
+
newsList,
|
|
27
|
+
appereanceGroup
|
|
28
|
+
]
|
|
29
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const titleEnabled = '{{titleEnabled}} === true'
|
|
2
|
+
const descriptionEnabled = '{{descriptionEnabled}} === true'
|
|
3
|
+
const imageEnabled = '{{imageEnabled}} === true'
|
|
4
|
+
const isGallery = `{{template}} === 'gallery'`
|
|
5
|
+
const isNotGallery = `${imageEnabled} && ( ( ${isGallery} ) === false )`
|
|
6
|
+
const galleryIconEnabled = `${isGallery} && ({{iconVisible}} === true)`
|
|
7
|
+
const isCustomSize = `${isNotGallery} && ( {{imageSize}} === 'custom' )`
|
|
8
|
+
const titleAndDescription = `${titleEnabled} && ${descriptionEnabled}`
|
|
9
|
+
|
|
10
|
+
export const ShowValidations = {
|
|
11
|
+
titleEnabled,
|
|
12
|
+
descriptionEnabled,
|
|
13
|
+
imageEnabled,
|
|
14
|
+
isGallery,
|
|
15
|
+
galleryIconEnabled,
|
|
16
|
+
isNotGallery,
|
|
17
|
+
titleAndDescription,
|
|
18
|
+
isCustomSize
|
|
19
|
+
}
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
{
|
|
2
|
+
"durationFormula": "({{news}} && {{news}}.length || 1) * ({{showTime}} || 10)",
|
|
3
|
+
"schema": [
|
|
4
|
+
{
|
|
5
|
+
"type": "list",
|
|
6
|
+
"id": "news",
|
|
7
|
+
"label": "Noticias",
|
|
8
|
+
"itemSchema": [
|
|
9
|
+
{
|
|
10
|
+
"type": "text-input",
|
|
11
|
+
"id": "title",
|
|
12
|
+
"label": "Título",
|
|
13
|
+
"show": "{{titleEnabled}} === true",
|
|
14
|
+
"required": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "text-area",
|
|
18
|
+
"id": "description",
|
|
19
|
+
"label": "Descripción",
|
|
20
|
+
"show": "{{descriptionEnabled}} === true",
|
|
21
|
+
"required": true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "select-asset-kna-input",
|
|
25
|
+
"id": "image",
|
|
26
|
+
"label": "Imágen",
|
|
27
|
+
"show": "{{imageEnabled}} === true",
|
|
28
|
+
"required": true,
|
|
29
|
+
"extensions": [
|
|
30
|
+
"jpg",
|
|
31
|
+
"jpeg",
|
|
32
|
+
"png",
|
|
33
|
+
"svg"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"description": "Lista de noticias",
|
|
38
|
+
"itemDisplayClass": "2-lines",
|
|
39
|
+
"itemDisplayAttributes": {
|
|
40
|
+
"title": "title",
|
|
41
|
+
"subtitle": "description"
|
|
42
|
+
},
|
|
43
|
+
"sortable": true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "group",
|
|
47
|
+
"id": "appaeranceGroup",
|
|
48
|
+
"label": "Apariencia",
|
|
49
|
+
"items": [
|
|
50
|
+
{
|
|
51
|
+
"type": "label",
|
|
52
|
+
"label": "General"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "select-input",
|
|
56
|
+
"id": "template",
|
|
57
|
+
"label": "Modo",
|
|
58
|
+
"items": [
|
|
59
|
+
{
|
|
60
|
+
"label": "Estandar",
|
|
61
|
+
"value": "standard"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"label": "Galeria",
|
|
65
|
+
"value": "gallery"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"required": true,
|
|
69
|
+
"defaultValue": "standard"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "number-input",
|
|
73
|
+
"id": "showTime",
|
|
74
|
+
"label": "Persistencia",
|
|
75
|
+
"range": "[5:9999:]",
|
|
76
|
+
"description": "Tiempo en segundos por noticia. Por defecto 10"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "slider",
|
|
80
|
+
"id": "animationSpeed",
|
|
81
|
+
"label": "Velocidad",
|
|
82
|
+
"required": true,
|
|
83
|
+
"min": 0.25,
|
|
84
|
+
"max": 3.25,
|
|
85
|
+
"step": 0.25,
|
|
86
|
+
"defaultValue": 1.75,
|
|
87
|
+
"leftTip": "Lento",
|
|
88
|
+
"rightTip": "Rápido",
|
|
89
|
+
"description": "Rapidez de las transiciones"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "select-input",
|
|
93
|
+
"id": "animationType",
|
|
94
|
+
"label": "Tipo de animación",
|
|
95
|
+
"items": [
|
|
96
|
+
{
|
|
97
|
+
"label": "Fundido",
|
|
98
|
+
"value": "fade"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"label": "Fundido cruzado",
|
|
102
|
+
"value": "crossFade"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"required": true,
|
|
106
|
+
"defaultValue": "fade"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "select-input",
|
|
110
|
+
"id": "textAlignment",
|
|
111
|
+
"label": "Alineado vertical",
|
|
112
|
+
"description": "La posición vertical de los textos.",
|
|
113
|
+
"items": [
|
|
114
|
+
{
|
|
115
|
+
"label": "Arriba",
|
|
116
|
+
"value": "flex-start"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"label": "Abajo",
|
|
120
|
+
"value": "flex-end"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"label": "Centrados",
|
|
124
|
+
"value": "center"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"label": "Distribuidos",
|
|
128
|
+
"value": "space-around"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"label": "Separados",
|
|
132
|
+
"value": "space-between"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"required": true,
|
|
136
|
+
"defaultValue": "center"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "label",
|
|
140
|
+
"label": "Elementos"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "switch",
|
|
144
|
+
"id": "titleEnabled",
|
|
145
|
+
"label": "Título",
|
|
146
|
+
"defaultValue": true
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "text-format",
|
|
150
|
+
"id": "titleFormat",
|
|
151
|
+
"label": "Formato",
|
|
152
|
+
"show": "{{titleEnabled}} === true"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "number-input",
|
|
156
|
+
"id": "titleMaxLength",
|
|
157
|
+
"label": "Caracteres máximos",
|
|
158
|
+
"show": "{{titleEnabled}} === true"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "number-input",
|
|
162
|
+
"id": "titleLineHeight",
|
|
163
|
+
"label": "Altura de línea",
|
|
164
|
+
"show": "{{titleEnabled}} === true",
|
|
165
|
+
"range": "[0.8:100:]"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "switch",
|
|
169
|
+
"id": "descriptionEnabled",
|
|
170
|
+
"label": "Descripción",
|
|
171
|
+
"defaultValue": true
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "text-format",
|
|
175
|
+
"id": "descriptionFormat",
|
|
176
|
+
"label": "Formato",
|
|
177
|
+
"show": "{{descriptionEnabled}} === true"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "number-input",
|
|
181
|
+
"id": "descriptionMaxLength",
|
|
182
|
+
"label": "Caracteres máximos",
|
|
183
|
+
"show": "{{descriptionEnabled}} === true"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "number-input",
|
|
187
|
+
"id": "descriptionLineHeight",
|
|
188
|
+
"label": "Altura de línea",
|
|
189
|
+
"show": "{{descriptionEnabled}} === true",
|
|
190
|
+
"range": "[0.8:100:]"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "number-input",
|
|
194
|
+
"id": "textSeparation",
|
|
195
|
+
"label": "Separación de textos",
|
|
196
|
+
"show": "{{titleEnabled}} === true && {{descriptionEnabled}} === true",
|
|
197
|
+
"description": "En pixeles."
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "switch",
|
|
201
|
+
"id": "imageEnabled",
|
|
202
|
+
"label": "Imagen",
|
|
203
|
+
"defaultValue": true
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"type": "select-input",
|
|
207
|
+
"id": "imageSize",
|
|
208
|
+
"label": "Tamaño",
|
|
209
|
+
"show": "{{imageEnabled}} === true && ( ( {{template}} === 'gallery' ) === false )",
|
|
210
|
+
"description": "Relación de tamaño entre la imagen y los textos.",
|
|
211
|
+
"items": [
|
|
212
|
+
{
|
|
213
|
+
"label": "Pequeña",
|
|
214
|
+
"value": "small"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"label": "Mediana",
|
|
218
|
+
"value": "medium"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"label": "Grande",
|
|
222
|
+
"value": "large"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"label": "Personalizado",
|
|
226
|
+
"value": "custom"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"required": true
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"type": "number-input",
|
|
233
|
+
"id": "imageCustomSize",
|
|
234
|
+
"label": "Tamaño personalizado",
|
|
235
|
+
"show": "{{imageEnabled}} === true && ( ( {{template}} === 'gallery' ) === false ) && ( {{imageSize}} === 'custom' )",
|
|
236
|
+
"range": "[1:100:]",
|
|
237
|
+
"description": "En porcentaje.",
|
|
238
|
+
"required": true
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"type": "select-input",
|
|
242
|
+
"id": "imagePosition",
|
|
243
|
+
"label": "Posición",
|
|
244
|
+
"show": "{{imageEnabled}} === true && ( ( {{template}} === 'gallery' ) === false )",
|
|
245
|
+
"description": "Posición de la imagen respecto al texto.",
|
|
246
|
+
"items": [
|
|
247
|
+
{
|
|
248
|
+
"label": "Arriba",
|
|
249
|
+
"value": "top"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"label": "Derecha",
|
|
253
|
+
"value": "right"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"label": "Abajo",
|
|
257
|
+
"value": "bottom"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"label": "Izquierda",
|
|
261
|
+
"value": "left"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"required": true,
|
|
265
|
+
"defaultValue": "left"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"type": "select-input",
|
|
269
|
+
"id": "imageMode",
|
|
270
|
+
"label": "Modo",
|
|
271
|
+
"show": "{{imageEnabled}} === true",
|
|
272
|
+
"description": "Modo de ajuste de la imagen.",
|
|
273
|
+
"items": [
|
|
274
|
+
{
|
|
275
|
+
"label": "Ajustar",
|
|
276
|
+
"value": "contain"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"label": "Cubrir",
|
|
280
|
+
"value": "cover"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"label": "Estirar",
|
|
284
|
+
"value": "fill"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"label": "No ajustar",
|
|
288
|
+
"value": "none"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"required": true,
|
|
292
|
+
"defaultValue": "contain"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"type": "select-input",
|
|
296
|
+
"id": "imageStyle",
|
|
297
|
+
"label": "Estilo",
|
|
298
|
+
"show": "{{imageEnabled}} === true && ( ( {{template}} === 'gallery' ) === false )",
|
|
299
|
+
"items": [
|
|
300
|
+
{
|
|
301
|
+
"label": "Normal",
|
|
302
|
+
"value": "normal"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"label": "Redondeado",
|
|
306
|
+
"value": "rounded"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"label": "Circular",
|
|
310
|
+
"value": "circle"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"label": "Hexagonal",
|
|
314
|
+
"value": "hex"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"type": "number-input",
|
|
320
|
+
"id": "imageSeparation",
|
|
321
|
+
"label": "Separación",
|
|
322
|
+
"show": "{{imageEnabled}} === true && ( ( {{template}} === 'gallery' ) === false )",
|
|
323
|
+
"description": "En pixeles. Por defecto 10."
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"type": "label",
|
|
327
|
+
"label": "Galeria",
|
|
328
|
+
"show": "{{template}} === 'gallery'"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"type": "select-input",
|
|
332
|
+
"id": "barSize",
|
|
333
|
+
"label": "Tamaño de la barra",
|
|
334
|
+
"show": "{{template}} === 'gallery'",
|
|
335
|
+
"items": [
|
|
336
|
+
{
|
|
337
|
+
"label": "Pequeña",
|
|
338
|
+
"value": "small"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"label": "Mediana",
|
|
342
|
+
"value": "medium"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"label": "Grande",
|
|
346
|
+
"value": "big"
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"type": "color-picker",
|
|
352
|
+
"id": "barColor",
|
|
353
|
+
"label": "Color de la barra",
|
|
354
|
+
"show": "{{template}} === 'gallery'"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"type": "slider",
|
|
358
|
+
"id": "barOpacity",
|
|
359
|
+
"label": "Opacidad de la barra",
|
|
360
|
+
"show": "{{template}} === 'gallery'",
|
|
361
|
+
"min": 0,
|
|
362
|
+
"max": 1,
|
|
363
|
+
"step": 0.01
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"type": "switch",
|
|
367
|
+
"id": "iconVisible",
|
|
368
|
+
"label": "Ícono",
|
|
369
|
+
"show": "{{template}} === 'gallery'",
|
|
370
|
+
"defaultValue": true
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"type": "color-picker",
|
|
374
|
+
"id": "iconColor",
|
|
375
|
+
"label": "Color del ícono",
|
|
376
|
+
"show": "{{template}} === 'gallery' && ({{iconVisible}} === true)"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"type": "label",
|
|
380
|
+
"label": "Avanzado"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"type": "select-asset-kna-input",
|
|
384
|
+
"id": "background",
|
|
385
|
+
"label": "Fondo",
|
|
386
|
+
"extensions": [
|
|
387
|
+
"jpg",
|
|
388
|
+
"jpeg",
|
|
389
|
+
"png"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"type": "text-input",
|
|
394
|
+
"id": "padding",
|
|
395
|
+
"label": "Márgenes",
|
|
396
|
+
"description": "CSS para dar espacio arriba/derecha/abajo/izquieda.",
|
|
397
|
+
"required": false
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
}
|
package/icon.png
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vixoniccom/news-internal",
|
|
3
|
+
"alias": "Noticias internas",
|
|
4
|
+
"description": "Administre sus propias noticias.",
|
|
5
|
+
"color": "#D56A60",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"author": {
|
|
8
|
+
"name": ""
|
|
9
|
+
},
|
|
10
|
+
"version": "0.4.2--dev",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepublishOnly": "vixonic-module-packager --mode=build",
|
|
13
|
+
"watch": "vixonic-module-packager --mode=watch",
|
|
14
|
+
"run": "vixonic-module-packager --mode=run",
|
|
15
|
+
"configuration": "vixonic-module-packager --mode generate-configuration",
|
|
16
|
+
"configuration:validate": "vixonic-module-packager --mode validate-configuration",
|
|
17
|
+
"release": "standard-version"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"react": "^16.3.2",
|
|
21
|
+
"react-dom": "^16.3.2",
|
|
22
|
+
"react-transition-group": "^2.3.1",
|
|
23
|
+
"uuid": "^3.2.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^10.0.8",
|
|
27
|
+
"@types/react": "^16.3.14",
|
|
28
|
+
"@types/react-dom": "^16.0.5",
|
|
29
|
+
"@types/react-transition-group": "^2.0.9",
|
|
30
|
+
"@types/uuid": "^3.4.3",
|
|
31
|
+
"@vixoniccom/modules": "^2.2.0",
|
|
32
|
+
"standard-version": "^5.0.2"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2015",
|
|
4
|
+
"module": "es2015",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"checkJs": true,
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"downlevelIteration": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noImplicitReturns": true,
|
|
17
|
+
"noImplicitAny": true,
|
|
18
|
+
"noImplicitThis": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"sourceMap": true,
|
|
22
|
+
"keyofStringsOnly": true,
|
|
23
|
+
"types": [
|
|
24
|
+
"node"
|
|
25
|
+
],
|
|
26
|
+
"typeRoots": [
|
|
27
|
+
"./node_modules/@types",
|
|
28
|
+
"./src"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"./src/**/*"
|
|
33
|
+
],
|
|
34
|
+
"exclude": [
|
|
35
|
+
"./node_modules/**/*"
|
|
36
|
+
]
|
|
37
|
+
}
|