@vixoniccom/news-internal 0.4.13-beta.14 → 0.4.13-beta.15
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 +2 -0
- package/build.zip +0 -0
- package/configuration/index.ts +22 -4
- package/configuration.json +11 -13
- package/package.json +1 -1
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
|
+
### [0.4.13-beta.15](https://bitbucket.org/rexmas_cl/news-internal/compare/v0.4.13-beta.14...v0.4.13-beta.15) (2023-05-26)
|
|
6
|
+
|
|
5
7
|
### [0.4.13-beta.14](https://bitbucket.org/rexmas_cl/news-internal/compare/v0.4.13-beta.13...v0.4.13-beta.14) (2023-05-19)
|
|
6
8
|
|
|
7
9
|
### [0.4.13-beta.13](https://bitbucket.org/rexmas_cl/news-internal/compare/v0.4.13-beta.12...v0.4.13-beta.13) (2023-05-17)
|
package/build.zip
CHANGED
|
Binary file
|
package/configuration/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Configuration, List, TextInput, SelectAssetKna, TextArea, NumberRangeValue,
|
|
1
|
+
import { Configuration, List, TextInput, SelectAssetKna, TextArea, NumberRangeValue, DateInput } from '@vixoniccom/modules'
|
|
2
2
|
import { appereanceGroup } from './appearanceGroup'
|
|
3
3
|
import { ShowValidations } from './utils'
|
|
4
4
|
|
|
@@ -78,7 +78,7 @@ const newsList = new List({
|
|
|
78
78
|
extensions: ['jpg', 'jpeg', 'png', 'svg'], show: (ShowValidations.imageForceEnabled)
|
|
79
79
|
}),
|
|
80
80
|
|
|
81
|
-
new
|
|
81
|
+
new TextInput({
|
|
82
82
|
id: 'qrCodeUrl',
|
|
83
83
|
label: 'URL código QR',
|
|
84
84
|
required: true,
|
|
@@ -90,17 +90,35 @@ const newsList = new List({
|
|
|
90
90
|
label: 'Título código QR',
|
|
91
91
|
required: false,
|
|
92
92
|
show: ShowValidations.qrCodeEnabled
|
|
93
|
+
}),
|
|
94
|
+
|
|
95
|
+
new DateInput({
|
|
96
|
+
id: 'expirationDate',
|
|
97
|
+
label: 'Fecha de expiración Noticia',
|
|
93
98
|
})
|
|
94
99
|
],
|
|
95
100
|
itemDisplayClass: '2-lines',
|
|
96
101
|
itemDisplayAttributes: {
|
|
97
102
|
title: 'title',
|
|
98
|
-
subtitle: 'description'
|
|
103
|
+
subtitle: 'description',
|
|
104
|
+
expirationDate: "expirationDate"
|
|
99
105
|
}
|
|
100
106
|
})
|
|
101
107
|
|
|
102
108
|
export const configuration: Configuration = new Configuration({
|
|
103
|
-
durationFormula: `(
|
|
109
|
+
durationFormula: `(function() {
|
|
110
|
+
let news = {{news}};
|
|
111
|
+
if (!news) return undefined;
|
|
112
|
+
let currentDate = new Date();
|
|
113
|
+
let time = news.reduce(function (accumulatedTime, newsItem) {
|
|
114
|
+
let expirationDate = new Date(newsItem.option.expirationDate);
|
|
115
|
+
if (expirationDate <= currentDate) return accumulatedTime;
|
|
116
|
+
let newsItemTime = newsItem.number || 5;
|
|
117
|
+
return accumulatedTime + newsItemTime;
|
|
118
|
+
}, 0);
|
|
119
|
+
return time;
|
|
120
|
+
})()
|
|
121
|
+
`,
|
|
104
122
|
schema: [
|
|
105
123
|
newsList,
|
|
106
124
|
appereanceGroup
|
package/configuration.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"durationFormula": "({
|
|
2
|
+
"durationFormula": "(function() {\n let news = {{news}};\n if (!news) return undefined;\n let currentDate = new Date();\n let time = news.reduce(function (accumulatedTime, newsItem) {\n let expirationDate = new Date(newsItem.option.expirationDate);\n if (expirationDate <= currentDate) return accumulatedTime;\n let newsItemTime = newsItem.number || 5;\n return accumulatedTime + newsItemTime;\n }, 0);\n return time;\n })()\n ",
|
|
3
3
|
"schema": [
|
|
4
4
|
{
|
|
5
5
|
"id": "news",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"show": "{{titleEnabled}} === true && ({{newsSizeSelect}} === 'short')",
|
|
13
13
|
"type": "text-input",
|
|
14
14
|
"required": true,
|
|
15
|
-
"range": "[1:25]"
|
|
15
|
+
"range": "[1:25:]"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"id": "title",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"show": "{{titleEnabled}} === true && ({{newsSizeSelect}} === 'medium')",
|
|
21
21
|
"type": "text-input",
|
|
22
22
|
"required": true,
|
|
23
|
-
"range": "[1:40]"
|
|
23
|
+
"range": "[1:40:]"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"id": "title",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"show": "{{titleEnabled}} === true && ({{newsSizeSelect}} === 'large')",
|
|
29
29
|
"type": "text-input",
|
|
30
30
|
"required": true,
|
|
31
|
-
"range": "[1:50]"
|
|
31
|
+
"range": "[1:50:]"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"id": "title",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"show": "{{titleEnabled}} === true && ({{newsSizeSelect}} === 'extra-large')",
|
|
37
37
|
"type": "text-input",
|
|
38
38
|
"required": true,
|
|
39
|
-
"range": "[1:70]"
|
|
39
|
+
"range": "[1:70:]"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"id": "description",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"show": "{{descriptionEnabled}} === true && ({{newsSizeSelect}} === 'short')",
|
|
45
45
|
"type": "text-area",
|
|
46
46
|
"required": true,
|
|
47
|
-
"range": "[1:80]",
|
|
47
|
+
"range": "[1:80:]",
|
|
48
48
|
"html": true
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"show": "{{descriptionEnabled}} === true && ({{newsSizeSelect}} === 'medium')",
|
|
54
54
|
"type": "text-area",
|
|
55
55
|
"required": true,
|
|
56
|
-
"range": "[1:180]",
|
|
56
|
+
"range": "[1:180:]",
|
|
57
57
|
"html": true
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"show": "{{descriptionEnabled}} === true && ({{newsSizeSelect}} === 'large')",
|
|
63
63
|
"type": "text-area",
|
|
64
64
|
"required": true,
|
|
65
|
-
"range": "[1:350]",
|
|
65
|
+
"range": "[1:350:]",
|
|
66
66
|
"html": true
|
|
67
67
|
},
|
|
68
68
|
{
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"show": "{{descriptionEnabled}} === true && ({{newsSizeSelect}} === 'extra-large')",
|
|
72
72
|
"type": "text-area",
|
|
73
73
|
"required": true,
|
|
74
|
-
"range": "[1:500]",
|
|
74
|
+
"range": "[1:500:]",
|
|
75
75
|
"html": true
|
|
76
76
|
},
|
|
77
77
|
{
|
|
@@ -105,9 +105,7 @@
|
|
|
105
105
|
{
|
|
106
106
|
"id": "expirationDate",
|
|
107
107
|
"label": "Fecha de expiración Noticia",
|
|
108
|
-
"type": "date-input"
|
|
109
|
-
"required": false
|
|
110
|
-
|
|
108
|
+
"type": "date-input"
|
|
111
109
|
}
|
|
112
110
|
],
|
|
113
111
|
"description": "Lista de noticias",
|
|
@@ -115,7 +113,7 @@
|
|
|
115
113
|
"itemDisplayAttributes": {
|
|
116
114
|
"title": "title",
|
|
117
115
|
"subtitle": "description",
|
|
118
|
-
"expirationDate": "expirationDate"
|
|
116
|
+
"expirationDate": "expirationDate"
|
|
119
117
|
},
|
|
120
118
|
"sortable": true
|
|
121
119
|
},
|