@esri/solutions-components 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -14,6 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
/// <reference types="arcgis-js-api" />
|
17
|
+
import { ILayerHash } from "./interfaces";
|
17
18
|
/**
|
18
19
|
* Gets the layer names from the current map
|
19
20
|
*
|
@@ -22,27 +23,36 @@
|
|
22
23
|
* @returns Promise resolving with an array of layer names
|
23
24
|
*
|
24
25
|
*/
|
25
|
-
export declare function
|
26
|
+
export declare function getMapLayerHash(mapView: __esri.MapView): Promise<ILayerHash>;
|
26
27
|
/**
|
27
|
-
*
|
28
|
+
* Gets the layer names from the current map
|
29
|
+
*
|
30
|
+
* @param mapView the map view to fetch the layer names from
|
31
|
+
*
|
32
|
+
* @returns Promise resolving with an array of layer names
|
33
|
+
*
|
34
|
+
*/
|
35
|
+
export declare function getMapLayerIds(mapView: __esri.MapView): Promise<string[]>;
|
36
|
+
/**
|
37
|
+
* Get a layer view by id
|
28
38
|
*
|
29
39
|
* @param mapView the map view to fetch the layer from
|
30
|
-
* @param
|
40
|
+
* @param id the id if the layer to fetch
|
31
41
|
*
|
32
42
|
* @returns Promise resolving with the fetched layer view
|
33
43
|
*
|
34
44
|
*/
|
35
|
-
export declare function getMapLayerView(mapView: __esri.MapView,
|
45
|
+
export declare function getMapLayerView(mapView: __esri.MapView, id: string): Promise<__esri.FeatureLayerView>;
|
36
46
|
/**
|
37
|
-
* Get a layer by
|
47
|
+
* Get a layer by id
|
38
48
|
*
|
39
49
|
* @param mapView the map view to fetch the layer from
|
40
|
-
* @param
|
50
|
+
* @param id the id if the layer to fetch
|
41
51
|
*
|
42
52
|
* @returns Promise resolving with the fetched layer
|
43
53
|
*
|
44
54
|
*/
|
45
|
-
export declare function getMapLayer(mapView: __esri.MapView,
|
55
|
+
export declare function getMapLayer(mapView: __esri.MapView, id: string): Promise<__esri.FeatureLayer>;
|
46
56
|
/**
|
47
57
|
* Highlight features by OID
|
48
58
|
*
|
@@ -64,7 +74,7 @@ export declare function highlightFeatures(ids: number[], layerView: __esri.Featu
|
|
64
74
|
* @returns Promise resolving when the operation is complete
|
65
75
|
*
|
66
76
|
*/
|
67
|
-
export declare function flashSelection(ids: number[], layerView: __esri.FeatureLayerView): Promise<void>;
|
77
|
+
export declare function flashSelection(ids: number[], layerView: __esri.FeatureLayerView, featureEffect: __esri.FeatureEffect): Promise<void>;
|
68
78
|
/**
|
69
79
|
* Zoom to features based on OID
|
70
80
|
*
|
@@ -76,4 +86,4 @@ export declare function flashSelection(ids: number[], layerView: __esri.FeatureL
|
|
76
86
|
* @returns Promise resolving when the operation is complete
|
77
87
|
*
|
78
88
|
*/
|
79
|
-
export declare function goToSelection(ids: number[], layerView: __esri.FeatureLayerView, mapView: __esri.MapView, flashFeatures?: boolean): Promise<void>;
|
89
|
+
export declare function goToSelection(ids: number[], layerView: __esri.FeatureLayerView, mapView: __esri.MapView, flashFeatures?: boolean, featureEffect?: __esri.FeatureEffect): Promise<void>;
|
package/package.json
CHANGED
@@ -1,103 +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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-ee607805.js');
|
11
|
-
|
12
|
-
const checkListCss = ":host{display:block}";
|
13
|
-
|
14
|
-
const CheckList = class {
|
15
|
-
constructor(hostRef) {
|
16
|
-
index.registerInstance(this, hostRef);
|
17
|
-
//--------------------------------------------------------------------------
|
18
|
-
//
|
19
|
-
// State (internal)
|
20
|
-
//
|
21
|
-
//--------------------------------------------------------------------------
|
22
|
-
//--------------------------------------------------------------------------
|
23
|
-
//
|
24
|
-
// Properties (protected)
|
25
|
-
//
|
26
|
-
//--------------------------------------------------------------------------
|
27
|
-
/**
|
28
|
-
* A list of all checkbox elements for this component
|
29
|
-
*
|
30
|
-
* @protected
|
31
|
-
*/
|
32
|
-
this._elements = [];
|
33
|
-
this.defaultChecked = true;
|
34
|
-
this.values = undefined;
|
35
|
-
}
|
36
|
-
//--------------------------------------------------------------------------
|
37
|
-
//
|
38
|
-
// Watch handlers
|
39
|
-
//
|
40
|
-
//--------------------------------------------------------------------------
|
41
|
-
//--------------------------------------------------------------------------
|
42
|
-
//
|
43
|
-
// Methods (public)
|
44
|
-
//
|
45
|
-
//--------------------------------------------------------------------------
|
46
|
-
/**
|
47
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
48
|
-
*
|
49
|
-
* @returns Promise with the state of the checkboxes
|
50
|
-
*/
|
51
|
-
async getConfigInfo() {
|
52
|
-
return this._elements.reduce((prev, cur) => {
|
53
|
-
prev[cur.value] = cur.checked;
|
54
|
-
return prev;
|
55
|
-
}, {});
|
56
|
-
}
|
57
|
-
//--------------------------------------------------------------------------
|
58
|
-
//
|
59
|
-
// Events (public)
|
60
|
-
//
|
61
|
-
//--------------------------------------------------------------------------
|
62
|
-
//--------------------------------------------------------------------------
|
63
|
-
//
|
64
|
-
// Functions (lifecycle)
|
65
|
-
//
|
66
|
-
//--------------------------------------------------------------------------
|
67
|
-
/**
|
68
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
69
|
-
*/
|
70
|
-
async componentDidLoad() {
|
71
|
-
if (this.defaultChecked) {
|
72
|
-
this._elements.forEach(el => {
|
73
|
-
el.checked = true;
|
74
|
-
});
|
75
|
-
}
|
76
|
-
}
|
77
|
-
/**
|
78
|
-
* Renders the component.
|
79
|
-
*/
|
80
|
-
render() {
|
81
|
-
return (index.h(index.Host, null, index.h("div", null, this._renderCheckboxes(this.values))));
|
82
|
-
}
|
83
|
-
//--------------------------------------------------------------------------
|
84
|
-
//
|
85
|
-
// Functions (protected)
|
86
|
-
//
|
87
|
-
//--------------------------------------------------------------------------
|
88
|
-
/**
|
89
|
-
* Render a checkbox with a label for each of the types listed in the NLS
|
90
|
-
*
|
91
|
-
* @returns Array of label/checkbox input nodes
|
92
|
-
* @protected
|
93
|
-
*/
|
94
|
-
_renderCheckboxes(values) {
|
95
|
-
return values.map(v => {
|
96
|
-
return (index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { ref: (el) => this._elements.push(el), value: v }), v));
|
97
|
-
});
|
98
|
-
}
|
99
|
-
get el() { return index.getElement(this); }
|
100
|
-
};
|
101
|
-
CheckList.style = checkListCss;
|
102
|
-
|
103
|
-
exports.check_list = CheckList;
|
@@ -1,125 +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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-ee607805.js');
|
11
|
-
const locale = require('./locale-d15229c4.js');
|
12
|
-
require('./_commonjsHelpers-6aafa5de.js');
|
13
|
-
|
14
|
-
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%}";
|
15
|
-
|
16
|
-
const ConfigBufferTools = class {
|
17
|
-
constructor(hostRef) {
|
18
|
-
index.registerInstance(this, hostRef);
|
19
|
-
this.distance = 100;
|
20
|
-
this.unit = "Meters";
|
21
|
-
this._showBufferChecked = true;
|
22
|
-
this._translations = undefined;
|
23
|
-
}
|
24
|
-
//--------------------------------------------------------------------------
|
25
|
-
//
|
26
|
-
// Watch handlers
|
27
|
-
//
|
28
|
-
//--------------------------------------------------------------------------
|
29
|
-
//--------------------------------------------------------------------------
|
30
|
-
//
|
31
|
-
// Methods (public)
|
32
|
-
//
|
33
|
-
//--------------------------------------------------------------------------
|
34
|
-
/**
|
35
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
36
|
-
*
|
37
|
-
* @returns Promise with the state of the checkboxes
|
38
|
-
*/
|
39
|
-
async getConfigInfo() {
|
40
|
-
return {
|
41
|
-
"distance": this.distance,
|
42
|
-
"unit": this.unit
|
43
|
-
};
|
44
|
-
}
|
45
|
-
//--------------------------------------------------------------------------
|
46
|
-
//
|
47
|
-
// Events (public)
|
48
|
-
//
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
//--------------------------------------------------------------------------
|
51
|
-
//
|
52
|
-
// Functions (lifecycle)
|
53
|
-
//
|
54
|
-
//--------------------------------------------------------------------------
|
55
|
-
/**
|
56
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
57
|
-
*
|
58
|
-
* @returns Promise when complete
|
59
|
-
*/
|
60
|
-
async componentWillLoad() {
|
61
|
-
await this._getTranslations();
|
62
|
-
}
|
63
|
-
/**
|
64
|
-
* Renders the component.
|
65
|
-
*/
|
66
|
-
render() {
|
67
|
-
return (index.h(index.Host, null, index.h("div", null, index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { checked: this._showBufferChecked, onCalciteCheckboxChange: () => this._setShowBufferChecked(), ref: (el) => { this._showBufferElement = el; } }), this._translations.showSearchDistance)), index.h("div", { class: "padding-inline-start-1" }, index.h("div", { class: "padding-block-end-1 width-full" }, index.h("calcite-label", { class: "label-spacing" }, this._translations.defaultBufferDistance, index.h("calcite-input", { disabled: !this._showBufferChecked, min: 0, "number-button-type": "vertical", onCalciteInputInput: (evt) => { this._distanceChanged(evt); }, type: "number", value: this.distance.toString() }))), index.h("div", { class: "width-full" }, index.h("calcite-label", { class: "label-spacing" }, this._translations.defaultUnit, index.h("calcite-select", { disabled: !this._showBufferChecked, label: this._translations.defaultUnit, onCalciteSelectChange: (evt) => { this._unitSelectionChange(evt); } }, this._renderUnitOptions()))))));
|
68
|
-
}
|
69
|
-
//--------------------------------------------------------------------------
|
70
|
-
//
|
71
|
-
// Functions (protected)
|
72
|
-
//
|
73
|
-
//--------------------------------------------------------------------------
|
74
|
-
/**
|
75
|
-
* Store the user defined distance
|
76
|
-
*
|
77
|
-
* @protected
|
78
|
-
*/
|
79
|
-
_distanceChanged(evt) {
|
80
|
-
this.distance = evt.detail.value;
|
81
|
-
}
|
82
|
-
/**
|
83
|
-
* Store the user defined unit
|
84
|
-
*
|
85
|
-
* @protected
|
86
|
-
*/
|
87
|
-
_unitSelectionChange(evt) {
|
88
|
-
this.unit = evt.target.value;
|
89
|
-
}
|
90
|
-
/**
|
91
|
-
* Render the various unit options
|
92
|
-
*
|
93
|
-
* @returns Promise when complete
|
94
|
-
* @protected
|
95
|
-
*/
|
96
|
-
_renderUnitOptions() {
|
97
|
-
const nlsUnits = this._translations.units || {};
|
98
|
-
const units = Object.keys(nlsUnits).map(k => nlsUnits[k]);
|
99
|
-
return units.map(unit => {
|
100
|
-
return (index.h("calcite-option", { label: unit, selected: unit === this.unit, value: unit }));
|
101
|
-
});
|
102
|
-
}
|
103
|
-
/**
|
104
|
-
* When not checked the buffer options will be disabled in the config and not visible in the UI at runtime
|
105
|
-
*
|
106
|
-
* @protected
|
107
|
-
*/
|
108
|
-
_setShowBufferChecked() {
|
109
|
-
this._showBufferChecked = this._showBufferElement.checked;
|
110
|
-
}
|
111
|
-
/**
|
112
|
-
* Fetches the component's translations
|
113
|
-
*
|
114
|
-
* @returns Promise when complete
|
115
|
-
* @protected
|
116
|
-
*/
|
117
|
-
async _getTranslations() {
|
118
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
119
|
-
this._translations = messages[0];
|
120
|
-
}
|
121
|
-
get el() { return index.getElement(this); }
|
122
|
-
};
|
123
|
-
ConfigBufferTools.style = configBufferToolsCss;
|
124
|
-
|
125
|
-
exports.config_buffer_tools = ConfigBufferTools;
|
@@ -1,85 +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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-ee607805.js');
|
11
|
-
const locale = require('./locale-d15229c4.js');
|
12
|
-
require('./_commonjsHelpers-6aafa5de.js');
|
13
|
-
|
14
|
-
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}";
|
15
|
-
|
16
|
-
const ConfigDrawTools = class {
|
17
|
-
constructor(hostRef) {
|
18
|
-
index.registerInstance(this, hostRef);
|
19
|
-
this.defaultChecked = true;
|
20
|
-
this._translations = undefined;
|
21
|
-
}
|
22
|
-
//--------------------------------------------------------------------------
|
23
|
-
//
|
24
|
-
// Watch handlers
|
25
|
-
//
|
26
|
-
//--------------------------------------------------------------------------
|
27
|
-
//--------------------------------------------------------------------------
|
28
|
-
//
|
29
|
-
// Methods (public)
|
30
|
-
//
|
31
|
-
//--------------------------------------------------------------------------
|
32
|
-
/**
|
33
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
34
|
-
*
|
35
|
-
* @returns Promise with the state of the checkboxes
|
36
|
-
*/
|
37
|
-
async getConfigInfo() {
|
38
|
-
return this._checkList.getConfigInfo();
|
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
|
-
}
|
58
|
-
/**
|
59
|
-
* Renders the component.
|
60
|
-
*/
|
61
|
-
render() {
|
62
|
-
const nlsTypes = this._translations.types || {};
|
63
|
-
const types = Object.keys(nlsTypes).map(k => nlsTypes[k]);
|
64
|
-
return (index.h(index.Host, null, index.h("div", null, index.h("div", { class: "padding-block-end-1" }, index.h("calcite-label", { class: "label-spacing" }, this._translations.drawTools)), index.h("div", { class: "padding-inline-start-1" }, index.h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._checkList = el; }, values: types })))));
|
65
|
-
}
|
66
|
-
//--------------------------------------------------------------------------
|
67
|
-
//
|
68
|
-
// Functions (protected)
|
69
|
-
//
|
70
|
-
//--------------------------------------------------------------------------
|
71
|
-
/**
|
72
|
-
* Fetches the component's translations
|
73
|
-
*
|
74
|
-
* @returns Promise when complete
|
75
|
-
* @protected
|
76
|
-
*/
|
77
|
-
async _getTranslations() {
|
78
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
79
|
-
this._translations = messages[0];
|
80
|
-
}
|
81
|
-
get el() { return index.getElement(this); }
|
82
|
-
};
|
83
|
-
ConfigDrawTools.style = configDrawToolsCss;
|
84
|
-
|
85
|
-
exports.config_draw_tools = ConfigDrawTools;
|
@@ -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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-ee607805.js');
|
11
|
-
const locale = require('./locale-d15229c4.js');
|
12
|
-
const mapViewUtils = require('./mapViewUtils-8ea9adc5.js');
|
13
|
-
require('./_commonjsHelpers-6aafa5de.js');
|
14
|
-
require('./interfaces-772edf61.js');
|
15
|
-
|
16
|
-
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}";
|
17
|
-
|
18
|
-
const ConfigLayerPicker = class {
|
19
|
-
constructor(hostRef) {
|
20
|
-
index.registerInstance(this, hostRef);
|
21
|
-
this.defaultChecked = true;
|
22
|
-
this.instruction = "";
|
23
|
-
this.mapView = undefined;
|
24
|
-
this._layerNames = [];
|
25
|
-
this._translations = undefined;
|
26
|
-
}
|
27
|
-
//--------------------------------------------------------------------------
|
28
|
-
//
|
29
|
-
// Watch handlers
|
30
|
-
//
|
31
|
-
//--------------------------------------------------------------------------
|
32
|
-
/**
|
33
|
-
* Called each time the mapView prop is changed.
|
34
|
-
*
|
35
|
-
*/
|
36
|
-
async watchStateHandler() {
|
37
|
-
await this._setLayers();
|
38
|
-
}
|
39
|
-
//--------------------------------------------------------------------------
|
40
|
-
//
|
41
|
-
// Methods (public)
|
42
|
-
//
|
43
|
-
//--------------------------------------------------------------------------
|
44
|
-
/**
|
45
|
-
* Returns a list of layers that have been selected
|
46
|
-
*
|
47
|
-
* @returns Promise with a list of layer names to use
|
48
|
-
*/
|
49
|
-
async getConfigInfo() {
|
50
|
-
return typeof this._checkList.value === "string" ?
|
51
|
-
[this._checkList.value] : this._checkList.value;
|
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 first connected to the DOM.
|
65
|
-
*
|
66
|
-
* @returns Promise when complete
|
67
|
-
*/
|
68
|
-
async componentWillLoad() {
|
69
|
-
await this._setLayers();
|
70
|
-
await this._getTranslations();
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Renders the component.
|
74
|
-
*/
|
75
|
-
render() {
|
76
|
-
return (index.h(index.Host, null, index.h("div", null, index.h("div", { class: "padding-block-end-1" }, index.h("calcite-label", { class: "label-spacing" }, this.instruction || this._translations.chooseLayer)), index.h("div", { class: "padding-inline-start-1" }, index.h("calcite-combobox", { label: '', overlayPositioning: "fixed", ref: (el) => { this._checkList = el; }, selectionMode: "multiple" }, this._getComboboxItems())))));
|
77
|
-
}
|
78
|
-
//--------------------------------------------------------------------------
|
79
|
-
//
|
80
|
-
// Functions (protected)
|
81
|
-
//
|
82
|
-
//--------------------------------------------------------------------------
|
83
|
-
_getComboboxItems() {
|
84
|
-
return this._layerNames ? this._layerNames.map(name => (index.h("calcite-combobox-item", { textLabel: name, value: name }))) : [];
|
85
|
-
}
|
86
|
-
/**
|
87
|
-
* Fetch the names of the layers from the map
|
88
|
-
*
|
89
|
-
* @returns Promise when the operation has completed
|
90
|
-
*/
|
91
|
-
async _setLayers() {
|
92
|
-
if (this.mapView) {
|
93
|
-
this._layerNames = await mapViewUtils.getMapLayerNames(this.mapView);
|
94
|
-
}
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
* Fetches the component's translations
|
98
|
-
*
|
99
|
-
* @returns Promise when complete
|
100
|
-
* @protected
|
101
|
-
*/
|
102
|
-
async _getTranslations() {
|
103
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
104
|
-
this._translations = messages[0];
|
105
|
-
}
|
106
|
-
get el() { return index.getElement(this); }
|
107
|
-
static get watchers() { return {
|
108
|
-
"mapView": ["watchStateHandler"]
|
109
|
-
}; }
|
110
|
-
};
|
111
|
-
ConfigLayerPicker.style = configLayerPickerCss;
|
112
|
-
|
113
|
-
exports.config_layer_picker = ConfigLayerPicker;
|
@@ -1,117 +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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-ee607805.js');
|
11
|
-
const locale = require('./locale-d15229c4.js');
|
12
|
-
const labelFormats = require('./labelFormats-3236d2e0.js');
|
13
|
-
require('./_commonjsHelpers-6aafa5de.js');
|
14
|
-
|
15
|
-
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}";
|
16
|
-
|
17
|
-
const ConfigPdfDownload = class {
|
18
|
-
constructor(hostRef) {
|
19
|
-
index.registerInstance(this, hostRef);
|
20
|
-
this.defaultChecked = true;
|
21
|
-
this._formatOptions = [];
|
22
|
-
this._translations = undefined;
|
23
|
-
}
|
24
|
-
//--------------------------------------------------------------------------
|
25
|
-
//
|
26
|
-
// Watch handlers
|
27
|
-
//
|
28
|
-
//--------------------------------------------------------------------------
|
29
|
-
//--------------------------------------------------------------------------
|
30
|
-
//
|
31
|
-
// Methods (public)
|
32
|
-
//
|
33
|
-
//--------------------------------------------------------------------------
|
34
|
-
/**
|
35
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
36
|
-
*
|
37
|
-
* @returns Promise with the state of the checkboxes
|
38
|
-
*/
|
39
|
-
async getConfigInfo() {
|
40
|
-
const formatOptions = await this._formatOptionsCheckList.getConfigInfo();
|
41
|
-
const csvOptions = await this._csvOptionsCheckList.getConfigInfo();
|
42
|
-
return Object.assign(Object.assign({}, formatOptions), csvOptions);
|
43
|
-
}
|
44
|
-
//--------------------------------------------------------------------------
|
45
|
-
//
|
46
|
-
// Events (public)
|
47
|
-
//
|
48
|
-
//--------------------------------------------------------------------------
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
//
|
51
|
-
// Functions (lifecycle)
|
52
|
-
//
|
53
|
-
//--------------------------------------------------------------------------
|
54
|
-
/**
|
55
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
56
|
-
*
|
57
|
-
* @returns Promise when complete
|
58
|
-
*/
|
59
|
-
async componentWillLoad() {
|
60
|
-
await this._getTranslations();
|
61
|
-
await this._setFormatOptions();
|
62
|
-
}
|
63
|
-
/**
|
64
|
-
* Renders the component.
|
65
|
-
*/
|
66
|
-
render() {
|
67
|
-
return (index.h(index.Host, null, index.h("div", null, index.h("div", { class: "padding-block-end-1" }, index.h("calcite-label", { class: "label-spacing" }, this._translations.availableLabelFormats)), index.h("div", { class: "padding-block-end-1 padding-inline-start-1" }, index.h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._formatOptionsCheckList = el; }, values: this._formatOptions })), index.h("div", { class: "padding-block-end-1" }, index.h("calcite-label", { class: "label-spacing" }, this._translations.csvOptions)), index.h("div", { class: "padding-block-end-1 padding-inline-start-1" }, index.h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._csvOptionsCheckList = el; }, values: [this._translations.csvColumnTitle] })))));
|
68
|
-
}
|
69
|
-
//--------------------------------------------------------------------------
|
70
|
-
//
|
71
|
-
// Functions (protected)
|
72
|
-
//
|
73
|
-
//--------------------------------------------------------------------------
|
74
|
-
/**
|
75
|
-
* Fetch the names of the layers from the map
|
76
|
-
*
|
77
|
-
* @returns Promise when the operation has completed
|
78
|
-
*/
|
79
|
-
async _setFormatOptions() {
|
80
|
-
const s = labelFormats.pdfUtils;
|
81
|
-
const sortedPdfIndo = (s.default || s).sort((a, b) => {
|
82
|
-
const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);
|
83
|
-
const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
|
84
|
-
return _a < _b ? -1 : _a > _b ? 1 : 0;
|
85
|
-
});
|
86
|
-
this._formatOptions = sortedPdfIndo.map(l => {
|
87
|
-
return this._getLabelSizeText(l);
|
88
|
-
});
|
89
|
-
}
|
90
|
-
/**
|
91
|
-
* Gets the formatted pdf export size text
|
92
|
-
*
|
93
|
-
* @param labelInfo current user selected label info
|
94
|
-
*
|
95
|
-
* @returns the pdf label as a string
|
96
|
-
* @protected
|
97
|
-
*/
|
98
|
-
_getLabelSizeText(labelInfo) {
|
99
|
-
const lNum = labelInfo.descriptionPDF.labelsPerPageDisplay;
|
100
|
-
const lSize = `${labelInfo.descriptionPDF.labelWidthDisplay} x ${labelInfo.descriptionPDF.labelHeightDisplay}`;
|
101
|
-
return this._translations.pdfLabel.replace("{{n}}", lNum).replace("{{labelSize}}", lSize);
|
102
|
-
}
|
103
|
-
/**
|
104
|
-
* Fetches the component's translations
|
105
|
-
*
|
106
|
-
* @returns Promise when complete
|
107
|
-
* @protected
|
108
|
-
*/
|
109
|
-
async _getTranslations() {
|
110
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
111
|
-
this._translations = messages[0];
|
112
|
-
}
|
113
|
-
get el() { return index.getElement(this); }
|
114
|
-
};
|
115
|
-
ConfigPdfDownload.style = configPdfDownloadCss;
|
116
|
-
|
117
|
-
exports.config_pdf_download = ConfigPdfDownload;
|