@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,7 +20,7 @@ const loadable = require('./loadable-6571b6b9.js');
|
|
|
20
20
|
const locale$1 = require('./locale-83870af6.js');
|
|
21
21
|
const math = require('./math-0eb2ec5c.js');
|
|
22
22
|
const interfaces = require('./interfaces-ad03ec39.js');
|
|
23
|
-
const publicNotificationStore = require('./publicNotificationStore-
|
|
23
|
+
const publicNotificationStore = require('./publicNotificationStore-ec1bdd2d.js');
|
|
24
24
|
require('./_commonjsHelpers-384729db.js');
|
|
25
25
|
require('./resources-3a47be9f.js');
|
|
26
26
|
require('./browser-e514d838.js');
|
|
@@ -24,8 +24,8 @@ const utils = require('./utils-46e2a6ec.js');
|
|
|
24
24
|
const debounce = require('./debounce-69c3bada.js');
|
|
25
25
|
const conditionalSlot = require('./conditionalSlot-981d22ef.js');
|
|
26
26
|
const key = require('./key-2522c20b.js');
|
|
27
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
28
|
-
const publicNotificationStore = require('./publicNotificationStore-
|
|
27
|
+
const mapViewUtils = require('./mapViewUtils-77a1ff88.js');
|
|
28
|
+
const publicNotificationStore = require('./publicNotificationStore-ec1bdd2d.js');
|
|
29
29
|
require('./resources-3a47be9f.js');
|
|
30
30
|
require('./browser-e514d838.js');
|
|
31
31
|
require('./interfaces-ad03ec39.js');
|
|
@@ -1683,13 +1683,15 @@ const MapLayerPicker = class {
|
|
|
1683
1683
|
this.layerSelectionChange = index.createEvent(this, "layerSelectionChange", 7);
|
|
1684
1684
|
this.appearance = "transparent";
|
|
1685
1685
|
this.enabledLayerIds = [];
|
|
1686
|
+
this.enabledTableIds = [];
|
|
1686
1687
|
this.mapView = undefined;
|
|
1687
1688
|
this.placeholderIcon = "";
|
|
1688
|
-
this.
|
|
1689
|
+
this.selectedIds = [];
|
|
1689
1690
|
this.scale = "m";
|
|
1691
|
+
this.showTables = true;
|
|
1690
1692
|
this.type = "select";
|
|
1691
|
-
this.
|
|
1692
|
-
this.
|
|
1693
|
+
this.ids = [];
|
|
1694
|
+
this.selectedName = "";
|
|
1693
1695
|
}
|
|
1694
1696
|
//--------------------------------------------------------------------------
|
|
1695
1697
|
//
|
|
@@ -1702,7 +1704,11 @@ const MapLayerPicker = class {
|
|
|
1702
1704
|
*/
|
|
1703
1705
|
async mapViewWatchHandler() {
|
|
1704
1706
|
await this._setLayers();
|
|
1705
|
-
|
|
1707
|
+
const hasLayers = Object.keys(publicNotificationStore.state.layerNameHash).length > 0;
|
|
1708
|
+
const hasTables = Object.keys(publicNotificationStore.state.tableNameHash).length > 0 && this.showTables;
|
|
1709
|
+
if (hasLayers || hasTables) {
|
|
1710
|
+
this._setSelectedLayer(this.ids[0], hasLayers ? "layer" : "table");
|
|
1711
|
+
}
|
|
1706
1712
|
}
|
|
1707
1713
|
//--------------------------------------------------------------------------
|
|
1708
1714
|
//
|
|
@@ -1714,8 +1720,8 @@ const MapLayerPicker = class {
|
|
|
1714
1720
|
*/
|
|
1715
1721
|
async componentWillLoad() {
|
|
1716
1722
|
await this._setLayers();
|
|
1717
|
-
if (this.
|
|
1718
|
-
this.layerSelectionChange.emit(this.
|
|
1723
|
+
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
|
1724
|
+
this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
|
|
1719
1725
|
}
|
|
1720
1726
|
}
|
|
1721
1727
|
/**
|
|
@@ -1729,13 +1735,15 @@ const MapLayerPicker = class {
|
|
|
1729
1735
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
1730
1736
|
*/
|
|
1731
1737
|
async componentDidLoad() {
|
|
1732
|
-
if (this.
|
|
1733
|
-
const id = this.
|
|
1738
|
+
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
|
1739
|
+
const id = this.selectedIds.length === 1 ? this.selectedIds[0] : this.ids[0];
|
|
1734
1740
|
if (this.type === "select") {
|
|
1735
1741
|
this._layerElement.value = id;
|
|
1736
1742
|
}
|
|
1737
1743
|
else if (this.type === "dropdown") {
|
|
1738
|
-
this.
|
|
1744
|
+
this.selectedName = Object.keys(publicNotificationStore.state.layerNameHash).indexOf(id) > -1 ?
|
|
1745
|
+
publicNotificationStore.state.layerNameHash[id] : Object.keys(publicNotificationStore.state.tableNameHash).indexOf(id) > -1 ?
|
|
1746
|
+
publicNotificationStore.state.tableNameHash[id] : "";
|
|
1739
1747
|
}
|
|
1740
1748
|
}
|
|
1741
1749
|
}
|
|
@@ -1752,7 +1760,7 @@ const MapLayerPicker = class {
|
|
|
1752
1760
|
* @returns Calcite Select component with the ids of the layers from the map
|
|
1753
1761
|
*/
|
|
1754
1762
|
_getSelect() {
|
|
1755
|
-
return (index.h("calcite-select", { label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this.
|
|
1763
|
+
return (index.h("calcite-select", { label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this._getMapLayerOptions()));
|
|
1756
1764
|
}
|
|
1757
1765
|
/**
|
|
1758
1766
|
* Create a list of layer ids from the map
|
|
@@ -1762,7 +1770,7 @@ const MapLayerPicker = class {
|
|
|
1762
1770
|
* @returns Calcite ComboBox component with the ids of the layers from the map
|
|
1763
1771
|
*/
|
|
1764
1772
|
_getCombobox() {
|
|
1765
|
-
return (index.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.
|
|
1773
|
+
return (index.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()));
|
|
1766
1774
|
}
|
|
1767
1775
|
/**
|
|
1768
1776
|
* Hydrate a dropdown component with items to display the layer names
|
|
@@ -1770,54 +1778,42 @@ const MapLayerPicker = class {
|
|
|
1770
1778
|
* @returns Array of Dropdown items with layer names
|
|
1771
1779
|
*/
|
|
1772
1780
|
_getDropdown() {
|
|
1773
|
-
return (index.h("calcite-dropdown", { class: "layer-picker-dropdown" }, index.h("calcite-action", { slot: "trigger", text: "" }, index.h("calcite-button", { alignment: "icon-end-space-between", appearance: this.appearance, class: "max-width-350", iconEnd: "chevron-down", iconStart: "layers", kind: "neutral", width: "full" }, index.h("div", null, this.
|
|
1781
|
+
return (index.h("calcite-dropdown", { class: "layer-picker-dropdown" }, index.h("calcite-action", { slot: "trigger", text: "" }, index.h("calcite-button", { alignment: "icon-end-space-between", appearance: this.appearance, class: "max-width-350", iconEnd: "chevron-down", iconStart: "layers", kind: "neutral", width: "full" }, index.h("div", null, this.selectedName))), index.h("calcite-dropdown-group", { "selection-mode": "single" }, this._getMapLayerOptions())));
|
|
1774
1782
|
}
|
|
1775
1783
|
/**
|
|
1776
|
-
*
|
|
1784
|
+
* Get the appropriate type of dom nodes for each valid layer or table
|
|
1777
1785
|
*
|
|
1778
|
-
* @returns Array of
|
|
1786
|
+
* @returns Array of dom nodes with the names of the layers and optionally of the tables
|
|
1779
1787
|
*/
|
|
1780
|
-
|
|
1781
|
-
return this.
|
|
1782
|
-
if (
|
|
1783
|
-
prev.push(
|
|
1788
|
+
_getMapLayerOptions() {
|
|
1789
|
+
return this.ids.reduce((prev, cur) => {
|
|
1790
|
+
if (this._validLayer(cur)) {
|
|
1791
|
+
prev.push(this._getItem(cur, "layer"));
|
|
1792
|
+
}
|
|
1793
|
+
else if (this._validTable(cur)) {
|
|
1794
|
+
prev.push(this._getItem(cur, "table"));
|
|
1784
1795
|
}
|
|
1785
1796
|
return prev;
|
|
1786
1797
|
}, []);
|
|
1787
1798
|
}
|
|
1788
1799
|
/**
|
|
1789
|
-
*
|
|
1790
|
-
*/
|
|
1791
|
-
_setSelectedLayer(id) {
|
|
1792
|
-
this.selectedLayerName = publicNotificationStore.state.layerNameHash[id];
|
|
1793
|
-
this.selectedLayerIds = [id];
|
|
1794
|
-
this.layerSelectionChange.emit(this.selectedLayerIds);
|
|
1795
|
-
}
|
|
1796
|
-
/**
|
|
1797
|
-
* Hydrate a select component with the ids of the layers in the map
|
|
1800
|
+
* Get the appropriate type of dom node for the current layer or table id
|
|
1798
1801
|
*
|
|
1799
|
-
* @returns
|
|
1802
|
+
* @returns A dom node with the name of the layer or table
|
|
1800
1803
|
*/
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
return prev;
|
|
1807
|
-
}, []);
|
|
1804
|
+
_getItem(id, itemType) {
|
|
1805
|
+
const name = itemType === "layer" ? publicNotificationStore.state.layerNameHash[id] : publicNotificationStore.state.tableNameHash[id];
|
|
1806
|
+
return this.type === "combobox" ? (index.h("calcite-combobox-item", { textLabel: name, value: id })) :
|
|
1807
|
+
this.type === "select" ? (index.h("calcite-option", { label: name, value: id })) :
|
|
1808
|
+
(index.h("calcite-dropdown-item", { onClick: () => void this._setSelectedLayer(id, itemType) }, name));
|
|
1808
1809
|
}
|
|
1809
1810
|
/**
|
|
1810
|
-
*
|
|
1811
|
-
*
|
|
1812
|
-
* @returns Array of ComboBox items for the ids of the layers
|
|
1811
|
+
* Store the layer name based on the user selection
|
|
1813
1812
|
*/
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
}
|
|
1819
|
-
return prev;
|
|
1820
|
-
}, []);
|
|
1813
|
+
_setSelectedLayer(id, type) {
|
|
1814
|
+
this.selectedName = type === "layer" ? publicNotificationStore.state.layerNameHash[id] : publicNotificationStore.state.tableNameHash[id];
|
|
1815
|
+
this.selectedIds = [id];
|
|
1816
|
+
this.layerSelectionChange.emit(this.selectedIds);
|
|
1821
1817
|
}
|
|
1822
1818
|
/**
|
|
1823
1819
|
* Fetch the ids of the layers from the map
|
|
@@ -1827,8 +1823,12 @@ const MapLayerPicker = class {
|
|
|
1827
1823
|
async _setLayers() {
|
|
1828
1824
|
if (this.mapView) {
|
|
1829
1825
|
const mapLayerIds = await mapViewUtils.getMapLayerIds(this.mapView);
|
|
1830
|
-
|
|
1831
|
-
|
|
1826
|
+
const mapTableIds = this.showTables ? await mapViewUtils.getMapTableIds(this.mapView) : [];
|
|
1827
|
+
this.ids = [
|
|
1828
|
+
...mapLayerIds.filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.indexOf(n) > -1 : true; }),
|
|
1829
|
+
...mapTableIds.filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.indexOf(n) > -1 : true; }),
|
|
1830
|
+
];
|
|
1831
|
+
await this._initStateHash();
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
/**
|
|
@@ -1836,11 +1836,33 @@ const MapLayerPicker = class {
|
|
|
1836
1836
|
*
|
|
1837
1837
|
* @returns Promise when the operation has completed
|
|
1838
1838
|
*/
|
|
1839
|
-
async
|
|
1839
|
+
async _initStateHash() {
|
|
1840
1840
|
if (this.mapView) {
|
|
1841
1841
|
publicNotificationStore.state.layerNameHash = await mapViewUtils.getMapLayerHash(this.mapView);
|
|
1842
|
+
publicNotificationStore.state.tableNameHash = this.showTables ? await mapViewUtils.getMapTableHash(this.mapView) : {};
|
|
1842
1843
|
}
|
|
1843
1844
|
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
|
1847
|
+
*
|
|
1848
|
+
* @returns boolean when true the layer will be used in the current layer picker type
|
|
1849
|
+
*/
|
|
1850
|
+
_validLayer(id) {
|
|
1851
|
+
const name = publicNotificationStore.state.layerNameHash[id];
|
|
1852
|
+
return name && publicNotificationStore.state.managedLayers.indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
|
1853
|
+
this.enabledLayerIds.indexOf(id) > -1 : name);
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
|
1857
|
+
*
|
|
1858
|
+
* @returns boolean when true the table will be used in the current layer picker type
|
|
1859
|
+
*/
|
|
1860
|
+
_validTable(id) {
|
|
1861
|
+
const name = publicNotificationStore.state.tableNameHash[id];
|
|
1862
|
+
const validName = name && this.showTables;
|
|
1863
|
+
return validName ? publicNotificationStore.state.managedTables.indexOf(name) < 0 &&
|
|
1864
|
+
(this.enabledTableIds.length > 0 ? this.enabledTableIds.indexOf(id) > -1 : true) : validName;
|
|
1865
|
+
}
|
|
1844
1866
|
/**
|
|
1845
1867
|
* Fetch the ids of the layers from the map
|
|
1846
1868
|
*
|
|
@@ -1849,8 +1871,8 @@ const MapLayerPicker = class {
|
|
|
1849
1871
|
_layerSelectionChange() {
|
|
1850
1872
|
const ids = Array.isArray(this._layerElement.value) ? this._layerElement.value : [this._layerElement.value];
|
|
1851
1873
|
if (JSON.stringify(ids) !== JSON.stringify([""])) {
|
|
1852
|
-
this.
|
|
1853
|
-
this.layerSelectionChange.emit(this.
|
|
1874
|
+
this.selectedIds = ids;
|
|
1875
|
+
this.layerSelectionChange.emit(this.selectedIds);
|
|
1854
1876
|
}
|
|
1855
1877
|
}
|
|
1856
1878
|
get el() { return index.getElement(this); }
|
|
@@ -18,11 +18,11 @@ const observers = require('./observers-5c9538b2.js');
|
|
|
18
18
|
const resources = require('./resources-3a47be9f.js');
|
|
19
19
|
const t9n = require('./t9n-f82f4304.js');
|
|
20
20
|
const loadModules = require('./loadModules-ae7715f2.js');
|
|
21
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
21
|
+
const mapViewUtils = require('./mapViewUtils-77a1ff88.js');
|
|
22
22
|
const interfaces = require('./interfaces-ad03ec39.js');
|
|
23
|
-
const publicNotificationStore = require('./publicNotificationStore-
|
|
23
|
+
const publicNotificationStore = require('./publicNotificationStore-ec1bdd2d.js');
|
|
24
24
|
const locale$1 = require('./locale-b113c6b2.js');
|
|
25
|
-
const downloadUtils = require('./downloadUtils-
|
|
25
|
+
const downloadUtils = require('./downloadUtils-4aadf4b0.js');
|
|
26
26
|
require('./guid-100bd1be.js');
|
|
27
27
|
require('./browser-e514d838.js');
|
|
28
28
|
require('./key-2522c20b.js');
|
|
@@ -538,7 +538,7 @@ const MapSelectTools = class {
|
|
|
538
538
|
*/
|
|
539
539
|
_getUseLayerFeaturesOptions() {
|
|
540
540
|
const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
|
|
541
|
-
return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), index.h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), index.h("div", { class: useLayerFeaturesClass + " padding-top-1" }, index.h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); },
|
|
541
|
+
return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), index.h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), index.h("div", { class: useLayerFeaturesClass + " padding-top-1" }, index.h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id) }))));
|
|
542
542
|
}
|
|
543
543
|
/**
|
|
544
544
|
* Renders the number of selected features
|
|
@@ -567,7 +567,7 @@ const MapSelectTools = class {
|
|
|
567
567
|
* @protected
|
|
568
568
|
*/
|
|
569
569
|
_getMapLayerPicker() {
|
|
570
|
-
return (index.h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, index.h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, index.h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._inputLayerSelectionChange(evt),
|
|
570
|
+
return (index.h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, index.h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, index.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] : [] }))));
|
|
571
571
|
}
|
|
572
572
|
//--------------------------------------------------------------------------
|
|
573
573
|
//
|
|
@@ -1000,7 +1000,7 @@ const MapSelectTools = class {
|
|
|
1000
1000
|
async _layerSelectionChange(evt) {
|
|
1001
1001
|
if (Array.isArray(evt.detail) && evt.detail.length > 0) {
|
|
1002
1002
|
const layerPromises = evt.detail.map(id => {
|
|
1003
|
-
return mapViewUtils.
|
|
1003
|
+
return mapViewUtils.getFeatureLayerView(this.mapView, id);
|
|
1004
1004
|
});
|
|
1005
1005
|
return Promise.all(layerPromises).then((layerViews) => {
|
|
1006
1006
|
this.layerViews = layerViews;
|
|
@@ -1028,7 +1028,7 @@ const MapSelectTools = class {
|
|
|
1028
1028
|
var _a;
|
|
1029
1029
|
const id = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
|
|
1030
1030
|
if (!this.selectLayerView || id !== this.selectLayerView.layer.id) {
|
|
1031
|
-
this.selectLayerView = await mapViewUtils.
|
|
1031
|
+
this.selectLayerView = await mapViewUtils.getFeatureLayerView(this.mapView, id);
|
|
1032
1032
|
this._updateLabel();
|
|
1033
1033
|
this._bufferGeometry ? await this._selectFeatures([this._bufferGeometry]) :
|
|
1034
1034
|
await this._highlightWithOIDsOrGeoms();
|
|
@@ -1514,7 +1514,7 @@ const RefineSelection = class {
|
|
|
1514
1514
|
render() {
|
|
1515
1515
|
var _a, _b;
|
|
1516
1516
|
const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
|
|
1517
|
-
return (index.h(index.Host, null, index.h("div", { class: layerPickerClass + " padding-top-sides-1" }, index.h("div", { class: "display-flex" }, index.h("calcite-label", { class: "font-bold width-full label-margin-0" }, index.h("div", { class: "display-flex" }, this._translations.inputLayer, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), index.h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; },
|
|
1517
|
+
return (index.h(index.Host, null, index.h("div", { class: layerPickerClass + " padding-top-sides-1" }, index.h("div", { class: "display-flex" }, index.h("calcite-label", { class: "font-bold width-full label-margin-0" }, index.h("div", { class: "display-flex" }, this._translations.inputLayer, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), index.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] })), index.h("calcite-popover", { closable: true, label: "", referenceElement: "refine-input-layer" }, index.h("span", { class: "tooltip-message" }, this._translations.inputLayerTip)))), index.h("div", { class: "padding-1" }, index.h("div", { class: "padding-bottom-1" }, index.h("calcite-segmented-control", { class: "w-100" }, index.h("calcite-segmented-control-item", { checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(interfaces.ESelectionMode.ADD), value: interfaces.ESelectionMode.ADD }, index.h("span", { class: "font-weight-500" }, this._translations.add)), index.h("calcite-segmented-control-item", { checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(interfaces.ESelectionMode.REMOVE), value: interfaces.ESelectionMode.REMOVE }, index.h("span", { class: "font-weight-500" }, this._translations.remove)))), index.h("div", null, index.h("map-draw-tools", { active: true, drawMode: interfaces.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 })), index.h("br", null), (index.h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
|
1518
1518
|
}
|
|
1519
1519
|
//--------------------------------------------------------------------------
|
|
1520
1520
|
//
|
|
@@ -1608,7 +1608,7 @@ const RefineSelection = class {
|
|
|
1608
1608
|
refineInfo[id] = {
|
|
1609
1609
|
addIds: [],
|
|
1610
1610
|
removeIds: [],
|
|
1611
|
-
layerView: await mapViewUtils.
|
|
1611
|
+
layerView: await mapViewUtils.getFeatureLayerView(this.mapView, id)
|
|
1612
1612
|
};
|
|
1613
1613
|
if (selectionSet) {
|
|
1614
1614
|
selectionSet.refineInfos = Object.assign(Object.assign({}, selectionSet.refineInfos), refineInfo);
|
|
@@ -9,9 +9,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
|
|
10
10
|
const index = require('./index-6654298b.js');
|
|
11
11
|
const locale = require('./locale-b113c6b2.js');
|
|
12
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
12
|
+
const mapViewUtils = require('./mapViewUtils-77a1ff88.js');
|
|
13
13
|
const loadModules = require('./loadModules-ae7715f2.js');
|
|
14
|
-
const downloadUtils = require('./downloadUtils-
|
|
14
|
+
const downloadUtils = require('./downloadUtils-4aadf4b0.js');
|
|
15
15
|
require('./_commonjsHelpers-384729db.js');
|
|
16
16
|
require('./interfaces-ad03ec39.js');
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ const cardManagerCss = ":host{display:block !important}.display-flex{display:fle
|
|
|
20
20
|
const CardManager = class {
|
|
21
21
|
constructor(hostRef) {
|
|
22
22
|
index.registerInstance(this, hostRef);
|
|
23
|
-
this.
|
|
23
|
+
this.layer = undefined;
|
|
24
24
|
this.mapView = undefined;
|
|
25
25
|
this._cardLoading = false;
|
|
26
26
|
this._graphics = undefined;
|
|
@@ -48,7 +48,7 @@ const CardManager = class {
|
|
|
48
48
|
const ids = evt.detail;
|
|
49
49
|
this._cardLoading = true;
|
|
50
50
|
// only query if we have some ids...query with no ids will result in all features being returned
|
|
51
|
-
const featureSet = ids.length > 0 ? await mapViewUtils.queryFeaturesByID(ids, this.
|
|
51
|
+
const featureSet = ids.length > 0 ? await mapViewUtils.queryFeaturesByID(ids, this.layer, [], false, this.mapView.spatialReference) : [];
|
|
52
52
|
this._graphics = featureSet;
|
|
53
53
|
this._cardLoading = false;
|
|
54
54
|
}
|
|
@@ -57,7 +57,7 @@ const CardManager = class {
|
|
|
57
57
|
*/
|
|
58
58
|
async layerSelectionChange(evt) {
|
|
59
59
|
const id = evt.detail[0];
|
|
60
|
-
this.
|
|
60
|
+
this.layer = await mapViewUtils.getLayer(this.mapView, id);
|
|
61
61
|
}
|
|
62
62
|
//--------------------------------------------------------------------------
|
|
63
63
|
//
|
|
@@ -123,7 +123,7 @@ const LayerTable = class {
|
|
|
123
123
|
this.mapView = undefined;
|
|
124
124
|
this._alertOpen = false;
|
|
125
125
|
this._fetchingData = false;
|
|
126
|
-
this.
|
|
126
|
+
this._layer = undefined;
|
|
127
127
|
this._selectedIndexes = [];
|
|
128
128
|
this._showOnlySelected = false;
|
|
129
129
|
this._translations = undefined;
|
|
@@ -139,7 +139,7 @@ const LayerTable = class {
|
|
|
139
139
|
async mapViewWatchHandler() {
|
|
140
140
|
this._fetchingData = true;
|
|
141
141
|
const mapLayerIds = await mapViewUtils.getMapLayerIds(this.mapView);
|
|
142
|
-
this.
|
|
142
|
+
this._layer = await mapViewUtils.getLayer(this.mapView, mapLayerIds[0]);
|
|
143
143
|
this._resetTable();
|
|
144
144
|
this.reactiveUtils.on(() => this.mapView, "click", (event) => {
|
|
145
145
|
void this._mapClicked(event);
|
|
@@ -149,7 +149,7 @@ const LayerTable = class {
|
|
|
149
149
|
/**
|
|
150
150
|
* watch for changes in layer view and verify if it has editing enabled
|
|
151
151
|
*/
|
|
152
|
-
async
|
|
152
|
+
async _layerWatchHandler() {
|
|
153
153
|
this._fetchingData = true;
|
|
154
154
|
this._resetTable();
|
|
155
155
|
this._fetchingData = false;
|
|
@@ -186,7 +186,7 @@ const LayerTable = class {
|
|
|
186
186
|
* Renders the component.
|
|
187
187
|
*/
|
|
188
188
|
render() {
|
|
189
|
-
if (!this.
|
|
189
|
+
if (!this._layer) {
|
|
190
190
|
return null;
|
|
191
191
|
}
|
|
192
192
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
|
@@ -221,8 +221,8 @@ const LayerTable = class {
|
|
|
221
221
|
*/
|
|
222
222
|
_getTableControlRow(slot) {
|
|
223
223
|
const featuresSelected = this._selectedIndexes.length > 0;
|
|
224
|
-
return (index.h("div", { class: "display-flex table-border height-51", slot: slot }, index.h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, index.h("div", { class: "border-end" }, index.h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), index.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 }), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, index.h("span", null, this._translations.zoom)), index.h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, index.h("span", null, this._translations.filters)), index.h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, index.h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, index.h("span", null, this._translations.delete))), index.h("calcite-dropdown", null, index.h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, index.h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), index.h("calcite-dropdown-group", { "selection-mode": "none" }, index.h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), index.h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this.
|
|
225
|
-
this._translations.showSelected), index.h("calcite-dropdown-item", { iconStart: "
|
|
224
|
+
return (index.h("div", { class: "display-flex table-border height-51", slot: slot }, index.h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, index.h("div", { class: "border-end" }, index.h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), index.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 }), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, index.h("span", null, this._translations.zoom)), index.h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, index.h("span", null, this._translations.filters)), index.h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, index.h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, index.h("span", null, this._translations.delete)), index.h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "erase", id: "erase", onClick: () => this._clearSelection(), text: this._translations.clearSelection, "text-enabled": "true", textEnabled: true }), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "erase" }, index.h("span", null, this._translations.clearSelection))), index.h("calcite-dropdown", null, index.h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, index.h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), index.h("calcite-dropdown-group", { "selection-mode": "none" }, index.h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), index.h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this._toggleShowSelected() }, this._showOnlySelected ? this._translations.showAll :
|
|
225
|
+
this._translations.showSelected), index.h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._switchSelected() }, this._translations.switchSelected), index.h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), index.h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)))));
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Initialize the FeatureTable
|
|
@@ -230,10 +230,9 @@ const LayerTable = class {
|
|
|
230
230
|
* @returns void
|
|
231
231
|
*/
|
|
232
232
|
_getTable(node) {
|
|
233
|
-
|
|
234
|
-
if ((_a = this._layerView) === null || _a === void 0 ? void 0 : _a.layer) {
|
|
233
|
+
if (this._layer) {
|
|
235
234
|
this._table = new this.FeatureTable({
|
|
236
|
-
layer: this.
|
|
235
|
+
layer: this._layer,
|
|
237
236
|
view: this.mapView,
|
|
238
237
|
//editingEnabled: this._editEnabled,
|
|
239
238
|
highlightOnRowSelectEnabled: true,
|
|
@@ -246,6 +245,14 @@ const LayerTable = class {
|
|
|
246
245
|
});
|
|
247
246
|
this._table.highlightIds.on("change", () => {
|
|
248
247
|
this._selectedIndexes = this._table.highlightIds.toArray();
|
|
248
|
+
if (this._showOnlySelected) {
|
|
249
|
+
if (this._selectedIndexes.length > 0) {
|
|
250
|
+
this._table.filterBySelection();
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
this._toggleShowSelected();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
249
256
|
this.featureSelectionChange.emit(this._selectedIndexes);
|
|
250
257
|
});
|
|
251
258
|
}
|
|
@@ -256,10 +263,11 @@ const LayerTable = class {
|
|
|
256
263
|
* @returns void
|
|
257
264
|
*/
|
|
258
265
|
_resetTable() {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
266
|
+
if (this._layer && this._table) {
|
|
267
|
+
this._clearSelection();
|
|
268
|
+
this.featureSelectionChange.emit(this._selectedIndexes);
|
|
269
|
+
this._table.layer = this._layer;
|
|
270
|
+
this._editEnabled = this._layer.editingEnabled;
|
|
263
271
|
this._table.view = this.mapView;
|
|
264
272
|
this._table.editingEnabled = this._editEnabled;
|
|
265
273
|
this._table.clearSelectionFilter();
|
|
@@ -273,7 +281,7 @@ const LayerTable = class {
|
|
|
273
281
|
*/
|
|
274
282
|
async _mapClicked(evt) {
|
|
275
283
|
const opts = {
|
|
276
|
-
include: this.
|
|
284
|
+
include: this._layer
|
|
277
285
|
};
|
|
278
286
|
const hitTestResult = await this.mapView.hitTest(evt.screenPoint, opts);
|
|
279
287
|
if (hitTestResult.results.length > 0) {
|
|
@@ -318,7 +326,7 @@ const LayerTable = class {
|
|
|
318
326
|
*
|
|
319
327
|
* @returns void
|
|
320
328
|
*/
|
|
321
|
-
|
|
329
|
+
_toggleShowSelected() {
|
|
322
330
|
this._showOnlySelected = !this._showOnlySelected;
|
|
323
331
|
if (this._showOnlySelected) {
|
|
324
332
|
this._table.filterBySelection();
|
|
@@ -363,10 +371,10 @@ const LayerTable = class {
|
|
|
363
371
|
async _exportToCSV() {
|
|
364
372
|
const exportInfos = {};
|
|
365
373
|
const ids = this._table.highlightIds.toArray();
|
|
366
|
-
exportInfos[this.
|
|
374
|
+
exportInfos[this._layer.id] = {
|
|
367
375
|
selectionSetNames: [],
|
|
368
376
|
ids,
|
|
369
|
-
|
|
377
|
+
layer: this._layer
|
|
370
378
|
};
|
|
371
379
|
void downloadUtils.downloadCSV(exportInfos, false, // formatUsingLayerPopup
|
|
372
380
|
true);
|
|
@@ -401,7 +409,7 @@ const LayerTable = class {
|
|
|
401
409
|
this._alertMessage = this._translations.confirm;
|
|
402
410
|
this._alertKind = "danger";
|
|
403
411
|
this._alertActionFunction = () => {
|
|
404
|
-
void this.
|
|
412
|
+
void this._layer.applyEdits({
|
|
405
413
|
deleteFeatures: this._table.highlightIds.toArray()
|
|
406
414
|
});
|
|
407
415
|
this._alertOpen = false;
|
|
@@ -432,15 +440,14 @@ const LayerTable = class {
|
|
|
432
440
|
* @returns a promise that will resolve when the operation is complete
|
|
433
441
|
*/
|
|
434
442
|
async _layerSelectionChanged(evt) {
|
|
435
|
-
var _a;
|
|
436
443
|
const id = evt.detail[0];
|
|
437
|
-
if (id !==
|
|
444
|
+
if (id !== this._layer.id || this._allIds.length === 0) {
|
|
438
445
|
this._fetchingData = true;
|
|
439
446
|
this._table.highlightIds.removeAll();
|
|
440
|
-
this.
|
|
441
|
-
this._allIds = await mapViewUtils.queryAllIds(this.
|
|
447
|
+
this._layer = await mapViewUtils.getLayer(this.mapView, id);
|
|
448
|
+
this._allIds = await mapViewUtils.queryAllIds(this._layer);
|
|
442
449
|
this._selectedIndexes = [];
|
|
443
|
-
this._table.layer = this.
|
|
450
|
+
this._table.layer = this._layer;
|
|
444
451
|
this._table.render();
|
|
445
452
|
this._fetchingData = false;
|
|
446
453
|
}
|
|
@@ -458,7 +465,7 @@ const LayerTable = class {
|
|
|
458
465
|
get el() { return index.getElement(this); }
|
|
459
466
|
static get watchers() { return {
|
|
460
467
|
"mapView": ["mapViewWatchHandler"],
|
|
461
|
-
"
|
|
468
|
+
"_layer": ["_layerWatchHandler"]
|
|
462
469
|
}; }
|
|
463
470
|
};
|
|
464
471
|
LayerTable.style = layerTableCss;
|
|
@@ -12,7 +12,7 @@ const locale = require('./locale-b113c6b2.js');
|
|
|
12
12
|
const interfaces = require('./interfaces-ad03ec39.js');
|
|
13
13
|
require('./_commonjsHelpers-384729db.js');
|
|
14
14
|
|
|
15
|
-
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')}.
|
|
15
|
+
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}";
|
|
16
16
|
|
|
17
17
|
const CrowdsourceManager = class {
|
|
18
18
|
constructor(hostRef) {
|
|
@@ -67,7 +67,7 @@ const CrowdsourceManager = class {
|
|
|
67
67
|
* Renders the component.
|
|
68
68
|
*/
|
|
69
69
|
render() {
|
|
70
|
-
return (index.h(index.Host, null, index.h("calcite-shell", null, index.h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, index.h("div", { class: "display-flex", slot: "header-actions-end" }, index.h("div", { class: "display-flex action-center" }, index.h("calcite-icon", { class: "icon icon-color", icon: "information", id: "app-information-icon", scale: "s" }), index.h("calcite-popover", { closable: true, label: "", referenceElement: "app-information-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.appInfo))), index.h("div", { class: "header-text" }, this._translations.layout), this._getAction("grid-background", interfaces.ELayoutMode.GRID, this._translations.grid), this._getAction("
|
|
70
|
+
return (index.h(index.Host, null, index.h("calcite-shell", null, index.h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, index.h("div", { class: "display-flex", slot: "header-actions-end" }, index.h("div", { class: "display-flex action-center" }, index.h("calcite-icon", { class: "icon icon-color", icon: "information", id: "app-information-icon", scale: "s" }), index.h("calcite-popover", { closable: true, label: "", referenceElement: "app-information-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.appInfo))), index.h("div", { class: "header-text" }, this._translations.layout), this._getAction("grid-background", interfaces.ELayoutMode.GRID, this._translations.grid), this._getAction("vertical-background", interfaces.ELayoutMode.VERTICAL, this._translations.vertical), this._getAction("horizontal-background", interfaces.ELayoutMode.HORIZONTAL, this._translations.horizontal)), this._getBody(this._layoutMode, this._panelOpen)))));
|
|
71
71
|
}
|
|
72
72
|
//--------------------------------------------------------------------------
|
|
73
73
|
//
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
|
9
9
|
const index = require('./index-6654298b.js');
|
|
10
10
|
const loadModules = require('./loadModules-ae7715f2.js');
|
|
11
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
11
|
+
const mapViewUtils = require('./mapViewUtils-77a1ff88.js');
|
|
12
12
|
|
|
13
13
|
/** @license
|
|
14
14
|
* Copyright 2022 Esri
|
|
@@ -1507,7 +1507,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1507
1507
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1508
1508
|
* ====================================================================
|
|
1509
1509
|
*/
|
|
1510
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-
|
|
1510
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-17db3b89.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},
|
|
1511
1511
|
/** ====================================================================
|
|
1512
1512
|
* @license
|
|
1513
1513
|
* jsPDF XMP metadata plugin
|
|
@@ -2710,8 +2710,9 @@ function _getSelectionSetNames(exportInfos, id = /.+/) {
|
|
|
2710
2710
|
async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
|
|
2711
2711
|
const labelRequests = [];
|
|
2712
2712
|
Object.keys(exportInfos).forEach(k => {
|
|
2713
|
+
var _a;
|
|
2713
2714
|
const labelInfo = exportInfos[k];
|
|
2714
|
-
labelRequests.push(_prepareLabels(labelInfo.layerView.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
|
2715
|
+
labelRequests.push(_prepareLabels(((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
|
2715
2716
|
if (isCSVExport) {
|
|
2716
2717
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
|
2717
2718
|
labelRequests.push(Promise.resolve([[k]]));
|