@esri/solutions-components 0.7.43 → 0.7.45
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/cjs/calcite-alert_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_5.cjs.entry.js +1 -1
- package/dist/cjs/calcite-flow_5.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +12 -7
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-7d4985c0.js → downloadUtils-82bc9a04.js} +9 -12
- package/dist/cjs/{index.es-8cef354a.js → index.es-79d8773c.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-290dbc9e.js → mapViewUtils-3e0fa457.js} +4 -8
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +13 -5
- package/dist/collection/utils/downloadUtils.js +7 -10
- package/dist/collection/utils/downloadUtils.ts +13 -13
- package/dist/collection/utils/queryUtils.js +4 -8
- package/dist/collection/utils/queryUtils.ts +6 -9
- package/dist/components/downloadUtils.js +7 -10
- package/dist/components/layer-table2.js +12 -5
- package/dist/components/queryUtils.js +4 -8
- package/dist/esm/calcite-alert_4.entry.js +1 -1
- package/dist/esm/calcite-combobox_5.entry.js +1 -1
- package/dist/esm/calcite-flow_5.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +12 -7
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +1 -1
- package/dist/esm/{downloadUtils-d5928e55.js → downloadUtils-3bab4b5f.js} +9 -12
- package/dist/esm/{index.es-a1725c19.js → index.es-be703f2b.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-a177d4f9.js → mapViewUtils-20504620.js} +4 -8
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-4623754a.entry.js +6 -0
- package/dist/solutions-components/{p-42233edc.entry.js → p-766c0b57.entry.js} +1 -1
- package/dist/solutions-components/{p-7f374ec7.js → p-91d3732f.js} +1 -1
- package/dist/solutions-components/{p-3e88e0bd.entry.js → p-a4bb0787.entry.js} +1 -1
- package/dist/solutions-components/{p-c6af6407.entry.js → p-c05467fd.entry.js} +1 -1
- package/dist/solutions-components/p-c897e3eb.js +36 -0
- package/dist/solutions-components/{p-ac9c29da.entry.js → p-d561c970.entry.js} +1 -1
- package/dist/solutions-components/{p-12fc82a9.js → p-d9995b7e.js} +4 -4
- package/dist/solutions-components/{p-32adb2cc.entry.js → p-dbb6f1e2.entry.js} +1 -1
- package/dist/solutions-components/{p-6fe5e1d5.entry.js → p-e46617d1.entry.js} +2 -2
- package/dist/solutions-components/{p-6c86a392.entry.js → p-e8cd89c2.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +13 -13
- package/dist/solutions-components/utils/queryUtils.ts +6 -9
- package/dist/types/components/layer-table/layer-table.d.ts +8 -4
- package/dist/types/utils/downloadUtils.d.ts +3 -3
- package/package.json +1 -1
- package/dist/solutions-components/p-3eedaead.js +0 -36
- package/dist/solutions-components/p-45698f2a.entry.js +0 -6
@@ -27,10 +27,6 @@ import * as downloadUtils from "../../utils/downloadUtils";
|
|
27
27
|
import "@esri/instant-apps-components/dist/components/instant-apps-social-share";
|
28
28
|
export class LayerTable {
|
29
29
|
constructor() {
|
30
|
-
/**
|
31
|
-
* number[]: A list of all IDs for the current layer
|
32
|
-
*/
|
33
|
-
this._allIds = [];
|
34
30
|
/**
|
35
31
|
* boolean: When true the ctrl key is currently pressed
|
36
32
|
*/
|
@@ -86,6 +82,7 @@ export class LayerTable {
|
|
86
82
|
this.shareIncludeSocial = undefined;
|
87
83
|
this.showNewestFirst = undefined;
|
88
84
|
this.zoomAndScrollToSelected = undefined;
|
85
|
+
this._allIds = [];
|
89
86
|
this._controlsThatFit = undefined;
|
90
87
|
this._csvExporting = false;
|
91
88
|
this._fetchingData = false;
|
@@ -154,6 +151,13 @@ export class LayerTable {
|
|
154
151
|
this._initToolInfos();
|
155
152
|
}
|
156
153
|
}
|
154
|
+
/**
|
155
|
+
* watch for changes in map info and update the toolbar
|
156
|
+
*/
|
157
|
+
async mapInfoWatchHandler() {
|
158
|
+
this._initToolInfos();
|
159
|
+
this._updateToolbar();
|
160
|
+
}
|
157
161
|
/**
|
158
162
|
* watch for changes in map view and get the first layer
|
159
163
|
*/
|
@@ -1265,7 +1269,7 @@ export class LayerTable {
|
|
1265
1269
|
exportInfos, false, // formatUsingLayerPopup
|
1266
1270
|
false, // removeDuplicates
|
1267
1271
|
true, // addColumnTitle
|
1268
|
-
fields, true);
|
1272
|
+
fields, true, true);
|
1269
1273
|
this._updateToolInfoLoading("export", false);
|
1270
1274
|
this._csvExporting = false;
|
1271
1275
|
}
|
@@ -1733,6 +1737,7 @@ export class LayerTable {
|
|
1733
1737
|
}
|
1734
1738
|
static get states() {
|
1735
1739
|
return {
|
1740
|
+
"_allIds": {},
|
1736
1741
|
"_controlsThatFit": {},
|
1737
1742
|
"_csvExporting": {},
|
1738
1743
|
"_fetchingData": {},
|
@@ -1780,6 +1785,9 @@ export class LayerTable {
|
|
1780
1785
|
}, {
|
1781
1786
|
"propName": "isMobile",
|
1782
1787
|
"methodName": "isMobileWatchHandler"
|
1788
|
+
}, {
|
1789
|
+
"propName": "mapInfo",
|
1790
|
+
"methodName": "mapInfoWatchHandler"
|
1783
1791
|
}, {
|
1784
1792
|
"propName": "mapView",
|
1785
1793
|
"methodName": "mapViewWatchHandler"
|
@@ -40,12 +40,12 @@ import { queryRelated } from "@esri/arcgis-rest-feature-layer";
|
|
40
40
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
41
41
|
* @returns selectionSetNames that will be used for export filenames
|
42
42
|
*/
|
43
|
-
export async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields =
|
43
|
+
export async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
44
44
|
const labelRequests = [];
|
45
45
|
Object.keys(exportInfos).forEach(k => {
|
46
46
|
var _a;
|
47
47
|
const labelInfo = exportInfos[k];
|
48
|
-
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames));
|
48
|
+
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames, filterFields));
|
49
49
|
if (isCSVExport) {
|
50
50
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
51
51
|
labelRequests.push(Promise.resolve([[k]]));
|
@@ -65,8 +65,8 @@ export async function consolidateLabels(webmap, exportInfos, formatUsingLayerPop
|
|
65
65
|
* @param addColumnTitle Indicates if column headings should be included in output
|
66
66
|
* @returns Promise resolving when function is done
|
67
67
|
*/
|
68
|
-
export async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields =
|
69
|
-
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames);
|
68
|
+
export async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
69
|
+
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames, filterFields);
|
70
70
|
labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
|
71
71
|
const layerIds = Object.keys(exportInfos);
|
72
72
|
let layerLabels = [];
|
@@ -605,10 +605,7 @@ export function _prepareAttributeValue(attributeValue, attributeType, attributeD
|
|
605
605
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
606
606
|
* @returns Promise resolving when function is done
|
607
607
|
*/
|
608
|
-
export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields =
|
609
|
-
if (fields.length === 0) {
|
610
|
-
fields = layer.fields.map(f => f.name.toLowerCase());
|
611
|
-
}
|
608
|
+
export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
612
609
|
// Get the label formatting, if any
|
613
610
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
614
611
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -675,7 +672,7 @@ export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup =
|
|
675
672
|
const attributeDomains = {};
|
676
673
|
if (featureLayer.fields) {
|
677
674
|
featureLayer.fields.forEach(field => {
|
678
|
-
if (fields.indexOf(field.name.toLowerCase()) > -1) {
|
675
|
+
if (filterFields ? fields.indexOf(field.name.toLowerCase()) > -1 : true) {
|
679
676
|
const lowercaseFieldname = field.name.toLowerCase();
|
680
677
|
attributeOrigNames[lowercaseFieldname] = field.name;
|
681
678
|
attributeDomains[lowercaseFieldname] = field.domain;
|
@@ -686,7 +683,7 @@ export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup =
|
|
686
683
|
else {
|
687
684
|
// Feature layer is missing fields, so get info from first feature
|
688
685
|
Object.keys(featureSet[0]).forEach(fieldName => {
|
689
|
-
if (fields.indexOf(fieldName.toLowerCase()) > -1) {
|
686
|
+
if (filterFields ? fields.indexOf(fieldName.toLowerCase()) > -1 : true) {
|
690
687
|
const lowercaseFieldname = fieldName.toLowerCase();
|
691
688
|
attributeOrigNames[lowercaseFieldname] = fieldName;
|
692
689
|
}
|
@@ -126,15 +126,16 @@ export async function consolidateLabels(
|
|
126
126
|
formatUsingLayerPopup = true,
|
127
127
|
includeHeaderNames = false,
|
128
128
|
isCSVExport = false,
|
129
|
-
fields =
|
130
|
-
useFieldAliasNames = false
|
129
|
+
fields = undefined,
|
130
|
+
useFieldAliasNames = false,
|
131
|
+
filterFields = false
|
131
132
|
): Promise<string[][]> {
|
132
133
|
const labelRequests = [];
|
133
134
|
|
134
135
|
Object.keys(exportInfos).forEach(k => {
|
135
136
|
const labelInfo: IExportInfo = exportInfos[k];
|
136
137
|
labelRequests.push(
|
137
|
-
_prepareLabels(webmap, labelInfo.layerView?.layer || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames)
|
138
|
+
_prepareLabels(webmap, labelInfo.layerView?.layer || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames, filterFields)
|
138
139
|
);
|
139
140
|
if (isCSVExport) {
|
140
141
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
@@ -163,10 +164,11 @@ export async function downloadCSV(
|
|
163
164
|
formatUsingLayerPopup: boolean,
|
164
165
|
removeDuplicates = false,
|
165
166
|
addColumnTitle = false,
|
166
|
-
fields =
|
167
|
-
useFieldAliasNames = false
|
167
|
+
fields = undefined,
|
168
|
+
useFieldAliasNames = false,
|
169
|
+
filterFields = false
|
168
170
|
): Promise<void> {
|
169
|
-
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames);
|
171
|
+
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames, filterFields);
|
170
172
|
labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
|
171
173
|
|
172
174
|
const layerIds = Object.keys(exportInfos);
|
@@ -843,12 +845,10 @@ export async function _prepareLabels(
|
|
843
845
|
ids: number[],
|
844
846
|
formatUsingLayerPopup = true,
|
845
847
|
includeHeaderNames = false,
|
846
|
-
fields =
|
847
|
-
useFieldAliasNames = false
|
848
|
+
fields = undefined,
|
849
|
+
useFieldAliasNames = false,
|
850
|
+
filterFields = false
|
848
851
|
): Promise<string[][]> {
|
849
|
-
if (fields.length === 0) {
|
850
|
-
fields = layer.fields.map(f => f.name.toLowerCase())
|
851
|
-
}
|
852
852
|
// Get the label formatting, if any
|
853
853
|
const labelFormatProps: ILabelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
854
854
|
|
@@ -929,7 +929,7 @@ export async function _prepareLabels(
|
|
929
929
|
if (featureLayer.fields) {
|
930
930
|
featureLayer.fields.forEach(
|
931
931
|
field => {
|
932
|
-
if (fields.indexOf(field.name.toLowerCase()) > -1) {
|
932
|
+
if (filterFields ? fields.indexOf(field.name.toLowerCase()) > -1 : true) {
|
933
933
|
const lowercaseFieldname = field.name.toLowerCase();
|
934
934
|
attributeOrigNames[lowercaseFieldname] = field.name;
|
935
935
|
attributeDomains[lowercaseFieldname] = field.domain;
|
@@ -941,7 +941,7 @@ export async function _prepareLabels(
|
|
941
941
|
// Feature layer is missing fields, so get info from first feature
|
942
942
|
Object.keys(featureSet[0]).forEach(
|
943
943
|
fieldName => {
|
944
|
-
if (fields.indexOf(fieldName.toLowerCase()) > -1) {
|
944
|
+
if (filterFields ? fields.indexOf(fieldName.toLowerCase()) > -1 : true) {
|
945
945
|
const lowercaseFieldname = fieldName.toLowerCase();
|
946
946
|
attributeOrigNames[lowercaseFieldname] = fieldName;
|
947
947
|
}
|
@@ -107,27 +107,23 @@ export async function queryFeaturesByID(ids, layer, graphics, returnGeometry, ou
|
|
107
107
|
var _a;
|
108
108
|
const num = (_a = layer.capabilities) === null || _a === void 0 ? void 0 : _a.query.maxRecordCount;
|
109
109
|
const start = 0;
|
110
|
+
if (ids.length === 0) {
|
111
|
+
ids = await layer.queryObjectIds();
|
112
|
+
}
|
110
113
|
const q = layer.createQuery();
|
111
|
-
q.start = start;
|
112
114
|
q.returnGeometry = returnGeometry;
|
113
115
|
q.objectIds = ids.slice(start, num);
|
114
|
-
if (num) {
|
115
|
-
q.num = num;
|
116
|
-
}
|
117
116
|
if (outSpatialReference) {
|
118
117
|
q.outSpatialReference = outSpatialReference;
|
119
118
|
}
|
120
119
|
if (fields) {
|
121
120
|
q.outFields = fields;
|
122
121
|
}
|
123
|
-
if (ids.length === 0) {
|
124
|
-
ids = await layer.queryObjectIds();
|
125
|
-
}
|
126
122
|
const result = await layer.queryFeatures(q);
|
127
123
|
graphics = graphics.concat(result.features);
|
128
124
|
const remainingIds = ids.slice(num, ids.length);
|
129
125
|
return remainingIds.length > 0 ?
|
130
|
-
queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference) :
|
126
|
+
queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference, fields) :
|
131
127
|
Promise.resolve(graphics);
|
132
128
|
}
|
133
129
|
/**
|
@@ -133,13 +133,14 @@ export async function queryFeaturesByID(
|
|
133
133
|
const num = layer.capabilities?.query.maxRecordCount;
|
134
134
|
const start = 0;
|
135
135
|
|
136
|
+
if (ids.length === 0) {
|
137
|
+
ids = await layer.queryObjectIds();
|
138
|
+
}
|
139
|
+
|
136
140
|
const q = layer.createQuery();
|
137
|
-
q.start = start;
|
138
141
|
q.returnGeometry = returnGeometry;
|
139
142
|
q.objectIds = ids.slice(start, num);
|
140
|
-
|
141
|
-
q.num = num;
|
142
|
-
}
|
143
|
+
|
143
144
|
if (outSpatialReference) {
|
144
145
|
q.outSpatialReference = outSpatialReference;
|
145
146
|
}
|
@@ -147,10 +148,6 @@ export async function queryFeaturesByID(
|
|
147
148
|
q.outFields = fields;
|
148
149
|
}
|
149
150
|
|
150
|
-
if (ids.length === 0) {
|
151
|
-
ids = await layer.queryObjectIds();
|
152
|
-
}
|
153
|
-
|
154
151
|
const result = await layer.queryFeatures(q);
|
155
152
|
|
156
153
|
graphics = graphics.concat(
|
@@ -159,7 +156,7 @@ export async function queryFeaturesByID(
|
|
159
156
|
|
160
157
|
const remainingIds = ids.slice(num, ids.length);
|
161
158
|
return remainingIds.length > 0 ?
|
162
|
-
queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference) :
|
159
|
+
queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference, fields) :
|
163
160
|
Promise.resolve(graphics);
|
164
161
|
}
|
165
162
|
|
@@ -2362,12 +2362,12 @@ const lineSeparatorChar = "|";
|
|
2362
2362
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2363
2363
|
* @returns selectionSetNames that will be used for export filenames
|
2364
2364
|
*/
|
2365
|
-
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields =
|
2365
|
+
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
2366
2366
|
const labelRequests = [];
|
2367
2367
|
Object.keys(exportInfos).forEach(k => {
|
2368
2368
|
var _a;
|
2369
2369
|
const labelInfo = exportInfos[k];
|
2370
|
-
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames));
|
2370
|
+
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames, filterFields));
|
2371
2371
|
if (isCSVExport) {
|
2372
2372
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
2373
2373
|
labelRequests.push(Promise.resolve([[k]]));
|
@@ -2387,8 +2387,8 @@ async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = tr
|
|
2387
2387
|
* @param addColumnTitle Indicates if column headings should be included in output
|
2388
2388
|
* @returns Promise resolving when function is done
|
2389
2389
|
*/
|
2390
|
-
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields =
|
2391
|
-
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames);
|
2390
|
+
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
2391
|
+
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames, filterFields);
|
2392
2392
|
labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
|
2393
2393
|
const layerIds = Object.keys(exportInfos);
|
2394
2394
|
let layerLabels = [];
|
@@ -2924,10 +2924,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2924
2924
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2925
2925
|
* @returns Promise resolving when function is done
|
2926
2926
|
*/
|
2927
|
-
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields =
|
2928
|
-
if (fields.length === 0) {
|
2929
|
-
fields = layer.fields.map(f => f.name.toLowerCase());
|
2930
|
-
}
|
2927
|
+
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
2931
2928
|
// Get the label formatting, if any
|
2932
2929
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
2933
2930
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -2994,7 +2991,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
2994
2991
|
const attributeDomains = {};
|
2995
2992
|
if (featureLayer.fields) {
|
2996
2993
|
featureLayer.fields.forEach(field => {
|
2997
|
-
if (fields.indexOf(field.name.toLowerCase()) > -1) {
|
2994
|
+
if (filterFields ? fields.indexOf(field.name.toLowerCase()) > -1 : true) {
|
2998
2995
|
const lowercaseFieldname = field.name.toLowerCase();
|
2999
2996
|
attributeOrigNames[lowercaseFieldname] = field.name;
|
3000
2997
|
attributeDomains[lowercaseFieldname] = field.domain;
|
@@ -3005,7 +3002,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
3005
3002
|
else {
|
3006
3003
|
// Feature layer is missing fields, so get info from first feature
|
3007
3004
|
Object.keys(featureSet[0]).forEach(fieldName => {
|
3008
|
-
if (fields.indexOf(fieldName.toLowerCase()) > -1) {
|
3005
|
+
if (filterFields ? fields.indexOf(fieldName.toLowerCase()) > -1 : true) {
|
3009
3006
|
const lowercaseFieldname = fieldName.toLowerCase();
|
3010
3007
|
attributeOrigNames[lowercaseFieldname] = fieldName;
|
3011
3008
|
}
|
@@ -56,10 +56,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
56
56
|
super();
|
57
57
|
this.__registerHost();
|
58
58
|
this.featureSelectionChange = createEvent(this, "featureSelectionChange", 7);
|
59
|
-
/**
|
60
|
-
* number[]: A list of all IDs for the current layer
|
61
|
-
*/
|
62
|
-
this._allIds = [];
|
63
59
|
/**
|
64
60
|
* boolean: When true the ctrl key is currently pressed
|
65
61
|
*/
|
@@ -115,6 +111,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
115
111
|
this.shareIncludeSocial = undefined;
|
116
112
|
this.showNewestFirst = undefined;
|
117
113
|
this.zoomAndScrollToSelected = undefined;
|
114
|
+
this._allIds = [];
|
118
115
|
this._controlsThatFit = undefined;
|
119
116
|
this._csvExporting = false;
|
120
117
|
this._fetchingData = false;
|
@@ -183,6 +180,13 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
183
180
|
this._initToolInfos();
|
184
181
|
}
|
185
182
|
}
|
183
|
+
/**
|
184
|
+
* watch for changes in map info and update the toolbar
|
185
|
+
*/
|
186
|
+
async mapInfoWatchHandler() {
|
187
|
+
this._initToolInfos();
|
188
|
+
this._updateToolbar();
|
189
|
+
}
|
186
190
|
/**
|
187
191
|
* watch for changes in map view and get the first layer
|
188
192
|
*/
|
@@ -1294,7 +1298,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1294
1298
|
exportInfos, false, // formatUsingLayerPopup
|
1295
1299
|
false, // removeDuplicates
|
1296
1300
|
true, // addColumnTitle
|
1297
|
-
fields, true);
|
1301
|
+
fields, true, true);
|
1298
1302
|
this._updateToolInfoLoading("export", false);
|
1299
1303
|
this._csvExporting = false;
|
1300
1304
|
}
|
@@ -1439,6 +1443,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1439
1443
|
"enableShare": ["enableShareWatchHandler"],
|
1440
1444
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1441
1445
|
"isMobile": ["isMobileWatchHandler"],
|
1446
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1442
1447
|
"mapView": ["mapViewWatchHandler"],
|
1443
1448
|
"_layer": ["_layerWatchHandler"],
|
1444
1449
|
"selectedIds": ["selectedIdsWatchHandler"]
|
@@ -1463,6 +1468,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1463
1468
|
"shareIncludeSocial": [4, "share-include-social"],
|
1464
1469
|
"showNewestFirst": [4, "show-newest-first"],
|
1465
1470
|
"zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
|
1471
|
+
"_allIds": [32],
|
1466
1472
|
"_controlsThatFit": [32],
|
1467
1473
|
"_csvExporting": [32],
|
1468
1474
|
"_fetchingData": [32],
|
@@ -1479,6 +1485,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1479
1485
|
"enableShare": ["enableShareWatchHandler"],
|
1480
1486
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1481
1487
|
"isMobile": ["isMobileWatchHandler"],
|
1488
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1482
1489
|
"mapView": ["mapViewWatchHandler"],
|
1483
1490
|
"_layer": ["_layerWatchHandler"],
|
1484
1491
|
"selectedIds": ["selectedIdsWatchHandler"]
|
@@ -64,27 +64,23 @@ async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatia
|
|
64
64
|
var _a;
|
65
65
|
const num = (_a = layer.capabilities) === null || _a === void 0 ? void 0 : _a.query.maxRecordCount;
|
66
66
|
const start = 0;
|
67
|
+
if (ids.length === 0) {
|
68
|
+
ids = await layer.queryObjectIds();
|
69
|
+
}
|
67
70
|
const q = layer.createQuery();
|
68
|
-
q.start = start;
|
69
71
|
q.returnGeometry = returnGeometry;
|
70
72
|
q.objectIds = ids.slice(start, num);
|
71
|
-
if (num) {
|
72
|
-
q.num = num;
|
73
|
-
}
|
74
73
|
if (outSpatialReference) {
|
75
74
|
q.outSpatialReference = outSpatialReference;
|
76
75
|
}
|
77
76
|
if (fields) {
|
78
77
|
q.outFields = fields;
|
79
78
|
}
|
80
|
-
if (ids.length === 0) {
|
81
|
-
ids = await layer.queryObjectIds();
|
82
|
-
}
|
83
79
|
const result = await layer.queryFeatures(q);
|
84
80
|
graphics = graphics.concat(result.features);
|
85
81
|
const remainingIds = ids.slice(num, ids.length);
|
86
82
|
return remainingIds.length > 0 ?
|
87
|
-
queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference) :
|
83
|
+
queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference, fields) :
|
88
84
|
Promise.resolve(graphics);
|
89
85
|
}
|
90
86
|
/**
|
@@ -12,7 +12,7 @@ import { o as onToggleOpenCloseComponent } from './openCloseComponent-9f90f493.j
|
|
12
12
|
import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
|
13
13
|
import { K as KindIcons } from './resources-88a48c5c.js';
|
14
14
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-25a5ae3e.js';
|
15
|
-
import { a as getAllLayers } from './mapViewUtils-
|
15
|
+
import { a as getAllLayers } from './mapViewUtils-20504620.js';
|
16
16
|
import { P as PopupUtils } from './popupUtils-23fe3c9f.js';
|
17
17
|
import './guid-b75a5f7b.js';
|
18
18
|
import './resources-8834f920.js';
|
@@ -22,7 +22,7 @@ import { V as Validation } from './Validation-ea480265.js';
|
|
22
22
|
import { d as debounce } from './debounce-229b1a22.js';
|
23
23
|
import { i as isActivationKey } from './key-c83d835f.js';
|
24
24
|
import { g as getLocaleComponentStrings } from './locale-25a5ae3e.js';
|
25
|
-
import { d as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-
|
25
|
+
import { d as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-20504620.js';
|
26
26
|
import { s as state } from './publicNotificationStore-3bf4de75.js';
|
27
27
|
import './resources-8834f920.js';
|
28
28
|
import './browser-d60104bd.js';
|
@@ -12,7 +12,7 @@ import { c as connectLocalized, d as disconnectLocalized } from './locale-904407
|
|
12
12
|
import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
|
13
13
|
import { S as SLOTS$1 } from './resources-00983bd3.js';
|
14
14
|
import { l as loadModules, g as getLocaleComponentStrings, f as formatNumber } from './locale-25a5ae3e.js';
|
15
|
-
import { a as getAllLayers, g as getLayerOrTable, b as getFeatureLayerView, h as highlightFeatures, d as getMapLayerHash } from './mapViewUtils-
|
15
|
+
import { a as getAllLayers, g as getLayerOrTable, b as getFeatureLayerView, h as highlightFeatures, d as getMapLayerHash } from './mapViewUtils-20504620.js';
|
16
16
|
import { P as PopupUtils } from './popupUtils-23fe3c9f.js';
|
17
17
|
import './guid-b75a5f7b.js';
|
18
18
|
import './resources-8834f920.js';
|
@@ -5,8 +5,8 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-164d485a.js';
|
7
7
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-25a5ae3e.js';
|
8
|
-
import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-
|
9
|
-
import { d as downloadCSV } from './downloadUtils-
|
8
|
+
import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-20504620.js';
|
9
|
+
import { d as downloadCSV } from './downloadUtils-3bab4b5f.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
import './interfaces-586e863c.js';
|
@@ -108,10 +108,6 @@ const LayerTable = class {
|
|
108
108
|
constructor(hostRef) {
|
109
109
|
registerInstance(this, hostRef);
|
110
110
|
this.featureSelectionChange = createEvent(this, "featureSelectionChange", 7);
|
111
|
-
/**
|
112
|
-
* number[]: A list of all IDs for the current layer
|
113
|
-
*/
|
114
|
-
this._allIds = [];
|
115
111
|
/**
|
116
112
|
* boolean: When true the ctrl key is currently pressed
|
117
113
|
*/
|
@@ -167,6 +163,7 @@ const LayerTable = class {
|
|
167
163
|
this.shareIncludeSocial = undefined;
|
168
164
|
this.showNewestFirst = undefined;
|
169
165
|
this.zoomAndScrollToSelected = undefined;
|
166
|
+
this._allIds = [];
|
170
167
|
this._controlsThatFit = undefined;
|
171
168
|
this._csvExporting = false;
|
172
169
|
this._fetchingData = false;
|
@@ -235,6 +232,13 @@ const LayerTable = class {
|
|
235
232
|
this._initToolInfos();
|
236
233
|
}
|
237
234
|
}
|
235
|
+
/**
|
236
|
+
* watch for changes in map info and update the toolbar
|
237
|
+
*/
|
238
|
+
async mapInfoWatchHandler() {
|
239
|
+
this._initToolInfos();
|
240
|
+
this._updateToolbar();
|
241
|
+
}
|
238
242
|
/**
|
239
243
|
* watch for changes in map view and get the first layer
|
240
244
|
*/
|
@@ -1346,7 +1350,7 @@ const LayerTable = class {
|
|
1346
1350
|
exportInfos, false, // formatUsingLayerPopup
|
1347
1351
|
false, // removeDuplicates
|
1348
1352
|
true, // addColumnTitle
|
1349
|
-
fields, true);
|
1353
|
+
fields, true, true);
|
1350
1354
|
this._updateToolInfoLoading("export", false);
|
1351
1355
|
this._csvExporting = false;
|
1352
1356
|
}
|
@@ -1491,6 +1495,7 @@ const LayerTable = class {
|
|
1491
1495
|
"enableShare": ["enableShareWatchHandler"],
|
1492
1496
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1493
1497
|
"isMobile": ["isMobileWatchHandler"],
|
1498
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1494
1499
|
"mapView": ["mapViewWatchHandler"],
|
1495
1500
|
"_layer": ["_layerWatchHandler"],
|
1496
1501
|
"selectedIds": ["selectedIdsWatchHandler"]
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-25a5ae3e.js';
|
8
8
|
import { E as ELayoutMode } from './interfaces-586e863c.js';
|
9
|
-
import { g as getLayerOrTable } from './mapViewUtils-
|
9
|
+
import { g as getLayerOrTable } from './mapViewUtils-20504620.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-25a5ae3e.js';
|
8
|
-
import { a as getAllLayers, b as getFeatureLayerView, h as highlightFeatures, g as getLayerOrTable, q as queryFeaturesByID } from './mapViewUtils-
|
8
|
+
import { a as getAllLayers, b as getFeatureLayerView, h as highlightFeatures, g as getLayerOrTable, q as queryFeaturesByID } from './mapViewUtils-20504620.js';
|
9
9
|
import './esri-loader-eda07632.js';
|
10
10
|
import './_commonjsHelpers-d5f9d613.js';
|
11
11
|
import './interfaces-586e863c.js';
|
@@ -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-164d485a.js';
|
8
8
|
import { l as loadModules } from './locale-25a5ae3e.js';
|
9
|
-
import { q as queryFeaturesByID } from './mapViewUtils-
|
9
|
+
import { q as queryFeaturesByID } from './mapViewUtils-20504620.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-be703f2b.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
|
@@ -2362,12 +2362,12 @@ const lineSeparatorChar = "|";
|
|
2362
2362
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2363
2363
|
* @returns selectionSetNames that will be used for export filenames
|
2364
2364
|
*/
|
2365
|
-
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields =
|
2365
|
+
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
2366
2366
|
const labelRequests = [];
|
2367
2367
|
Object.keys(exportInfos).forEach(k => {
|
2368
2368
|
var _a;
|
2369
2369
|
const labelInfo = exportInfos[k];
|
2370
|
-
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames));
|
2370
|
+
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames, fields, useFieldAliasNames, filterFields));
|
2371
2371
|
if (isCSVExport) {
|
2372
2372
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
2373
2373
|
labelRequests.push(Promise.resolve([[k]]));
|
@@ -2387,8 +2387,8 @@ async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = tr
|
|
2387
2387
|
* @param addColumnTitle Indicates if column headings should be included in output
|
2388
2388
|
* @returns Promise resolving when function is done
|
2389
2389
|
*/
|
2390
|
-
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields =
|
2391
|
-
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames);
|
2390
|
+
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
2391
|
+
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true, fields, useFieldAliasNames, filterFields);
|
2392
2392
|
labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
|
2393
2393
|
const layerIds = Object.keys(exportInfos);
|
2394
2394
|
let layerLabels = [];
|
@@ -2924,10 +2924,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2924
2924
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2925
2925
|
* @returns Promise resolving when function is done
|
2926
2926
|
*/
|
2927
|
-
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields =
|
2928
|
-
if (fields.length === 0) {
|
2929
|
-
fields = layer.fields.map(f => f.name.toLowerCase());
|
2930
|
-
}
|
2927
|
+
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
|
2931
2928
|
// Get the label formatting, if any
|
2932
2929
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
2933
2930
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -2994,7 +2991,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
2994
2991
|
const attributeDomains = {};
|
2995
2992
|
if (featureLayer.fields) {
|
2996
2993
|
featureLayer.fields.forEach(field => {
|
2997
|
-
if (fields.indexOf(field.name.toLowerCase()) > -1) {
|
2994
|
+
if (filterFields ? fields.indexOf(field.name.toLowerCase()) > -1 : true) {
|
2998
2995
|
const lowercaseFieldname = field.name.toLowerCase();
|
2999
2996
|
attributeOrigNames[lowercaseFieldname] = field.name;
|
3000
2997
|
attributeDomains[lowercaseFieldname] = field.domain;
|
@@ -3005,7 +3002,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
3005
3002
|
else {
|
3006
3003
|
// Feature layer is missing fields, so get info from first feature
|
3007
3004
|
Object.keys(featureSet[0]).forEach(fieldName => {
|
3008
|
-
if (fields.indexOf(fieldName.toLowerCase()) > -1) {
|
3005
|
+
if (filterFields ? fields.indexOf(fieldName.toLowerCase()) > -1 : true) {
|
3009
3006
|
const lowercaseFieldname = fieldName.toLowerCase();
|
3010
3007
|
attributeOrigNames[lowercaseFieldname] = fieldName;
|
3011
3008
|
}
|
@@ -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-3bab4b5f.js';
|
8
8
|
import './index-164d485a.js';
|
9
9
|
import './locale-25a5ae3e.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
|
-
import './mapViewUtils-
|
11
|
+
import './mapViewUtils-20504620.js';
|
12
12
|
import './interfaces-586e863c.js';
|
13
13
|
import './solution-resource-7b8d302d.js';
|
14
14
|
import './index-a1e91462.js';
|