@ccrpc/webmapgl 0.18.3 → 0.18.4

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.
@@ -7,8 +7,8 @@ export class Field {
7
7
  this.message = undefined;
8
8
  this.attribute = undefined;
9
9
  this.image = undefined;
10
- this.label = undefined;
11
- this.placeholder = undefined;
10
+ this.label = "";
11
+ this.placeholder = "";
12
12
  this.required = false;
13
13
  this.type = undefined;
14
14
  this.widget = undefined;
@@ -60,7 +60,7 @@ export class Field {
60
60
  return (h("ion-item", null, h("ion-label", null, this.label), ",", h("ion-select", { onIonChange: this.onChange, value: this.getValue() }, h("slot", null))));
61
61
  }
62
62
  getTextareaField() {
63
- return (h("ion-item", null, h("ion-label", { "text-wrap": true, position: "floating" }, this.label), h("ion-textarea", { onIonInput: this.onInput, placeholder: this.placeholder, value: this._getValue() || "", legacy: true })));
63
+ return (h("ion-item", null, this.label !== "" ? (h("ion-label", { "text-wrap": true, position: "floating" }, this.label)) : (""), h("ion-textarea", { onIonInput: this.onInput, placeholder: this.placeholder, value: this._getValue() || "", legacy: true })));
64
64
  }
65
65
  getInstructionsField() {
66
66
  return (h("ion-item", null, h("ion-textarea", { readonly: true, value: this.label })));
@@ -137,7 +137,8 @@ export class Field {
137
137
  "text": "Label text for the field item."
138
138
  },
139
139
  "attribute": "label",
140
- "reflect": false
140
+ "reflect": false,
141
+ "defaultValue": "\"\""
141
142
  },
142
143
  "placeholder": {
143
144
  "type": "string",
@@ -154,7 +155,8 @@ export class Field {
154
155
  "text": "A placeholder prompt text to display to the user, valid only for textarea and input fields."
155
156
  },
156
157
  "attribute": "placeholder",
157
- "reflect": false
158
+ "reflect": false,
159
+ "defaultValue": "\"\""
158
160
  },
159
161
  "required": {
160
162
  "type": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EACT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EAC7B,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,GACZ,CACJ,CACZ,CAAC;EACJ,CAAC;EAED,MAAM;IACJ,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE;MAC3B,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;KAC7B;SAAM,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;MACnC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;KAC9B;SAAM,IAAI,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE;MACpC,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;KAChC;SAAM,IAAI,IAAI,CAAC,MAAM,IAAI,cAAc,EAAE;MACxC,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;KACpC;SAAM;MACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;KAC7B;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n State,\n Host,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\nimport {\n InputCustomEvent,\n SelectCustomEvent,\n TextareaCustomEvent,\n RadioGroupCustomEvent,\n} from \"@ionic/core\";\n\n@Component({\n tag: \"gl-field\",\n})\nexport class Field {\n @Element() el: HTMLGlFieldElement;\n\n /**\n * Emitted when the field value is changed by the user.\n */\n @Event() glFieldValueChanged: EventEmitter;\n\n @State() message: string;\n\n /**\n * The feature property that corresponds to the form field.\n */\n @Prop() readonly attribute: string;\n\n /**\n * Image URL for the field item.\n */\n @Prop() readonly image: string;\n\n /**\n * Label text for the field item.\n */\n @Prop() readonly label: string;\n\n /**\n * A placeholder prompt text to display to the user, valid only for textarea and input fields.\n */\n @Prop() readonly placeholder: string;\n\n /**\n * The field must be filled out before the form can be submitted.\n */\n @Prop() readonly required: boolean = false;\n\n /**\n * Field type. It is not currently used.\n */\n @Prop() readonly type: any;\n\n /**\n * Widget used to render the field.\n */\n @Prop() readonly widget:\n | \"input\"\n | \"radio\"\n | \"select\"\n | \"textarea\"\n | \"instructions\";\n\n @Listen(\"glOptionChanged\")\n optionChanged(e) {\n this.changed(e.detail);\n }\n\n private _getValue() {\n const form = this.el.closest(\"gl-form\");\n if (form.feature == undefined || form.feature.properties == undefined)\n return;\n return form.feature.properties[this.attribute];\n }\n\n /**\n * Returns whether this field is valid\n * @returns\n */\n @Method()\n async isValid() {\n return this.validate() == null;\n }\n\n /**\n * Returns the value of the attribute of the feature this form is editing\n * @returns value of the attribute of the feature\n */\n @Method()\n async getValue() {\n return this._getValue();\n }\n\n /**\n * Checks whether the value is required and also present\n * If it is not returns an error text, if it is valid returns null\n * @returns\n */\n @Method()\n async validate() {\n const value = await this.getValue();\n if (this.required && (value == undefined || value === \"\"))\n return _t(\"webmapgl.field.required\", { field: this.label });\n\n return null;\n }\n\n private changed(value: any) {\n this.glFieldValueChanged.emit({\n field: this,\n value: value,\n });\n }\n\n private onChange = (e: SelectCustomEvent | RadioGroupCustomEvent) =>\n this.changed(e.detail.value);\n\n private getRadioField() {\n return (\n <Host>\n <ion-list-header>{this.label}</ion-list-header>\n <ion-radio-group onIonChange={this.onChange}>\n <slot />\n </ion-radio-group>\n </Host>\n );\n }\n\n private getSelectField() {\n return (\n <ion-item>\n <ion-label>{this.label}</ion-label>,\n <ion-select onIonChange={this.onChange} value={this.getValue()}>\n <slot />\n </ion-select>\n </ion-item>\n );\n }\n\n private onInput = (e: TextareaCustomEvent | InputCustomEvent) =>\n this.changed(e.detail.value);\n\n private getTextareaField() {\n return (\n <ion-item>\n <ion-label text-wrap position=\"floating\">\n {this.label}\n </ion-label>\n <ion-textarea\n onIonInput={this.onInput}\n placeholder={this.placeholder}\n value={this._getValue() || \"\"}\n legacy={true} // We are opting for the legacy version of labels for textarea as there is no other way to text-wrap the label\n ></ion-textarea>\n </ion-item>\n );\n }\n\n private getInstructionsField() {\n return (\n <ion-item>\n <ion-textarea readonly={true} value={this.label}></ion-textarea>\n </ion-item>\n );\n }\n\n private getInputField() {\n return (\n <ion-item>\n <ion-label text-wrap position=\"floating\">\n {this.label}\n </ion-label>\n <ion-input\n onIonInput={this.onInput}\n type=\"text\"\n placeholder={this.placeholder}\n value={this._getValue()}\n ></ion-input>\n </ion-item>\n );\n }\n\n render() {\n if (this.widget === \"radio\") {\n return this.getRadioField();\n } else if (this.widget === \"select\") {\n return this.getSelectField();\n } else if (this.widget == \"textarea\") {\n return this.getTextareaField();\n } else if (this.widget == \"instructions\") {\n return this.getInstructionsField();\n } else {\n return this.getInputField();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EACT,OAAO,EACP,KAAK,EAEL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAWlC,MAAM,OAAO,KAAK;;IAqGR,aAAQ,GAAG,CAAC,CAA4C,EAAE,EAAE,CAClE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAwBvB,YAAO,GAAG,CAAC,CAAyC,EAAE,EAAE,CAC9D,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;;;;iBAxGE,EAAE;uBAKI,EAAE;oBAKJ,KAAK;;;;EAkB1C,aAAa,CAAC,CAAC;IACb,IAAI,CAAC,OAAO,CAAC,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,IAAI,CAAC,MAAM,IAAI,cAAc,EAAE;MACxC,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;KACpC;SAAM;MACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;KAC7B;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n State,\n Host,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\nimport {\n InputCustomEvent,\n SelectCustomEvent,\n TextareaCustomEvent,\n RadioGroupCustomEvent,\n} from \"@ionic/core\";\n\n@Component({\n tag: \"gl-field\",\n})\nexport class Field {\n @Element() el: HTMLGlFieldElement;\n\n /**\n * Emitted when the field value is changed by the user.\n */\n @Event() glFieldValueChanged: EventEmitter;\n\n @State() message: string;\n\n /**\n * The feature property that corresponds to the form field.\n */\n @Prop() readonly attribute: string;\n\n /**\n * Image URL for the field item.\n */\n @Prop() readonly image: string;\n\n /**\n * Label text for the field item.\n */\n @Prop() readonly label: string = \"\";\n\n /**\n * A placeholder prompt text to display to the user, valid only for textarea and input fields.\n */\n @Prop() readonly placeholder: string = \"\";\n\n /**\n * The field must be filled out before the form can be submitted.\n */\n @Prop() readonly required: boolean = false;\n\n /**\n * Field type. It is not currently used.\n */\n @Prop() readonly type: any;\n\n /**\n * Widget used to render the field.\n */\n @Prop() readonly widget:\n | \"input\"\n | \"radio\"\n | \"select\"\n | \"textarea\"\n | \"instructions\";\n\n @Listen(\"glOptionChanged\")\n optionChanged(e) {\n this.changed(e.detail);\n }\n\n private _getValue() {\n const form = this.el.closest(\"gl-form\");\n if (form.feature == undefined || form.feature.properties == undefined)\n return;\n return form.feature.properties[this.attribute];\n }\n\n /**\n * Returns whether this field is valid\n * @returns\n */\n @Method()\n async isValid() {\n return this.validate() == null;\n }\n\n /**\n * Returns the value of the attribute of the feature this form is editing\n * @returns value of the attribute of the feature\n */\n @Method()\n async getValue() {\n return this._getValue();\n }\n\n /**\n * Checks whether the value is required and also present\n * If it is not returns an error text, if it is valid returns null\n * @returns\n */\n @Method()\n async validate() {\n const value = await this.getValue();\n if (this.required && (value == undefined || value === \"\"))\n return _t(\"webmapgl.field.required\", { field: this.label });\n\n return null;\n }\n\n private changed(value: any) {\n this.glFieldValueChanged.emit({\n field: this,\n value: value,\n });\n }\n\n private onChange = (e: SelectCustomEvent | RadioGroupCustomEvent) =>\n this.changed(e.detail.value);\n\n private getRadioField() {\n return (\n <Host>\n <ion-list-header>{this.label}</ion-list-header>\n <ion-radio-group onIonChange={this.onChange}>\n <slot />\n </ion-radio-group>\n </Host>\n );\n }\n\n private getSelectField() {\n return (\n <ion-item>\n <ion-label>{this.label}</ion-label>,\n <ion-select onIonChange={this.onChange} value={this.getValue()}>\n <slot />\n </ion-select>\n </ion-item>\n );\n }\n\n private onInput = (e: TextareaCustomEvent | InputCustomEvent) =>\n this.changed(e.detail.value);\n\n private getTextareaField() {\n return (\n <ion-item>\n {this.label !== \"\" ? (\n <ion-label text-wrap position=\"floating\">\n {this.label}\n </ion-label>\n ) : (\n \"\"\n )}\n <ion-textarea\n onIonInput={this.onInput}\n placeholder={this.placeholder}\n value={this._getValue() || \"\"}\n legacy={true} // We are opting for the legacy version of labels for textarea as there is no other way to text-wrap the label\n ></ion-textarea>\n </ion-item>\n );\n }\n\n private getInstructionsField() {\n return (\n <ion-item>\n <ion-textarea readonly={true} value={this.label}></ion-textarea>\n </ion-item>\n );\n }\n\n private getInputField() {\n return (\n <ion-item>\n <ion-label text-wrap position=\"floating\">\n {this.label}\n </ion-label>\n <ion-input\n onIonInput={this.onInput}\n type=\"text\"\n placeholder={this.placeholder}\n value={this._getValue()}\n ></ion-input>\n </ion-item>\n );\n }\n\n render() {\n if (this.widget === \"radio\") {\n return this.getRadioField();\n } else if (this.widget === \"select\") {\n return this.getSelectField();\n } else if (this.widget == \"textarea\") {\n return this.getTextareaField();\n } else if (this.widget == \"instructions\") {\n return this.getInstructionsField();\n } else {\n return this.getInputField();\n }\n }\n}\n"]}
@@ -42,8 +42,8 @@ const Field = class {
42
42
  this.message = undefined;
43
43
  this.attribute = undefined;
44
44
  this.image = undefined;
45
- this.label = undefined;
46
- this.placeholder = undefined;
45
+ this.label = "";
46
+ this.placeholder = "";
47
47
  this.required = false;
48
48
  this.type = undefined;
49
49
  this.widget = undefined;
@@ -95,7 +95,7 @@ const Field = class {
95
95
  return (h("ion-item", null, h("ion-label", null, this.label), ",", h("ion-select", { onIonChange: this.onChange, value: this.getValue() }, h("slot", null))));
96
96
  }
97
97
  getTextareaField() {
98
- return (h("ion-item", null, h("ion-label", { "text-wrap": true, position: "floating" }, this.label), h("ion-textarea", { onIonInput: this.onInput, placeholder: this.placeholder, value: this._getValue() || "", legacy: true })));
98
+ return (h("ion-item", null, this.label !== "" ? (h("ion-label", { "text-wrap": true, position: "floating" }, this.label)) : (""), h("ion-textarea", { onIonInput: this.onInput, placeholder: this.placeholder, value: this._getValue() || "", legacy: true })));
99
99
  }
100
100
  getInstructionsField() {
101
101
  return (h("ion-item", null, h("ion-textarea", { readonly: true, value: this.label })));