@vixoniccom/aniversarios 1.3.0-dev.0 → 1.3.0-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/CHANGELOG.md +16 -0
- package/build.zip +0 -0
- package/configuration/utils.ts +1 -1
- package/configuration.json +1 -1
- package/package.json +1 -1
- package/src/App.tsx +3 -3
- package/src/components/AnniversaryItem/components/AnniversaryDate/FlatDate/index.tsx +4 -4
- package/src/components/AnniversaryItem/components/AnniversaryImage/index.tsx +2 -1
- package/src/components/AnniversaryItem/components/ClassicItem/index.tsx +2 -2
- package/src/components/AnniversaryItem/components/Separator/Separator.tsx +1 -1
- package/src/components/FontLoader/index.tsx +0 -12
- package/src/components/FormattedText/index.tsx +3 -3
- package/src/components/ItemsContainer/components/animation.ts +4 -4
- package/src/components/Render/index.tsx +1 -1
- package/src/index.html +1 -1
- package/src/test/parameters.json +1 -1
- package/src/test/services.json +26 -83
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.3.0-dev.2](https://github.com/Vixonic/store-aniversarios/compare/v1.3.0-dev.1...v1.3.0-dev.2) (2025-07-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* show Rexmas Service ([f8928bd](https://github.com/Vixonic/store-aniversarios/commit/f8928bd8431c5433871777f02fe4b461266e6737))
|
|
11
|
+
|
|
12
|
+
## [1.3.0-dev.1](https://github.com/Vixonic/store-aniversarios/compare/v1.3.0-dev.0...v1.3.0-dev.1) (2025-07-14)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Replace logical OR with nullish coalescing operator for default values in various components ([c9f2bba](https://github.com/Vixonic/store-aniversarios/commit/c9f2bbafcf44f38b1578b6946a19434f41e50f52))
|
|
18
|
+
* Update maskId generation for unique identifiers in AnniversaryImage component ([6f5b452](https://github.com/Vixonic/store-aniversarios/commit/6f5b4525f640d8730488331c56aed5fb68378e56))
|
|
19
|
+
* Update maskId generation for unique identifiers in AnniversaryImage component ([c9a3d43](https://github.com/Vixonic/store-aniversarios/commit/c9a3d43acc57f707a39a31f131fda6266f674f30))
|
|
20
|
+
|
|
5
21
|
## [1.3.0-dev.0](https://github.com/Vixonic/store-aniversarios/compare/v1.2.3-dev.2...v1.3.0-dev.0) (2025-07-14)
|
|
6
22
|
|
|
7
23
|
|
package/build.zip
CHANGED
|
Binary file
|
package/configuration/utils.ts
CHANGED
|
@@ -12,6 +12,6 @@ export const ShowValidations = {
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
export const serviceEnabled = {
|
|
15
|
-
rexmasServiceEnabled: '{{displayService}} === "
|
|
15
|
+
rexmasServiceEnabled: '{{displayService}} === "RexmasAnniversarieService"',
|
|
16
16
|
annivesaryAppServiceEnabled: '{{displayService}} === "AnniversaryAppService"',
|
|
17
17
|
}
|
package/configuration.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{
|
|
37
37
|
"id": "rexmasService",
|
|
38
38
|
"label": "Rexmas",
|
|
39
|
-
"show": "{{displayService}} === \"
|
|
39
|
+
"show": "{{displayService}} === \"RexmasAnniversarieService\"",
|
|
40
40
|
"type": "service-input",
|
|
41
41
|
"serviceType": "RexmasAnniversarieService"
|
|
42
42
|
},
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -10,7 +10,7 @@ interface Props {
|
|
|
10
10
|
export const App: React.FunctionComponent<Props> = ({ start, appData, anniversaries }) => {
|
|
11
11
|
|
|
12
12
|
const parameters = appData?.parameters
|
|
13
|
-
const [
|
|
13
|
+
const [anniversariesElements, setAnniversariesElements] = useState<Anniversary[]>(anniversaries)
|
|
14
14
|
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
setAnniversariesElements(anniversaries)
|
|
@@ -19,8 +19,8 @@ export const App: React.FunctionComponent<Props> = ({ start, appData, anniversar
|
|
|
19
19
|
if (!appData) return null
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
(
|
|
22
|
+
(anniversariesElements.length === 0) ?
|
|
23
23
|
<FormattedText text={parameters?.defaultMessage ?? 'No hay ingresos para mostrar'} format={parameters?.defaultMessageFormat} />
|
|
24
|
-
: <Render appData={appData} start={start} anniversaries={
|
|
24
|
+
: <Render appData={appData} start={start} anniversaries={anniversariesElements} />
|
|
25
25
|
)
|
|
26
26
|
}
|
|
@@ -11,8 +11,8 @@ export const FlatDate: React.FunctionComponent<Props> = ({ month, day, data }: P
|
|
|
11
11
|
const { abbreviatedMonths, dateDayFormat, dateMonthFormat, orientation, datePrimaryColor } = data.parameters
|
|
12
12
|
|
|
13
13
|
const sizeProp = AnniveraryDateUtils.utils(orientation)
|
|
14
|
-
const monthSize = ((dateMonthFormat?.fontSize
|
|
15
|
-
const daySize = ((dateDayFormat?.fontSize
|
|
14
|
+
const monthSize = ((dateMonthFormat?.fontSize ?? 18.5) * 400) / 100
|
|
15
|
+
const daySize = ((dateDayFormat?.fontSize ?? 57.5) * 400) / 100
|
|
16
16
|
|
|
17
17
|
const getFontFamily = (format: any) => {
|
|
18
18
|
if (format?.font?.filename) return format.font.filename.replace('.', '-')
|
|
@@ -29,7 +29,7 @@ export const FlatDate: React.FunctionComponent<Props> = ({ month, day, data }: P
|
|
|
29
29
|
textAnchor='middle'
|
|
30
30
|
alignmentBaseline='central' x='200' y='55'
|
|
31
31
|
fontSize={monthSize} preserveAspectRatio='none'
|
|
32
|
-
fill={dateMonthFormat?.fontColor
|
|
32
|
+
fill={dateMonthFormat?.fontColor ?? '#fff'} fontSizeAdjust=''>
|
|
33
33
|
{AnniveraryDateUtils.getMonth(month, abbreviatedMonths)}
|
|
34
34
|
</text>
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ export const FlatDate: React.FunctionComponent<Props> = ({ month, day, data }: P
|
|
|
37
37
|
textAnchor='middle'
|
|
38
38
|
alignmentBaseline='central' x='200' y='245'
|
|
39
39
|
fontSize={daySize} preserveAspectRatio='none'
|
|
40
|
-
fill={dateDayFormat?.fontColor
|
|
40
|
+
fill={dateDayFormat?.fontColor ?? '#fff'} fontSizeAdjust=''>
|
|
41
41
|
{AnniveraryDateUtils.getZeroLeadedText(day)}
|
|
42
42
|
</text>
|
|
43
43
|
</g>
|
|
@@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'
|
|
|
2
2
|
import { AnniveraryDateUtils } from '../AnniversaryDate/utils'
|
|
3
3
|
|
|
4
4
|
const defaultImg = require('../default-profile.png')
|
|
5
|
+
let idCounter = 0
|
|
5
6
|
const borderStyles = {
|
|
6
7
|
normal: '0',
|
|
7
8
|
rounded: '10',
|
|
@@ -18,7 +19,7 @@ interface Props {
|
|
|
18
19
|
export const AnniversaryImage: React.FunctionComponent<Props> = ({ url, size, borderStyle, orientation }) => {
|
|
19
20
|
const [urlState, setUrlState] = useState(url || defaultImg)
|
|
20
21
|
const input = useRef<SVGImageElement>(null)
|
|
21
|
-
const maskId =
|
|
22
|
+
const maskId = `mask-${Date.now()}-${++idCounter}`
|
|
22
23
|
const imageExist = (url: any) => {
|
|
23
24
|
const isValidImage = url.substr(-3).toLowerCase() === 'png' || url.substr(-3).toLowerCase() === 'jpg' || url.substr(-4).toLowerCase() === 'jpeg'
|
|
24
25
|
return isValidImage ? url : defaultImg
|
|
@@ -72,7 +72,7 @@ export const ClassicItem: React.FunctionComponent<Props> = ({ anniversary, data
|
|
|
72
72
|
/>
|
|
73
73
|
{state.descriptionEnabled && (
|
|
74
74
|
<FormattedText
|
|
75
|
-
text={anniversary.position
|
|
75
|
+
text={anniversary.position ?? ''}
|
|
76
76
|
format={parameters.descriptionFormat}
|
|
77
77
|
maxChar={Number(parameters.descriptionMaxChar)}
|
|
78
78
|
lineHeight={1.2}
|
|
@@ -80,7 +80,7 @@ export const ClassicItem: React.FunctionComponent<Props> = ({ anniversary, data
|
|
|
80
80
|
)}
|
|
81
81
|
{state.optionalEnabled && (
|
|
82
82
|
<FormattedText
|
|
83
|
-
text={anniversary.optional
|
|
83
|
+
text={anniversary.optional ?? ''}
|
|
84
84
|
format={parameters.optionalFormat}
|
|
85
85
|
maxChar={Number(parameters.descriptionMaxChar)}
|
|
86
86
|
lineHeight={1.2}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import PropTypes from 'prop-types'
|
|
2
|
-
|
|
3
1
|
interface Props {
|
|
4
2
|
paths: Array<string>
|
|
5
3
|
data: VixonicData
|
|
@@ -40,13 +38,3 @@ export const FontLoader = ({ paths, data }: Props) => {
|
|
|
40
38
|
<style>{fonts}</style>
|
|
41
39
|
)
|
|
42
40
|
}
|
|
43
|
-
|
|
44
|
-
FontLoader.defaultProps = {
|
|
45
|
-
paths: []
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
FontLoader.propTypes = {
|
|
49
|
-
paths: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
50
|
-
data: PropTypes.object.isRequired
|
|
51
|
-
}
|
|
52
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { CSSProperties } from 'react'
|
|
2
2
|
|
|
3
3
|
const alignments = {
|
|
4
4
|
center: 'center',
|
|
@@ -15,7 +15,7 @@ interface Props {
|
|
|
15
15
|
format?: any
|
|
16
16
|
lineHeight?: number
|
|
17
17
|
maxChar?: number
|
|
18
|
-
style?:
|
|
18
|
+
style?: CSSProperties
|
|
19
19
|
text: string
|
|
20
20
|
unit?: string
|
|
21
21
|
paddingBottom?: string
|
|
@@ -55,7 +55,7 @@ export const FormattedText: React.FunctionComponent<Props> = ({ text, format, ma
|
|
|
55
55
|
const containerStyle = {
|
|
56
56
|
display: 'inline-flex',
|
|
57
57
|
justifyContent: getHorizontalAlignment(format.alignment),
|
|
58
|
-
...
|
|
58
|
+
...style
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
return (
|
|
@@ -75,10 +75,10 @@ export class AnimationController {
|
|
|
75
75
|
|
|
76
76
|
configure(options: Partial<Options>) {
|
|
77
77
|
this.mode = options.mode && animationModes.hasOwnProperty(options.mode) ? animationModes[options.mode] : animationModes.fade
|
|
78
|
-
this.duration = options.duration
|
|
79
|
-
this.speed = 1000 * (options.speed
|
|
80
|
-
this.stagger = this.speed / (options.stagger
|
|
81
|
-
this.reverse = options.reverse
|
|
78
|
+
this.duration = options.duration ?? 10000
|
|
79
|
+
this.speed = 1000 * (options.speed ?? 1)
|
|
80
|
+
this.stagger = this.speed / (options.stagger ?? 4)
|
|
81
|
+
this.reverse = options.reverse ?? true
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
getInitialStyle() {
|
|
@@ -25,7 +25,7 @@ export const Render = ({ start, appData, anniversaries }: Props) => {
|
|
|
25
25
|
? `url("${downloadsPath}/${backgroundImage.filename}")` : ''
|
|
26
26
|
|
|
27
27
|
const anniversaryItems = anniversaries.map((anniversary: Anniversary) => {
|
|
28
|
-
return <AnniversaryItem style={'standard'} anniversary={anniversary} data={appData} />
|
|
28
|
+
return <AnniversaryItem style={'standard'} anniversary={anniversary} data={appData} key={anniversary?.name} />
|
|
29
29
|
})
|
|
30
30
|
|
|
31
31
|
return (
|
package/src/index.html
CHANGED
package/src/test/parameters.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"parameters": {
|
|
3
|
-
"documentService": {"id":"
|
|
3
|
+
"documentService": {"id":"a14e95fc-cbc2-ff33-7d12-c66429cd175b"},
|
|
4
4
|
"rexmasService": {"id":"12b64ef1-0c66-c4ae-8797-9113e1063c4c"},
|
|
5
5
|
"defaultMessage": "No ingresos",
|
|
6
6
|
"padding": "365px 25px 80px 40px",
|
package/src/test/services.json
CHANGED
|
@@ -1,108 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"services": {
|
|
3
|
-
"
|
|
4
|
-
"id": "
|
|
3
|
+
"a14e95fc-cbc2-ff33-7d12-c66429cd175b": {
|
|
4
|
+
"id": "a14e95fc-cbc2-ff33-7d12-c66429cd175b",
|
|
5
5
|
"data": [
|
|
6
6
|
{
|
|
7
|
-
"day":
|
|
8
|
-
"month":
|
|
9
|
-
"name": "
|
|
10
|
-
"description": "
|
|
11
|
-
"image": "Foto prueba.jpg"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"day": 14,
|
|
15
|
-
"month": 6,
|
|
16
|
-
"name": "ANTONIO BELLO",
|
|
17
|
-
"description": "CORPORATIVO",
|
|
18
|
-
"image": "Foto prueba.jpg"
|
|
7
|
+
"day": 1,
|
|
8
|
+
"month": 7,
|
|
9
|
+
"name": "Nombre 1",
|
|
10
|
+
"description": "foto1.jpg"
|
|
19
11
|
},
|
|
20
12
|
{
|
|
21
|
-
"day":
|
|
22
|
-
"month":
|
|
23
|
-
"name": "
|
|
24
|
-
"description": "FORD DURANGO",
|
|
25
|
-
"image": "Foto prueba.jpg"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"day": 17,
|
|
29
|
-
"month": 6,
|
|
30
|
-
"name": "AXEL ZALDIVAR",
|
|
31
|
-
"description": "JAC METEPEC",
|
|
32
|
-
"image": "Foto prueba.jpg"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"day": 18,
|
|
36
|
-
"month": 6,
|
|
37
|
-
"name": "GUSTAVO MENDEZ",
|
|
38
|
-
"description": "PEUGEOT ARBOLEDAS",
|
|
39
|
-
"image": "Foto prueba.jpg"
|
|
13
|
+
"day": 5,
|
|
14
|
+
"month": 7,
|
|
15
|
+
"name": "Nombre 2"
|
|
40
16
|
},
|
|
41
17
|
{
|
|
42
|
-
"day":
|
|
43
|
-
"month":
|
|
44
|
-
"name": "
|
|
45
|
-
"description": "JAC METEPEC",
|
|
46
|
-
"image": "Foto prueba.jpg"
|
|
18
|
+
"day": 8,
|
|
19
|
+
"month": 7,
|
|
20
|
+
"name": "Nombre 3"
|
|
47
21
|
},
|
|
48
22
|
{
|
|
49
|
-
"day":
|
|
50
|
-
"month":
|
|
51
|
-
"name": "
|
|
52
|
-
"description": "CORPORATIVO",
|
|
53
|
-
"image": "Foto prueba.jpg"
|
|
23
|
+
"day": 14,
|
|
24
|
+
"month": 7,
|
|
25
|
+
"name": "Nombre 4"
|
|
54
26
|
},
|
|
55
27
|
{
|
|
56
|
-
"day":
|
|
57
|
-
"month":
|
|
58
|
-
"name": "
|
|
59
|
-
"description": "JAC CUERNAVACA",
|
|
60
|
-
"image": "Foto prueba.jpg"
|
|
28
|
+
"day": 17,
|
|
29
|
+
"month": 7,
|
|
30
|
+
"name": "Nombre 5"
|
|
61
31
|
},
|
|
62
32
|
{
|
|
63
33
|
"day": 20,
|
|
64
|
-
"month":
|
|
65
|
-
"name": "
|
|
66
|
-
"description": "CORPORATIVO",
|
|
67
|
-
"image": "Foto prueba.jpg"
|
|
34
|
+
"month": 7,
|
|
35
|
+
"name": "Nombre 6"
|
|
68
36
|
},
|
|
69
37
|
{
|
|
70
38
|
"day": 21,
|
|
71
|
-
"month":
|
|
72
|
-
"name": "
|
|
73
|
-
"description": "PEUGEOT ARBOLEDAS",
|
|
74
|
-
"image": "Foto prueba.jpg"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"day": 26,
|
|
78
|
-
"month": 6,
|
|
79
|
-
"name": "LIZZA GUZMAN",
|
|
80
|
-
"description": "FORD DURANGO",
|
|
81
|
-
"image": "Foto prueba.jpg"
|
|
39
|
+
"month": 7,
|
|
40
|
+
"name": "Nombre 7"
|
|
82
41
|
},
|
|
83
42
|
{
|
|
84
|
-
"day":
|
|
85
|
-
"month":
|
|
86
|
-
"name": "
|
|
87
|
-
"description": "LEXUS SANTA FE",
|
|
88
|
-
"image": "Foto prueba.jpg"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"day": 28,
|
|
92
|
-
"month": 6,
|
|
93
|
-
"name": "PAOLA ALEMAN",
|
|
94
|
-
"description": "CORPORATIVO",
|
|
95
|
-
"image": "Foto prueba.jpg"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"day": 30,
|
|
99
|
-
"month": 6,
|
|
100
|
-
"name": "FANNY ANDRADE",
|
|
101
|
-
"description": "FORD DURANGO",
|
|
102
|
-
"image": "Foto prueba.jpg"
|
|
43
|
+
"day": 22,
|
|
44
|
+
"month": 7,
|
|
45
|
+
"name": "Nombre 8"
|
|
103
46
|
}
|
|
104
47
|
],
|
|
105
|
-
"updatedAt":
|
|
48
|
+
"updatedAt": 1752591687951,
|
|
106
49
|
"__typename": "AnniversaryAppService"
|
|
107
50
|
},
|
|
108
51
|
"12b64ef1-0c66-c4ae-8797-9113e1063c4c": {
|