@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
|
@@ -20,7 +20,7 @@ const key = require('./key-55aca5c0.js');
|
|
|
20
20
|
const locale$1 = require('./locale-73cab8e8.js');
|
|
21
21
|
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
|
22
22
|
const interfaces = require('./interfaces-17c631bf.js');
|
|
23
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
23
|
+
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
24
24
|
require('./_commonjsHelpers-384729db.js');
|
|
25
25
|
require('./resources-b56bce71.js');
|
|
26
26
|
require('./observers-5311faf8.js');
|
|
@@ -37,8 +37,8 @@ const BufferTools = class {
|
|
|
37
37
|
this.appearance = "text";
|
|
38
38
|
this.distance = 0;
|
|
39
39
|
this.geometries = [];
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
40
|
+
this.max = undefined;
|
|
41
|
+
this.min = 0;
|
|
42
42
|
this.sliderTicks = 10;
|
|
43
43
|
this.unionResults = true;
|
|
44
44
|
this.unit = "meters";
|
|
@@ -123,16 +123,19 @@ const BufferTools = class {
|
|
|
123
123
|
* @protected
|
|
124
124
|
*/
|
|
125
125
|
_setDistance(event) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
this.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
126
|
+
const v = parseInt(event.detail.value, 10);
|
|
127
|
+
if (this.distance !== v && v >= this.min) {
|
|
128
|
+
this.distanceChanged.emit({
|
|
129
|
+
oldValue: this.distance,
|
|
130
|
+
newValue: event.detail.value
|
|
131
|
+
});
|
|
132
|
+
this.distance = v;
|
|
133
|
+
if (this.distance > 0) {
|
|
134
|
+
this._buffer();
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.bufferComplete.emit(undefined);
|
|
138
|
+
}
|
|
136
139
|
}
|
|
137
140
|
}
|
|
138
141
|
/**
|
|
@@ -175,7 +178,7 @@ const BufferTools = class {
|
|
|
175
178
|
* @protected
|
|
176
179
|
*/
|
|
177
180
|
_getTextBoxDisplay() {
|
|
178
|
-
return (index.h("div", { class: "c-container" }, index.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 }), index.h("calcite-select", { class: "flex-1", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
|
|
181
|
+
return (index.h("div", { class: "c-container" }, index.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 }), index.h("calcite-select", { class: "flex-1", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
|
|
179
182
|
}
|
|
180
183
|
/**
|
|
181
184
|
* Render distance control as a slider
|
|
@@ -186,7 +189,7 @@ const BufferTools = class {
|
|
|
186
189
|
* @protected
|
|
187
190
|
*/
|
|
188
191
|
_getSliderDisplay() {
|
|
189
|
-
return (index.h("div", null, index.h("calcite-slider", { labelHandles: true, max: this.
|
|
192
|
+
return (index.h("div", null, index.h("calcite-slider", { labelHandles: true, max: this.max && this.max > 0 ? this.max : undefined, min: this.min, ticks: this.sliderTicks })));
|
|
190
193
|
}
|
|
191
194
|
/**
|
|
192
195
|
* Fetches the component's translations
|
|
@@ -1533,14 +1536,6 @@ const RefineSelectionTools = class {
|
|
|
1533
1536
|
* {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
|
|
1534
1537
|
*/
|
|
1535
1538
|
this._featuresCollection = {};
|
|
1536
|
-
/**
|
|
1537
|
-
* IRefineOperation[]: Array to maintain the possible redo operations
|
|
1538
|
-
*/
|
|
1539
|
-
this._redoStack = [];
|
|
1540
|
-
/**
|
|
1541
|
-
* IRefineOperation[]: Array to maintain the possible undo operations
|
|
1542
|
-
*/
|
|
1543
|
-
this._undoStack = [];
|
|
1544
1539
|
this.active = false;
|
|
1545
1540
|
this.border = false;
|
|
1546
1541
|
this.enabledLayerIds = [];
|
|
@@ -1551,6 +1546,7 @@ const RefineSelectionTools = class {
|
|
|
1551
1546
|
this.mapView = undefined;
|
|
1552
1547
|
this.mode = undefined;
|
|
1553
1548
|
this.refineMode = undefined;
|
|
1549
|
+
this.refineSelectionSet = undefined;
|
|
1554
1550
|
this.useLayerPicker = true;
|
|
1555
1551
|
this._selectEnabled = false;
|
|
1556
1552
|
this._selectionMode = undefined;
|
|
@@ -1631,10 +1627,11 @@ const RefineSelectionTools = class {
|
|
|
1631
1627
|
* Renders the component.
|
|
1632
1628
|
*/
|
|
1633
1629
|
render() {
|
|
1630
|
+
var _a, _b;
|
|
1634
1631
|
const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
|
|
1635
1632
|
const drawClass = this.border ? " border" : "";
|
|
1636
1633
|
const showUndoRedo = this.refineMode === interfaces.ERefineMode.ALL ? "div-visible" : "div-not-visible";
|
|
1637
|
-
return (index.h(index.Host, null, index.h("div", null, index.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" }), index.h("div", { class: "margin-top-1" + drawClass }, index.h("div", { class: "esri-sketch esri-widget" }, index.h("div", { class: "esri-sketch__panel" }, index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: !this._selectEnabled, icon: "
|
|
1634
|
+
return (index.h(index.Host, null, index.h("div", null, index.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" }), index.h("div", { class: "margin-top-1" + drawClass }, index.h("div", { class: "esri-sketch esri-widget" }, index.h("div", { class: "esri-sketch__panel" }, index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: !this._selectEnabled, icon: "pin", onClick: () => this._setSelectionMode(interfaces.ESelectionType.POINT), scale: "s", text: this._translations.select }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(interfaces.ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(interfaces.ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(interfaces.ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), index.h("div", { class: showUndoRedo + " esri-sketch__tool-section esri-sketch__section" }, index.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 }), index.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 }))))))));
|
|
1638
1635
|
}
|
|
1639
1636
|
//--------------------------------------------------------------------------
|
|
1640
1637
|
//
|
|
@@ -1746,7 +1743,7 @@ const RefineSelectionTools = class {
|
|
|
1746
1743
|
return prev;
|
|
1747
1744
|
}, []);
|
|
1748
1745
|
}
|
|
1749
|
-
this.refineSelectionGraphicsChange.emit(graphics);
|
|
1746
|
+
this.refineSelectionGraphicsChange.emit({ graphics, useOIDs: false });
|
|
1750
1747
|
this._clear();
|
|
1751
1748
|
});
|
|
1752
1749
|
});
|
|
@@ -1820,11 +1817,14 @@ const RefineSelectionTools = class {
|
|
|
1820
1817
|
});
|
|
1821
1818
|
});
|
|
1822
1819
|
if (this.refineMode === interfaces.ERefineMode.SUBSET) {
|
|
1823
|
-
this.refineSelectionGraphicsChange.emit(
|
|
1820
|
+
this.refineSelectionGraphicsChange.emit({
|
|
1821
|
+
graphics,
|
|
1822
|
+
useOIDs: this.layerViews[0].layer.title === this.layerView.layer.title
|
|
1823
|
+
});
|
|
1824
1824
|
}
|
|
1825
1825
|
else {
|
|
1826
1826
|
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]; }) : [];
|
|
1827
|
-
await this._updateIds(oids, this.mode, this.
|
|
1827
|
+
await this._updateIds(oids, this.mode, this.refineSelectionSet.undoStack, this.mode);
|
|
1828
1828
|
}
|
|
1829
1829
|
this._clear();
|
|
1830
1830
|
});
|
|
@@ -1867,12 +1867,16 @@ const RefineSelectionTools = class {
|
|
|
1867
1867
|
if (mode === interfaces.ESelectionMode.ADD) {
|
|
1868
1868
|
idUpdates.addIds = oids.filter(id => this.ids.indexOf(id) < 0);
|
|
1869
1869
|
this.ids = [...this.ids, ...idUpdates.addIds];
|
|
1870
|
-
|
|
1870
|
+
if (idUpdates.addIds.length > 0) {
|
|
1871
|
+
operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
|
|
1872
|
+
}
|
|
1871
1873
|
}
|
|
1872
1874
|
else {
|
|
1873
1875
|
idUpdates.removeIds = oids.filter(id => this.ids.indexOf(id) > -1);
|
|
1874
1876
|
this.ids = this.ids.filter(id => idUpdates.removeIds.indexOf(id) < 0);
|
|
1875
|
-
|
|
1877
|
+
if (idUpdates.removeIds.length > 0) {
|
|
1878
|
+
operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
|
|
1879
|
+
}
|
|
1876
1880
|
}
|
|
1877
1881
|
await this._highlightFeatures(this.ids).then(() => {
|
|
1878
1882
|
this.refineSelectionIdsChange.emit(idUpdates);
|
|
@@ -1886,8 +1890,8 @@ const RefineSelectionTools = class {
|
|
|
1886
1890
|
* @protected
|
|
1887
1891
|
*/
|
|
1888
1892
|
_undo() {
|
|
1889
|
-
const undoOp = this.
|
|
1890
|
-
void this._updateIds(undoOp.ids, undoOp.mode === interfaces.ESelectionMode.ADD ? interfaces.ESelectionMode.REMOVE : interfaces.ESelectionMode.ADD, this.
|
|
1893
|
+
const undoOp = this.refineSelectionSet.undoStack.pop();
|
|
1894
|
+
void this._updateIds(undoOp.ids, undoOp.mode === interfaces.ESelectionMode.ADD ? interfaces.ESelectionMode.REMOVE : interfaces.ESelectionMode.ADD, this.refineSelectionSet.redoStack, undoOp.mode);
|
|
1891
1895
|
}
|
|
1892
1896
|
/**
|
|
1893
1897
|
* Redo the most current ADD or REMOVE operation
|
|
@@ -1897,8 +1901,8 @@ const RefineSelectionTools = class {
|
|
|
1897
1901
|
* @protected
|
|
1898
1902
|
*/
|
|
1899
1903
|
_redo() {
|
|
1900
|
-
const redoOp = this.
|
|
1901
|
-
void this._updateIds(redoOp.ids, redoOp.mode, this.
|
|
1904
|
+
const redoOp = this.refineSelectionSet.redoStack.pop();
|
|
1905
|
+
void this._updateIds(redoOp.ids, redoOp.mode, this.refineSelectionSet.undoStack, redoOp.mode);
|
|
1902
1906
|
}
|
|
1903
1907
|
/**
|
|
1904
1908
|
* Fetches the component's translations
|
|
@@ -20,7 +20,7 @@ const dom = require('./dom-4a580af6.js');
|
|
|
20
20
|
const openCloseComponent = require('./openCloseComponent-bf986132.js');
|
|
21
21
|
const debounce = require('./debounce-69c3bada.js');
|
|
22
22
|
const conditionalSlot = require('./conditionalSlot-baada7a3.js');
|
|
23
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
23
|
+
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
24
24
|
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
|
25
25
|
require('./resources-b56bce71.js');
|
|
26
26
|
require('./interfaces-17c631bf.js');
|
|
@@ -10,7 +10,7 @@ const dom = require('./dom-4a580af6.js');
|
|
|
10
10
|
const interfaces = require('./interfaces-e76f31e9.js');
|
|
11
11
|
const conditionalSlot = require('./conditionalSlot-baada7a3.js');
|
|
12
12
|
const loadModules = require('./loadModules-918ff3e7.js');
|
|
13
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
13
|
+
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
14
14
|
const interfaces$1 = require('./interfaces-17c631bf.js');
|
|
15
15
|
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
|
16
16
|
const locale = require('./locale-db1db902.js');
|
|
@@ -246,6 +246,12 @@ const MapSelectTools = class {
|
|
|
246
246
|
* string: A label to help uniquely identify the selection set
|
|
247
247
|
*/
|
|
248
248
|
this._selectionLabel = "";
|
|
249
|
+
/**
|
|
250
|
+
* boolean: When false the geometries will be used for selection
|
|
251
|
+
* When true a list of OIDs will be used
|
|
252
|
+
* see https://github.com/Esri/solutions-components/issues/148
|
|
253
|
+
*/
|
|
254
|
+
this._skipGeomQuery = false;
|
|
249
255
|
this.bufferColor = [227, 139, 79, 0.8];
|
|
250
256
|
this.bufferOutlineColor = [255, 255, 255];
|
|
251
257
|
this.enabledLayerIds = [];
|
|
@@ -276,13 +282,33 @@ const MapSelectTools = class {
|
|
|
276
282
|
async watchGeometriesHandler(newValue, oldValue) {
|
|
277
283
|
if (newValue !== oldValue) {
|
|
278
284
|
if (newValue.length > 0) {
|
|
279
|
-
|
|
285
|
+
if (this._skipGeomQuery) {
|
|
286
|
+
void mapViewUtils.highlightFeatures(this._selectedIds, this.selectLayerView, this.mapView);
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
return this._geomQuery(this.geometries);
|
|
290
|
+
}
|
|
280
291
|
}
|
|
281
292
|
else if (newValue.length === 0) {
|
|
282
293
|
return this._clearResults(true, true);
|
|
283
294
|
}
|
|
284
295
|
}
|
|
285
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* Called each time the searchConfiguration prop is changed.
|
|
299
|
+
*
|
|
300
|
+
* @returns Promise when complete
|
|
301
|
+
*/
|
|
302
|
+
async watchSearchConfigurationHandler(newValue, oldValue) {
|
|
303
|
+
console.log("watchSearchConfigurationHandler");
|
|
304
|
+
console.log("newValue");
|
|
305
|
+
console.log(newValue);
|
|
306
|
+
console.log("oldValue");
|
|
307
|
+
console.log(oldValue);
|
|
308
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
309
|
+
this._initSearchWidget();
|
|
310
|
+
}
|
|
311
|
+
}
|
|
286
312
|
/**
|
|
287
313
|
* Called each time the workflowType prop is changed and emits the workflowTypeChange event.
|
|
288
314
|
*
|
|
@@ -331,7 +357,8 @@ const MapSelectTools = class {
|
|
|
331
357
|
selectedIds: this._selectedIds,
|
|
332
358
|
layerView: this.selectLayerView,
|
|
333
359
|
geometries: this.geometries,
|
|
334
|
-
refineSelectLayers: this._refineTools.layerViews
|
|
360
|
+
refineSelectLayers: this._refineTools.layerViews,
|
|
361
|
+
skipGeomQuery: this._skipGeomQuery
|
|
335
362
|
};
|
|
336
363
|
}
|
|
337
364
|
/**
|
|
@@ -340,22 +367,28 @@ const MapSelectTools = class {
|
|
|
340
367
|
labelChange(event) {
|
|
341
368
|
this._selectionLabel = event.detail;
|
|
342
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
* Handle changes to the search configuration
|
|
372
|
+
*/
|
|
373
|
+
searchConfigurationChangeChanged(event) {
|
|
374
|
+
this.searchConfiguration = event.detail;
|
|
375
|
+
}
|
|
343
376
|
/**
|
|
344
377
|
* Listen to changes in the sketch graphics
|
|
345
378
|
*
|
|
346
379
|
*/
|
|
347
380
|
sketchGraphicsChange(event) {
|
|
348
|
-
this._updateSelection(interfaces$1.EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch);
|
|
381
|
+
this._updateSelection(interfaces$1.EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch, true);
|
|
349
382
|
}
|
|
350
383
|
/**
|
|
351
384
|
* Listen to changes in the refine graphics
|
|
352
385
|
*
|
|
353
386
|
*/
|
|
354
387
|
refineSelectionGraphicsChange(event) {
|
|
355
|
-
const graphics = event.detail;
|
|
356
|
-
this.
|
|
357
|
-
// Using OIDs to avoid issue with points
|
|
388
|
+
const graphics = event.detail.graphics;
|
|
389
|
+
this._skipGeomQuery = event.detail.useOIDs;
|
|
358
390
|
const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
|
|
391
|
+
this._updateSelection(interfaces$1.EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select, !event.detail.useOIDs, oids);
|
|
359
392
|
return this._highlightFeatures(oids);
|
|
360
393
|
}
|
|
361
394
|
//--------------------------------------------------------------------------
|
|
@@ -388,7 +421,7 @@ const MapSelectTools = class {
|
|
|
388
421
|
const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
|
389
422
|
const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
|
390
423
|
const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
|
|
391
|
-
return (index.h(index.Host, null, index.h("div", { class: "padding-bottom-1" }, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, index.h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: interfaces$1.EWorkflowType.SEARCH }, this._translations.search), index.h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: interfaces$1.EWorkflowType.SKETCH }, this._translations.sketch))), index.h("div", { class: showSearchClass }, index.h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), index.h("div", { class: showLayerChoiceClass }, index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { checked: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.workflowType) === interfaces$1.EWorkflowType.SELECT, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), index.h("div", { class: useDrawClass }, index.h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), index.h("div", { class: useSelectClass }, index.h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: interfaces$1.ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: interfaces$1.ERefineMode.SUBSET })), index.h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, index.h("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 })), index.h("slot", null)));
|
|
424
|
+
return (index.h(index.Host, null, index.h("div", { class: "padding-bottom-1" }, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, index.h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: interfaces$1.EWorkflowType.SEARCH }, this._translations.search), index.h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: interfaces$1.EWorkflowType.SKETCH }, this._translations.sketch))), index.h("div", { class: showSearchClass }, index.h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), index.h("div", { class: showLayerChoiceClass }, index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { checked: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.workflowType) === interfaces$1.EWorkflowType.SELECT, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), index.h("div", { class: useDrawClass }, index.h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), index.h("div", { class: useSelectClass }, index.h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: interfaces$1.ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: interfaces$1.ERefineMode.SUBSET })), index.h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, index.h("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 })), index.h("slot", null)));
|
|
392
425
|
}
|
|
393
426
|
//--------------------------------------------------------------------------
|
|
394
427
|
//
|
|
@@ -432,17 +465,19 @@ const MapSelectTools = class {
|
|
|
432
465
|
* @protected
|
|
433
466
|
*/
|
|
434
467
|
_initSelectionSet() {
|
|
435
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
468
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
436
469
|
if (this.selectionSet) {
|
|
437
470
|
this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
|
|
438
471
|
this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
|
|
439
472
|
this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
|
|
440
473
|
this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
|
|
474
|
+
this._selectedIds = (_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.selectedIds;
|
|
475
|
+
this._skipGeomQuery = (_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.skipGeomQuery;
|
|
441
476
|
this.geometries = [
|
|
442
|
-
...(
|
|
477
|
+
...((_h = this.selectionSet) === null || _h === void 0 ? void 0 : _h.geometries) || []
|
|
443
478
|
];
|
|
444
479
|
// reset selection label base
|
|
445
|
-
this._selectionLabel = ((
|
|
480
|
+
this._selectionLabel = ((_j = this.selectionSet) === null || _j === void 0 ? void 0 : _j.label) || this._getSelectionBaseLabel();
|
|
446
481
|
void mapViewUtils.goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
|
447
482
|
}
|
|
448
483
|
else {
|
|
@@ -467,8 +502,16 @@ const MapSelectTools = class {
|
|
|
467
502
|
* @protected
|
|
468
503
|
*/
|
|
469
504
|
_initSearchWidget() {
|
|
505
|
+
console.log("_initSearchWidget");
|
|
506
|
+
console.log("this.mapView");
|
|
507
|
+
console.log(this.mapView);
|
|
508
|
+
console.log("this._searchElement");
|
|
509
|
+
console.log(this._searchElement);
|
|
470
510
|
if (this.mapView && this._searchElement) {
|
|
511
|
+
console.log("this._getSearchConfig");
|
|
471
512
|
const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
|
|
513
|
+
console.log("searchConfiguration");
|
|
514
|
+
console.log(searchConfiguration);
|
|
472
515
|
const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
|
|
473
516
|
this._searchWidget = new this.Search(searchOptions);
|
|
474
517
|
this._searchWidget.on("search-clear", () => {
|
|
@@ -479,9 +522,10 @@ const MapSelectTools = class {
|
|
|
479
522
|
void this._clearResults(false);
|
|
480
523
|
if (searchResults.result) {
|
|
481
524
|
this._searchResult = searchResults.result;
|
|
482
|
-
this._updateSelection(interfaces$1.EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name);
|
|
525
|
+
this._updateSelection(interfaces$1.EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name, true);
|
|
483
526
|
}
|
|
484
527
|
});
|
|
528
|
+
console.log("END search widget init");
|
|
485
529
|
}
|
|
486
530
|
}
|
|
487
531
|
/**
|
|
@@ -607,6 +651,7 @@ const MapSelectTools = class {
|
|
|
607
651
|
* @protected
|
|
608
652
|
*/
|
|
609
653
|
async _bufferComplete(evt) {
|
|
654
|
+
var _a, _b;
|
|
610
655
|
this._bufferGeometry = Array.isArray(evt.detail) ?
|
|
611
656
|
evt.detail[0] : evt.detail;
|
|
612
657
|
if (this._bufferGeometry) {
|
|
@@ -633,7 +678,13 @@ const MapSelectTools = class {
|
|
|
633
678
|
if (this._bufferGraphicsLayer) {
|
|
634
679
|
this._bufferGraphicsLayer.removeAll();
|
|
635
680
|
}
|
|
636
|
-
|
|
681
|
+
if (this._skipGeomQuery || ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.skipGeomQuery)) {
|
|
682
|
+
this._selectedIds = (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.selectedIds;
|
|
683
|
+
void this._highlightFeatures(this._selectedIds);
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
void this._geomQuery(this.geometries);
|
|
687
|
+
}
|
|
637
688
|
}
|
|
638
689
|
}
|
|
639
690
|
/**
|
|
@@ -681,10 +732,15 @@ const MapSelectTools = class {
|
|
|
681
732
|
* @param type worflow type
|
|
682
733
|
* @param graphics graphics to be used for selection
|
|
683
734
|
* @param label selection label
|
|
735
|
+
* @param useGeoms indicates if the geometries should be used directly for selections
|
|
736
|
+
* @param oids list of IDs to select when useGeoms is false
|
|
684
737
|
*
|
|
685
738
|
* @protected
|
|
686
739
|
*/
|
|
687
|
-
_updateSelection(type, graphics, label) {
|
|
740
|
+
_updateSelection(type, graphics, label, useGeoms, oids) {
|
|
741
|
+
this._selectedIds = oids ? oids : this._selectedIds;
|
|
742
|
+
// see https://github.com/Esri/solutions-components/issues/148
|
|
743
|
+
this._skipGeomQuery = !useGeoms;
|
|
688
744
|
this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
|
|
689
745
|
this._workflowType = type;
|
|
690
746
|
this._selectionLabel = label;
|
|
@@ -701,6 +757,7 @@ const MapSelectTools = class {
|
|
|
701
757
|
get el() { return index.getElement(this); }
|
|
702
758
|
static get watchers() { return {
|
|
703
759
|
"geometries": ["watchGeometriesHandler"],
|
|
760
|
+
"searchConfiguration": ["watchSearchConfigurationHandler"],
|
|
704
761
|
"_workflowType": ["workflowTypeHandler"]
|
|
705
762
|
}; }
|
|
706
763
|
};
|
|
@@ -1925,7 +1982,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1925
1982
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1926
1983
|
* ====================================================================
|
|
1927
1984
|
*/
|
|
1928
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-
|
|
1985
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-176629d8.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},
|
|
1929
1986
|
/** ====================================================================
|
|
1930
1987
|
* @license
|
|
1931
1988
|
* jsPDF XMP metadata plugin
|
|
@@ -2953,7 +3010,6 @@ const PdfDownload = class {
|
|
|
2953
3010
|
constructor(hostRef) {
|
|
2954
3011
|
index.registerInstance(this, hostRef);
|
|
2955
3012
|
this.disabled = false;
|
|
2956
|
-
this.enabledSizeValues = [];
|
|
2957
3013
|
this.layerView = undefined;
|
|
2958
3014
|
this._translations = undefined;
|
|
2959
3015
|
}
|
|
@@ -3043,8 +3099,15 @@ const PdfDownload = class {
|
|
|
3043
3099
|
_convertPopupToLabelSpec(popupInfo) {
|
|
3044
3100
|
// Replace <br>, <br/> with |
|
|
3045
3101
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, "|");
|
|
3046
|
-
// Remove remaining HTML tags
|
|
3047
|
-
|
|
3102
|
+
// Remove remaining HTML tags, replace 0xA0 that popup uses for spaces, replace some char representations,
|
|
3103
|
+
// and split the label back into individual lines
|
|
3104
|
+
let labelSpec = popupInfo
|
|
3105
|
+
.replace(/<[\s.]*[^<>]*\/?>/gi, "")
|
|
3106
|
+
.replace(/\xA0/gi, " ")
|
|
3107
|
+
.replace(/</gi, "<")
|
|
3108
|
+
.replace(/>/gi, ">")
|
|
3109
|
+
.replace(/ /gi, " ")
|
|
3110
|
+
.split("|");
|
|
3048
3111
|
// Trim lines and remove empties
|
|
3049
3112
|
labelSpec = labelSpec.map(line => line.trim()).filter(line => line.length > 0);
|
|
3050
3113
|
return labelSpec;
|
|
@@ -3158,6 +3221,19 @@ const RefineSelection = class {
|
|
|
3158
3221
|
this.SketchViewModel = undefined;
|
|
3159
3222
|
this._translations = undefined;
|
|
3160
3223
|
}
|
|
3224
|
+
//--------------------------------------------------------------------------
|
|
3225
|
+
//
|
|
3226
|
+
// Watch handlers
|
|
3227
|
+
//
|
|
3228
|
+
//--------------------------------------------------------------------------
|
|
3229
|
+
/**
|
|
3230
|
+
* Called each time the addresseeLayer is changed.
|
|
3231
|
+
* Add a new clean refine set for the new addressee layer.
|
|
3232
|
+
*/
|
|
3233
|
+
addresseeLayerWatchHandler() {
|
|
3234
|
+
const selectionSets = this.selectionSets.filter(ss => ss.workflowType !== interfaces$1.EWorkflowType.REFINE);
|
|
3235
|
+
this.selectionSets = this._initRefineSelectionSet(selectionSets);
|
|
3236
|
+
}
|
|
3161
3237
|
/**
|
|
3162
3238
|
* Handles changes to refine selection ids.
|
|
3163
3239
|
*
|
|
@@ -3179,12 +3255,16 @@ const RefineSelection = class {
|
|
|
3179
3255
|
*/
|
|
3180
3256
|
async componentWillLoad() {
|
|
3181
3257
|
await this._getTranslations();
|
|
3258
|
+
const refineSet = this._getRefineSelectionSet(this.selectionSets);
|
|
3259
|
+
if (!refineSet) {
|
|
3260
|
+
this.selectionSets = this._initRefineSelectionSet(this.selectionSets);
|
|
3261
|
+
}
|
|
3182
3262
|
}
|
|
3183
3263
|
/**
|
|
3184
3264
|
* Renders the component.
|
|
3185
3265
|
*/
|
|
3186
3266
|
render() {
|
|
3187
|
-
return (index.h(index.Host, null, index.h("div", { class: "padding-1" }, index.h("div", null, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, index.h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.ADD), value: interfaces$1.ESelectionMode.ADD }, this._translations.add), index.h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.REMOVE), value: interfaces$1.ESelectionMode.REMOVE }, this._translations.remove)), index.h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: publicNotificationUtils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? interfaces$1.ESelectionMode.ADD : interfaces$1.ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: interfaces$1.ERefineMode.ALL, useLayerPicker: false })), index.h("br", null), (index.h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
|
3267
|
+
return (index.h(index.Host, null, index.h("div", { class: "padding-1" }, index.h("div", null, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, index.h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.ADD), value: interfaces$1.ESelectionMode.ADD }, this._translations.add), index.h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.REMOVE), value: interfaces$1.ESelectionMode.REMOVE }, this._translations.remove)), index.h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: publicNotificationUtils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? interfaces$1.ESelectionMode.ADD : interfaces$1.ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: interfaces$1.ERefineMode.ALL, refineSelectionSet: this._getRefineSelectionSet(this.selectionSets), useLayerPicker: false })), index.h("br", null), (index.h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
|
3188
3268
|
}
|
|
3189
3269
|
//--------------------------------------------------------------------------
|
|
3190
3270
|
//
|
|
@@ -3250,7 +3330,7 @@ const RefineSelection = class {
|
|
|
3250
3330
|
if (removeIds.length > 0) {
|
|
3251
3331
|
this.selectionSets = this.selectionSets.reduce((prev, cur) => {
|
|
3252
3332
|
cur.selectedIds = cur.selectedIds.filter(id => removeIds.indexOf(id) < 0);
|
|
3253
|
-
if (cur.selectedIds.length > 0) {
|
|
3333
|
+
if (cur.selectedIds.length > 0 || cur.workflowType === interfaces$1.EWorkflowType.REFINE) {
|
|
3254
3334
|
prev.push(cur);
|
|
3255
3335
|
}
|
|
3256
3336
|
return prev;
|
|
@@ -3269,9 +3349,7 @@ const RefineSelection = class {
|
|
|
3269
3349
|
*/
|
|
3270
3350
|
_updateRefineSelectionSet(addIds, removeIds) {
|
|
3271
3351
|
const selectionSet = this._getRefineSelectionSet(this.selectionSets);
|
|
3272
|
-
this.
|
|
3273
|
-
this._updateRefineIds(selectionSet, addIds, removeIds) :
|
|
3274
|
-
this._addRefineSelectionSet(addIds, removeIds);
|
|
3352
|
+
this._updateRefineIds(selectionSet, addIds, removeIds);
|
|
3275
3353
|
this.selectionSetsChanged.emit(this.selectionSets);
|
|
3276
3354
|
}
|
|
3277
3355
|
/**
|
|
@@ -3304,15 +3382,12 @@ const RefineSelection = class {
|
|
|
3304
3382
|
/**
|
|
3305
3383
|
* Add a new refine selection set
|
|
3306
3384
|
*
|
|
3307
|
-
* @param addIds any ids to add
|
|
3308
|
-
* @param removeIds any ids to remove
|
|
3309
|
-
*
|
|
3310
3385
|
* @returns updated selection sets
|
|
3311
3386
|
* @protected
|
|
3312
3387
|
*/
|
|
3313
|
-
|
|
3388
|
+
_initRefineSelectionSet(selectionSets) {
|
|
3314
3389
|
return [
|
|
3315
|
-
...
|
|
3390
|
+
...selectionSets,
|
|
3316
3391
|
({
|
|
3317
3392
|
buffer: undefined,
|
|
3318
3393
|
distance: 0,
|
|
@@ -3323,13 +3398,15 @@ const RefineSelection = class {
|
|
|
3323
3398
|
layerView: this.addresseeLayer,
|
|
3324
3399
|
refineSelectLayers: [],
|
|
3325
3400
|
searchResult: undefined,
|
|
3326
|
-
selectedIds:
|
|
3401
|
+
selectedIds: [],
|
|
3327
3402
|
unit: "feet",
|
|
3328
3403
|
workflowType: interfaces$1.EWorkflowType.REFINE,
|
|
3329
3404
|
refineIds: {
|
|
3330
|
-
addIds:
|
|
3331
|
-
removeIds:
|
|
3332
|
-
}
|
|
3405
|
+
addIds: [],
|
|
3406
|
+
removeIds: []
|
|
3407
|
+
},
|
|
3408
|
+
redoStack: [],
|
|
3409
|
+
undoStack: []
|
|
3333
3410
|
})
|
|
3334
3411
|
];
|
|
3335
3412
|
}
|
|
@@ -3370,6 +3447,9 @@ const RefineSelection = class {
|
|
|
3370
3447
|
return null;
|
|
3371
3448
|
}
|
|
3372
3449
|
get el() { return index.getElement(this); }
|
|
3450
|
+
static get watchers() { return {
|
|
3451
|
+
"addresseeLayer": ["addresseeLayerWatchHandler"]
|
|
3452
|
+
}; }
|
|
3373
3453
|
};
|
|
3374
3454
|
RefineSelection.style = refineSelectionCss;
|
|
3375
3455
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const calciteInputMessage_calciteNotice_mapSelectTools_pdfDownload_refineSelection_entry = require('./calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-
|
|
10
|
+
const calciteInputMessage_calciteNotice_mapSelectTools_pdfDownload_refineSelection_entry = require('./calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js');
|
|
11
11
|
require('./index-c6979cbb.js');
|
|
12
12
|
require('./dom-4a580af6.js');
|
|
13
13
|
require('./resources-b56bce71.js');
|
|
@@ -18,7 +18,7 @@ require('./observers-5311faf8.js');
|
|
|
18
18
|
require('./loadModules-918ff3e7.js');
|
|
19
19
|
require('./locale-db1db902.js');
|
|
20
20
|
require('./_commonjsHelpers-384729db.js');
|
|
21
|
-
require('./mapViewUtils-
|
|
21
|
+
require('./mapViewUtils-d250b1ed.js');
|
|
22
22
|
require('./interfaces-17c631bf.js');
|
|
23
23
|
require('./publicNotificationStore-20e924f5.js');
|
|
24
24
|
require('./index-763f87ac.js');
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
|
9
|
-
const calciteInputMessage_calciteNotice_mapSelectTools_pdfDownload_refineSelection_entry = require('./calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-
|
|
9
|
+
const calciteInputMessage_calciteNotice_mapSelectTools_pdfDownload_refineSelection_entry = require('./calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js');
|
|
10
10
|
require('./index-c6979cbb.js');
|
|
11
11
|
require('./dom-4a580af6.js');
|
|
12
12
|
require('./resources-b56bce71.js');
|
|
@@ -16,7 +16,7 @@ require('./conditionalSlot-baada7a3.js');
|
|
|
16
16
|
require('./observers-5311faf8.js');
|
|
17
17
|
require('./loadModules-918ff3e7.js');
|
|
18
18
|
require('./locale-db1db902.js');
|
|
19
|
-
require('./mapViewUtils-
|
|
19
|
+
require('./mapViewUtils-d250b1ed.js');
|
|
20
20
|
require('./interfaces-17c631bf.js');
|
|
21
21
|
require('./publicNotificationStore-20e924f5.js');
|
|
22
22
|
require('./index-763f87ac.js');
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
|
|
10
10
|
const index = require('./index-c6979cbb.js');
|
|
11
11
|
const locale = require('./locale-db1db902.js');
|
|
12
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
12
|
+
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
13
13
|
const csvUtils = require('./csvUtils-3a56c6d8.js');
|
|
14
14
|
require('./_commonjsHelpers-384729db.js');
|
|
15
15
|
require('./interfaces-17c631bf.js');
|