@vixoniccom/news-internal 0.4.3 → 0.4.4-dev.0

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,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.4-dev.0 (2021-06-23)
6
+
7
+
8
+
5
9
  ## [0.4.2](https://bitbucket.org/vixonicmodules/news-internal/compare/v0.4.1...v0.4.2) (2019-04-03)
6
10
 
7
11
 
@@ -1,5 +1,5 @@
1
- import { Label, Switch, TextFormat, NumberInput, SelectInput } from '@vixonic/modules'
2
- import { NumberRangeValue, ColorPicker, Slider, SelectAssetKna, TextInput } from '@vixonic/modules/dist/lib'
1
+ import { Label, Switch, TextFormat, NumberInput, SelectInput } from '@vixoniccom/modules'
2
+ import { NumberRangeValue, ColorPicker, Slider, SelectAssetKna, TextInput } from '@vixoniccom/modules/dist/lib'
3
3
 
4
4
  import { ShowValidations } from '../utils'
5
5
 
@@ -7,7 +7,6 @@ const createTextInputs = (scope: string, label: string, show: string) => {
7
7
  return [
8
8
  new Switch({ id: `${scope}Enabled`, label, defaultValue: true }),
9
9
  new TextFormat({ id: `${scope}Format`, label: 'Formato', show }),
10
- new NumberInput({ id: `${scope}MaxLength`, label: 'Caracteres máximos', show }),
11
10
  new NumberInput({ id: `${scope}LineHeight`, label: 'Altura de línea', range: new NumberRangeValue(.8, 100), show })
12
11
  ]
13
12
  }
@@ -1,8 +1,22 @@
1
- import { Label, SelectInput, NumberInput } from '@vixonic/modules'
2
- import { NumberRangeValue, Slider } from '@vixonic/modules/dist/lib'
1
+ import { Label, SelectInput, NumberInput } from '@vixoniccom/modules'
2
+ import { NumberRangeValue, Slider } from '@vixoniccom/modules/dist/lib'
3
3
 
4
4
  export const generalInputs = [
5
5
  new Label({ label: 'General' }),
6
+
7
+ new SelectInput({
8
+ id: 'newsSizeSelect',
9
+ label: 'Noticia:',
10
+ description: 'Tamaño de la noticia.',
11
+ required: true,
12
+ defaultValue: 'medium',
13
+ items: [
14
+ { label: 'Corta', value: 'short' },
15
+ { label: 'Mediana', value: 'medium' },
16
+ { label: 'Extensa', value: 'large' }
17
+ ]
18
+ }),
19
+
6
20
  new SelectInput({ id: 'template', label: 'Modo', required: true, defaultValue: 'standard', items: [
7
21
  {label: 'Estandar', value: 'standard'},
8
22
  {label: 'Galeria', value: 'gallery'}
@@ -1,4 +1,4 @@
1
- import { Group } from '@vixonic/modules'
1
+ import { Group } from '@vixoniccom/modules'
2
2
  import { generalInputs } from './generalInputs'
3
3
  import { elementsInputs } from './elementsInputs'
4
4
 
@@ -1,4 +1,4 @@
1
- import { Configuration, List, TextInput, SelectAssetKna, TextArea } from '@vixonic/modules'
1
+ import { Configuration, List, TextInput, SelectAssetKna, TextArea, NumberRangeValue } from '@vixoniccom/modules'
2
2
  import { appereanceGroup } from './appearanceGroup'
3
3
  import { ShowValidations } from './utils'
4
4
 
@@ -8,8 +8,54 @@ const newsList = new List({
8
8
  description: 'Lista de noticias',
9
9
  sortable: true,
10
10
  itemSchema: [
11
- new TextInput({ id: 'title', label: 'Título', required: true, show: ShowValidations.titleEnabled }),
12
- new TextArea({ id: 'description', label: 'Descripción', required: true, show: ShowValidations.descriptionEnabled }),
11
+
12
+ new TextInput({
13
+ id: 'title',
14
+ label: 'Título corto',
15
+ required: true,
16
+ show: ShowValidations.shortNewsEnabled,
17
+ range: new NumberRangeValue(1, 20)
18
+ }),
19
+ new TextInput({
20
+ id: 'title',
21
+ label: 'Título mediano',
22
+ required: true,
23
+ show: ShowValidations.mediumNewsEnabled,
24
+ range: new NumberRangeValue(1, 50)
25
+ }),
26
+ new TextInput({
27
+ id: 'title',
28
+ label: 'Título largo',
29
+ required: true,
30
+ show: ShowValidations.largeNewsEnabled,
31
+ range: new NumberRangeValue(1, 80)
32
+ }),
33
+
34
+ new TextArea({
35
+ id: 'description',
36
+ label: 'Descripción corta',
37
+ required: true,
38
+ show: ShowValidations.shortNewsEnabled,
39
+ range: new NumberRangeValue(1, 80)
40
+ }),
41
+
42
+ new TextArea({
43
+ id: 'description',
44
+ label: 'Descripción mediana',
45
+ required: true,
46
+ show: ShowValidations.mediumNewsEnabled,
47
+ range: new NumberRangeValue(1, 350)
48
+ }),
49
+
50
+ new TextArea({
51
+ id: 'description',
52
+ label: 'Descripción larga',
53
+ required: true,
54
+ show: ShowValidations.largeNewsEnabled,
55
+ range: new NumberRangeValue(1, 650)
56
+ }),
57
+
58
+
13
59
  new SelectAssetKna({ id: 'image', label: 'Imágen', required: true,
14
60
  extensions: ['jpg', 'jpeg', 'png', 'svg'], show: ShowValidations.imageEnabled})
15
61
  ],
@@ -6,6 +6,9 @@ const isNotGallery = `${imageEnabled} && ( ( ${isGallery} ) === false )`
6
6
  const galleryIconEnabled = `${isGallery} && ({{iconVisible}} === true)`
7
7
  const isCustomSize = `${isNotGallery} && ( {{imageSize}} === 'custom' )`
8
8
  const titleAndDescription = `${titleEnabled} && ${descriptionEnabled}`
9
+ const shortNewsEnabled = ` ${titleEnabled} && ({{newsSizeSelect}} === 'short')`
10
+ const mediumNewsEnabled = ` ${titleEnabled} && ({{newsSizeSelect}} === 'medium')`
11
+ const largeNewsEnabled = ` ${titleEnabled} && ({{newsSizeSelect}} === 'large')`
9
12
 
10
13
  export const ShowValidations = {
11
14
  titleEnabled,
@@ -15,5 +18,8 @@ export const ShowValidations = {
15
18
  galleryIconEnabled,
16
19
  isNotGallery,
17
20
  titleAndDescription,
18
- isCustomSize
21
+ isCustomSize,
22
+ shortNewsEnabled,
23
+ mediumNewsEnabled,
24
+ largeNewsEnabled
19
25
  }
@@ -9,16 +9,50 @@
9
9
  {
10
10
  "type": "text-input",
11
11
  "id": "title",
12
- "label": "Título",
13
- "show": "{{titleEnabled}} === true",
14
- "required": true
12
+ "label": "Título corto",
13
+ "show": " {{titleEnabled}} === true && ({{newsSizeSelect}} === 'short')",
14
+ "required": true,
15
+ "range": "[1:20:]"
16
+ },
17
+ {
18
+ "type": "text-input",
19
+ "id": "title",
20
+ "label": "Título mediano",
21
+ "show": " {{titleEnabled}} === true && ({{newsSizeSelect}} === 'medium')",
22
+ "required": true,
23
+ "range": "[1:50:]"
24
+ },
25
+ {
26
+ "type": "text-input",
27
+ "id": "title",
28
+ "label": "Título largo",
29
+ "show": " {{titleEnabled}} === true && ({{newsSizeSelect}} === 'large')",
30
+ "required": true,
31
+ "range": "[1:80:]"
15
32
  },
16
33
  {
17
34
  "type": "text-area",
18
35
  "id": "description",
19
- "label": "Descripción",
20
- "show": "{{descriptionEnabled}} === true",
21
- "required": true
36
+ "label": "Descripción corta",
37
+ "show": " {{titleEnabled}} === true && ({{newsSizeSelect}} === 'short')",
38
+ "required": true,
39
+ "range": "[1:80:]"
40
+ },
41
+ {
42
+ "type": "text-area",
43
+ "id": "description",
44
+ "label": "Descripción mediana",
45
+ "show": " {{titleEnabled}} === true && ({{newsSizeSelect}} === 'medium')",
46
+ "required": true,
47
+ "range": "[1:350:]"
48
+ },
49
+ {
50
+ "type": "text-area",
51
+ "id": "description",
52
+ "label": "Descripción larga",
53
+ "show": " {{titleEnabled}} === true && ({{newsSizeSelect}} === 'large')",
54
+ "required": true,
55
+ "range": "[1:650:]"
22
56
  },
23
57
  {
24
58
  "type": "select-asset-kna-input",
@@ -31,7 +65,8 @@
31
65
  "jpeg",
32
66
  "png",
33
67
  "svg"
34
- ]
68
+ ],
69
+ "multiple": false
35
70
  }
36
71
  ],
37
72
  "description": "Lista de noticias",
@@ -51,6 +86,28 @@
51
86
  "type": "label",
52
87
  "label": "General"
53
88
  },
89
+ {
90
+ "type": "select-input",
91
+ "id": "newsSizeSelect",
92
+ "label": "Noticia:",
93
+ "description": "Tamaño de la noticia.",
94
+ "items": [
95
+ {
96
+ "label": "Corta",
97
+ "value": "short"
98
+ },
99
+ {
100
+ "label": "Mediana",
101
+ "value": "medium"
102
+ },
103
+ {
104
+ "label": "Extensa",
105
+ "value": "large"
106
+ }
107
+ ],
108
+ "required": true,
109
+ "defaultValue": "medium"
110
+ },
54
111
  {
55
112
  "type": "select-input",
56
113
  "id": "template",
@@ -151,12 +208,6 @@
151
208
  "label": "Formato",
152
209
  "show": "{{titleEnabled}} === true"
153
210
  },
154
- {
155
- "type": "number-input",
156
- "id": "titleMaxLength",
157
- "label": "Caracteres máximos",
158
- "show": "{{titleEnabled}} === true"
159
- },
160
211
  {
161
212
  "type": "number-input",
162
213
  "id": "titleLineHeight",
@@ -176,12 +227,6 @@
176
227
  "label": "Formato",
177
228
  "show": "{{descriptionEnabled}} === true"
178
229
  },
179
- {
180
- "type": "number-input",
181
- "id": "descriptionMaxLength",
182
- "label": "Caracteres máximos",
183
- "show": "{{descriptionEnabled}} === true"
184
- },
185
230
  {
186
231
  "type": "number-input",
187
232
  "id": "descriptionLineHeight",
@@ -351,7 +396,8 @@
351
396
  "type": "color-picker",
352
397
  "id": "barColor",
353
398
  "label": "Color de la barra",
354
- "show": "{{template}} === 'gallery'"
399
+ "show": "{{template}} === 'gallery'",
400
+ "output": "auto"
355
401
  },
356
402
  {
357
403
  "type": "slider",
@@ -373,7 +419,8 @@
373
419
  "type": "color-picker",
374
420
  "id": "iconColor",
375
421
  "label": "Color del ícono",
376
- "show": "{{template}} === 'gallery' && ({{iconVisible}} === true)"
422
+ "show": "{{template}} === 'gallery' && ({{iconVisible}} === true)",
423
+ "output": "auto"
377
424
  },
378
425
  {
379
426
  "type": "label",
@@ -387,7 +434,8 @@
387
434
  "jpg",
388
435
  "jpeg",
389
436
  "png"
390
- ]
437
+ ],
438
+ "multiple": false
391
439
  },
392
440
  {
393
441
  "type": "text-input",
package/package.json CHANGED
@@ -7,16 +7,18 @@
7
7
  "author": {
8
8
  "name": ""
9
9
  },
10
- "version": "0.4.3",
10
+ "version": "0.4.4-dev.0",
11
11
  "scripts": {
12
12
  "prepublishOnly": "vixonic-module-packager --mode=build",
13
13
  "watch": "vixonic-module-packager --mode=watch",
14
14
  "run": "vixonic-module-packager --mode=run",
15
15
  "configuration": "vixonic-module-packager --mode generate-configuration",
16
16
  "configuration:validate": "vixonic-module-packager --mode validate-configuration",
17
- "release": "standard-version"
17
+ "release": "standard-version",
18
+ "prerelease-dev": "standard-version --prerelease dev"
18
19
  },
19
20
  "dependencies": {
21
+ "@vixoniccom/module-packager": "^2.4.2",
20
22
  "react": "^16.3.2",
21
23
  "react-dom": "^16.3.2",
22
24
  "react-transition-group": "^2.3.1",
package/build.zip DELETED
Binary file