@vixoniccom/aniversarios 1.0.2 → 1.1.0-beta.1

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 CHANGED
@@ -2,6 +2,15 @@
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.1.0-beta.1](https://bitbucket.org/vixonic_dev/aniversarios/compare/v1.1.0-beta.0...v1.1.0-beta.1) (2024-09-05)
6
+
7
+ ## [1.1.0-beta.0](https://bitbucket.org/vixonic_dev/aniversarios/compare/v1.0.2...v1.1.0-beta.0) (2024-09-04)
8
+
9
+
10
+ ### Features
11
+
12
+ * ISC license was added to the project ([6996ea4](https://bitbucket.org/vixonic_dev/aniversarios/commit/6996ea4514daab0a1f70df791131e1e65e0f94ef))
13
+
5
14
  ### [1.0.2](https://bitbucket.org/rexmas_cl/aniversarios/compare/v1.0.2-beta.3...v1.0.2) (2023-08-30)
6
15
 
7
16
  ### [1.0.2-beta.3](https://bitbucket.org/rexmas_cl/aniversarios/compare/v1.0.2-beta.2...v1.0.2-beta.3) (2023-08-21)
package/LICENSE.md ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright 2024 Vixonic
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/build.zip CHANGED
Binary file
@@ -340,6 +340,18 @@
340
340
  "label": "Caracteres máximos",
341
341
  "show": "{{descriptionEnabled}} === true"
342
342
  },
343
+ {
344
+ "type": "switch",
345
+ "id": "optionalEnabled",
346
+ "label": "Campo opcional",
347
+ "defaultValue": true
348
+ },
349
+ {
350
+ "type": "text-format",
351
+ "id": "optionalFormat",
352
+ "label": "Formato",
353
+ "show": "{{optionalEnabled}} === true"
354
+ },
343
355
  {
344
356
  "type": "label",
345
357
  "label": "Fotografía"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixoniccom/aniversarios",
3
3
  "alias": "Aniversarios",
4
- "version": "1.0.2",
4
+ "version": "1.1.0-beta.1",
5
5
  "description": "Muestra el día que el trabajador está de aniversario en la empresa.",
6
6
  "main": "main.js",
7
7
  "author": "",
@@ -43,7 +43,7 @@ export const Render = ({ start }: Props) => {
43
43
  backgroundSize: '100% 100%',
44
44
  padding: padding
45
45
  }}>
46
- <FontLoader paths={['nameFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font']} />
46
+ <FontLoader paths={['nameFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font', 'optionalFormat.font']} />
47
47
  {(dataEmployee.dataEmployee && dataEmployee.dataEmployee.length > 0) ?
48
48
  <ItemsContainer
49
49
  items={anniversaryItems}
@@ -73,6 +73,7 @@ export const ClasicItem = ({ anniversary }: Props) => {
73
73
  )
74
74
  ),
75
75
  descriptionEnabled: parameters.descriptionEnabled,
76
+ optionalEnabled: parameters.optionalEnabled,
76
77
  textStyle: Object.assign(
77
78
  { display: "flex", justifyContent: textAlignment, flex: 1 },
78
79
  parseElementStyles(
@@ -188,6 +189,16 @@ export const ClasicItem = ({ anniversary }: Props) => {
188
189
  lineHeight={1.2}
189
190
  />
190
191
  )}
192
+ {
193
+ state.optionalEnabled && (
194
+ <FormattedText
195
+ text={anniversary.optional}
196
+ format={parameters.optionalFormat}
197
+ maxChar={Number(parameters.descriptionMaxChar)}
198
+ lineHeight={1.2}
199
+ />
200
+ )
201
+ }
191
202
  </div>
192
203
  {parameters.separator && (
193
204
  <Separator order={state.textStyle.order} {...separatorProps} />
@@ -28,6 +28,8 @@ const INITIAL_STATE: VixonicData = {
28
28
  dateStyle: "circle",
29
29
  descriptionEnabled: true,
30
30
  descriptionFormat: { font: { filename: '', id: '',_isAsset: true }, fontSize: 3.8, alignment: { horizontal: "center" }, fontColor: "" },
31
+ optionalEnabled: true,
32
+ optionalFormat: { font: { filename: '', id: '',_isAsset: true }, fontSize: 3.8, alignment: { horizontal: "center" }, fontColor: "" },
31
33
  excludePast: false,
32
34
  imageAlignment: "center",
33
35
  imageEnabled: true,
@@ -32,6 +32,8 @@ export const anniversaryReducer = (state: VixonicData, action: ConfigureAction)
32
32
  dateStyle: parameters.dateStyle,
33
33
  descriptionEnabled: parameters.descriptionEnabled,
34
34
  descriptionFormat: parameters.descriptionFormat,
35
+ optionalEnabled: parameters.optionalEnabled,
36
+ optionalFormat: parameters.optionalFormat,
35
37
  excludePast: parameters.excludePast,
36
38
  imageAlignment: parameters.imageAlignment,
37
39
  imageEnabled: parameters.imageEnabled,
@@ -15,6 +15,7 @@ export const filterEmployees = (values: any, dataMode: string = 'month', exclude
15
15
  name: val[1],
16
16
  position: val[2],
17
17
  image: val[3],
18
+ optional: val[4],
18
19
  month
19
20
  };
20
21
  })
@@ -30,6 +30,8 @@ declare type VixonicParameters = Partial<{
30
30
  dateStyle: keyof typeof styles
31
31
  descriptionEnabled: boolean
32
32
  descriptionFormat: DateFormat
33
+ optionalEnabled: boolean
34
+ optionalFormat: DateFormat
33
35
  excludePast: boolean
34
36
  imageAlignment: keyof typeof alignment
35
37
  imageEnabled: boolean
@@ -79,6 +81,7 @@ declare type DataEmployee = {
79
81
  name:string
80
82
  position:string
81
83
  image:string
84
+ optional: string
82
85
  }
83
86
 
84
87
  declare type Employees = {
@@ -88,6 +88,19 @@
88
88
  },
89
89
  "fontColor": "#585858"
90
90
  },
91
- "descriptionEnabled": true
91
+ "descriptionEnabled": true,
92
+ "optionalEnabled": true,
93
+ "optionalFormat": {
94
+ "font": {
95
+ "id": "7953953c-7029-4730-ae4d-cff4abd5288f",
96
+ "filename": "7953953c-7029-4730-ae4d-cff4abd5288f.ttf",
97
+ "__isAsset": true
98
+ },
99
+ "fontSize": 3.8,
100
+ "alignment": {
101
+ "horizontal": "left"
102
+ },
103
+ "fontColor": "#585858"
104
+ }
92
105
  }
93
106
  }