@ccrpc/webmapgl 0.18.1 → 0.18.3
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 +15 -0
- package/dist/cjs/app-globals-62694daf.js.map +1 -1
- package/dist/cjs/gl-address-search_52.cjs.entry.js +3 -2
- package/dist/cjs/gl-address-search_52.cjs.entry.js.map +1 -1
- package/dist/cjs/gl-facet_5.cjs.entry.js +10 -3
- package/dist/cjs/gl-facet_5.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/webmapgl.cjs.js +1 -1
- package/dist/collection/components/app/app.js +21 -2
- package/dist/collection/components/app/app.js.map +1 -1
- package/dist/collection/components/attribute-values/attribute-values.js +1 -1
- package/dist/collection/components/feature-list/feature-list.js +1 -1
- package/dist/collection/components/field/field.js +28 -4
- package/dist/collection/components/field/field.js.map +1 -1
- package/dist/collection/components/form-page/form-page.js +1 -1
- package/dist/collection/components/form-page/form-page.js.map +1 -1
- package/dist/collection/components/style/style.js +3 -3
- package/dist/esm/app-globals-755c21e9.js.map +1 -1
- package/dist/esm/gl-address-search_52.entry.js +3 -2
- package/dist/esm/gl-address-search_52.entry.js.map +1 -1
- package/dist/esm/gl-facet_5.entry.js +10 -3
- package/dist/esm/gl-facet_5.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/webmapgl.js +1 -1
- package/dist/types/components/app/app.d.ts +4 -0
- package/dist/types/components/field/field.d.ts +6 -1
- package/dist/types/components.d.ts +26 -2
- package/dist/webmapgl/p-99a83939.entry.js +8 -0
- package/dist/webmapgl/p-99a83939.entry.js.map +1 -0
- package/dist/webmapgl/p-b3dc2acc.js.map +1 -1
- package/dist/webmapgl/{p-c7d22428.entry.js → p-b7af8724.entry.js} +3 -3
- package/dist/webmapgl/p-b7af8724.entry.js.map +1 -0
- package/dist/webmapgl/webmapgl.esm.js +1 -1
- package/dist/webmapgl/webmapgl.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/webmapgl/p-6df9b9d7.entry.js +0 -8
- package/dist/webmapgl/p-6df9b9d7.entry.js.map +0 -1
- package/dist/webmapgl/p-c7d22428.entry.js.map +0 -1
|
@@ -43,6 +43,7 @@ const Field = class {
|
|
|
43
43
|
this.attribute = undefined;
|
|
44
44
|
this.image = undefined;
|
|
45
45
|
this.label = undefined;
|
|
46
|
+
this.placeholder = undefined;
|
|
46
47
|
this.required = false;
|
|
47
48
|
this.type = undefined;
|
|
48
49
|
this.widget = undefined;
|
|
@@ -94,10 +95,13 @@ const Field = class {
|
|
|
94
95
|
return (h("ion-item", null, h("ion-label", null, this.label), ",", h("ion-select", { onIonChange: this.onChange, value: this.getValue() }, h("slot", null))));
|
|
95
96
|
}
|
|
96
97
|
getTextareaField() {
|
|
97
|
-
return (h("ion-item", null, h("ion-label", { "text-wrap": true, position: "floating" }, this.label), h("ion-textarea", { onIonInput: this.onInput, value: this._getValue() || "", legacy: true })));
|
|
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 })));
|
|
99
|
+
}
|
|
100
|
+
getInstructionsField() {
|
|
101
|
+
return (h("ion-item", null, h("ion-textarea", { readonly: true, value: this.label })));
|
|
98
102
|
}
|
|
99
103
|
getInputField() {
|
|
100
|
-
return (h("ion-item", null, h("ion-label", { "text-wrap": true, position: "floating" }, this.label), h("ion-input", { onIonInput: this.onInput, type: "text", value: this._getValue() })));
|
|
104
|
+
return (h("ion-item", null, h("ion-label", { "text-wrap": true, position: "floating" }, this.label), h("ion-input", { onIonInput: this.onInput, type: "text", placeholder: this.placeholder, value: this._getValue() })));
|
|
101
105
|
}
|
|
102
106
|
render() {
|
|
103
107
|
if (this.widget === "radio") {
|
|
@@ -109,6 +113,9 @@ const Field = class {
|
|
|
109
113
|
else if (this.widget == "textarea") {
|
|
110
114
|
return this.getTextareaField();
|
|
111
115
|
}
|
|
116
|
+
else if (this.widget == "instructions") {
|
|
117
|
+
return this.getInstructionsField();
|
|
118
|
+
}
|
|
112
119
|
else {
|
|
113
120
|
return this.getInputField();
|
|
114
121
|
}
|
|
@@ -163,7 +170,7 @@ const FormPage = class {
|
|
|
163
170
|
return this.facets.map((facet) => (h("gl-facet", { label: facet.label, value: facet.value, image: facet.image, widget: facet.widget })));
|
|
164
171
|
}
|
|
165
172
|
renderFields() {
|
|
166
|
-
return this.fields.map((field) => (h("gl-field", { attribute: field.attribute, label: field.label, image: field.image, required: field.required, type: field.type, widget: field.widget }, this.renderOptions(field.options))));
|
|
173
|
+
return this.fields.map((field) => (h("gl-field", { attribute: field.attribute, label: field.label, image: field.image, required: field.required, type: field.type, widget: field.widget, placeholder: field.placeholder }, this.renderOptions(field.options))));
|
|
167
174
|
}
|
|
168
175
|
renderOptions(options) {
|
|
169
176
|
if (options == undefined)
|