@esri/solutions-components 0.3.2 → 0.3.4
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
@@ -1,212 +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
|
-
const labelFormats = [
|
9
|
-
{
|
10
|
-
descriptionPDF: {
|
11
|
-
labelWidthDisplay: "2-5/8",
|
12
|
-
labelHeightDisplay: "1",
|
13
|
-
labelsPerPageDisplay: "30",
|
14
|
-
averyPartNumber: "*60"
|
15
|
-
},
|
16
|
-
labelSpec: {
|
17
|
-
type: "AVERY",
|
18
|
-
pageDimensions: {
|
19
|
-
width: 8.5,
|
20
|
-
height: 11,
|
21
|
-
leftMargin: 0.1875,
|
22
|
-
rightMargin: 0.1875,
|
23
|
-
topMargin: 0.5,
|
24
|
-
bottomMargin: 0.5
|
25
|
-
},
|
26
|
-
numLabelsAcross: 3,
|
27
|
-
numLabelsDown: 10,
|
28
|
-
labelWidth: 2.625,
|
29
|
-
labelHeight: 1,
|
30
|
-
horizGapIn: 0.125,
|
31
|
-
vertGapIn: 0,
|
32
|
-
labelPadding: 0.1,
|
33
|
-
fontSizePx: 11,
|
34
|
-
maxNumLabelLines: 4
|
35
|
-
}
|
36
|
-
},
|
37
|
-
{
|
38
|
-
descriptionPDF: {
|
39
|
-
labelWidthDisplay: "4",
|
40
|
-
labelHeightDisplay: "1",
|
41
|
-
labelsPerPageDisplay: "20",
|
42
|
-
averyPartNumber: "*61"
|
43
|
-
},
|
44
|
-
labelSpec: {
|
45
|
-
type: "AVERY",
|
46
|
-
pageDimensions: {
|
47
|
-
width: 8.5,
|
48
|
-
height: 11,
|
49
|
-
leftMargin: 0.15625,
|
50
|
-
rightMargin: 0.15625,
|
51
|
-
topMargin: 0.47637821,
|
52
|
-
bottomMargin: 0.5
|
53
|
-
},
|
54
|
-
numLabelsAcross: 2,
|
55
|
-
numLabelsDown: 10,
|
56
|
-
labelWidth: 4,
|
57
|
-
labelHeight: 1.0025,
|
58
|
-
horizGapIn: 0.1875,
|
59
|
-
vertGapIn: 0,
|
60
|
-
labelPadding: 0.1,
|
61
|
-
fontSizePx: 11,
|
62
|
-
maxNumLabelLines: 4
|
63
|
-
}
|
64
|
-
},
|
65
|
-
{
|
66
|
-
descriptionPDF: {
|
67
|
-
labelWidthDisplay: "4",
|
68
|
-
labelHeightDisplay: "1-1/3",
|
69
|
-
labelsPerPageDisplay: "14",
|
70
|
-
averyPartNumber: "*62"
|
71
|
-
},
|
72
|
-
labelSpec: {
|
73
|
-
type: "AVERY",
|
74
|
-
pageDimensions: {
|
75
|
-
width: 8.5,
|
76
|
-
height: 11,
|
77
|
-
leftMargin: 0.15625,
|
78
|
-
rightMargin: 0.15625,
|
79
|
-
topMargin: 0.81889808,
|
80
|
-
bottomMargin: 0.83464612
|
81
|
-
},
|
82
|
-
numLabelsAcross: 2,
|
83
|
-
numLabelsDown: 7,
|
84
|
-
labelWidth: 4,
|
85
|
-
labelHeight: 1.3352,
|
86
|
-
horizGapIn: 0.1875,
|
87
|
-
vertGapIn: 0,
|
88
|
-
labelPadding: 0.1,
|
89
|
-
fontSizePx: 11,
|
90
|
-
maxNumLabelLines: 6
|
91
|
-
}
|
92
|
-
},
|
93
|
-
{
|
94
|
-
descriptionPDF: {
|
95
|
-
labelWidthDisplay: "4",
|
96
|
-
labelHeightDisplay: "2",
|
97
|
-
labelsPerPageDisplay: "10",
|
98
|
-
averyPartNumber: "*63"
|
99
|
-
},
|
100
|
-
labelSpec: {
|
101
|
-
type: "AVERY",
|
102
|
-
pageDimensions: {
|
103
|
-
width: 8.5,
|
104
|
-
height: 11,
|
105
|
-
leftMargin: 0.15625,
|
106
|
-
rightMargin: 0.15625,
|
107
|
-
topMargin: 0.5,
|
108
|
-
bottomMargin: 0.5
|
109
|
-
},
|
110
|
-
numLabelsAcross: 2,
|
111
|
-
numLabelsDown: 5,
|
112
|
-
labelWidth: 4,
|
113
|
-
labelHeight: 2,
|
114
|
-
horizGapIn: 0.1875,
|
115
|
-
vertGapIn: 0,
|
116
|
-
labelPadding: 0.1,
|
117
|
-
fontSizePx: 12,
|
118
|
-
maxNumLabelLines: 10
|
119
|
-
}
|
120
|
-
},
|
121
|
-
{
|
122
|
-
descriptionPDF: {
|
123
|
-
labelWidthDisplay: "4",
|
124
|
-
labelHeightDisplay: "3-1/3",
|
125
|
-
labelsPerPageDisplay: "6",
|
126
|
-
averyPartNumber: "*64"
|
127
|
-
},
|
128
|
-
labelSpec: {
|
129
|
-
type: "AVERY",
|
130
|
-
pageDimensions: {
|
131
|
-
width: 8.5,
|
132
|
-
height: 11,
|
133
|
-
leftMargin: 0.15625,
|
134
|
-
rightMargin: 0.15625,
|
135
|
-
topMargin: 0.4724412,
|
136
|
-
bottomMargin: 0.50000027
|
137
|
-
},
|
138
|
-
numLabelsAcross: 2,
|
139
|
-
numLabelsDown: 3,
|
140
|
-
labelWidth: 4,
|
141
|
-
labelHeight: 3.342,
|
142
|
-
horizGapIn: 0.1875,
|
143
|
-
vertGapIn: 0,
|
144
|
-
labelPadding: 0.1,
|
145
|
-
fontSizePx: 14,
|
146
|
-
maxNumLabelLines: 12
|
147
|
-
}
|
148
|
-
},
|
149
|
-
{
|
150
|
-
descriptionPDF: {
|
151
|
-
labelWidthDisplay: "1-3/4",
|
152
|
-
labelHeightDisplay: "1/2",
|
153
|
-
labelsPerPageDisplay: "80",
|
154
|
-
averyPartNumber: "*67"
|
155
|
-
},
|
156
|
-
labelSpec: {
|
157
|
-
type: "AVERY",
|
158
|
-
pageDimensions: {
|
159
|
-
width: 8.5,
|
160
|
-
height: 11,
|
161
|
-
leftMargin: 0.307086375,
|
162
|
-
rightMargin: 0.307086375,
|
163
|
-
topMargin: 0.4724412,
|
164
|
-
bottomMargin: 0.49606326
|
165
|
-
},
|
166
|
-
numLabelsAcross: 4,
|
167
|
-
numLabelsDown: 20,
|
168
|
-
labelWidth: 1.75,
|
169
|
-
labelHeight: 0.50155,
|
170
|
-
horizGapIn: 0.29527575,
|
171
|
-
vertGapIn: 0,
|
172
|
-
labelPadding: 0.1,
|
173
|
-
fontSizePx: 8,
|
174
|
-
maxNumLabelLines: 3
|
175
|
-
}
|
176
|
-
},
|
177
|
-
{
|
178
|
-
descriptionPDF: {
|
179
|
-
labelWidthDisplay: "1-3/4",
|
180
|
-
labelHeightDisplay: "2/3",
|
181
|
-
labelsPerPageDisplay: "60",
|
182
|
-
averyPartNumber: "*95"
|
183
|
-
},
|
184
|
-
labelSpec: {
|
185
|
-
type: "AVERY",
|
186
|
-
pageDimensions: {
|
187
|
-
width: 8.5,
|
188
|
-
height: 11,
|
189
|
-
leftMargin: 0.28936983,
|
190
|
-
rightMargin: 0.28936983,
|
191
|
-
topMargin: 0.53937037,
|
192
|
-
bottomMargin: 0.5511814
|
193
|
-
},
|
194
|
-
numLabelsAcross: 4,
|
195
|
-
numLabelsDown: 15,
|
196
|
-
labelWidth: 1.75,
|
197
|
-
labelHeight: 0.6605,
|
198
|
-
horizGapIn: 0.30708678,
|
199
|
-
vertGapIn: 0,
|
200
|
-
labelPadding: 0.1,
|
201
|
-
fontSizePx: 8,
|
202
|
-
maxNumLabelLines: 4
|
203
|
-
}
|
204
|
-
}
|
205
|
-
];
|
206
|
-
|
207
|
-
const pdfUtils = /*#__PURE__*/Object.freeze({
|
208
|
-
__proto__: null,
|
209
|
-
'default': labelFormats
|
210
|
-
});
|
211
|
-
|
212
|
-
exports.pdfUtils = pdfUtils;
|
@@ -1,179 +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
|
-
/** @license
|
7
|
-
* Copyright 2022 Esri
|
8
|
-
*
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
-
* you may not use this file except in compliance with the License.
|
11
|
-
* You may obtain a copy of the License at
|
12
|
-
*
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
*
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
-
* See the License for the specific language governing permissions and
|
19
|
-
* limitations under the License.
|
20
|
-
*/
|
21
|
-
import { Host, h } from '@stencil/core';
|
22
|
-
export class CheckList {
|
23
|
-
constructor() {
|
24
|
-
//--------------------------------------------------------------------------
|
25
|
-
//
|
26
|
-
// State (internal)
|
27
|
-
//
|
28
|
-
//--------------------------------------------------------------------------
|
29
|
-
//--------------------------------------------------------------------------
|
30
|
-
//
|
31
|
-
// Properties (protected)
|
32
|
-
//
|
33
|
-
//--------------------------------------------------------------------------
|
34
|
-
/**
|
35
|
-
* A list of all checkbox elements for this component
|
36
|
-
*
|
37
|
-
* @protected
|
38
|
-
*/
|
39
|
-
this._elements = [];
|
40
|
-
this.defaultChecked = true;
|
41
|
-
this.values = undefined;
|
42
|
-
}
|
43
|
-
//--------------------------------------------------------------------------
|
44
|
-
//
|
45
|
-
// Watch handlers
|
46
|
-
//
|
47
|
-
//--------------------------------------------------------------------------
|
48
|
-
//--------------------------------------------------------------------------
|
49
|
-
//
|
50
|
-
// Methods (public)
|
51
|
-
//
|
52
|
-
//--------------------------------------------------------------------------
|
53
|
-
/**
|
54
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
55
|
-
*
|
56
|
-
* @returns Promise with the state of the checkboxes
|
57
|
-
*/
|
58
|
-
async getConfigInfo() {
|
59
|
-
return this._elements.reduce((prev, cur) => {
|
60
|
-
prev[cur.value] = cur.checked;
|
61
|
-
return prev;
|
62
|
-
}, {});
|
63
|
-
}
|
64
|
-
//--------------------------------------------------------------------------
|
65
|
-
//
|
66
|
-
// Events (public)
|
67
|
-
//
|
68
|
-
//--------------------------------------------------------------------------
|
69
|
-
//--------------------------------------------------------------------------
|
70
|
-
//
|
71
|
-
// Functions (lifecycle)
|
72
|
-
//
|
73
|
-
//--------------------------------------------------------------------------
|
74
|
-
/**
|
75
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
76
|
-
*/
|
77
|
-
async componentDidLoad() {
|
78
|
-
if (this.defaultChecked) {
|
79
|
-
this._elements.forEach(el => {
|
80
|
-
el.checked = true;
|
81
|
-
});
|
82
|
-
}
|
83
|
-
}
|
84
|
-
/**
|
85
|
-
* Renders the component.
|
86
|
-
*/
|
87
|
-
render() {
|
88
|
-
return (h(Host, null, h("div", null, this._renderCheckboxes(this.values))));
|
89
|
-
}
|
90
|
-
//--------------------------------------------------------------------------
|
91
|
-
//
|
92
|
-
// Functions (protected)
|
93
|
-
//
|
94
|
-
//--------------------------------------------------------------------------
|
95
|
-
/**
|
96
|
-
* Render a checkbox with a label for each of the types listed in the NLS
|
97
|
-
*
|
98
|
-
* @returns Array of label/checkbox input nodes
|
99
|
-
* @protected
|
100
|
-
*/
|
101
|
-
_renderCheckboxes(values) {
|
102
|
-
return values.map(v => {
|
103
|
-
return (h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { ref: (el) => this._elements.push(el), value: v }), v));
|
104
|
-
});
|
105
|
-
}
|
106
|
-
static get is() { return "check-list"; }
|
107
|
-
static get encapsulation() { return "shadow"; }
|
108
|
-
static get originalStyleUrls() {
|
109
|
-
return {
|
110
|
-
"$": ["check-list.css"]
|
111
|
-
};
|
112
|
-
}
|
113
|
-
static get styleUrls() {
|
114
|
-
return {
|
115
|
-
"$": ["check-list.css"]
|
116
|
-
};
|
117
|
-
}
|
118
|
-
static get properties() {
|
119
|
-
return {
|
120
|
-
"defaultChecked": {
|
121
|
-
"type": "boolean",
|
122
|
-
"mutable": false,
|
123
|
-
"complexType": {
|
124
|
-
"original": "boolean",
|
125
|
-
"resolved": "boolean",
|
126
|
-
"references": {}
|
127
|
-
},
|
128
|
-
"required": false,
|
129
|
-
"optional": false,
|
130
|
-
"docs": {
|
131
|
-
"tags": [],
|
132
|
-
"text": "boolean: All checkboxes checked state will be set with this value on first render.\r\nDefault is true"
|
133
|
-
},
|
134
|
-
"attribute": "default-checked",
|
135
|
-
"reflect": true,
|
136
|
-
"defaultValue": "true"
|
137
|
-
},
|
138
|
-
"values": {
|
139
|
-
"type": "unknown",
|
140
|
-
"mutable": false,
|
141
|
-
"complexType": {
|
142
|
-
"original": "string[]",
|
143
|
-
"resolved": "string[]",
|
144
|
-
"references": {}
|
145
|
-
},
|
146
|
-
"required": false,
|
147
|
-
"optional": false,
|
148
|
-
"docs": {
|
149
|
-
"tags": [],
|
150
|
-
"text": "string []: The values to render beside the checkboxes"
|
151
|
-
}
|
152
|
-
}
|
153
|
-
};
|
154
|
-
}
|
155
|
-
static get methods() {
|
156
|
-
return {
|
157
|
-
"getConfigInfo": {
|
158
|
-
"complexType": {
|
159
|
-
"signature": "() => Promise<{ [key: string]: boolean; }>",
|
160
|
-
"parameters": [],
|
161
|
-
"references": {
|
162
|
-
"Promise": {
|
163
|
-
"location": "global"
|
164
|
-
}
|
165
|
-
},
|
166
|
-
"return": "Promise<{ [key: string]: boolean; }>"
|
167
|
-
},
|
168
|
-
"docs": {
|
169
|
-
"text": "Returns a key/value pair that represents the checkbox value and checked state",
|
170
|
-
"tags": [{
|
171
|
-
"name": "returns",
|
172
|
-
"text": "Promise with the state of the checkboxes"
|
173
|
-
}]
|
174
|
-
}
|
175
|
-
}
|
176
|
-
};
|
177
|
-
}
|
178
|
-
static get elementRef() { return "el"; }
|
179
|
-
}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
:host {
|
2
|
-
display: block;
|
3
|
-
}
|
4
|
-
|
5
|
-
.horizontal-display {
|
6
|
-
display: flex;
|
7
|
-
}
|
8
|
-
|
9
|
-
.label-spacing {
|
10
|
-
--calcite-label-margin-bottom: 0;
|
11
|
-
}
|
12
|
-
|
13
|
-
.padding-inline-end-1 {
|
14
|
-
-webkit-padding-end: 1rem;
|
15
|
-
padding-inline-end: 1rem;
|
16
|
-
}
|
17
|
-
|
18
|
-
.padding-inline-start-1 {
|
19
|
-
-webkit-padding-start: 1rem;
|
20
|
-
padding-inline-start: 1rem;
|
21
|
-
}
|
22
|
-
|
23
|
-
.padding-block-end-1 {
|
24
|
-
-webkit-padding-after: 1rem;
|
25
|
-
padding-block-end: 1rem;
|
26
|
-
}
|
27
|
-
|
28
|
-
.width-half {
|
29
|
-
width: 50%;
|
30
|
-
}
|
31
|
-
|
32
|
-
.width-full {
|
33
|
-
width: 100%;
|
34
|
-
}
|
@@ -1,209 +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
|
-
/** @license
|
7
|
-
* Copyright 2022 Esri
|
8
|
-
*
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
-
* you may not use this file except in compliance with the License.
|
11
|
-
* You may obtain a copy of the License at
|
12
|
-
*
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
*
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
-
* See the License for the specific language governing permissions and
|
19
|
-
* limitations under the License.
|
20
|
-
*/
|
21
|
-
import { Host, h } from '@stencil/core';
|
22
|
-
import { getLocaleComponentStrings } from "../../utils/locale";
|
23
|
-
export class ConfigBufferTools {
|
24
|
-
constructor() {
|
25
|
-
this.distance = 100;
|
26
|
-
this.unit = "Meters";
|
27
|
-
this._showBufferChecked = true;
|
28
|
-
this._translations = undefined;
|
29
|
-
}
|
30
|
-
//--------------------------------------------------------------------------
|
31
|
-
//
|
32
|
-
// Watch handlers
|
33
|
-
//
|
34
|
-
//--------------------------------------------------------------------------
|
35
|
-
//--------------------------------------------------------------------------
|
36
|
-
//
|
37
|
-
// Methods (public)
|
38
|
-
//
|
39
|
-
//--------------------------------------------------------------------------
|
40
|
-
/**
|
41
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
42
|
-
*
|
43
|
-
* @returns Promise with the state of the checkboxes
|
44
|
-
*/
|
45
|
-
async getConfigInfo() {
|
46
|
-
return {
|
47
|
-
"distance": this.distance,
|
48
|
-
"unit": this.unit
|
49
|
-
};
|
50
|
-
}
|
51
|
-
//--------------------------------------------------------------------------
|
52
|
-
//
|
53
|
-
// Events (public)
|
54
|
-
//
|
55
|
-
//--------------------------------------------------------------------------
|
56
|
-
//--------------------------------------------------------------------------
|
57
|
-
//
|
58
|
-
// Functions (lifecycle)
|
59
|
-
//
|
60
|
-
//--------------------------------------------------------------------------
|
61
|
-
/**
|
62
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
63
|
-
*
|
64
|
-
* @returns Promise when complete
|
65
|
-
*/
|
66
|
-
async componentWillLoad() {
|
67
|
-
await this._getTranslations();
|
68
|
-
}
|
69
|
-
/**
|
70
|
-
* Renders the component.
|
71
|
-
*/
|
72
|
-
render() {
|
73
|
-
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()))))));
|
74
|
-
}
|
75
|
-
//--------------------------------------------------------------------------
|
76
|
-
//
|
77
|
-
// Functions (protected)
|
78
|
-
//
|
79
|
-
//--------------------------------------------------------------------------
|
80
|
-
/**
|
81
|
-
* Store the user defined distance
|
82
|
-
*
|
83
|
-
* @protected
|
84
|
-
*/
|
85
|
-
_distanceChanged(evt) {
|
86
|
-
this.distance = evt.detail.value;
|
87
|
-
}
|
88
|
-
/**
|
89
|
-
* Store the user defined unit
|
90
|
-
*
|
91
|
-
* @protected
|
92
|
-
*/
|
93
|
-
_unitSelectionChange(evt) {
|
94
|
-
this.unit = evt.target.value;
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
* Render the various unit options
|
98
|
-
*
|
99
|
-
* @returns Promise when complete
|
100
|
-
* @protected
|
101
|
-
*/
|
102
|
-
_renderUnitOptions() {
|
103
|
-
const nlsUnits = this._translations.units || {};
|
104
|
-
const units = Object.keys(nlsUnits).map(k => nlsUnits[k]);
|
105
|
-
return units.map(unit => {
|
106
|
-
return (h("calcite-option", { label: unit, selected: unit === this.unit, value: unit }));
|
107
|
-
});
|
108
|
-
}
|
109
|
-
/**
|
110
|
-
* When not checked the buffer options will be disabled in the config and not visible in the UI at runtime
|
111
|
-
*
|
112
|
-
* @protected
|
113
|
-
*/
|
114
|
-
_setShowBufferChecked() {
|
115
|
-
this._showBufferChecked = this._showBufferElement.checked;
|
116
|
-
}
|
117
|
-
/**
|
118
|
-
* Fetches the component's translations
|
119
|
-
*
|
120
|
-
* @returns Promise when complete
|
121
|
-
* @protected
|
122
|
-
*/
|
123
|
-
async _getTranslations() {
|
124
|
-
const messages = await getLocaleComponentStrings(this.el);
|
125
|
-
this._translations = messages[0];
|
126
|
-
}
|
127
|
-
static get is() { return "config-buffer-tools"; }
|
128
|
-
static get encapsulation() { return "shadow"; }
|
129
|
-
static get originalStyleUrls() {
|
130
|
-
return {
|
131
|
-
"$": ["config-buffer-tools.css"]
|
132
|
-
};
|
133
|
-
}
|
134
|
-
static get styleUrls() {
|
135
|
-
return {
|
136
|
-
"$": ["config-buffer-tools.css"]
|
137
|
-
};
|
138
|
-
}
|
139
|
-
static get properties() {
|
140
|
-
return {
|
141
|
-
"distance": {
|
142
|
-
"type": "number",
|
143
|
-
"mutable": true,
|
144
|
-
"complexType": {
|
145
|
-
"original": "number",
|
146
|
-
"resolved": "number",
|
147
|
-
"references": {}
|
148
|
-
},
|
149
|
-
"required": false,
|
150
|
-
"optional": false,
|
151
|
-
"docs": {
|
152
|
-
"tags": [],
|
153
|
-
"text": "number: Default distance value."
|
154
|
-
},
|
155
|
-
"attribute": "distance",
|
156
|
-
"reflect": true,
|
157
|
-
"defaultValue": "100"
|
158
|
-
},
|
159
|
-
"unit": {
|
160
|
-
"type": "string",
|
161
|
-
"mutable": true,
|
162
|
-
"complexType": {
|
163
|
-
"original": "string",
|
164
|
-
"resolved": "string",
|
165
|
-
"references": {}
|
166
|
-
},
|
167
|
-
"required": false,
|
168
|
-
"optional": false,
|
169
|
-
"docs": {
|
170
|
-
"tags": [],
|
171
|
-
"text": "string: Default unit value.\r\nShould be a unit listed in assets/t9n/config-buffer-tools/resources"
|
172
|
-
},
|
173
|
-
"attribute": "unit",
|
174
|
-
"reflect": true,
|
175
|
-
"defaultValue": "\"Meters\""
|
176
|
-
}
|
177
|
-
};
|
178
|
-
}
|
179
|
-
static get states() {
|
180
|
-
return {
|
181
|
-
"_showBufferChecked": {},
|
182
|
-
"_translations": {}
|
183
|
-
};
|
184
|
-
}
|
185
|
-
static get methods() {
|
186
|
-
return {
|
187
|
-
"getConfigInfo": {
|
188
|
-
"complexType": {
|
189
|
-
"signature": "() => Promise<{ [key: string]: string | number; }>",
|
190
|
-
"parameters": [],
|
191
|
-
"references": {
|
192
|
-
"Promise": {
|
193
|
-
"location": "global"
|
194
|
-
}
|
195
|
-
},
|
196
|
-
"return": "Promise<{ [key: string]: string | number; }>"
|
197
|
-
},
|
198
|
-
"docs": {
|
199
|
-
"text": "Returns a key/value pair that represents the checkbox value and checked state",
|
200
|
-
"tags": [{
|
201
|
-
"name": "returns",
|
202
|
-
"text": "Promise with the state of the checkboxes"
|
203
|
-
}]
|
204
|
-
}
|
205
|
-
}
|
206
|
-
};
|
207
|
-
}
|
208
|
-
static get elementRef() { return "el"; }
|
209
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
:host {
|
2
|
-
display: block;
|
3
|
-
}
|
4
|
-
|
5
|
-
.label-spacing {
|
6
|
-
--calcite-label-margin-bottom: 0;
|
7
|
-
}
|
8
|
-
|
9
|
-
.padding-block-end-1 {
|
10
|
-
-webkit-padding-after: 1rem;
|
11
|
-
padding-block-end: 1rem;
|
12
|
-
}
|
13
|
-
|
14
|
-
.padding-inline-start-1 {
|
15
|
-
-webkit-padding-start: 1rem;
|
16
|
-
padding-inline-start: 1rem;
|
17
|
-
}
|