@esri/solutions-components 0.7.18 → 0.7.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_3.cjs.entry.js +93 -6
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +12 -5
- package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -3
- package/dist/cjs/{downloadUtils-8f50633d.js → downloadUtils-9a13c6ac.js} +19 -14
- package/dist/cjs/{index.es-140aa937.js → index.es-284a020c.js} +2 -2
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-569e9644.js → mapViewUtils-8aa325de.js} +4 -1
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +4 -4
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +4 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +3 -2
- package/dist/collection/components/edit-card/edit-card.js +1 -2
- package/dist/collection/components/info-card/info-card.js +3 -3
- package/dist/collection/components/layer-table/layer-table.css +4 -0
- package/dist/collection/components/layer-table/layer-table.js +9 -2
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +4 -4
- package/dist/collection/utils/downloadUtils.js +17 -12
- package/dist/collection/utils/downloadUtils.ts +20 -12
- package/dist/collection/utils/interfaces.ts +5 -0
- package/dist/collection/utils/popupUtils.js +94 -0
- package/dist/collection/utils/popupUtils.ts +104 -0
- package/dist/collection/utils/queryUtils.js +4 -1
- package/dist/collection/utils/queryUtils.ts +5 -1
- package/dist/components/crowdsource-manager.js +4 -3
- package/dist/components/downloadUtils.js +17 -12
- package/dist/components/edit-card2.js +1 -2
- package/dist/components/info-card2.js +91 -3
- package/dist/components/layer-table2.js +10 -3
- package/dist/components/queryUtils.js +4 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +4 -4
- package/dist/esm/calcite-alert_3.entry.js +93 -6
- package/dist/esm/calcite-combobox_6.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +12 -5
- package/dist/esm/crowdsource-manager.entry.js +4 -3
- package/dist/esm/{downloadUtils-9dee8bc0.js → downloadUtils-a4bbdb1d.js} +19 -14
- package/dist/esm/{index.es-54e86c8e.js → index.es-48fdb288.js} +2 -2
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-066602d5.js → mapViewUtils-8fe70944.js} +4 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +4 -4
- package/dist/solutions-components/{p-d0c4572d.entry.js → p-1d56804c.entry.js} +18 -2
- package/dist/solutions-components/p-24b3ad7d.entry.js +6 -0
- package/dist/solutions-components/{p-6656c53e.entry.js → p-2abc02a1.entry.js} +1 -1
- package/dist/solutions-components/{p-825c045a.entry.js → p-2ddd9cf8.entry.js} +1 -1
- package/dist/solutions-components/{p-e8011829.entry.js → p-48a5ae32.entry.js} +1 -1
- package/dist/solutions-components/{p-dfdb8411.js → p-72dbfa77.js} +1 -1
- package/dist/solutions-components/{p-683cded6.entry.js → p-b1422b00.entry.js} +1 -1
- package/dist/solutions-components/p-b5d1b979.js +36 -0
- package/dist/solutions-components/{p-e405f393.entry.js → p-cf24ce53.entry.js} +1 -1
- package/dist/solutions-components/{p-1bdd64a0.js → p-d4afcf86.js} +4 -4
- package/dist/solutions-components/{p-f486c86d.entry.js → p-fdb1ace8.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.css +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +20 -12
- package/dist/solutions-components/utils/interfaces.ts +5 -0
- package/dist/solutions-components/utils/popupUtils.ts +104 -0
- package/dist/solutions-components/utils/queryUtils.ts +5 -1
- package/dist/types/components/info-card/info-card.d.ts +5 -0
- package/dist/types/utils/downloadUtils.d.ts +3 -3
- package/dist/types/utils/interfaces.d.ts +4 -0
- package/dist/types/utils/popupUtils.d.ts +46 -0
- package/dist/types/utils/queryUtils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/solutions-components/p-531d91d6.js +0 -36
- package/dist/solutions-components/p-8ca5d651.entry.js +0 -6
@@ -48,7 +48,7 @@ import { d as defineCustomElement$3 } from './instant-apps-filter-list2.js';
|
|
48
48
|
import { d as defineCustomElement$2 } from './instant-apps-social-share2.js';
|
49
49
|
import { d as defineCustomElement$1 } from './map-layer-picker2.js';
|
50
50
|
|
51
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}";
|
51
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}";
|
52
52
|
|
53
53
|
const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
|
54
54
|
constructor() {
|
@@ -1079,7 +1079,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1079
1079
|
*/
|
1080
1080
|
_filterModal() {
|
1081
1081
|
var _a, _b, _c;
|
1082
|
-
return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView }))));
|
1082
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView }))));
|
1083
1083
|
}
|
1084
1084
|
/**
|
1085
1085
|
* Reset the filter active prop
|
@@ -1238,10 +1238,17 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1238
1238
|
ids,
|
1239
1239
|
layer: this._layer
|
1240
1240
|
};
|
1241
|
+
const fields = this._table.columns.toArray().reduce((prev, cur) => {
|
1242
|
+
if (!cur.hidden) {
|
1243
|
+
prev.push(cur.name.toLocaleLowerCase());
|
1244
|
+
}
|
1245
|
+
return prev;
|
1246
|
+
}, []);
|
1241
1247
|
void downloadCSV(null, //???
|
1242
1248
|
exportInfos, false, // formatUsingLayerPopup
|
1243
1249
|
false, // removeDuplicates
|
1244
|
-
true
|
1250
|
+
true, // addColumnTitle
|
1251
|
+
fields);
|
1245
1252
|
}
|
1246
1253
|
/**
|
1247
1254
|
* Refreshes the table and maintains the curent scroll position
|
@@ -59,7 +59,7 @@ async function queryObjectIds(geometries, layer) {
|
|
59
59
|
*
|
60
60
|
* @returns Promise with the featureSet from the layer that match the provided ids
|
61
61
|
*/
|
62
|
-
async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatialReference) {
|
62
|
+
async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatialReference, fields) {
|
63
63
|
var _a;
|
64
64
|
const num = (_a = layer.capabilities) === null || _a === void 0 ? void 0 : _a.query.maxRecordCount;
|
65
65
|
const start = 0;
|
@@ -73,6 +73,9 @@ async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatia
|
|
73
73
|
if (outSpatialReference) {
|
74
74
|
q.outSpatialReference = outSpatialReference;
|
75
75
|
}
|
76
|
+
if (fields) {
|
77
|
+
q.outFields = fields;
|
78
|
+
}
|
76
79
|
const result = await layer.queryFeatures(q);
|
77
80
|
graphics = graphics.concat(result.features);
|
78
81
|
const remainingIds = ids.slice(num, ids.length);
|
@@ -88,7 +88,7 @@ const SolutionItemSharing = /*@__PURE__*/ proxyCustomElement(class SolutionItemS
|
|
88
88
|
this.sharing = this.sharing.map((itemShare) => {
|
89
89
|
if (itemShare.id === id) {
|
90
90
|
// update the item
|
91
|
-
itemShare.shareItem = event.
|
91
|
+
itemShare.shareItem = event.target.checked;
|
92
92
|
// update the item in the store
|
93
93
|
const itemEdit = state.getItemInfo(id);
|
94
94
|
if (itemShare.shareItem) {
|
@@ -68,12 +68,12 @@ const SolutionSpatialRef = /*@__PURE__*/ proxyCustomElement(class SolutionSpatia
|
|
68
68
|
* Toggles the ability to set the default spatial reference.
|
69
69
|
*/
|
70
70
|
_updateLocked(event) {
|
71
|
-
this.locked = !event.
|
71
|
+
this.locked = !event.target.checked;
|
72
72
|
this._updateStore();
|
73
73
|
if (!this.loaded) {
|
74
74
|
// when this is switched on when loading we have reloaded a solution that
|
75
75
|
// has a custom wkid param and we should honor the settings they already have in the templates
|
76
|
-
if (event.
|
76
|
+
if (event.target.checked) {
|
77
77
|
// By default enable all Feature Services on first load
|
78
78
|
this._setFeatureServiceDefaults(this.services);
|
79
79
|
}
|
@@ -120,11 +120,11 @@ const SolutionSpatialRef = /*@__PURE__*/ proxyCustomElement(class SolutionSpatia
|
|
120
120
|
*/
|
121
121
|
_updateEnabledServices(event, name) {
|
122
122
|
const spatialReferenceInfo = state.getStoreInfo("spatialReferenceInfo");
|
123
|
-
spatialReferenceInfo.services[name] = event.
|
123
|
+
spatialReferenceInfo.services[name] = event.target.checked;
|
124
124
|
state.setStoreInfo("spatialReferenceInfo", spatialReferenceInfo);
|
125
125
|
this.featureServiceSpatialReferenceChange.emit({
|
126
126
|
name,
|
127
|
-
enabled: event.
|
127
|
+
enabled: event.target.checked
|
128
128
|
});
|
129
129
|
}
|
130
130
|
/**
|
@@ -13,7 +13,7 @@ import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as
|
|
13
13
|
import { K as KindIcons } from './resources-6e00e0d1.js';
|
14
14
|
import { l as loadModules } from './loadModules-cea493da.js';
|
15
15
|
import { g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
16
|
-
import { m as getAllLayers } from './mapViewUtils-
|
16
|
+
import { m as getAllLayers } from './mapViewUtils-8fe70944.js';
|
17
17
|
import './guid-36c6c6a5.js';
|
18
18
|
import './resources-cdc36705.js';
|
19
19
|
import './key-af303047.js';
|
@@ -441,8 +441,7 @@ const EditCard = class {
|
|
441
441
|
view: this.mapView,
|
442
442
|
layerInfos,
|
443
443
|
visibleElements: {
|
444
|
-
snappingControls: false
|
445
|
-
sketchTooltipControls: false
|
444
|
+
snappingControls: false
|
446
445
|
},
|
447
446
|
container
|
448
447
|
});
|
@@ -507,6 +506,95 @@ const EditCard = class {
|
|
507
506
|
};
|
508
507
|
EditCard.style = editCardCss;
|
509
508
|
|
509
|
+
/** @license
|
510
|
+
* Copyright 2022 Esri
|
511
|
+
*
|
512
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
513
|
+
* you may not use this file except in compliance with the License.
|
514
|
+
* You may obtain a copy of the License at
|
515
|
+
*
|
516
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
517
|
+
*
|
518
|
+
* Unless required by applicable law or agreed to in writing, software
|
519
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
520
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
521
|
+
* See the License for the specific language governing permissions and
|
522
|
+
* limitations under the License.
|
523
|
+
*/
|
524
|
+
class PopupUtils {
|
525
|
+
/**
|
526
|
+
* Get the popup title that honors arcade expressions
|
527
|
+
*
|
528
|
+
* @returns Promise resolving with the popup title
|
529
|
+
*
|
530
|
+
* @protected
|
531
|
+
*/
|
532
|
+
async getPopupTitle(graphic) {
|
533
|
+
var _a, _b, _c;
|
534
|
+
if (!this.arcade) {
|
535
|
+
await this._initModules();
|
536
|
+
}
|
537
|
+
let attributes = {};
|
538
|
+
for (const [key, value] of Object.entries(graphic.attributes)) {
|
539
|
+
attributes = Object.assign(Object.assign({}, attributes), { [`{${key.toUpperCase()}}`]: value });
|
540
|
+
}
|
541
|
+
const layer = graphic.layer;
|
542
|
+
const popupTitle = this._removeTags((_a = layer === null || layer === void 0 ? void 0 : layer.popupTemplate) === null || _a === void 0 ? void 0 : _a.title);
|
543
|
+
if (popupTitle.includes("{expression/expr") && ((_b = layer === null || layer === void 0 ? void 0 : layer.popupTemplate) === null || _b === void 0 ? void 0 : _b.expressionInfos) != null) {
|
544
|
+
for (let i = 0; i < ((_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.expressionInfos.length); i++) {
|
545
|
+
const info = layer.popupTemplate.expressionInfos[i];
|
546
|
+
const profile = {
|
547
|
+
variables: [
|
548
|
+
{
|
549
|
+
name: "$feature",
|
550
|
+
type: "feature"
|
551
|
+
}
|
552
|
+
]
|
553
|
+
};
|
554
|
+
try {
|
555
|
+
const arcadeExecutor = await this.arcade.createArcadeExecutor(info.expression, profile);
|
556
|
+
const arcadeTitle = arcadeExecutor.execute({ $feature: graphic });
|
557
|
+
if (arcadeTitle != null || arcadeTitle !== "") {
|
558
|
+
attributes[`{expression/${info.name}}`.toUpperCase()] = arcadeTitle;
|
559
|
+
}
|
560
|
+
}
|
561
|
+
catch (_d) {
|
562
|
+
continue;
|
563
|
+
}
|
564
|
+
}
|
565
|
+
}
|
566
|
+
return popupTitle === null || popupTitle === void 0 ? void 0 : popupTitle.replace(/{.*?}/g, (placeholder) => {
|
567
|
+
return attributes[placeholder.toUpperCase()] != null ? attributes[placeholder.toUpperCase()] : "";
|
568
|
+
});
|
569
|
+
}
|
570
|
+
/**
|
571
|
+
* Remove any tags from the title
|
572
|
+
*
|
573
|
+
* @returns title string without tags
|
574
|
+
*
|
575
|
+
* @protected
|
576
|
+
*/
|
577
|
+
_removeTags(str) {
|
578
|
+
if (str == null || str === "") {
|
579
|
+
return "";
|
580
|
+
}
|
581
|
+
return str.toString().replace(/(<([^>]+)>)/gi, "");
|
582
|
+
}
|
583
|
+
/**
|
584
|
+
* Load esri javascript api modules
|
585
|
+
*
|
586
|
+
* @returns Promise resolving when function is done
|
587
|
+
*
|
588
|
+
* @protected
|
589
|
+
*/
|
590
|
+
async _initModules() {
|
591
|
+
const [arcade] = await loadModules([
|
592
|
+
"esri/arcade"
|
593
|
+
]);
|
594
|
+
this.arcade = arcade;
|
595
|
+
}
|
596
|
+
}
|
597
|
+
|
510
598
|
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.padding-top-46{padding-top:46px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}";
|
511
599
|
|
512
600
|
const InfoCard = class {
|
@@ -542,6 +630,7 @@ const InfoCard = class {
|
|
542
630
|
if (this.graphics.length > 0) {
|
543
631
|
const featureLayer = (_a = this.graphics[0]) === null || _a === void 0 ? void 0 : _a.layer;
|
544
632
|
this._editEnabled = featureLayer.editingEnabled && featureLayer.capabilities.operations.supportsUpdate;
|
633
|
+
this._mobileTitle = await this._popupUtils.getPopupTitle(this.graphics[0]);
|
545
634
|
this._features.open({
|
546
635
|
features: this.graphics
|
547
636
|
});
|
@@ -605,6 +694,7 @@ const InfoCard = class {
|
|
605
694
|
async componentWillLoad() {
|
606
695
|
await this._initModules();
|
607
696
|
await this._getTranslations();
|
697
|
+
this._popupUtils = new PopupUtils();
|
608
698
|
}
|
609
699
|
/**
|
610
700
|
* Renders the component.
|
@@ -665,9 +755,6 @@ const InfoCard = class {
|
|
665
755
|
this._showListView = isOpen;
|
666
756
|
}
|
667
757
|
});
|
668
|
-
this.reactiveUtils.watch(() => this._features.viewModel.title, (title) => {
|
669
|
-
this._mobileTitle = title;
|
670
|
-
});
|
671
758
|
if (this.zoomAndScrollToSelected) {
|
672
759
|
this.reactiveUtils.watch(() => this._features.selectedFeatureIndex, (i) => {
|
673
760
|
if (i > -1) {
|
@@ -22,7 +22,7 @@ import { d as debounce } from './debounce-229b1a22.js';
|
|
22
22
|
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-1149b5cb.js';
|
23
23
|
import { i as isActivationKey } from './key-af303047.js';
|
24
24
|
import { g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
25
|
-
import { n as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-
|
25
|
+
import { n as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-8fe70944.js';
|
26
26
|
import { s as state } from './publicNotificationStore-9362d7ae.js';
|
27
27
|
import './resources-cdc36705.js';
|
28
28
|
import './browser-b4c16201.js';
|
@@ -2267,7 +2267,7 @@ const SolutionItemSharing = class {
|
|
2267
2267
|
this.sharing = this.sharing.map((itemShare) => {
|
2268
2268
|
if (itemShare.id === id) {
|
2269
2269
|
// update the item
|
2270
|
-
itemShare.shareItem = event.
|
2270
|
+
itemShare.shareItem = event.target.checked;
|
2271
2271
|
// update the item in the store
|
2272
2272
|
const itemEdit = state.getItemInfo(id);
|
2273
2273
|
if (itemShare.shareItem) {
|
@@ -5,9 +5,9 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-7183ce4a.js';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
8
|
-
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryFeatureIds, c as queryAllIds, d as queryFeaturesByGlobalID } from './mapViewUtils-
|
8
|
+
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryFeatureIds, c as queryAllIds, d as queryFeaturesByGlobalID } from './mapViewUtils-8fe70944.js';
|
9
9
|
import { l as loadModules } from './loadModules-cea493da.js';
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
10
|
+
import { d as downloadCSV } from './downloadUtils-a4bbdb1d.js';
|
11
11
|
import './esri-loader-eda07632.js';
|
12
12
|
import './_commonjsHelpers-d5f9d613.js';
|
13
13
|
import './interfaces-341e3ab3.js';
|
@@ -103,7 +103,7 @@ const CardManager = class {
|
|
103
103
|
};
|
104
104
|
CardManager.style = cardManagerCss;
|
105
105
|
|
106
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}";
|
106
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}";
|
107
107
|
|
108
108
|
const LayerTable = class {
|
109
109
|
constructor(hostRef) {
|
@@ -1133,7 +1133,7 @@ const LayerTable = class {
|
|
1133
1133
|
*/
|
1134
1134
|
_filterModal() {
|
1135
1135
|
var _a, _b, _c;
|
1136
|
-
return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView }))));
|
1136
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView }))));
|
1137
1137
|
}
|
1138
1138
|
/**
|
1139
1139
|
* Reset the filter active prop
|
@@ -1292,10 +1292,17 @@ const LayerTable = class {
|
|
1292
1292
|
ids,
|
1293
1293
|
layer: this._layer
|
1294
1294
|
};
|
1295
|
+
const fields = this._table.columns.toArray().reduce((prev, cur) => {
|
1296
|
+
if (!cur.hidden) {
|
1297
|
+
prev.push(cur.name.toLocaleLowerCase());
|
1298
|
+
}
|
1299
|
+
return prev;
|
1300
|
+
}, []);
|
1295
1301
|
void downloadCSV(null, //???
|
1296
1302
|
exportInfos, false, // formatUsingLayerPopup
|
1297
1303
|
false, // removeDuplicates
|
1298
|
-
true
|
1304
|
+
true, // addColumnTitle
|
1305
|
+
fields);
|
1299
1306
|
}
|
1300
1307
|
/**
|
1301
1308
|
* Refreshes the table and maintains the curent scroll position
|
@@ -9,7 +9,7 @@ import { E as ELayoutMode } from './interfaces-341e3ab3.js';
|
|
9
9
|
import './esri-loader-eda07632.js';
|
10
10
|
import './_commonjsHelpers-d5f9d613.js';
|
11
11
|
|
12
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}";
|
12
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}";
|
13
13
|
|
14
14
|
const CrowdsourceManager = class {
|
15
15
|
constructor(hostRef) {
|
@@ -258,7 +258,7 @@ const CrowdsourceManager = class {
|
|
258
258
|
let sizeClass = "";
|
259
259
|
switch (layoutMode) {
|
260
260
|
case ELayoutMode.HORIZONTAL:
|
261
|
-
sizeClass = `${this._isMobile && this.
|
261
|
+
sizeClass = `${this._isMobile && this.hideMap ? "height-0 " : panelOpen ? "height-1-2 display-grid" : "height-0"} width-full position-relative`;
|
262
262
|
break;
|
263
263
|
case ELayoutMode.GRID:
|
264
264
|
sizeClass = this.classicGrid ? `${panelOpen ? "position-relative" : "position-absolute-53"} height-full width-full display-flex` :
|
@@ -358,7 +358,8 @@ const CrowdsourceManager = class {
|
|
358
358
|
const popupNodeClass = !this._expandPopup ? "height-full" : ((_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.length) === 1 || this._isMobile ? "position-absolute-0" : "position-absolute-50";
|
359
359
|
const headerClass = this._isMobile ? "display-none height-0" : "";
|
360
360
|
const headerTheme = !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
|
361
|
-
|
361
|
+
const containerClass = this._isMobile && this._hideTable && this.hideMap ? "position-fixed width-full height-full" : this._isMobile ? "display-none height-0" : "";
|
362
|
+
return (h("div", { class: `${headerTheme} ${popupNodeClass} ${containerClass}` }, h("calcite-panel", null, !this._isMobile ? (h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, h("calcite-action", { class: headerClass, disabled: this._tableOnly, icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end", text: "" }), !this._tableOnly ? h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)) : undefined, this._getCardNode())));
|
362
363
|
}
|
363
364
|
/**
|
364
365
|
* Toggle the popup information
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
7
|
import { a as getAssetPath } from './index-7183ce4a.js';
|
8
8
|
import { l as loadModules } from './loadModules-cea493da.js';
|
9
|
-
import { q as queryFeaturesByID } from './mapViewUtils-
|
9
|
+
import { q as queryFeaturesByID } from './mapViewUtils-8fe70944.js';
|
10
10
|
import './solution-resource-7b8d302d.js';
|
11
11
|
import './index-a1e91462.js';
|
12
12
|
import { _ as __assign$1, r as request, c as cleanUrl, g as getJson } from './restHelpersGet-af032ab2.js';
|
@@ -1508,7 +1508,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
1508
1508
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1509
1509
|
* ====================================================================
|
1510
1510
|
*/
|
1511
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
1511
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-48fdb288.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
|
1512
1512
|
/** ====================================================================
|
1513
1513
|
* @license
|
1514
1514
|
* jsPDF XMP metadata plugin
|
@@ -2360,12 +2360,12 @@ const lineSeparatorChar = "|";
|
|
2360
2360
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2361
2361
|
* @returns selectionSetNames that will be used for export filenames
|
2362
2362
|
*/
|
2363
|
-
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
|
2363
|
+
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields = []) {
|
2364
2364
|
const labelRequests = [];
|
2365
2365
|
Object.keys(exportInfos).forEach(k => {
|
2366
2366
|
var _a;
|
2367
2367
|
const labelInfo = exportInfos[k];
|
2368
|
-
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
2368
|
+
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields));
|
2369
2369
|
if (isCSVExport) {
|
2370
2370
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
2371
2371
|
labelRequests.push(Promise.resolve([[k]]));
|
@@ -2385,8 +2385,8 @@ async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = tr
|
|
2385
2385
|
* @param addColumnTitle Indicates if column headings should be included in output
|
2386
2386
|
* @returns Promise resolving when function is done
|
2387
2387
|
*/
|
2388
|
-
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
2389
|
-
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true);
|
2388
|
+
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields = []) {
|
2389
|
+
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields);
|
2390
2390
|
labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
|
2391
2391
|
const layerIds = Object.keys(exportInfos);
|
2392
2392
|
let layerLabels = [];
|
@@ -2922,7 +2922,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2922
2922
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2923
2923
|
* @returns Promise resolving when function is done
|
2924
2924
|
*/
|
2925
|
-
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false) {
|
2925
|
+
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = []) {
|
2926
2926
|
// Get the label formatting, if any
|
2927
2927
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
2928
2928
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -2981,7 +2981,8 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
2981
2981
|
}
|
2982
2982
|
else {
|
2983
2983
|
// Get the features to export
|
2984
|
-
|
2984
|
+
const outFields = fields.length > 0 ? fields : undefined;
|
2985
|
+
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
|
2985
2986
|
}
|
2986
2987
|
// Get field data types. Do we have any domain-based fields?
|
2987
2988
|
const attributeOrigNames = {};
|
@@ -2989,17 +2990,21 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
2989
2990
|
const attributeDomains = {};
|
2990
2991
|
if (featureLayer.fields) {
|
2991
2992
|
featureLayer.fields.forEach(field => {
|
2992
|
-
|
2993
|
-
|
2994
|
-
|
2995
|
-
|
2993
|
+
if (fields.indexOf(field.name.toLowerCase()) > -1) {
|
2994
|
+
const lowercaseFieldname = field.name.toLowerCase();
|
2995
|
+
attributeOrigNames[lowercaseFieldname] = field.name;
|
2996
|
+
attributeDomains[lowercaseFieldname] = field.domain;
|
2997
|
+
attributeTypes[lowercaseFieldname] = field.type;
|
2998
|
+
}
|
2996
2999
|
});
|
2997
3000
|
}
|
2998
3001
|
else {
|
2999
3002
|
// Feature layer is missing fields, so get info from first feature
|
3000
3003
|
Object.keys(featureSet[0]).forEach(fieldName => {
|
3001
|
-
|
3002
|
-
|
3004
|
+
if (fields.indexOf(fieldName.toLowerCase()) > -1) {
|
3005
|
+
const lowercaseFieldname = fieldName.toLowerCase();
|
3006
|
+
attributeOrigNames[lowercaseFieldname] = fieldName;
|
3007
|
+
}
|
3003
3008
|
});
|
3004
3009
|
}
|
3005
3010
|
// Apply the label format
|
@@ -4,11 +4,11 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-a4bbdb1d.js';
|
8
8
|
import './index-7183ce4a.js';
|
9
9
|
import './loadModules-cea493da.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
|
-
import './mapViewUtils-
|
11
|
+
import './mapViewUtils-8fe70944.js';
|
12
12
|
import './interfaces-341e3ab3.js';
|
13
13
|
import './solution-resource-7b8d302d.js';
|
14
14
|
import './index-a1e91462.js';
|
@@ -5,11 +5,11 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7183ce4a.js';
|
7
7
|
import { l as loadModules } from './loadModules-cea493da.js';
|
8
|
-
import { g as goToSelection, h as highlightFeatures, e as queryObjectIds, f as getQueryGeoms, i as getFeatureLayerView, j as queryFeaturesByGeometry, k as getIdSets, l as highlightAllFeatures } from './mapViewUtils-
|
8
|
+
import { g as goToSelection, h as highlightFeatures, e as queryObjectIds, f as getQueryGeoms, i as getFeatureLayerView, j as queryFeaturesByGeometry, k as getIdSets, l as highlightAllFeatures } from './mapViewUtils-8fe70944.js';
|
9
9
|
import { c as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-341e3ab3.js';
|
10
10
|
import { s as state } from './publicNotificationStore-9362d7ae.js';
|
11
11
|
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
12
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
12
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-a4bbdb1d.js';
|
13
13
|
import './esri-loader-eda07632.js';
|
14
14
|
import './_commonjsHelpers-d5f9d613.js';
|
15
15
|
import './index-857df22e.js';
|
@@ -61,7 +61,7 @@ async function queryObjectIds(geometries, layer) {
|
|
61
61
|
*
|
62
62
|
* @returns Promise with the featureSet from the layer that match the provided ids
|
63
63
|
*/
|
64
|
-
async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatialReference) {
|
64
|
+
async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatialReference, fields) {
|
65
65
|
var _a;
|
66
66
|
const num = (_a = layer.capabilities) === null || _a === void 0 ? void 0 : _a.query.maxRecordCount;
|
67
67
|
const start = 0;
|
@@ -75,6 +75,9 @@ async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatia
|
|
75
75
|
if (outSpatialReference) {
|
76
76
|
q.outSpatialReference = outSpatialReference;
|
77
77
|
}
|
78
|
+
if (fields) {
|
79
|
+
q.outFields = fields;
|
80
|
+
}
|
78
81
|
const result = await layer.queryFeatures(q);
|
79
82
|
graphics = graphics.concat(result.features);
|
80
83
|
const remainingIds = ids.slice(num, ids.length);
|
@@ -6,10 +6,10 @@
|
|
6
6
|
import { r as registerInstance, c as createEvent, a as getAssetPath, h, H as Host, g as getElement } from './index-7183ce4a.js';
|
7
7
|
import { a as EExportType, b as EPageType, c as EWorkflowType } from './interfaces-341e3ab3.js';
|
8
8
|
import { l as loadModules } from './loadModules-cea493da.js';
|
9
|
-
import { g as goToSelection, h as highlightFeatures } from './mapViewUtils-
|
9
|
+
import { g as goToSelection, h as highlightFeatures } from './mapViewUtils-8fe70944.js';
|
10
10
|
import { s as state } from './publicNotificationStore-9362d7ae.js';
|
11
11
|
import { g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
12
|
-
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-
|
12
|
+
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-a4bbdb1d.js';
|
13
13
|
import './esri-loader-eda07632.js';
|
14
14
|
import './_commonjsHelpers-d5f9d613.js';
|
15
15
|
import './index-857df22e.js';
|
@@ -223,12 +223,12 @@ const SolutionSpatialRef = class {
|
|
223
223
|
* Toggles the ability to set the default spatial reference.
|
224
224
|
*/
|
225
225
|
_updateLocked(event) {
|
226
|
-
this.locked = !event.
|
226
|
+
this.locked = !event.target.checked;
|
227
227
|
this._updateStore();
|
228
228
|
if (!this.loaded) {
|
229
229
|
// when this is switched on when loading we have reloaded a solution that
|
230
230
|
// has a custom wkid param and we should honor the settings they already have in the templates
|
231
|
-
if (event.
|
231
|
+
if (event.target.checked) {
|
232
232
|
// By default enable all Feature Services on first load
|
233
233
|
this._setFeatureServiceDefaults(this.services);
|
234
234
|
}
|
@@ -275,11 +275,11 @@ const SolutionSpatialRef = class {
|
|
275
275
|
*/
|
276
276
|
_updateEnabledServices(event, name) {
|
277
277
|
const spatialReferenceInfo = state.getStoreInfo("spatialReferenceInfo");
|
278
|
-
spatialReferenceInfo.services[name] = event.
|
278
|
+
spatialReferenceInfo.services[name] = event.target.checked;
|
279
279
|
state.setStoreInfo("spatialReferenceInfo", spatialReferenceInfo);
|
280
280
|
this.featureServiceSpatialReferenceChange.emit({
|
281
281
|
name,
|
282
|
-
enabled: event.
|
282
|
+
enabled: event.target.checked
|
283
283
|
});
|
284
284
|
}
|
285
285
|
/**
|