@vixoniccom/aniversarios 1.2.3-dev.1 → 1.2.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build.zip +0 -0
  3. package/configuration/appearanceGroup/AppearanceInputs.ts +101 -0
  4. package/configuration/appearanceGroup/index.ts +8 -0
  5. package/configuration/dataGroup/DataInputs.ts +52 -0
  6. package/configuration/dataGroup/index.ts +8 -0
  7. package/configuration/index.ts +8 -0
  8. package/configuration/standardGroup/StandardInputs.ts +211 -0
  9. package/configuration/standardGroup/index.ts +8 -0
  10. package/configuration/utils.ts +17 -0
  11. package/configuration.json +186 -207
  12. package/package.json +2 -2
  13. package/src/App.tsx +14 -113
  14. package/src/anniversary-loader.ts +70 -0
  15. package/src/components/AnniversaryItem/components/AnniversaryDate/CircleDate/index.tsx +5 -6
  16. package/src/components/AnniversaryItem/components/AnniversaryDate/FlatDate/index.tsx +5 -6
  17. package/src/components/AnniversaryItem/components/AnniversaryDate/OutlineDate/index.tsx +5 -6
  18. package/src/components/AnniversaryItem/components/AnniversaryDate/TextCalendarDate/index.tsx +4 -5
  19. package/src/components/AnniversaryItem/components/AnniversaryDate/TextDate/index.tsx +4 -5
  20. package/src/components/AnniversaryItem/components/AnniversaryDate/index.tsx +4 -4
  21. package/src/components/AnniversaryItem/components/ClassicItem/index.tsx +8 -8
  22. package/src/components/AnniversaryItem/index.tsx +4 -4
  23. package/src/components/FontLoader/index.tsx +5 -10
  24. package/src/components/ItemsContainer/components/animation.ts +4 -6
  25. package/src/components/ItemsContainer/index.tsx +7 -7
  26. package/src/components/Render/index.tsx +12 -13
  27. package/src/global.d.ts +8 -0
  28. package/src/main.ts +46 -0
  29. package/src/parameters.d.ts +4 -119
  30. package/src/service-parsers.ts +40 -0
  31. package/src/test/parameters.json +3 -2
  32. package/src/test/services.json +158 -0
  33. package/src/context/configureContext/ConfigureContext.tsx +0 -8
  34. package/src/context/configureContext/ConfigureProvider.tsx +0 -72
  35. package/src/context/configureContext/configureReducer.ts +0 -62
  36. package/src/context/dataContext/DataContex.tsx +0 -8
  37. package/src/context/dataContext/DataProvider.tsx +0 -25
  38. package/src/context/dataContext/dataReducer.ts +0 -12
  39. package/src/helpers/filterEmployees.ts +0 -38
  40. package/src/helpers/getEmployees.ts +0 -29
  41. package/src/helpers/utils.ts +0 -46
  42. package/src/main.tsx +0 -43
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
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
+ ### [1.2.3-dev.2](https://github.com/Vixonic/store-aniversarios/compare/v1.2.3-dev.1...v1.2.3-dev.2) (2025-07-11)
6
+
5
7
  ### [1.2.3-dev.1](https://github.com/Vixonic/store-aniversarios/compare/v1.2.3-dev.0...v1.2.3-dev.1) (2025-07-09)
6
8
 
7
9
  ### [1.2.3-dev.0](https://github.com/Vixonic/store-aniversarios/compare/v1.2.2...v1.2.3-dev.0) (2025-07-04)
package/build.zip CHANGED
Binary file
@@ -0,0 +1,101 @@
1
+ import {
2
+ Label,
3
+ NumberInput,
4
+ NumberRangeValue,
5
+ SelectAssetKna,
6
+ SelectInput,
7
+ Switch,
8
+ TextInput,
9
+ } from '@vixoniccom/modules'
10
+
11
+ export const appearanceInputs = [
12
+ new Label({ label: 'Orientación' }),
13
+ new SelectInput({
14
+ id: 'orientation',
15
+ required: true,
16
+ label: 'Orientación',
17
+ items: [
18
+ { label: 'Horizontal', value: 'h' },
19
+ { label: 'Vertical', value: 'v' },
20
+ ],
21
+ defaultValue: 'h',
22
+ }),
23
+
24
+ new Label({ label: 'Animación' }),
25
+ new SelectInput({
26
+ id: 'animationMode',
27
+ required: true,
28
+ label: 'Tipo de animación',
29
+ items: [
30
+ { label: 'Fundido', value: 'fade' },
31
+ { label: 'Izquierda - derecha', value: 'slideRight' },
32
+ { label: 'Derecha - izquierda', value: 'slideLeft' },
33
+ ],
34
+ defaultValue: 'fade',
35
+ description: 'Por defecto, Fundido.'
36
+ }),
37
+ new SelectInput({
38
+ id: 'animationSpeed',
39
+ label: 'Velocidad',
40
+ items: [
41
+ { label: 'Lenta', value: 2 },
42
+ { label: 'Normal', value: 1.5 },
43
+ { label: 'Rápida', value: 1 },
44
+ ],
45
+ defaultValue: 1.5,
46
+ }),
47
+ new Switch({
48
+ id: "animationOrder",
49
+ label: "Orden",
50
+ displayOnTrue: "Invertido",
51
+ displayOnFalse: "Normal",
52
+ defaultValue: false
53
+ }),
54
+ new NumberInput({
55
+ id: 'animationTime',
56
+ label: 'Tiempo',
57
+ description: 'Duración de cada grupo de datos (en segundos).',
58
+ required: true,
59
+ range: new NumberRangeValue(1, 9999),
60
+ }),
61
+
62
+ new Label({ label: 'Contenedor' }),
63
+ new NumberInput({
64
+ id: 'containerColumns',
65
+ label: 'Columnas',
66
+ description: 'Cantidad de items horizontales. Por defecto, 1.',
67
+ range: new NumberRangeValue(1, 999),
68
+ }),
69
+ new NumberInput({
70
+ id: 'containerColumnsGap',
71
+ label: 'Separador horizontal',
72
+ description: 'Espacio entre columnas (en porcentaje). Por defecto, 1%.',
73
+ range: new NumberRangeValue(1, 100),
74
+ }),
75
+ new NumberInput({
76
+ id: 'containerRows',
77
+ label: 'Filas',
78
+ description: 'Cantidad de items verticales. Por defecto, 3.',
79
+ range: new NumberRangeValue(1, 999),
80
+ }),
81
+ new NumberInput({
82
+ id: 'containerRowsGap',
83
+ label: 'Separador vertical',
84
+ description: 'Espacio entre filas (en porcentaje). Por defecto, 5%.',
85
+ range: new NumberRangeValue(1, 100),
86
+ }),
87
+
88
+ new Label({ label: 'Avanzado' }),
89
+ new SelectAssetKna({
90
+ id: 'backgroundImage',
91
+ label: 'Fondo',
92
+ required: false,
93
+ extensions: ['jpg', 'png'],
94
+ }),
95
+ new TextInput({
96
+ id: 'padding',
97
+ required: false,
98
+ label: 'Márgenes',
99
+ description: 'CSS para dar espacio arriba/derecha/abajo/izquieda.',
100
+ }),
101
+ ]
@@ -0,0 +1,8 @@
1
+ import { Group } from '@vixoniccom/modules'
2
+ import { appearanceInputs } from './AppearanceInputs'
3
+
4
+ export const appearanceGroup = new Group({
5
+ id: 'appearanceGroup',
6
+ label: 'Apariencia',
7
+ items: [...appearanceInputs],
8
+ })
@@ -0,0 +1,52 @@
1
+ import { Label, SelectAssetKna, SelectInput, ServiceInput, TextFormat, TextInput } from '@vixoniccom/modules'
2
+ import { serviceEnabled } from '../utils'
3
+
4
+ export const dataInputs = [
5
+ new Label({ label: 'Datos' }),
6
+ new SelectInput({
7
+ id: 'displayService',
8
+ label: 'Selecciona la fuente de los cumpleaños',
9
+ items: [
10
+ { label: 'Documento', value: 'AnniversaryAppService' },
11
+ { label: 'Rexmas', value: 'RexmasAnniversarieService'}
12
+ ],
13
+ defaultValue: 'AnniversaryAppService',
14
+ description: 'Selecciona la fuente de los cumpleaños. Por defecto, Documento.'
15
+ }),
16
+ new ServiceInput({
17
+ id: 'documentService',
18
+ label: 'Documento',
19
+ serviceType: 'AnniversaryAppService',
20
+ show: serviceEnabled.annivesaryAppServiceEnabled
21
+ }),
22
+ new ServiceInput({
23
+ id: 'rexmasService',
24
+ label: 'Rexmas',
25
+ serviceType: 'RexmasAnniversarieService',
26
+ show: serviceEnabled.rexmasServiceEnabled
27
+ }),
28
+ new SelectAssetKna({
29
+ id: 'photosZip',
30
+ label: 'Archivo Zip para fotos',
31
+ extensions: ['zip'],
32
+ show: serviceEnabled.annivesaryAppServiceEnabled
33
+ }),
34
+ new Label({ label: 'Funcionamiento' }),
35
+ new SelectInput({
36
+ id: 'updateTime',
37
+ label: 'Actualización',
38
+ items: [
39
+ { label: '10 minutos', value: 600000 },
40
+ { label: '30 minutos', value: 1800000 },
41
+ { label: '1 hora', value: 3600000 },
42
+ { label: '6 horas', value: 21600000 },
43
+ { label: '12 horas', value: 43200000 },
44
+ { label: 'Diario', value: 86400000 },
45
+ { label: 'Semanal', value: 604800000 },
46
+ ],
47
+ defaultValue: 86400000,
48
+ description: 'Tiempo de actualización de los datos. Por defecto, diario.',
49
+ }),
50
+ new TextInput({ id: 'defaultMessage', label: 'Sin Aniversarios' }),
51
+ new TextFormat({ id: 'defaultMessageFormat', label: 'Formato Mensaje sin aniversarios' }),
52
+ ]
@@ -0,0 +1,8 @@
1
+ import { Group } from '@vixoniccom/modules'
2
+ import { dataInputs } from './DataInputs'
3
+
4
+ export const dataGroup = new Group({
5
+ id: 'dataGroup',
6
+ label: 'Configuración',
7
+ items: [...dataInputs],
8
+ })
@@ -0,0 +1,8 @@
1
+ import { Configuration } from '@vixoniccom/modules'
2
+ import { dataGroup } from './dataGroup'
3
+ import { appearanceGroup } from './appearanceGroup'
4
+ import { standardGroup } from './standardGroup'
5
+
6
+ export const configuration = new Configuration({
7
+ schema: [dataGroup, appearanceGroup, standardGroup],
8
+ })
@@ -0,0 +1,211 @@
1
+ import {
2
+ ColorPicker,
3
+ Label,
4
+ NumberInput,
5
+ NumberRangeValue,
6
+ SelectInput,
7
+ Switch,
8
+ TextFormat,
9
+ TextInput,
10
+ } from '@vixoniccom/modules'
11
+ import { ShowValidations } from '../utils'
12
+
13
+ export const standardInputs = [
14
+ new Label({ label: 'Textos' }),
15
+ new SelectInput({
16
+ id: 'textPosition',
17
+ label: 'Posición',
18
+ items: [
19
+ { label: 'Inicio', value: 1 },
20
+ { label: 'Centro', value: 2 },
21
+ { label: 'Final', value: 3 },
22
+ ],
23
+ defaultValue: 2,
24
+ }),
25
+ new SelectInput({
26
+ id: 'textAlignment',
27
+ label: 'Alineación',
28
+ items: [
29
+ { label: 'Inicio', value: 'start' },
30
+ { label: 'Centro', value: 'center' },
31
+ { label: 'Final', value: 'end' },
32
+ ],
33
+ defaultValue: 'center',
34
+ }),
35
+
36
+ new Label({ label: 'Nombre' }),
37
+ new TextFormat({ id: 'nameFormat', label: 'Formato' }),
38
+ new NumberInput({ id: 'nameMaxChar', label: 'Caracteres máximos' }),
39
+ new TextInput({
40
+ id: 'textMargin',
41
+ label: 'Margen',
42
+ description: 'Margen derecho de los textos (en porcentaje). Por defecto 4%.',
43
+ }),
44
+
45
+ new Switch({
46
+ id: 'descriptionEnabled',
47
+ label: 'Descripción',
48
+ displayOnTrue: 'habilitada',
49
+ displayOnFalse: 'deshabilitada',
50
+ defaultValue: true,
51
+ }),
52
+
53
+ new Label({ label: 'Descripción', show: ShowValidations.descriptionEnabled }),
54
+ new TextFormat({ id: 'descriptionFormat', label: 'Formato', show: ShowValidations.descriptionEnabled }),
55
+ new NumberInput({ id: 'descriptionMaxChar', label: 'Caracteres máximos', show: ShowValidations.descriptionEnabled }),
56
+
57
+ new Switch({
58
+ id: 'optionalEnabled',
59
+ label: 'Campo opcional',
60
+ displayOnTrue: 'habilitado',
61
+ displayOnFalse: 'deshabilitado',
62
+ defaultValue: true,
63
+ }),
64
+
65
+ new Label({ label: 'Campo opcional', show: ShowValidations.optionalEnabled }),
66
+ new TextFormat({ id: 'optionalFormat', label: 'Formato', show: ShowValidations.optionalEnabled }),
67
+
68
+ new Label({ label: 'Fotografía' }),
69
+
70
+ new Label({ label: 'Imagen' }),
71
+ new Switch({
72
+ id: 'imageEnabled',
73
+ label: 'Imagen',
74
+ displayOnTrue: 'habilitada',
75
+ displayOnFalse: 'deshabilitada',
76
+ defaultValue: true,
77
+ }),
78
+ new SelectInput({
79
+ id: 'imagePosition',
80
+ label: 'Posición',
81
+ items: [
82
+ { label: 'Inicio', value: 1 },
83
+ { label: 'Centro', value: 2 },
84
+ { label: 'Final', value: 3 },
85
+ ],
86
+ defaultValue: 2,
87
+ show: ShowValidations.imageEnabled,
88
+ }),
89
+ new SelectInput({
90
+ id: 'imageAlignment',
91
+ label: 'Alineación',
92
+ items: [
93
+ { label: 'Inicio', value: 'start' },
94
+ { label: 'Centro', value: 'center' },
95
+ { label: 'Final', value: 'end' },
96
+ ],
97
+ defaultValue: 'center',
98
+ show: ShowValidations.imageEnabled,
99
+ }),
100
+ new SelectInput({
101
+ id: 'imageStyle',
102
+ label: 'Estilo',
103
+ description: 'Forma de enmarcar la fotografía.',
104
+ required: true,
105
+ items: [
106
+ { label: 'Normal', value: 'normal' },
107
+ { label: 'Redondeado', value: 'rounded' },
108
+ { label: 'Círculo', value: 'circle' },
109
+ ],
110
+ defaultValue: 'normal',
111
+ show: ShowValidations.imageEnabled,
112
+ }),
113
+ new TextInput({
114
+ id: 'imageMargin',
115
+ label: 'Margen',
116
+ description: 'Margen derecho de la imagen (en porcentaje). Por defecto 4%.',
117
+ show: ShowValidations.imageEnabled,
118
+ }),
119
+ new NumberInput({
120
+ id: 'imageSize',
121
+ label: 'Tamaño',
122
+ description: 'Tamaño de la imagen (en porcentaje).',
123
+ range: new NumberRangeValue(1, 100),
124
+ show: ShowValidations.imageEnabled,
125
+ }),
126
+
127
+ new Label({ label: 'Fecha' }),
128
+ new Switch({
129
+ id: 'dateEnabled',
130
+ label: 'Fecha',
131
+ displayOnTrue: 'habilitada',
132
+ displayOnFalse: 'deshabilitada',
133
+ defaultValue: true,
134
+ }),
135
+ new SelectInput({
136
+ id: 'datePosition',
137
+ label: 'Posición',
138
+ items: [
139
+ { label: 'Inicio', value: 1 },
140
+ { label: 'Centro', value: 2 },
141
+ { label: 'Final', value: 3 },
142
+ ],
143
+ defaultValue: 3,
144
+ show: ShowValidations.dateEnabled,
145
+ }),
146
+ new SelectInput({
147
+ id: 'dateAlignment',
148
+ label: 'Alineación',
149
+ items: [
150
+ { label: 'Inicio', value: 'start' },
151
+ { label: 'Centro', value: 'center' },
152
+ { label: 'Final', value: 'end' },
153
+ ],
154
+ defaultValue: 'center',
155
+ show: ShowValidations.dateEnabled,
156
+ }),
157
+ new SelectInput({
158
+ id: 'dateStyle',
159
+ label: 'Estilo',
160
+ description: 'Forma de enmarcar la fotografía.',
161
+ required: true,
162
+ items: [
163
+ { label: 'Calendario simple', value: 'calendarFlat' },
164
+ { label: 'Calendario texto', value: 'calendarText' },
165
+ { label: 'Circular', value: 'circle' },
166
+ { label: 'Texto', value: 'text' },
167
+ { label: 'Líneas', value: 'outlines' },
168
+ ],
169
+ defaultValue: 'calendarFlat',
170
+ show: ShowValidations.dateEnabled,
171
+ }),
172
+ new TextFormat({ id: 'dateDayFormat', label: 'Formato del día', show: ShowValidations.dateEnabled }),
173
+ new TextFormat({ id: 'dateMonthFormat', label: 'Formato del mes', show: ShowValidations.dateEnabled }),
174
+ new Switch({
175
+ id: 'abbreviatedMonths',
176
+ label: 'Meses',
177
+ displayOnTrue: 'abreviados',
178
+ displayOnFalse: 'no abreviados',
179
+ defaultValue: false,
180
+ show: ShowValidations.abbreviatedMonthsCondition,
181
+ }),
182
+ new ColorPicker({
183
+ id: 'datePrimaryColor',
184
+ label: 'Color primario',
185
+ show: ShowValidations.dateColorCondition,
186
+ }),
187
+ new TextInput({
188
+ id: 'dateMargin',
189
+ label: 'Margen',
190
+ description: 'Margen derecho de la fecha (en porcentaje). Por defecto 4%.',
191
+ show: ShowValidations.dateEnabled,
192
+ }),
193
+
194
+ new Label({ label: 'Separador' }),
195
+ new Switch({
196
+ id: 'separator',
197
+ label: 'Separador',
198
+ displayOnTrue: 'habilitado',
199
+ displayOnFalse: 'deshabilitado',
200
+ defaultValue: true,
201
+ }),
202
+ new NumberInput({ id: 'separatorWidth', label: 'Ancho', show: ShowValidations.separatorEnabled }),
203
+ new ColorPicker({ id: 'separatorColor', label: 'Color', show: ShowValidations.separatorEnabled }),
204
+ new TextInput({
205
+ id: 'itemMargins',
206
+ label: 'Márgenes',
207
+ description: 'Un CSS de longitud de uno o dos valores.',
208
+ pattern: '^(( )?[+-]?[0-9]+.?([0-9]+)?(px|em|ex|%|in|cm|mm|pt|pc)){1,2}$',
209
+ show: ShowValidations.separatorEnabled,
210
+ }),
211
+ ]
@@ -0,0 +1,8 @@
1
+ import { Group } from '@vixoniccom/modules'
2
+ import { standardInputs } from './StandardInputs'
3
+
4
+ export const standardGroup = new Group({
5
+ id: 'standardGroup',
6
+ label: 'Estilo',
7
+ items: [...standardInputs],
8
+ })
@@ -0,0 +1,17 @@
1
+ export const ShowValidations = {
2
+ descriptionEnabled: '{{descriptionEnabled}} === true',
3
+ optionalEnabled: '{{optionalEnabled}} === true',
4
+ imageEnabled: '{{imageEnabled}} === true',
5
+ dateEnabled: '{{dateEnabled}} === true',
6
+ abbreviatedMonthsCondition:
7
+ "{{dateEnabled}} === true && ['calendarFlat', 'calendarText', 'outlines'].indexOf({{dateStyle}}) !== -1",
8
+ dateColorCondition:
9
+ "({{dateEnabled}} === true && ['calendarFlat', 'circle', 'outlines'].indexOf({{dateStyle}}) !== -1)",
10
+ separatorEnabled: '{{separator}} === true',
11
+ }
12
+
13
+
14
+ export const serviceEnabled = {
15
+ rexmasServiceEnabled: '{{displayService}} === "RexmasBirthdayService"',
16
+ annivesaryAppServiceEnabled: '{{displayService}} === "AnniversaryAppService"',
17
+ }