@esri/solutions-components 0.3.8 → 0.4.0
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/buffer-tools_6.cjs.entry.js +37 -33
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-d5d5499f.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js} +112 -32
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +2 -2
- package/dist/cjs/{index.es-43f519b3.js → index.es-176629d8.js} +2 -2
- package/dist/cjs/layer-table.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapViewUtils-24d1d859.js → mapViewUtils-d250b1ed.js} +11 -6
- package/dist/cjs/public-notification.cjs.entry.js +24 -11
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +22 -20
- package/dist/collection/components/map-select-tools/map-select-tools.js +78 -13
- package/dist/collection/components/pdf-download/pdf-download.js +9 -19
- package/dist/collection/components/public-notification/public-notification.js +44 -30
- package/dist/collection/components/refine-selection/refine-selection.js +34 -14
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +47 -21
- package/dist/collection/demos/buffer-tools.html +1 -1
- package/dist/collection/demos/new-public-notification.html +1 -11
- package/dist/collection/utils/interfaces.ts +8 -0
- package/dist/collection/utils/mapViewUtils.js +11 -6
- package/dist/collection/utils/mapViewUtils.ts +11 -6
- package/dist/components/buffer-tools2.js +19 -16
- package/dist/components/map-layer-picker2.js +11 -6
- package/dist/components/map-select-tools2.js +72 -15
- package/dist/components/pdf-download2.js +9 -4
- package/dist/components/public-notification.js +23 -11
- package/dist/components/refine-selection-tools2.js +20 -18
- package/dist/components/refine-selection2.js +32 -15
- package/dist/esm/buffer-tools_6.entry.js +37 -33
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-b60306b8.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js} +112 -32
- package/dist/esm/calcite-input-message_5.entry.js +2 -2
- package/dist/esm/{index.es-4a2bee8f.js → index.es-54a6f3a3.js} +2 -2
- package/dist/esm/layer-table.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-c2fb048d.js → mapViewUtils-63e118f8.js} +11 -6
- package/dist/esm/public-notification.entry.js +24 -11
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/buffer-tools.html +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +1 -11
- package/dist/solutions-components/{p-21ae3f97.entry.js → p-117174e8.entry.js} +1 -1
- package/dist/solutions-components/{p-1b7c13f8.js → p-1e459361.js} +1 -1
- package/dist/solutions-components/{p-b4be1c30.entry.js → p-6d28f991.entry.js} +1 -1
- package/dist/solutions-components/{p-547cbe8a.js → p-80f5e33c.js} +12 -12
- package/dist/solutions-components/{p-c5f670fb.entry.js → p-8927862a.entry.js} +1 -1
- package/dist/solutions-components/{p-709c3f22.entry.js → p-8a0c0935.entry.js} +2 -2
- package/dist/solutions-components/p-cc2e20c8.js +36 -0
- package/dist/solutions-components/p-e69c58e5.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +8 -0
- package/dist/solutions-components/utils/mapViewUtils.ts +11 -6
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +19 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +0 -5
- package/dist/types/components/public-notification/public-notification.d.ts +11 -6
- package/dist/types/components/refine-selection/refine-selection.d.ts +6 -4
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -10
- package/dist/types/components.d.ts +24 -28
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/interfaces.d.ts +7 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-b47d1a9a.entry.js +0 -6
- package/dist/solutions-components/p-cd7606eb.js +0 -36
|
@@ -16,7 +16,7 @@ import { i as isActivationKey } from './key-acb660e7.js';
|
|
|
16
16
|
import { n as numberStringFormatter, c as connectLocalized, d as disconnectLocalized } from './locale-9dd0777b.js';
|
|
17
17
|
import { s as state } from './publicNotificationStore-b9daaee4.js';
|
|
18
18
|
import { h as ESelectionType, g as ERefineMode, f as ESelectionMode } from './interfaces-d0d83efa.js';
|
|
19
|
-
import { a as getMapLayerView, f as queryFeaturesByGeometry, h as highlightFeatures } from './mapViewUtils-
|
|
19
|
+
import { a as getMapLayerView, f as queryFeaturesByGeometry, h as highlightFeatures } from './mapViewUtils-63e118f8.js';
|
|
20
20
|
import './_commonjsHelpers-d5f9d613.js';
|
|
21
21
|
import './resources-436ae282.js';
|
|
22
22
|
import './observers-31601001.js';
|
|
@@ -33,8 +33,8 @@ const BufferTools = class {
|
|
|
33
33
|
this.appearance = "text";
|
|
34
34
|
this.distance = 0;
|
|
35
35
|
this.geometries = [];
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
36
|
+
this.max = undefined;
|
|
37
|
+
this.min = 0;
|
|
38
38
|
this.sliderTicks = 10;
|
|
39
39
|
this.unionResults = true;
|
|
40
40
|
this.unit = "meters";
|
|
@@ -119,16 +119,19 @@ const BufferTools = class {
|
|
|
119
119
|
* @protected
|
|
120
120
|
*/
|
|
121
121
|
_setDistance(event) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
this.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
const v = parseInt(event.detail.value, 10);
|
|
123
|
+
if (this.distance !== v && v >= this.min) {
|
|
124
|
+
this.distanceChanged.emit({
|
|
125
|
+
oldValue: this.distance,
|
|
126
|
+
newValue: event.detail.value
|
|
127
|
+
});
|
|
128
|
+
this.distance = v;
|
|
129
|
+
if (this.distance > 0) {
|
|
130
|
+
this._buffer();
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.bufferComplete.emit(undefined);
|
|
134
|
+
}
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
/**
|
|
@@ -171,7 +174,7 @@ const BufferTools = class {
|
|
|
171
174
|
* @protected
|
|
172
175
|
*/
|
|
173
176
|
_getTextBoxDisplay() {
|
|
174
|
-
return (h("div", { class: "c-container" }, h("calcite-input", { class: "padding-end-1", "number-button-type": "vertical", onCalciteInputInput: (evt) => this._setDistance(evt), placeholder: "0", type: "number", value: this.distance ? this.distance.toString() : undefined }), h("calcite-select", { class: "flex-1", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
|
|
177
|
+
return (h("div", { class: "c-container" }, h("calcite-input", { class: "padding-end-1", max: this.max && this.max > 0 ? this.max : undefined, min: this.min, "number-button-type": "vertical", onCalciteInputInput: (evt) => this._setDistance(evt), placeholder: "0", type: "number", value: this.distance ? this.distance.toString() : undefined }), h("calcite-select", { class: "flex-1", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
|
|
175
178
|
}
|
|
176
179
|
/**
|
|
177
180
|
* Render distance control as a slider
|
|
@@ -182,7 +185,7 @@ const BufferTools = class {
|
|
|
182
185
|
* @protected
|
|
183
186
|
*/
|
|
184
187
|
_getSliderDisplay() {
|
|
185
|
-
return (h("div", null, h("calcite-slider", { labelHandles: true, max: this.
|
|
188
|
+
return (h("div", null, h("calcite-slider", { labelHandles: true, max: this.max && this.max > 0 ? this.max : undefined, min: this.min, ticks: this.sliderTicks })));
|
|
186
189
|
}
|
|
187
190
|
/**
|
|
188
191
|
* Fetches the component's translations
|
|
@@ -1529,14 +1532,6 @@ const RefineSelectionTools = class {
|
|
|
1529
1532
|
* {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
|
|
1530
1533
|
*/
|
|
1531
1534
|
this._featuresCollection = {};
|
|
1532
|
-
/**
|
|
1533
|
-
* IRefineOperation[]: Array to maintain the possible redo operations
|
|
1534
|
-
*/
|
|
1535
|
-
this._redoStack = [];
|
|
1536
|
-
/**
|
|
1537
|
-
* IRefineOperation[]: Array to maintain the possible undo operations
|
|
1538
|
-
*/
|
|
1539
|
-
this._undoStack = [];
|
|
1540
1535
|
this.active = false;
|
|
1541
1536
|
this.border = false;
|
|
1542
1537
|
this.enabledLayerIds = [];
|
|
@@ -1547,6 +1542,7 @@ const RefineSelectionTools = class {
|
|
|
1547
1542
|
this.mapView = undefined;
|
|
1548
1543
|
this.mode = undefined;
|
|
1549
1544
|
this.refineMode = undefined;
|
|
1545
|
+
this.refineSelectionSet = undefined;
|
|
1550
1546
|
this.useLayerPicker = true;
|
|
1551
1547
|
this._selectEnabled = false;
|
|
1552
1548
|
this._selectionMode = undefined;
|
|
@@ -1627,10 +1623,11 @@ const RefineSelectionTools = class {
|
|
|
1627
1623
|
* Renders the component.
|
|
1628
1624
|
*/
|
|
1629
1625
|
render() {
|
|
1626
|
+
var _a, _b;
|
|
1630
1627
|
const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
|
|
1631
1628
|
const drawClass = this.border ? " border" : "";
|
|
1632
1629
|
const showUndoRedo = this.refineMode === ERefineMode.ALL ? "div-visible" : "div-not-visible";
|
|
1633
|
-
return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "
|
|
1630
|
+
return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "pin", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select }), h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: showUndoRedo + " esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: ((_a = this.refineSelectionSet) === null || _a === void 0 ? void 0 : _a.undoStack) ? this.refineSelectionSet.undoStack.length === 0 : true, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: ((_b = this.refineSelectionSet) === null || _b === void 0 ? void 0 : _b.redoStack) ? this.refineSelectionSet.redoStack.length === 0 : true, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
|
|
1634
1631
|
}
|
|
1635
1632
|
//--------------------------------------------------------------------------
|
|
1636
1633
|
//
|
|
@@ -1742,7 +1739,7 @@ const RefineSelectionTools = class {
|
|
|
1742
1739
|
return prev;
|
|
1743
1740
|
}, []);
|
|
1744
1741
|
}
|
|
1745
|
-
this.refineSelectionGraphicsChange.emit(graphics);
|
|
1742
|
+
this.refineSelectionGraphicsChange.emit({ graphics, useOIDs: false });
|
|
1746
1743
|
this._clear();
|
|
1747
1744
|
});
|
|
1748
1745
|
});
|
|
@@ -1816,11 +1813,14 @@ const RefineSelectionTools = class {
|
|
|
1816
1813
|
});
|
|
1817
1814
|
});
|
|
1818
1815
|
if (this.refineMode === ERefineMode.SUBSET) {
|
|
1819
|
-
this.refineSelectionGraphicsChange.emit(
|
|
1816
|
+
this.refineSelectionGraphicsChange.emit({
|
|
1817
|
+
graphics,
|
|
1818
|
+
useOIDs: this.layerViews[0].layer.title === this.layerView.layer.title
|
|
1819
|
+
});
|
|
1820
1820
|
}
|
|
1821
1821
|
else {
|
|
1822
1822
|
const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
|
|
1823
|
-
await this._updateIds(oids, this.mode, this.
|
|
1823
|
+
await this._updateIds(oids, this.mode, this.refineSelectionSet.undoStack, this.mode);
|
|
1824
1824
|
}
|
|
1825
1825
|
this._clear();
|
|
1826
1826
|
});
|
|
@@ -1863,12 +1863,16 @@ const RefineSelectionTools = class {
|
|
|
1863
1863
|
if (mode === ESelectionMode.ADD) {
|
|
1864
1864
|
idUpdates.addIds = oids.filter(id => this.ids.indexOf(id) < 0);
|
|
1865
1865
|
this.ids = [...this.ids, ...idUpdates.addIds];
|
|
1866
|
-
|
|
1866
|
+
if (idUpdates.addIds.length > 0) {
|
|
1867
|
+
operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
|
|
1868
|
+
}
|
|
1867
1869
|
}
|
|
1868
1870
|
else {
|
|
1869
1871
|
idUpdates.removeIds = oids.filter(id => this.ids.indexOf(id) > -1);
|
|
1870
1872
|
this.ids = this.ids.filter(id => idUpdates.removeIds.indexOf(id) < 0);
|
|
1871
|
-
|
|
1873
|
+
if (idUpdates.removeIds.length > 0) {
|
|
1874
|
+
operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
|
|
1875
|
+
}
|
|
1872
1876
|
}
|
|
1873
1877
|
await this._highlightFeatures(this.ids).then(() => {
|
|
1874
1878
|
this.refineSelectionIdsChange.emit(idUpdates);
|
|
@@ -1882,8 +1886,8 @@ const RefineSelectionTools = class {
|
|
|
1882
1886
|
* @protected
|
|
1883
1887
|
*/
|
|
1884
1888
|
_undo() {
|
|
1885
|
-
const undoOp = this.
|
|
1886
|
-
void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this.
|
|
1889
|
+
const undoOp = this.refineSelectionSet.undoStack.pop();
|
|
1890
|
+
void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this.refineSelectionSet.redoStack, undoOp.mode);
|
|
1887
1891
|
}
|
|
1888
1892
|
/**
|
|
1889
1893
|
* Redo the most current ADD or REMOVE operation
|
|
@@ -1893,8 +1897,8 @@ const RefineSelectionTools = class {
|
|
|
1893
1897
|
* @protected
|
|
1894
1898
|
*/
|
|
1895
1899
|
_redo() {
|
|
1896
|
-
const redoOp = this.
|
|
1897
|
-
void this._updateIds(redoOp.ids, redoOp.mode, this.
|
|
1900
|
+
const redoOp = this.refineSelectionSet.redoStack.pop();
|
|
1901
|
+
void this._updateIds(redoOp.ids, redoOp.mode, this.refineSelectionSet.undoStack, redoOp.mode);
|
|
1898
1902
|
}
|
|
1899
1903
|
/**
|
|
1900
1904
|
* Fetches the component's translations
|
|
@@ -16,7 +16,7 @@ import { i as isPrimaryPointerButton, t as toAriaBoolean, g as getElementProp, a
|
|
|
16
16
|
import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent-5caff873.js';
|
|
17
17
|
import { d as debounce } from './debounce-4c884e5c.js';
|
|
18
18
|
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
|
|
19
|
-
import { i as getMapLayerIds, j as getMapLayerHash } from './mapViewUtils-
|
|
19
|
+
import { i as getMapLayerIds, j as getMapLayerHash } from './mapViewUtils-63e118f8.js';
|
|
20
20
|
import { s as state } from './publicNotificationStore-b9daaee4.js';
|
|
21
21
|
import './resources-436ae282.js';
|
|
22
22
|
import './interfaces-d0d83efa.js';
|
|
@@ -8,7 +8,7 @@ import { s as setRequestedIcon, g as getElementProp, a as getSlotted } from './d
|
|
|
8
8
|
import { S as StatusIcons } from './interfaces-4ae145eb.js';
|
|
9
9
|
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
|
|
10
10
|
import { l as loadModules } from './loadModules-649aedac.js';
|
|
11
|
-
import {
|
|
11
|
+
import { h as highlightFeatures, g as goToSelection, d as queryObjectIds, e as getQueryGeoms, q as queryFeaturesByID } from './mapViewUtils-63e118f8.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
14
|
import { g as getLocaleComponentStrings } from './locale-4a87aff1.js';
|
|
@@ -244,6 +244,12 @@ const MapSelectTools = class {
|
|
|
244
244
|
* string: A label to help uniquely identify the selection set
|
|
245
245
|
*/
|
|
246
246
|
this._selectionLabel = "";
|
|
247
|
+
/**
|
|
248
|
+
* boolean: When false the geometries will be used for selection
|
|
249
|
+
* When true a list of OIDs will be used
|
|
250
|
+
* see https://github.com/Esri/solutions-components/issues/148
|
|
251
|
+
*/
|
|
252
|
+
this._skipGeomQuery = false;
|
|
247
253
|
this.bufferColor = [227, 139, 79, 0.8];
|
|
248
254
|
this.bufferOutlineColor = [255, 255, 255];
|
|
249
255
|
this.enabledLayerIds = [];
|
|
@@ -274,13 +280,33 @@ const MapSelectTools = class {
|
|
|
274
280
|
async watchGeometriesHandler(newValue, oldValue) {
|
|
275
281
|
if (newValue !== oldValue) {
|
|
276
282
|
if (newValue.length > 0) {
|
|
277
|
-
|
|
283
|
+
if (this._skipGeomQuery) {
|
|
284
|
+
void highlightFeatures(this._selectedIds, this.selectLayerView, this.mapView);
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
return this._geomQuery(this.geometries);
|
|
288
|
+
}
|
|
278
289
|
}
|
|
279
290
|
else if (newValue.length === 0) {
|
|
280
291
|
return this._clearResults(true, true);
|
|
281
292
|
}
|
|
282
293
|
}
|
|
283
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Called each time the searchConfiguration prop is changed.
|
|
297
|
+
*
|
|
298
|
+
* @returns Promise when complete
|
|
299
|
+
*/
|
|
300
|
+
async watchSearchConfigurationHandler(newValue, oldValue) {
|
|
301
|
+
console.log("watchSearchConfigurationHandler");
|
|
302
|
+
console.log("newValue");
|
|
303
|
+
console.log(newValue);
|
|
304
|
+
console.log("oldValue");
|
|
305
|
+
console.log(oldValue);
|
|
306
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
307
|
+
this._initSearchWidget();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
284
310
|
/**
|
|
285
311
|
* Called each time the workflowType prop is changed and emits the workflowTypeChange event.
|
|
286
312
|
*
|
|
@@ -329,7 +355,8 @@ const MapSelectTools = class {
|
|
|
329
355
|
selectedIds: this._selectedIds,
|
|
330
356
|
layerView: this.selectLayerView,
|
|
331
357
|
geometries: this.geometries,
|
|
332
|
-
refineSelectLayers: this._refineTools.layerViews
|
|
358
|
+
refineSelectLayers: this._refineTools.layerViews,
|
|
359
|
+
skipGeomQuery: this._skipGeomQuery
|
|
333
360
|
};
|
|
334
361
|
}
|
|
335
362
|
/**
|
|
@@ -338,22 +365,28 @@ const MapSelectTools = class {
|
|
|
338
365
|
labelChange(event) {
|
|
339
366
|
this._selectionLabel = event.detail;
|
|
340
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* Handle changes to the search configuration
|
|
370
|
+
*/
|
|
371
|
+
searchConfigurationChangeChanged(event) {
|
|
372
|
+
this.searchConfiguration = event.detail;
|
|
373
|
+
}
|
|
341
374
|
/**
|
|
342
375
|
* Listen to changes in the sketch graphics
|
|
343
376
|
*
|
|
344
377
|
*/
|
|
345
378
|
sketchGraphicsChange(event) {
|
|
346
|
-
this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch);
|
|
379
|
+
this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch, true);
|
|
347
380
|
}
|
|
348
381
|
/**
|
|
349
382
|
* Listen to changes in the refine graphics
|
|
350
383
|
*
|
|
351
384
|
*/
|
|
352
385
|
refineSelectionGraphicsChange(event) {
|
|
353
|
-
const graphics = event.detail;
|
|
354
|
-
this.
|
|
355
|
-
// Using OIDs to avoid issue with points
|
|
386
|
+
const graphics = event.detail.graphics;
|
|
387
|
+
this._skipGeomQuery = event.detail.useOIDs;
|
|
356
388
|
const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
|
|
389
|
+
this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select, !event.detail.useOIDs, oids);
|
|
357
390
|
return this._highlightFeatures(oids);
|
|
358
391
|
}
|
|
359
392
|
//--------------------------------------------------------------------------
|
|
@@ -386,7 +419,7 @@ const MapSelectTools = class {
|
|
|
386
419
|
const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
|
387
420
|
const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
|
388
421
|
const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
|
|
389
|
-
return (h$1(Host, null, h$1("div", { class: "padding-bottom-1" }, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h$1("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h$1("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h$1("div", { class: showSearchClass }, h$1("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h$1("div", { class: showLayerChoiceClass }, h$1("calcite-label", { layout: "inline" }, h$1("calcite-checkbox", { checked: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.workflowType) === EWorkflowType.SELECT, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h$1("div", { class: useDrawClass }, h$1("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h$1("div", { class: useSelectClass }, h$1("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h$1("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h$1("buffer-tools", { distance: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.distance) || this.defaultBufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.unit) || this.defaultBufferUnit })), h$1("slot", null)));
|
|
422
|
+
return (h$1(Host, null, h$1("div", { class: "padding-bottom-1" }, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h$1("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h$1("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h$1("div", { class: showSearchClass }, h$1("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h$1("div", { class: showLayerChoiceClass }, h$1("calcite-label", { layout: "inline" }, h$1("calcite-checkbox", { checked: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.workflowType) === EWorkflowType.SELECT, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h$1("div", { class: useDrawClass }, h$1("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h$1("div", { class: useSelectClass }, h$1("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h$1("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h$1("buffer-tools", { distance: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.distance) || this.defaultBufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.unit) || this.defaultBufferUnit })), h$1("slot", null)));
|
|
390
423
|
}
|
|
391
424
|
//--------------------------------------------------------------------------
|
|
392
425
|
//
|
|
@@ -430,17 +463,19 @@ const MapSelectTools = class {
|
|
|
430
463
|
* @protected
|
|
431
464
|
*/
|
|
432
465
|
_initSelectionSet() {
|
|
433
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
466
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
434
467
|
if (this.selectionSet) {
|
|
435
468
|
this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
|
|
436
469
|
this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
|
|
437
470
|
this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
|
|
438
471
|
this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
|
|
472
|
+
this._selectedIds = (_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.selectedIds;
|
|
473
|
+
this._skipGeomQuery = (_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.skipGeomQuery;
|
|
439
474
|
this.geometries = [
|
|
440
|
-
...(
|
|
475
|
+
...((_h = this.selectionSet) === null || _h === void 0 ? void 0 : _h.geometries) || []
|
|
441
476
|
];
|
|
442
477
|
// reset selection label base
|
|
443
|
-
this._selectionLabel = ((
|
|
478
|
+
this._selectionLabel = ((_j = this.selectionSet) === null || _j === void 0 ? void 0 : _j.label) || this._getSelectionBaseLabel();
|
|
444
479
|
void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
|
445
480
|
}
|
|
446
481
|
else {
|
|
@@ -465,8 +500,16 @@ const MapSelectTools = class {
|
|
|
465
500
|
* @protected
|
|
466
501
|
*/
|
|
467
502
|
_initSearchWidget() {
|
|
503
|
+
console.log("_initSearchWidget");
|
|
504
|
+
console.log("this.mapView");
|
|
505
|
+
console.log(this.mapView);
|
|
506
|
+
console.log("this._searchElement");
|
|
507
|
+
console.log(this._searchElement);
|
|
468
508
|
if (this.mapView && this._searchElement) {
|
|
509
|
+
console.log("this._getSearchConfig");
|
|
469
510
|
const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
|
|
511
|
+
console.log("searchConfiguration");
|
|
512
|
+
console.log(searchConfiguration);
|
|
470
513
|
const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
|
|
471
514
|
this._searchWidget = new this.Search(searchOptions);
|
|
472
515
|
this._searchWidget.on("search-clear", () => {
|
|
@@ -477,9 +520,10 @@ const MapSelectTools = class {
|
|
|
477
520
|
void this._clearResults(false);
|
|
478
521
|
if (searchResults.result) {
|
|
479
522
|
this._searchResult = searchResults.result;
|
|
480
|
-
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name);
|
|
523
|
+
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name, true);
|
|
481
524
|
}
|
|
482
525
|
});
|
|
526
|
+
console.log("END search widget init");
|
|
483
527
|
}
|
|
484
528
|
}
|
|
485
529
|
/**
|
|
@@ -605,6 +649,7 @@ const MapSelectTools = class {
|
|
|
605
649
|
* @protected
|
|
606
650
|
*/
|
|
607
651
|
async _bufferComplete(evt) {
|
|
652
|
+
var _a, _b;
|
|
608
653
|
this._bufferGeometry = Array.isArray(evt.detail) ?
|
|
609
654
|
evt.detail[0] : evt.detail;
|
|
610
655
|
if (this._bufferGeometry) {
|
|
@@ -631,7 +676,13 @@ const MapSelectTools = class {
|
|
|
631
676
|
if (this._bufferGraphicsLayer) {
|
|
632
677
|
this._bufferGraphicsLayer.removeAll();
|
|
633
678
|
}
|
|
634
|
-
|
|
679
|
+
if (this._skipGeomQuery || ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.skipGeomQuery)) {
|
|
680
|
+
this._selectedIds = (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.selectedIds;
|
|
681
|
+
void this._highlightFeatures(this._selectedIds);
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
void this._geomQuery(this.geometries);
|
|
685
|
+
}
|
|
635
686
|
}
|
|
636
687
|
}
|
|
637
688
|
/**
|
|
@@ -679,10 +730,15 @@ const MapSelectTools = class {
|
|
|
679
730
|
* @param type worflow type
|
|
680
731
|
* @param graphics graphics to be used for selection
|
|
681
732
|
* @param label selection label
|
|
733
|
+
* @param useGeoms indicates if the geometries should be used directly for selections
|
|
734
|
+
* @param oids list of IDs to select when useGeoms is false
|
|
682
735
|
*
|
|
683
736
|
* @protected
|
|
684
737
|
*/
|
|
685
|
-
_updateSelection(type, graphics, label) {
|
|
738
|
+
_updateSelection(type, graphics, label, useGeoms, oids) {
|
|
739
|
+
this._selectedIds = oids ? oids : this._selectedIds;
|
|
740
|
+
// see https://github.com/Esri/solutions-components/issues/148
|
|
741
|
+
this._skipGeomQuery = !useGeoms;
|
|
686
742
|
this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
|
|
687
743
|
this._workflowType = type;
|
|
688
744
|
this._selectionLabel = label;
|
|
@@ -699,6 +755,7 @@ const MapSelectTools = class {
|
|
|
699
755
|
get el() { return getElement(this); }
|
|
700
756
|
static get watchers() { return {
|
|
701
757
|
"geometries": ["watchGeometriesHandler"],
|
|
758
|
+
"searchConfiguration": ["watchSearchConfigurationHandler"],
|
|
702
759
|
"_workflowType": ["workflowTypeHandler"]
|
|
703
760
|
}; }
|
|
704
761
|
};
|
|
@@ -1923,7 +1980,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1923
1980
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1924
1981
|
* ====================================================================
|
|
1925
1982
|
*/
|
|
1926
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
|
1983
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-54a6f3a3.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},
|
|
1927
1984
|
/** ====================================================================
|
|
1928
1985
|
* @license
|
|
1929
1986
|
* jsPDF XMP metadata plugin
|
|
@@ -2951,7 +3008,6 @@ const PdfDownload = class {
|
|
|
2951
3008
|
constructor(hostRef) {
|
|
2952
3009
|
registerInstance(this, hostRef);
|
|
2953
3010
|
this.disabled = false;
|
|
2954
|
-
this.enabledSizeValues = [];
|
|
2955
3011
|
this.layerView = undefined;
|
|
2956
3012
|
this._translations = undefined;
|
|
2957
3013
|
}
|
|
@@ -3041,8 +3097,15 @@ const PdfDownload = class {
|
|
|
3041
3097
|
_convertPopupToLabelSpec(popupInfo) {
|
|
3042
3098
|
// Replace <br>, <br/> with |
|
|
3043
3099
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, "|");
|
|
3044
|
-
// Remove remaining HTML tags
|
|
3045
|
-
|
|
3100
|
+
// Remove remaining HTML tags, replace 0xA0 that popup uses for spaces, replace some char representations,
|
|
3101
|
+
// and split the label back into individual lines
|
|
3102
|
+
let labelSpec = popupInfo
|
|
3103
|
+
.replace(/<[\s.]*[^<>]*\/?>/gi, "")
|
|
3104
|
+
.replace(/\xA0/gi, " ")
|
|
3105
|
+
.replace(/</gi, "<")
|
|
3106
|
+
.replace(/>/gi, ">")
|
|
3107
|
+
.replace(/ /gi, " ")
|
|
3108
|
+
.split("|");
|
|
3046
3109
|
// Trim lines and remove empties
|
|
3047
3110
|
labelSpec = labelSpec.map(line => line.trim()).filter(line => line.length > 0);
|
|
3048
3111
|
return labelSpec;
|
|
@@ -3156,6 +3219,19 @@ const RefineSelection = class {
|
|
|
3156
3219
|
this.SketchViewModel = undefined;
|
|
3157
3220
|
this._translations = undefined;
|
|
3158
3221
|
}
|
|
3222
|
+
//--------------------------------------------------------------------------
|
|
3223
|
+
//
|
|
3224
|
+
// Watch handlers
|
|
3225
|
+
//
|
|
3226
|
+
//--------------------------------------------------------------------------
|
|
3227
|
+
/**
|
|
3228
|
+
* Called each time the addresseeLayer is changed.
|
|
3229
|
+
* Add a new clean refine set for the new addressee layer.
|
|
3230
|
+
*/
|
|
3231
|
+
addresseeLayerWatchHandler() {
|
|
3232
|
+
const selectionSets = this.selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE);
|
|
3233
|
+
this.selectionSets = this._initRefineSelectionSet(selectionSets);
|
|
3234
|
+
}
|
|
3159
3235
|
/**
|
|
3160
3236
|
* Handles changes to refine selection ids.
|
|
3161
3237
|
*
|
|
@@ -3177,12 +3253,16 @@ const RefineSelection = class {
|
|
|
3177
3253
|
*/
|
|
3178
3254
|
async componentWillLoad() {
|
|
3179
3255
|
await this._getTranslations();
|
|
3256
|
+
const refineSet = this._getRefineSelectionSet(this.selectionSets);
|
|
3257
|
+
if (!refineSet) {
|
|
3258
|
+
this.selectionSets = this._initRefineSelectionSet(this.selectionSets);
|
|
3259
|
+
}
|
|
3180
3260
|
}
|
|
3181
3261
|
/**
|
|
3182
3262
|
* Renders the component.
|
|
3183
3263
|
*/
|
|
3184
3264
|
render() {
|
|
3185
|
-
return (h$1(Host, null, h$1("div", { class: "padding-1" }, h$1("div", null, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h$1("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h$1("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h$1("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, useLayerPicker: false })), h$1("br", null), (h$1("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
|
3265
|
+
return (h$1(Host, null, h$1("div", { class: "padding-1" }, h$1("div", null, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h$1("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h$1("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h$1("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, refineSelectionSet: this._getRefineSelectionSet(this.selectionSets), useLayerPicker: false })), h$1("br", null), (h$1("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
|
3186
3266
|
}
|
|
3187
3267
|
//--------------------------------------------------------------------------
|
|
3188
3268
|
//
|
|
@@ -3248,7 +3328,7 @@ const RefineSelection = class {
|
|
|
3248
3328
|
if (removeIds.length > 0) {
|
|
3249
3329
|
this.selectionSets = this.selectionSets.reduce((prev, cur) => {
|
|
3250
3330
|
cur.selectedIds = cur.selectedIds.filter(id => removeIds.indexOf(id) < 0);
|
|
3251
|
-
if (cur.selectedIds.length > 0) {
|
|
3331
|
+
if (cur.selectedIds.length > 0 || cur.workflowType === EWorkflowType.REFINE) {
|
|
3252
3332
|
prev.push(cur);
|
|
3253
3333
|
}
|
|
3254
3334
|
return prev;
|
|
@@ -3267,9 +3347,7 @@ const RefineSelection = class {
|
|
|
3267
3347
|
*/
|
|
3268
3348
|
_updateRefineSelectionSet(addIds, removeIds) {
|
|
3269
3349
|
const selectionSet = this._getRefineSelectionSet(this.selectionSets);
|
|
3270
|
-
this.
|
|
3271
|
-
this._updateRefineIds(selectionSet, addIds, removeIds) :
|
|
3272
|
-
this._addRefineSelectionSet(addIds, removeIds);
|
|
3350
|
+
this._updateRefineIds(selectionSet, addIds, removeIds);
|
|
3273
3351
|
this.selectionSetsChanged.emit(this.selectionSets);
|
|
3274
3352
|
}
|
|
3275
3353
|
/**
|
|
@@ -3302,15 +3380,12 @@ const RefineSelection = class {
|
|
|
3302
3380
|
/**
|
|
3303
3381
|
* Add a new refine selection set
|
|
3304
3382
|
*
|
|
3305
|
-
* @param addIds any ids to add
|
|
3306
|
-
* @param removeIds any ids to remove
|
|
3307
|
-
*
|
|
3308
3383
|
* @returns updated selection sets
|
|
3309
3384
|
* @protected
|
|
3310
3385
|
*/
|
|
3311
|
-
|
|
3386
|
+
_initRefineSelectionSet(selectionSets) {
|
|
3312
3387
|
return [
|
|
3313
|
-
...
|
|
3388
|
+
...selectionSets,
|
|
3314
3389
|
({
|
|
3315
3390
|
buffer: undefined,
|
|
3316
3391
|
distance: 0,
|
|
@@ -3321,13 +3396,15 @@ const RefineSelection = class {
|
|
|
3321
3396
|
layerView: this.addresseeLayer,
|
|
3322
3397
|
refineSelectLayers: [],
|
|
3323
3398
|
searchResult: undefined,
|
|
3324
|
-
selectedIds:
|
|
3399
|
+
selectedIds: [],
|
|
3325
3400
|
unit: "feet",
|
|
3326
3401
|
workflowType: EWorkflowType.REFINE,
|
|
3327
3402
|
refineIds: {
|
|
3328
|
-
addIds:
|
|
3329
|
-
removeIds:
|
|
3330
|
-
}
|
|
3403
|
+
addIds: [],
|
|
3404
|
+
removeIds: []
|
|
3405
|
+
},
|
|
3406
|
+
redoStack: [],
|
|
3407
|
+
undoStack: []
|
|
3331
3408
|
})
|
|
3332
3409
|
];
|
|
3333
3410
|
}
|
|
@@ -3368,6 +3445,9 @@ const RefineSelection = class {
|
|
|
3368
3445
|
return null;
|
|
3369
3446
|
}
|
|
3370
3447
|
get el() { return getElement(this); }
|
|
3448
|
+
static get watchers() { return {
|
|
3449
|
+
"addresseeLayer": ["addresseeLayerWatchHandler"]
|
|
3450
|
+
}; }
|
|
3371
3451
|
};
|
|
3372
3452
|
RefineSelection.style = refineSelectionCss;
|
|
3373
3453
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
|
-
export { I as calcite_input_message, N as calcite_notice, M as map_select_tools, P as pdf_download, R as refine_selection } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-
|
|
6
|
+
export { I as calcite_input_message, N as calcite_notice, M as map_select_tools, P as pdf_download, R as refine_selection } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js';
|
|
7
7
|
import './index-c246d90e.js';
|
|
8
8
|
import './dom-3bdc69ee.js';
|
|
9
9
|
import './resources-436ae282.js';
|
|
@@ -14,7 +14,7 @@ import './observers-31601001.js';
|
|
|
14
14
|
import './loadModules-649aedac.js';
|
|
15
15
|
import './locale-4a87aff1.js';
|
|
16
16
|
import './_commonjsHelpers-d5f9d613.js';
|
|
17
|
-
import './mapViewUtils-
|
|
17
|
+
import './mapViewUtils-63e118f8.js';
|
|
18
18
|
import './interfaces-d0d83efa.js';
|
|
19
19
|
import './publicNotificationStore-b9daaee4.js';
|
|
20
20
|
import './index-ac7f66eb.js';
|
|
@@ -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 './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-
|
|
7
|
+
import { _ as _typeof_1 } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js';
|
|
8
8
|
import './index-c246d90e.js';
|
|
9
9
|
import './dom-3bdc69ee.js';
|
|
10
10
|
import './resources-436ae282.js';
|
|
@@ -14,7 +14,7 @@ import './conditionalSlot-d09506c4.js';
|
|
|
14
14
|
import './observers-31601001.js';
|
|
15
15
|
import './loadModules-649aedac.js';
|
|
16
16
|
import './locale-4a87aff1.js';
|
|
17
|
-
import './mapViewUtils-
|
|
17
|
+
import './mapViewUtils-63e118f8.js';
|
|
18
18
|
import './interfaces-d0d83efa.js';
|
|
19
19
|
import './publicNotificationStore-b9daaee4.js';
|
|
20
20
|
import './index-ac7f66eb.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-4a87aff1.js';
|
|
8
|
-
import { q as queryFeaturesByID, g as goToSelection, a as getMapLayerView, b as queryAllFeatures } from './mapViewUtils-
|
|
8
|
+
import { q as queryFeaturesByID, g as goToSelection, a as getMapLayerView, b as queryAllFeatures } from './mapViewUtils-63e118f8.js';
|
|
9
9
|
import { e as exportCSV } from './csvUtils-23b5418f.js';
|
|
10
10
|
import './_commonjsHelpers-d5f9d613.js';
|
|
11
11
|
import './interfaces-d0d83efa.js';
|