@vixoniccom/aniversarios 1.4.6-dev.1 → 1.4.7-dev.0
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 +9 -0
- package/build/main.js +1 -1
- package/build.zip +0 -0
- package/configuration/appearanceGroup/AppearanceInputs.ts +33 -9
- package/configuration/standardGroup/StandardInputs.ts +45 -28
- package/configuration/utils.ts +2 -0
- package/configuration.json +121 -29
- package/package.json +1 -1
- package/src/components/Render/index.tsx +32 -3
- package/src/parameters.d.ts +3 -82
- package/src/presets/preset1.json +33 -0
- package/src/presets/preset2.json +35 -0
- package/src/presets/preset3.json +29 -0
- package/tsconfig.json +1 -0
package/build.zip
CHANGED
|
Binary file
|
|
@@ -7,9 +7,23 @@ import {
|
|
|
7
7
|
Switch,
|
|
8
8
|
TextInput,
|
|
9
9
|
} from '@vixoniccom/modules'
|
|
10
|
+
import { ShowValidations } from '../utils'
|
|
10
11
|
|
|
11
12
|
export const appearanceInputs = [
|
|
12
|
-
new Label({ label: '
|
|
13
|
+
new Label({ label: 'Tema predefinido' }),
|
|
14
|
+
new SelectInput({
|
|
15
|
+
id: 'themePreset',
|
|
16
|
+
label: 'Tema',
|
|
17
|
+
description: 'Elige un tema para aplicar un estilo visual completo. Selecciona "Personalizado" para configurar cada campo de estilo de forma individual.',
|
|
18
|
+
items: [
|
|
19
|
+
{ label: 'Personalizado', value: 'personalizado' },
|
|
20
|
+
{ label: 'Aniversarios inferior', value: 'preset1' },
|
|
21
|
+
{ label: 'Aniversarios lista', value: 'preset2' },
|
|
22
|
+
{ label: 'Aniversarios vertical (1 persona)', value: 'preset3' },
|
|
23
|
+
],
|
|
24
|
+
}),
|
|
25
|
+
|
|
26
|
+
new Label({ label: 'Orientación', show: ShowValidations.personalizado }),
|
|
13
27
|
new SelectInput({
|
|
14
28
|
id: 'orientation',
|
|
15
29
|
required: true,
|
|
@@ -19,9 +33,10 @@ export const appearanceInputs = [
|
|
|
19
33
|
{ label: 'Vertical', value: 'v' },
|
|
20
34
|
],
|
|
21
35
|
defaultValue: 'h',
|
|
36
|
+
show: ShowValidations.personalizado,
|
|
22
37
|
}),
|
|
23
38
|
|
|
24
|
-
new Label({ label: 'Animación' }),
|
|
39
|
+
new Label({ label: 'Animación', show: ShowValidations.personalizado }),
|
|
25
40
|
new SelectInput({
|
|
26
41
|
id: 'animationMode',
|
|
27
42
|
required: true,
|
|
@@ -32,7 +47,8 @@ export const appearanceInputs = [
|
|
|
32
47
|
{ label: 'Derecha - izquierda', value: 'slideLeft' },
|
|
33
48
|
],
|
|
34
49
|
defaultValue: 'fade',
|
|
35
|
-
description: 'Por defecto, Fundido.'
|
|
50
|
+
description: 'Por defecto, Fundido.',
|
|
51
|
+
show: ShowValidations.personalizado,
|
|
36
52
|
}),
|
|
37
53
|
new SelectInput({
|
|
38
54
|
id: 'animationSpeed',
|
|
@@ -43,13 +59,15 @@ export const appearanceInputs = [
|
|
|
43
59
|
{ label: 'Rápida', value: 1 },
|
|
44
60
|
],
|
|
45
61
|
defaultValue: 1.5,
|
|
62
|
+
show: ShowValidations.personalizado,
|
|
46
63
|
}),
|
|
47
64
|
new Switch({
|
|
48
|
-
id:
|
|
49
|
-
label:
|
|
50
|
-
displayOnTrue:
|
|
51
|
-
displayOnFalse:
|
|
52
|
-
defaultValue: false
|
|
65
|
+
id: 'animationOrder',
|
|
66
|
+
label: 'Orden',
|
|
67
|
+
displayOnTrue: 'Invertido',
|
|
68
|
+
displayOnFalse: 'Normal',
|
|
69
|
+
defaultValue: false,
|
|
70
|
+
show: ShowValidations.personalizado,
|
|
53
71
|
}),
|
|
54
72
|
new NumberInput({
|
|
55
73
|
id: 'animationTime',
|
|
@@ -57,32 +75,37 @@ export const appearanceInputs = [
|
|
|
57
75
|
description: 'Duración de cada grupo de datos (en segundos).',
|
|
58
76
|
required: true,
|
|
59
77
|
range: new NumberRangeValue(1, 9999),
|
|
78
|
+
show: ShowValidations.personalizado,
|
|
60
79
|
}),
|
|
61
80
|
|
|
62
|
-
new Label({ label: 'Contenedor' }),
|
|
81
|
+
new Label({ label: 'Contenedor', show: ShowValidations.personalizado }),
|
|
63
82
|
new NumberInput({
|
|
64
83
|
id: 'containerColumns',
|
|
65
84
|
label: 'Columnas',
|
|
66
85
|
description: 'Cantidad de items horizontales. Por defecto, 1.',
|
|
67
86
|
range: new NumberRangeValue(1, 999),
|
|
87
|
+
show: ShowValidations.personalizado,
|
|
68
88
|
}),
|
|
69
89
|
new NumberInput({
|
|
70
90
|
id: 'containerColumnsGap',
|
|
71
91
|
label: 'Separador horizontal',
|
|
72
92
|
description: 'Espacio entre columnas (en porcentaje). Por defecto, 1%.',
|
|
73
93
|
range: new NumberRangeValue(1, 100),
|
|
94
|
+
show: ShowValidations.personalizado,
|
|
74
95
|
}),
|
|
75
96
|
new NumberInput({
|
|
76
97
|
id: 'containerRows',
|
|
77
98
|
label: 'Filas',
|
|
78
99
|
description: 'Cantidad de items verticales. Por defecto, 3.',
|
|
79
100
|
range: new NumberRangeValue(1, 999),
|
|
101
|
+
show: ShowValidations.personalizado,
|
|
80
102
|
}),
|
|
81
103
|
new NumberInput({
|
|
82
104
|
id: 'containerRowsGap',
|
|
83
105
|
label: 'Separador vertical',
|
|
84
106
|
description: 'Espacio entre filas (en porcentaje). Por defecto, 5%.',
|
|
85
107
|
range: new NumberRangeValue(1, 100),
|
|
108
|
+
show: ShowValidations.personalizado,
|
|
86
109
|
}),
|
|
87
110
|
|
|
88
111
|
new Label({ label: 'Avanzado' }),
|
|
@@ -97,5 +120,6 @@ export const appearanceInputs = [
|
|
|
97
120
|
required: false,
|
|
98
121
|
label: 'Márgenes',
|
|
99
122
|
description: 'CSS para dar espacio arriba/derecha/abajo/izquieda.',
|
|
123
|
+
show: ShowValidations.personalizado,
|
|
100
124
|
}),
|
|
101
125
|
]
|
|
@@ -10,8 +10,17 @@ import {
|
|
|
10
10
|
} from '@vixoniccom/modules'
|
|
11
11
|
import { ShowValidations } from '../utils'
|
|
12
12
|
|
|
13
|
+
const { personalizado, presetActive, descriptionEnabled, optionalEnabled, imageEnabled, dateEnabled, abbreviatedMonthsCondition, separatorEnabled } = ShowValidations
|
|
14
|
+
|
|
13
15
|
export const standardInputs = [
|
|
14
|
-
new Label({ label: '
|
|
16
|
+
new Label({ label: 'Fuentes', show: presetActive }),
|
|
17
|
+
new TextFormat({ id: 'nameFont', label: 'Fuente del nombre', show: presetActive }),
|
|
18
|
+
new TextFormat({ id: 'descriptionFont', label: 'Fuente de la descripción', show: presetActive }),
|
|
19
|
+
new TextFormat({ id: 'optionalFont', label: 'Fuente del campo opcional', show: presetActive }),
|
|
20
|
+
new TextFormat({ id: 'dateDayFont', label: 'Fuente del día', show: presetActive }),
|
|
21
|
+
new TextFormat({ id: 'dateMonthFont', label: 'Fuente del mes', show: presetActive }),
|
|
22
|
+
|
|
23
|
+
new Label({ label: 'Textos', show: personalizado }),
|
|
15
24
|
new SelectInput({
|
|
16
25
|
id: 'textPosition',
|
|
17
26
|
label: 'Posición',
|
|
@@ -21,6 +30,7 @@ export const standardInputs = [
|
|
|
21
30
|
{ label: 'Final', value: 3 },
|
|
22
31
|
],
|
|
23
32
|
defaultValue: 2,
|
|
33
|
+
show: personalizado,
|
|
24
34
|
}),
|
|
25
35
|
new SelectInput({
|
|
26
36
|
id: 'textAlignment',
|
|
@@ -31,15 +41,17 @@ export const standardInputs = [
|
|
|
31
41
|
{ label: 'Final', value: 'end' },
|
|
32
42
|
],
|
|
33
43
|
defaultValue: 'center',
|
|
44
|
+
show: personalizado,
|
|
34
45
|
}),
|
|
35
46
|
|
|
36
|
-
new Label({ label: 'Nombre' }),
|
|
37
|
-
new TextFormat({ id: 'nameFormat', label: 'Formato' }),
|
|
38
|
-
new NumberInput({ id: 'nameMaxChar', label: 'Caracteres máximos' }),
|
|
47
|
+
new Label({ label: 'Nombre', show: personalizado }),
|
|
48
|
+
new TextFormat({ id: 'nameFormat', label: 'Formato', show: personalizado }),
|
|
49
|
+
new NumberInput({ id: 'nameMaxChar', label: 'Caracteres máximos', show: personalizado }),
|
|
39
50
|
new TextInput({
|
|
40
51
|
id: 'textMargin',
|
|
41
52
|
label: 'Margen',
|
|
42
53
|
description: 'Margen derecho de los textos (en porcentaje). Por defecto 4%.',
|
|
54
|
+
show: personalizado,
|
|
43
55
|
}),
|
|
44
56
|
|
|
45
57
|
new Switch({
|
|
@@ -48,11 +60,12 @@ export const standardInputs = [
|
|
|
48
60
|
displayOnTrue: 'habilitada',
|
|
49
61
|
displayOnFalse: 'deshabilitada',
|
|
50
62
|
defaultValue: true,
|
|
63
|
+
show: personalizado,
|
|
51
64
|
}),
|
|
52
65
|
|
|
53
|
-
new Label({ label: 'Descripción', show:
|
|
54
|
-
new TextFormat({ id: 'descriptionFormat', label: 'Formato', show:
|
|
55
|
-
new NumberInput({ id: 'descriptionMaxChar', label: 'Caracteres máximos', show:
|
|
66
|
+
new Label({ label: 'Descripción', show: `${personalizado} && ${descriptionEnabled}` }),
|
|
67
|
+
new TextFormat({ id: 'descriptionFormat', label: 'Formato', show: `${personalizado} && ${descriptionEnabled}` }),
|
|
68
|
+
new NumberInput({ id: 'descriptionMaxChar', label: 'Caracteres máximos', show: `${personalizado} && ${descriptionEnabled}` }),
|
|
56
69
|
|
|
57
70
|
new Switch({
|
|
58
71
|
id: 'optionalEnabled',
|
|
@@ -60,20 +73,22 @@ export const standardInputs = [
|
|
|
60
73
|
displayOnTrue: 'habilitado',
|
|
61
74
|
displayOnFalse: 'deshabilitado',
|
|
62
75
|
defaultValue: true,
|
|
76
|
+
show: personalizado,
|
|
63
77
|
}),
|
|
64
78
|
|
|
65
|
-
new Label({ label: 'Campo opcional', show:
|
|
66
|
-
new TextFormat({ id: 'optionalFormat', label: 'Formato', show:
|
|
79
|
+
new Label({ label: 'Campo opcional', show: `${personalizado} && ${optionalEnabled}` }),
|
|
80
|
+
new TextFormat({ id: 'optionalFormat', label: 'Formato', show: `${personalizado} && ${optionalEnabled}` }),
|
|
67
81
|
|
|
68
|
-
new Label({ label: 'Fotografía' }),
|
|
82
|
+
new Label({ label: 'Fotografía', show: personalizado }),
|
|
69
83
|
|
|
70
|
-
new Label({ label: 'Imagen' }),
|
|
84
|
+
new Label({ label: 'Imagen', show: personalizado }),
|
|
71
85
|
new Switch({
|
|
72
86
|
id: 'imageEnabled',
|
|
73
87
|
label: 'Imagen',
|
|
74
88
|
displayOnTrue: 'habilitada',
|
|
75
89
|
displayOnFalse: 'deshabilitada',
|
|
76
90
|
defaultValue: true,
|
|
91
|
+
show: personalizado,
|
|
77
92
|
}),
|
|
78
93
|
new SelectInput({
|
|
79
94
|
id: 'imagePosition',
|
|
@@ -84,7 +99,7 @@ export const standardInputs = [
|
|
|
84
99
|
{ label: 'Final', value: 3 },
|
|
85
100
|
],
|
|
86
101
|
defaultValue: 2,
|
|
87
|
-
show:
|
|
102
|
+
show: `${personalizado} && ${imageEnabled}`,
|
|
88
103
|
}),
|
|
89
104
|
new SelectInput({
|
|
90
105
|
id: 'imageAlignment',
|
|
@@ -95,7 +110,7 @@ export const standardInputs = [
|
|
|
95
110
|
{ label: 'Final', value: 'end' },
|
|
96
111
|
],
|
|
97
112
|
defaultValue: 'center',
|
|
98
|
-
show:
|
|
113
|
+
show: `${personalizado} && ${imageEnabled}`,
|
|
99
114
|
}),
|
|
100
115
|
new SelectInput({
|
|
101
116
|
id: 'imageStyle',
|
|
@@ -108,29 +123,30 @@ export const standardInputs = [
|
|
|
108
123
|
{ label: 'Círculo', value: 'circle' },
|
|
109
124
|
],
|
|
110
125
|
defaultValue: 'normal',
|
|
111
|
-
show:
|
|
126
|
+
show: `${personalizado} && ${imageEnabled}`,
|
|
112
127
|
}),
|
|
113
128
|
new TextInput({
|
|
114
129
|
id: 'imageMargin',
|
|
115
130
|
label: 'Margen',
|
|
116
131
|
description: 'Margen derecho de la imagen (en porcentaje). Por defecto 4%.',
|
|
117
|
-
show:
|
|
132
|
+
show: `${personalizado} && ${imageEnabled}`,
|
|
118
133
|
}),
|
|
119
134
|
new NumberInput({
|
|
120
135
|
id: 'imageSize',
|
|
121
136
|
label: 'Tamaño',
|
|
122
137
|
description: 'Tamaño de la imagen (en porcentaje).',
|
|
123
138
|
range: new NumberRangeValue(1, 100),
|
|
124
|
-
show:
|
|
139
|
+
show: `${personalizado} && ${imageEnabled}`,
|
|
125
140
|
}),
|
|
126
141
|
|
|
127
|
-
new Label({ label: 'Fecha' }),
|
|
142
|
+
new Label({ label: 'Fecha', show: personalizado }),
|
|
128
143
|
new Switch({
|
|
129
144
|
id: 'dateEnabled',
|
|
130
145
|
label: 'Fecha',
|
|
131
146
|
displayOnTrue: 'habilitada',
|
|
132
147
|
displayOnFalse: 'deshabilitada',
|
|
133
148
|
defaultValue: true,
|
|
149
|
+
show: personalizado,
|
|
134
150
|
}),
|
|
135
151
|
new SelectInput({
|
|
136
152
|
id: 'datePosition',
|
|
@@ -141,7 +157,7 @@ export const standardInputs = [
|
|
|
141
157
|
{ label: 'Final', value: 3 },
|
|
142
158
|
],
|
|
143
159
|
defaultValue: 3,
|
|
144
|
-
show:
|
|
160
|
+
show: `${personalizado} && ${dateEnabled}`,
|
|
145
161
|
}),
|
|
146
162
|
new SelectInput({
|
|
147
163
|
id: 'dateAlignment',
|
|
@@ -152,7 +168,7 @@ export const standardInputs = [
|
|
|
152
168
|
{ label: 'Final', value: 'end' },
|
|
153
169
|
],
|
|
154
170
|
defaultValue: 'center',
|
|
155
|
-
show:
|
|
171
|
+
show: `${personalizado} && ${dateEnabled}`,
|
|
156
172
|
}),
|
|
157
173
|
new SelectInput({
|
|
158
174
|
id: 'dateStyle',
|
|
@@ -167,17 +183,17 @@ export const standardInputs = [
|
|
|
167
183
|
{ label: 'Líneas', value: 'outlines' },
|
|
168
184
|
],
|
|
169
185
|
defaultValue: 'calendarFlat',
|
|
170
|
-
show:
|
|
186
|
+
show: `${personalizado} && ${dateEnabled}`,
|
|
171
187
|
}),
|
|
172
|
-
new TextFormat({ id: 'dateDayFormat', label: 'Formato del día', show:
|
|
173
|
-
new TextFormat({ id: 'dateMonthFormat', label: 'Formato del mes', show:
|
|
188
|
+
new TextFormat({ id: 'dateDayFormat', label: 'Formato del día', show: `${personalizado} && ${dateEnabled}` }),
|
|
189
|
+
new TextFormat({ id: 'dateMonthFormat', label: 'Formato del mes', show: `${personalizado} && ${dateEnabled}` }),
|
|
174
190
|
new Switch({
|
|
175
191
|
id: 'abbreviatedMonths',
|
|
176
192
|
label: 'Meses',
|
|
177
193
|
displayOnTrue: 'abreviados',
|
|
178
194
|
displayOnFalse: 'no abreviados',
|
|
179
195
|
defaultValue: false,
|
|
180
|
-
show:
|
|
196
|
+
show: `${personalizado} && ${abbreviatedMonthsCondition}`,
|
|
181
197
|
}),
|
|
182
198
|
new ColorPicker({
|
|
183
199
|
id: 'datePrimaryColor',
|
|
@@ -188,24 +204,25 @@ export const standardInputs = [
|
|
|
188
204
|
id: 'dateMargin',
|
|
189
205
|
label: 'Margen',
|
|
190
206
|
description: 'Margen derecho de la fecha (en porcentaje). Por defecto 4%.',
|
|
191
|
-
show:
|
|
207
|
+
show: `${personalizado} && ${dateEnabled}`,
|
|
192
208
|
}),
|
|
193
209
|
|
|
194
|
-
new Label({ label: 'Separador' }),
|
|
210
|
+
new Label({ label: 'Separador', show: personalizado }),
|
|
195
211
|
new Switch({
|
|
196
212
|
id: 'separator',
|
|
197
213
|
label: 'Separador',
|
|
198
214
|
displayOnTrue: 'habilitado',
|
|
199
215
|
displayOnFalse: 'deshabilitado',
|
|
200
216
|
defaultValue: true,
|
|
217
|
+
show: personalizado,
|
|
201
218
|
}),
|
|
202
|
-
new NumberInput({ id: 'separatorWidth', label: 'Ancho', show:
|
|
203
|
-
new ColorPicker({ id: 'separatorColor', label: 'Color', show:
|
|
219
|
+
new NumberInput({ id: 'separatorWidth', label: 'Ancho', show: `${personalizado} && ${separatorEnabled}` }),
|
|
220
|
+
new ColorPicker({ id: 'separatorColor', label: 'Color', show: `${personalizado} && ${separatorEnabled}` }),
|
|
204
221
|
new TextInput({
|
|
205
222
|
id: 'itemMargins',
|
|
206
223
|
label: 'Márgenes',
|
|
207
224
|
description: 'Un CSS de longitud de uno o dos valores.',
|
|
208
225
|
pattern: '^(( )?[+-]?[0-9]+.?([0-9]+)?(px|em|ex|%|in|cm|mm|pt|pc)){1,2}$',
|
|
209
|
-
show:
|
|
226
|
+
show: `${personalizado} && ${separatorEnabled}`,
|
|
210
227
|
}),
|
|
211
228
|
]
|
package/configuration/utils.ts
CHANGED
|
@@ -8,6 +8,8 @@ export const ShowValidations = {
|
|
|
8
8
|
dateColorCondition:
|
|
9
9
|
"({{dateEnabled}} === true && ['calendarFlat', 'circle', 'outlines'].indexOf({{dateStyle}}) !== -1)",
|
|
10
10
|
separatorEnabled: '{{separator}} === true',
|
|
11
|
+
personalizado: '({{themePreset}} === "personalizado" || !{{themePreset}})',
|
|
12
|
+
presetActive: '{{themePreset}} && {{themePreset}} !== "personalizado"',
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
|