niris-public-community-components 0.0.6 → 0.0.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "niris-public-community-components",
3
3
  "private": false,
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "homepage": "https://iris.apsl.net",
6
6
  "description": "Web components for the NIRIS project developed with the Lit library",
7
7
  "main": "dist/index.js",
package/src/form-niris.ts CHANGED
@@ -57,8 +57,8 @@ export class FormNiris extends LitElement {
57
57
  private _map!: Map;
58
58
  private _markerIcon!: Icon;
59
59
 
60
- @property({type: String}) defaultLat: string = '39.5701058'; // Palma de Mallorca
61
- @property({type: String}) defaultLon: string = '2.6487098';
60
+ @property({type: String}) defaultLat = '39.5701058'; // Palma de Mallorca
61
+ @property({type: String}) defaultLon = '2.6487098';
62
62
 
63
63
  @property({type: String}) locale: 'es' | 'en' | 'ca' = 'es';
64
64
 
@@ -66,42 +66,42 @@ export class FormNiris extends LitElement {
66
66
  private isCitizen: Boolean = true;
67
67
 
68
68
  @state()
69
- private activeMap: boolean = false;
69
+ private activeMap = false;
70
70
 
71
71
  @state()
72
72
  private ubiDistricts: Object[] = [];
73
73
 
74
74
  @state()
75
- private submited: boolean = false;
75
+ private submited = false;
76
76
 
77
77
  @state()
78
- private error: boolean = false;
78
+ private error = false;
79
79
 
80
80
  @state()
81
- private incidenceId: string = '';
81
+ private incidenceId = '';
82
82
 
83
83
  @state()
84
- private extensionFiles: string = '';
84
+ private extensionFiles = '';
85
85
 
86
86
  /* Map */
87
- @property({type: String}) domain: string =
87
+ @property({type: String}) domain =
88
88
  'https://iris2-backend-demo-iris-community.labs.apsl.io/services/iris/api-public';
89
89
  // TODO property for lat and lon
90
90
 
91
91
  @state()
92
- private street: string = '';
92
+ private street = '';
93
93
 
94
94
  @state()
95
- private streetNumber: string = '';
95
+ private streetNumber = '';
96
96
 
97
97
  @state()
98
- private latitude: string = '';
98
+ private latitude = '';
99
99
 
100
100
  @state()
101
- private longitude: string = '';
101
+ private longitude = '';
102
102
 
103
103
  @state()
104
- private loading: boolean = false;
104
+ private loading = false;
105
105
 
106
106
  constructor() {
107
107
  super();
@@ -116,7 +116,7 @@ export class FormNiris extends LitElement {
116
116
  this.characteristics = [];
117
117
 
118
118
  this.locale = this.locale ? this.locale : 'es';
119
- setLocale(this.locale);
119
+ // setLocale(this.locale);
120
120
 
121
121
  // Map
122
122
  L.Icon.Default.imagePath = `https://unpkg.com/leaflet@${L.version}/dist/images/`;
@@ -704,7 +704,7 @@ export class FormNiris extends LitElement {
704
704
  <div>
705
705
  <button
706
706
  type="button"
707
- .disabled="${!Boolean(this.street.length)}"
707
+ .disabled="${!this.street.length}"
708
708
  @click="${this.searchAddress}"
709
709
  >
710
710
  ${msg('Buscar')}
@@ -830,7 +830,7 @@ export class FormNiris extends LitElement {
830
830
 
831
831
  if ('characteristics' in errors) {
832
832
  const characteristics = errors['characteristics'];
833
- for (let [key, errors] of characteristics.entries()) {
833
+ for (const [key, errors] of characteristics.entries()) {
834
834
  if (Object.keys(errors).length !== 0) {
835
835
  debugger;
836
836
  const input = this.shadowRoot?.getElementById(
@@ -23,7 +23,7 @@ export class TextareaToNiris extends LitElement {
23
23
  this.formAction = '';
24
24
  this.keywords = '';
25
25
  this.locale = 'es'
26
- // setLocale(this.locale);
26
+ //setLocale(this.locale);
27
27
  }
28
28
 
29
29
  updateShownValue(event: Event) {