@esri/solutions-components 5.1.0-next.109 → 5.1.0-next.110
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/dist/cdn/{ZVHRGKDC.js → 25VAC27I.js} +1 -1
- package/dist/cdn/{PMASTSAY.js → 35JHUNE2.js} +1 -1
- package/dist/cdn/{FIHH22PH.js → 3CDGBSG2.js} +1 -1
- package/dist/cdn/{BBVI22DX.js → 3JVQG3QA.js} +1 -1
- package/dist/cdn/42SCVEP5.js +2 -0
- package/dist/cdn/{WPB3VJUM.js → 4DNXJC4H.js} +1 -1
- package/dist/cdn/{ZTU7ACFT.js → 4LXJECAT.js} +1 -1
- package/dist/cdn/{MVD3VVPZ.js → 4SU2ROO4.js} +1 -1
- package/dist/cdn/{ZGX5BDIO.js → 5TJMXQ6I.js} +1 -1
- package/dist/cdn/{T3NHBHAI.js → 5X73H45I.js} +1 -1
- package/dist/cdn/{6OCDWG7P.js → 74KPJ6CS.js} +1 -1
- package/dist/cdn/{HIV2GYY7.js → 7K2BSAIP.js} +1 -1
- package/dist/cdn/{EZUDAXHT.js → A4RZESK7.js} +1 -1
- package/dist/cdn/{ON4MWXBI.js → A75GYZAK.js} +1 -1
- package/dist/cdn/{E4MLV2FE.js → AC4RMGO6.js} +1 -1
- package/dist/cdn/{XGXFBOJN.js → AN52NHQI.js} +1 -1
- package/dist/cdn/{M5OSUYVD.js → AVRGQSFV.js} +1 -1
- package/dist/cdn/BJDRTFKQ.js +2 -0
- package/dist/cdn/{LG67HAE5.js → BJR4LFTB.js} +1 -1
- package/dist/cdn/{UWOL7IKX.js → BKDURHMM.js} +1 -1
- package/dist/cdn/{GE57TEEE.js → BMF7MU4P.js} +1 -1
- package/dist/cdn/BTGIA7F4.js +2 -0
- package/dist/cdn/{FJAKNWL6.js → BXRB7X5V.js} +25 -25
- package/dist/cdn/{KUFPXZWQ.js → CCUDERJM.js} +1 -1
- package/dist/cdn/CYOAGVBU.js +2 -0
- package/dist/cdn/D4YPSPYU.js +2 -0
- package/dist/cdn/{F5IR4RHL.js → DGUS2OKW.js} +1 -1
- package/dist/cdn/{WVGQGW4R.js → DMAGF5NK.js} +1 -1
- package/dist/cdn/{UEITESQY.js → EKVVDMWB.js} +1 -1
- package/dist/cdn/{52KJS4OG.js → EMYFWPJ5.js} +1 -1
- package/dist/cdn/{PWTAOSL7.js → FJ7ETLF7.js} +1 -1
- package/dist/cdn/{CETY3FEP.js → FKA4WB46.js} +1 -1
- package/dist/cdn/{4H6WLS2C.js → FTVYIREU.js} +1 -1
- package/dist/cdn/{WOVQTNTH.js → G4RZYVWS.js} +1 -1
- package/dist/cdn/GQLCVOIO.js +2 -0
- package/dist/cdn/{N6HPF764.js → GWKYLTEJ.js} +1 -1
- package/dist/cdn/{DPIB437L.js → GWS7GDTT.js} +1 -1
- package/dist/cdn/{ALQ5DBK4.js → HG7ONXRZ.js} +1 -1
- package/dist/cdn/{RAVGZ37K.js → I4N2RPKJ.js} +1 -1
- package/dist/cdn/JDVRT3UI.js +2 -0
- package/dist/cdn/{KRFMW3F6.js → JHEOWKJP.js} +1 -1
- package/dist/cdn/{LGFATGO3.js → KLK6VI3Y.js} +1 -1
- package/dist/cdn/{EX2M356A.js → KRK3HJKJ.js} +1 -1
- package/dist/cdn/LES6DTSC.js +2 -0
- package/dist/cdn/{L3R23ENZ.js → LL62WUTX.js} +1 -1
- package/dist/cdn/LS5WOH7V.js +2 -0
- package/dist/cdn/{YBFRVRRL.js → LUPN4QGH.js} +1 -1
- package/dist/cdn/{MNCCEYE3.js → MBLK4P7W.js} +1 -1
- package/dist/cdn/NUVJH534.js +2 -0
- package/dist/cdn/OJ75PR7L.js +2 -0
- package/dist/cdn/{JCQ3GAY6.js → PD2CPL77.js} +1 -1
- package/dist/cdn/{RTENTU3I.js → PERCQYO6.js} +2 -2
- package/dist/cdn/{GXH52TKB.js → Q2I3FISB.js} +1 -1
- package/dist/cdn/{Y4QO5HTT.js → Q5XUSNQQ.js} +1 -1
- package/dist/cdn/{R6RHNEU5.js → QCXFCAG2.js} +1 -1
- package/dist/cdn/{EZXOFWRE.js → QGAFD25H.js} +1 -1
- package/dist/cdn/{54YUJSPE.js → QK5JWCPU.js} +1 -1
- package/dist/cdn/QOJ6NBZ7.js +2 -0
- package/dist/cdn/{CTGCWSCT.js → R5EBB32O.js} +112 -112
- package/dist/cdn/{AV2VGLDZ.js → RTEEGE26.js} +1 -1
- package/dist/cdn/{7OCLTZG6.js → RYM3WNKW.js} +1 -1
- package/dist/cdn/T5VGITRO.js +2 -0
- package/dist/cdn/{QETCNT3V.js → TCEWQ6AH.js} +1 -1
- package/dist/cdn/{RHYPLQ7P.js → TUB2CVLR.js} +3 -3
- package/dist/cdn/{UZ7C6CMQ.js → UQVDQ3RW.js} +1 -1
- package/dist/cdn/{Z5DIDVKZ.js → VEZDLO5O.js} +1 -1
- package/dist/cdn/{MMSWM6TE.js → VJCNI3S6.js} +1 -1
- package/dist/cdn/{JXLUOBPY.js → VLTIETO7.js} +1 -1
- package/dist/cdn/{CFD3KIYJ.js → VMSV2EDE.js} +1 -1
- package/dist/cdn/WCS5ISFW.js +2 -0
- package/dist/cdn/{AO6CNZVY.js → WNZGZMLN.js} +1 -1
- package/dist/cdn/{2M47YJSF.js → X3AFBSXC.js} +1 -1
- package/dist/cdn/{MEETZUH6.js → XFSGLLBP.js} +1 -1
- package/dist/cdn/YOO4OQMD.js +2 -0
- package/dist/cdn/Z7UB6Y73.js +2 -0
- package/dist/cdn/{DNTFTT5U.js → ZGAP3FGE.js} +1 -1
- package/dist/cdn/ZHIIV7VJ.js +2 -0
- package/dist/cdn/{REGMSP2R.js → ZKWM223Q.js} +1 -1
- package/dist/cdn/assets/buffer-tools/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/buffer-tools/t9n/messages.json +1 -1
- package/dist/cdn/assets/card-manager/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/card-manager/t9n/messages.json +1 -1
- package/dist/cdn/assets/create-related-feature/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/create-related-feature/t9n/messages.json +1 -1
- package/dist/cdn/assets/crowdsource-manager/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/crowdsource-manager/t9n/messages.json +1 -1
- package/dist/cdn/assets/crowdsource-reporter/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/crowdsource-reporter/t9n/messages.json +1 -1
- package/dist/cdn/assets/edit-card/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/edit-card/t9n/messages.json +1 -1
- package/dist/cdn/assets/info-card/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/info-card/t9n/messages.json +1 -1
- package/dist/cdn/assets/map-picker/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/map-picker/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-all-shell/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-all-shell/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-deployed-list/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-deployed-list/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-filter-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-filter-panel/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/interfaces.js +1 -1
- package/dist/chunks/solution-deploy-dialog.js +2 -2
- package/dist/chunks/solutions-deploy-app-nav.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +5312 -5307
- package/dist/components/buffer-tools/customElement.d.ts +2 -0
- package/dist/components/buffer-tools/customElement.js +5 -5
- package/dist/components/card-manager/customElement.d.ts +2 -0
- package/dist/components/card-manager/customElement.js +1 -1
- package/dist/components/create-feature/customElement.js +9 -9
- package/dist/components/create-related-feature/customElement.d.ts +7 -1
- package/dist/components/create-related-feature/customElement.js +6 -6
- package/dist/components/crowdsource-manager/customElement.d.ts +2 -0
- package/dist/components/crowdsource-manager/customElement.js +5 -5
- package/dist/components/crowdsource-reporter/customElement.d.ts +8 -0
- package/dist/components/crowdsource-reporter/customElement.js +7 -7
- package/dist/components/deduct-calculator/customElement.js +5 -5
- package/dist/components/delete-button/customElement.js +1 -1
- package/dist/components/edit-card/customElement.d.ts +7 -1
- package/dist/components/edit-card/customElement.js +1 -1
- package/dist/components/feature-details/customElement.js +2 -2
- package/dist/components/feature-list/customElement.js +1 -1
- package/dist/components/field-selection/customElement.js +75 -67
- package/dist/components/info-card/customElement.d.ts +2 -0
- package/dist/components/info-card/customElement.js +1 -1
- package/dist/components/layer-list/customElement.js +1 -1
- package/dist/components/layer-table/customElement.js +1 -1
- package/dist/components/map-layer-picker/customElement.js +8 -8
- package/dist/components/map-picker/customElement.d.ts +7 -1
- package/dist/components/map-picker/customElement.js +2 -2
- package/dist/components/map-select-tools/customElement.js +3 -3
- package/dist/components/map-tools/customElement.js +1 -1
- package/dist/components/pci-calculator/customElement.js +5 -5
- package/dist/components/pdf-download/customElement.js +1 -1
- package/dist/components/public-notification/customElement.js +3 -3
- package/dist/components/refine-selection/customElement.js +1 -1
- package/dist/components/solution-builder-assistant/customElement.js +56 -56
- package/dist/components/solution-builder-assistant/index.js +1 -1
- package/dist/components/solution-delete-dialog/customElement.js +1 -1
- package/dist/components/solution-deployed-card-panel/customElement.js +9 -9
- package/dist/components/solution-deploying-dialog/customElement.js +8 -8
- package/dist/components/solution-details-card/customElement.js +5 -5
- package/dist/components/solution-item-accordion/customElement.js +1 -1
- package/dist/components/solution-item-diagram/customElement.js +113 -113
- package/dist/components/solution-item-icon/customElement.js +3 -3
- package/dist/components/solution-resource-card/customElement.js +3 -3
- package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
- package/dist/components/solution-social-share/customElement.js +11 -11
- package/dist/components/solutions-all-panel/customElement.js +1 -1
- package/dist/components/solutions-all-shell/customElement.d.ts +2 -0
- package/dist/components/solutions-all-shell/customElement.js +5 -5
- package/dist/components/solutions-deployed-list/customElement.d.ts +7 -1
- package/dist/components/solutions-deployed-list/customElement.js +25 -22
- package/dist/components/solutions-deployed-panel/customElement.js +1 -1
- package/dist/components/solutions-deployed-shell/customElement.js +1 -1
- package/dist/components/solutions-filter-panel/customElement.d.ts +2 -0
- package/dist/components/solutions-filter-panel/customElement.js +1 -1
- package/dist/components/solutions-resources-section/customElement.js +10 -9
- package/dist/components/solutions-resources-shell/customElement.js +3 -3
- package/dist/components/solutions-searchsort-toolbar/customElement.js +11 -11
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +7 -7
- package/package.json +1 -1
- package/dist/cdn/5Q6CJZ7M.js +0 -2
- package/dist/cdn/7O7OFAXY.js +0 -2
- package/dist/cdn/A77WR5MD.js +0 -2
- package/dist/cdn/AKEEHAGV.js +0 -2
- package/dist/cdn/BX4LWPBE.js +0 -2
- package/dist/cdn/F7GWD5GZ.js +0 -2
- package/dist/cdn/I5STLCQ7.js +0 -2
- package/dist/cdn/KXU6CODF.js +0 -2
- package/dist/cdn/MRTCK3MT.js +0 -2
- package/dist/cdn/NGWZKWTA.js +0 -2
- package/dist/cdn/OZGADKJE.js +0 -2
- package/dist/cdn/SE4ZDMV4.js +0 -2
- package/dist/cdn/SHXJ4Z2A.js +0 -2
- package/dist/cdn/TJ7VHVTC.js +0 -2
- package/dist/cdn/WHXJW7ZE.js +0 -2
- package/dist/cdn/Z3NAMBE6.js +0 -2
- package/dist/cdn/ZTVWTQFN.js +0 -2
|
@@ -17,11 +17,13 @@ export abstract class BufferTools extends LitElement {
|
|
|
17
17
|
meters: string;
|
|
18
18
|
miles: string;
|
|
19
19
|
kilometers: string;
|
|
20
|
+
unit: string;
|
|
20
21
|
} & T9nMeta<{
|
|
21
22
|
feet: string;
|
|
22
23
|
meters: string;
|
|
23
24
|
miles: string;
|
|
24
25
|
kilometers: string;
|
|
26
|
+
unit: string;
|
|
25
27
|
}>;
|
|
26
28
|
/**
|
|
27
29
|
* string: The appearance of display. Can be a 'slider' or 'text' inputs for distance/value
|
|
@@ -5,7 +5,7 @@ import { css as u, html as s } from "lit";
|
|
|
5
5
|
import { createRef as c, ref as d } from "lit-html/directives/ref.js";
|
|
6
6
|
import { LitElement as m, createEvent as n } from "@arcgis/lumina";
|
|
7
7
|
import * as i from "@arcgis/core/geometry/operators/geodesicBufferOperator.js";
|
|
8
|
-
import * as
|
|
8
|
+
import * as r from "@arcgis/core/geometry/operators/bufferOperator.js";
|
|
9
9
|
const f = u`:host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}`;
|
|
10
10
|
class p extends m {
|
|
11
11
|
constructor() {
|
|
@@ -58,15 +58,15 @@ class p extends m {
|
|
|
58
58
|
}
|
|
59
59
|
_buffer() {
|
|
60
60
|
this.disabled ? this.bufferComplete.emit(void 0) : (this._bufferTimeout && clearTimeout(this._bufferTimeout), this._bufferTimeout = setTimeout(async () => {
|
|
61
|
-
if (this.geometries?.length > 0 && this.unit && this.distance > 0 && i &&
|
|
61
|
+
if (this.geometries?.length > 0 && this.unit && this.distance > 0 && i && r) {
|
|
62
62
|
i.isLoaded() || await i.load();
|
|
63
|
-
const e = this.geometries[0].spatialReference, a = this.geometries,
|
|
64
|
-
this.bufferComplete.emit(
|
|
63
|
+
const e = this.geometries[0].spatialReference, a = this.geometries, l = e.isWGS84 || e.isWebMercator ? i.executeMany(a, [this.distance], { union: this.unionResults, unit: this.unit }) : r.executeMany(a, [this.distance], { unit: this.unit, union: this.unionResults });
|
|
64
|
+
this.bufferComplete.emit(l);
|
|
65
65
|
}
|
|
66
66
|
}, 400));
|
|
67
67
|
}
|
|
68
68
|
_getTextBoxDisplay() {
|
|
69
|
-
return s`<div class="c-container"><calcite-input class="padding-end-1 w-50" .max=${this.max && this.max > 0 ? this.max : void 0} .min=${this.min} number-button-type=vertical @calciteInputInput=${this._setDistance} placeholder=0 type=number .value=${this.distance ? this.distance.toString() : void 0}></calcite-input><calcite-select class="flex-1 w-50" label
|
|
69
|
+
return s`<div class="c-container"><calcite-input class="padding-end-1 w-50" .max=${this.max && this.max > 0 ? this.max : void 0} .min=${this.min} number-button-type=vertical @calciteInputInput=${this._setDistance} placeholder=0 type=number .value=${this.distance ? this.distance.toString() : void 0}></calcite-input><calcite-select class="flex-1 w-50" .label=${this._translations.unit} @calciteSelectChange=${() => {
|
|
70
70
|
this._unitElement?.value && this._setUnit(this._unitElement?.value.value);
|
|
71
71
|
}} ${d(this._unitElement)}>${this._getUnits()}</calcite-select></div>`;
|
|
72
72
|
}
|
|
@@ -17,12 +17,14 @@ export abstract class CardManager extends LitElement {
|
|
|
17
17
|
createFeature: string;
|
|
18
18
|
createRecord: string;
|
|
19
19
|
create: string;
|
|
20
|
+
back: string;
|
|
20
21
|
} & T9nMeta<{
|
|
21
22
|
selectFeaturesToStart: string;
|
|
22
23
|
selectFeaturesFromMapToStart: string;
|
|
23
24
|
createFeature: string;
|
|
24
25
|
createRecord: string;
|
|
25
26
|
create: string;
|
|
27
|
+
back: string;
|
|
26
28
|
}>;
|
|
27
29
|
/**
|
|
28
30
|
* string: Label to show for create button
|
|
@@ -39,7 +39,7 @@ class C extends F {
|
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
const e = this._graphics?.length > 0 ? "" : "display-none", t = this._graphics?.length === 0 && this._showCreateFeatureComponent ? "" : "display-none", i = this._graphics?.length > 0 || this._showCreateFeatureComponent ? "display-none" : "", s = this.layerOrTable?.isTable, l = this.customInfoText ? this.customInfoText : this.selectingFeatureFromMap ? this._translations.selectFeaturesFromMapToStart : this._translations.selectFeaturesToStart, n = this.enableCreateFeatures && this.layerOrTable?.capabilities?.operations?.supportsAdd, o = this.createBtnLabel ? this.createBtnLabel : s ? this._translations.createRecord : this._translations.createFeature, c = !this.layerOrTable, h = this.enableSnapping && !this.layerOrTable?.isTable;
|
|
42
|
-
return a`<div class="overflow-auto height-full"><calcite-shell class=${`position-relative ${e}`}><div class="position-static z-index-500 height-full"><info-card .allowEditing=${this.layerOrTable?.editingEnabled} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${h} .graphics=${this._graphics} .isLoading=${this._cardLoading} .isMobile=${this.isMobile} .mapView=${this.mapView} position=relative show-close-btn></info-card></div></calcite-shell><calcite-shell class=${`position-relative ${i}`}><calcite-panel><div class=padding-1><calcite-notice .icon=${this.selectingFeatureFromMap ? "map" : "table"} icon-flip-rtl open><div slot=message>${l}</div></calcite-notice></div>${!this.isMobile && n && a`<calcite-button .disabled=${c} @click=${() => this._createFeatureBtnClicked()} slot=footer width=full>${o}</calcite-button>` || ""}</calcite-panel></calcite-shell><calcite-shell class=${`position-relative ${t}`}><calcite-flow-item selected><calcite-panel .heading=${o}><calcite-action appearance=solid class="back-button hydrated" icon=chevron-left @click=${this._backFromCreateFeature} scale=s slot=header-actions-start text></calcite-action>${this.getEditorComponent()}${this._showSubmitBtn && a`<calcite-button appearance=solid class="footer-top-button footer-button" @click=${() => this._createFeature.value && void this._createFeature.value.submit()} slot=footer width=full>${this._translations.create}</calcite-button>` || ""}</calcite-panel></calcite-flow-item></calcite-shell></div>`;
|
|
42
|
+
return a`<div class="overflow-auto height-full"><calcite-shell class=${`position-relative ${e}`}><div class="position-static z-index-500 height-full"><info-card .allowEditing=${this.layerOrTable?.editingEnabled} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${h} .graphics=${this._graphics} .isLoading=${this._cardLoading} .isMobile=${this.isMobile} .mapView=${this.mapView} position=relative show-close-btn></info-card></div></calcite-shell><calcite-shell class=${`position-relative ${i}`}><calcite-panel><div class=padding-1><calcite-notice .icon=${this.selectingFeatureFromMap ? "map" : "table"} icon-flip-rtl open><div slot=message>${l}</div></calcite-notice></div>${!this.isMobile && n && a`<calcite-button .disabled=${c} @click=${() => this._createFeatureBtnClicked()} slot=footer width=full>${o}</calcite-button>` || ""}</calcite-panel></calcite-shell><calcite-shell class=${`position-relative ${t}`}><calcite-flow-item selected><calcite-panel .heading=${o}><calcite-action appearance=solid class="back-button hydrated" icon=chevron-left @click=${this._backFromCreateFeature} scale=s slot=header-actions-start .text=${this._translations.back}></calcite-action>${this.getEditorComponent()}${this._showSubmitBtn && a`<calcite-button appearance=solid class="footer-top-button footer-button" @click=${() => this._createFeature.value && void this._createFeature.value.submit()} slot=footer width=full>${this._translations.create}</calcite-button>` || ""}</calcite-panel></calcite-flow-item></calcite-shell></div>`;
|
|
43
43
|
}
|
|
44
44
|
getEditorComponent() {
|
|
45
45
|
const e = this.enableSnapping && !this.layerOrTable?.isTable && this.enableCreateFeatures;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as v } from "../../chunks/runtime.js";
|
|
3
|
-
import { a as b, g as
|
|
3
|
+
import { a as b, g as w } from "../../chunks/mapViewUtils.js";
|
|
4
4
|
import { u as M } from "../../chunks/useT9n.js";
|
|
5
|
-
import { css as I, html as c, nothing as
|
|
5
|
+
import { css as I, html as c, nothing as f } from "lit";
|
|
6
6
|
import { createRef as p, ref as m } from "lit-html/directives/ref.js";
|
|
7
|
-
import { LitElement as A, createEvent as h, noShadowRoot as L, safeClassMap as
|
|
7
|
+
import { LitElement as A, createEvent as h, noShadowRoot as L, safeClassMap as _ } from "@arcgis/lumina";
|
|
8
8
|
import { p as V } from "../../chunks/queryUtils.js";
|
|
9
9
|
import x from "@arcgis/core/widgets/Editor.js";
|
|
10
10
|
import k from "@arcgis/core/form/ExpressionInfo.js";
|
|
@@ -93,7 +93,7 @@ class D extends A {
|
|
|
93
93
|
const d = this._imageAnalysisInfo?.canUseAI && ["chooseReportType", "analyzingImage", "imageUpload"].includes(this._currentPage);
|
|
94
94
|
return this._inValidGeomtryDrawn ? n = this.reportingAreaMessage || this._translations.reportOutsideAreaMessage : this._currentPage === "drawing" || this._currentPage === "editing" ? n = this._translations.provideLocationMsg : this._currentPage === "featureForm" ? n = this._imageAnalysisInfo?.results?.filter((u) => u.success).length ? this._translations.formReviewMsg : this._translations.provideDetailsMsg : o && (n = this._translations.enableFeatureTemplatesMessage), c`${this._imageAnalysisFailed && c`<calcite-alert auto-close icon=x-octagon kind=danger label @calciteAlertClose=${() => {
|
|
95
95
|
this._imageAnalysisFailed = !1;
|
|
96
|
-
}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.imageExtractionError}</div></calcite-alert>` || ""}${d && c`<calcite-panel>${this._currentPage === "chooseReportType" && this._getReportTypePage() || ""}${this._currentPage === "imageUpload" && this._aiImageExtractionPage() || ""}${this._currentPage === "analyzingImage" && this._getAnalyzingImagePage() || ""}</calcite-panel>` || ""}${!d && c`${l && c`<calcite-notice class="notice-msg" .icon=${r} .kind=${s} open ${m(this._calciteNotice)}><div slot=message .innerHTML=${n ?? ""} ${m(this._guidingMessageRefNode)}></div></calcite-notice>` || ""}${this._selectedImageBase64 && this._currentPage === "featureForm" && c`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64 ??
|
|
96
|
+
}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.imageExtractionError}</div></calcite-alert>` || ""}${d && c`<calcite-panel>${this._currentPage === "chooseReportType" && this._getReportTypePage() || ""}${this._currentPage === "imageUpload" && this._aiImageExtractionPage() || ""}${this._currentPage === "analyzingImage" && this._getAnalyzingImagePage() || ""}</calcite-panel>` || ""}${!d && c`${l && c`<calcite-notice class="notice-msg" .icon=${r} .kind=${s} open ${m(this._calciteNotice)}><div slot=message .innerHTML=${n ?? ""} ${m(this._guidingMessageRefNode)}></div></calcite-notice>` || ""}${this._selectedImageBase64 && this._currentPage === "featureForm" && c`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img alt=${this._translations.photo ?? f} class="width-full" src=${this._selectedImageBase64 ?? f}></div>` || ""}<calcite-loader class=${_(i)} label scale=s></calcite-loader>${this._currentPage === "featureForm" && this.isMobile && c`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>` || ""}<div class=${_(t)} id=feature-form></div>${this.enableSearch && c`<div class=${`search-widget ${e} ${t}`} id=search-widget-ref ${m(this._searchDiv)}></div>` || ""}` || ""}<div class=${_(a)} ${m(this._mapViewContainer)}></div>`;
|
|
97
97
|
}
|
|
98
98
|
async init() {
|
|
99
99
|
this.mapView && this.selectedLayerId && (this._updatedMapView = this.mapView, await (this.isMobile && this.updateMapPosition ? this.createMobileMapView() : this._loadWidgets()));
|
|
@@ -121,13 +121,13 @@ class D extends A {
|
|
|
121
121
|
_getReportTypePage() {
|
|
122
122
|
return c`<div class="report-selection-container"><calcite-label>${this._translations.createReportHeading}</calcite-label><calcite-card class="cursor-pointer" @click=${() => {
|
|
123
123
|
this.progressStatus.emit(35), this._currentPage = "imageUpload";
|
|
124
|
-
}}><div slot=description class="card-body-content"><calcite-icon icon=effects scale=m style="color: var(--calcite-ui-text-2)"></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.aiImgExtractionLabel}</span><span class="option-description">${this._translations.aiAssistantDescription}</span></div></div></calcite-card><calcite-card class="cursor-pointer" @click=${() => {
|
|
124
|
+
}}><div slot=description class="card-body-content"><calcite-icon aria-hidden=true icon=effects scale=m style="color: var(--calcite-ui-text-2)"></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.aiImgExtractionLabel}</span><span class="option-description">${this._translations.aiAssistantDescription}</span></div></div></calcite-card><calcite-card class="cursor-pointer" @click=${() => {
|
|
125
125
|
this._currentPage = "templatePicker", this.init();
|
|
126
|
-
}}><div slot=description class="card-body-content"><calcite-icon icon=pencil scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.fillOutManually}</span><span class="option-description">${this._translations.startBlank}</span></div></div></calcite-card></div>`;
|
|
126
|
+
}}><div slot=description class="card-body-content"><calcite-icon aria-hidden=true icon=pencil scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.fillOutManually}</span><span class="option-description">${this._translations.startBlank}</span></div></div></calcite-card></div>`;
|
|
127
127
|
}
|
|
128
128
|
_aiImageExtractionPage() {
|
|
129
129
|
const e = this._selectedImageBase64 !== "", i = e ? this._translations.replaceImage : this._translations.imageUploadLimitHint;
|
|
130
|
-
return c`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiAssistantProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.photo}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-input type=file accept="image/*;capture=camera" @calciteInputInput=${this._onImageUpload} ${m(this._inputImageForAI)}></calcite-input></calcite-label><div class="info-container"><calcite-icon icon=information scale=s></calcite-icon><span>${i}</span></div>${e && c`<img class="width-full" src=${this._selectedImageBase64 ??
|
|
130
|
+
return c`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiAssistantProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.photo}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-input type=file accept="image/*;capture=camera" @calciteInputInput=${this._onImageUpload} ${m(this._inputImageForAI)}></calcite-input></calcite-label><div class="info-container"><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><span>${i}</span></div>${e && c`<img alt=${this._translations.photo ?? f} class="width-full" src=${this._selectedImageBase64 ?? f}>` || ""}</div><div slot=footer class="upload-img-footer-container"><calcite-button width=full .disabled=${!e} id=next-btn @click=${this._analyzeImage}>${this._translations.next}</calcite-button><calcite-button width=full appearance=outline kind=brand @click=${() => this.modeChanged.emit()}>${this._translations.cancel}</calcite-button></div>`;
|
|
131
131
|
}
|
|
132
132
|
_getAnalyzingImagePage() {
|
|
133
133
|
return c`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingImage}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${() => {
|
|
@@ -221,7 +221,7 @@ class D extends A {
|
|
|
221
221
|
this._editor && this._editor.destroy();
|
|
222
222
|
const e = [];
|
|
223
223
|
this._container = document.createElement("div"), this._container?.classList.add("display-none"), this.enableSnapping || this._container.classList.add("hide-editor-toolbar");
|
|
224
|
-
const i = this._updatedMapView && await b(this._updatedMapView), t = this.mapView && await
|
|
224
|
+
const i = this._updatedMapView && await b(this._updatedMapView), t = this.mapView && await w(this.mapView, this.selectedLayerId);
|
|
225
225
|
if (t && (this._selectedLayer = t, !this._selectedLayer?.isTable && i && i.forEach((a) => {
|
|
226
226
|
e.push({
|
|
227
227
|
layer: a,
|
|
@@ -275,7 +275,7 @@ class D extends A {
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
async queryIntersectingFeatures() {
|
|
278
|
-
const e = this.mapView && await
|
|
278
|
+
const e = this.mapView && await w(this.mapView, this.reportingAreaLayer);
|
|
279
279
|
if (e) {
|
|
280
280
|
const i = e.createQuery();
|
|
281
281
|
i.geometry = this._drawnGeometry, i.spatialRelationship = "intersects";
|
|
@@ -12,7 +12,13 @@ export abstract class CreateRelatedFeature extends LitElement {
|
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
protected _translations: {
|
|
15
|
+
protected _translations: {
|
|
16
|
+
provideDetailsMsg: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
} & T9nMeta<{
|
|
19
|
+
provideDetailsMsg: string;
|
|
20
|
+
loading: string;
|
|
21
|
+
}>;
|
|
16
22
|
/**
|
|
17
23
|
* boolean: Set this to true when have a custom submit button in the app.
|
|
18
24
|
* This will hide the header and footer elements of the editor and user needs to execute the submit method manually.
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { c as u } from "../../chunks/runtime.js";
|
|
3
3
|
import { u as m } from "../../chunks/useT9n.js";
|
|
4
4
|
import { css as p, html as c } from "lit";
|
|
5
|
-
import { LitElement as f, createEvent as
|
|
5
|
+
import { LitElement as f, createEvent as d, noShadowRoot as w, safeClassMap as b } from "@arcgis/lumina";
|
|
6
6
|
import y from "@arcgis/core/widgets/Editor.js";
|
|
7
7
|
import * as l from "@arcgis/core/core/reactiveUtils.js";
|
|
8
8
|
const _ = p`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`;
|
|
9
9
|
class g extends f {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.customizeSubmit = !1, this.enableSnapping = !1, this.showGuidingMsg = !0, this._editorLoading = !1, this._translations = m({ name: "create-related-feature", blocking: !0 }), this._addingAttachment = !1, this._isSubmitBtnClicked = !1, this.success =
|
|
11
|
+
super(...arguments), this.customizeSubmit = !1, this.enableSnapping = !1, this.showGuidingMsg = !0, this._editorLoading = !1, this._translations = m({ name: "create-related-feature", blocking: !0 }), this._addingAttachment = !1, this._isSubmitBtnClicked = !1, this.success = d(), this.fail = d(), this.isActionPending = d(), this.formReady = d();
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.properties = { customizeSubmit: 5, enableSnapping: 5, mapView: 0, selectedFeature: 0, showGuidingMsg: 5, table: 0, _editorLoading: 16, _translations: 16 };
|
|
@@ -38,7 +38,7 @@ class g extends f {
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
const e = this._editorLoading ? "" : "display-none";
|
|
41
|
-
return c`${this.showGuidingMsg && c`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>` || ""}<calcite-loader class=${b(e)} label scale=s></calcite-loader>`;
|
|
41
|
+
return c`${this.showGuidingMsg && c`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>` || ""}<calcite-loader class=${b(e)} .label=${this._translations.loading} scale=s></calcite-loader>`;
|
|
42
42
|
}
|
|
43
43
|
loaded() {
|
|
44
44
|
this.init();
|
|
@@ -78,10 +78,10 @@ class g extends f {
|
|
|
78
78
|
const r = (await e.queryFeatures({
|
|
79
79
|
objectIds: [s],
|
|
80
80
|
outFields: [e.objectIdField, a.keyField]
|
|
81
|
-
})).features[0],
|
|
81
|
+
})).features[0], n = t.templates[0], h = {
|
|
82
82
|
attributeOverrides: this.makeAttributesForRelatedFeature(r, a, i),
|
|
83
83
|
layer: t,
|
|
84
|
-
template:
|
|
84
|
+
template: n
|
|
85
85
|
};
|
|
86
86
|
await this._editor?.startCreateFeaturesWorkflowAtFeatureCreation(h), await this.hideEditorsElements(), this._editor?.viewModel?.featureFormViewModel?.addHandles(this._editor.viewModel.featureFormViewModel.on("submit", this.submitted.bind(this)));
|
|
87
87
|
}
|
|
@@ -98,7 +98,7 @@ class g extends f {
|
|
|
98
98
|
let s;
|
|
99
99
|
e.attributes.hasOwnProperty(i) ? s = e.getAttribute(i) : e.attributes.hasOwnProperty(i.toLowerCase()) ? s = e.getAttribute(i.toLowerCase()) : e.attributes.hasOwnProperty(i.toUpperCase()) && (s = e.getAttribute(i.toUpperCase()));
|
|
100
100
|
let o = a.keyField;
|
|
101
|
-
const r = this.table?.fields.find((
|
|
101
|
+
const r = this.table?.fields.find((n) => n.name.toLocaleLowerCase() === o.toLocaleLowerCase());
|
|
102
102
|
if (r)
|
|
103
103
|
return o = r.name, {
|
|
104
104
|
[o]: s
|
|
@@ -13,6 +13,7 @@ export abstract class CrowdsourceManager extends LitElement {
|
|
|
13
13
|
protected _translations: {
|
|
14
14
|
open: string;
|
|
15
15
|
close: string;
|
|
16
|
+
coverPage: string;
|
|
16
17
|
information: string;
|
|
17
18
|
expandPopup: string;
|
|
18
19
|
collapsePopup: string;
|
|
@@ -28,6 +29,7 @@ export abstract class CrowdsourceManager extends LitElement {
|
|
|
28
29
|
} & T9nMeta<{
|
|
29
30
|
open: string;
|
|
30
31
|
close: string;
|
|
32
|
+
coverPage: string;
|
|
31
33
|
information: string;
|
|
32
34
|
expandPopup: string;
|
|
33
35
|
collapsePopup: string;
|
|
@@ -128,7 +128,7 @@ class F extends M {
|
|
|
128
128
|
}
|
|
129
129
|
_getBody(e, t, i) {
|
|
130
130
|
const a = e === "HORIZONTAL" ? "" : "display-flex", s = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light", o = document.dir === "rtl" ? "left-0" : "right-0";
|
|
131
|
-
return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e, t, i)}${this._getTable(e, t, i)}</div>${this.coverPageEnabled && l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>` || ""}${this.introductionWindowEnabled && l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>` || ""}</calcite-panel>`;
|
|
131
|
+
return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e, t, i)}${this._getTable(e, t, i)}</div>${this.coverPageEnabled && l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral .label=${this._translations.coverPage} round scale=l split-child=primary width=auto></calcite-button></div>` || ""}${this.introductionWindowEnabled && l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral .label=${this._translations.information} round scale=l split-child=primary width=auto></calcite-button></div>` || ""}</calcite-panel>`;
|
|
132
132
|
}
|
|
133
133
|
infoButtonClick() {
|
|
134
134
|
this.showIntroductionWindow.emit();
|
|
@@ -151,7 +151,7 @@ class F extends M {
|
|
|
151
151
|
"--calcite-color-surface-3": this.popupHeaderHoverColor,
|
|
152
152
|
"--calcite-color-text-3": this.popupHeaderTextColor,
|
|
153
153
|
"--calcite-color-text-2": this.popupHeaderTextColor
|
|
154
|
-
})}><calcite-panel>${!this._isMobile && this._showInformationHeader || this._numSelected > 0 && !this._isMobile ? l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>` : l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`;
|
|
154
|
+
})}><calcite-panel>${!this._isMobile && this._showInformationHeader || this._numSelected > 0 && !this._isMobile ? l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>` : l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`;
|
|
155
155
|
}
|
|
156
156
|
_getCardNode() {
|
|
157
157
|
const e = this.appLayout === "mapView", t = this.appLayout === "tableView", i = this._isMobile ? "height-full" : t && this._currentMapInfos?.length > 1 ? "adjusted-height-100-51" : e || t ? "height-full" : this._numSelected > 0 && !this._isMobile ? "height-50" : this._showInformationHeader ? this._isMobile ? "height-full" : "height-50" : "adjusted-height-50_25", a = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light", s = this._layerTable.value && this._layerTable.value.selectedRelatedIds?.length > 0 ? this._relatedTableLayer : this._layer;
|
|
@@ -169,11 +169,11 @@ class F extends M {
|
|
|
169
169
|
const i = this._getDividerIcon(e, t), a = t ? this._translations.close : this._translations.open, s = "toggle-layout";
|
|
170
170
|
return l`<calcite-action .active=${this.appLayout === "splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${() => {
|
|
171
171
|
this.appLayout = "splitView";
|
|
172
|
-
}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout === "tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${() => {
|
|
172
|
+
}} .text=${this._translations.splitView}></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout === "tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${() => {
|
|
173
173
|
this.appLayout = "tableView";
|
|
174
|
-
}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout === "mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${() => {
|
|
174
|
+
}} .text=${this._translations.tableView}></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout === "mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${() => {
|
|
175
175
|
this.appLayout = "mapView";
|
|
176
|
-
}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${() => this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`;
|
|
176
|
+
}} .text=${this._translations.mapView}></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${() => this._toggleLayout()} slot=actions-end .text=${a}></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`;
|
|
177
177
|
}
|
|
178
178
|
_deleteModal() {
|
|
179
179
|
const e = (this._layerTable.value?.selectedRelatedIds?.length ?? 0) > 0 ? this._relatedTableLayer : this._layer;
|
|
@@ -42,6 +42,10 @@ export abstract class CrowdsourceReporter extends LitElement {
|
|
|
42
42
|
close: string;
|
|
43
43
|
submitBelow: string;
|
|
44
44
|
noResultsMsg: string;
|
|
45
|
+
loading: string;
|
|
46
|
+
notification: string;
|
|
47
|
+
sortOptions: string;
|
|
48
|
+
toggleListView: string;
|
|
45
49
|
} & T9nMeta<{
|
|
46
50
|
createReportButtonText: string;
|
|
47
51
|
share: string;
|
|
@@ -73,6 +77,10 @@ export abstract class CrowdsourceReporter extends LitElement {
|
|
|
73
77
|
close: string;
|
|
74
78
|
submitBelow: string;
|
|
75
79
|
noResultsMsg: string;
|
|
80
|
+
loading: string;
|
|
81
|
+
notification: string;
|
|
82
|
+
sortOptions: string;
|
|
83
|
+
toggleListView: string;
|
|
76
84
|
}>;
|
|
77
85
|
/** array: Configured AI image extraction field and prompt for the selected LayerId */
|
|
78
86
|
accessor aiImageExtraction: IImageExtraction[];
|
|
@@ -81,13 +81,13 @@ class M extends $ {
|
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
83
|
const e = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
84
|
-
return a`${this._reportSubmitted && a`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${() => {
|
|
84
|
+
return a`${this._reportSubmitted && a`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success .label=${this._translations.notification} @calciteAlertClose=${() => {
|
|
85
85
|
this._reportSubmitted = !1;
|
|
86
|
-
}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage || this._translations.submitMsg) ?? ""} ${n(this._reportSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._featureCreationFailedErrorMsg && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger label @calciteAlertClose=${() => {
|
|
86
|
+
}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage || this._translations.submitMsg) ?? ""} ${n(this._reportSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._featureCreationFailedErrorMsg && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger .label=${this._translations.notification} @calciteAlertClose=${() => {
|
|
87
87
|
this._featureCreationFailedErrorMsg = "";
|
|
88
|
-
}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>` || ""}${this._commentSubmitted && a`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${() => {
|
|
88
|
+
}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>` || ""}${this._commentSubmitted && a`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success .label=${this._translations.notification} @calciteAlertClose=${() => {
|
|
89
89
|
this._commentSubmitted = !1;
|
|
90
|
-
}} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage || this._translations.commentSubmittedMsg) ?? ""} ${n(this._commentSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._addingCommentFailed && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger label @calciteAlertClose=${() => {
|
|
90
|
+
}} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage || this._translations.commentSubmittedMsg) ?? ""} ${n(this._commentSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._addingCommentFailed && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger .label=${this._translations.notification} @calciteAlertClose=${() => {
|
|
91
91
|
this._addingCommentFailed = !1;
|
|
92
92
|
}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>` || ""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile && this.filterModal() || ""}`;
|
|
93
93
|
}
|
|
@@ -133,7 +133,7 @@ class M extends $ {
|
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
const t = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
136
|
-
return a`<calcite-panel class=${`width-full ${t}`}>${this.mapView ? a`<calcite-flow>${e?.length > 0 && e || ""}</calcite-flow>` : a`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`;
|
|
136
|
+
return a`<calcite-panel class=${`width-full ${t}`}>${this.mapView ? a`<calcite-flow>${e?.length > 0 && e || ""}</calcite-flow>` : a`<calcite-loader .label=${this._translations.loading} scale=m></calcite-loader>`}</calcite-panel>`;
|
|
137
137
|
}
|
|
138
138
|
filterModal() {
|
|
139
139
|
return (this.layerExpressions ? this.layerExpressions.filter((t) => t.id === this._selectedLayerId) : []).length > 0 && a`<calcite-dialog aria-labelledby=modal-title class="modal" .heading=${this._translations.filterLayerTitle.replace("{{title}}", this._selectedLayerName)} kind=brand @calciteDialogClose=${() => {
|
|
@@ -166,7 +166,7 @@ class M extends $ {
|
|
|
166
166
|
}
|
|
167
167
|
_toggleSort() {
|
|
168
168
|
const e = this.reportingOptions && this.reportingOptions[this._selectedLayerId] && this.reportingOptions[this._selectedLayerId].like && this.reportingOptions[this._selectedLayerId].likeField;
|
|
169
|
-
return a`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile ? "leading-start" : "bottom-start"} pointer-disabled reference-element=sort-popover ${n(this._sortPopoverNode)}><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${() => {
|
|
169
|
+
return a`<calcite-popover auto-close .label=${this._translations.sortOptions} offset-distance=0 .placement=${this.isMobile ? "leading-start" : "bottom-start"} pointer-disabled reference-element=sort-popover ${n(this._sortPopoverNode)}><calcite-list .label=${this._translations.sortOptions} selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${() => {
|
|
170
170
|
this._selectedLayer && this.sortOptionClick(this._selectedLayer.objectIdField, "desc", "newest");
|
|
171
171
|
}} .selected=${this._updatedSortOption === "newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${() => {
|
|
172
172
|
this._selectedLayer && this.sortOptionClick(this._selectedLayer.objectIdField, "asc", "oldest");
|
|
@@ -341,7 +341,7 @@ class M extends $ {
|
|
|
341
341
|
}} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${n(this._featureDetails)}></feature-details>${t && a`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText || this._translations.comment}</calcite-button>` || ""}</calcite-panel></calcite-flow-item>`;
|
|
342
342
|
}
|
|
343
343
|
getFeaturesPagination() {
|
|
344
|
-
return a`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=both id=solutions-back @click=${() => this._featureDetails.value && void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${() => this._featureDetails.value && void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-flip-rtl=both icon-start=chevron-right id=solutions-next @click=${() => this._featureDetails.value && void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`;
|
|
344
|
+
return a`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=both id=solutions-back .label=${this._translations.back} @click=${() => this._featureDetails.value && void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent .label=${this._translations.toggleListView} @click=${() => this._featureDetails.value && void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-flip-rtl=both icon-start=chevron-right id=solutions-next .label=${this._translations.next} @click=${() => this._featureDetails.value && void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`;
|
|
345
345
|
}
|
|
346
346
|
getCommentDetailsFlowItem() {
|
|
347
347
|
return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._relatedTable?.title || ""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "comment-details"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView} @selectionChanged=${() => {
|
|
@@ -5,7 +5,7 @@ import { E as i, a as c, c as p } from "../../chunks/pciUtils.js";
|
|
|
5
5
|
import { createRef as s, ref as n } from "lit-html/directives/ref.js";
|
|
6
6
|
import { LitElement as m, createEvent as y } from "@arcgis/lumina";
|
|
7
7
|
const d = o`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}`;
|
|
8
|
-
class
|
|
8
|
+
class v extends m {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments), this._densityElement = s(), this._typeElement = s(), this._severityElement = s(), this._types = Object.keys(i).filter((e) => !Number.isNaN(Number(i[e]))), this.deductValueComplete = y();
|
|
11
11
|
}
|
|
@@ -19,10 +19,10 @@ class b extends m {
|
|
|
19
19
|
return l`<calcite-input max=100 min=0 type=number ${n(this._densityElement)}></calcite-input>`;
|
|
20
20
|
}
|
|
21
21
|
_getTypeInput() {
|
|
22
|
-
return l`<calcite-select label ${n(this._typeElement)}>${this._types.map((e, t) => l`<calcite-option .value=${i[e].toString()}>${`${e} (${t + 1})`}</calcite-option>`)}</calcite-select>`;
|
|
22
|
+
return l`<calcite-select label=Type ${n(this._typeElement)}>${this._types.map((e, t) => l`<calcite-option .value=${i[e].toString()}>${`${e} (${t + 1})`}</calcite-option>`)}</calcite-select>`;
|
|
23
23
|
}
|
|
24
24
|
_getSeverityInput() {
|
|
25
|
-
return l`<calcite-select label ${n(this._severityElement)}><calcite-option .value=${c.H}>\r\n High</calcite-option><calcite-option .value=${c.M}>\r\n Medium</calcite-option><calcite-option .value=${c.L}>\r\n Low</calcite-option></calcite-select>`;
|
|
25
|
+
return l`<calcite-select label=Severity ${n(this._severityElement)}><calcite-option .value=${c.H}>\r\n High</calcite-option><calcite-option .value=${c.M}>\r\n Medium</calcite-option><calcite-option .value=${c.L}>\r\n Low</calcite-option></calcite-select>`;
|
|
26
26
|
}
|
|
27
27
|
_getCalculateInput() {
|
|
28
28
|
const e = this._typeElement.value && Number.parseFloat(this._typeElement.value.value), t = this._severityElement.value && this._severityElement.value.value, a = this._densityElement.value && Number.parseFloat(this._densityElement.value.value);
|
|
@@ -36,7 +36,7 @@ class b extends m {
|
|
|
36
36
|
alert("Type, severity, and a density number are required");
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
u("deduct-calculator",
|
|
39
|
+
u("deduct-calculator", v);
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
v as DeductCalculator
|
|
42
42
|
};
|
|
@@ -24,7 +24,7 @@ class r extends d {
|
|
|
24
24
|
this._setDeleteEnabled();
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return e`${this.buttonType === "button" ? e`<calcite-button appearance=outline .disabled=${!this._deleteEndabled} id=solutions-delete kind=danger @click=${() => this._delete()} width=full>${this.showDeleteCount ? this._translations.deleteCount?.replace("{{n}}", this.ids?.length.toString()) : this._translations.delete}</calcite-button>` : e`<calcite-action appearance=solid .disabled=${!this._deleteEndabled} id=${this.icon ?? n} @click=${() => this._delete()} scale=s .text=${this._translations.delete}><calcite-button appearance=transparent .iconStart=${this.icon} kind=danger>${this._translations.delete}</calcite-button></calcite-action>`}${this._deleteMessage()}<calcite-tooltip placement=bottom .referenceElement=${this.buttonType === "button" ? "solutions-delete" : this.icon}><span>${this._translations.delete}</span></calcite-tooltip>`;
|
|
27
|
+
return e`${this.buttonType === "button" ? e`<calcite-button appearance=outline .disabled=${!this._deleteEndabled} id=solutions-delete kind=danger @click=${() => this._delete()} width=full>${this.showDeleteCount ? this._translations.deleteCount?.replace("{{n}}", this.ids?.length.toString()) : this._translations.delete}</calcite-button>` : e`<calcite-action appearance=solid .disabled=${!this._deleteEndabled} id=${this.icon ?? n} @click=${() => this._delete()} scale=s .text=${this._translations.delete}><calcite-button appearance=transparent aria-hidden=true .iconStart=${this.icon} kind=danger>${this._translations.delete}</calcite-button></calcite-action>`}${this._deleteMessage()}<calcite-tooltip placement=bottom .referenceElement=${this.buttonType === "button" ? "solutions-delete" : this.icon}><span>${this._translations.delete}</span></calcite-tooltip>`;
|
|
28
28
|
}
|
|
29
29
|
loaded() {
|
|
30
30
|
this._setDeleteEnabled();
|
|
@@ -12,7 +12,13 @@ export abstract class EditCard extends LitElement {
|
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
protected _translations: {
|
|
15
|
+
protected _translations: {
|
|
16
|
+
enableEditing: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
} & T9nMeta<{
|
|
19
|
+
enableEditing: string;
|
|
20
|
+
loading: string;
|
|
21
|
+
}>;
|
|
16
22
|
/**
|
|
17
23
|
* When true allow multiple editing
|
|
18
24
|
*
|
|
@@ -44,7 +44,7 @@ class y extends _ {
|
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
const t = this.graphics?.length > 0 && this.graphics[0] ? !this.graphics[0].layer.editingEnabled : !0, e = this._editorLoading ? "display-none" : "position-absolute", a = this._editorLoading ? "" : "display-none";
|
|
47
|
-
return r`<div class="position-absolute">${t ? r`<calcite-notice kind=warning open slot=content-top width=full><div slot=message>${this._translations.enableEditing}</div></calcite-notice>` : void 0}<div class="position-absolute"><div class=${l(e)} id=feature-form ${g(this._editContainer)}></div><calcite-loader class=${l(a)} label scale=s></calcite-loader></div></div>`;
|
|
47
|
+
return r`<div class="position-absolute">${t ? r`<calcite-notice kind=warning open slot=content-top width=full><div slot=message>${this._translations.enableEditing}</div></calcite-notice>` : void 0}<div class="position-absolute"><div class=${l(e)} id=feature-form ${g(this._editContainer)}></div><calcite-loader class=${l(a)} .label=${this._translations.loading} scale=s></calcite-loader></div></div>`;
|
|
48
48
|
}
|
|
49
49
|
async _initEditorWidget() {
|
|
50
50
|
if (this.mapView && this.graphics && this.graphics.length > 0 && this.graphics[0]) {
|
|
@@ -45,9 +45,9 @@ class I extends g {
|
|
|
45
45
|
const i = this._relatedFeaturesOIDs?.length > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : "1=0";
|
|
46
46
|
return o`<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this.graphics} .mapView=${this.mapView} @selectionChanged=${(e) => {
|
|
47
47
|
this.featureSelectionChange.emit(e.detail);
|
|
48
|
-
}} position=relative ${k(this._infoCard)}></info-card>${(this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) && o`<div class="buttons-container">${this._commentsAvailable && o`<calcite-button appearance=transparent icon-end=speech-bubble kind=neutral @click=${() => {
|
|
48
|
+
}} position=relative ${k(this._infoCard)}></info-card>${(this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) && o`<div class="buttons-container">${this._commentsAvailable && o`<calcite-button appearance=transparent aria-label=${`${this._relatedFeaturesOIDs.length} comments`} icon-end=speech-bubble kind=neutral @click=${() => {
|
|
49
49
|
this.addComment.emit();
|
|
50
|
-
}} scale=m>${this._relatedFeaturesOIDs.length}</calcite-button>` || ""}${this._likeFieldAvailable && o`<calcite-button appearance=transparent icon-end=thumbs-up .kind=${this._isLikeBtnClicked ? "brand" : "neutral"} .loading=${this._updating} @click=${this.onLikeButtonClick} scale=m>${this._likeCount ?? this._selectedGraphic?.attributes[this._likeField] ?? 0}</calcite-button>` || ""}${this._dislikeFieldAvailable && o`<calcite-button appearance=transparent icon-end=thumbs-down .kind=${this._isDislikeBtnClicked ? "brand" : "neutral"} .loading=${this._updating} @click=${this.onDislikeButtonClick} scale=m>${this._disLikeCount ?? this._selectedGraphic?.attributes[this._dislikeField] ?? 0}</calcite-button>` || ""}</div>` || ""}${this.relatedTableId && this._commentsAvailable && o`<feature-list class="height-full" .mapView=${this.mapView} @featureClick=${() => {
|
|
50
|
+
}} scale=m>${this._relatedFeaturesOIDs.length}</calcite-button>` || ""}${this._likeFieldAvailable && o`<calcite-button appearance=transparent aria-label=${`${this._likeCount ?? this._selectedGraphic?.attributes[this._likeField] ?? 0} likes`} icon-end=thumbs-up .kind=${this._isLikeBtnClicked ? "brand" : "neutral"} .loading=${this._updating} @click=${this.onLikeButtonClick} scale=m>${this._likeCount ?? this._selectedGraphic?.attributes[this._likeField] ?? 0}</calcite-button>` || ""}${this._dislikeFieldAvailable && o`<calcite-button appearance=transparent aria-label=${`${this._disLikeCount ?? this._selectedGraphic?.attributes[this._dislikeField] ?? 0} dislikes`} icon-end=thumbs-down .kind=${this._isDislikeBtnClicked ? "brand" : "neutral"} .loading=${this._updating} @click=${this.onDislikeButtonClick} scale=m>${this._disLikeCount ?? this._selectedGraphic?.attributes[this._dislikeField] ?? 0}</calcite-button>` || ""}</div>` || ""}${this.relatedTableId && this._commentsAvailable && o`<feature-list class="height-full" .mapView=${this.mapView} @featureClick=${() => {
|
|
51
51
|
this.commentClick.emit();
|
|
52
52
|
}} @featureSelect=${(e) => {
|
|
53
53
|
this.commentSelect.emit(e.detail);
|
|
@@ -232,7 +232,7 @@ class T extends F {
|
|
|
232
232
|
this.onFeatureHover(t);
|
|
233
233
|
}} @calciteListItemSelect=${(h) => {
|
|
234
234
|
this.featureClicked(h, t);
|
|
235
|
-
}} .value=${a}>${this.showUserImageInList && l`<calcite-avatar class=profile-img .fullName=${i?.fullName} scale=m slot=content-start .thumbnail=${i?.userProfileUrl} .userId=${i?.id} .username=${i?.fullName ? i.username : void 0}></calcite-avatar>` || ""}${this.showFeatureSymbol && s && l`<div class=feature-symbol slot=content-start ${d((h) => h && h.replaceChildren(s))}></div>` || ""}<div class=${`popup-title ${n}`} slot=content-start style=${S({ maxWidth: this.textSize === "large" ? "none" : `${p}px` })}>${e}</div>${this._likeFieldAvailable && l`<div class=like-container id=${a.concat("like") ?? v} slot=content-end><span>${this._abbreviatedLikeCount}</span><calcite-icon icon=thumbs-up scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${a.concat("like")}>${r}</calcite-tooltip></div>` || ""}<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`;
|
|
235
|
+
}} .value=${a}>${this.showUserImageInList && l`<calcite-avatar class=profile-img .fullName=${i?.fullName} scale=m slot=content-start .thumbnail=${i?.userProfileUrl} .userId=${i?.id} .username=${i?.fullName ? i.username : void 0}></calcite-avatar>` || ""}${this.showFeatureSymbol && s && l`<div class=feature-symbol slot=content-start ${d((h) => h && h.replaceChildren(s))}></div>` || ""}<div class=${`popup-title ${n}`} slot=content-start style=${S({ maxWidth: this.textSize === "large" ? "none" : `${p}px` })}>${e}</div>${this._likeFieldAvailable && l`<div class=like-container id=${a.concat("like") ?? v} slot=content-end><span>${this._abbreviatedLikeCount}</span><calcite-icon aria-hidden=true icon=thumbs-up scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${a.concat("like")}>${r}</calcite-tooltip></div>` || ""}<calcite-icon aria-hidden=true flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`;
|
|
236
236
|
} else
|
|
237
237
|
return;
|
|
238
238
|
}
|