@ccrpc/webmapgl 0.18.4 → 0.18.5

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 CHANGED
@@ -2,6 +2,13 @@
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.5](https://gitlab.com/ccrpc/webmapgl/compare/v0.18.4...v0.18.5) (2025-07-15)
6
+
7
+
8
+ ### Features
9
+
10
+ * **form:** conditional formatting ([8450e9a](https://gitlab.com/ccrpc/webmapgl/commit/8450e9ad7e8e675e3edc075ed9d6e702f7295962))
11
+
5
12
  ## [0.18.4](https://gitlab.com/ccrpc/webmapgl/compare/v0.18.3...v0.18.4) (2025-07-07)
6
13
 
7
14
 
@@ -90,8 +90,12 @@ const Form = class {
90
90
  })
91
91
  .map((item) => {
92
92
  let result = Object.assign({}, item);
93
- if (this.translateText)
94
- result.label = i18n._t(item.label);
93
+ if (this.translateText) {
94
+ if (result.label)
95
+ result.label = i18n._t(item.label);
96
+ if (result.placeholder)
97
+ result.placeholder = i18n._t(item.placeholder);
98
+ }
95
99
  if (item.options)
96
100
  result.options = this.filter(item.options, formFacet);
97
101
  return result;
@@ -1 +1 @@
1
- {"file":"gl-form.entry.cjs.js","mappings":";;;;;;;;MAea,IAAI;;;;;;;;kBAmCmB,WAAW,MAAM,EAAE,EAAE;;;;yBAoBb,KAAK;;EAE/C,MAAM,iBAAiB;IACrB,IAAI,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;GACjC;EAED,gBAAgB;IACd,IAAI,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS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,IAAI,CAAE,CAAC;MACzB,IAAI,IAAI,CAAC,aAAa;QAAE,MAAM,CAAC,KAAK,GAAGA,OAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MACtD,IAAI,IAAI,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;MACxE,OAAO,MAAM,CAAC;KACf,CAAC,CAAC;GACN;EAED,MAAM;IACJ,OAAOC,wBAAmB,CAAC;GAC5B;;;AAGH,IAAI,MAAM,GAAG,CAAC;;;;","names":["_t","h"],"sources":["src/components/form/form.tsx"],"sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) result.label = _t(item.label);\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"],"version":3}
1
+ {"file":"gl-form.entry.cjs.js","mappings":";;;;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I,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;QAC3D,IAAI,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QAC/D,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;UAAE,OAAO,IAAI,CAAC;OACrC;MACD,OAAO,KAAK,CAAC;KACd,CAAC;OACD,GAAG,CAAC,CAAC,IAAI;MACR,IAAI,MAAM,qBAAQ,IAAI,CAAE,CAAC;MACzB,IAAI,IAAI,CAAC,aAAa,EAAE;QACtB,IAAI,MAAM,CAAC,KAAK;UAAE,MAAM,CAAC,KAAK,GAAGA,OAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,WAAW;UAAE,MAAM,CAAC,WAAW,GAAGA,OAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;OACnE;MACD,IAAI,IAAI,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;MACxE,OAAO,MAAM,CAAC;KACf,CAAC,CAAC;GACN;EAED,MAAM;IACJ,OAAOC,wBAAmB,CAAC;GAC5B;;;AAGH,IAAI,MAAM,GAAG,CAAC;;;;","names":["_t","h"],"sources":["src/components/form/form.tsx"],"sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) {\n if (result.label) result.label = _t(item.label);\n if (result.placeholder) result.placeholder = _t(item.placeholder);\n }\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"],"version":3}
@@ -80,8 +80,12 @@ export class Form {
80
80
  })
81
81
  .map((item) => {
82
82
  let result = Object.assign({}, item);
83
- if (this.translateText)
84
- result.label = _t(item.label);
83
+ if (this.translateText) {
84
+ if (result.label)
85
+ result.label = _t(item.label);
86
+ if (result.placeholder)
87
+ result.placeholder = _t(item.placeholder);
88
+ }
85
89
  if (item.options)
86
90
  result.options = this.filter(item.options, formFacet);
87
91
  return result;
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/components/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EACT,OAAO,EACP,KAAK,EAEL,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAKlC,MAAM,OAAO,IAAI;;;;kBAmCmB,WAAW,MAAM,EAAE,EAAE;;;;yBAoBb,KAAK;;EAE/C,KAAK,CAAC,iBAAiB;IACrB,IAAI,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI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MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QAC/D,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;UAAE,OAAO,IAAI,CAAC;OACrC;MACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;OACD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;MACZ,IAAI,MAAM,qBAAQ,IAAI,CAAE,CAAC;MACzB,IAAI,IAAI,CAAC,aAAa;QAAE,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MACtD,IAAI,IAAI,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;MACxE,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;EACP,CAAC;EAED,MAAM;IACJ,OAAO,kBAAmB,CAAC;EAC7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,MAAM,GAAG,CAAC,CAAC","sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) result.label = _t(item.label);\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/components/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EACT,OAAO,EACP,KAAK,EAEL,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAKlC,MAAM,OAAO,IAAI;;;;kBAmCmB,WAAW,MAAM,EAAE,EAAE;;;;yBAoBb,KAAK;;EAE/C,KAAK,CAAC,iBAAiB;IACrB,IAAI,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;EAClC,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;EACjD,CAAC;EAGD,QAAQ,CAAC,CAAc;IACrB,IAAI,IAAI,C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,CAAE,CAAC;MACzB,IAAI,IAAI,CAAC,aAAa,EAAE;QACtB,IAAI,MAAM,CAAC,KAAK;UAAE,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,WAAW;UAAE,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;OACnE;MACD,IAAI,IAAI,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;MACxE,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;EACP,CAAC;EAED,MAAM;IACJ,OAAO,kBAAmB,CAAC;EAC7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,MAAM,GAAG,CAAC,CAAC","sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) {\n if (result.label) result.label = _t(item.label);\n if (result.placeholder) result.placeholder = _t(item.placeholder);\n }\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"]}
@@ -86,8 +86,12 @@ const Form = class {
86
86
  })
87
87
  .map((item) => {
88
88
  let result = Object.assign({}, item);
89
- if (this.translateText)
90
- result.label = _t(item.label);
89
+ if (this.translateText) {
90
+ if (result.label)
91
+ result.label = _t(item.label);
92
+ if (result.placeholder)
93
+ result.placeholder = _t(item.placeholder);
94
+ }
91
95
  if (item.options)
92
96
  result.options = this.filter(item.options, formFacet);
93
97
  return result;
@@ -1 +1 @@
1
- {"file":"gl-form.entry.js","mappings":";;;;MAea,IAAI;;;;;;;;kBAmCmB,WAAW,MAAM,EAAE,EAAE;;;;yBAoBb,KAAK;;EAE/C,MAAM,iBAAiB;IACrB,IAAI,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;GACjC;EAED,gBAAgB;IACd,IAAI,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;GAChD;EAGD,QAAQ,CAAC,CAAc;IACrB,IAAI,IAAI,CAAC,OAAO,IAAI,SAAS;MAAE,OAAO;IACtC,IAAI,CAAC,OAAO,CAAC,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MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;MACxE,OAAO,MAAM,CAAC;KACf,CAAC,CAAC;GACN;EAED,MAAM;IACJ,OAAO,kBAAmB,CAAC;GAC5B;;;AAGH,IAAI,MAAM,GAAG,CAAC;;;;","names":[],"sources":["src/components/form/form.tsx"],"sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) result.label = _t(item.label);\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"],"version":3}
1
+ {"file":"gl-form.entry.js","mappings":";;;;MAea,IAAI;;;;;;;;kBAmCmB,WAAW,MAAM,EAAE,EAAE;;;;yBAoBb,KAAK;;EAE/C,MAAM,iBAAiB;IACrB,IAAI,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,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AC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QAC/D,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;UAAE,OAAO,IAAI,CAAC;OACrC;MACD,OAAO,KAAK,CAAC;KACd,CAAC;OACD,GAAG,CAAC,CAAC,IAAI;MACR,IAAI,MAAM,qBAAQ,IAAI,CAAE,CAAC;MACzB,IAAI,IAAI,CAAC,aAAa,EAAE;QACtB,IAAI,MAAM,CAAC,KAAK;UAAE,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,WAAW;UAAE,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;OACnE;MACD,IAAI,IAAI,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;MACxE,OAAO,MAAM,CAAC;KACf,CAAC,CAAC;GACN;EAED,MAAM;IACJ,OAAO,kBAAmB,CAAC;GAC5B;;;AAGH,IAAI,MAAM,GAAG,CAAC;;;;","names":[],"sources":["src/components/form/form.tsx"],"sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) {\n if (result.label) result.label = _t(item.label);\n if (result.placeholder) result.placeholder = _t(item.placeholder);\n }\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"],"version":3}
@@ -0,0 +1,2 @@
1
+ import{r as t,f as i,h as e,d as s}from"./p-23450e8b.js";import{_ as n}from"./p-9554b2b5.js";import"./p-7183ba4d.js";const h=class{constructor(e){t(this,e);this.glFormCancel=i(this,"glFormCancel",7);this.glFormFeatureChanged=i(this,"glFormFeatureChanged",7);this.glFormSubmit=i(this,"glFormSubmit",7);this.cancelText=undefined;this.feature=undefined;this.formId=`gl-form-${r++}`;this.label=undefined;this.schema=undefined;this.submitText=undefined;this.translateText=false}async componentWillLoad(){let t=await fetch(this.schema);this._schema=await t.json()}componentDidLoad(){let t=this.createFormPage(this.label);this.el.querySelector("ion-nav").setRoot(t)}setValue(t){if(this.feature==undefined)return;this.feature.properties=this.feature.properties||{};this.feature.properties[t.detail.field.attribute]=t.detail.value;this.glFormFeatureChanged.emit({formId:this.formId,feature:this.feature})}handleFacet(t){let i=this.createFormPage(t.detail.label,t.detail.value);this.el.querySelector("ion-nav").push(i)}async cancel(){this.glFormCancel.emit({formId:this.formId,feature:this.feature})}async submit(){this.glFormSubmit.emit({formId:this.formId,feature:this.feature})}createFormPage(t,i){let e=document.createElement("gl-form-page");e.formFacet=i;e.facets=this.filter(this._schema.facets||[],i);e.fields=this.filter(this._schema.fields||[],i);e.root=i!=undefined;if(t!=undefined)e.label=t;if(this.submitText!=undefined)e.submitText=this.submitText;if(this.cancelText!=undefined)e.cancelText=this.cancelText;return e}filter(t,i){return t.filter((t=>{let e=t.facets||[];if(!e.length&&i==undefined)return true;for(let t of e){let e=t.replace(/[.?+^$[\]\\(){}|-]/g,"\\$&");let s=new RegExp("^"+e.split("*").join(".*")+"$");if(s.test(i))return true}return false})).map((t=>{let e=Object.assign({},t);if(this.translateText){if(e.label)e.label=n(t.label);if(e.placeholder)e.placeholder=n(t.placeholder)}if(t.options)e.options=this.filter(t.options,i);return e}))}render(){return e("ion-nav",null)}get el(){return s(this)}};let r=0;export{h as gl_form};
2
+ //# sourceMappingURL=p-67db75d6.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Form","formId","componentWillLoad","res","fetch","this","schema","_schema","json","componentDidLoad","page","createFormPage","label","el","querySelector","setRoot","setValue","e","feature","undefined","properties","detail","field","attribute","value","glFormFeatureChanged","emit","handleFacet","push","cancel","glFormCancel","submit","glFormSubmit","formFacet","document","createElement","facets","filter","fields","root","submitText","cancelText","items","item","length","facet","escaped","replace","re","RegExp","split","join","test","map","result","Object","assign","translateText","_t","placeholder","options","render","h"],"sources":["src/components/form/form.tsx"],"sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) {\n if (result.label) result.label = _t(item.label);\n if (result.placeholder) result.placeholder = _t(item.placeholder);\n }\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"],"mappings":"2HAeaA,EAAI,M,uOAmCmB,WAAWC,M,wFAoBH,K,CAE1C,uBAAMC,GACJ,IAAIC,QAAYC,MAAMC,KAAKC,QAC3BD,KAAKE,cAAgBJ,EAAIK,M,CAG3B,gBAAAC,GACE,IAAIC,EAAOL,KAAKM,eAAeN,KAAKO,OACpCP,KAAKQ,GAAGC,cAAc,WAAWC,QAAQL,E,CAI3C,QAAAM,CAASC,GACP,GAAIZ,KAAKa,SAAWC,UAAW,OAC/Bd,KAAKa,QAAQE,WAAaf,KAAKa,QAAQE,YAAc,GACrDf,KAAKa,QAAQE,WAAWH,EAAEI,OAAOC,MAAMC,WAAaN,EAAEI,OAAOG,MAC7DnB,KAAKoB,qBAAqBC,KAAK,CAC7BzB,OAAQI,KAAKJ,OACbiB,QAASb,KAAKa,S,CAKlB,WAAAS,CAAYV,GACV,IAAIP,EAAOL,KAAKM,eAAeM,EAAEI,OAAOT,MAAOK,EAAEI,OAAOG,OACxDnB,KAAKQ,GAAGC,cAAc,WAAWc,KAAKlB,E,CAOxC,YAAMmB,GACJxB,KAAKyB,aAAaJ,KAAK,CACrBzB,OAAQI,KAAKJ,OACbiB,QAASb,KAAKa,S,CAQlB,YAAMa,GACJ1B,KAAK2B,aAAaN,KAAK,CACrBzB,OAAQI,KAAKJ,OACbiB,QAASb,KAAKa,S,CAIV,cAAAP,CAAeC,EAAgBqB,GACrC,IAAIvB,EAAOwB,SAASC,cAAc,gBAClCzB,EAAKuB,UAAYA,EACjBvB,EAAK0B,OAAS/B,KAAKgC,OAAOhC,KAAKE,QAAQ6B,QAAU,GAAIH,GACrDvB,EAAK4B,OAASjC,KAAKgC,OAAOhC,KAAKE,QAAQ+B,QAAU,GAAIL,GACrDvB,EAAK6B,KAAON,GAAad,UAEzB,GAAIP,GAASO,UAAWT,EAAKE,MAAQA,EACrC,GAAIP,KAAKmC,YAAcrB,UAAWT,EAAK8B,WAAanC,KAAKmC,WACzD,GAAInC,KAAKoC,YAActB,UAAWT,EAAK+B,WAAapC,KAAKoC,WAEzD,OAAO/B,C,CAGD,MAAA2B,CAAOK,EAAcT,GAC3B,OAAOS,EACJL,QAAQM,IACP,IAAIP,EAASO,EAAKP,QAAU,GAC5B,IAAKA,EAAOQ,QAAUX,GAAad,UAAW,OAAO,KACrD,IAAK,IAAI0B,KAAST,EAAQ,CACxB,IAAIU,EAAUD,EAAME,QAAQ,sBAAuB,QACnD,IAAIC,EAAK,IAAIC,OAAO,IAAMH,EAAQI,MAAM,KAAKC,KAAK,MAAQ,KAC1D,GAAIH,EAAGI,KAAKnB,GAAY,OAAO,I,CAEjC,OAAO,KAAK,IAEboB,KAAKV,IACJ,IAAIW,EAAMC,OAAAC,OAAA,GAAQb,GAClB,GAAItC,KAAKoD,cAAe,CACtB,GAAIH,EAAO1C,MAAO0C,EAAO1C,MAAQ8C,EAAGf,EAAK/B,OACzC,GAAI0C,EAAOK,YAAaL,EAAOK,YAAcD,EAAGf,EAAKgB,Y,CAEvD,GAAIhB,EAAKiB,QAASN,EAAOM,QAAUvD,KAAKgC,OAAOM,EAAKiB,QAAS3B,GAC7D,OAAOqB,CAAM,G,CAInB,MAAAO,GACE,OAAOC,EAAA,e,2BAIX,IAAI7D,EAAS,S"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as t}from"./p-23450e8b.js";export{s as setNonce}from"./p-23450e8b.js";import{g as o}from"./p-b3dc2acc.js";import"./p-1e77b5bd.js";const l=()=>{const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};l().then((e=>{o();return t(JSON.parse('[["p-99a83939",[[0,"gl-table-column-visibility-button",{"label":[1],"tableId":[1,"table-id"]}],[4,"gl-app",{"label":[1],"menu":[8],"menuLabel":[1,"menu-label"],"splitPane":[4,"split-pane"],"menuType":[1,"menu-type"]}],[0,"gl-basemaps"],[0,"gl-download-button"],[4,"gl-drawer",{"drawerTitle":[1,"drawer-title"],"mapId":[1,"map-id"],"open":[1028],"content":[32],"toggle":[64]}],[0,"gl-share-button",{"icon":[1]}],[32,"gl-address-search",{"mode":[1],"bbox":[1],"jobId":[1,"job-id"],"limit":[2],"maxZoom":[2,"max-zoom"],"placeholder":[1],"url":[1],"zoomPadding":[2,"zoom-padding"],"bboxArray":[32],"hasFocus":[32],"hasValue":[32],"results":[32]},[[16,"glForwardGeocode","handleGeocode"],[16,"click","handleBodyClick"],[0,"keydown","handleKey"]]],[4,"gl-legend-item",{"layers":[1],"image":[1],"toggle":[4],"styleId":[1,"style-id"],"widget":[1],"visible":[32]},[[16,"glStyleElementAdded","handleStyleAdded"],[16,"glStyleElementModified","handleStyleUpdated"]]],[0,"gl-drawer-toggle",{"icon":[1],"buttonTitle":[1,"button-title"],"disabled":[4]}],[0,"gl-fullscreen",{"fullscreen":[32]}],[0,"gl-story-button",{"action":[1],"icon":[1],"label":[1],"storyId":[1,"story-id"],"story":[32],"disabled":[32]},[[16,"glStoryChange","updateDisabled"]]],[4,"gl-table-export-button",{"author":[1],"filename":[1],"format":[1],"pageOrientation":[1,"page-orientation"],"pageSubtitle":[1,"page-subtitle"],"pageTitle":[1,"page-title"],"tableId":[1,"table-id"],"url":[1],"customButton":[4,"custom-button"],"exportCtrl":[32]}],[4,"gl-legend"],[0,"gl-map",{"draw":[1040],"drawOptions":[16],"drawing":[4],"glyphs":[1],"hash":[8],"latitude":[2],"longitude":[2],"zoom":[2],"minzoom":[2],"maxzoom":[2],"sprite":[1],"map":[1040],"clickMode":[1,"click-mode"],"clickEventDelay":[2,"click-event-delay"],"resizeMap":[64]},[[0,"glFeatureClick","handleFeatureClick"],[0,"glStyleElementAdded","handleStyleAdded"],[0,"glStyleElementModified","handleStyleModified"],[0,"glStyleElementRemoved","handleStyleRemoved"]]],[0,"gl-popup",{"clickEventDelay":[2,"click-event-delay"],"closeKey":[1,"close-key"],"closeMode":[1,"close-mode"],"component":[1],"componentOptions":[1,"component-options"],"layers":[1],"maxWidth":[1,"max-width"],"isOpen":[64],"removePopup":[64]},[[16,"glClickedFeaturesGathered","doOpenPopup"],[16,"keyup","handleKeyup"]]],[0,"gl-style",{"basemap":[4],"clickableLayers":[1,"clickable-layers"],"enabled":[4],"name":[1],"thumbnail":[1],"token":[1],"url":[1],"json":[1040],"insertIntoStyle":[1,"insert-into-style"],"insertBeneathLayer":[1,"insert-beneath-layer"]}],[0,"gl-download-file",{"label":[1],"size":[1],"url":[1],"format":[1]}],[4,"gl-story",{"step":[2],"steps":[1026]}],[4,"gl-story-step",{"active":[4],"first":[4],"last":[4],"hash":[1],"clickBeforeHash":[4,"click-before-hash"],"clickAfterIdle":[4,"click-after-idle"],"clickDelay":[2,"click-delay"],"clickLayer":[1,"click-layer"],"clickProperty":[1,"click-property"],"clickValue":[2,"click-value"],"mapId":[1,"map-id"]}],[0,"gl-table",{"disableDefaultSort":[4,"disable-default-sort"],"features":[1040],"rowClassAttribute":[1,"row-class-attribute"],"sortAttribute":[1025,"sort-attribute"],"sortOrder":[1025,"sort-order"],"columns":[32],"getSortedFeatures":[64],"getCellContents":[64]},[[0,"glTableColumnChanged","updateColumns"]]],[0,"gl-table-column",{"attribute":[1],"cellClassAttribute":[1,"cell-class-attribute"],"component":[1],"componentProps":[8,"component-props"],"csv":[4],"format":[1032],"label":[1],"pdf":[4],"sortable":[4],"visible":[4]}],[0,"gl-table-column-visibility",{"label":[1],"tableId":[1,"table-id"]}],[0,"gl-basemap-switcher"],[0,"gl-download-list",{"files":[16]}],[0,"gl-share",{"popupHeight":[2,"popup-height"],"popupWidth":[2,"popup-width"],"shareTitle":[1,"share-title"],"shareUser":[1,"share-user"],"shareHashtags":[1,"share-hashtags"],"shareUrl":[1,"share-url"]}],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]],[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}],[0,"ion-app",{"setFocus":[64]}],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[32,"ion-item-group"],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}],[0,"gl-table-column-visibility-toggle",{"column":[16],"enabled":[1028]}],[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"legacy":[4],"justify":[1],"activated":[32]}],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]],[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}],[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"legacy":[4],"justify":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"],[9,"resize","onResize"]]],[33,"ion-list-header",{"color":[513],"lines":[1]}],[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1]}],[1,"ion-thumbnail"],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionInput","handleIonInput"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[33,"ion-note",{"color":[513]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]}],[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-bab54511",[[0,"gl-form-controller",{"create":[64]}]]],["p-8ee68e35",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16],"multiple":[4],"highlightedDates":[16],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}]]],["p-9a52a393",[[4,"gl-feature-list",{"batchSize":[2,"batch-size"],"component":[1],"componentOptions":[16],"display":[1],"features":[1040],"item":[4],"loadingSpinner":[1,"loading-spinner"],"loadingText":[1,"loading-text"],"mapId":[1,"map-id"],"orderBy":[1,"order-by"],"order":[1],"styleId":[1,"style-id"],"sourceId":[1,"source-id"],"data":[32],"limit":[32]},[[0,"ionInfinite","handleInfiniteScroll"],[16,"glStyleElementModified","handleStyleUpdated"]]]]],["p-2e4a405f",[[0,"gl-attribute-values",{"attributeOptions":[1,"attribute-options"],"features":[16],"header":[1],"headerAttribute":[1,"header-attribute"],"labelPosition":[1,"label-position"],"limit":[2],"valueMaxWidth":[1,"value-max-width"]}]]],["p-96e77bf2",[[0,"gl-draw-toolbar",{"cancelText":[1,"cancel-text"],"color":[1],"confirmText":[1,"confirm-text"],"label":[1],"mapId":[1,"map-id"],"maxFeatures":[2,"max-features"],"minFeatures":[2,"min-features"],"visible":[32],"featureCount":[32]},[[16,"glDrawEnter","handleDrawEnter"],[16,"glDrawExit","handleDrawExit"],[16,"glDrawCreate","handleDrawCreate"],[16,"glDrawDelete","handleDrawDelete"]]]]],["p-8d22e12f",[[0,"gl-like-button",{"attribute":[1],"disabled":[4],"feature":[16],"iconNo":[1,"icon-no"],"iconYes":[1,"icon-yes"],"method":[1],"requestMode":[1,"request-mode"],"token":[1],"url":[1],"count":[32],"liked":[32],"proxy":[32],"likeCtrl":[32],"restCtrl":[32]}]]],["p-d6a52712",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["p-20c62d31",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}]]],["p-2879063d",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-01c68d4b",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-7d1c84cf",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["p-0c22d35f",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["p-58c0adbc",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-47516d22",[[0,"gl-draw-controller",{"create":[64]}]]],["p-43063806",[[0,"gl-table-export-controller",{"create":[64]}]]],["p-5595205d",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}]]],["p-2e07e468",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-3740eeae",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-a2d1c6be",[[1,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-4bdd918f",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-5613ea64",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["p-21350eb6",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["p-a555de65",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["p-0d00d02f",[[33,"ion-segment-button",{"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]}]]],["p-97211e6d",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]]]],["p-0f687692",[[0,"gl-geocode-controller",{"defaultClient":[1,"default-client"],"forward":[64],"reverse":[64],"addClient":[64]}]]],["p-3742094d",[[0,"gl-like-controller",{"create":[64]}]]],["p-9e1be6a1",[[0,"gl-rest-controller",{"create":[64]}]]],["p-9698e068",[[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["p-b5f975b8",[[33,"ion-avatar"]]],["p-bfb44298",[[33,"ion-badge",{"color":[513]}]]],["p-986e3a20",[[33,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["p-a0e556e8",[[32,"ion-card-content"]]],["p-be47ffea",[[33,"ion-card-header",{"color":[513],"translucent":[4]}]]],["p-9a7e8807",[[33,"ion-card-subtitle",{"color":[513]}]]],["p-c2318200",[[33,"ion-card-title",{"color":[513]}]]],["p-2d80014e",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["p-93628789",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}]]],["p-d2511256",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["p-524184b5",[[1,"ion-grid",{"fixed":[4]}]]],["p-81fd194e",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["p-1d7c61a5",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["p-d9198b42",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["p-f0e07d2a",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-a16f4580",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-3df0a400",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"legacy":[4],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-b8713ea4",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["p-04100291",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["p-3980df4d",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}]]],["p-1d13309e",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["p-2ef8843d",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["p-5bc4beab",[[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-54d649c6",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-8b71e6bd",[[1,"ion-row"]]],["p-c0e63279",[[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["p-4f50a910",[[1,"ion-skeleton-text",{"animated":[4]}]]],["p-264dcf64",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["p-47ff808d",[[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["p-3d48522a",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-f25b5d40",[[1,"ion-text",{"color":[513]}]]],["p-9c561816",[[33,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"isExpanded":[32],"open":[64]}],[38,"ion-input",{"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[38,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"shape":[1],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}],[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}],[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]],[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}],[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"legacy":[4]}]]],["p-c3a37f68",[[0,"gl-form-page",{"backText":[1,"back-text"],"facets":[16],"fields":[16],"formFacet":[1,"form-facet"],"label":[1],"root":[4],"submitText":[1,"submit-text"],"cancelText":[1,"cancel-text"],"canSubmit":[32]},[[16,"glFormFeatureChanged","updateValidationStatus"]]],[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}],[4,"gl-field",{"attribute":[1],"image":[1],"label":[1],"placeholder":[1],"required":[4],"type":[8],"widget":[1],"message":[32],"isValid":[64],"getValue":[64],"validate":[64]},[[0,"glOptionChanged","optionChanged"]]],[0,"gl-option",{"image":[1],"label":[1],"value":[8]}],[0,"gl-facet",{"detail":[4],"image":[1],"label":[1],"value":[1],"widget":[1]}]]],["p-d27c0d4a",[[0,"gl-form",{"cancelText":[1,"cancel-text"],"feature":[16],"formId":[1,"form-id"],"label":[1],"schema":[1],"submitText":[1,"submit-text"],"translateText":[4,"translate-text"],"cancel":[64],"submit":[64]},[[0,"glFieldValueChanged","setValue"],[0,"glFormFacet","handleFacet"]]]]],["p-fda00727",[[32,"ion-picker-column",{"col":[16]}]]],["p-1f980905",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["p-ca5b3cd4",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["p-621ca441",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}],[33,"ion-picker-internal",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]]]'),e)}));
1
+ import{p as e,b as t}from"./p-23450e8b.js";export{s as setNonce}from"./p-23450e8b.js";import{g as o}from"./p-b3dc2acc.js";import"./p-1e77b5bd.js";const l=()=>{const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};l().then((e=>{o();return t(JSON.parse('[["p-99a83939",[[0,"gl-table-column-visibility-button",{"label":[1],"tableId":[1,"table-id"]}],[4,"gl-app",{"label":[1],"menu":[8],"menuLabel":[1,"menu-label"],"splitPane":[4,"split-pane"],"menuType":[1,"menu-type"]}],[0,"gl-basemaps"],[0,"gl-download-button"],[4,"gl-drawer",{"drawerTitle":[1,"drawer-title"],"mapId":[1,"map-id"],"open":[1028],"content":[32],"toggle":[64]}],[0,"gl-share-button",{"icon":[1]}],[32,"gl-address-search",{"mode":[1],"bbox":[1],"jobId":[1,"job-id"],"limit":[2],"maxZoom":[2,"max-zoom"],"placeholder":[1],"url":[1],"zoomPadding":[2,"zoom-padding"],"bboxArray":[32],"hasFocus":[32],"hasValue":[32],"results":[32]},[[16,"glForwardGeocode","handleGeocode"],[16,"click","handleBodyClick"],[0,"keydown","handleKey"]]],[4,"gl-legend-item",{"layers":[1],"image":[1],"toggle":[4],"styleId":[1,"style-id"],"widget":[1],"visible":[32]},[[16,"glStyleElementAdded","handleStyleAdded"],[16,"glStyleElementModified","handleStyleUpdated"]]],[0,"gl-drawer-toggle",{"icon":[1],"buttonTitle":[1,"button-title"],"disabled":[4]}],[0,"gl-fullscreen",{"fullscreen":[32]}],[0,"gl-story-button",{"action":[1],"icon":[1],"label":[1],"storyId":[1,"story-id"],"story":[32],"disabled":[32]},[[16,"glStoryChange","updateDisabled"]]],[4,"gl-table-export-button",{"author":[1],"filename":[1],"format":[1],"pageOrientation":[1,"page-orientation"],"pageSubtitle":[1,"page-subtitle"],"pageTitle":[1,"page-title"],"tableId":[1,"table-id"],"url":[1],"customButton":[4,"custom-button"],"exportCtrl":[32]}],[4,"gl-legend"],[0,"gl-map",{"draw":[1040],"drawOptions":[16],"drawing":[4],"glyphs":[1],"hash":[8],"latitude":[2],"longitude":[2],"zoom":[2],"minzoom":[2],"maxzoom":[2],"sprite":[1],"map":[1040],"clickMode":[1,"click-mode"],"clickEventDelay":[2,"click-event-delay"],"resizeMap":[64]},[[0,"glFeatureClick","handleFeatureClick"],[0,"glStyleElementAdded","handleStyleAdded"],[0,"glStyleElementModified","handleStyleModified"],[0,"glStyleElementRemoved","handleStyleRemoved"]]],[0,"gl-popup",{"clickEventDelay":[2,"click-event-delay"],"closeKey":[1,"close-key"],"closeMode":[1,"close-mode"],"component":[1],"componentOptions":[1,"component-options"],"layers":[1],"maxWidth":[1,"max-width"],"isOpen":[64],"removePopup":[64]},[[16,"glClickedFeaturesGathered","doOpenPopup"],[16,"keyup","handleKeyup"]]],[0,"gl-style",{"basemap":[4],"clickableLayers":[1,"clickable-layers"],"enabled":[4],"name":[1],"thumbnail":[1],"token":[1],"url":[1],"json":[1040],"insertIntoStyle":[1,"insert-into-style"],"insertBeneathLayer":[1,"insert-beneath-layer"]}],[0,"gl-download-file",{"label":[1],"size":[1],"url":[1],"format":[1]}],[4,"gl-story",{"step":[2],"steps":[1026]}],[4,"gl-story-step",{"active":[4],"first":[4],"last":[4],"hash":[1],"clickBeforeHash":[4,"click-before-hash"],"clickAfterIdle":[4,"click-after-idle"],"clickDelay":[2,"click-delay"],"clickLayer":[1,"click-layer"],"clickProperty":[1,"click-property"],"clickValue":[2,"click-value"],"mapId":[1,"map-id"]}],[0,"gl-table",{"disableDefaultSort":[4,"disable-default-sort"],"features":[1040],"rowClassAttribute":[1,"row-class-attribute"],"sortAttribute":[1025,"sort-attribute"],"sortOrder":[1025,"sort-order"],"columns":[32],"getSortedFeatures":[64],"getCellContents":[64]},[[0,"glTableColumnChanged","updateColumns"]]],[0,"gl-table-column",{"attribute":[1],"cellClassAttribute":[1,"cell-class-attribute"],"component":[1],"componentProps":[8,"component-props"],"csv":[4],"format":[1032],"label":[1],"pdf":[4],"sortable":[4],"visible":[4]}],[0,"gl-table-column-visibility",{"label":[1],"tableId":[1,"table-id"]}],[0,"gl-basemap-switcher"],[0,"gl-download-list",{"files":[16]}],[0,"gl-share",{"popupHeight":[2,"popup-height"],"popupWidth":[2,"popup-width"],"shareTitle":[1,"share-title"],"shareUser":[1,"share-user"],"shareHashtags":[1,"share-hashtags"],"shareUrl":[1,"share-url"]}],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]],[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}],[0,"ion-app",{"setFocus":[64]}],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[32,"ion-item-group"],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}],[0,"gl-table-column-visibility-toggle",{"column":[16],"enabled":[1028]}],[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"legacy":[4],"justify":[1],"activated":[32]}],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]],[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}],[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"legacy":[4],"justify":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"],[9,"resize","onResize"]]],[33,"ion-list-header",{"color":[513],"lines":[1]}],[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1]}],[1,"ion-thumbnail"],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionInput","handleIonInput"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[33,"ion-note",{"color":[513]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]}],[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-bab54511",[[0,"gl-form-controller",{"create":[64]}]]],["p-8ee68e35",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16],"multiple":[4],"highlightedDates":[16],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}]]],["p-9a52a393",[[4,"gl-feature-list",{"batchSize":[2,"batch-size"],"component":[1],"componentOptions":[16],"display":[1],"features":[1040],"item":[4],"loadingSpinner":[1,"loading-spinner"],"loadingText":[1,"loading-text"],"mapId":[1,"map-id"],"orderBy":[1,"order-by"],"order":[1],"styleId":[1,"style-id"],"sourceId":[1,"source-id"],"data":[32],"limit":[32]},[[0,"ionInfinite","handleInfiniteScroll"],[16,"glStyleElementModified","handleStyleUpdated"]]]]],["p-2e4a405f",[[0,"gl-attribute-values",{"attributeOptions":[1,"attribute-options"],"features":[16],"header":[1],"headerAttribute":[1,"header-attribute"],"labelPosition":[1,"label-position"],"limit":[2],"valueMaxWidth":[1,"value-max-width"]}]]],["p-96e77bf2",[[0,"gl-draw-toolbar",{"cancelText":[1,"cancel-text"],"color":[1],"confirmText":[1,"confirm-text"],"label":[1],"mapId":[1,"map-id"],"maxFeatures":[2,"max-features"],"minFeatures":[2,"min-features"],"visible":[32],"featureCount":[32]},[[16,"glDrawEnter","handleDrawEnter"],[16,"glDrawExit","handleDrawExit"],[16,"glDrawCreate","handleDrawCreate"],[16,"glDrawDelete","handleDrawDelete"]]]]],["p-8d22e12f",[[0,"gl-like-button",{"attribute":[1],"disabled":[4],"feature":[16],"iconNo":[1,"icon-no"],"iconYes":[1,"icon-yes"],"method":[1],"requestMode":[1,"request-mode"],"token":[1],"url":[1],"count":[32],"liked":[32],"proxy":[32],"likeCtrl":[32],"restCtrl":[32]}]]],["p-d6a52712",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["p-20c62d31",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}]]],["p-2879063d",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-01c68d4b",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-7d1c84cf",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["p-0c22d35f",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["p-58c0adbc",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-47516d22",[[0,"gl-draw-controller",{"create":[64]}]]],["p-43063806",[[0,"gl-table-export-controller",{"create":[64]}]]],["p-5595205d",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}]]],["p-2e07e468",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-3740eeae",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-a2d1c6be",[[1,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-4bdd918f",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-5613ea64",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["p-21350eb6",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["p-a555de65",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["p-0d00d02f",[[33,"ion-segment-button",{"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]}]]],["p-97211e6d",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]]]],["p-0f687692",[[0,"gl-geocode-controller",{"defaultClient":[1,"default-client"],"forward":[64],"reverse":[64],"addClient":[64]}]]],["p-3742094d",[[0,"gl-like-controller",{"create":[64]}]]],["p-9e1be6a1",[[0,"gl-rest-controller",{"create":[64]}]]],["p-9698e068",[[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["p-b5f975b8",[[33,"ion-avatar"]]],["p-bfb44298",[[33,"ion-badge",{"color":[513]}]]],["p-986e3a20",[[33,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["p-a0e556e8",[[32,"ion-card-content"]]],["p-be47ffea",[[33,"ion-card-header",{"color":[513],"translucent":[4]}]]],["p-9a7e8807",[[33,"ion-card-subtitle",{"color":[513]}]]],["p-c2318200",[[33,"ion-card-title",{"color":[513]}]]],["p-2d80014e",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["p-93628789",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}]]],["p-d2511256",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["p-524184b5",[[1,"ion-grid",{"fixed":[4]}]]],["p-81fd194e",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["p-1d7c61a5",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["p-d9198b42",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["p-f0e07d2a",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-a16f4580",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-3df0a400",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"legacy":[4],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-b8713ea4",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["p-04100291",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["p-3980df4d",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}]]],["p-1d13309e",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["p-2ef8843d",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["p-5bc4beab",[[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-54d649c6",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-8b71e6bd",[[1,"ion-row"]]],["p-c0e63279",[[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["p-4f50a910",[[1,"ion-skeleton-text",{"animated":[4]}]]],["p-264dcf64",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["p-47ff808d",[[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["p-3d48522a",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-f25b5d40",[[1,"ion-text",{"color":[513]}]]],["p-9c561816",[[33,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"isExpanded":[32],"open":[64]}],[38,"ion-input",{"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[38,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"shape":[1],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}],[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}],[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]],[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}],[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"legacy":[4]}]]],["p-c3a37f68",[[0,"gl-form-page",{"backText":[1,"back-text"],"facets":[16],"fields":[16],"formFacet":[1,"form-facet"],"label":[1],"root":[4],"submitText":[1,"submit-text"],"cancelText":[1,"cancel-text"],"canSubmit":[32]},[[16,"glFormFeatureChanged","updateValidationStatus"]]],[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}],[4,"gl-field",{"attribute":[1],"image":[1],"label":[1],"placeholder":[1],"required":[4],"type":[8],"widget":[1],"message":[32],"isValid":[64],"getValue":[64],"validate":[64]},[[0,"glOptionChanged","optionChanged"]]],[0,"gl-option",{"image":[1],"label":[1],"value":[8]}],[0,"gl-facet",{"detail":[4],"image":[1],"label":[1],"value":[1],"widget":[1]}]]],["p-67db75d6",[[0,"gl-form",{"cancelText":[1,"cancel-text"],"feature":[16],"formId":[1,"form-id"],"label":[1],"schema":[1],"submitText":[1,"submit-text"],"translateText":[4,"translate-text"],"cancel":[64],"submit":[64]},[[0,"glFieldValueChanged","setValue"],[0,"glFormFacet","handleFacet"]]]]],["p-fda00727",[[32,"ion-picker-column",{"col":[16]}]]],["p-1f980905",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["p-ca5b3cd4",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["p-621ca441",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}],[33,"ion-picker-internal",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]]]'),e)}));
2
2
  //# sourceMappingURL=webmapgl.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccrpc/webmapgl",
3
- "version": "0.18.4",
3
+ "version": "0.18.5",
4
4
  "private": false,
5
5
  "description": "Web map components using Stencil and Maplibre GL",
6
6
  "main": "dist/index.cjs.js",
@@ -1,2 +0,0 @@
1
- import{r as t,f as e,h as i,d as s}from"./p-23450e8b.js";import{_ as n}from"./p-9554b2b5.js";import"./p-7183ba4d.js";const h=class{constructor(i){t(this,i);this.glFormCancel=e(this,"glFormCancel",7);this.glFormFeatureChanged=e(this,"glFormFeatureChanged",7);this.glFormSubmit=e(this,"glFormSubmit",7);this.cancelText=undefined;this.feature=undefined;this.formId=`gl-form-${r++}`;this.label=undefined;this.schema=undefined;this.submitText=undefined;this.translateText=false}async componentWillLoad(){let t=await fetch(this.schema);this._schema=await t.json()}componentDidLoad(){let t=this.createFormPage(this.label);this.el.querySelector("ion-nav").setRoot(t)}setValue(t){if(this.feature==undefined)return;this.feature.properties=this.feature.properties||{};this.feature.properties[t.detail.field.attribute]=t.detail.value;this.glFormFeatureChanged.emit({formId:this.formId,feature:this.feature})}handleFacet(t){let e=this.createFormPage(t.detail.label,t.detail.value);this.el.querySelector("ion-nav").push(e)}async cancel(){this.glFormCancel.emit({formId:this.formId,feature:this.feature})}async submit(){this.glFormSubmit.emit({formId:this.formId,feature:this.feature})}createFormPage(t,e){let i=document.createElement("gl-form-page");i.formFacet=e;i.facets=this.filter(this._schema.facets||[],e);i.fields=this.filter(this._schema.fields||[],e);i.root=e!=undefined;if(t!=undefined)i.label=t;if(this.submitText!=undefined)i.submitText=this.submitText;if(this.cancelText!=undefined)i.cancelText=this.cancelText;return i}filter(t,e){return t.filter((t=>{let i=t.facets||[];if(!i.length&&e==undefined)return true;for(let t of i){let i=t.replace(/[.?+^$[\]\\(){}|-]/g,"\\$&");let s=new RegExp("^"+i.split("*").join(".*")+"$");if(s.test(e))return true}return false})).map((t=>{let i=Object.assign({},t);if(this.translateText)i.label=n(t.label);if(t.options)i.options=this.filter(t.options,e);return i}))}render(){return i("ion-nav",null)}get el(){return s(this)}};let r=0;export{h as gl_form};
2
- //# sourceMappingURL=p-d27c0d4a.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Form","formId","componentWillLoad","res","fetch","this","schema","_schema","json","componentDidLoad","page","createFormPage","label","el","querySelector","setRoot","setValue","e","feature","undefined","properties","detail","field","attribute","value","glFormFeatureChanged","emit","handleFacet","push","cancel","glFormCancel","submit","glFormSubmit","formFacet","document","createElement","facets","filter","fields","root","submitText","cancelText","items","item","length","facet","escaped","replace","re","RegExp","split","join","test","map","result","Object","assign","translateText","_t","options","render","h"],"sources":["src/components/form/form.tsx"],"sourcesContent":["import {\n h,\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n} from \"@stencil/core\";\nimport { _t } from \"../i18n/i18n\";\n\n@Component({\n tag: \"gl-form\",\n})\nexport class Form {\n private _schema: any;\n\n @Element() el: HTMLGlFormElement;\n\n /**\n * Emitted when the user cancels a form submission.\n */\n @Event() glFormCancel: EventEmitter;\n\n /**\n * Emitted when the feature properties are updated due to a field value\n * change.\n */\n @Event() glFormFeatureChanged: EventEmitter;\n\n /**\n * Emitted when the user submits the form.\n */\n @Event() glFormSubmit: EventEmitter;\n\n /**\n * Text for the cancel button.\n */\n @Prop() readonly cancelText: string;\n\n /**\n * The feature being modified by the form.\n * The form sets values in the 'properties' object of the feature.\n */\n @Prop() readonly feature: { properties: { [key: string]: any } };\n\n /**\n * ID of the form.\n */\n @Prop() readonly formId: string = `gl-form-${formId++}`;\n\n /**\n * The label displayed in the toolbar of the `gl-form-page`.\n */\n @Prop() readonly label: string;\n\n /**\n * The URL of the form schema JSON.\n */\n @Prop() readonly schema: string;\n\n /**\n * Text for the submit button.\n */\n @Prop() readonly submitText: string;\n\n /**\n * Treat labels in the form as i18n keys.\n */\n @Prop() readonly translateText: boolean = false;\n\n async componentWillLoad() {\n let res = await fetch(this.schema);\n this._schema = await res.json();\n }\n\n componentDidLoad() {\n let page = this.createFormPage(this.label);\n this.el.querySelector(\"ion-nav\").setRoot(page);\n }\n\n @Listen(\"glFieldValueChanged\")\n setValue(e: CustomEvent) {\n if (this.feature == undefined) return;\n this.feature.properties = this.feature.properties || {};\n this.feature.properties[e.detail.field.attribute] = e.detail.value;\n this.glFormFeatureChanged.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n @Listen(\"glFormFacet\")\n handleFacet(e: CustomEvent) {\n let page = this.createFormPage(e.detail.label, e.detail.value);\n this.el.querySelector(\"ion-nav\").push(page);\n }\n\n /**\n * Cancels and closes the form\n */\n @Method()\n async cancel() {\n this.glFormCancel.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n /**\n * Submits the form and passes the feature that has been edited along to glFormSubmit\n */\n @Method()\n async submit() {\n this.glFormSubmit.emit({\n formId: this.formId,\n feature: this.feature,\n });\n }\n\n private createFormPage(label?: string, formFacet?: string) {\n let page = document.createElement(\"gl-form-page\");\n page.formFacet = formFacet;\n page.facets = this.filter(this._schema.facets || [], formFacet);\n page.fields = this.filter(this._schema.fields || [], formFacet);\n page.root = formFacet != undefined;\n\n if (label != undefined) page.label = label;\n if (this.submitText != undefined) page.submitText = this.submitText;\n if (this.cancelText != undefined) page.cancelText = this.cancelText;\n\n return page;\n }\n\n private filter(items: any[], formFacet?: string) {\n return items\n .filter((item) => {\n let facets = item.facets || [];\n if (!facets.length && formFacet == undefined) return true;\n for (let facet of facets) {\n let escaped = facet.replace(/[.?+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n let re = new RegExp(\"^\" + escaped.split(\"*\").join(\".*\") + \"$\");\n if (re.test(formFacet)) return true;\n }\n return false;\n })\n .map((item) => {\n let result = { ...item };\n if (this.translateText) result.label = _t(item.label);\n if (item.options) result.options = this.filter(item.options, formFacet);\n return result;\n });\n }\n\n render() {\n return <ion-nav></ion-nav>;\n }\n}\n\nlet formId = 0;\n"],"mappings":"2HAeaA,EAAI,M,uOAmCmB,WAAWC,M,wFAoBH,K,CAE1C,uBAAMC,GACJ,IAAIC,QAAYC,MAAMC,KAAKC,QAC3BD,KAAKE,cAAgBJ,EAAIK,M,CAG3B,gBAAAC,GACE,IAAIC,EAAOL,KAAKM,eAAeN,KAAKO,OACpCP,KAAKQ,GAAGC,cAAc,WAAWC,QAAQL,E,CAI3C,QAAAM,CAASC,GACP,GAAIZ,KAAKa,SAAWC,UAAW,OAC/Bd,KAAKa,QAAQE,WAAaf,KAAKa,QAAQE,YAAc,GACrDf,KAAKa,QAAQE,WAAWH,EAAEI,OAAOC,MAAMC,WAAaN,EAAEI,OAAOG,MAC7DnB,KAAKoB,qBAAqBC,KAAK,CAC7BzB,OAAQI,KAAKJ,OACbiB,QAASb,KAAKa,S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