@vixoniccom/news-internal 0.4.21-dev.4 → 0.4.21-dev.40
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 +13 -3
- package/CHANGELOG.md +138 -0
- package/build/main.js +1 -1
- package/build/test/parameters.json +14 -25
- package/build.zip +0 -0
- package/configuration/appearanceGroup/generalInputs.ts +4 -2
- package/configuration/appearanceGroup/index.ts +2 -2
- package/configuration/index.ts +2 -2
- package/configuration/newsGroup/index.ts +2 -1
- package/configuration/newsGroup/newsInputs.ts +1 -9
- package/configuration.json +11 -0
- package/package.json +2 -2
- package/src/components/App.tsx +7 -1
- package/src/components/FontLoader.tsx +1 -0
- package/src/components/FormattedText/index.tsx +3 -8
- package/src/components/NewsContainer/index.tsx +55 -31
- package/src/parameters.d.ts +115 -74
- package/src/test/parameters.json +14 -25
|
@@ -37,30 +37,6 @@
|
|
|
37
37
|
"qrCodeUrl": "https://vixonic.com/",
|
|
38
38
|
"qrCodeTitle": "Entra a Vixonic",
|
|
39
39
|
"expirationDate": ""
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"$$hashKey": "object:583",
|
|
43
|
-
"description": "Miau",
|
|
44
|
-
"image": {
|
|
45
|
-
"__type": "kna-resource",
|
|
46
|
-
"filename": "cat.jpg"
|
|
47
|
-
},
|
|
48
|
-
"title": "Gato",
|
|
49
|
-
"qrCodeUrl": "https://vixonic.com/",
|
|
50
|
-
"qrCodeTitle": "Entra a Vixonic",
|
|
51
|
-
"expirationDate": ""
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"$$hashKey": "object:653",
|
|
55
|
-
"description": "Guau",
|
|
56
|
-
"image": {
|
|
57
|
-
"__type": "kna-resource",
|
|
58
|
-
"filename": "dog.jpg"
|
|
59
|
-
},
|
|
60
|
-
"title": "Perro",
|
|
61
|
-
"qrCodeUrl": "https://mandomedio.com/",
|
|
62
|
-
"qrCodeTitle": "Entra a Mandomedio",
|
|
63
|
-
"expirationDate": "2026-05-30"
|
|
64
40
|
}
|
|
65
41
|
],
|
|
66
42
|
"padding": "25px 80px 120px 20px",
|
|
@@ -91,6 +67,19 @@
|
|
|
91
67
|
},
|
|
92
68
|
"fontColor": "#336699",
|
|
93
69
|
"fontSize": "36"
|
|
94
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"defaultMessageFormat": {
|
|
72
|
+
"font": {
|
|
73
|
+
"id": "7953953c-7029-4730-ae4d-cff4abd5288f",
|
|
74
|
+
"filename": "7953953c-7029-4730-ae4d-cff4abd5288f.ttf",
|
|
75
|
+
"__isAsset": true
|
|
76
|
+
},
|
|
77
|
+
"fontSize": 3.8,
|
|
78
|
+
"alignment": {
|
|
79
|
+
"horizontal": "left"
|
|
80
|
+
},
|
|
81
|
+
"fontColor": "#585858"
|
|
82
|
+
},
|
|
83
|
+
"defaultMessage": "No hay noticias disponibles en este momento."
|
|
95
84
|
}
|
|
96
85
|
}
|
package/build.zip
CHANGED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Label, SelectInput, NumberInput } from '@vixoniccom/modules'
|
|
2
|
-
import { NumberRangeValue, Slider } from '@vixoniccom/modules/dist/lib'
|
|
2
|
+
import { NumberRangeValue, Slider, TextFormat, TextInput } from '@vixoniccom/modules/dist/lib'
|
|
3
3
|
|
|
4
4
|
export const generalInputs = [
|
|
5
5
|
new Label({ label: 'General' }),
|
|
@@ -51,5 +51,7 @@ export const generalInputs = [
|
|
|
51
51
|
{ label: 'Distribuidos', value: 'space-around' },
|
|
52
52
|
{ label: 'Separados', value: 'space-between' }
|
|
53
53
|
]
|
|
54
|
-
})
|
|
54
|
+
}),
|
|
55
|
+
new TextInput({ id: 'defaultMessage', label: 'Mensaje sin noticias', description: 'Mensaje a mostrar cuando no existen noticias o han caducado' }),
|
|
56
|
+
new TextFormat({ id: 'defaultMessageFormat', label: 'Formato del mensaje sin noticias' }),
|
|
55
57
|
]
|
|
@@ -2,8 +2,8 @@ import { Group } from '@vixoniccom/modules'
|
|
|
2
2
|
import { generalInputs } from './generalInputs'
|
|
3
3
|
import { elementsInputs } from './elementsInputs'
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
id: '
|
|
5
|
+
export const appearanceGroup = new Group({
|
|
6
|
+
id: 'appearanceGroup',
|
|
7
7
|
label: 'Apariencia',
|
|
8
8
|
items: [
|
|
9
9
|
...generalInputs,
|
package/configuration/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Configuration } from '@vixoniccom/modules'
|
|
2
|
-
import {
|
|
2
|
+
import { appearanceGroup } from './appearanceGroup'
|
|
3
3
|
import { newsGroup } from './newsGroup'
|
|
4
4
|
|
|
5
5
|
export const configuration: Configuration = new Configuration({
|
|
6
6
|
durationFormula: `(_values.news && _values.news.filter(function(newsItem) { return new Date(newsItem.expirationDate) > new Date() || isNaN(new Date(newsItem.expirationDate)) ; }).length || 0) * (_values.showTime || 10)`,
|
|
7
|
-
schema: [newsGroup,
|
|
7
|
+
schema: [newsGroup, appearanceGroup],
|
|
8
8
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { List } from '@vixoniccom/modules'
|
|
1
|
+
import { List, NumberRangeValue } from '@vixoniccom/modules'
|
|
2
2
|
import { newsInputs } from './newsInputs'
|
|
3
3
|
|
|
4
4
|
export const newsGroup = new List({
|
|
@@ -7,6 +7,7 @@ export const newsGroup = new List({
|
|
|
7
7
|
description: 'Lista de noticias',
|
|
8
8
|
sortable: true,
|
|
9
9
|
itemSchema: [...newsInputs],
|
|
10
|
+
range: new NumberRangeValue(1, 200),
|
|
10
11
|
itemDisplayClass: '2-lines',
|
|
11
12
|
itemDisplayAttributes: {
|
|
12
13
|
title: 'title',
|
|
@@ -5,7 +5,6 @@ export const newsInputs = [
|
|
|
5
5
|
new TextInput({
|
|
6
6
|
id: 'title',
|
|
7
7
|
label: 'Título corto',
|
|
8
|
-
required: true,
|
|
9
8
|
show: ShowValidations.shortTitleEnabled,
|
|
10
9
|
range: new NumberRangeValue(1, 25),
|
|
11
10
|
pattern: '^(?!\\s*$).+',
|
|
@@ -13,15 +12,13 @@ export const newsInputs = [
|
|
|
13
12
|
new TextInput({
|
|
14
13
|
id: 'title',
|
|
15
14
|
label: 'Título mediano',
|
|
16
|
-
|
|
17
|
-
show: ShowValidations.titleEnabled,
|
|
15
|
+
show: ShowValidations.mediumTitleEnabled,
|
|
18
16
|
range: new NumberRangeValue(1, 40),
|
|
19
17
|
pattern: '^(?!\\s*$).+',
|
|
20
18
|
}),
|
|
21
19
|
new TextInput({
|
|
22
20
|
id: 'title',
|
|
23
21
|
label: 'Título largo',
|
|
24
|
-
required: true,
|
|
25
22
|
show: ShowValidations.largeTitleEnabled,
|
|
26
23
|
range: new NumberRangeValue(1, 50),
|
|
27
24
|
pattern: '^(?!\\s*$).+',
|
|
@@ -30,7 +27,6 @@ export const newsInputs = [
|
|
|
30
27
|
new TextInput({
|
|
31
28
|
id: 'title',
|
|
32
29
|
label: 'Título extra largo',
|
|
33
|
-
required: true,
|
|
34
30
|
show: ShowValidations.extraLargeTitleEnabled,
|
|
35
31
|
range: new NumberRangeValue(1, 70),
|
|
36
32
|
pattern: '^(?!\\s*$).+',
|
|
@@ -39,7 +35,6 @@ export const newsInputs = [
|
|
|
39
35
|
new TextArea({
|
|
40
36
|
id: 'description',
|
|
41
37
|
label: 'Descripción corta',
|
|
42
|
-
required: true,
|
|
43
38
|
show: ShowValidations.shortDescriptionEnabled,
|
|
44
39
|
range: new NumberRangeValue(1, 80),
|
|
45
40
|
html: true,
|
|
@@ -49,7 +44,6 @@ export const newsInputs = [
|
|
|
49
44
|
new TextArea({
|
|
50
45
|
id: 'description',
|
|
51
46
|
label: 'Descripción mediana',
|
|
52
|
-
required: true,
|
|
53
47
|
show: ShowValidations.mediumDescriptionEnabled,
|
|
54
48
|
range: new NumberRangeValue(1, 180),
|
|
55
49
|
html: true,
|
|
@@ -59,7 +53,6 @@ export const newsInputs = [
|
|
|
59
53
|
new TextArea({
|
|
60
54
|
id: 'description',
|
|
61
55
|
label: 'Descripción larga',
|
|
62
|
-
required: true,
|
|
63
56
|
show: ShowValidations.largeDescriptionEnabled,
|
|
64
57
|
range: new NumberRangeValue(1, 350),
|
|
65
58
|
html: true,
|
|
@@ -69,7 +62,6 @@ export const newsInputs = [
|
|
|
69
62
|
new TextArea({
|
|
70
63
|
id: 'description',
|
|
71
64
|
label: 'Descripción extra larga',
|
|
72
|
-
required: true,
|
|
73
65
|
show: ShowValidations.extraLargeDescriptionEnabled,
|
|
74
66
|
range: new NumberRangeValue(1, 500),
|
|
75
67
|
html: true,
|
package/configuration.json
CHANGED
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
],
|
|
121
121
|
"description": "Lista de noticias",
|
|
122
|
+
"range": "[1:200]",
|
|
122
123
|
"itemDisplayClass": "2-lines",
|
|
123
124
|
"itemDisplayAttributes": {
|
|
124
125
|
"title": "title",
|
|
@@ -250,6 +251,16 @@
|
|
|
250
251
|
"required": true,
|
|
251
252
|
"defaultValue": "center"
|
|
252
253
|
},
|
|
254
|
+
{
|
|
255
|
+
"id": "defaultMessage",
|
|
256
|
+
"label": "Sin noticias",
|
|
257
|
+
"type": "text-input"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "defaultMessageFormat",
|
|
261
|
+
"label": "Formato mensaje sin noticias",
|
|
262
|
+
"type": "text-format"
|
|
263
|
+
},
|
|
253
264
|
{
|
|
254
265
|
"type": "label",
|
|
255
266
|
"label": "Elementos"
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"author": {
|
|
9
9
|
"name": ""
|
|
10
10
|
},
|
|
11
|
-
"version": "0.4.21-dev.
|
|
11
|
+
"version": "0.4.21-dev.40",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"prepublish": "vixonic-module-packager --mode=build",
|
|
14
14
|
"watch": "vixonic-module-packager --mode=watch",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/react-transition-group": "^4.4.12",
|
|
37
37
|
"@types/uuid": "^9.0.1",
|
|
38
38
|
"@vixoniccom/module-packager": "^2.13.0-dev.1",
|
|
39
|
-
"@vixoniccom/modules": "^2.
|
|
39
|
+
"@vixoniccom/modules": "^2.25.0-dev.17",
|
|
40
40
|
"standard-version": "^9.5.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/components/App.tsx
CHANGED
|
@@ -19,7 +19,13 @@ export const App: React.FunctionComponent<Props> = ({ data }) => {
|
|
|
19
19
|
let parsedImage
|
|
20
20
|
const qrUrl = n.qrCodeUrl
|
|
21
21
|
if (image?.filename) parsedImage = `${data.downloadsPath}/${image.filename}`
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
...rest,
|
|
25
|
+
image: parsedImage,
|
|
26
|
+
id: uuid(),
|
|
27
|
+
qrCodeUrl: qrUrl
|
|
28
|
+
}
|
|
23
29
|
}).filter((n) => {
|
|
24
30
|
const { expirationDate } = n
|
|
25
31
|
const today = dayjs()
|
|
@@ -47,8 +47,8 @@ export const FormattedText: React.FunctionComponent<Props> = (props) => {
|
|
|
47
47
|
|
|
48
48
|
const getHorizontalAlignment = (alignment: Aligment) => {
|
|
49
49
|
if (alignment) {
|
|
50
|
-
const hA = alignment
|
|
51
|
-
return alignments.hasOwnProperty(hA) ? alignments[alignment
|
|
50
|
+
const hA = alignment?.horizontal
|
|
51
|
+
return alignments.hasOwnProperty(hA) ? alignments[alignment?.horizontal] : 'flex-start'
|
|
52
52
|
}
|
|
53
53
|
return 'flex-start'
|
|
54
54
|
}
|
|
@@ -79,9 +79,4 @@ export const FormattedText: React.FunctionComponent<Props> = (props) => {
|
|
|
79
79
|
)
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
format: {},
|
|
84
|
-
lineHeight: 1,
|
|
85
|
-
unit: 'vh',
|
|
86
|
-
maxChar: undefined,
|
|
87
|
-
}
|
|
82
|
+
|
|
@@ -4,6 +4,7 @@ import { StandardItem } from '../StandardItem'
|
|
|
4
4
|
import { GalleryItem } from '../GalleryItem'
|
|
5
5
|
import { GradientItem } from '../GradientItem'
|
|
6
6
|
import './styles.css'
|
|
7
|
+
import { FormattedText } from '../FormattedText'
|
|
7
8
|
|
|
8
9
|
type Props = {
|
|
9
10
|
data: VixonicData
|
|
@@ -12,11 +13,17 @@ type Props = {
|
|
|
12
13
|
|
|
13
14
|
export const NewsContainer: React.FunctionComponent<Props> = (props) => {
|
|
14
15
|
const { parameters, downloadsPath } = props.data
|
|
15
|
-
const { animationSpeed } = parameters
|
|
16
|
+
const { animationSpeed, defaultMessage } = parameters
|
|
16
17
|
const timerRef = useRef<number | undefined>(undefined)
|
|
17
18
|
const [currentIndex, setCurrentIndex] = useState(0)
|
|
18
19
|
const item = props.items.length > currentIndex ? props.items[currentIndex] : undefined
|
|
19
20
|
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (props.items.length > 0 && currentIndex >= props.items.length) {
|
|
23
|
+
setCurrentIndex(0)
|
|
24
|
+
}
|
|
25
|
+
}, [props.items.length])
|
|
26
|
+
|
|
20
27
|
useEffect(() => {
|
|
21
28
|
startTimeout()
|
|
22
29
|
return () => {
|
|
@@ -25,7 +32,7 @@ export const NewsContainer: React.FunctionComponent<Props> = (props) => {
|
|
|
25
32
|
}, [currentIndex, props.items])
|
|
26
33
|
|
|
27
34
|
const startTimeout = () => {
|
|
28
|
-
const showTime = props.data?.parameters?.showTime
|
|
35
|
+
const showTime = props.data?.parameters?.showTime ?? 10
|
|
29
36
|
const time = showTime * 1000
|
|
30
37
|
timerRef.current = window.setTimeout(nextItem, time)
|
|
31
38
|
}
|
|
@@ -36,36 +43,53 @@ export const NewsContainer: React.FunctionComponent<Props> = (props) => {
|
|
|
36
43
|
setCurrentIndex(newIndex)
|
|
37
44
|
}
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
backgroundColor: parameters.gradientBackgroundColor || 'red'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
<CSSTransition key={item.id} classNames={parameters.animationType || 'fade'} timeout={(1750 / (animationSpeed || 1)) * 2}>
|
|
45
|
-
<div className={'news-item-container'}>
|
|
46
|
-
{
|
|
47
|
-
<GradientItem parameters={parameters} item={item} />
|
|
48
|
-
}
|
|
49
|
-
</div>
|
|
50
|
-
</CSSTransition>
|
|
51
|
-
}
|
|
52
|
-
</TransitionGroup>
|
|
53
|
-
|
|
54
|
-
} else {
|
|
55
|
-
return <TransitionGroup className='main-container' style={{
|
|
46
|
+
const getContainerStyles = () => {
|
|
47
|
+
if (parameters.template === 'gradient') {
|
|
48
|
+
return { backgroundColor: parameters.gradientBackgroundColor || 'red' }
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
56
51
|
padding: parameters.padding,
|
|
57
52
|
backgroundImage: parameters.background && `url("${downloadsPath}/${parameters.background.filename}")`
|
|
58
|
-
}
|
|
59
|
-
{item &&
|
|
60
|
-
<CSSTransition key={item.id} classNames={parameters.animationType || 'fade'} timeout={(1750 / (animationSpeed || 1)) * 2}>
|
|
61
|
-
<div className={'news-item-container'}>
|
|
62
|
-
{parameters.template !== 'gallery'
|
|
63
|
-
? <StandardItem parameters={parameters} item={item} />
|
|
64
|
-
: <GalleryItem parameters={parameters} item={item} />
|
|
65
|
-
}
|
|
66
|
-
</div>
|
|
67
|
-
</CSSTransition>
|
|
68
|
-
}
|
|
69
|
-
</TransitionGroup>
|
|
53
|
+
}
|
|
70
54
|
}
|
|
55
|
+
|
|
56
|
+
const renderNewsItem = (item: NewsItem) => {
|
|
57
|
+
if (parameters.template === 'gradient') {
|
|
58
|
+
return <GradientItem parameters={parameters} item={item} />
|
|
59
|
+
}
|
|
60
|
+
if (parameters.template === 'gallery') {
|
|
61
|
+
return <GalleryItem parameters={parameters} item={item} />
|
|
62
|
+
}
|
|
63
|
+
return <StandardItem parameters={parameters} item={item} />
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (props.items.length === 0 || !item) {
|
|
67
|
+
return (
|
|
68
|
+
<div className='main-container' style={getContainerStyles()}>
|
|
69
|
+
<div style={{
|
|
70
|
+
width: '100%',
|
|
71
|
+
height: '100%',
|
|
72
|
+
display: 'flex',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
alignItems: 'center'
|
|
75
|
+
}}>
|
|
76
|
+
<FormattedText text={defaultMessage || 'No existen noticias para mostrar'} format={parameters.defaultMessageFormat} />
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<TransitionGroup className='main-container' style={getContainerStyles()}>
|
|
84
|
+
<CSSTransition
|
|
85
|
+
key={item.id}
|
|
86
|
+
classNames={parameters.animationType || 'fade'}
|
|
87
|
+
timeout={(1750 / (animationSpeed || 1)) * 2}
|
|
88
|
+
>
|
|
89
|
+
<div className={'news-item-container'}>
|
|
90
|
+
{renderNewsItem(item)}
|
|
91
|
+
</div>
|
|
92
|
+
</CSSTransition>
|
|
93
|
+
</TransitionGroup>
|
|
94
|
+
)
|
|
71
95
|
}
|
package/src/parameters.d.ts
CHANGED
|
@@ -1,80 +1,121 @@
|
|
|
1
1
|
declare type VixonicData = {
|
|
2
2
|
downloadsPath: string
|
|
3
|
-
services: { [key: string]: { data?: any
|
|
3
|
+
services: { [key: string]: { data?: any, updatedAt?: number } }
|
|
4
4
|
parameters: VixonicParameters
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
declare type VixonicParameters =
|
|
7
|
+
declare type VixonicParameters =
|
|
8
|
+
Partial<{
|
|
8
9
|
news: {
|
|
9
|
-
title: string
|
|
10
|
-
description: string
|
|
11
|
-
image: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
10
|
+
title: string,
|
|
11
|
+
description: string,
|
|
12
|
+
image: {
|
|
13
|
+
id?: string,
|
|
14
|
+
filename?: string,
|
|
15
|
+
extension?: string
|
|
16
|
+
},
|
|
17
|
+
qrCodeUrl: string,
|
|
18
|
+
qrCodeTitle: string,
|
|
19
|
+
expirationDate: string,
|
|
20
|
+
__id: string | undefined}[],
|
|
21
|
+
newsSizeSelect: 'short' | 'medium' | 'large' | 'extra-large',
|
|
22
|
+
template: 'standard' | 'gallery' | 'gradient',
|
|
23
|
+
showTime: number, animationSpeed: number,
|
|
24
|
+
animationType: 'fade' | 'crossFade',
|
|
25
|
+
textAlignment: 'flex-start' | 'flex-end' | 'center' | 'space-around' | 'space-between',
|
|
26
|
+
defaultMessage: string
|
|
27
|
+
defaultMessageFormat: {
|
|
28
|
+
fontSize?: number,
|
|
29
|
+
fontColor?: string,
|
|
30
|
+
alignment?: {
|
|
31
|
+
horizontal?: 'left' | 'right' | 'center'},
|
|
32
|
+
font?: {
|
|
33
|
+
filename: string;
|
|
34
|
+
id: string;
|
|
35
|
+
__isAsset: true}
|
|
36
|
+
}
|
|
37
|
+
titleEnabled: boolean,
|
|
38
|
+
titleFormat: {
|
|
39
|
+
fontSize?: number,
|
|
40
|
+
fontColor?: string,
|
|
41
|
+
alignment?: {
|
|
42
|
+
horizontal?: 'left' | 'right' | 'center'
|
|
43
|
+
},
|
|
44
|
+
font?: {
|
|
45
|
+
filename: string,
|
|
46
|
+
id: string,
|
|
47
|
+
__isAsset: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
titleLineHeight: number,
|
|
51
|
+
descriptionEnabled: boolean,
|
|
52
|
+
descriptionFormat: {
|
|
53
|
+
fontSize?: number,
|
|
54
|
+
fontColor?: string,
|
|
55
|
+
alignment?: {
|
|
56
|
+
horizontal?: 'left' | 'right' | 'center'
|
|
57
|
+
},
|
|
58
|
+
font?: {
|
|
59
|
+
filename: string,
|
|
60
|
+
id: string,
|
|
61
|
+
__isAsset: true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
descriptionLineHeight: number,
|
|
65
|
+
textSeparation: number,
|
|
66
|
+
imageEnabled: boolean,
|
|
67
|
+
imageSize: 'small' | 'medium' | 'large' | 'custom',
|
|
68
|
+
imageCustomSize: number,
|
|
69
|
+
imagePosition: 'top' | 'right' | 'bottom' | 'left',
|
|
70
|
+
imageMode: 'contain' | 'cover' | 'fill' | 'none',
|
|
71
|
+
imageStyle: 'normal' | 'rounded' | 'circle' | 'hex',
|
|
72
|
+
imageSeparation: number,
|
|
73
|
+
gradientBackgroundColor: string,
|
|
74
|
+
gradientRate: number,
|
|
75
|
+
gradientOrientation: 'left' | 'right',
|
|
76
|
+
gradientTitleEnabled: boolean,
|
|
77
|
+
gradientTitle: string,
|
|
78
|
+
gradientTitlePositionX: number,
|
|
79
|
+
gradientTitlePositionY: number,
|
|
80
|
+
gradientTitleFormat: {
|
|
81
|
+
fontSize?: number,
|
|
82
|
+
fontColor?: string,
|
|
83
|
+
alignment?: {
|
|
84
|
+
horizontal?: 'left' | 'right' | 'center'
|
|
85
|
+
},
|
|
86
|
+
font?: {
|
|
87
|
+
filename: string,
|
|
88
|
+
id: string,
|
|
89
|
+
__isAsset: true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
barSize: 'small' | 'medium' | 'big',
|
|
93
|
+
barColor: string,
|
|
94
|
+
barOpacity: number,
|
|
95
|
+
iconVisible: boolean,
|
|
96
|
+
iconColor: string,
|
|
97
|
+
qrCodeEnabled: boolean,
|
|
98
|
+
qrCodeWidth: number,
|
|
99
|
+
qrCodeHeight: number,
|
|
100
|
+
qrCodePositionX: number,
|
|
101
|
+
qrCodePositionY: number,
|
|
102
|
+
qrCodeBackgroundColor: string,
|
|
103
|
+
qrCodeColor: string,
|
|
104
|
+
QrCodeTitleFormat: {
|
|
105
|
+
fontSize?: number,
|
|
106
|
+
fontColor?: string,
|
|
107
|
+
alignment?: {
|
|
108
|
+
horizontal?: 'left' | 'right' | 'center' },
|
|
109
|
+
font?: {
|
|
110
|
+
filename: string,
|
|
111
|
+
id: string,
|
|
112
|
+
__isAsset: true
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
background: {
|
|
116
|
+
id?: string,
|
|
117
|
+
filename?: string,
|
|
118
|
+
extension?: string
|
|
119
|
+
},
|
|
120
|
+
padding: string
|
|
121
|
+
}>
|
package/src/test/parameters.json
CHANGED
|
@@ -37,30 +37,6 @@
|
|
|
37
37
|
"qrCodeUrl": "https://vixonic.com/",
|
|
38
38
|
"qrCodeTitle": "Entra a Vixonic",
|
|
39
39
|
"expirationDate": ""
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"$$hashKey": "object:583",
|
|
43
|
-
"description": "Miau",
|
|
44
|
-
"image": {
|
|
45
|
-
"__type": "kna-resource",
|
|
46
|
-
"filename": "cat.jpg"
|
|
47
|
-
},
|
|
48
|
-
"title": "Gato",
|
|
49
|
-
"qrCodeUrl": "https://vixonic.com/",
|
|
50
|
-
"qrCodeTitle": "Entra a Vixonic",
|
|
51
|
-
"expirationDate": ""
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"$$hashKey": "object:653",
|
|
55
|
-
"description": "Guau",
|
|
56
|
-
"image": {
|
|
57
|
-
"__type": "kna-resource",
|
|
58
|
-
"filename": "dog.jpg"
|
|
59
|
-
},
|
|
60
|
-
"title": "Perro",
|
|
61
|
-
"qrCodeUrl": "https://mandomedio.com/",
|
|
62
|
-
"qrCodeTitle": "Entra a Mandomedio",
|
|
63
|
-
"expirationDate": "2026-05-30"
|
|
64
40
|
}
|
|
65
41
|
],
|
|
66
42
|
"padding": "25px 80px 120px 20px",
|
|
@@ -91,6 +67,19 @@
|
|
|
91
67
|
},
|
|
92
68
|
"fontColor": "#336699",
|
|
93
69
|
"fontSize": "36"
|
|
94
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"defaultMessageFormat": {
|
|
72
|
+
"font": {
|
|
73
|
+
"id": "7953953c-7029-4730-ae4d-cff4abd5288f",
|
|
74
|
+
"filename": "7953953c-7029-4730-ae4d-cff4abd5288f.ttf",
|
|
75
|
+
"__isAsset": true
|
|
76
|
+
},
|
|
77
|
+
"fontSize": 3.8,
|
|
78
|
+
"alignment": {
|
|
79
|
+
"horizontal": "left"
|
|
80
|
+
},
|
|
81
|
+
"fontColor": "#585858"
|
|
82
|
+
},
|
|
83
|
+
"defaultMessage": "No hay noticias disponibles en este momento."
|
|
95
84
|
}
|
|
96
85
|
}
|