@esri/solutions-components 1.2.0-next.195 → 1.2.0-next.197
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/DOBY5ML6.js +2 -0
- package/dist/cdn/{BXWJRGO4.js → G47I3ZBF.js} +1 -1
- package/dist/cdn/{4VPYQV6U.js → IEUH7LNY.js} +1 -1
- package/dist/cdn/MACEBU5L.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/crowdsource-reporter/customElement.js +10 -10
- package/dist/components/map-draw-tools/customElement.js +13 -12
- package/dist/components/public-notification/customElement.js +7 -5
- package/dist/components/solutions-deploy-app/customElement.js +16 -12
- 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 +6 -6
- package/package.json +1 -1
- package/dist/cdn/6OWU7VAP.js +0 -2
- package/dist/cdn/FMCJ3OZC.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as y } from "../../chunks/runtime.js";
|
|
3
3
|
import { g as c, a as u, b as f, c as m, h as b, d as L } from "../../chunks/mapViewUtils.js";
|
|
4
4
|
import { a as F } from "../../chunks/queryUtils.js";
|
|
5
5
|
import { u as I } from "../../chunks/useT9n.js";
|
|
@@ -15,10 +15,10 @@ import k from "@arcgis/core/rest/support/IdentifyParameters";
|
|
|
15
15
|
const O = v`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.height-full{height:100%!important}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}.overflow-auto{overflow:auto}}`;
|
|
16
16
|
class M extends $ {
|
|
17
17
|
constructor() {
|
|
18
|
-
super(), this.center = "", this.commentButtonText = "", this.commentSubmittedMessage = "", this.defaultWebmap = "", this.description = "", this.enableAnonymousAccess = !1, this.enableAnonymousComments = !1, this.enableComments = !1, this.enableHome = !0, this.enableLogin = !1, this.enableNewReports = !1, this.enableSearch = !0, this.enableSnapping = !1, this.enableZoom = !0, this.isMobile = !1, this.layerExpressions = [], this.layerId = "", this.level = "", this.loginTitle = "", this.mapInfos = [], this.objectId = "", this.reportButtonText = "", this.reportsHeader = "", this.reportSubmittedMessage = "", this.showComments = !1, this.showUserImageInCommentsList = !1, this.showFeatureSymbol = !1, this.showMyReportsOnly = !1, this.submitNewReportsMessage = "", this.theme = "light", this.floorLevel = "", this.showFullCommentTitle = !0, this.filterByMapExtent = !1, this.sortOption = "newest", this.reportingArea = !1, this.reportingAreaLayer = "", this.reportingAreaMessage = "", this.enablePhotoLocation = !1, this.aiImageExtraction = [], this._featureCreationFailedErrorMsg = "", this._filterActive = !1, this._flowItems = [], this._hasValidLayers = !1, this._reportSubmitted = !1, this._selectedLayerName = "", this._showSubmitCancelButton = !1, this._showLoadingIndicator = !1, this._sidePanelCollapsed = !1, this._translations = I({ name: "crowdsource-reporter", blocking: !0 }), this._updatedProgressBarStatus = 25, this._updatedSortOption = "newest", this._commentSubmitted = !1, this._addingCommentFailed = !1, this._filterOpen = !1, this._showNextButton = !1, this._submitNextButtonDisabled = !1, this._createFeature = d(), this._currentFeatureId = "", this._editableLayerIds = [], this._featureDetails = d(), this._featureList = d(), this._selectedRelatedFeature = [], this._layerList = d(), this._createRelatedFeature = d(), this._layers = [], this._mapImageryLayersId = [], this._selectedFeature = [], this._selectedFeatureIndex = 0, this._selectedLayerId = "", this._shareNode = d(), this._urlParamsLoaded = !1, this._validLayers = [], this._nonVisibleValidLayers = [], this._showFullPanel = !1, this._floorExpression = "", this._formElements = [], this._prevSelectedLayerId = "", this._t9nLayerExpressions = [], this._reportSubmittedAlertNode = d(), this._commentSubmittedAlertNode = d(), this._sortPopoverNode = d(), this.togglePanel = C(), S(window);
|
|
18
|
+
super(), this.center = "", this.commentButtonText = "", this.commentSubmittedMessage = "", this.defaultWebmap = "", this.description = "", this.enableAnonymousAccess = !1, this.enableAnonymousComments = !1, this.enableComments = !1, this.enableHome = !0, this.enableLogin = !1, this.enableNewReports = !1, this.enableSearch = !0, this.enableSnapping = !1, this.enableZoom = !0, this.isMobile = !1, this.layerExpressions = [], this.layerId = "", this.level = "", this.loginTitle = "", this.mapInfos = [], this.objectId = "", this.reportButtonText = "", this.reportsHeader = "", this.reportSubmittedMessage = "", this.showComments = !1, this.showUserImageInCommentsList = !1, this.showFeatureSymbol = !1, this.showMyReportsOnly = !1, this.submitNewReportsMessage = "", this.theme = "light", this.floorLevel = "", this.showFullCommentTitle = !0, this.filterByMapExtent = !1, this.sortOption = "newest", this.reportingArea = !1, this.reportingAreaLayer = "", this.reportingAreaMessage = "", this.enablePhotoLocation = !1, this.aiImageExtraction = [], this._featureCreationFailedErrorMsg = "", this._filterActive = !1, this._flowItems = [], this._hasValidLayers = !1, this._reportSubmitted = !1, this._selectedLayerName = "", this._showSubmitCancelButton = !1, this._showLoadingIndicator = !1, this._sidePanelCollapsed = !1, this._translations = I({ name: "crowdsource-reporter", blocking: !0 }), this._updatedProgressBarStatus = 25, this._updatedSortOption = "newest", this._commentSubmitted = !1, this._addingCommentFailed = !1, this._filterOpen = !1, this._showNextButton = !1, this._submitNextButtonDisabled = !1, this._showFilterIcon = !1, this._createFeature = d(), this._currentFeatureId = "", this._editableLayerIds = [], this._featureDetails = d(), this._featureList = d(), this._selectedRelatedFeature = [], this._layerList = d(), this._createRelatedFeature = d(), this._layers = [], this._mapImageryLayersId = [], this._selectedFeature = [], this._selectedFeatureIndex = 0, this._selectedLayerId = "", this._shareNode = d(), this._urlParamsLoaded = !1, this._validLayers = [], this._nonVisibleValidLayers = [], this._showFullPanel = !1, this._floorExpression = "", this._formElements = [], this._prevSelectedLayerId = "", this._t9nLayerExpressions = [], this._reportSubmittedAlertNode = d(), this._commentSubmittedAlertNode = d(), this._sortPopoverNode = d(), this.togglePanel = C(), S(window);
|
|
19
19
|
}
|
|
20
20
|
static {
|
|
21
|
-
this.properties = { center: 1, commentButtonText: 1, commentSubmittedMessage: 1, defaultWebmap: 1, description: 1, enableAnonymousAccess: 5, enableAnonymousComments: 5, enableComments: 5, enableHome: 5, enableLogin: 5, enableNewReports: 5, enableSearch: 5, enableSnapping: 5, enableZoom: 5, isMobile: 5, layerExpressions: 0, layerId: 1, level: 1, loginTitle: 1, mapInfos: 0, mapView: 0, objectId: 1, reportButtonText: 1, reportingOptions: 0, reportsHeader: 1, reportSubmittedMessage: 1, searchConfiguration: 0, showComments: 5, showUserImageInCommentsList: 5, showFeatureSymbol: 5, showMyReportsOnly: 5, submitNewReportsMessage: 1, theme: 1, zoomToScale: 9, floorLevel: 1, showFullCommentTitle: 5, filterByMapExtent: 5, sortOption: 1, reportingArea: 5, reportingAreaLayer: 1, reportingAreaMessage: 1, enablePhotoLocation: 5, aiImageExtraction: 0, _featureCreationFailedErrorMsg: 16, _filterActive: 16, _flowItems: 16, _hasValidLayers: 16, _mapInfo: 16, _reportSubmitted: 16, _selectedLayerName: 16, _showSubmitCancelButton: 16, _showLoadingIndicator: 16, _sidePanelCollapsed: 16, _translations: 16, _updatedProgressBarStatus: 16, _updatedSorting: 16, _updatedSortOption: 16, _commentSubmitted: 16, _addingCommentFailed: 16, _filterOpen: 16, _showNextButton: 16, _submitNextButtonDisabled: 16 };
|
|
21
|
+
this.properties = { center: 1, commentButtonText: 1, commentSubmittedMessage: 1, defaultWebmap: 1, description: 1, enableAnonymousAccess: 5, enableAnonymousComments: 5, enableComments: 5, enableHome: 5, enableLogin: 5, enableNewReports: 5, enableSearch: 5, enableSnapping: 5, enableZoom: 5, isMobile: 5, layerExpressions: 0, layerId: 1, level: 1, loginTitle: 1, mapInfos: 0, mapView: 0, objectId: 1, reportButtonText: 1, reportingOptions: 0, reportsHeader: 1, reportSubmittedMessage: 1, searchConfiguration: 0, showComments: 5, showUserImageInCommentsList: 5, showFeatureSymbol: 5, showMyReportsOnly: 5, submitNewReportsMessage: 1, theme: 1, zoomToScale: 9, floorLevel: 1, showFullCommentTitle: 5, filterByMapExtent: 5, sortOption: 1, reportingArea: 5, reportingAreaLayer: 1, reportingAreaMessage: 1, enablePhotoLocation: 5, aiImageExtraction: 0, _featureCreationFailedErrorMsg: 16, _filterActive: 16, _flowItems: 16, _hasValidLayers: 16, _mapInfo: 16, _reportSubmitted: 16, _selectedLayerName: 16, _showSubmitCancelButton: 16, _showLoadingIndicator: 16, _sidePanelCollapsed: 16, _translations: 16, _updatedProgressBarStatus: 16, _updatedSorting: 16, _updatedSortOption: 16, _commentSubmitted: 16, _addingCommentFailed: 16, _filterOpen: 16, _showNextButton: 16, _submitNextButtonDisabled: 16, _showFilterIcon: 16 };
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
24
|
this.styles = O;
|
|
@@ -67,7 +67,7 @@ class M extends $ {
|
|
|
67
67
|
await this._filterList.handleUpdatingT9nData(this._t9nLayerExpressions);
|
|
68
68
|
else if (this._currentLayerExpressions != null) {
|
|
69
69
|
const t = structuredClone(this._currentLayerExpressions);
|
|
70
|
-
this.handleLayerExpressionsT9n(t, this._t9nLayerExpressions), this._currentLayerExpressions = t;
|
|
70
|
+
this.handleLayerExpressionsT9n(t, this._t9nLayerExpressions), this._currentLayerExpressions = t, this._showFilterIcon = this._currentLayerExpressions?.length > 0;
|
|
71
71
|
}
|
|
72
72
|
return Promise.resolve();
|
|
73
73
|
}
|
|
@@ -156,7 +156,7 @@ class M extends $ {
|
|
|
156
156
|
this._filterOpen = !this._filterOpen;
|
|
157
157
|
}
|
|
158
158
|
async _closeFilter() {
|
|
159
|
-
this._filterOpen = !1, this._filterList != null && (this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions());
|
|
159
|
+
this._filterOpen = !1, this._filterList != null && (this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions(), this._showFilterIcon = this._currentLayerExpressions?.length > 0);
|
|
160
160
|
}
|
|
161
161
|
async sortOptionClick(e, t, i) {
|
|
162
162
|
this._updatedSorting = {
|
|
@@ -274,7 +274,7 @@ class M extends $ {
|
|
|
274
274
|
}, this._updatedSortOption = !i && (e === "highestVoted" || e === "lowestVoted") ? "newest" : e;
|
|
275
275
|
}
|
|
276
276
|
async backFromFilterPanel() {
|
|
277
|
-
this._filterList != null && (this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions()), this._featureList.value && await this._featureList.value.refresh(), this.backFromSelectedPanel();
|
|
277
|
+
this._filterList != null && (this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions(), this._showFilterIcon = this._currentLayerExpressions?.length > 0), this._featureList.value && await this._featureList.value.refresh(), this.backFromSelectedPanel();
|
|
278
278
|
}
|
|
279
279
|
backFromSelectedPanel() {
|
|
280
280
|
this._updatedProgressBarStatus = 25;
|
|
@@ -314,7 +314,7 @@ class M extends $ {
|
|
|
314
314
|
this._selectedRelatedFeature = [e.detail], this._flowItems = [...this._flowItems, "comment-details"];
|
|
315
315
|
}
|
|
316
316
|
getFeatureListFlowItem(e, t) {
|
|
317
|
-
const i = this._getLayersConfig(this._selectedLayerId)?.reporting && this._layerItemsHash && this._layerItemsHash[this._selectedLayerId].supportsAdd, s = this.
|
|
317
|
+
const i = this._getLayersConfig(this._selectedLayerId)?.reporting && this._layerItemsHash && this._layerItemsHash[this._selectedLayerId].supportsAdd, s = this._showFilterIcon;
|
|
318
318
|
return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile && this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-list"}>${this._toggleSort()}<calcite-action appearance=solid icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort ?? _}></calcite-action>${s && a`<calcite-action appearance=solid icon=filter .indicator=${this._filterActive} @click=${() => {
|
|
319
319
|
this.isMobile ? this._toggleFilter() : this._flowItems = [...this._flowItems, "filter-panel"];
|
|
320
320
|
}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter ?? _}></calcite-action>` || ""}${this.isMobile && this.getActionToExpandCollapsePanel() || ""}${this.enableNewReports && i && a`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText}</calcite-button>` || ""}<calcite-panel>${a`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${() => {
|
|
@@ -450,7 +450,7 @@ class M extends $ {
|
|
|
450
450
|
}
|
|
451
451
|
const l = [];
|
|
452
452
|
return s.forEach((r) => {
|
|
453
|
-
const h = r.layerId, o = i?.sublayers?.items.find((
|
|
453
|
+
const h = r.layerId, o = i?.sublayers?.items.find((w) => w.id === h), p = o?.popupTemplate;
|
|
454
454
|
o?.popupEnabled && p && (r.feature.popupTemplate = p, l.push(r.feature));
|
|
455
455
|
}), l;
|
|
456
456
|
}
|
|
@@ -534,7 +534,7 @@ class M extends $ {
|
|
|
534
534
|
async handleSelectedLayersFilter() {
|
|
535
535
|
if (this._selectedLayer) {
|
|
536
536
|
const e = this.layerExpressions ? structuredClone(this.layerExpressions.filter((t) => t.id === this._selectedLayerId)) : [];
|
|
537
|
-
this._t9nLayerExpressions != null && this.handleLayerExpressionsT9n(e, this._t9nLayerExpressions), this._currentLayerExpressions = e, this.setActiveDefinitionExpressions();
|
|
537
|
+
this._t9nLayerExpressions != null && this.handleLayerExpressionsT9n(e, this._t9nLayerExpressions), this._currentLayerExpressions = e, this._showFilterIcon = this._currentLayerExpressions?.length > 0, this.setActiveDefinitionExpressions();
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
async handlePrevLayersFilter() {
|
|
@@ -588,7 +588,7 @@ class M extends $ {
|
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
|
|
591
|
+
y("crowdsource-reporter", M);
|
|
592
592
|
export {
|
|
593
593
|
M as CrowdsourceReporter
|
|
594
594
|
};
|
|
@@ -5,15 +5,15 @@ import { css as l, html as n } from "lit";
|
|
|
5
5
|
import { createRef as d, ref as p } from "lit-html/directives/ref.js";
|
|
6
6
|
import { LitElement as g, createEvent as o, noShadowRoot as m, safeClassMap as h } from "@arcgis/lumina";
|
|
7
7
|
import { useContextConsumer as f } from "@arcgis/lumina/context";
|
|
8
|
-
import { p as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { p as y } from "../../chunks/publicNotificationContext.js";
|
|
9
|
+
import _ from "@arcgis/core/layers/GraphicsLayer";
|
|
10
|
+
import k from "@arcgis/core/widgets/Sketch/SketchViewModel";
|
|
11
11
|
import w from "@arcgis/core/widgets/Sketch";
|
|
12
|
-
const
|
|
13
|
-
class
|
|
12
|
+
const u = l`@layer{:host{display:block}.border{outline:1px solid var(--calcite-color-border-input)}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=rtl]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:Avenir Next,Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v: 12px;--esri-widget-padding-h: 15px;--esri-widget-padding: var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0;justify-content:flex-start!important}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}.esri-responsive-toolbar__bar--horizontal{--calcite-action-group-border-color: var(--calcite-color-border-3) !important}}`;
|
|
13
|
+
class b extends g {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.active = !1, this.drawMode = "SKETCH", this.editGraphicsEnabled = !0, this.graphics = [], this.redoEnabled = !1, this.undoEnabled = !1, this._translations = c({ name: "map-draw-tools", blocking: !0 }), this._pnContextConsumer = f({
|
|
16
|
-
context:
|
|
16
|
+
context: y,
|
|
17
17
|
subscribe: !0
|
|
18
18
|
}), this._sketchElement = d(), this.selectionLoadingChange = o(), this.sketchGraphicsChange = o(), this.drawUndo = o(), this.drawRedo = o();
|
|
19
19
|
}
|
|
@@ -21,7 +21,7 @@ class u extends g {
|
|
|
21
21
|
this.properties = { active: 5, drawMode: 1, editGraphicsEnabled: 5, graphics: 0, mapView: 0, pointSymbol: 0, polylineSymbol: 0, polygonSymbol: 0, redoEnabled: 5, undoEnabled: 5, _translations: 16, _selectionMode: 16 };
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
|
-
this.styles =
|
|
24
|
+
this.styles = u;
|
|
25
25
|
}
|
|
26
26
|
static {
|
|
27
27
|
this.shadowRootOptions = m;
|
|
@@ -39,7 +39,7 @@ class u extends g {
|
|
|
39
39
|
this._clearSketch();
|
|
40
40
|
}
|
|
41
41
|
async updateGraphics() {
|
|
42
|
-
this.
|
|
42
|
+
this._updateGraphics();
|
|
43
43
|
}
|
|
44
44
|
loaded() {
|
|
45
45
|
this._init();
|
|
@@ -58,7 +58,7 @@ class u extends g {
|
|
|
58
58
|
const e = this._pnContextConsumer.value, i = this._translations.sketchLayer;
|
|
59
59
|
if (this.mapView) {
|
|
60
60
|
const s = this.mapView.map.layers.findIndex((t) => t.title === i);
|
|
61
|
-
s > -1 ? this._sketchGraphicsLayer = this.mapView.map.layers.getItemAt(s) : (this._sketchGraphicsLayer = new
|
|
61
|
+
s > -1 ? this._sketchGraphicsLayer = this.mapView.map.layers.getItemAt(s) : (this._sketchGraphicsLayer = new _({ title: i, listMode: "hide" }), this._sketchGraphicsLayer && (e.managedLayers[i] = "sketch", this.mapView.map.layers.add(this._sketchGraphicsLayer))), this.graphics && this.graphics.length > 0 && this._sketchGraphicsLayer && this._sketchGraphicsLayer.addMany(this.graphics);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
_initSketch() {
|
|
@@ -81,6 +81,7 @@ class u extends g {
|
|
|
81
81
|
container: this._sketchElement.value,
|
|
82
82
|
creationMode: "single",
|
|
83
83
|
toolbarKind: "docked",
|
|
84
|
+
useLegacyCreateTools: !0,
|
|
84
85
|
visibleElements: {
|
|
85
86
|
duplicateButton: !1,
|
|
86
87
|
selectionTools: {
|
|
@@ -94,7 +95,7 @@ class u extends g {
|
|
|
94
95
|
settingsMenu: this.drawMode === "SKETCH"
|
|
95
96
|
}
|
|
96
97
|
}), this._sketchWidget && this._sketchWidget.viewModel) {
|
|
97
|
-
this._sketchViewModel = new
|
|
98
|
+
this._sketchViewModel = new k({
|
|
98
99
|
...e
|
|
99
100
|
}), this.polylineSymbol && (this._sketchWidget.viewModel.polylineSymbol = this.polylineSymbol), this.pointSymbol && (this._sketchWidget.viewModel.pointSymbol = this.pointSymbol), this.polygonSymbol && (this._sketchWidget.viewModel.polygonSymbol = this.polygonSymbol), this._sketchWidget?.when(async () => {
|
|
100
101
|
await new Promise((a) => setTimeout(a, 50)), this._sketchElement.value?.getElementsByTagName("calcite-popover")[0]?.setAttribute("placement", "auto");
|
|
@@ -162,7 +163,7 @@ class u extends g {
|
|
|
162
163
|
t && e.forEach((a) => a.symbol = t);
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
|
-
r("map-draw-tools",
|
|
166
|
+
r("map-draw-tools", b);
|
|
166
167
|
export {
|
|
167
|
-
|
|
168
|
+
b as MapDrawTools
|
|
168
169
|
};
|
|
@@ -272,7 +272,7 @@ class H extends I {
|
|
|
272
272
|
this._titleValue = "", this._segmentType = e.target.value;
|
|
273
273
|
}
|
|
274
274
|
_getSegmentedControls() {
|
|
275
|
-
return this.customExport ? this._getStandardAndCustomSegmentedControl() : this._getPDFAndCSVSementedControl();
|
|
275
|
+
return this.customExport && this.customExportURL ? this._getStandardAndCustomSegmentedControl() : this._getPDFAndCSVSementedControl();
|
|
276
276
|
}
|
|
277
277
|
_getPDFAndCSVSementedControl() {
|
|
278
278
|
return l`<calcite-segmented-control class="w-100 calcite-segments" @calciteSegmentedControlChange=${this._exportTypeChange} width=full><calcite-segmented-control-item .checked=${this._exportType === "PDF"} class="w-50 end-border" value=PDF><span class="font-weight-500">${this._translations.pdf}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${this._exportType === "CSV"} class="w-50" value=CSV><span class="font-weight-500">${this._translations.csv}</span></calcite-segmented-control-item></calcite-segmented-control>`;
|
|
@@ -287,9 +287,11 @@ class H extends I {
|
|
|
287
287
|
return l`<div class="padding-1 padding-bottom-0"><calcite-label layout=inline alignment=start scale=m><calcite-radio-button .checked=${this._exportType === "PDF"} scale=m value=PDF @calciteRadioButtonChange=${this._exportTypeChange}></calcite-radio-button>${this._translations.pdf}</calcite-label><div class=indent-group>${this._getExportOptions()}</div><calcite-label layout=inline class="margin-top-1" alignment=start scale=m><calcite-radio-button .checked=${this._exportType === "CSV"} scale=m value=CSV @calciteRadioButtonChange=${this._exportTypeChange}></calcite-radio-button>${this._translations.csv}</calcite-label></div>`;
|
|
288
288
|
}
|
|
289
289
|
_getCustomExportOptions() {
|
|
290
|
-
const e = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "", t =
|
|
291
|
-
return
|
|
292
|
-
|
|
290
|
+
const e = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "", t = [], i = this._getSelectionIdsAndViews(this._selectionSets, !0);
|
|
291
|
+
return Object.keys(i).forEach((s) => {
|
|
292
|
+
i[s].ids.length && t.push(s);
|
|
293
|
+
}), l`<div id=custom-export-div class="padding-top-sides-1"><p class="instructional-text">${this._translations.formattingTip}</p>${t.length > 1 && l`<p class="instructional-text margin-top-0-5">${this._translations.selectMatchingInputLayersLabel}</p>` || ""}<div class=${"margin-top-1"}>${this._getLabel(this._translations.title, !0, "", "none")}<calcite-input-text class="padding-inline-start-0 padding-top-1-2" @calciteInputTextInput=${() => this._changeTitle()} .placeholder=${this._translations.titlePlaceholder} .value=${e} ${h(this._titleElement)}></calcite-input-text></div><div class=${"margin-top-1"}>${this._getLabel(this._translations.layoutTemplate, !0, "", "none")}</div><calcite-select class="padding-inline-start-0 padding-top-1-2" label ${h(this.layoutTemplateSelectRef)}>${this._layoutTemplates.map((s, a) => l`<calcite-option .selected=${a === 0} .value=${s}>${s}</calcite-option>`)}</calcite-select>${this._reportTemplates?.length && l`<div class=${"margin-top-1"}>${this._getLabel(this._translations.reportTemplate, !0, "", "none")}</div><calcite-select class="padding-inline-start-0 padding-top-1-2" label ${h(this.reportTemplateSelectRef)}>${this._reportTemplates.map((s, a) => l`<calcite-option .selected=${a === 0} .value=${s}>${s}</calcite-option>`)}</calcite-select><div class=${"padding-top-sides-1 padding-inline-start-0 display-flex margin-bottom-0-5"}><calcite-label class="label-margin-0" layout=inline>${this._translations.reportLayer}</calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase() !== "he"} icon=information id=filter-message-info scale=s></calcite-icon><calcite-popover closable label overlay-positioning=fixed reference-element=filter-message-info><span class="tooltip-message">${this._translations.sourceLayerWarning}</span></calcite-popover></div><map-layer-picker .disabled=${t.length <= 1} .enabledLayerIds=${t} .mapView=${this.mapView} @layerSelectionChange=${(s) => {
|
|
294
|
+
this._selectedReportingLayerId = s.detail[0];
|
|
293
295
|
}} .selectedIds=${[this._selectedReportingLayerId]}></map-layer-picker>` || ""}</div>`;
|
|
294
296
|
}
|
|
295
297
|
async _setTemplates() {
|
|
@@ -463,7 +465,7 @@ class H extends I {
|
|
|
463
465
|
this._exportType === "CSV" && (this._fetchingData = !0, this._downloadTools.value && this.mapView?.map && await this._downloadTools.value.downloadCSV(this.mapView.map, e, this._removeDuplicates.value?.checked || !1), this._fetchingData = !1);
|
|
464
466
|
}
|
|
465
467
|
_getSelectionIdsAndViews(e, t = !1) {
|
|
466
|
-
return (t ? e.filter((s) => s.download
|
|
468
|
+
return (t ? e.filter((s) => s.download) : e).reduce((s, a) => {
|
|
467
469
|
if (a.workflowType === "REFINE")
|
|
468
470
|
Object.keys(a.refineInfos).forEach((o) => {
|
|
469
471
|
const n = a.refineInfos[o];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
|
|
2
2
|
import { c as g } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as f, html as
|
|
3
|
+
import { css as f, html as b } from "lit";
|
|
4
4
|
import { u as v } from "../../chunks/useT9n.js";
|
|
5
5
|
import { LitElement as C, createEvent as n, safeClassMap as _ } from "@arcgis/lumina";
|
|
6
6
|
import { T as p } from "../../chunks/solutions-deploy-app-nav.js";
|
|
7
|
-
import { a as S, A as w, G as F, F as D, B as
|
|
7
|
+
import { a as S, A as w, G as F, F as D, B as x, e as I, T as c } from "../../chunks/interfaces.js";
|
|
8
8
|
import { createRef as o, ref as l } from "lit-html/directives/ref.js";
|
|
9
9
|
import { C as y, g as O } from "../../chunks/cardFetchingUtils.js";
|
|
10
10
|
import { useContextProvider as T } from "@arcgis/lumina/context";
|
|
11
|
-
import { h as E, f as
|
|
11
|
+
import { h as E, f as k } from "../../chunks/cardsHelpers.js";
|
|
12
12
|
import "@esri/solution-common";
|
|
13
13
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
14
14
|
import "@arcgis/core/identity/OAuthInfo.js";
|
|
15
15
|
import "@arcgis/core/portal/Portal.js";
|
|
16
|
-
import { _ as
|
|
16
|
+
import { _ as A } from "../../chunks/solution-deploy-dialog.js";
|
|
17
17
|
import "../solutions-all-shell/customElement.js";
|
|
18
18
|
import "../solutions-deployed-shell/customElement.js";
|
|
19
19
|
import "../solution-details-panel/customElement.js";
|
|
@@ -58,7 +58,7 @@ class L extends C {
|
|
|
58
58
|
case "details":
|
|
59
59
|
if (this._allCards) {
|
|
60
60
|
let s = E(this._allCards, t.tabTitleOrId);
|
|
61
|
-
s = s ||
|
|
61
|
+
s = s || k(this._allCards, t.tabTitleOrId), s ? (this._detailsTab.value.selected = !0, this._detailsTabTitle.value.selected = !0, this.detailsCardSelected.emit(s)) : (t.tabType = "all-solutions", this._allTab.value.selected = !0, this._allTabTitle.value.selected = !0);
|
|
62
62
|
}
|
|
63
63
|
break;
|
|
64
64
|
case "deployments":
|
|
@@ -110,11 +110,11 @@ class L extends C {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
async load() {
|
|
113
|
-
this.useLocalAppConfig && (this.appConfig =
|
|
113
|
+
this.useLocalAppConfig && (this.appConfig = A);
|
|
114
114
|
}
|
|
115
115
|
render() {
|
|
116
116
|
const t = this._isLoaded ? "display-none" : "", e = this._isLoaded ? "" : "display-none";
|
|
117
|
-
return
|
|
117
|
+
return b`<calcite-shell><solutions-deploy-app-nav .appConfig=${this.appConfig} .initTab=${this.initTab} @authInit=${this._handleAuthInit} slot=header ${l(this._deployAppNav)}></solutions-deploy-app-nav>${this._isSearchToolbarShowing() && b`<div class="border" slot=header></div>` || ""}<solutions-searchsort-toolbar slot=header ${l(async (i) => {
|
|
118
118
|
i && (await this._deployAppNav.value?.componentOnReady(), this._searchSortToolbar = i);
|
|
119
119
|
})}></solutions-searchsort-toolbar><calcite-loader class=${_(t)} id=solutions-loader .label=${this._translations.fetchingAllSolutions}></calcite-loader><calcite-tabs class=${_(e)} scale=l><calcite-tab-nav class="display-none" @calciteTabChange=${this._handleCalciteTabChanged} slot=title-group><calcite-tab-title ${l(this._allTabTitle)}>${this._translations.allSolutions}</calcite-tab-title><calcite-tab-title ${l(this._mySolutionsTabTitle)}>${this._translations.mySolutions}</calcite-tab-title><calcite-tab-title ${l(this._resourcesTabTitle)}>${this._translations.solutionResources}</calcite-tab-title><calcite-tab-title class="display-none" ${l(this._detailsTabTitle)}></calcite-tab-title><calcite-tab-title class="display-none" ${l(this._deployedCardTabTitle)}></calcite-tab-title></calcite-tab-nav><calcite-tab class="back-color-override tab-space-0" selected ${l(this._allTab)}><solutions-all-shell class="height-100" ${l(this._allShell)}></solutions-all-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${l(this._mySolutionsTab)}><solutions-deployed-shell class="height-100" ${l(this._mySolutionsShell)}></solutions-deployed-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${l(this._resourcesTab)}><solutions-resources-shell class="height-100"></solutions-resources-shell></calcite-tab><calcite-tab class="back-color-override" ${l(this._detailsTab)}><solution-details-panel class="height-100" ${l(this._detailsShell)}></solution-details-panel></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${l(this._deployedCardTab)}><solution-deployed-card-panel class="shell-container height-100" ${l(this._deployedCardPanel)}></solution-deployed-card-panel></calcite-tab></calcite-tabs></calcite-shell>`;
|
|
120
120
|
}
|
|
@@ -255,7 +255,7 @@ class L extends C {
|
|
|
255
255
|
this._abortControllerDeployed ? (this._abortControllerDeployed.abort(), this._abortControllerDeployed = new AbortController()) : this._abortControllerDeployed = new AbortController();
|
|
256
256
|
const s = D(e);
|
|
257
257
|
try {
|
|
258
|
-
const a = await O(e, i, this._cardsFetcher, this._cardFetcherDeployed,
|
|
258
|
+
const a = await O(e, i, this._cardsFetcher, this._cardFetcherDeployed, x, "created", "desc", !1, [], [], this._abortControllerDeployed.signal, s ? "My organization's solutions" : "My solutions", t);
|
|
259
259
|
a.cards.length === 0 || a.cards[0].typeKeywords.indexOf("Deployed") < 0 ? (this._deployCardFetchFailedMessage = this._translations.failedToFetchNotSolution.replace("{{ITEMID}}", t), this._showDeployedCardFetchFailed = !0) : this._deployedSolutions = a;
|
|
260
260
|
} catch (a) {
|
|
261
261
|
const r = a.message;
|
|
@@ -272,12 +272,12 @@ class L extends C {
|
|
|
272
272
|
_getDefaultSearchOptions(t) {
|
|
273
273
|
let e;
|
|
274
274
|
if (t) {
|
|
275
|
-
const i = t.domain, s = t.industry === "AEC" ?
|
|
275
|
+
const i = t.domain, s = t.industry === "AEC" ? I.AEC : t.industry, a = t.offerType, r = t.searchTerm, m = "";
|
|
276
276
|
let d = t.sortField;
|
|
277
|
-
const h = t.owner,
|
|
277
|
+
const h = t.owner, u = t.filter;
|
|
278
278
|
e = i || s ? {
|
|
279
279
|
type: i ? "domain" : s ? "industry" : ""
|
|
280
|
-
} : void 0, i && (e = e ? { ...e, domain: i } : { domain: i }), s && (e = e ? { ...e, industry: s } : { industry: s }), r && (e = e ? { ...e, searchTerm: r } : { searchTerm: r }), e && (e = { ...e, displayValue: m }), d && (e = e ? { ...e, sortType: d } : { sortType: d }), a && (d = a.toLowerCase(), e = e ? { ...e, sortType: d } : { sortType: d }), h && (e = e ? { ...e, owner: h } : { owner: h }),
|
|
280
|
+
} : void 0, i && (e = e ? { ...e, domain: i } : { domain: i }), s && (e = e ? { ...e, industry: s } : { industry: s }), r && (e = e ? { ...e, searchTerm: r } : { searchTerm: r }), e && (e = { ...e, displayValue: m }), d && (e = e ? { ...e, sortType: d } : { sortType: d }), a && (d = a.toLowerCase(), e = e ? { ...e, sortType: d } : { sortType: d }), h && (e = e ? { ...e, owner: h } : { owner: h }), u && (e = e ? { ...e, filter: u } : { filter: u });
|
|
281
281
|
}
|
|
282
282
|
return e;
|
|
283
283
|
}
|
|
@@ -292,7 +292,11 @@ class L extends C {
|
|
|
292
292
|
if (t && t.tokenDuration && e?.IsSignedIn) {
|
|
293
293
|
const i = Date.now(), a = (e.Credential?.expires - i) * 0.95;
|
|
294
294
|
setInterval(async () => {
|
|
295
|
-
|
|
295
|
+
if (e.Credential && e.Credential.expires) {
|
|
296
|
+
await e.Credential?.refreshToken();
|
|
297
|
+
const r = new Date(e.Credential.expires);
|
|
298
|
+
t.updateToken(e.Credential.token, r), this.sessionRefreshed.emit(t.token);
|
|
299
|
+
}
|
|
296
300
|
}, a);
|
|
297
301
|
}
|
|
298
302
|
}
|