@ccrpc/webmapgl 0.18.2 → 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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/gl-facet_5.cjs.entry.js +11 -4
- 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/field/field.js +32 -6
- 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/esm/gl-facet_5.entry.js +11 -4
- 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/field/field.d.ts +6 -1
- package/dist/types/components.d.ts +18 -2
- package/dist/webmapgl/{p-c7d22428.entry.js → p-c3a37f68.entry.js} +3 -3
- package/dist/webmapgl/p-c3a37f68.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-c7d22428.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.18.4](https://gitlab.com/ccrpc/webmapgl/compare/v0.18.3...v0.18.4) (2025-07-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **form:** lack of label causes no floating label ([996323a](https://gitlab.com/ccrpc/webmapgl/commit/996323ab7450a21ca21107b89bb7e790789e0a4f))
|
|
11
|
+
|
|
12
|
+
## [0.18.3](https://gitlab.com/ccrpc/webmapgl/compare/v0.18.2...v0.18.3) (2025-07-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **forms:** added placeholder and instructions field ([df55d30](https://gitlab.com/ccrpc/webmapgl/commit/df55d304fb80dcc5796bfb14b3b20c2dcf44907c))
|
|
18
|
+
|
|
5
19
|
## [0.18.2](https://gitlab.com/ccrpc/webmapgl/compare/v0.18.1...v0.18.2) (2024-08-26)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -46,7 +46,8 @@ const Field = class {
|
|
|
46
46
|
this.message = undefined;
|
|
47
47
|
this.attribute = undefined;
|
|
48
48
|
this.image = undefined;
|
|
49
|
-
this.label =
|
|
49
|
+
this.label = "";
|
|
50
|
+
this.placeholder = "";
|
|
50
51
|
this.required = false;
|
|
51
52
|
this.type = undefined;
|
|
52
53
|
this.widget = undefined;
|
|
@@ -98,10 +99,13 @@ const Field = class {
|
|
|
98
99
|
return (index.h("ion-item", null, index.h("ion-label", null, this.label), ",", index.h("ion-select", { onIonChange: this.onChange, value: this.getValue() }, index.h("slot", null))));
|
|
99
100
|
}
|
|
100
101
|
getTextareaField() {
|
|
101
|
-
return (index.h("ion-item", null, index.h("ion-label", { "text-wrap": true, position: "floating" }, this.label), index.h("ion-textarea", { onIonInput: this.onInput, value: this._getValue() || "", legacy: true })));
|
|
102
|
+
return (index.h("ion-item", null, this.label !== "" ? (index.h("ion-label", { "text-wrap": true, position: "floating" }, this.label)) : (""), index.h("ion-textarea", { onIonInput: this.onInput, placeholder: this.placeholder, value: this._getValue() || "", legacy: true })));
|
|
103
|
+
}
|
|
104
|
+
getInstructionsField() {
|
|
105
|
+
return (index.h("ion-item", null, index.h("ion-textarea", { readonly: true, value: this.label })));
|
|
102
106
|
}
|
|
103
107
|
getInputField() {
|
|
104
|
-
return (index.h("ion-item", null, index.h("ion-label", { "text-wrap": true, position: "floating" }, this.label), index.h("ion-input", { onIonInput: this.onInput, type: "text", value: this._getValue() })));
|
|
108
|
+
return (index.h("ion-item", null, index.h("ion-label", { "text-wrap": true, position: "floating" }, this.label), index.h("ion-input", { onIonInput: this.onInput, type: "text", placeholder: this.placeholder, value: this._getValue() })));
|
|
105
109
|
}
|
|
106
110
|
render() {
|
|
107
111
|
if (this.widget === "radio") {
|
|
@@ -113,6 +117,9 @@ const Field = class {
|
|
|
113
117
|
else if (this.widget == "textarea") {
|
|
114
118
|
return this.getTextareaField();
|
|
115
119
|
}
|
|
120
|
+
else if (this.widget == "instructions") {
|
|
121
|
+
return this.getInstructionsField();
|
|
122
|
+
}
|
|
116
123
|
else {
|
|
117
124
|
return this.getInputField();
|
|
118
125
|
}
|
|
@@ -167,7 +174,7 @@ const FormPage = class {
|
|
|
167
174
|
return this.facets.map((facet) => (index.h("gl-facet", { label: facet.label, value: facet.value, image: facet.image, widget: facet.widget })));
|
|
168
175
|
}
|
|
169
176
|
renderFields() {
|
|
170
|
-
return this.fields.map((field) => (index.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))));
|
|
177
|
+
return this.fields.map((field) => (index.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))));
|
|
171
178
|
}
|
|
172
179
|
renderOptions(options) {
|
|
173
180
|
if (options == undefined)
|