@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
|
@@ -1 +1 @@
|
|
|
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;;
|
|
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;;;;;;oBA9FM,KAAK;;;;EAkB1C,aAAa,CAAC,CAAC;IACb,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;EACzB,CAAC;EAEO,SAAS;IACf,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,IAAI,CAAC,OAAO,IAAI,SAAS,IAAI,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"]}
|
|
@@ -44,7 +44,7 @@ export class FormPage {
|
|
|
44
44
|
return this.facets.map((facet) => (h("gl-facet", { label: facet.label, value: facet.value, image: facet.image, widget: facet.widget })));
|
|
45
45
|
}
|
|
46
46
|
renderFields() {
|
|
47
|
-
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))));
|
|
47
|
+
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))));
|
|
48
48
|
}
|
|
49
49
|
renderOptions(options) {
|
|
50
50
|
if (options == undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-page.js","sourceRoot":"","sources":["../../../src/components/form-page/form-page.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EACT,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,MAAM,OAAO,QAAQ;;
|
|
1
|
+
{"version":3,"file":"form-page.js","sourceRoot":"","sources":["../../../src/components/form-page/form-page.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EACT,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,MAAM,OAAO,QAAQ;;IAqHX,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,IAAI,CAAC,SAAS;QAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC,CAAC;IAEM,gBAAW,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;qBAtHrB,KAAK;oBAKU,EAAE,CAAC,yBAAyB,CAAC;;;;;gBA0BhC,KAAK;sBAKA,EAAE,CAAC,2BAA2B,CAAC;sB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C,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAClB,CACD,CACF,CACf,CAAC,CAAC,CAAC,IAAI;UACR,qBAAY,IAAI,CAAC,KAAK,CAAa;UACnC,mBAAa,IAAI,EAAC,KAAK;YACrB,kBAAY,OAAO,EAAE,IAAI,CAAC,WAAW;cACnC,gBACE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EACnC,IAAI,EAAC,OAAO,GACF;cACX,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CACpB;YACb,kBAAY,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS;cAC9D,gBACE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EACnC,IAAI,EAAC,WAAW,GACN;cACX,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CACpB,CACD,CACF,CACH;MACb;QACE;UACG,IAAI,CAAC,YAAY,EAAE;UACnB,IAAI,CAAC,YAAY,EAAE,CACX,CACC,CACT,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n h,\n Component,\n Element,\n Listen,\n Prop,\n State,\n Host,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n styleUrl: \"form-page.css\",\n tag: \"gl-form-page\",\n})\nexport class FormPage {\n @Element() el: HTMLGlFormPageElement;\n\n @State() canSubmit = false;\n\n /**\n * Text for the back button.\n */\n @Prop() readonly backText: string = _t(\"webmapgl.form-page.back\");\n\n /**\n * Facets for the page.\n */\n @Prop() readonly facets: any[];\n\n /**\n * Fields for the page.\n */\n @Prop() readonly fields: any[];\n\n /**\n * Currently-selected facet. It is used the set the CSS class of the page.\n */\n @Prop() readonly formFacet: string;\n\n /**\n * Label text displayed in the form toolbar.\n */\n @Prop() readonly label: string;\n\n /**\n * This is the root page in the form. If it is `true`, the back button\n * is not displayed.\n */\n @Prop() readonly root: boolean = false;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string = _t(\"webmapgl.form-page.submit\");\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string = _t(\"webmapgl.form-page.cancel\");\n\n componentDidLoad() {\n this.updateValidationStatus();\n }\n\n @Listen(\"glFormFeatureChanged\", { target: \"body\" })\n async updateValidationStatus() {\n if (this.el.querySelectorAll(\"gl-field\").length === 0) {\n this.canSubmit = false;\n } else {\n this.canSubmit = (await this.validate()).length === 0;\n }\n }\n\n private async validate() {\n let messages = await Promise.all(\n Array.from(this.el.querySelectorAll(\"gl-field\")).map(\n async (field) => await field.validate(),\n ),\n );\n\n return messages.filter((message) => message != null);\n }\n\n private cancel() {\n const form = this.el.closest(\"gl-form\");\n form.cancel();\n }\n\n private submit() {\n const form = this.el.closest(\"gl-form\");\n form.submit();\n }\n\n private renderFacets() {\n return this.facets.map((facet) => (\n <gl-facet\n label={facet.label}\n value={facet.value}\n image={facet.image}\n widget={facet.widget}\n ></gl-facet>\n ));\n }\n\n private renderFields() {\n return this.fields.map((field) => (\n <gl-field\n attribute={field.attribute}\n label={field.label}\n image={field.image}\n required={field.required}\n type={field.type}\n widget={field.widget}\n placeholder={field.placeholder}\n >\n {this.renderOptions(field.options)}\n </gl-field>\n ));\n }\n\n private renderOptions(options: any[]) {\n if (options == undefined) return;\n return options.map((option) => (\n <gl-option\n image={option.image}\n label={option.label}\n value={option.value}\n ></gl-option>\n ));\n }\n\n private clickSubmit = () => {\n if (this.canSubmit) this.submit();\n };\n\n private clickCancel = () => this.cancel();\n\n render() {\n let small = screen.width <= 640;\n return (\n <Host class={`gl-form-page-facet-${this.formFacet || \"none\"}`}>\n <ion-header>\n <ion-toolbar color=\"primary\">\n {!this.root ? (\n <ion-buttons slot=\"start\">\n <ion-nav-pop>\n <ion-button>\n <ion-icon\n slot={small ? \"icon-only\" : \"start\"}\n name=\"arrow-back\"\n ></ion-icon>\n {small ? null : this.backText}\n </ion-button>\n </ion-nav-pop>\n </ion-buttons>\n ) : null}\n <ion-title>{this.label}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button onClick={this.clickCancel}>\n <ion-icon\n slot={small ? \"icon-only\" : \"start\"}\n name=\"close\"\n ></ion-icon>\n {small ? null : this.cancelText}\n </ion-button>\n <ion-button onClick={this.clickSubmit} disabled={!this.canSubmit}>\n <ion-icon\n slot={small ? \"icon-only\" : \"start\"}\n name=\"checkmark\"\n ></ion-icon>\n {small ? null : this.submitText}\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n <ion-content>\n <ion-list>\n {this.renderFacets()}\n {this.renderFields()}\n </ion-list>\n </ion-content>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -314,7 +314,7 @@ export class Style {
|
|
|
314
314
|
"references": {
|
|
315
315
|
"styleEvent": {
|
|
316
316
|
"location": "local",
|
|
317
|
-
"path": "/
|
|
317
|
+
"path": "/var/home/fj44404@co.champaign.il.us/.local/code/webmapgl/src/components/style/style.tsx",
|
|
318
318
|
"id": "src/components/style/style.tsx::styleEvent"
|
|
319
319
|
}
|
|
320
320
|
}
|
|
@@ -335,7 +335,7 @@ export class Style {
|
|
|
335
335
|
"references": {
|
|
336
336
|
"styleEvent": {
|
|
337
337
|
"location": "local",
|
|
338
|
-
"path": "/
|
|
338
|
+
"path": "/var/home/fj44404@co.champaign.il.us/.local/code/webmapgl/src/components/style/style.tsx",
|
|
339
339
|
"id": "src/components/style/style.tsx::styleEvent"
|
|
340
340
|
}
|
|
341
341
|
}
|
|
@@ -356,7 +356,7 @@ export class Style {
|
|
|
356
356
|
"references": {
|
|
357
357
|
"styleEvent": {
|
|
358
358
|
"location": "local",
|
|
359
|
-
"path": "/
|
|
359
|
+
"path": "/var/home/fj44404@co.champaign.il.us/.local/code/webmapgl/src/components/style/style.tsx",
|
|
360
360
|
"id": "src/components/style/style.tsx::styleEvent"
|
|
361
361
|
}
|
|
362
362
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"app-globals-755c21e9.js","mappings":";;AAEY,MAAC,aAAa,GAAG,MAAM;AAEnC,EAAEA,UAAqB,EAAE,CAAC;AAC1B;;;;","names":["ionicCoreGlobalScript"],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["import ionicCoreGlobalScript from '/
|
|
1
|
+
{"file":"app-globals-755c21e9.js","mappings":";;AAEY,MAAC,aAAa,GAAG,MAAM;AAEnC,EAAEA,UAAqB,EAAE,CAAC;AAC1B;;;;","names":["ionicCoreGlobalScript"],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["import ionicCoreGlobalScript from '/var/home/fj44404@co.champaign.il.us/.local/code/webmapgl/node_modules/@ionic/core/dist/collection/global/ionic-global.js';\nimport webmapglGlobalScript from '/var/home/fj44404@co.champaign.il.us/.local/code/webmapgl/src/global/webmapgl.ts';\nexport const globalScripts = () => {\n webmapglGlobalScript();\n ionicCoreGlobalScript();\n};\n"],"version":3}
|
|
@@ -192,13 +192,14 @@ const App$1 = class {
|
|
|
192
192
|
this.menu = true;
|
|
193
193
|
this.menuLabel = _t("webmapgl.app.menulabel");
|
|
194
194
|
this.splitPane = true;
|
|
195
|
+
this.menuType = "push";
|
|
195
196
|
}
|
|
196
197
|
componentDidLoad() {
|
|
197
198
|
this.el.querySelector("gl-map").resizeMap();
|
|
198
199
|
}
|
|
199
200
|
getMenu() {
|
|
200
201
|
if (this.menu === true) {
|
|
201
|
-
return (h("ion-menu", { "content-id": "main", type:
|
|
202
|
+
return (h("ion-menu", { "content-id": "main", type: this.menuType }, h("ion-header", null, h("ion-toolbar", null, h("ion-title", null, this.menuLabel))), h("ion-content", null, h("div", { class: "gl-menu-content" }, h("slot", { name: "menu" })))));
|
|
202
203
|
}
|
|
203
204
|
else if (this.menu === "custom") {
|
|
204
205
|
return h("slot", { name: "menu" });
|
|
@@ -206,7 +207,7 @@ const App$1 = class {
|
|
|
206
207
|
}
|
|
207
208
|
getMenuButton() {
|
|
208
209
|
if (this.menu === true)
|
|
209
|
-
return (h("ion-menu-toggle", null, h("ion-button", null, h("ion-icon", { slot: "icon-only", name: "
|
|
210
|
+
return (h("ion-menu-toggle", null, h("ion-button", null, h("ion-icon", { slot: "icon-only", name: "menu" }))));
|
|
210
211
|
}
|
|
211
212
|
getMain() {
|
|
212
213
|
return (h("div", { class: "pane-main", id: "main" }, h("ion-header", null, h("ion-toolbar", null, h("ion-buttons", { slot: "start" }, this.getMenuButton(), h("slot", { name: "start-buttons" })), h("ion-buttons", { slot: "end" }, h("slot", { name: "end-buttons" })), h("ion-title", null, this.label))), h("ion-content", { scrollX: false, scrollY: false, class: "map-content" }, h("div", { class: "fixed-content", slot: "fixed" }, h("slot", null))), h("slot", { name: "after-content" }), h("ion-footer", null, h("slot", { name: "footer" }))));
|