@vixoniccom/news-internal 0.4.13-beta.13 → 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 +4 -0
- package/build.zip +0 -0
- package/configuration/index.ts +22 -4
- package/configuration.json +12 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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
|
+
|
|
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)
|
|
8
|
+
|
|
5
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)
|
|
6
10
|
|
|
7
11
|
### [0.4.13-beta.12](https://bitbucket.org/rexmas_cl/news-internal/compare/v0.4.13-beta.11...v0.4.13-beta.12) (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
|
{
|
|
@@ -91,14 +91,7 @@
|
|
|
91
91
|
{
|
|
92
92
|
"id": "qrCodeUrl",
|
|
93
93
|
"label": "URL código QR",
|
|
94
|
-
"show": "{{qrCodeEnabled}} === true
|
|
95
|
-
"type": "bitly-input",
|
|
96
|
-
"required": true
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"id": "qrCodeUrl",
|
|
100
|
-
"label": "URL código QR",
|
|
101
|
-
"show": "{{qrCodeEnabled}} === true && ({{bitly}} === false)",
|
|
94
|
+
"show": "{{qrCodeEnabled}} === true",
|
|
102
95
|
"type": "text-input",
|
|
103
96
|
"required": true
|
|
104
97
|
},
|
|
@@ -112,9 +105,7 @@
|
|
|
112
105
|
{
|
|
113
106
|
"id": "expirationDate",
|
|
114
107
|
"label": "Fecha de expiración Noticia",
|
|
115
|
-
"type": "date-input"
|
|
116
|
-
"required": false
|
|
117
|
-
|
|
108
|
+
"type": "date-input"
|
|
118
109
|
}
|
|
119
110
|
],
|
|
120
111
|
"description": "Lista de noticias",
|
|
@@ -122,7 +113,7 @@
|
|
|
122
113
|
"itemDisplayAttributes": {
|
|
123
114
|
"title": "title",
|
|
124
115
|
"subtitle": "description",
|
|
125
|
-
"expirationDate": "expirationDate"
|
|
116
|
+
"expirationDate": "expirationDate"
|
|
126
117
|
},
|
|
127
118
|
"sortable": true
|
|
128
119
|
},
|
|
@@ -628,19 +619,6 @@
|
|
|
628
619
|
"required": false
|
|
629
620
|
}
|
|
630
621
|
]
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
"id": "bitly",
|
|
634
|
-
"label": "Bitly",
|
|
635
|
-
"type": "group",
|
|
636
|
-
"items":[
|
|
637
|
-
{
|
|
638
|
-
"id": "bitly",
|
|
639
|
-
"label": "Habilitar Bitly",
|
|
640
|
-
"type": "switch",
|
|
641
|
-
"defaultValue": false
|
|
642
|
-
}
|
|
643
|
-
]
|
|
644
622
|
}
|
|
645
623
|
]
|
|
646
624
|
}
|