@esri/solutions-components 0.7.41 → 0.7.42
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/card-manager_3.cjs.entry.js +20 -23
- package/dist/cjs/{downloadUtils-b10e3b8c.js → downloadUtils-7d4985c0.js} +5 -3
- package/dist/cjs/{index.es-b9d6eff6.js → index.es-8cef354a.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +21 -24
- package/dist/collection/utils/downloadUtils.js +4 -2
- package/dist/collection/utils/downloadUtils.ts +4 -2
- package/dist/components/downloadUtils.js +4 -2
- package/dist/components/layer-table2.js +20 -23
- package/dist/esm/card-manager_3.entry.js +20 -23
- package/dist/esm/{downloadUtils-20d22198.js → downloadUtils-d5928e55.js} +5 -3
- package/dist/esm/{index.es-8b85f68d.js → index.es-a1725c19.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-f6536eae.js → p-12fc82a9.js} +2 -2
- package/dist/solutions-components/{p-2283ae14.entry.js → p-3e88e0bd.entry.js} +1 -1
- package/dist/solutions-components/p-52945707.entry.js +6 -0
- package/dist/solutions-components/{p-17e328bb.js → p-7f374ec7.js} +1 -1
- package/dist/solutions-components/{p-69a1df0f.entry.js → p-ac9c29da.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +4 -2
- package/dist/types/components/layer-table/layer-table.d.ts +4 -4
- package/package.json +1 -1
- package/dist/solutions-components/p-aecf92f4.entry.js +0 -6
@@ -124,6 +124,16 @@ export class LayerTable {
|
|
124
124
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
125
125
|
}
|
126
126
|
}
|
127
|
+
/**
|
128
|
+
* Update the toolbar when the share button is enabled/disabled
|
129
|
+
*/
|
130
|
+
enableShareWatchHandler() {
|
131
|
+
// this should be caught by component did render and is when I test locally
|
132
|
+
// however have had reported case where it is not somehow on devext so adding explicit check here
|
133
|
+
if (this._toolbar) {
|
134
|
+
this._updateToolbar();
|
135
|
+
}
|
136
|
+
}
|
127
137
|
/**
|
128
138
|
* watch for changes to the list of controls that will currently fit in the display
|
129
139
|
*/
|
@@ -149,17 +159,6 @@ export class LayerTable {
|
|
149
159
|
this._initToolInfos();
|
150
160
|
}
|
151
161
|
}
|
152
|
-
/**
|
153
|
-
* watch for changes in map info and recheck the tool infos
|
154
|
-
*/
|
155
|
-
async mapInfoWatchHandler() {
|
156
|
-
var _a;
|
157
|
-
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
158
|
-
this._initToolInfos();
|
159
|
-
}
|
160
|
-
this._initLayerExpressions();
|
161
|
-
this._resetColumnTemplates();
|
162
|
-
}
|
163
162
|
/**
|
164
163
|
* watch for changes in map view and get the first layer
|
165
164
|
*/
|
@@ -634,7 +633,7 @@ export class LayerTable {
|
|
634
633
|
this._setControlsThatFit(controlsThatFit, skipControls);
|
635
634
|
}
|
636
635
|
}
|
637
|
-
},
|
636
|
+
}, 250);
|
638
637
|
}
|
639
638
|
}
|
640
639
|
/**
|
@@ -859,7 +858,6 @@ export class LayerTable {
|
|
859
858
|
},
|
860
859
|
container: node
|
861
860
|
});
|
862
|
-
this._table.columnPerformanceModeEnabled = false;
|
863
861
|
});
|
864
862
|
this._initColumnsInfo();
|
865
863
|
this._checkEditEnabled();
|
@@ -992,19 +990,17 @@ export class LayerTable {
|
|
992
990
|
if (!this._table) {
|
993
991
|
await this._getTable(this._tableNode, columnTemplates);
|
994
992
|
}
|
995
|
-
else if (columnTemplates) {
|
996
|
-
this._table.tableTemplate.columnTemplates = columnTemplates;
|
997
|
-
}
|
998
993
|
this._table.layer = this._layer;
|
999
994
|
this._table.view = this.mapView;
|
1000
995
|
this._checkEditEnabled();
|
1001
996
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
1002
997
|
this._initToolInfos();
|
1003
|
-
await this.
|
998
|
+
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
999
|
+
.then(async () => {
|
1004
1000
|
var _a, _b;
|
1005
1001
|
this._table.highlightIds.removeAll();
|
1006
1002
|
this._table.clearSelectionFilter();
|
1007
|
-
this.
|
1003
|
+
this._resetColumnTemplates();
|
1008
1004
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
|
1009
1005
|
this._selectDefaultFeature(this.defaultOid);
|
1010
1006
|
this._defaultOidHonored = true;
|
@@ -1022,10 +1018,11 @@ export class LayerTable {
|
|
1022
1018
|
this._filterActive = true;
|
1023
1019
|
this._defaultFilterHonored = true;
|
1024
1020
|
}
|
1021
|
+
this._showOnlySelected = false;
|
1022
|
+
this._sortActive = false;
|
1023
|
+
await this._sortTable();
|
1024
|
+
this._updateToolbar();
|
1025
1025
|
});
|
1026
|
-
this._showOnlySelected = false;
|
1027
|
-
this._sortActive = false;
|
1028
|
-
await this._sortTable();
|
1029
1026
|
}
|
1030
1027
|
/**
|
1031
1028
|
* Store the column names and current hidden status to support show/hide of columns
|
@@ -1798,15 +1795,15 @@ export class LayerTable {
|
|
1798
1795
|
}, {
|
1799
1796
|
"propName": "enableInlineEdit",
|
1800
1797
|
"methodName": "enableInlineEditWatchHandler"
|
1798
|
+
}, {
|
1799
|
+
"propName": "enableShare",
|
1800
|
+
"methodName": "enableShareWatchHandler"
|
1801
1801
|
}, {
|
1802
1802
|
"propName": "_controlsThatFit",
|
1803
1803
|
"methodName": "_controlsThatFitWatchHandler"
|
1804
1804
|
}, {
|
1805
1805
|
"propName": "isMobile",
|
1806
1806
|
"methodName": "isMobileWatchHandler"
|
1807
|
-
}, {
|
1808
|
-
"propName": "mapInfo",
|
1809
|
-
"methodName": "mapInfoWatchHandler"
|
1810
1807
|
}, {
|
1811
1808
|
"propName": "mapView",
|
1812
1809
|
"methodName": "mapViewWatchHandler"
|
@@ -606,6 +606,9 @@ export function _prepareAttributeValue(attributeValue, attributeType, attributeD
|
|
606
606
|
* @returns Promise resolving when function is done
|
607
607
|
*/
|
608
608
|
export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = [], useFieldAliasNames = false) {
|
609
|
+
if (fields.length === 0) {
|
610
|
+
fields = layer.fields.map(f => f.name.toLowerCase());
|
611
|
+
}
|
609
612
|
// Get the label formatting, if any
|
610
613
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
611
614
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -664,8 +667,7 @@ export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup =
|
|
664
667
|
}
|
665
668
|
else {
|
666
669
|
// Get the features to export
|
667
|
-
|
668
|
-
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
|
670
|
+
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
|
669
671
|
}
|
670
672
|
// Get field data types. Do we have any domain-based fields?
|
671
673
|
const attributeOrigNames = {};
|
@@ -846,6 +846,9 @@ export async function _prepareLabels(
|
|
846
846
|
fields = [],
|
847
847
|
useFieldAliasNames = false
|
848
848
|
): Promise<string[][]> {
|
849
|
+
if (fields.length === 0) {
|
850
|
+
fields = layer.fields.map(f => f.name.toLowerCase())
|
851
|
+
}
|
849
852
|
// Get the label formatting, if any
|
850
853
|
const labelFormatProps: ILabelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
851
854
|
|
@@ -915,8 +918,7 @@ export async function _prepareLabels(
|
|
915
918
|
|
916
919
|
} else {
|
917
920
|
// Get the features to export
|
918
|
-
|
919
|
-
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
|
921
|
+
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
|
920
922
|
}
|
921
923
|
|
922
924
|
// Get field data types. Do we have any domain-based fields?
|
@@ -2925,6 +2925,9 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2925
2925
|
* @returns Promise resolving when function is done
|
2926
2926
|
*/
|
2927
2927
|
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = [], useFieldAliasNames = false) {
|
2928
|
+
if (fields.length === 0) {
|
2929
|
+
fields = layer.fields.map(f => f.name.toLowerCase());
|
2930
|
+
}
|
2928
2931
|
// Get the label formatting, if any
|
2929
2932
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
2930
2933
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -2983,8 +2986,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
2983
2986
|
}
|
2984
2987
|
else {
|
2985
2988
|
// Get the features to export
|
2986
|
-
|
2987
|
-
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
|
2989
|
+
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
|
2988
2990
|
}
|
2989
2991
|
// Get field data types. Do we have any domain-based fields?
|
2990
2992
|
const attributeOrigNames = {};
|
@@ -153,6 +153,16 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
153
153
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
154
154
|
}
|
155
155
|
}
|
156
|
+
/**
|
157
|
+
* Update the toolbar when the share button is enabled/disabled
|
158
|
+
*/
|
159
|
+
enableShareWatchHandler() {
|
160
|
+
// this should be caught by component did render and is when I test locally
|
161
|
+
// however have had reported case where it is not somehow on devext so adding explicit check here
|
162
|
+
if (this._toolbar) {
|
163
|
+
this._updateToolbar();
|
164
|
+
}
|
165
|
+
}
|
156
166
|
/**
|
157
167
|
* watch for changes to the list of controls that will currently fit in the display
|
158
168
|
*/
|
@@ -178,17 +188,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
178
188
|
this._initToolInfos();
|
179
189
|
}
|
180
190
|
}
|
181
|
-
/**
|
182
|
-
* watch for changes in map info and recheck the tool infos
|
183
|
-
*/
|
184
|
-
async mapInfoWatchHandler() {
|
185
|
-
var _a;
|
186
|
-
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
187
|
-
this._initToolInfos();
|
188
|
-
}
|
189
|
-
this._initLayerExpressions();
|
190
|
-
this._resetColumnTemplates();
|
191
|
-
}
|
192
191
|
/**
|
193
192
|
* watch for changes in map view and get the first layer
|
194
193
|
*/
|
@@ -663,7 +662,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
663
662
|
this._setControlsThatFit(controlsThatFit, skipControls);
|
664
663
|
}
|
665
664
|
}
|
666
|
-
},
|
665
|
+
}, 250);
|
667
666
|
}
|
668
667
|
}
|
669
668
|
/**
|
@@ -888,7 +887,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
888
887
|
},
|
889
888
|
container: node
|
890
889
|
});
|
891
|
-
this._table.columnPerformanceModeEnabled = false;
|
892
890
|
});
|
893
891
|
this._initColumnsInfo();
|
894
892
|
this._checkEditEnabled();
|
@@ -1021,19 +1019,17 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1021
1019
|
if (!this._table) {
|
1022
1020
|
await this._getTable(this._tableNode, columnTemplates);
|
1023
1021
|
}
|
1024
|
-
else if (columnTemplates) {
|
1025
|
-
this._table.tableTemplate.columnTemplates = columnTemplates;
|
1026
|
-
}
|
1027
1022
|
this._table.layer = this._layer;
|
1028
1023
|
this._table.view = this.mapView;
|
1029
1024
|
this._checkEditEnabled();
|
1030
1025
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
1031
1026
|
this._initToolInfos();
|
1032
|
-
await this.
|
1027
|
+
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
1028
|
+
.then(async () => {
|
1033
1029
|
var _a, _b;
|
1034
1030
|
this._table.highlightIds.removeAll();
|
1035
1031
|
this._table.clearSelectionFilter();
|
1036
|
-
this.
|
1032
|
+
this._resetColumnTemplates();
|
1037
1033
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
|
1038
1034
|
this._selectDefaultFeature(this.defaultOid);
|
1039
1035
|
this._defaultOidHonored = true;
|
@@ -1051,10 +1047,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1051
1047
|
this._filterActive = true;
|
1052
1048
|
this._defaultFilterHonored = true;
|
1053
1049
|
}
|
1050
|
+
this._showOnlySelected = false;
|
1051
|
+
this._sortActive = false;
|
1052
|
+
await this._sortTable();
|
1053
|
+
this._updateToolbar();
|
1054
1054
|
});
|
1055
|
-
this._showOnlySelected = false;
|
1056
|
-
this._sortActive = false;
|
1057
|
-
await this._sortTable();
|
1058
1055
|
}
|
1059
1056
|
/**
|
1060
1057
|
* Store the column names and current hidden status to support show/hide of columns
|
@@ -1462,9 +1459,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1462
1459
|
static get watchers() { return {
|
1463
1460
|
"enableCSV": ["enableCSVWatchHandler"],
|
1464
1461
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1462
|
+
"enableShare": ["enableShareWatchHandler"],
|
1465
1463
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1466
1464
|
"isMobile": ["isMobileWatchHandler"],
|
1467
|
-
"mapInfo": ["mapInfoWatchHandler"],
|
1468
1465
|
"mapView": ["mapViewWatchHandler"],
|
1469
1466
|
"_layer": ["_layerWatchHandler"],
|
1470
1467
|
"selectedIds": ["selectedIdsWatchHandler"],
|
@@ -1504,9 +1501,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1504
1501
|
}, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "levelChanged", "levelChanged"], [8, "noLayersFound", "noLayersFound"]], {
|
1505
1502
|
"enableCSV": ["enableCSVWatchHandler"],
|
1506
1503
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1504
|
+
"enableShare": ["enableShareWatchHandler"],
|
1507
1505
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1508
1506
|
"isMobile": ["isMobileWatchHandler"],
|
1509
|
-
"mapInfo": ["mapInfoWatchHandler"],
|
1510
1507
|
"mapView": ["mapViewWatchHandler"],
|
1511
1508
|
"_layer": ["_layerWatchHandler"],
|
1512
1509
|
"selectedIds": ["selectedIdsWatchHandler"],
|
@@ -6,7 +6,7 @@
|
|
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
8
|
import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-a177d4f9.js';
|
9
|
-
import { d as downloadCSV } from './downloadUtils-
|
9
|
+
import { d as downloadCSV } from './downloadUtils-d5928e55.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
import './interfaces-586e863c.js';
|
@@ -205,6 +205,16 @@ const LayerTable = class {
|
|
205
205
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
206
206
|
}
|
207
207
|
}
|
208
|
+
/**
|
209
|
+
* Update the toolbar when the share button is enabled/disabled
|
210
|
+
*/
|
211
|
+
enableShareWatchHandler() {
|
212
|
+
// this should be caught by component did render and is when I test locally
|
213
|
+
// however have had reported case where it is not somehow on devext so adding explicit check here
|
214
|
+
if (this._toolbar) {
|
215
|
+
this._updateToolbar();
|
216
|
+
}
|
217
|
+
}
|
208
218
|
/**
|
209
219
|
* watch for changes to the list of controls that will currently fit in the display
|
210
220
|
*/
|
@@ -230,17 +240,6 @@ const LayerTable = class {
|
|
230
240
|
this._initToolInfos();
|
231
241
|
}
|
232
242
|
}
|
233
|
-
/**
|
234
|
-
* watch for changes in map info and recheck the tool infos
|
235
|
-
*/
|
236
|
-
async mapInfoWatchHandler() {
|
237
|
-
var _a;
|
238
|
-
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
239
|
-
this._initToolInfos();
|
240
|
-
}
|
241
|
-
this._initLayerExpressions();
|
242
|
-
this._resetColumnTemplates();
|
243
|
-
}
|
244
243
|
/**
|
245
244
|
* watch for changes in map view and get the first layer
|
246
245
|
*/
|
@@ -715,7 +714,7 @@ const LayerTable = class {
|
|
715
714
|
this._setControlsThatFit(controlsThatFit, skipControls);
|
716
715
|
}
|
717
716
|
}
|
718
|
-
},
|
717
|
+
}, 250);
|
719
718
|
}
|
720
719
|
}
|
721
720
|
/**
|
@@ -940,7 +939,6 @@ const LayerTable = class {
|
|
940
939
|
},
|
941
940
|
container: node
|
942
941
|
});
|
943
|
-
this._table.columnPerformanceModeEnabled = false;
|
944
942
|
});
|
945
943
|
this._initColumnsInfo();
|
946
944
|
this._checkEditEnabled();
|
@@ -1073,19 +1071,17 @@ const LayerTable = class {
|
|
1073
1071
|
if (!this._table) {
|
1074
1072
|
await this._getTable(this._tableNode, columnTemplates);
|
1075
1073
|
}
|
1076
|
-
else if (columnTemplates) {
|
1077
|
-
this._table.tableTemplate.columnTemplates = columnTemplates;
|
1078
|
-
}
|
1079
1074
|
this._table.layer = this._layer;
|
1080
1075
|
this._table.view = this.mapView;
|
1081
1076
|
this._checkEditEnabled();
|
1082
1077
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
1083
1078
|
this._initToolInfos();
|
1084
|
-
await this.
|
1079
|
+
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
1080
|
+
.then(async () => {
|
1085
1081
|
var _a, _b;
|
1086
1082
|
this._table.highlightIds.removeAll();
|
1087
1083
|
this._table.clearSelectionFilter();
|
1088
|
-
this.
|
1084
|
+
this._resetColumnTemplates();
|
1089
1085
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
|
1090
1086
|
this._selectDefaultFeature(this.defaultOid);
|
1091
1087
|
this._defaultOidHonored = true;
|
@@ -1103,10 +1099,11 @@ const LayerTable = class {
|
|
1103
1099
|
this._filterActive = true;
|
1104
1100
|
this._defaultFilterHonored = true;
|
1105
1101
|
}
|
1102
|
+
this._showOnlySelected = false;
|
1103
|
+
this._sortActive = false;
|
1104
|
+
await this._sortTable();
|
1105
|
+
this._updateToolbar();
|
1106
1106
|
});
|
1107
|
-
this._showOnlySelected = false;
|
1108
|
-
this._sortActive = false;
|
1109
|
-
await this._sortTable();
|
1110
1107
|
}
|
1111
1108
|
/**
|
1112
1109
|
* Store the column names and current hidden status to support show/hide of columns
|
@@ -1514,9 +1511,9 @@ const LayerTable = class {
|
|
1514
1511
|
static get watchers() { return {
|
1515
1512
|
"enableCSV": ["enableCSVWatchHandler"],
|
1516
1513
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1514
|
+
"enableShare": ["enableShareWatchHandler"],
|
1517
1515
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1518
1516
|
"isMobile": ["isMobileWatchHandler"],
|
1519
|
-
"mapInfo": ["mapInfoWatchHandler"],
|
1520
1517
|
"mapView": ["mapViewWatchHandler"],
|
1521
1518
|
"_layer": ["_layerWatchHandler"],
|
1522
1519
|
"selectedIds": ["selectedIdsWatchHandler"],
|
@@ -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-a1725c19.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
|
@@ -2925,6 +2925,9 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2925
2925
|
* @returns Promise resolving when function is done
|
2926
2926
|
*/
|
2927
2927
|
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = [], useFieldAliasNames = false) {
|
2928
|
+
if (fields.length === 0) {
|
2929
|
+
fields = layer.fields.map(f => f.name.toLowerCase());
|
2930
|
+
}
|
2928
2931
|
// Get the label formatting, if any
|
2929
2932
|
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
2930
2933
|
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
@@ -2983,8 +2986,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
2983
2986
|
}
|
2984
2987
|
else {
|
2985
2988
|
// Get the features to export
|
2986
|
-
|
2987
|
-
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
|
2989
|
+
featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
|
2988
2990
|
}
|
2989
2991
|
// Get field data types. Do we have any domain-based fields?
|
2990
2992
|
const attributeOrigNames = {};
|
@@ -4,7 +4,7 @@
|
|
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-d5928e55.js';
|
8
8
|
import './index-164d485a.js';
|
9
9
|
import './locale-25a5ae3e.js';
|
10
10
|
import './esri-loader-eda07632.js';
|