@esri/solutions-components 0.6.3 → 0.6.4
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_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +74 -52
- package/dist/cjs/calcite-input-text_4.cjs.entry.js +9 -9
- package/dist/cjs/card-manager_3.cjs.entry.js +36 -29
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -2
- package/dist/cjs/{downloadUtils-6d4e269f.js → downloadUtils-4aadf4b0.js} +4 -3
- package/dist/cjs/edit-card_2.cjs.entry.js +11 -6
- package/dist/cjs/{index.es-fc923796.js → index.es-17db3b89.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapViewUtils-efc49df7.js → mapViewUtils-77a1ff88.js} +48 -6
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/{publicNotificationStore-cd1a32c3.js → publicNotificationStore-ec1bdd2d.js} +5 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +8 -8
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/edit-card/edit-card.css +1 -1
- package/dist/collection/components/edit-card/edit-card.js +7 -1
- package/dist/collection/components/info-card/info-card.js +4 -5
- package/dist/collection/components/layer-table/layer-table.js +34 -27
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +110 -54
- package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
- package/dist/collection/components/refine-selection/refine-selection.js +3 -3
- package/dist/collection/demos/crowdsource-manager.html +31 -16
- package/dist/collection/utils/downloadUtils.js +2 -1
- package/dist/collection/utils/downloadUtils.ts +1 -1
- package/dist/collection/utils/interfaces.ts +6 -5
- package/dist/collection/utils/mapViewUtils.js +44 -5
- package/dist/collection/utils/mapViewUtils.ts +52 -7
- package/dist/collection/utils/publicNotificationStore.js +5 -1
- package/dist/collection/utils/publicNotificationStore.ts +5 -1
- package/dist/components/card-manager2.js +5 -5
- package/dist/components/crowdsource-manager.js +2 -2
- package/dist/components/downloadUtils.js +2 -1
- package/dist/components/edit-card2.js +7 -1
- package/dist/components/info-card2.js +4 -5
- package/dist/components/layer-table2.js +33 -26
- package/dist/components/map-layer-picker2.js +78 -54
- package/dist/components/map-select-tools2.js +5 -5
- package/dist/components/mapViewUtils.js +45 -6
- package/dist/components/publicNotificationStore.js +5 -1
- package/dist/components/refine-selection2.js +3 -3
- package/dist/esm/buffer-tools_4.entry.js +1 -1
- package/dist/esm/calcite-combobox_6.entry.js +74 -52
- package/dist/esm/calcite-input-text_4.entry.js +9 -9
- package/dist/esm/card-manager_3.entry.js +36 -29
- package/dist/esm/crowdsource-manager.entry.js +2 -2
- package/dist/esm/{downloadUtils-1092cb0f.js → downloadUtils-3b5f85d9.js} +4 -3
- package/dist/esm/edit-card_2.entry.js +11 -6
- package/dist/esm/{index.es-08a48fdd.js → index.es-bb9196f6.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-a787c6a8.js → mapViewUtils-55ea1e10.js} +45 -6
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/{publicNotificationStore-c36d95bf.js → publicNotificationStore-6ef555f3.js} +5 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +31 -16
- package/dist/solutions-components/{p-841a5f97.entry.js → p-03179924.entry.js} +1 -1
- package/dist/solutions-components/{p-a29ba58a.js → p-477ae127.js} +2 -2
- package/dist/solutions-components/p-4af3f843.js +36 -0
- package/dist/solutions-components/{p-5b260e5f.js → p-6015e2ee.js} +1 -1
- package/dist/solutions-components/{p-ad60a547.js → p-9807924d.js} +3 -3
- package/dist/solutions-components/{p-781480c2.entry.js → p-a56f965e.entry.js} +1 -1
- package/dist/solutions-components/{p-5a6ca63b.entry.js → p-cdc0bb97.entry.js} +6 -6
- package/dist/solutions-components/{p-6305f474.entry.js → p-d3fd28e9.entry.js} +1 -1
- package/dist/solutions-components/p-d83da8a0.entry.js +11 -0
- package/dist/solutions-components/p-d875f38c.entry.js +6 -0
- package/dist/solutions-components/p-ef235c88.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +1 -1
- package/dist/solutions-components/utils/interfaces.ts +6 -5
- package/dist/solutions-components/utils/mapViewUtils.ts +52 -7
- package/dist/solutions-components/utils/publicNotificationStore.ts +5 -1
- package/dist/types/components/card-manager/card-manager.d.ts +2 -2
- package/dist/types/components/edit-card/edit-card.d.ts +6 -2
- package/dist/types/components/layer-table/layer-table.d.ts +4 -4
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +34 -19
- package/dist/types/components.d.ts +22 -6
- package/dist/types/utils/interfaces.d.ts +4 -3
- package/dist/types/utils/mapViewUtils.d.ts +22 -5
- package/dist/types/utils/publicNotificationStore.d.ts +2 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-0641aa9b.js +0 -36
- package/dist/solutions-components/p-74a2d025.entry.js +0 -6
- package/dist/solutions-components/p-a62c1b3c.entry.js +0 -6
- package/dist/solutions-components/p-ccf5c0ff.entry.js +0 -11
|
@@ -20,8 +20,8 @@ import { C as ComboboxChildSelector, b as getItemAncestors, c as getItemChildren
|
|
|
20
20
|
import { d as debounce } from './debounce-4c884e5c.js';
|
|
21
21
|
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-b651e48a.js';
|
|
22
22
|
import { i as isActivationKey } from './key-d6bc268b.js';
|
|
23
|
-
import {
|
|
24
|
-
import { s as state } from './publicNotificationStore-
|
|
23
|
+
import { j as getMapLayerIds, l as getMapTableIds, m as getMapLayerHash, n as getMapTableHash } from './mapViewUtils-55ea1e10.js';
|
|
24
|
+
import { s as state } from './publicNotificationStore-6ef555f3.js';
|
|
25
25
|
import './resources-ee3b03a3.js';
|
|
26
26
|
import './browser-f8ca09b7.js';
|
|
27
27
|
import './interfaces-bf20e69c.js';
|
|
@@ -1679,13 +1679,15 @@ const MapLayerPicker = class {
|
|
|
1679
1679
|
this.layerSelectionChange = createEvent(this, "layerSelectionChange", 7);
|
|
1680
1680
|
this.appearance = "transparent";
|
|
1681
1681
|
this.enabledLayerIds = [];
|
|
1682
|
+
this.enabledTableIds = [];
|
|
1682
1683
|
this.mapView = undefined;
|
|
1683
1684
|
this.placeholderIcon = "";
|
|
1684
|
-
this.
|
|
1685
|
+
this.selectedIds = [];
|
|
1685
1686
|
this.scale = "m";
|
|
1687
|
+
this.showTables = true;
|
|
1686
1688
|
this.type = "select";
|
|
1687
|
-
this.
|
|
1688
|
-
this.
|
|
1689
|
+
this.ids = [];
|
|
1690
|
+
this.selectedName = "";
|
|
1689
1691
|
}
|
|
1690
1692
|
//--------------------------------------------------------------------------
|
|
1691
1693
|
//
|
|
@@ -1698,7 +1700,11 @@ const MapLayerPicker = class {
|
|
|
1698
1700
|
*/
|
|
1699
1701
|
async mapViewWatchHandler() {
|
|
1700
1702
|
await this._setLayers();
|
|
1701
|
-
|
|
1703
|
+
const hasLayers = Object.keys(state.layerNameHash).length > 0;
|
|
1704
|
+
const hasTables = Object.keys(state.tableNameHash).length > 0 && this.showTables;
|
|
1705
|
+
if (hasLayers || hasTables) {
|
|
1706
|
+
this._setSelectedLayer(this.ids[0], hasLayers ? "layer" : "table");
|
|
1707
|
+
}
|
|
1702
1708
|
}
|
|
1703
1709
|
//--------------------------------------------------------------------------
|
|
1704
1710
|
//
|
|
@@ -1710,8 +1716,8 @@ const MapLayerPicker = class {
|
|
|
1710
1716
|
*/
|
|
1711
1717
|
async componentWillLoad() {
|
|
1712
1718
|
await this._setLayers();
|
|
1713
|
-
if (this.
|
|
1714
|
-
this.layerSelectionChange.emit(this.
|
|
1719
|
+
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
|
1720
|
+
this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
|
|
1715
1721
|
}
|
|
1716
1722
|
}
|
|
1717
1723
|
/**
|
|
@@ -1725,13 +1731,15 @@ const MapLayerPicker = class {
|
|
|
1725
1731
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
1726
1732
|
*/
|
|
1727
1733
|
async componentDidLoad() {
|
|
1728
|
-
if (this.
|
|
1729
|
-
const id = this.
|
|
1734
|
+
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
|
1735
|
+
const id = this.selectedIds.length === 1 ? this.selectedIds[0] : this.ids[0];
|
|
1730
1736
|
if (this.type === "select") {
|
|
1731
1737
|
this._layerElement.value = id;
|
|
1732
1738
|
}
|
|
1733
1739
|
else if (this.type === "dropdown") {
|
|
1734
|
-
this.
|
|
1740
|
+
this.selectedName = Object.keys(state.layerNameHash).indexOf(id) > -1 ?
|
|
1741
|
+
state.layerNameHash[id] : Object.keys(state.tableNameHash).indexOf(id) > -1 ?
|
|
1742
|
+
state.tableNameHash[id] : "";
|
|
1735
1743
|
}
|
|
1736
1744
|
}
|
|
1737
1745
|
}
|
|
@@ -1748,7 +1756,7 @@ const MapLayerPicker = class {
|
|
|
1748
1756
|
* @returns Calcite Select component with the ids of the layers from the map
|
|
1749
1757
|
*/
|
|
1750
1758
|
_getSelect() {
|
|
1751
|
-
return (h("calcite-select", { label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this.
|
|
1759
|
+
return (h("calcite-select", { label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this._getMapLayerOptions()));
|
|
1752
1760
|
}
|
|
1753
1761
|
/**
|
|
1754
1762
|
* Create a list of layer ids from the map
|
|
@@ -1758,7 +1766,7 @@ const MapLayerPicker = class {
|
|
|
1758
1766
|
* @returns Calcite ComboBox component with the ids of the layers from the map
|
|
1759
1767
|
*/
|
|
1760
1768
|
_getCombobox() {
|
|
1761
|
-
return (h("calcite-combobox", { clearDisabled: true, label: "", onCalciteComboboxChange: () => this._layerSelectionChange(), "placeholder-icon": this.placeholderIcon, ref: (el) => { this._layerElement = el; }, scale: this.scale, "selection-mode": "single" }, this.
|
|
1769
|
+
return (h("calcite-combobox", { clearDisabled: true, label: "", onCalciteComboboxChange: () => this._layerSelectionChange(), "placeholder-icon": this.placeholderIcon, ref: (el) => { this._layerElement = el; }, scale: this.scale, "selection-mode": "single" }, this._getMapLayerOptions()));
|
|
1762
1770
|
}
|
|
1763
1771
|
/**
|
|
1764
1772
|
* Hydrate a dropdown component with items to display the layer names
|
|
@@ -1766,54 +1774,42 @@ const MapLayerPicker = class {
|
|
|
1766
1774
|
* @returns Array of Dropdown items with layer names
|
|
1767
1775
|
*/
|
|
1768
1776
|
_getDropdown() {
|
|
1769
|
-
return (h("calcite-dropdown", { class: "layer-picker-dropdown" }, h("calcite-action", { slot: "trigger", text: "" }, h("calcite-button", { alignment: "icon-end-space-between", appearance: this.appearance, class: "max-width-350", iconEnd: "chevron-down", iconStart: "layers", kind: "neutral", width: "full" }, h("div", null, this.
|
|
1777
|
+
return (h("calcite-dropdown", { class: "layer-picker-dropdown" }, h("calcite-action", { slot: "trigger", text: "" }, h("calcite-button", { alignment: "icon-end-space-between", appearance: this.appearance, class: "max-width-350", iconEnd: "chevron-down", iconStart: "layers", kind: "neutral", width: "full" }, h("div", null, this.selectedName))), h("calcite-dropdown-group", { "selection-mode": "single" }, this._getMapLayerOptions())));
|
|
1770
1778
|
}
|
|
1771
1779
|
/**
|
|
1772
|
-
*
|
|
1780
|
+
* Get the appropriate type of dom nodes for each valid layer or table
|
|
1773
1781
|
*
|
|
1774
|
-
* @returns Array of
|
|
1782
|
+
* @returns Array of dom nodes with the names of the layers and optionally of the tables
|
|
1775
1783
|
*/
|
|
1776
|
-
|
|
1777
|
-
return this.
|
|
1778
|
-
if (
|
|
1779
|
-
prev.push(
|
|
1784
|
+
_getMapLayerOptions() {
|
|
1785
|
+
return this.ids.reduce((prev, cur) => {
|
|
1786
|
+
if (this._validLayer(cur)) {
|
|
1787
|
+
prev.push(this._getItem(cur, "layer"));
|
|
1788
|
+
}
|
|
1789
|
+
else if (this._validTable(cur)) {
|
|
1790
|
+
prev.push(this._getItem(cur, "table"));
|
|
1780
1791
|
}
|
|
1781
1792
|
return prev;
|
|
1782
1793
|
}, []);
|
|
1783
1794
|
}
|
|
1784
1795
|
/**
|
|
1785
|
-
*
|
|
1786
|
-
*/
|
|
1787
|
-
_setSelectedLayer(id) {
|
|
1788
|
-
this.selectedLayerName = state.layerNameHash[id];
|
|
1789
|
-
this.selectedLayerIds = [id];
|
|
1790
|
-
this.layerSelectionChange.emit(this.selectedLayerIds);
|
|
1791
|
-
}
|
|
1792
|
-
/**
|
|
1793
|
-
* Hydrate a select component with the ids of the layers in the map
|
|
1796
|
+
* Get the appropriate type of dom node for the current layer or table id
|
|
1794
1797
|
*
|
|
1795
|
-
* @returns
|
|
1798
|
+
* @returns A dom node with the name of the layer or table
|
|
1796
1799
|
*/
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
return prev;
|
|
1803
|
-
}, []);
|
|
1800
|
+
_getItem(id, itemType) {
|
|
1801
|
+
const name = itemType === "layer" ? state.layerNameHash[id] : state.tableNameHash[id];
|
|
1802
|
+
return this.type === "combobox" ? (h("calcite-combobox-item", { textLabel: name, value: id })) :
|
|
1803
|
+
this.type === "select" ? (h("calcite-option", { label: name, value: id })) :
|
|
1804
|
+
(h("calcite-dropdown-item", { onClick: () => void this._setSelectedLayer(id, itemType) }, name));
|
|
1804
1805
|
}
|
|
1805
1806
|
/**
|
|
1806
|
-
*
|
|
1807
|
-
*
|
|
1808
|
-
* @returns Array of ComboBox items for the ids of the layers
|
|
1807
|
+
* Store the layer name based on the user selection
|
|
1809
1808
|
*/
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
}
|
|
1815
|
-
return prev;
|
|
1816
|
-
}, []);
|
|
1809
|
+
_setSelectedLayer(id, type) {
|
|
1810
|
+
this.selectedName = type === "layer" ? state.layerNameHash[id] : state.tableNameHash[id];
|
|
1811
|
+
this.selectedIds = [id];
|
|
1812
|
+
this.layerSelectionChange.emit(this.selectedIds);
|
|
1817
1813
|
}
|
|
1818
1814
|
/**
|
|
1819
1815
|
* Fetch the ids of the layers from the map
|
|
@@ -1823,8 +1819,12 @@ const MapLayerPicker = class {
|
|
|
1823
1819
|
async _setLayers() {
|
|
1824
1820
|
if (this.mapView) {
|
|
1825
1821
|
const mapLayerIds = await getMapLayerIds(this.mapView);
|
|
1826
|
-
|
|
1827
|
-
|
|
1822
|
+
const mapTableIds = this.showTables ? await getMapTableIds(this.mapView) : [];
|
|
1823
|
+
this.ids = [
|
|
1824
|
+
...mapLayerIds.filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.indexOf(n) > -1 : true; }),
|
|
1825
|
+
...mapTableIds.filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.indexOf(n) > -1 : true; }),
|
|
1826
|
+
];
|
|
1827
|
+
await this._initStateHash();
|
|
1828
1828
|
}
|
|
1829
1829
|
}
|
|
1830
1830
|
/**
|
|
@@ -1832,11 +1832,33 @@ const MapLayerPicker = class {
|
|
|
1832
1832
|
*
|
|
1833
1833
|
* @returns Promise when the operation has completed
|
|
1834
1834
|
*/
|
|
1835
|
-
async
|
|
1835
|
+
async _initStateHash() {
|
|
1836
1836
|
if (this.mapView) {
|
|
1837
1837
|
state.layerNameHash = await getMapLayerHash(this.mapView);
|
|
1838
|
+
state.tableNameHash = this.showTables ? await getMapTableHash(this.mapView) : {};
|
|
1838
1839
|
}
|
|
1839
1840
|
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
|
1843
|
+
*
|
|
1844
|
+
* @returns boolean when true the layer will be used in the current layer picker type
|
|
1845
|
+
*/
|
|
1846
|
+
_validLayer(id) {
|
|
1847
|
+
const name = state.layerNameHash[id];
|
|
1848
|
+
return name && state.managedLayers.indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
|
1849
|
+
this.enabledLayerIds.indexOf(id) > -1 : name);
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
|
1853
|
+
*
|
|
1854
|
+
* @returns boolean when true the table will be used in the current layer picker type
|
|
1855
|
+
*/
|
|
1856
|
+
_validTable(id) {
|
|
1857
|
+
const name = state.tableNameHash[id];
|
|
1858
|
+
const validName = name && this.showTables;
|
|
1859
|
+
return validName ? state.managedTables.indexOf(name) < 0 &&
|
|
1860
|
+
(this.enabledTableIds.length > 0 ? this.enabledTableIds.indexOf(id) > -1 : true) : validName;
|
|
1861
|
+
}
|
|
1840
1862
|
/**
|
|
1841
1863
|
* Fetch the ids of the layers from the map
|
|
1842
1864
|
*
|
|
@@ -1845,8 +1867,8 @@ const MapLayerPicker = class {
|
|
|
1845
1867
|
_layerSelectionChange() {
|
|
1846
1868
|
const ids = Array.isArray(this._layerElement.value) ? this._layerElement.value : [this._layerElement.value];
|
|
1847
1869
|
if (JSON.stringify(ids) !== JSON.stringify([""])) {
|
|
1848
|
-
this.
|
|
1849
|
-
this.layerSelectionChange.emit(this.
|
|
1870
|
+
this.selectedIds = ids;
|
|
1871
|
+
this.layerSelectionChange.emit(this.selectedIds);
|
|
1850
1872
|
}
|
|
1851
1873
|
}
|
|
1852
1874
|
get el() { return getElement(this); }
|
|
@@ -14,11 +14,11 @@ import { c as createObserver } from './observers-76deadbc.js';
|
|
|
14
14
|
import { C as CSS_UTILITY } from './resources-ee3b03a3.js';
|
|
15
15
|
import { u as updateMessages, c as connectMessages, d as disconnectMessages, s as setUpMessages } from './t9n-ece1047e.js';
|
|
16
16
|
import { l as loadModules } from './loadModules-cd3569de.js';
|
|
17
|
-
import { g as goToSelection, h as highlightFeatures, a as queryObjectIds, b as getQueryGeoms, c as
|
|
17
|
+
import { g as goToSelection, h as highlightFeatures, a as queryObjectIds, b as getQueryGeoms, c as getFeatureLayerView, d as queryFeaturesByGeometry, e as getIdSets, f as highlightAllFeatures } from './mapViewUtils-55ea1e10.js';
|
|
18
18
|
import { c as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-bf20e69c.js';
|
|
19
|
-
import { s as state } from './publicNotificationStore-
|
|
19
|
+
import { s as state } from './publicNotificationStore-6ef555f3.js';
|
|
20
20
|
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-54cac39a.js';
|
|
21
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
|
21
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-3b5f85d9.js';
|
|
22
22
|
import './guid-1fbbc894.js';
|
|
23
23
|
import './browser-f8ca09b7.js';
|
|
24
24
|
import './key-d6bc268b.js';
|
|
@@ -534,7 +534,7 @@ const MapSelectTools = class {
|
|
|
534
534
|
*/
|
|
535
535
|
_getUseLayerFeaturesOptions() {
|
|
536
536
|
const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
|
|
537
|
-
return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); },
|
|
537
|
+
return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id) }))));
|
|
538
538
|
}
|
|
539
539
|
/**
|
|
540
540
|
* Renders the number of selected features
|
|
@@ -563,7 +563,7 @@ const MapSelectTools = class {
|
|
|
563
563
|
* @protected
|
|
564
564
|
*/
|
|
565
565
|
_getMapLayerPicker() {
|
|
566
|
-
return (h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._inputLayerSelectionChange(evt),
|
|
566
|
+
return (h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._inputLayerSelectionChange(evt), selectedIds: this.selectLayerView ? [this.selectLayerView.layer.id] : this.selectionSet ? [this.selectionSet.layerView.layer.id] : [] }))));
|
|
567
567
|
}
|
|
568
568
|
//--------------------------------------------------------------------------
|
|
569
569
|
//
|
|
@@ -996,7 +996,7 @@ const MapSelectTools = class {
|
|
|
996
996
|
async _layerSelectionChange(evt) {
|
|
997
997
|
if (Array.isArray(evt.detail) && evt.detail.length > 0) {
|
|
998
998
|
const layerPromises = evt.detail.map(id => {
|
|
999
|
-
return
|
|
999
|
+
return getFeatureLayerView(this.mapView, id);
|
|
1000
1000
|
});
|
|
1001
1001
|
return Promise.all(layerPromises).then((layerViews) => {
|
|
1002
1002
|
this.layerViews = layerViews;
|
|
@@ -1024,7 +1024,7 @@ const MapSelectTools = class {
|
|
|
1024
1024
|
var _a;
|
|
1025
1025
|
const id = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
|
|
1026
1026
|
if (!this.selectLayerView || id !== this.selectLayerView.layer.id) {
|
|
1027
|
-
this.selectLayerView = await
|
|
1027
|
+
this.selectLayerView = await getFeatureLayerView(this.mapView, id);
|
|
1028
1028
|
this._updateLabel();
|
|
1029
1029
|
this._bufferGeometry ? await this._selectFeatures([this._bufferGeometry]) :
|
|
1030
1030
|
await this._highlightWithOIDsOrGeoms();
|
|
@@ -1510,7 +1510,7 @@ const RefineSelection = class {
|
|
|
1510
1510
|
render() {
|
|
1511
1511
|
var _a, _b;
|
|
1512
1512
|
const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
|
|
1513
|
-
return (h(Host, null, h("div", { class: layerPickerClass + " padding-top-sides-1" }, h("div", { class: "display-flex" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, h("div", { class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; },
|
|
1513
|
+
return (h(Host, null, h("div", { class: layerPickerClass + " padding-top-sides-1" }, h("div", { class: "display-flex" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, h("div", { class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id] })), h("calcite-popover", { closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { class: "padding-1" }, h("div", { class: "padding-bottom-1" }, h("calcite-segmented-control", { class: "w-100" }, h("calcite-segmented-control-item", { checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { class: "font-weight-500" }, this._translations.remove)))), h("div", null, h("map-draw-tools", { active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
|
1514
1514
|
}
|
|
1515
1515
|
//--------------------------------------------------------------------------
|
|
1516
1516
|
//
|
|
@@ -1604,7 +1604,7 @@ const RefineSelection = class {
|
|
|
1604
1604
|
refineInfo[id] = {
|
|
1605
1605
|
addIds: [],
|
|
1606
1606
|
removeIds: [],
|
|
1607
|
-
layerView: await
|
|
1607
|
+
layerView: await getFeatureLayerView(this.mapView, id)
|
|
1608
1608
|
};
|
|
1609
1609
|
if (selectionSet) {
|
|
1610
1610
|
selectionSet.refineInfos = Object.assign(Object.assign({}, selectionSet.refineInfos), refineInfo);
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-d298aca9.js';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
|
|
8
|
-
import { q as queryFeaturesByID,
|
|
8
|
+
import { q as queryFeaturesByID, i as getLayer, j as getMapLayerIds, k as queryAllIds } from './mapViewUtils-55ea1e10.js';
|
|
9
9
|
import { l as loadModules } from './loadModules-cd3569de.js';
|
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
|
10
|
+
import { d as downloadCSV } from './downloadUtils-3b5f85d9.js';
|
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
|
12
12
|
import './interfaces-bf20e69c.js';
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ const cardManagerCss = ":host{display:block !important}.display-flex{display:fle
|
|
|
16
16
|
const CardManager = class {
|
|
17
17
|
constructor(hostRef) {
|
|
18
18
|
registerInstance(this, hostRef);
|
|
19
|
-
this.
|
|
19
|
+
this.layer = undefined;
|
|
20
20
|
this.mapView = undefined;
|
|
21
21
|
this._cardLoading = false;
|
|
22
22
|
this._graphics = undefined;
|
|
@@ -44,7 +44,7 @@ const CardManager = class {
|
|
|
44
44
|
const ids = evt.detail;
|
|
45
45
|
this._cardLoading = true;
|
|
46
46
|
// only query if we have some ids...query with no ids will result in all features being returned
|
|
47
|
-
const featureSet = ids.length > 0 ? await queryFeaturesByID(ids, this.
|
|
47
|
+
const featureSet = ids.length > 0 ? await queryFeaturesByID(ids, this.layer, [], false, this.mapView.spatialReference) : [];
|
|
48
48
|
this._graphics = featureSet;
|
|
49
49
|
this._cardLoading = false;
|
|
50
50
|
}
|
|
@@ -53,7 +53,7 @@ const CardManager = class {
|
|
|
53
53
|
*/
|
|
54
54
|
async layerSelectionChange(evt) {
|
|
55
55
|
const id = evt.detail[0];
|
|
56
|
-
this.
|
|
56
|
+
this.layer = await getLayer(this.mapView, id);
|
|
57
57
|
}
|
|
58
58
|
//--------------------------------------------------------------------------
|
|
59
59
|
//
|
|
@@ -119,7 +119,7 @@ const LayerTable = class {
|
|
|
119
119
|
this.mapView = undefined;
|
|
120
120
|
this._alertOpen = false;
|
|
121
121
|
this._fetchingData = false;
|
|
122
|
-
this.
|
|
122
|
+
this._layer = undefined;
|
|
123
123
|
this._selectedIndexes = [];
|
|
124
124
|
this._showOnlySelected = false;
|
|
125
125
|
this._translations = undefined;
|
|
@@ -135,7 +135,7 @@ const LayerTable = class {
|
|
|
135
135
|
async mapViewWatchHandler() {
|
|
136
136
|
this._fetchingData = true;
|
|
137
137
|
const mapLayerIds = await getMapLayerIds(this.mapView);
|
|
138
|
-
this.
|
|
138
|
+
this._layer = await getLayer(this.mapView, mapLayerIds[0]);
|
|
139
139
|
this._resetTable();
|
|
140
140
|
this.reactiveUtils.on(() => this.mapView, "click", (event) => {
|
|
141
141
|
void this._mapClicked(event);
|
|
@@ -145,7 +145,7 @@ const LayerTable = class {
|
|
|
145
145
|
/**
|
|
146
146
|
* watch for changes in layer view and verify if it has editing enabled
|
|
147
147
|
*/
|
|
148
|
-
async
|
|
148
|
+
async _layerWatchHandler() {
|
|
149
149
|
this._fetchingData = true;
|
|
150
150
|
this._resetTable();
|
|
151
151
|
this._fetchingData = false;
|
|
@@ -182,7 +182,7 @@ const LayerTable = class {
|
|
|
182
182
|
* Renders the component.
|
|
183
183
|
*/
|
|
184
184
|
render() {
|
|
185
|
-
if (!this.
|
|
185
|
+
if (!this._layer) {
|
|
186
186
|
return null;
|
|
187
187
|
}
|
|
188
188
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
|
@@ -217,8 +217,8 @@ const LayerTable = class {
|
|
|
217
217
|
*/
|
|
218
218
|
_getTableControlRow(slot) {
|
|
219
219
|
const featuresSelected = this._selectedIndexes.length > 0;
|
|
220
|
-
return (h("div", { class: "display-flex table-border height-51", slot: slot }, h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, h("div", { class: "border-end" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "magnifying-glass", id: "magnifying-glass", label: this._translations.zoom, onClick: () => this._zoom(), text: this._translations.zoom, textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, h("span", null, this._translations.zoom)), h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, h("span", null, this._translations.filters)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, h("span", null, this._translations.delete))), h("calcite-dropdown", null, h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this.
|
|
221
|
-
this._translations.showSelected), h("calcite-dropdown-item", { iconStart: "
|
|
220
|
+
return (h("div", { class: "display-flex table-border height-51", slot: slot }, h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, h("div", { class: "border-end" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "magnifying-glass", id: "magnifying-glass", label: this._translations.zoom, onClick: () => this._zoom(), text: this._translations.zoom, textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, h("span", null, this._translations.zoom)), h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, h("span", null, this._translations.filters)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, h("span", null, this._translations.delete)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "erase", id: "erase", onClick: () => this._clearSelection(), text: this._translations.clearSelection, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "erase" }, h("span", null, this._translations.clearSelection))), h("calcite-dropdown", null, h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this._toggleShowSelected() }, this._showOnlySelected ? this._translations.showAll :
|
|
221
|
+
this._translations.showSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._switchSelected() }, this._translations.switchSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)))));
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
224
|
* Initialize the FeatureTable
|
|
@@ -226,10 +226,9 @@ const LayerTable = class {
|
|
|
226
226
|
* @returns void
|
|
227
227
|
*/
|
|
228
228
|
_getTable(node) {
|
|
229
|
-
|
|
230
|
-
if ((_a = this._layerView) === null || _a === void 0 ? void 0 : _a.layer) {
|
|
229
|
+
if (this._layer) {
|
|
231
230
|
this._table = new this.FeatureTable({
|
|
232
|
-
layer: this.
|
|
231
|
+
layer: this._layer,
|
|
233
232
|
view: this.mapView,
|
|
234
233
|
//editingEnabled: this._editEnabled,
|
|
235
234
|
highlightOnRowSelectEnabled: true,
|
|
@@ -242,6 +241,14 @@ const LayerTable = class {
|
|
|
242
241
|
});
|
|
243
242
|
this._table.highlightIds.on("change", () => {
|
|
244
243
|
this._selectedIndexes = this._table.highlightIds.toArray();
|
|
244
|
+
if (this._showOnlySelected) {
|
|
245
|
+
if (this._selectedIndexes.length > 0) {
|
|
246
|
+
this._table.filterBySelection();
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
this._toggleShowSelected();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
245
252
|
this.featureSelectionChange.emit(this._selectedIndexes);
|
|
246
253
|
});
|
|
247
254
|
}
|
|
@@ -252,10 +259,11 @@ const LayerTable = class {
|
|
|
252
259
|
* @returns void
|
|
253
260
|
*/
|
|
254
261
|
_resetTable() {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
262
|
+
if (this._layer && this._table) {
|
|
263
|
+
this._clearSelection();
|
|
264
|
+
this.featureSelectionChange.emit(this._selectedIndexes);
|
|
265
|
+
this._table.layer = this._layer;
|
|
266
|
+
this._editEnabled = this._layer.editingEnabled;
|
|
259
267
|
this._table.view = this.mapView;
|
|
260
268
|
this._table.editingEnabled = this._editEnabled;
|
|
261
269
|
this._table.clearSelectionFilter();
|
|
@@ -269,7 +277,7 @@ const LayerTable = class {
|
|
|
269
277
|
*/
|
|
270
278
|
async _mapClicked(evt) {
|
|
271
279
|
const opts = {
|
|
272
|
-
include: this.
|
|
280
|
+
include: this._layer
|
|
273
281
|
};
|
|
274
282
|
const hitTestResult = await this.mapView.hitTest(evt.screenPoint, opts);
|
|
275
283
|
if (hitTestResult.results.length > 0) {
|
|
@@ -314,7 +322,7 @@ const LayerTable = class {
|
|
|
314
322
|
*
|
|
315
323
|
* @returns void
|
|
316
324
|
*/
|
|
317
|
-
|
|
325
|
+
_toggleShowSelected() {
|
|
318
326
|
this._showOnlySelected = !this._showOnlySelected;
|
|
319
327
|
if (this._showOnlySelected) {
|
|
320
328
|
this._table.filterBySelection();
|
|
@@ -359,10 +367,10 @@ const LayerTable = class {
|
|
|
359
367
|
async _exportToCSV() {
|
|
360
368
|
const exportInfos = {};
|
|
361
369
|
const ids = this._table.highlightIds.toArray();
|
|
362
|
-
exportInfos[this.
|
|
370
|
+
exportInfos[this._layer.id] = {
|
|
363
371
|
selectionSetNames: [],
|
|
364
372
|
ids,
|
|
365
|
-
|
|
373
|
+
layer: this._layer
|
|
366
374
|
};
|
|
367
375
|
void downloadCSV(exportInfos, false, // formatUsingLayerPopup
|
|
368
376
|
true);
|
|
@@ -397,7 +405,7 @@ const LayerTable = class {
|
|
|
397
405
|
this._alertMessage = this._translations.confirm;
|
|
398
406
|
this._alertKind = "danger";
|
|
399
407
|
this._alertActionFunction = () => {
|
|
400
|
-
void this.
|
|
408
|
+
void this._layer.applyEdits({
|
|
401
409
|
deleteFeatures: this._table.highlightIds.toArray()
|
|
402
410
|
});
|
|
403
411
|
this._alertOpen = false;
|
|
@@ -428,15 +436,14 @@ const LayerTable = class {
|
|
|
428
436
|
* @returns a promise that will resolve when the operation is complete
|
|
429
437
|
*/
|
|
430
438
|
async _layerSelectionChanged(evt) {
|
|
431
|
-
var _a;
|
|
432
439
|
const id = evt.detail[0];
|
|
433
|
-
if (id !==
|
|
440
|
+
if (id !== this._layer.id || this._allIds.length === 0) {
|
|
434
441
|
this._fetchingData = true;
|
|
435
442
|
this._table.highlightIds.removeAll();
|
|
436
|
-
this.
|
|
437
|
-
this._allIds = await queryAllIds(this.
|
|
443
|
+
this._layer = await getLayer(this.mapView, id);
|
|
444
|
+
this._allIds = await queryAllIds(this._layer);
|
|
438
445
|
this._selectedIndexes = [];
|
|
439
|
-
this._table.layer = this.
|
|
446
|
+
this._table.layer = this._layer;
|
|
440
447
|
this._table.render();
|
|
441
448
|
this._fetchingData = false;
|
|
442
449
|
}
|
|
@@ -454,7 +461,7 @@ const LayerTable = class {
|
|
|
454
461
|
get el() { return getElement(this); }
|
|
455
462
|
static get watchers() { return {
|
|
456
463
|
"mapView": ["mapViewWatchHandler"],
|
|
457
|
-
"
|
|
464
|
+
"_layer": ["_layerWatchHandler"]
|
|
458
465
|
}; }
|
|
459
466
|
};
|
|
460
467
|
LayerTable.style = layerTableCss;
|
|
@@ -8,7 +8,7 @@ import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
|
|
|
8
8
|
import { E as ELayoutMode } from './interfaces-bf20e69c.js';
|
|
9
9
|
import './_commonjsHelpers-d5f9d613.js';
|
|
10
10
|
|
|
11
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1{padding:1rem}.padding-1-2{padding:0.5rem}.header-title{display:flex;float:left}.header-controls-label{display:flex;float:right}.header-controls{height:50px}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.
|
|
11
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1{padding:1rem}.padding-1-2{padding:0.5rem}.header-title{display:flex;float:left}.header-controls-label{display:flex;float:right}.header-controls{height:50px}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.horizontal-background{background-image:url('../../assets/data/images/horizontal.png')}.vertical-background{background-image:url('../../assets/data/images/vertical.png')}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.background-transparent{background-color:transparent}.display-flex{display:flex}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem)}.adjusted-height-100{height:calc(100% - 1rem)}.icon-color{--calcite-ui-icon-color:var(--calcite-ui-brand)}.icon{cursor:pointer}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}.display-none{display:none}";
|
|
12
12
|
|
|
13
13
|
const CrowdsourceManager = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -63,7 +63,7 @@ const CrowdsourceManager = class {
|
|
|
63
63
|
* Renders the component.
|
|
64
64
|
*/
|
|
65
65
|
render() {
|
|
66
|
-
return (h(Host, null, h("calcite-shell", null, h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, h("div", { class: "display-flex", slot: "header-actions-end" }, h("div", { class: "display-flex action-center" }, h("calcite-icon", { class: "icon icon-color", icon: "information", id: "app-information-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "app-information-icon" }, h("span", { class: "tooltip-message" }, this._translations.appInfo))), h("div", { class: "header-text" }, this._translations.layout), this._getAction("grid-background", ELayoutMode.GRID, this._translations.grid), this._getAction("
|
|
66
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, h("div", { class: "display-flex", slot: "header-actions-end" }, h("div", { class: "display-flex action-center" }, h("calcite-icon", { class: "icon icon-color", icon: "information", id: "app-information-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "app-information-icon" }, h("span", { class: "tooltip-message" }, this._translations.appInfo))), h("div", { class: "header-text" }, this._translations.layout), this._getAction("grid-background", ELayoutMode.GRID, this._translations.grid), this._getAction("vertical-background", ELayoutMode.VERTICAL, this._translations.vertical), this._getAction("horizontal-background", ELayoutMode.HORIZONTAL, this._translations.horizontal)), this._getBody(this._layoutMode, this._panelOpen)))));
|
|
67
67
|
}
|
|
68
68
|
//--------------------------------------------------------------------------
|
|
69
69
|
//
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
|
7
7
|
import { a as getAssetPath } from './index-d298aca9.js';
|
|
8
8
|
import { l as loadModules } from './loadModules-cd3569de.js';
|
|
9
|
-
import { q as queryFeaturesByID } from './mapViewUtils-
|
|
9
|
+
import { q as queryFeaturesByID } from './mapViewUtils-55ea1e10.js';
|
|
10
10
|
|
|
11
11
|
/** @license
|
|
12
12
|
* Copyright 2022 Esri
|
|
@@ -1505,7 +1505,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1505
1505
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1506
1506
|
* ====================================================================
|
|
1507
1507
|
*/
|
|
1508
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
|
1508
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-bb9196f6.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},
|
|
1509
1509
|
/** ====================================================================
|
|
1510
1510
|
* @license
|
|
1511
1511
|
* jsPDF XMP metadata plugin
|
|
@@ -2708,8 +2708,9 @@ function _getSelectionSetNames(exportInfos, id = /.+/) {
|
|
|
2708
2708
|
async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
|
|
2709
2709
|
const labelRequests = [];
|
|
2710
2710
|
Object.keys(exportInfos).forEach(k => {
|
|
2711
|
+
var _a;
|
|
2711
2712
|
const labelInfo = exportInfos[k];
|
|
2712
|
-
labelRequests.push(_prepareLabels(labelInfo.layerView.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
|
2713
|
+
labelRequests.push(_prepareLabels(((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
|
2713
2714
|
if (isCSVExport) {
|
|
2714
2715
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
|
2715
2716
|
labelRequests.push(Promise.resolve([[k]]));
|