@esri/solutions-components 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/t9n/public-notification/resources.json +4 -1
- package/dist/assets/t9n/public-notification/resources_en.json +4 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
- package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-search.cjs.entry.js +46 -7
- package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
- package/dist/cjs/public-notification.cjs.entry.js +101 -18
- package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
- package/dist/collection/components/map-search/map-search.js +66 -7
- package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
- package/dist/collection/components/pdf-download/pdf-download.js +32 -8
- package/dist/collection/components/public-notification/public-notification.css +46 -41
- package/dist/collection/components/public-notification/public-notification.js +267 -19
- package/dist/collection/components/refine-selection/refine-selection.js +18 -1
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
- package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
- package/dist/collection/demos/index.html +0 -24
- package/dist/collection/demos/map-draw-tools.html +17 -17
- package/dist/collection/demos/map-layer-picker.html +2 -0
- package/dist/collection/demos/map-search.html +16 -15
- package/dist/collection/demos/map-select-tools.html +16 -24
- package/dist/collection/demos/new-public-notification.html +46 -35
- package/dist/collection/demos/pdf-download.html +8 -1
- package/dist/collection/utils/csvUtils.js +4 -4
- package/dist/collection/utils/csvUtils.ts +6 -4
- package/dist/collection/utils/interfaces.ts +65 -1
- package/dist/collection/utils/mapViewUtils.js +36 -22
- package/dist/collection/utils/mapViewUtils.ts +50 -27
- package/dist/collection/utils/publicNotificationStore.js +3 -1
- package/dist/collection/utils/publicNotificationStore.ts +3 -1
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/csvUtils.js +4 -4
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +0 -5
- package/dist/components/layer-table.js +2 -3
- package/dist/components/map-layer-picker2.js +177 -28
- package/dist/components/map-search.js +47 -7
- package/dist/components/map-select-tools2.js +56 -11
- package/dist/components/pdf-download2.js +217 -8
- package/dist/components/public-notification.js +154 -55
- package/dist/components/publicNotificationStore.js +3 -1
- package/dist/components/queryUtils.js +3 -3
- package/dist/components/refine-selection-tools2.js +9 -8
- package/dist/components/refine-selection2.js +3 -1
- package/dist/esm/buffer-tools_6.entry.js +8 -7
- package/dist/esm/calcite-combobox_3.entry.js +38 -25
- package/dist/esm/calcite-input-message_5.entry.js +271 -20
- package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-search.entry.js +46 -7
- package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
- package/dist/esm/public-notification.entry.js +101 -18
- package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
- package/dist/solutions-components/demos/index.html +0 -24
- package/dist/solutions-components/demos/map-draw-tools.html +17 -17
- package/dist/solutions-components/demos/map-layer-picker.html +2 -0
- package/dist/solutions-components/demos/map-search.html +16 -15
- package/dist/solutions-components/demos/map-select-tools.html +16 -24
- package/dist/solutions-components/demos/new-public-notification.html +46 -35
- package/dist/solutions-components/demos/pdf-download.html +8 -1
- package/dist/solutions-components/p-07593958.entry.js +6 -0
- package/dist/solutions-components/p-3fa9b3c8.js +36 -0
- package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
- package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
- package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
- package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
- package/dist/solutions-components/p-bfa95147.entry.js +17 -0
- package/dist/solutions-components/p-d09a168c.entry.js +6 -0
- package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/csvUtils.ts +6 -4
- package/dist/solutions-components/utils/interfaces.ts +65 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
- package/dist/types/components/map-search/map-search.d.ts +18 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
- package/dist/types/components/public-notification/public-notification.d.ts +98 -4
- package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
- package/dist/types/components.d.ts +154 -180
- package/dist/types/preact.d.ts +0 -10
- package/dist/types/utils/csvUtils.d.ts +1 -1
- package/dist/types/utils/interfaces.d.ts +56 -1
- package/dist/types/utils/mapViewUtils.d.ts +19 -9
- package/dist/types/utils/publicNotificationStore.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/check-list.cjs.entry.js +0 -103
- package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
- package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
- package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
- package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
- package/dist/cjs/labelFormats-3236d2e0.js +0 -212
- package/dist/collection/components/check-list/check-list.css +0 -3
- package/dist/collection/components/check-list/check-list.js +0 -179
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
- package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
- package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
- package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
- package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
- package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
- package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
- package/dist/collection/demos/check-list.html +0 -65
- package/dist/collection/demos/config-buffer-tools.html +0 -92
- package/dist/collection/demos/config-draw-tools.html +0 -58
- package/dist/collection/demos/config-layer-picker.html +0 -97
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -11
- package/dist/components/check-list2.js +0 -131
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -187
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -121
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -163
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -154
- package/dist/components/labelFormats.js +0 -210
- package/dist/components/mapViewUtils.js +0 -129
- package/dist/esm/check-list.entry.js +0 -99
- package/dist/esm/config-buffer-tools.entry.js +0 -121
- package/dist/esm/config-draw-tools.entry.js +0 -81
- package/dist/esm/config-layer-picker.entry.js +0 -109
- package/dist/esm/config-pdf-download.entry.js +0 -113
- package/dist/esm/labelFormats-b37958c3.js +0 -210
- package/dist/solutions-components/demos/check-list.html +0 -65
- package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
- package/dist/solutions-components/demos/config-draw-tools.html +0 -58
- package/dist/solutions-components/demos/config-layer-picker.html +0 -97
- package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
- package/dist/solutions-components/p-35078393.entry.js +0 -17
- package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
- package/dist/solutions-components/p-3e444242.entry.js +0 -6
- package/dist/solutions-components/p-67afea92.entry.js +0 -12
- package/dist/solutions-components/p-7dcab29d.js +0 -36
- package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
- package/dist/solutions-components/p-906b7b96.entry.js +0 -6
- package/dist/solutions-components/p-99c98510.entry.js +0 -6
- package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
- package/dist/solutions-components/p-e99b1247.js +0 -6
- package/dist/types/components/check-list/check-list.d.ts +0 -57
- package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
- package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
- package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
- package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { d as queryExtent } from './queryUtils.js';
|
|
7
|
-
|
|
8
|
-
/** @license
|
|
9
|
-
* Copyright 2022 Esri
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Gets the layer names from the current map
|
|
25
|
-
*
|
|
26
|
-
* @param mapView the map view to fetch the layer names from
|
|
27
|
-
*
|
|
28
|
-
* @returns Promise resolving with an array of layer names
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
async function getMapLayerNames(mapView) {
|
|
32
|
-
let layerNames = [];
|
|
33
|
-
await mapView.when(() => {
|
|
34
|
-
layerNames = mapView.map.layers.toArray().map((l) => {
|
|
35
|
-
return l.title;
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
return layerNames;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get a layer view by title
|
|
42
|
-
*
|
|
43
|
-
* @param mapView the map view to fetch the layer from
|
|
44
|
-
* @param title the title if the layer to fetch
|
|
45
|
-
*
|
|
46
|
-
* @returns Promise resolving with the fetched layer view
|
|
47
|
-
*
|
|
48
|
-
*/
|
|
49
|
-
async function getMapLayerView(mapView, title) {
|
|
50
|
-
const layer = await getMapLayer(mapView, title);
|
|
51
|
-
return layer ? await mapView.whenLayerView(layer) : undefined;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Get a layer by title
|
|
55
|
-
*
|
|
56
|
-
* @param mapView the map view to fetch the layer from
|
|
57
|
-
* @param title the title if the layer to fetch
|
|
58
|
-
*
|
|
59
|
-
* @returns Promise resolving with the fetched layer
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
async function getMapLayer(mapView, title) {
|
|
63
|
-
let layers = [];
|
|
64
|
-
await mapView.when(() => {
|
|
65
|
-
layers = mapView.map.layers.toArray().filter((l) => {
|
|
66
|
-
return l.title === title;
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
return layers.length > 0 ? layers[0] : undefined;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Highlight features by OID
|
|
73
|
-
*
|
|
74
|
-
* @param ids the OIDs from the layer to highlight
|
|
75
|
-
* @param layerView the layer view to highlight
|
|
76
|
-
* @param mapView the map view used if updateExtent is true
|
|
77
|
-
* @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
|
|
78
|
-
*
|
|
79
|
-
* @returns Promise resolving with the highlight handle
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
|
|
83
|
-
if (updateExtent) {
|
|
84
|
-
await goToSelection(ids, layerView, mapView, false);
|
|
85
|
-
}
|
|
86
|
-
return layerView.highlight(ids);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Flash features by OID
|
|
90
|
-
*
|
|
91
|
-
* @param ids the OIDs from the layer to highlight
|
|
92
|
-
* @param layerView the layer view to highlight
|
|
93
|
-
*
|
|
94
|
-
* @returns Promise resolving when the operation is complete
|
|
95
|
-
*
|
|
96
|
-
*/
|
|
97
|
-
async function flashSelection(ids, layerView) {
|
|
98
|
-
const featureFilter = {
|
|
99
|
-
objectIds: ids
|
|
100
|
-
};
|
|
101
|
-
layerView.featureEffect = {
|
|
102
|
-
filter: featureFilter,
|
|
103
|
-
includedEffect: "invert(100%)",
|
|
104
|
-
excludedEffect: "blur(5px)"
|
|
105
|
-
};
|
|
106
|
-
setTimeout(() => {
|
|
107
|
-
layerView.featureEffect = undefined;
|
|
108
|
-
}, 1300);
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Zoom to features based on OID
|
|
112
|
-
*
|
|
113
|
-
* @param ids the OIDs from the layer to go to
|
|
114
|
-
* @param layerView the layer view that contains the OIDs
|
|
115
|
-
* @param mapView the map view to show the extent change
|
|
116
|
-
* @param flashFeatures optional (default true) boolean to indicate if we should flash the features
|
|
117
|
-
*
|
|
118
|
-
* @returns Promise resolving when the operation is complete
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
async function goToSelection(ids, layerView, mapView, flashFeatures = true) {
|
|
122
|
-
const result = await queryExtent(ids, layerView.layer);
|
|
123
|
-
await mapView.goTo(result.extent);
|
|
124
|
-
if (flashFeatures) {
|
|
125
|
-
await flashSelection(ids, layerView);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export { goToSelection as a, getMapLayerView as b, getMapLayerNames as g, highlightFeatures as h };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-09deaa39.js';
|
|
7
|
-
|
|
8
|
-
const checkListCss = ":host{display:block}";
|
|
9
|
-
|
|
10
|
-
const CheckList = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
registerInstance(this, hostRef);
|
|
13
|
-
//--------------------------------------------------------------------------
|
|
14
|
-
//
|
|
15
|
-
// State (internal)
|
|
16
|
-
//
|
|
17
|
-
//--------------------------------------------------------------------------
|
|
18
|
-
//--------------------------------------------------------------------------
|
|
19
|
-
//
|
|
20
|
-
// Properties (protected)
|
|
21
|
-
//
|
|
22
|
-
//--------------------------------------------------------------------------
|
|
23
|
-
/**
|
|
24
|
-
* A list of all checkbox elements for this component
|
|
25
|
-
*
|
|
26
|
-
* @protected
|
|
27
|
-
*/
|
|
28
|
-
this._elements = [];
|
|
29
|
-
this.defaultChecked = true;
|
|
30
|
-
this.values = undefined;
|
|
31
|
-
}
|
|
32
|
-
//--------------------------------------------------------------------------
|
|
33
|
-
//
|
|
34
|
-
// Watch handlers
|
|
35
|
-
//
|
|
36
|
-
//--------------------------------------------------------------------------
|
|
37
|
-
//--------------------------------------------------------------------------
|
|
38
|
-
//
|
|
39
|
-
// Methods (public)
|
|
40
|
-
//
|
|
41
|
-
//--------------------------------------------------------------------------
|
|
42
|
-
/**
|
|
43
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
|
44
|
-
*
|
|
45
|
-
* @returns Promise with the state of the checkboxes
|
|
46
|
-
*/
|
|
47
|
-
async getConfigInfo() {
|
|
48
|
-
return this._elements.reduce((prev, cur) => {
|
|
49
|
-
prev[cur.value] = cur.checked;
|
|
50
|
-
return prev;
|
|
51
|
-
}, {});
|
|
52
|
-
}
|
|
53
|
-
//--------------------------------------------------------------------------
|
|
54
|
-
//
|
|
55
|
-
// Events (public)
|
|
56
|
-
//
|
|
57
|
-
//--------------------------------------------------------------------------
|
|
58
|
-
//--------------------------------------------------------------------------
|
|
59
|
-
//
|
|
60
|
-
// Functions (lifecycle)
|
|
61
|
-
//
|
|
62
|
-
//--------------------------------------------------------------------------
|
|
63
|
-
/**
|
|
64
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
65
|
-
*/
|
|
66
|
-
async componentDidLoad() {
|
|
67
|
-
if (this.defaultChecked) {
|
|
68
|
-
this._elements.forEach(el => {
|
|
69
|
-
el.checked = true;
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Renders the component.
|
|
75
|
-
*/
|
|
76
|
-
render() {
|
|
77
|
-
return (h(Host, null, h("div", null, this._renderCheckboxes(this.values))));
|
|
78
|
-
}
|
|
79
|
-
//--------------------------------------------------------------------------
|
|
80
|
-
//
|
|
81
|
-
// Functions (protected)
|
|
82
|
-
//
|
|
83
|
-
//--------------------------------------------------------------------------
|
|
84
|
-
/**
|
|
85
|
-
* Render a checkbox with a label for each of the types listed in the NLS
|
|
86
|
-
*
|
|
87
|
-
* @returns Array of label/checkbox input nodes
|
|
88
|
-
* @protected
|
|
89
|
-
*/
|
|
90
|
-
_renderCheckboxes(values) {
|
|
91
|
-
return values.map(v => {
|
|
92
|
-
return (h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { ref: (el) => this._elements.push(el), value: v }), v));
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
get el() { return getElement(this); }
|
|
96
|
-
};
|
|
97
|
-
CheckList.style = checkListCss;
|
|
98
|
-
|
|
99
|
-
export { CheckList as check_list };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-09deaa39.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-a5a0b545.js';
|
|
8
|
-
import './_commonjsHelpers-8fd39c50.js';
|
|
9
|
-
|
|
10
|
-
const configBufferToolsCss = ":host{display:block}.horizontal-display{display:flex}.label-spacing{--calcite-label-margin-bottom:0}.padding-inline-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.width-half{width:50%}.width-full{width:100%}";
|
|
11
|
-
|
|
12
|
-
const ConfigBufferTools = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
registerInstance(this, hostRef);
|
|
15
|
-
this.distance = 100;
|
|
16
|
-
this.unit = "Meters";
|
|
17
|
-
this._showBufferChecked = true;
|
|
18
|
-
this._translations = undefined;
|
|
19
|
-
}
|
|
20
|
-
//--------------------------------------------------------------------------
|
|
21
|
-
//
|
|
22
|
-
// Watch handlers
|
|
23
|
-
//
|
|
24
|
-
//--------------------------------------------------------------------------
|
|
25
|
-
//--------------------------------------------------------------------------
|
|
26
|
-
//
|
|
27
|
-
// Methods (public)
|
|
28
|
-
//
|
|
29
|
-
//--------------------------------------------------------------------------
|
|
30
|
-
/**
|
|
31
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
|
32
|
-
*
|
|
33
|
-
* @returns Promise with the state of the checkboxes
|
|
34
|
-
*/
|
|
35
|
-
async getConfigInfo() {
|
|
36
|
-
return {
|
|
37
|
-
"distance": this.distance,
|
|
38
|
-
"unit": this.unit
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//--------------------------------------------------------------------------
|
|
42
|
-
//
|
|
43
|
-
// Events (public)
|
|
44
|
-
//
|
|
45
|
-
//--------------------------------------------------------------------------
|
|
46
|
-
//--------------------------------------------------------------------------
|
|
47
|
-
//
|
|
48
|
-
// Functions (lifecycle)
|
|
49
|
-
//
|
|
50
|
-
//--------------------------------------------------------------------------
|
|
51
|
-
/**
|
|
52
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
53
|
-
*
|
|
54
|
-
* @returns Promise when complete
|
|
55
|
-
*/
|
|
56
|
-
async componentWillLoad() {
|
|
57
|
-
await this._getTranslations();
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Renders the component.
|
|
61
|
-
*/
|
|
62
|
-
render() {
|
|
63
|
-
return (h(Host, null, h("div", null, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._showBufferChecked, onCalciteCheckboxChange: () => this._setShowBufferChecked(), ref: (el) => { this._showBufferElement = el; } }), this._translations.showSearchDistance)), h("div", { class: "padding-inline-start-1" }, h("div", { class: "padding-block-end-1 width-full" }, h("calcite-label", { class: "label-spacing" }, this._translations.defaultBufferDistance, h("calcite-input", { disabled: !this._showBufferChecked, min: 0, "number-button-type": "vertical", onCalciteInputInput: (evt) => { this._distanceChanged(evt); }, type: "number", value: this.distance.toString() }))), h("div", { class: "width-full" }, h("calcite-label", { class: "label-spacing" }, this._translations.defaultUnit, h("calcite-select", { disabled: !this._showBufferChecked, label: this._translations.defaultUnit, onCalciteSelectChange: (evt) => { this._unitSelectionChange(evt); } }, this._renderUnitOptions()))))));
|
|
64
|
-
}
|
|
65
|
-
//--------------------------------------------------------------------------
|
|
66
|
-
//
|
|
67
|
-
// Functions (protected)
|
|
68
|
-
//
|
|
69
|
-
//--------------------------------------------------------------------------
|
|
70
|
-
/**
|
|
71
|
-
* Store the user defined distance
|
|
72
|
-
*
|
|
73
|
-
* @protected
|
|
74
|
-
*/
|
|
75
|
-
_distanceChanged(evt) {
|
|
76
|
-
this.distance = evt.detail.value;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Store the user defined unit
|
|
80
|
-
*
|
|
81
|
-
* @protected
|
|
82
|
-
*/
|
|
83
|
-
_unitSelectionChange(evt) {
|
|
84
|
-
this.unit = evt.target.value;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Render the various unit options
|
|
88
|
-
*
|
|
89
|
-
* @returns Promise when complete
|
|
90
|
-
* @protected
|
|
91
|
-
*/
|
|
92
|
-
_renderUnitOptions() {
|
|
93
|
-
const nlsUnits = this._translations.units || {};
|
|
94
|
-
const units = Object.keys(nlsUnits).map(k => nlsUnits[k]);
|
|
95
|
-
return units.map(unit => {
|
|
96
|
-
return (h("calcite-option", { label: unit, selected: unit === this.unit, value: unit }));
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* When not checked the buffer options will be disabled in the config and not visible in the UI at runtime
|
|
101
|
-
*
|
|
102
|
-
* @protected
|
|
103
|
-
*/
|
|
104
|
-
_setShowBufferChecked() {
|
|
105
|
-
this._showBufferChecked = this._showBufferElement.checked;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Fetches the component's translations
|
|
109
|
-
*
|
|
110
|
-
* @returns Promise when complete
|
|
111
|
-
* @protected
|
|
112
|
-
*/
|
|
113
|
-
async _getTranslations() {
|
|
114
|
-
const messages = await getLocaleComponentStrings(this.el);
|
|
115
|
-
this._translations = messages[0];
|
|
116
|
-
}
|
|
117
|
-
get el() { return getElement(this); }
|
|
118
|
-
};
|
|
119
|
-
ConfigBufferTools.style = configBufferToolsCss;
|
|
120
|
-
|
|
121
|
-
export { ConfigBufferTools as config_buffer_tools };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-09deaa39.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-a5a0b545.js';
|
|
8
|
-
import './_commonjsHelpers-8fd39c50.js';
|
|
9
|
-
|
|
10
|
-
const configDrawToolsCss = ":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";
|
|
11
|
-
|
|
12
|
-
const ConfigDrawTools = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
registerInstance(this, hostRef);
|
|
15
|
-
this.defaultChecked = true;
|
|
16
|
-
this._translations = undefined;
|
|
17
|
-
}
|
|
18
|
-
//--------------------------------------------------------------------------
|
|
19
|
-
//
|
|
20
|
-
// Watch handlers
|
|
21
|
-
//
|
|
22
|
-
//--------------------------------------------------------------------------
|
|
23
|
-
//--------------------------------------------------------------------------
|
|
24
|
-
//
|
|
25
|
-
// Methods (public)
|
|
26
|
-
//
|
|
27
|
-
//--------------------------------------------------------------------------
|
|
28
|
-
/**
|
|
29
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
|
30
|
-
*
|
|
31
|
-
* @returns Promise with the state of the checkboxes
|
|
32
|
-
*/
|
|
33
|
-
async getConfigInfo() {
|
|
34
|
-
return this._checkList.getConfigInfo();
|
|
35
|
-
}
|
|
36
|
-
//--------------------------------------------------------------------------
|
|
37
|
-
//
|
|
38
|
-
// Events (public)
|
|
39
|
-
//
|
|
40
|
-
//--------------------------------------------------------------------------
|
|
41
|
-
//--------------------------------------------------------------------------
|
|
42
|
-
//
|
|
43
|
-
// Functions (lifecycle)
|
|
44
|
-
//
|
|
45
|
-
//--------------------------------------------------------------------------
|
|
46
|
-
/**
|
|
47
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
48
|
-
*
|
|
49
|
-
* @returns Promise when complete
|
|
50
|
-
*/
|
|
51
|
-
async componentWillLoad() {
|
|
52
|
-
await this._getTranslations();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Renders the component.
|
|
56
|
-
*/
|
|
57
|
-
render() {
|
|
58
|
-
const nlsTypes = this._translations.types || {};
|
|
59
|
-
const types = Object.keys(nlsTypes).map(k => nlsTypes[k]);
|
|
60
|
-
return (h(Host, null, h("div", null, h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this._translations.drawTools)), h("div", { class: "padding-inline-start-1" }, h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._checkList = el; }, values: types })))));
|
|
61
|
-
}
|
|
62
|
-
//--------------------------------------------------------------------------
|
|
63
|
-
//
|
|
64
|
-
// Functions (protected)
|
|
65
|
-
//
|
|
66
|
-
//--------------------------------------------------------------------------
|
|
67
|
-
/**
|
|
68
|
-
* Fetches the component's translations
|
|
69
|
-
*
|
|
70
|
-
* @returns Promise when complete
|
|
71
|
-
* @protected
|
|
72
|
-
*/
|
|
73
|
-
async _getTranslations() {
|
|
74
|
-
const messages = await getLocaleComponentStrings(this.el);
|
|
75
|
-
this._translations = messages[0];
|
|
76
|
-
}
|
|
77
|
-
get el() { return getElement(this); }
|
|
78
|
-
};
|
|
79
|
-
ConfigDrawTools.style = configDrawToolsCss;
|
|
80
|
-
|
|
81
|
-
export { ConfigDrawTools as config_draw_tools };
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-09deaa39.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-a5a0b545.js';
|
|
8
|
-
import { g as getMapLayerNames } from './mapViewUtils-31d2c2bb.js';
|
|
9
|
-
import './_commonjsHelpers-8fd39c50.js';
|
|
10
|
-
import './interfaces-3b23a5f9.js';
|
|
11
|
-
|
|
12
|
-
const configLayerPickerCss = ":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";
|
|
13
|
-
|
|
14
|
-
const ConfigLayerPicker = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
registerInstance(this, hostRef);
|
|
17
|
-
this.defaultChecked = true;
|
|
18
|
-
this.instruction = "";
|
|
19
|
-
this.mapView = undefined;
|
|
20
|
-
this._layerNames = [];
|
|
21
|
-
this._translations = undefined;
|
|
22
|
-
}
|
|
23
|
-
//--------------------------------------------------------------------------
|
|
24
|
-
//
|
|
25
|
-
// Watch handlers
|
|
26
|
-
//
|
|
27
|
-
//--------------------------------------------------------------------------
|
|
28
|
-
/**
|
|
29
|
-
* Called each time the mapView prop is changed.
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
async watchStateHandler() {
|
|
33
|
-
await this._setLayers();
|
|
34
|
-
}
|
|
35
|
-
//--------------------------------------------------------------------------
|
|
36
|
-
//
|
|
37
|
-
// Methods (public)
|
|
38
|
-
//
|
|
39
|
-
//--------------------------------------------------------------------------
|
|
40
|
-
/**
|
|
41
|
-
* Returns a list of layers that have been selected
|
|
42
|
-
*
|
|
43
|
-
* @returns Promise with a list of layer names to use
|
|
44
|
-
*/
|
|
45
|
-
async getConfigInfo() {
|
|
46
|
-
return typeof this._checkList.value === "string" ?
|
|
47
|
-
[this._checkList.value] : this._checkList.value;
|
|
48
|
-
}
|
|
49
|
-
//--------------------------------------------------------------------------
|
|
50
|
-
//
|
|
51
|
-
// Events (public)
|
|
52
|
-
//
|
|
53
|
-
//--------------------------------------------------------------------------
|
|
54
|
-
//--------------------------------------------------------------------------
|
|
55
|
-
//
|
|
56
|
-
// Functions (lifecycle)
|
|
57
|
-
//
|
|
58
|
-
//--------------------------------------------------------------------------
|
|
59
|
-
/**
|
|
60
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
61
|
-
*
|
|
62
|
-
* @returns Promise when complete
|
|
63
|
-
*/
|
|
64
|
-
async componentWillLoad() {
|
|
65
|
-
await this._setLayers();
|
|
66
|
-
await this._getTranslations();
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Renders the component.
|
|
70
|
-
*/
|
|
71
|
-
render() {
|
|
72
|
-
return (h(Host, null, h("div", null, h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this.instruction || this._translations.chooseLayer)), h("div", { class: "padding-inline-start-1" }, h("calcite-combobox", { label: '', overlayPositioning: "fixed", ref: (el) => { this._checkList = el; }, selectionMode: "multiple" }, this._getComboboxItems())))));
|
|
73
|
-
}
|
|
74
|
-
//--------------------------------------------------------------------------
|
|
75
|
-
//
|
|
76
|
-
// Functions (protected)
|
|
77
|
-
//
|
|
78
|
-
//--------------------------------------------------------------------------
|
|
79
|
-
_getComboboxItems() {
|
|
80
|
-
return this._layerNames ? this._layerNames.map(name => (h("calcite-combobox-item", { textLabel: name, value: name }))) : [];
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Fetch the names of the layers from the map
|
|
84
|
-
*
|
|
85
|
-
* @returns Promise when the operation has completed
|
|
86
|
-
*/
|
|
87
|
-
async _setLayers() {
|
|
88
|
-
if (this.mapView) {
|
|
89
|
-
this._layerNames = await getMapLayerNames(this.mapView);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Fetches the component's translations
|
|
94
|
-
*
|
|
95
|
-
* @returns Promise when complete
|
|
96
|
-
* @protected
|
|
97
|
-
*/
|
|
98
|
-
async _getTranslations() {
|
|
99
|
-
const messages = await getLocaleComponentStrings(this.el);
|
|
100
|
-
this._translations = messages[0];
|
|
101
|
-
}
|
|
102
|
-
get el() { return getElement(this); }
|
|
103
|
-
static get watchers() { return {
|
|
104
|
-
"mapView": ["watchStateHandler"]
|
|
105
|
-
}; }
|
|
106
|
-
};
|
|
107
|
-
ConfigLayerPicker.style = configLayerPickerCss;
|
|
108
|
-
|
|
109
|
-
export { ConfigLayerPicker as config_layer_picker };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-09deaa39.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-a5a0b545.js';
|
|
8
|
-
import { p as pdfUtils } from './labelFormats-b37958c3.js';
|
|
9
|
-
import './_commonjsHelpers-8fd39c50.js';
|
|
10
|
-
|
|
11
|
-
const configPdfDownloadCss = ":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";
|
|
12
|
-
|
|
13
|
-
const ConfigPdfDownload = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
registerInstance(this, hostRef);
|
|
16
|
-
this.defaultChecked = true;
|
|
17
|
-
this._formatOptions = [];
|
|
18
|
-
this._translations = undefined;
|
|
19
|
-
}
|
|
20
|
-
//--------------------------------------------------------------------------
|
|
21
|
-
//
|
|
22
|
-
// Watch handlers
|
|
23
|
-
//
|
|
24
|
-
//--------------------------------------------------------------------------
|
|
25
|
-
//--------------------------------------------------------------------------
|
|
26
|
-
//
|
|
27
|
-
// Methods (public)
|
|
28
|
-
//
|
|
29
|
-
//--------------------------------------------------------------------------
|
|
30
|
-
/**
|
|
31
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
|
32
|
-
*
|
|
33
|
-
* @returns Promise with the state of the checkboxes
|
|
34
|
-
*/
|
|
35
|
-
async getConfigInfo() {
|
|
36
|
-
const formatOptions = await this._formatOptionsCheckList.getConfigInfo();
|
|
37
|
-
const csvOptions = await this._csvOptionsCheckList.getConfigInfo();
|
|
38
|
-
return Object.assign(Object.assign({}, formatOptions), csvOptions);
|
|
39
|
-
}
|
|
40
|
-
//--------------------------------------------------------------------------
|
|
41
|
-
//
|
|
42
|
-
// Events (public)
|
|
43
|
-
//
|
|
44
|
-
//--------------------------------------------------------------------------
|
|
45
|
-
//--------------------------------------------------------------------------
|
|
46
|
-
//
|
|
47
|
-
// Functions (lifecycle)
|
|
48
|
-
//
|
|
49
|
-
//--------------------------------------------------------------------------
|
|
50
|
-
/**
|
|
51
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
52
|
-
*
|
|
53
|
-
* @returns Promise when complete
|
|
54
|
-
*/
|
|
55
|
-
async componentWillLoad() {
|
|
56
|
-
await this._getTranslations();
|
|
57
|
-
await this._setFormatOptions();
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Renders the component.
|
|
61
|
-
*/
|
|
62
|
-
render() {
|
|
63
|
-
return (h(Host, null, h("div", null, h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this._translations.availableLabelFormats)), h("div", { class: "padding-block-end-1 padding-inline-start-1" }, h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._formatOptionsCheckList = el; }, values: this._formatOptions })), h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this._translations.csvOptions)), h("div", { class: "padding-block-end-1 padding-inline-start-1" }, h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._csvOptionsCheckList = el; }, values: [this._translations.csvColumnTitle] })))));
|
|
64
|
-
}
|
|
65
|
-
//--------------------------------------------------------------------------
|
|
66
|
-
//
|
|
67
|
-
// Functions (protected)
|
|
68
|
-
//
|
|
69
|
-
//--------------------------------------------------------------------------
|
|
70
|
-
/**
|
|
71
|
-
* Fetch the names of the layers from the map
|
|
72
|
-
*
|
|
73
|
-
* @returns Promise when the operation has completed
|
|
74
|
-
*/
|
|
75
|
-
async _setFormatOptions() {
|
|
76
|
-
const s = pdfUtils;
|
|
77
|
-
const sortedPdfIndo = (s.default || s).sort((a, b) => {
|
|
78
|
-
const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);
|
|
79
|
-
const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
|
|
80
|
-
return _a < _b ? -1 : _a > _b ? 1 : 0;
|
|
81
|
-
});
|
|
82
|
-
this._formatOptions = sortedPdfIndo.map(l => {
|
|
83
|
-
return this._getLabelSizeText(l);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Gets the formatted pdf export size text
|
|
88
|
-
*
|
|
89
|
-
* @param labelInfo current user selected label info
|
|
90
|
-
*
|
|
91
|
-
* @returns the pdf label as a string
|
|
92
|
-
* @protected
|
|
93
|
-
*/
|
|
94
|
-
_getLabelSizeText(labelInfo) {
|
|
95
|
-
const lNum = labelInfo.descriptionPDF.labelsPerPageDisplay;
|
|
96
|
-
const lSize = `${labelInfo.descriptionPDF.labelWidthDisplay} x ${labelInfo.descriptionPDF.labelHeightDisplay}`;
|
|
97
|
-
return this._translations.pdfLabel.replace("{{n}}", lNum).replace("{{labelSize}}", lSize);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Fetches the component's translations
|
|
101
|
-
*
|
|
102
|
-
* @returns Promise when complete
|
|
103
|
-
* @protected
|
|
104
|
-
*/
|
|
105
|
-
async _getTranslations() {
|
|
106
|
-
const messages = await getLocaleComponentStrings(this.el);
|
|
107
|
-
this._translations = messages[0];
|
|
108
|
-
}
|
|
109
|
-
get el() { return getElement(this); }
|
|
110
|
-
};
|
|
111
|
-
ConfigPdfDownload.style = configPdfDownloadCss;
|
|
112
|
-
|
|
113
|
-
export { ConfigPdfDownload as config_pdf_download };
|