@esri/solutions-components 0.4.1 → 0.4.3
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/assets/t9n/map-select-tools/resources.json +1 -1
- package/dist/assets/t9n/map-select-tools/resources_en.json +1 -1
- package/dist/assets/t9n/public-notification/resources.json +6 -3
- package/dist/assets/t9n/public-notification/resources_en.json +6 -3
- package/dist/assets/t9n/refine-selection/resources.json +3 -3
- package/dist/assets/t9n/refine-selection/resources_en.json +3 -3
- package/dist/cjs/add-record-modal.cjs.entry.js +1 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +5 -2
- package/dist/cjs/calcite-dropdown-group_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +16 -12
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
- package/dist/cjs/card-manager.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-27dbd8b9.js → downloadUtils-ae182e3a.js} +89 -16
- package/dist/cjs/{index.es-40d341ed.js → index.es-b71e9071.js} +3 -3
- package/dist/cjs/info-card_2.cjs.entry.js +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +4 -4
- package/dist/cjs/{loadModules-918ff3e7.js → loadModules-0806a34f.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-db1db902.js → locale-04da9a8c.js} +1 -0
- package/dist/cjs/map-card.cjs.entry.js +2 -2
- package/dist/cjs/map-search.cjs.entry.js +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +40 -13
- package/dist/cjs/solution-configuration.cjs.entry.js +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +21 -5
- package/dist/collection/components/pdf-download/pdf-download.js +26 -6
- package/dist/collection/components/public-notification/public-notification.js +46 -12
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +17 -0
- package/dist/collection/utils/downloadUtils.js +87 -14
- package/dist/collection/utils/downloadUtils.ts +123 -14
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/locale.ts +1 -1
- package/dist/components/downloadUtils.js +87 -14
- package/dist/components/layer-table.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/map-select-tools2.js +7 -5
- package/dist/components/pdf-download2.js +6 -4
- package/dist/components/public-notification.js +41 -13
- package/dist/components/refine-selection-tools2.js +3 -0
- package/dist/esm/add-record-modal.entry.js +1 -1
- package/dist/esm/buffer-tools_6.entry.js +5 -2
- package/dist/esm/calcite-dropdown-group_4.entry.js +1 -1
- package/dist/esm/calcite-input-message_5.entry.js +16 -12
- package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
- package/dist/esm/card-manager.entry.js +1 -1
- package/dist/esm/{downloadUtils-76e38a94.js → downloadUtils-8d64719e.js} +89 -16
- package/dist/esm/{index.es-489f4f08.js → index.es-1d777745.js} +3 -3
- package/dist/esm/info-card_2.entry.js +1 -1
- package/dist/esm/layer-table.entry.js +4 -4
- package/dist/esm/{loadModules-649aedac.js → loadModules-b299cd43.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-4a87aff1.js → locale-7bf10e0a.js} +1 -1
- package/dist/esm/map-card.entry.js +2 -2
- package/dist/esm/map-search.entry.js +2 -2
- package/dist/esm/public-notification.entry.js +40 -13
- package/dist/esm/solution-configuration.entry.js +1 -1
- package/dist/esm/solution-contents_3.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-caa7e7a7.js → p-01215468.js} +11 -11
- package/dist/solutions-components/{p-92cb569a.entry.js → p-048a4c91.entry.js} +1 -1
- package/dist/solutions-components/{p-8eeb8faa.entry.js → p-0e459cc7.entry.js} +1 -1
- package/dist/solutions-components/{p-4ef269be.entry.js → p-43d4ceda.entry.js} +1 -1
- package/dist/solutions-components/{p-eea93a37.js → p-4aa3ba60.js} +1 -1
- package/dist/solutions-components/p-4bfcd9ea.entry.js +17 -0
- package/dist/solutions-components/{p-13b4fb80.entry.js → p-4cbaf0f1.entry.js} +1 -1
- package/dist/solutions-components/{p-ebd3f353.entry.js → p-6f012424.entry.js} +1 -1
- package/dist/solutions-components/{p-bff8aa4e.js → p-702e1915.js} +1 -1
- package/dist/solutions-components/{p-0a4c2213.entry.js → p-74cfd344.entry.js} +1 -1
- package/dist/solutions-components/{p-a3b60bc9.entry.js → p-773918c0.entry.js} +2 -2
- package/dist/solutions-components/{p-9260d75a.js → p-829e6d4f.js} +2 -2
- package/dist/solutions-components/{p-7a411772.entry.js → p-9e8a371f.entry.js} +1 -1
- package/dist/solutions-components/p-a99ca396.entry.js +6 -0
- package/dist/solutions-components/{p-b342e3ff.entry.js → p-af9c7482.entry.js} +1 -1
- package/dist/solutions-components/{p-05e26a56.entry.js → p-d5a76fb0.entry.js} +1 -1
- package/dist/solutions-components/{p-bf45dbae.entry.js → p-dd0241fb.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +123 -14
- package/dist/solutions-components/utils/locale.ts +1 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +5 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +4 -2
- package/dist/types/components/public-notification/public-notification.d.ts +21 -1
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +4 -0
- package/dist/types/components.d.ts +12 -2
- package/dist/types/preact.d.ts +4 -2
- package/dist/types/utils/downloadUtils.d.ts +4 -2
- package/dist/types/utils/locale.d.ts +1 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-4ef94c6b.entry.js +0 -6
- package/dist/solutions-components/p-5d27b47d.entry.js +0 -17
- package/dist/types/components/json-editor/assets/monaco-editor/monaco.d.ts +0 -8262
|
@@ -2127,6 +2127,7 @@ function _downloadPDFFile(labels, labelPageDescription, fileTitle) {
|
|
|
2127
2127
|
/**
|
|
2128
2128
|
* Downloads csv of mailing labels for the provided list of ids
|
|
2129
2129
|
*
|
|
2130
|
+
* @param selectionSetNames Names of the selection sets used to provide ids
|
|
2130
2131
|
* @param layer Layer providing features and attributes for download
|
|
2131
2132
|
* @param ids List of ids to download
|
|
2132
2133
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
|
@@ -2135,7 +2136,8 @@ function _downloadPDFFile(labels, labelPageDescription, fileTitle) {
|
|
|
2135
2136
|
* @param addColumnTitle Indicates if column headings should be included in output
|
|
2136
2137
|
* @returns Promise resolving when function is done
|
|
2137
2138
|
*/
|
|
2138
|
-
async function downloadCSV(layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
|
2139
|
+
async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
|
2140
|
+
console.log("downloadCSV using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2139
2141
|
const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
|
|
2140
2142
|
exportCSV(labels);
|
|
2141
2143
|
return Promise.resolve();
|
|
@@ -2143,13 +2145,15 @@ async function downloadCSV(layer, ids, formatUsingLayerPopup, removeDuplicates =
|
|
|
2143
2145
|
/**
|
|
2144
2146
|
* Downloads csv of mailing labels for the provided list of ids
|
|
2145
2147
|
*
|
|
2148
|
+
* @param selectionSetNames Names of the selection sets used to provide ids
|
|
2146
2149
|
* @param layer Layer providing features and attributes for download
|
|
2147
2150
|
* @param ids List of ids to download
|
|
2148
2151
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
2149
2152
|
* @param labelPageDescription Provides PDF page layout info
|
|
2150
2153
|
* @returns Promise resolving when function is done
|
|
2151
2154
|
*/
|
|
2152
|
-
async function downloadPDF(layer, ids, removeDuplicates, labelPageDescription) {
|
|
2155
|
+
async function downloadPDF(selectionSetNames, layer, ids, removeDuplicates, labelPageDescription) {
|
|
2156
|
+
console.log("downloadPDF using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2153
2157
|
const labels = await _prepareLabels(layer, ids, removeDuplicates);
|
|
2154
2158
|
exportPDF(labels, labelPageDescription);
|
|
2155
2159
|
return Promise.resolve();
|
|
@@ -2160,13 +2164,14 @@ async function downloadPDF(layer, ids, removeDuplicates, labelPageDescription) {
|
|
|
2160
2164
|
* Converts a set of fieldInfos into template lines.
|
|
2161
2165
|
*
|
|
2162
2166
|
* @param fieldInfos Layer's fieldInfos structure
|
|
2167
|
+
* @param bypassFieldVisiblity Indicates if the configured fieldInfo visibility property should be ignored
|
|
2163
2168
|
* @return Label spec
|
|
2164
2169
|
*/
|
|
2165
|
-
function _convertPopupFieldsToLabelSpec(fieldInfos) {
|
|
2170
|
+
function _convertPopupFieldsToLabelSpec(fieldInfos, bypassFieldVisiblity = false) {
|
|
2166
2171
|
const labelSpec = [];
|
|
2167
2172
|
// Every visible attribute is used
|
|
2168
2173
|
fieldInfos.forEach(fieldInfo => {
|
|
2169
|
-
if (fieldInfo.visible) {
|
|
2174
|
+
if (fieldInfo.visible || bypassFieldVisiblity) {
|
|
2170
2175
|
labelSpec.push(`{${fieldInfo.fieldName}}`);
|
|
2171
2176
|
}
|
|
2172
2177
|
});
|
|
@@ -2196,6 +2201,49 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
2196
2201
|
labelSpec = labelSpec.map(line => line.trim()).filter(line => line.length > 0);
|
|
2197
2202
|
return labelSpec;
|
|
2198
2203
|
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Extracts Arcade expressions from the lines of a label format and creates an Arcade executor for each
|
|
2206
|
+
* referenced expression name.
|
|
2207
|
+
*
|
|
2208
|
+
* @param labelFormat Label to examine
|
|
2209
|
+
* @param layer Layer from which to fetch features
|
|
2210
|
+
* @return Promise resolving to a set of executors keyed using the expression name
|
|
2211
|
+
*/
|
|
2212
|
+
async function _createArcadeExecutors(labelFormat, layer) {
|
|
2213
|
+
const arcadeExecutors = {};
|
|
2214
|
+
// Are any Arcade expressions in the layer?
|
|
2215
|
+
if (!Array.isArray(layer.popupTemplate.expressionInfos) || layer.popupTemplate.expressionInfos.length === 0) {
|
|
2216
|
+
return Promise.resolve(arcadeExecutors);
|
|
2217
|
+
}
|
|
2218
|
+
// Are there any Arcade expressions in the label format?
|
|
2219
|
+
const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
|
|
2220
|
+
const arcadeExpressionsMatches = labelFormat.join("|").match(arcadeExpressionRegExp);
|
|
2221
|
+
if (!arcadeExpressionsMatches) {
|
|
2222
|
+
return Promise.resolve(arcadeExecutors);
|
|
2223
|
+
}
|
|
2224
|
+
// Generate an Arcade executor for each match
|
|
2225
|
+
const [arcade] = await loadModules(["esri/arcade"]);
|
|
2226
|
+
const labelingProfile = arcade.createArcadeProfile("popup");
|
|
2227
|
+
const createArcadeExecutorPromises = {};
|
|
2228
|
+
arcadeExpressionsMatches.forEach((match) => {
|
|
2229
|
+
const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
|
|
2230
|
+
(layer.popupTemplate.expressionInfos || []).forEach(expressionInfo => {
|
|
2231
|
+
if (expressionInfo.name === expressionName) {
|
|
2232
|
+
createArcadeExecutorPromises[expressionName] =
|
|
2233
|
+
arcade.createArcadeExecutor(expressionInfo.expression, labelingProfile);
|
|
2234
|
+
}
|
|
2235
|
+
});
|
|
2236
|
+
});
|
|
2237
|
+
const promises = Object.values(createArcadeExecutorPromises);
|
|
2238
|
+
return Promise.all(promises)
|
|
2239
|
+
.then(executors => {
|
|
2240
|
+
const expressionNames = Object.keys(createArcadeExecutorPromises);
|
|
2241
|
+
for (let i = 0; i < expressionNames.length; ++i) {
|
|
2242
|
+
arcadeExecutors[expressionNames[i]] = executors[i].valueOf();
|
|
2243
|
+
}
|
|
2244
|
+
return arcadeExecutors;
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2199
2247
|
/**
|
|
2200
2248
|
* Creates labels from items.
|
|
2201
2249
|
*
|
|
@@ -2209,33 +2257,57 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
2209
2257
|
*/
|
|
2210
2258
|
async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLayerPopup = true, includeHeaderNames = false) {
|
|
2211
2259
|
var _a, _b, _c, _d;
|
|
2212
|
-
const [intl] = await loadModules([
|
|
2213
|
-
|
|
2214
|
-
]);
|
|
2215
|
-
// Get the attributes of the features to export
|
|
2260
|
+
const [intl] = await loadModules(["esri/intl"]);
|
|
2261
|
+
// Get the features to export
|
|
2216
2262
|
const featureSet = await queryFeaturesByID(ids, layer);
|
|
2217
|
-
const featuresAttrs = featureSet.features.map(f => f.attributes);
|
|
2218
2263
|
// Get the label formatting, if any
|
|
2219
2264
|
let labelFormat;
|
|
2265
|
+
let arcadeExecutors = {};
|
|
2220
2266
|
if (layer.popupEnabled) {
|
|
2221
2267
|
// What data fields are used in the labels?
|
|
2222
2268
|
// Example labelFormat: ['{NAME}', '{STREET}', '{CITY}, {STATE} {ZIP}']
|
|
2223
2269
|
if (formatUsingLayerPopup && ((_b = (_a = layer.popupTemplate) === null || _a === void 0 ? void 0 : _a.content[0]) === null || _b === void 0 ? void 0 : _b.type) === "fields") {
|
|
2224
2270
|
labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
|
|
2271
|
+
// If popup is configured with "no attribute information", then no fields will visible
|
|
2272
|
+
if (labelFormat.length === 0) {
|
|
2273
|
+
// Can we use the popup title?
|
|
2274
|
+
// eslint-disable-next-line unicorn/prefer-ternary
|
|
2275
|
+
if (typeof layer.popupTemplate.title === "string") {
|
|
2276
|
+
labelFormat = [layer.popupTemplate.title];
|
|
2277
|
+
// Otherwise revert to using attributes
|
|
2278
|
+
}
|
|
2279
|
+
else {
|
|
2280
|
+
labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos, true);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2225
2283
|
}
|
|
2226
2284
|
else if (formatUsingLayerPopup && ((_d = (_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.content[0]) === null || _d === void 0 ? void 0 : _d.type) === "text") {
|
|
2227
2285
|
labelFormat = _convertPopupTextToLabelSpec(layer.popupTemplate.content[0].text);
|
|
2286
|
+
// Do we need any Arcade executors?
|
|
2287
|
+
arcadeExecutors = await _createArcadeExecutors(labelFormat, layer);
|
|
2228
2288
|
}
|
|
2229
2289
|
}
|
|
2230
2290
|
// Apply the label format
|
|
2231
2291
|
let labels;
|
|
2232
2292
|
// eslint-disable-next-line unicorn/prefer-ternary
|
|
2233
2293
|
if (labelFormat) {
|
|
2294
|
+
const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
|
|
2234
2295
|
// Convert attributes into an array of labels
|
|
2235
|
-
labels =
|
|
2296
|
+
labels = featureSet.features.map(feature => {
|
|
2236
2297
|
const label = [];
|
|
2237
2298
|
labelFormat.forEach(labelLineTemplate => {
|
|
2238
|
-
|
|
2299
|
+
let labelLine = labelLineTemplate;
|
|
2300
|
+
// Replace Arcade expressions
|
|
2301
|
+
const arcadeExpressionsMatches = labelLine.match(arcadeExpressionRegExp);
|
|
2302
|
+
if (arcadeExpressionsMatches) {
|
|
2303
|
+
arcadeExpressionsMatches.forEach((match) => {
|
|
2304
|
+
const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
|
|
2305
|
+
const replacement = arcadeExecutors[expressionName].execute({ "$feature": feature });
|
|
2306
|
+
labelLine = labelLine.replace(match, replacement);
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
// Replace fields; must be done after Arcade check because `substitute` will discard Arcade expressions!
|
|
2310
|
+
labelLine = intl.substitute(labelLine, feature.attributes).trim();
|
|
2239
2311
|
if (labelLine.length > 0) {
|
|
2240
2312
|
label.push(labelLine);
|
|
2241
2313
|
}
|
|
@@ -2247,8 +2319,8 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
|
|
|
2247
2319
|
}
|
|
2248
2320
|
else {
|
|
2249
2321
|
// Export all attributes
|
|
2250
|
-
labels =
|
|
2251
|
-
return Object.values(
|
|
2322
|
+
labels = featureSet.features.map(feature => {
|
|
2323
|
+
return Object.values(feature.attributes).map(attribute => `${attribute}`);
|
|
2252
2324
|
});
|
|
2253
2325
|
}
|
|
2254
2326
|
// Remove duplicates
|
|
@@ -2264,7 +2336,8 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
|
|
|
2264
2336
|
headerNames = labelFormat.map(labelFormatLine => labelFormatLine.replace(/\{/g, "").replace(/\}/g, ""));
|
|
2265
2337
|
}
|
|
2266
2338
|
else {
|
|
2267
|
-
|
|
2339
|
+
const featuresAttrs = featureSet.features[0].attributes;
|
|
2340
|
+
Object.keys(featuresAttrs).forEach(k => {
|
|
2268
2341
|
if (featuresAttrs[0].hasOwnProperty(k)) {
|
|
2269
2342
|
headerNames.push(k);
|
|
2270
2343
|
}
|
|
@@ -237,7 +237,7 @@ const LayerTable$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
237
237
|
* @returns a promise that will resolve when the operation is complete
|
|
238
238
|
*/
|
|
239
239
|
async _exportToCSV() {
|
|
240
|
-
return downloadCSV(this._layerView.layer, this._getSelectedIds(), false, // formatUsingLayerPopup
|
|
240
|
+
return downloadCSV([], this._layerView.layer, this._getSelectedIds(), false, // formatUsingLayerPopup
|
|
241
241
|
false, // removeDuplicates
|
|
242
242
|
true);
|
|
243
243
|
}
|
|
@@ -409,4 +409,4 @@ async function getLocaleComponentStrings(element) {
|
|
|
409
409
|
return [strings, componentLanguage];
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
export { esriLoader as e, getLocaleComponentStrings as g };
|
|
412
|
+
export { getComponentClosestLanguage as a, esriLoader as e, getLocaleComponentStrings as g };
|
|
@@ -36,6 +36,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
36
36
|
constructor() {
|
|
37
37
|
super();
|
|
38
38
|
this.__registerHost();
|
|
39
|
+
this.selectionLoadingChange = createEvent(this, "selectionLoadingChange", 7);
|
|
39
40
|
this.selectionSetChange = createEvent(this, "selectionSetChange", 7);
|
|
40
41
|
this.sketchTypeChange = createEvent(this, "sketchTypeChange", 7);
|
|
41
42
|
this.workflowTypeChange = createEvent(this, "workflowTypeChange", 7);
|
|
@@ -311,16 +312,15 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
311
312
|
void this._clearResults(false);
|
|
312
313
|
});
|
|
313
314
|
this._searchWidget.on("select-result", (searchResults) => {
|
|
314
|
-
var _a, _b;
|
|
315
|
+
var _a, _b, _c;
|
|
315
316
|
void this._clearResults(false);
|
|
316
317
|
if (searchResults.result) {
|
|
317
318
|
this._searchResult = searchResults.result;
|
|
318
|
-
const useOIDs = ((_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer.id) === this.selectLayerView.layer.id;
|
|
319
|
+
const useOIDs = ((_b = (_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer) === null || _b === void 0 ? void 0 : _b.id) && searchResults.source.layer.id === this.selectLayerView.layer.id;
|
|
319
320
|
const oids = useOIDs ? [searchResults.result.feature.getObjectId()] : undefined;
|
|
320
|
-
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (
|
|
321
|
+
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_c = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _c === void 0 ? void 0 : _c.name, useOIDs, oids);
|
|
321
322
|
}
|
|
322
323
|
});
|
|
323
|
-
console.log("END search widget init");
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
@@ -440,7 +440,9 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
440
440
|
* @returns Promise when the selection is complete and the graphics have been highlighted
|
|
441
441
|
*/
|
|
442
442
|
async _selectFeatures(geometries) {
|
|
443
|
+
this.selectionLoadingChange.emit(true);
|
|
443
444
|
this._selectedIds = await queryObjectIds(geometries, this.selectLayerView.layer);
|
|
445
|
+
this.selectionLoadingChange.emit(false);
|
|
444
446
|
// Add geometries used for selecting features as graphics
|
|
445
447
|
this._drawTools.graphics = this.geometries.map(geom => {
|
|
446
448
|
var _a, _b, _c;
|
|
@@ -538,7 +540,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
538
540
|
* @param graphics graphics to be used for selection
|
|
539
541
|
* @param label selection label
|
|
540
542
|
* @param useOIDs indicates if the OIDs should override the geometry for selection
|
|
541
|
-
* @param oids list of IDs to select when
|
|
543
|
+
* @param oids list of IDs to select when useOIDs is true
|
|
542
544
|
*
|
|
543
545
|
* @protected
|
|
544
546
|
*/
|
|
@@ -232,24 +232,26 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
232
232
|
/**
|
|
233
233
|
* Downloads csv of mailing labels for the provided list of ids
|
|
234
234
|
*
|
|
235
|
+
* @param selectionSetNames Names of the selection sets used to provide ids
|
|
235
236
|
* @param ids List of ids to download
|
|
236
237
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
237
238
|
* @param addColumnTitle Indicates if column headings should be included in output
|
|
238
239
|
* @returns Promise resolving when function is done
|
|
239
240
|
*/
|
|
240
|
-
async downloadCSV(ids, removeDuplicates, addColumnTitle = true) {
|
|
241
|
-
return downloadCSV(this.layerView.layer, ids, true, // formatUsingLayerPopup
|
|
241
|
+
async downloadCSV(selectionSetNames, ids, removeDuplicates, addColumnTitle = true) {
|
|
242
|
+
return downloadCSV(selectionSetNames, this.layerView.layer, ids, true, // formatUsingLayerPopup
|
|
242
243
|
removeDuplicates, addColumnTitle);
|
|
243
244
|
}
|
|
244
245
|
/**
|
|
245
246
|
* Downloads pdf of mailing labels for the provided list of ids
|
|
246
247
|
*
|
|
248
|
+
* @param selectionSetNames Names of the selection sets used to provide ids
|
|
247
249
|
* @param ids List of ids to download
|
|
248
250
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
249
251
|
* @returns Promise resolving when function is done
|
|
250
252
|
*/
|
|
251
|
-
async downloadPDF(ids, removeDuplicates) {
|
|
252
|
-
return downloadPDF(this.layerView.layer, ids, removeDuplicates, this._labelInfoElement.selectedOption.value);
|
|
253
|
+
async downloadPDF(selectionSetNames, ids, removeDuplicates) {
|
|
254
|
+
return downloadPDF(selectionSetNames, this.layerView.layer, ids, removeDuplicates, this._labelInfoElement.selectedOption.value);
|
|
253
255
|
}
|
|
254
256
|
//--------------------------------------------------------------------------
|
|
255
257
|
//
|
|
@@ -9,7 +9,7 @@ import { l as loadModules } from './loadModules.js';
|
|
|
9
9
|
import { a as getMapLayerView, g as goToSelection, h as highlightFeatures, d as defineCustomElement$6 } from './map-layer-picker2.js';
|
|
10
10
|
import { g as getSelectionSetQuery } from './queryUtils.js';
|
|
11
11
|
import { s as state } from './publicNotificationStore.js';
|
|
12
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
|
12
|
+
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale.js';
|
|
13
13
|
import { g as getTotal, a as getSelectionIds, d as defineCustomElement$3 } from './refine-selection2.js';
|
|
14
14
|
import { d as defineCustomElement$C } from './buffer-tools2.js';
|
|
15
15
|
import { d as defineCustomElement$B } from './action.js';
|
|
@@ -74,6 +74,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
74
74
|
this._numSelected = 0;
|
|
75
75
|
this._pageType = EPageType.LIST;
|
|
76
76
|
this._saveEnabled = false;
|
|
77
|
+
this._selectionLoading = false;
|
|
77
78
|
this._selectionSets = [];
|
|
78
79
|
this._sketchType = ESketchType.INTERACTIVE;
|
|
79
80
|
this._selectionWorkflowType = EWorkflowType.SEARCH;
|
|
@@ -109,7 +110,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
109
110
|
console.log(oldValue);
|
|
110
111
|
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
111
112
|
console.log("Emit event from parent");
|
|
112
|
-
this.
|
|
113
|
+
this._searchConfiguration = Object.assign({}, newValue);
|
|
114
|
+
this.searchConfigurationChange.emit(this._searchConfiguration);
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
/**
|
|
@@ -144,6 +146,12 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
144
146
|
this._updateLabel(event, "distance");
|
|
145
147
|
this._distance = event.detail.newValue;
|
|
146
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Handle changes when selection is loading
|
|
151
|
+
*/
|
|
152
|
+
selectionLoadingChange(event) {
|
|
153
|
+
this._selectionLoading = event.detail;
|
|
154
|
+
}
|
|
147
155
|
/**
|
|
148
156
|
* Handle changes to the selection sets
|
|
149
157
|
*/
|
|
@@ -179,8 +187,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
179
187
|
* Renders the component.
|
|
180
188
|
*/
|
|
181
189
|
render() {
|
|
182
|
-
|
|
183
|
-
return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
|
|
190
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
|
|
184
191
|
}
|
|
185
192
|
//--------------------------------------------------------------------------
|
|
186
193
|
//
|
|
@@ -210,9 +217,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
210
217
|
*
|
|
211
218
|
* @protected
|
|
212
219
|
*/
|
|
213
|
-
_getActionGroup(icon,
|
|
220
|
+
_getActionGroup(icon, pageType, tip) {
|
|
214
221
|
const groupClass = this.showRefineSelection ? "action-center w-1-4" : "action-center w-1-3";
|
|
215
|
-
return (h("calcite-action-group", { class: groupClass, layout: "horizontal" }, h("calcite-action", { active: this._pageType === pageType, alignment: "center", class: "width-full height-full", compact: false,
|
|
222
|
+
return (h("calcite-action-group", { class: groupClass, layout: "horizontal" }, h("calcite-action", { active: this._pageType === pageType, alignment: "center", class: "width-full height-full", compact: false, icon: icon, id: icon, onClick: () => { this._setPageType(pageType); }, text: "" }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, tip))));
|
|
216
223
|
}
|
|
217
224
|
/**
|
|
218
225
|
* Navigate to the defined page type
|
|
@@ -326,6 +333,16 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
326
333
|
this._layerSelectionChangeEvt.detail[0] : "";
|
|
327
334
|
await this._updateAddresseeLayer(id);
|
|
328
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Check if any selection sets exist.
|
|
338
|
+
*
|
|
339
|
+
* @returns true if selection sets exist
|
|
340
|
+
*
|
|
341
|
+
* @protected
|
|
342
|
+
*/
|
|
343
|
+
_hasSelections() {
|
|
344
|
+
return this._selectionSets.length > 0;
|
|
345
|
+
}
|
|
329
346
|
/**
|
|
330
347
|
* Create the Select page that shows the selection workflows
|
|
331
348
|
*
|
|
@@ -342,8 +359,13 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
342
359
|
const noticeText = this._selectionWorkflowType === EWorkflowType.SELECT ? selectTip :
|
|
343
360
|
this._selectionWorkflowType === EWorkflowType.SKETCH ? sketchTip : searchTip;
|
|
344
361
|
const nameLabelClass = this.customLabelEnabled ? "" : "display-none";
|
|
345
|
-
|
|
346
|
-
|
|
362
|
+
// TODO find out if ... is appropriate for other languages
|
|
363
|
+
const locale = getComponentClosestLanguage(this.el);
|
|
364
|
+
const selectionLoading = locale && locale === "en" ?
|
|
365
|
+
`${this._translations.selectionLoading}...` : this._translations.selectionLoading;
|
|
366
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), h("div", { class: "padding-top-sides-1" }, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enabledLayerIds: this.selectionLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (h("div", null, h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
|
|
367
|
+
this.noResultText && this._numSelected === 0 ? this.noResultText :
|
|
368
|
+
this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), h("div", { class: "padding-sides-1 " + nameLabelClass }, h("calcite-label", { class: "font-bold" }, "List name", h("calcite-input", { onInput: () => {
|
|
347
369
|
this.labelChange.emit(this._labelName.value);
|
|
348
370
|
}, placeholder: "Insert label here...", ref: (el) => { this._labelName = el; }, value: this._customLabel || "" }))), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
|
|
349
371
|
}
|
|
@@ -354,7 +376,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
354
376
|
* @protected
|
|
355
377
|
*/
|
|
356
378
|
_getRefinePage() {
|
|
357
|
-
|
|
379
|
+
const hasSelections = this._hasSelections();
|
|
380
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), hasSelections ? (h("div", null, this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, selectionSets: this._selectionSets }))) :
|
|
381
|
+
this._getNotice(this._translations.refineTipNoSelections, "padding-sides-1")));
|
|
358
382
|
}
|
|
359
383
|
/**
|
|
360
384
|
* Create the PDF download page that shows the download options
|
|
@@ -385,7 +409,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
385
409
|
*/
|
|
386
410
|
_getDownloadPage(type) {
|
|
387
411
|
const isPdf = type === EExportType.PDF;
|
|
388
|
-
|
|
412
|
+
const hasSelections = this._hasSelections();
|
|
413
|
+
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("calcite-label", null, this._translations.notifications), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
|
|
389
414
|
}
|
|
390
415
|
/**
|
|
391
416
|
* Create the stacked navigation buttons for a page
|
|
@@ -468,7 +493,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
468
493
|
*/
|
|
469
494
|
_downloadPDF() {
|
|
470
495
|
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
|
471
|
-
|
|
496
|
+
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
497
|
+
void this._downloadTools.downloadPDF(selectionSetNames, ids, this._removeDuplicates.checked);
|
|
472
498
|
}
|
|
473
499
|
/**
|
|
474
500
|
* Download all selection sets as CSV
|
|
@@ -477,7 +503,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
477
503
|
*/
|
|
478
504
|
_downloadCSV() {
|
|
479
505
|
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
|
480
|
-
|
|
506
|
+
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
507
|
+
void this._downloadTools.downloadCSV(selectionSetNames, ids, this._removeDuplicates.checked);
|
|
481
508
|
}
|
|
482
509
|
/**
|
|
483
510
|
* Get all enabled selection sets
|
|
@@ -757,12 +784,13 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
757
784
|
"_numSelected": [32],
|
|
758
785
|
"_pageType": [32],
|
|
759
786
|
"_saveEnabled": [32],
|
|
787
|
+
"_selectionLoading": [32],
|
|
760
788
|
"_selectionSets": [32],
|
|
761
789
|
"_sketchType": [32],
|
|
762
790
|
"_selectionWorkflowType": [32],
|
|
763
791
|
"_showLayerSelectionChangeModal": [32],
|
|
764
792
|
"_translations": [32]
|
|
765
|
-
}, [[8, "distanceChanged", "distanceChanged"], [8, "selectionSetsChanged", "selectionSetsChanged"], [8, "sketchTypeChange", "sketchTypeChange"], [8, "unitChanged", "unitChanged"]]]);
|
|
793
|
+
}, [[8, "distanceChanged", "distanceChanged"], [8, "selectionLoadingChange", "selectionLoadingChange"], [8, "selectionSetsChanged", "selectionSetsChanged"], [8, "sketchTypeChange", "sketchTypeChange"], [8, "unitChanged", "unitChanged"]]]);
|
|
766
794
|
function defineCustomElement$1() {
|
|
767
795
|
if (typeof customElements === "undefined") {
|
|
768
796
|
return;
|
|
@@ -26,6 +26,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
26
26
|
super();
|
|
27
27
|
this.__registerHost();
|
|
28
28
|
this.__attachShadow();
|
|
29
|
+
this.selectionLoadingChange = createEvent(this, "selectionLoadingChange", 7);
|
|
29
30
|
this.refineSelectionGraphicsChange = createEvent(this, "refineSelectionGraphicsChange", 7);
|
|
30
31
|
this.refineSelectionIdsChange = createEvent(this, "refineSelectionIdsChange", 7);
|
|
31
32
|
/**
|
|
@@ -301,11 +302,13 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
301
302
|
* @protected
|
|
302
303
|
*/
|
|
303
304
|
async _selectFeatures(geom) {
|
|
305
|
+
this.selectionLoadingChange.emit(true);
|
|
304
306
|
const queryFeaturePromises = this.layerViews.map(layerView => {
|
|
305
307
|
this._featuresCollection[layerView.layer.id] = [];
|
|
306
308
|
return queryFeaturesByGeometry(0, layerView.layer, geom, this._featuresCollection);
|
|
307
309
|
});
|
|
308
310
|
return Promise.all(queryFeaturePromises).then(async (response) => {
|
|
311
|
+
this.selectionLoadingChange.emit(false);
|
|
309
312
|
let graphics = [];
|
|
310
313
|
response.forEach(r => {
|
|
311
314
|
Object.keys(r).forEach(k => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-
|
|
7
|
+
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
8
8
|
import './_commonjsHelpers-d5f9d613.js';
|
|
9
9
|
|
|
10
10
|
const addRecordModalCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:bold}.font-500{font-weight:500}.display-none{display:none}";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { g as getLocaleComponentStrings } from './locale-
|
|
7
|
+
import { l as loadModules } from './loadModules-b299cd43.js';
|
|
8
|
+
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
9
9
|
import { b as getElementDir, g as getElementProp, t as toAriaBoolean, i as isPrimaryPointerButton, h as intersects } from './dom-3bdc69ee.js';
|
|
10
10
|
import { c as connectLabel, d as disconnectLabel } from './label-aa562647.js';
|
|
11
11
|
import { a as afterConnectDefaultValueSet, c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-62bc7b1f.js';
|
|
@@ -1526,6 +1526,7 @@ const refineSelectionToolsCss = ":host{display:block}.div-visible{display:inheri
|
|
|
1526
1526
|
const RefineSelectionTools = class {
|
|
1527
1527
|
constructor(hostRef) {
|
|
1528
1528
|
registerInstance(this, hostRef);
|
|
1529
|
+
this.selectionLoadingChange = createEvent(this, "selectionLoadingChange", 7);
|
|
1529
1530
|
this.refineSelectionGraphicsChange = createEvent(this, "refineSelectionGraphicsChange", 7);
|
|
1530
1531
|
this.refineSelectionIdsChange = createEvent(this, "refineSelectionIdsChange", 7);
|
|
1531
1532
|
/**
|
|
@@ -1801,11 +1802,13 @@ const RefineSelectionTools = class {
|
|
|
1801
1802
|
* @protected
|
|
1802
1803
|
*/
|
|
1803
1804
|
async _selectFeatures(geom) {
|
|
1805
|
+
this.selectionLoadingChange.emit(true);
|
|
1804
1806
|
const queryFeaturePromises = this.layerViews.map(layerView => {
|
|
1805
1807
|
this._featuresCollection[layerView.layer.id] = [];
|
|
1806
1808
|
return queryFeaturesByGeometry(0, layerView.layer, geom, this._featuresCollection);
|
|
1807
1809
|
});
|
|
1808
1810
|
return Promise.all(queryFeaturePromises).then(async (response) => {
|
|
1811
|
+
this.selectionLoadingChange.emit(false);
|
|
1809
1812
|
let graphics = [];
|
|
1810
1813
|
response.forEach(r => {
|
|
1811
1814
|
Object.keys(r).forEach(k => {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
7
|
import { g as getElementProp, t as toAriaBoolean } from './dom-3bdc69ee.js';
|
|
8
8
|
import { u as updateHostInteraction } from './interactive-822ffed6.js';
|
|
9
|
-
import { g as getLocaleComponentStrings } from './locale-
|
|
9
|
+
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
10
10
|
import './resources-436ae282.js';
|
|
11
11
|
import './guid-15fce7c0.js';
|
|
12
12
|
import './_commonjsHelpers-d5f9d613.js';
|
|
@@ -7,12 +7,12 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
|
7
7
|
import { s as setRequestedIcon, g as getElementProp, a as getSlotted } from './dom-3bdc69ee.js';
|
|
8
8
|
import { S as StatusIcons } from './interfaces-4ae145eb.js';
|
|
9
9
|
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
|
|
10
|
-
import { l as loadModules } from './loadModules-
|
|
10
|
+
import { l as loadModules } from './loadModules-b299cd43.js';
|
|
11
11
|
import { g as goToSelection, h as highlightFeatures, d as queryObjectIds, e as getQueryGeoms } from './mapViewUtils-02696ab6.js';
|
|
12
12
|
import { E as EWorkflowType, f as ESelectionMode, g as ERefineMode, c as ESketchType } from './interfaces-d0d83efa.js';
|
|
13
13
|
import { s as state } from './publicNotificationStore-b9daaee4.js';
|
|
14
|
-
import { g as getLocaleComponentStrings } from './locale-
|
|
15
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
|
14
|
+
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
15
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-8d64719e.js';
|
|
16
16
|
import { a as getSelectionIds, g as getTotal } from './publicNotificationUtils-5cb5a607.js';
|
|
17
17
|
import './resources-436ae282.js';
|
|
18
18
|
import './guid-15fce7c0.js';
|
|
@@ -237,6 +237,7 @@ const mapSelectToolsCss = ":host{display:block}.div-visible{display:inherit}.div
|
|
|
237
237
|
const MapSelectTools = class {
|
|
238
238
|
constructor(hostRef) {
|
|
239
239
|
registerInstance(this, hostRef);
|
|
240
|
+
this.selectionLoadingChange = createEvent(this, "selectionLoadingChange", 7);
|
|
240
241
|
this.selectionSetChange = createEvent(this, "selectionSetChange", 7);
|
|
241
242
|
this.sketchTypeChange = createEvent(this, "sketchTypeChange", 7);
|
|
242
243
|
this.workflowTypeChange = createEvent(this, "workflowTypeChange", 7);
|
|
@@ -512,16 +513,15 @@ const MapSelectTools = class {
|
|
|
512
513
|
void this._clearResults(false);
|
|
513
514
|
});
|
|
514
515
|
this._searchWidget.on("select-result", (searchResults) => {
|
|
515
|
-
var _a, _b;
|
|
516
|
+
var _a, _b, _c;
|
|
516
517
|
void this._clearResults(false);
|
|
517
518
|
if (searchResults.result) {
|
|
518
519
|
this._searchResult = searchResults.result;
|
|
519
|
-
const useOIDs = ((_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer.id) === this.selectLayerView.layer.id;
|
|
520
|
+
const useOIDs = ((_b = (_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer) === null || _b === void 0 ? void 0 : _b.id) && searchResults.source.layer.id === this.selectLayerView.layer.id;
|
|
520
521
|
const oids = useOIDs ? [searchResults.result.feature.getObjectId()] : undefined;
|
|
521
|
-
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (
|
|
522
|
+
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_c = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _c === void 0 ? void 0 : _c.name, useOIDs, oids);
|
|
522
523
|
}
|
|
523
524
|
});
|
|
524
|
-
console.log("END search widget init");
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
/**
|
|
@@ -641,7 +641,9 @@ const MapSelectTools = class {
|
|
|
641
641
|
* @returns Promise when the selection is complete and the graphics have been highlighted
|
|
642
642
|
*/
|
|
643
643
|
async _selectFeatures(geometries) {
|
|
644
|
+
this.selectionLoadingChange.emit(true);
|
|
644
645
|
this._selectedIds = await queryObjectIds(geometries, this.selectLayerView.layer);
|
|
646
|
+
this.selectionLoadingChange.emit(false);
|
|
645
647
|
// Add geometries used for selecting features as graphics
|
|
646
648
|
this._drawTools.graphics = this.geometries.map(geom => {
|
|
647
649
|
var _a, _b, _c;
|
|
@@ -739,7 +741,7 @@ const MapSelectTools = class {
|
|
|
739
741
|
* @param graphics graphics to be used for selection
|
|
740
742
|
* @param label selection label
|
|
741
743
|
* @param useOIDs indicates if the OIDs should override the geometry for selection
|
|
742
|
-
* @param oids list of IDs to select when
|
|
744
|
+
* @param oids list of IDs to select when useOIDs is true
|
|
743
745
|
*
|
|
744
746
|
* @protected
|
|
745
747
|
*/
|
|
@@ -988,24 +990,26 @@ const PdfDownload = class {
|
|
|
988
990
|
/**
|
|
989
991
|
* Downloads csv of mailing labels for the provided list of ids
|
|
990
992
|
*
|
|
993
|
+
* @param selectionSetNames Names of the selection sets used to provide ids
|
|
991
994
|
* @param ids List of ids to download
|
|
992
995
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
993
996
|
* @param addColumnTitle Indicates if column headings should be included in output
|
|
994
997
|
* @returns Promise resolving when function is done
|
|
995
998
|
*/
|
|
996
|
-
async downloadCSV(ids, removeDuplicates, addColumnTitle = true) {
|
|
997
|
-
return downloadCSV(this.layerView.layer, ids, true, // formatUsingLayerPopup
|
|
999
|
+
async downloadCSV(selectionSetNames, ids, removeDuplicates, addColumnTitle = true) {
|
|
1000
|
+
return downloadCSV(selectionSetNames, this.layerView.layer, ids, true, // formatUsingLayerPopup
|
|
998
1001
|
removeDuplicates, addColumnTitle);
|
|
999
1002
|
}
|
|
1000
1003
|
/**
|
|
1001
1004
|
* Downloads pdf of mailing labels for the provided list of ids
|
|
1002
1005
|
*
|
|
1006
|
+
* @param selectionSetNames Names of the selection sets used to provide ids
|
|
1003
1007
|
* @param ids List of ids to download
|
|
1004
1008
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
|
1005
1009
|
* @returns Promise resolving when function is done
|
|
1006
1010
|
*/
|
|
1007
|
-
async downloadPDF(ids, removeDuplicates) {
|
|
1008
|
-
return downloadPDF(this.layerView.layer, ids, removeDuplicates, this._labelInfoElement.selectedOption.value);
|
|
1011
|
+
async downloadPDF(selectionSetNames, ids, removeDuplicates) {
|
|
1012
|
+
return downloadPDF(selectionSetNames, this.layerView.layer, ids, removeDuplicates, this._labelInfoElement.selectedOption.value);
|
|
1009
1013
|
}
|
|
1010
1014
|
//--------------------------------------------------------------------------
|
|
1011
1015
|
//
|
|
@@ -14,7 +14,7 @@ import { S as Sortable } from './sortable.esm-3b2eaa5c.js';
|
|
|
14
14
|
import { o as getItemIndex, m as mutationObserverCallback, d as deselectRemovedItems, a as deselectSiblingItems, s as selectSiblings, h as handleFilter, g as getItemData, k as keyDownHandler, p as moveItemIndex, i as initialize, b as initializeObserver, c as cleanUpObserver, j as calciteListFocusOutHandler, r as removeItem, e as calciteListItemChangeHandler, f as calciteInternalListItemValueChangeHandler, l as setUpItems, n as setFocus, L as List } from './shared-list-render-13a77297.js';
|
|
15
15
|
import { I as ICON_TYPES$1 } from './resources-2235e4ff.js';
|
|
16
16
|
import { C as CSS$2, S as SLOTS$3 } from './resources-e3a5cf27.js';
|
|
17
|
-
import { g as getLocaleComponentStrings } from './locale-
|
|
17
|
+
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
18
18
|
import { s as state, E as EFileType } from './solution-store-477288ac.js';
|
|
19
19
|
import { e as EUpdateType } from './interfaces-d0d83efa.js';
|
|
20
20
|
import './resources-436ae282.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-
|
|
7
|
+
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
8
8
|
import './_commonjsHelpers-d5f9d613.js';
|
|
9
9
|
|
|
10
10
|
const cardManagerCss = ":host{display:block}.display-inline-table{display:inline-table}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.w-1-2{width:50%}.padding-bottom-1{padding-bottom:1rem}";
|