@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.
Files changed (163) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +4 -1
  2. package/dist/assets/t9n/public-notification/resources_en.json +4 -1
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
  4. package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
  5. package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
  6. package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-search.cjs.entry.js +46 -7
  10. package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
  11. package/dist/cjs/public-notification.cjs.entry.js +101 -18
  12. package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +0 -5
  15. package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
  16. package/dist/collection/components/layer-table/layer-table.js +1 -1
  17. package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
  18. package/dist/collection/components/map-search/map-search.js +66 -7
  19. package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
  20. package/dist/collection/components/pdf-download/pdf-download.js +32 -8
  21. package/dist/collection/components/public-notification/public-notification.css +46 -41
  22. package/dist/collection/components/public-notification/public-notification.js +267 -19
  23. package/dist/collection/components/refine-selection/refine-selection.js +18 -1
  24. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
  25. package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
  26. package/dist/collection/demos/index.html +0 -24
  27. package/dist/collection/demos/map-draw-tools.html +17 -17
  28. package/dist/collection/demos/map-layer-picker.html +2 -0
  29. package/dist/collection/demos/map-search.html +16 -15
  30. package/dist/collection/demos/map-select-tools.html +16 -24
  31. package/dist/collection/demos/new-public-notification.html +46 -35
  32. package/dist/collection/demos/pdf-download.html +8 -1
  33. package/dist/collection/utils/csvUtils.js +4 -4
  34. package/dist/collection/utils/csvUtils.ts +6 -4
  35. package/dist/collection/utils/interfaces.ts +65 -1
  36. package/dist/collection/utils/mapViewUtils.js +36 -22
  37. package/dist/collection/utils/mapViewUtils.ts +50 -27
  38. package/dist/collection/utils/publicNotificationStore.js +3 -1
  39. package/dist/collection/utils/publicNotificationStore.ts +3 -1
  40. package/dist/collection/utils/queryUtils.js +2 -2
  41. package/dist/collection/utils/queryUtils.ts +2 -2
  42. package/dist/components/buffer-tools2.js +1 -1
  43. package/dist/components/csvUtils.js +4 -4
  44. package/dist/components/index.d.ts +0 -5
  45. package/dist/components/index.js +0 -5
  46. package/dist/components/layer-table.js +2 -3
  47. package/dist/components/map-layer-picker2.js +177 -28
  48. package/dist/components/map-search.js +47 -7
  49. package/dist/components/map-select-tools2.js +56 -11
  50. package/dist/components/pdf-download2.js +217 -8
  51. package/dist/components/public-notification.js +154 -55
  52. package/dist/components/publicNotificationStore.js +3 -1
  53. package/dist/components/queryUtils.js +3 -3
  54. package/dist/components/refine-selection-tools2.js +9 -8
  55. package/dist/components/refine-selection2.js +3 -1
  56. package/dist/esm/buffer-tools_6.entry.js +8 -7
  57. package/dist/esm/calcite-combobox_3.entry.js +38 -25
  58. package/dist/esm/calcite-input-message_5.entry.js +271 -20
  59. package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
  60. package/dist/esm/layer-table.entry.js +3 -3
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/map-search.entry.js +46 -7
  63. package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
  64. package/dist/esm/public-notification.entry.js +101 -18
  65. package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
  66. package/dist/esm/solutions-components.js +1 -1
  67. package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
  68. package/dist/solutions-components/demos/index.html +0 -24
  69. package/dist/solutions-components/demos/map-draw-tools.html +17 -17
  70. package/dist/solutions-components/demos/map-layer-picker.html +2 -0
  71. package/dist/solutions-components/demos/map-search.html +16 -15
  72. package/dist/solutions-components/demos/map-select-tools.html +16 -24
  73. package/dist/solutions-components/demos/new-public-notification.html +46 -35
  74. package/dist/solutions-components/demos/pdf-download.html +8 -1
  75. package/dist/solutions-components/p-07593958.entry.js +6 -0
  76. package/dist/solutions-components/p-3fa9b3c8.js +36 -0
  77. package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
  78. package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
  79. package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
  80. package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
  81. package/dist/solutions-components/p-bfa95147.entry.js +17 -0
  82. package/dist/solutions-components/p-d09a168c.entry.js +6 -0
  83. package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
  84. package/dist/solutions-components/solutions-components.esm.js +1 -1
  85. package/dist/solutions-components/utils/csvUtils.ts +6 -4
  86. package/dist/solutions-components/utils/interfaces.ts +65 -1
  87. package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
  88. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
  89. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  90. package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
  91. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
  92. package/dist/types/components/map-search/map-search.d.ts +18 -1
  93. package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
  94. package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
  95. package/dist/types/components/public-notification/public-notification.d.ts +98 -4
  96. package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
  97. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
  98. package/dist/types/components.d.ts +154 -180
  99. package/dist/types/preact.d.ts +0 -10
  100. package/dist/types/utils/csvUtils.d.ts +1 -1
  101. package/dist/types/utils/interfaces.d.ts +56 -1
  102. package/dist/types/utils/mapViewUtils.d.ts +19 -9
  103. package/dist/types/utils/publicNotificationStore.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/dist/cjs/check-list.cjs.entry.js +0 -103
  106. package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
  107. package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
  108. package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
  109. package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
  110. package/dist/cjs/labelFormats-3236d2e0.js +0 -212
  111. package/dist/collection/components/check-list/check-list.css +0 -3
  112. package/dist/collection/components/check-list/check-list.js +0 -179
  113. package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
  114. package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
  115. package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
  116. package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
  117. package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
  118. package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
  119. package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
  120. package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
  121. package/dist/collection/demos/check-list.html +0 -65
  122. package/dist/collection/demos/config-buffer-tools.html +0 -92
  123. package/dist/collection/demos/config-draw-tools.html +0 -58
  124. package/dist/collection/demos/config-layer-picker.html +0 -97
  125. package/dist/components/check-list.d.ts +0 -11
  126. package/dist/components/check-list.js +0 -11
  127. package/dist/components/check-list2.js +0 -131
  128. package/dist/components/config-buffer-tools.d.ts +0 -11
  129. package/dist/components/config-buffer-tools.js +0 -187
  130. package/dist/components/config-draw-tools.d.ts +0 -11
  131. package/dist/components/config-draw-tools.js +0 -121
  132. package/dist/components/config-layer-picker.d.ts +0 -11
  133. package/dist/components/config-layer-picker.js +0 -163
  134. package/dist/components/config-pdf-download.d.ts +0 -11
  135. package/dist/components/config-pdf-download.js +0 -154
  136. package/dist/components/labelFormats.js +0 -210
  137. package/dist/components/mapViewUtils.js +0 -129
  138. package/dist/esm/check-list.entry.js +0 -99
  139. package/dist/esm/config-buffer-tools.entry.js +0 -121
  140. package/dist/esm/config-draw-tools.entry.js +0 -81
  141. package/dist/esm/config-layer-picker.entry.js +0 -109
  142. package/dist/esm/config-pdf-download.entry.js +0 -113
  143. package/dist/esm/labelFormats-b37958c3.js +0 -210
  144. package/dist/solutions-components/demos/check-list.html +0 -65
  145. package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
  146. package/dist/solutions-components/demos/config-draw-tools.html +0 -58
  147. package/dist/solutions-components/demos/config-layer-picker.html +0 -97
  148. package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
  149. package/dist/solutions-components/p-35078393.entry.js +0 -17
  150. package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
  151. package/dist/solutions-components/p-3e444242.entry.js +0 -6
  152. package/dist/solutions-components/p-67afea92.entry.js +0 -12
  153. package/dist/solutions-components/p-7dcab29d.js +0 -36
  154. package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
  155. package/dist/solutions-components/p-906b7b96.entry.js +0 -6
  156. package/dist/solutions-components/p-99c98510.entry.js +0 -6
  157. package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
  158. package/dist/solutions-components/p-e99b1247.js +0 -6
  159. package/dist/types/components/check-list/check-list.d.ts +0 -57
  160. package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
  161. package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
  162. package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
  163. package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -1,210 +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
- const labelFormats = [
7
- {
8
- descriptionPDF: {
9
- labelWidthDisplay: "2-5/8",
10
- labelHeightDisplay: "1",
11
- labelsPerPageDisplay: "30",
12
- averyPartNumber: "*60"
13
- },
14
- labelSpec: {
15
- type: "AVERY",
16
- pageDimensions: {
17
- width: 8.5,
18
- height: 11,
19
- leftMargin: 0.1875,
20
- rightMargin: 0.1875,
21
- topMargin: 0.5,
22
- bottomMargin: 0.5
23
- },
24
- numLabelsAcross: 3,
25
- numLabelsDown: 10,
26
- labelWidth: 2.625,
27
- labelHeight: 1,
28
- horizGapIn: 0.125,
29
- vertGapIn: 0,
30
- labelPadding: 0.1,
31
- fontSizePx: 11,
32
- maxNumLabelLines: 4
33
- }
34
- },
35
- {
36
- descriptionPDF: {
37
- labelWidthDisplay: "4",
38
- labelHeightDisplay: "1",
39
- labelsPerPageDisplay: "20",
40
- averyPartNumber: "*61"
41
- },
42
- labelSpec: {
43
- type: "AVERY",
44
- pageDimensions: {
45
- width: 8.5,
46
- height: 11,
47
- leftMargin: 0.15625,
48
- rightMargin: 0.15625,
49
- topMargin: 0.47637821,
50
- bottomMargin: 0.5
51
- },
52
- numLabelsAcross: 2,
53
- numLabelsDown: 10,
54
- labelWidth: 4,
55
- labelHeight: 1.0025,
56
- horizGapIn: 0.1875,
57
- vertGapIn: 0,
58
- labelPadding: 0.1,
59
- fontSizePx: 11,
60
- maxNumLabelLines: 4
61
- }
62
- },
63
- {
64
- descriptionPDF: {
65
- labelWidthDisplay: "4",
66
- labelHeightDisplay: "1-1/3",
67
- labelsPerPageDisplay: "14",
68
- averyPartNumber: "*62"
69
- },
70
- labelSpec: {
71
- type: "AVERY",
72
- pageDimensions: {
73
- width: 8.5,
74
- height: 11,
75
- leftMargin: 0.15625,
76
- rightMargin: 0.15625,
77
- topMargin: 0.81889808,
78
- bottomMargin: 0.83464612
79
- },
80
- numLabelsAcross: 2,
81
- numLabelsDown: 7,
82
- labelWidth: 4,
83
- labelHeight: 1.3352,
84
- horizGapIn: 0.1875,
85
- vertGapIn: 0,
86
- labelPadding: 0.1,
87
- fontSizePx: 11,
88
- maxNumLabelLines: 6
89
- }
90
- },
91
- {
92
- descriptionPDF: {
93
- labelWidthDisplay: "4",
94
- labelHeightDisplay: "2",
95
- labelsPerPageDisplay: "10",
96
- averyPartNumber: "*63"
97
- },
98
- labelSpec: {
99
- type: "AVERY",
100
- pageDimensions: {
101
- width: 8.5,
102
- height: 11,
103
- leftMargin: 0.15625,
104
- rightMargin: 0.15625,
105
- topMargin: 0.5,
106
- bottomMargin: 0.5
107
- },
108
- numLabelsAcross: 2,
109
- numLabelsDown: 5,
110
- labelWidth: 4,
111
- labelHeight: 2,
112
- horizGapIn: 0.1875,
113
- vertGapIn: 0,
114
- labelPadding: 0.1,
115
- fontSizePx: 12,
116
- maxNumLabelLines: 10
117
- }
118
- },
119
- {
120
- descriptionPDF: {
121
- labelWidthDisplay: "4",
122
- labelHeightDisplay: "3-1/3",
123
- labelsPerPageDisplay: "6",
124
- averyPartNumber: "*64"
125
- },
126
- labelSpec: {
127
- type: "AVERY",
128
- pageDimensions: {
129
- width: 8.5,
130
- height: 11,
131
- leftMargin: 0.15625,
132
- rightMargin: 0.15625,
133
- topMargin: 0.4724412,
134
- bottomMargin: 0.50000027
135
- },
136
- numLabelsAcross: 2,
137
- numLabelsDown: 3,
138
- labelWidth: 4,
139
- labelHeight: 3.342,
140
- horizGapIn: 0.1875,
141
- vertGapIn: 0,
142
- labelPadding: 0.1,
143
- fontSizePx: 14,
144
- maxNumLabelLines: 12
145
- }
146
- },
147
- {
148
- descriptionPDF: {
149
- labelWidthDisplay: "1-3/4",
150
- labelHeightDisplay: "1/2",
151
- labelsPerPageDisplay: "80",
152
- averyPartNumber: "*67"
153
- },
154
- labelSpec: {
155
- type: "AVERY",
156
- pageDimensions: {
157
- width: 8.5,
158
- height: 11,
159
- leftMargin: 0.307086375,
160
- rightMargin: 0.307086375,
161
- topMargin: 0.4724412,
162
- bottomMargin: 0.49606326
163
- },
164
- numLabelsAcross: 4,
165
- numLabelsDown: 20,
166
- labelWidth: 1.75,
167
- labelHeight: 0.50155,
168
- horizGapIn: 0.29527575,
169
- vertGapIn: 0,
170
- labelPadding: 0.1,
171
- fontSizePx: 8,
172
- maxNumLabelLines: 3
173
- }
174
- },
175
- {
176
- descriptionPDF: {
177
- labelWidthDisplay: "1-3/4",
178
- labelHeightDisplay: "2/3",
179
- labelsPerPageDisplay: "60",
180
- averyPartNumber: "*95"
181
- },
182
- labelSpec: {
183
- type: "AVERY",
184
- pageDimensions: {
185
- width: 8.5,
186
- height: 11,
187
- leftMargin: 0.28936983,
188
- rightMargin: 0.28936983,
189
- topMargin: 0.53937037,
190
- bottomMargin: 0.5511814
191
- },
192
- numLabelsAcross: 4,
193
- numLabelsDown: 15,
194
- labelWidth: 1.75,
195
- labelHeight: 0.6605,
196
- horizGapIn: 0.30708678,
197
- vertGapIn: 0,
198
- labelPadding: 0.1,
199
- fontSizePx: 8,
200
- maxNumLabelLines: 4
201
- }
202
- }
203
- ];
204
-
205
- const pdfUtils = /*#__PURE__*/Object.freeze({
206
- __proto__: null,
207
- 'default': labelFormats
208
- });
209
-
210
- export { pdfUtils as p };
@@ -1,65 +0,0 @@
1
- <html>
2
- <head>
3
- <meta charset="utf-8" />
4
- <meta
5
- name="viewport"
6
- content="initial-scale=1,maximum-scale=1,user-scalable=no"
7
- />
8
- <title>Check List</title>
9
- <!--
10
- | Copyright 2022 Esri
11
- |
12
- | Licensed under the Apache License, Version 2.0 (the "License");
13
- | you may not use this file except in compliance with the License.
14
- | You may obtain a copy of the License at
15
- |
16
- | http://www.apache.org/licenses/LICENSE-2.0
17
- |
18
- | Unless required by applicable law or agreed to in writing, software
19
- | distributed under the License is distributed on an "AS IS" BASIS,
20
- | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- | See the License for the specific language governing permissions and
22
- | limitations under the License.
23
- -->
24
- <style>
25
- .over-map {
26
- position: absolute;
27
- right: 0px;
28
- background-color: var(--calcite-ui-foreground-1);
29
- }
30
- .column {
31
- min-width: 300px;
32
- margin: 1rem;
33
- padding: 1rem;
34
- border: 1px solid;
35
- }
36
- </style>
37
-
38
- <link rel="stylesheet" href="https://unpkg.com/@esri/calcite-components@1.0.0-beta.97/dist/calcite/calcite.css" type="text/css" />
39
- <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
40
- <link rel="stylesheet" href="../solutions-components.css" type="text/css">
41
-
42
- <script type="module" src="https://unpkg.com/@esri/calcite-components@1.0.0-beta.97/dist/calcite/calcite.esm.js"></script>
43
- <script type="module" src="../solutions-components.esm.js"></script>
44
- <script>
45
- function loadList() {
46
- const demo = document.getElementById("demo");
47
- demo.values = ["A", "B", "C"];
48
- }
49
-
50
- function showResults() {
51
- const demo = document.getElementById("demo");
52
- demo?.getConfigInfo().then(configInfo => {
53
- alert(JSON.stringify(configInfo));
54
- });
55
- }
56
- </script>
57
- </head>
58
-
59
- <body onload="loadList()">
60
- <div class="over-map column">
61
- <check-list id="demo"></check-list>
62
- <calcite-button onclick="showResults()">Demo Results</calcite-button>
63
- </div>
64
- </body>
65
- </html>
@@ -1,92 +0,0 @@
1
- <html>
2
- <head>
3
- <meta charset="utf-8" />
4
- <meta
5
- name="viewport"
6
- content="initial-scale=1,maximum-scale=1,user-scalable=no"
7
- />
8
- <title>Config Buffer Tools</title>
9
- <!--
10
- | Copyright 2022 Esri
11
- |
12
- | Licensed under the Apache License, Version 2.0 (the "License");
13
- | you may not use this file except in compliance with the License.
14
- | You may obtain a copy of the License at
15
- |
16
- | http://www.apache.org/licenses/LICENSE-2.0
17
- |
18
- | Unless required by applicable law or agreed to in writing, software
19
- | distributed under the License is distributed on an "AS IS" BASIS,
20
- | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- | See the License for the specific language governing permissions and
22
- | limitations under the License.
23
- -->
24
- <style>
25
- .map-div {
26
- padding: 0;
27
- margin: 0;
28
- height: 100%;
29
- width: 100%;
30
- }
31
- .over-map {
32
- position: absolute;
33
- right: 0px;
34
- background-color: var(--calcite-ui-foreground-1);
35
- }
36
- .column {
37
- min-width: 300px;
38
- margin: 1rem;
39
- padding: 1rem;
40
- border: 1px solid;
41
- }
42
- .padding-block-end-1 {
43
- padding-block-end: 1rem;
44
- }
45
- </style>
46
-
47
- <link
48
- rel="stylesheet"
49
- href="https://js.arcgis.com/4.25/esri/themes/light/main.css"
50
- />
51
- <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
52
- <link rel="stylesheet" href="../solutions-components.css" type="text/css">
53
-
54
- <script src="https://js.arcgis.com/4.25/"></script>
55
- <script type="module" src="../solutions-components.esm.js"></script>
56
- <script>
57
- require(["esri/WebMap", "esri/views/MapView"], (
58
- WebMap,
59
- MapView
60
- ) => {
61
- var webMap = new WebMap({
62
- portalItem: {
63
- id: "6a55f6678208461bb7a26d9e418a00bc"
64
- }
65
- });
66
-
67
- const demo = document.getElementById("demo");
68
- demo.mapView = new MapView({
69
- container: "viewDiv",
70
- map: webMap,
71
- zoom: 5,
72
- center: [-98, 42]
73
- });
74
- });
75
-
76
- function showResults() {
77
- const demo = document.getElementById("demo");
78
- demo?.getConfigInfo().then(configInfo => {
79
- alert(JSON.stringify(configInfo));
80
- });
81
- };
82
- </script>
83
- </head>
84
-
85
- <body>
86
- <div id="viewDiv" class="map-div"></div>
87
- <div class="over-map column">
88
- <config-buffer-tools class="padding-block-end-1" id="demo"></config-buffer-tools>
89
- <calcite-button onclick="showResults()">Demo Results</calcite-button>
90
- </div>
91
- </body>
92
- </html>
@@ -1,58 +0,0 @@
1
- <html>
2
- <head>
3
- <meta charset="utf-8" />
4
- <meta
5
- name="viewport"
6
- content="initial-scale=1,maximum-scale=1,user-scalable=no"
7
- />
8
- <title>Config Draw Tools</title>
9
- <!--
10
- | Copyright 2022 Esri
11
- |
12
- | Licensed under the Apache License, Version 2.0 (the "License");
13
- | you may not use this file except in compliance with the License.
14
- | You may obtain a copy of the License at
15
- |
16
- | http://www.apache.org/licenses/LICENSE-2.0
17
- |
18
- | Unless required by applicable law or agreed to in writing, software
19
- | distributed under the License is distributed on an "AS IS" BASIS,
20
- | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- | See the License for the specific language governing permissions and
22
- | limitations under the License.
23
- -->
24
- <style>
25
- .over-map {
26
- position: absolute;
27
- right: 0px;
28
- background-color: var(--calcite-ui-foreground-1);
29
- }
30
- .column {
31
- min-width: 300px;
32
- margin: 1rem;
33
- padding: 1rem;
34
- border: 1px solid;
35
- }
36
- </style>
37
-
38
- <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
39
- <link rel="stylesheet" href="../solutions-components.css" type="text/css">
40
-
41
- <script type="module" src="../solutions-components.esm.js"></script>
42
- <script>
43
- function showResults() {
44
- const demo = document.getElementById("demo");
45
- demo?.getConfigInfo().then(configInfo => {
46
- alert(JSON.stringify(configInfo));
47
- });
48
- }
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <div class="over-map column">
54
- <config-draw-tools id="demo"></config-draw-tools>
55
- <calcite-button onclick="showResults()">Demo Results</calcite-button>
56
- </div>
57
- </body>
58
- </html>
@@ -1,97 +0,0 @@
1
- <html>
2
- <head>
3
- <meta charset="utf-8" />
4
- <meta
5
- name="viewport"
6
- content="initial-scale=1,maximum-scale=1,user-scalable=no"
7
- />
8
- <title>Config Layer Picker</title>
9
- <!--
10
- | Copyright 2022 Esri
11
- |
12
- | Licensed under the Apache License, Version 2.0 (the "License");
13
- | you may not use this file except in compliance with the License.
14
- | You may obtain a copy of the License at
15
- |
16
- | http://www.apache.org/licenses/LICENSE-2.0
17
- |
18
- | Unless required by applicable law or agreed to in writing, software
19
- | distributed under the License is distributed on an "AS IS" BASIS,
20
- | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- | See the License for the specific language governing permissions and
22
- | limitations under the License.
23
- -->
24
- <style>
25
- .map-div {
26
- padding: 0;
27
- margin: 0;
28
- height: 100%;
29
- width: 100%;
30
- }
31
- .over-map {
32
- position: absolute;
33
- right: 0px;
34
- background-color: var(--calcite-ui-foreground-1);
35
- }
36
- .over-map[dir="rtl"] {
37
- position: absolute;
38
- left: 0px;
39
- background-color: var(--calcite-ui-foreground-1);
40
- }
41
- .column {
42
- width: 300px;
43
- margin: 1rem;
44
- padding: 1rem;
45
- border: 1px solid;
46
- }
47
- .padding-top-1 {
48
- padding-top: 1rem;
49
- }
50
- </style>
51
-
52
- <link
53
- rel="stylesheet"
54
- href="https://js.arcgis.com/4.25/esri/themes/light/main.css"
55
- />
56
- <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
57
- <link rel="stylesheet" href="../solutions-components.css" type="text/css">
58
-
59
- <script src="https://js.arcgis.com/4.25/"></script>
60
- <script type="module" src="../solutions-components.esm.js"></script>
61
- <script>
62
- require(["esri/WebMap", "esri/views/MapView"], (
63
- WebMap,
64
- MapView
65
- ) => {
66
- var webMap = new WebMap({
67
- portalItem: {
68
- id: "6a55f6678208461bb7a26d9e418a00bc"
69
- }
70
- });
71
-
72
- const demo = document.getElementById("demo");
73
- demo.mapView = new MapView({
74
- container: "viewDiv",
75
- map: webMap,
76
- zoom: 5,
77
- center: [-98, 42]
78
- });
79
- });
80
-
81
- function showResults() {
82
- const demo = document.getElementById("demo");
83
- demo?.getConfigInfo().then(configInfo => {
84
- alert(JSON.stringify(configInfo));
85
- });
86
- };
87
- </script>
88
- </head>
89
-
90
- <body>
91
- <div id="viewDiv" class="map-div"></div>
92
- <div class="over-map column">
93
- <config-layer-picker id="demo" instruction="Choose potential addressee layers"></config-layer-picker>
94
- <calcite-button class="padding-top-1" onclick="showResults()">Demo Results</calcite-button>
95
- </div>
96
- </body>
97
- </html>
@@ -1,6 +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 i,h as t,H as e,g as s}from"./p-c023e6a1.js";import{b as a,c as l,E as n,d}from"./p-be41429f.js";import{l as o}from"./p-1c567f3a.js";import{b as c,d as r,a as h,h as p}from"./p-7dcab29d.js";import{s as g}from"./p-15cd8a97.js";import{g as b}from"./p-44da2507.js";import{g as m,a as u}from"./p-fc884dd6.js";import"./p-4307dacd.js";import"./p-3b010ce1.js";const f=class{constructor(t){i(this,t),this.addresseeLayer=void 0,this.mapView=void 0,this.showRefineSelection=!1,this._downloadActive=!0,this._numSelected=0,this._pageType=a.LIST,this._saveEnabled=!1,this._selectionSets=[],this._sketchType=l.INTERACTIVE,this._selectionWorkflowType=n.SEARCH,this._translations=void 0}async mapViewWatchHandler(i){(null==i?void 0:i.popup)&&(this._popupsEnabled=null==i?void 0:i.popup.autoOpenEnabled)}async selectionSetsWatchHandler(i,t){i&&i!==t&&i.length>0&&0===i.filter((i=>i.workflowType!==n.REFINE)).length&&(this._selectionSets=[])}async pageTypeWatchHandler(i,t){if(this._checkPopups(),this._clearHighlight(),t!==a.SELECT&&t!==a.REFINE||await this._clearSelection(),i!==a.SELECT)return this._highlightFeatures()}selectionSetsChanged(i){this._selectionSets=[...i.detail]}sketchTypeChange(i){this._sketchType=i.detail}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){const i=this._selectionSets.length>0;return t(e,null,t("calcite-shell",null,t("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getActionGroup("list-check",!1,a.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",!i,a.REFINE,this._translations.refineSelection):void 0,this._getActionGroup("file-pdf",!i,a.PDF,this._translations.downloadPDF),this._getActionGroup("file-csv",!i,a.CSV,this._translations.downloadCSV)),this._getPage(this._pageType)))}async _initModules(){const[i]=await o(["esri/geometry/geometryEngine"]);this._geometryEngine=i}_getActionGroup(i,e,s,a){return t("calcite-action-group",{class:this.showRefineSelection?"action-center w-1-4":"action-center w-1-3",layout:"horizontal"},t("calcite-action",{active:this._pageType===s,alignment:"center",class:"width-full height-full",compact:!1,disabled:e,icon:i,id:i,onClick:()=>{this._setPageType(s)},text:""}),t("calcite-tooltip",{label:"",placement:"bottom","reference-element":i},t("span",null,a)))}_setPageType(i){this._pageType=i}_getPage(i){let t;switch(i){case a.LIST:t=this._getListPage();break;case a.SELECT:t=this._getSelectPage();break;case a.REFINE:t=this._getRefinePage();break;case a.PDF:t=this._getPDFPage();break;case a.CSV:t=this._getCSVPage()}return t}_getListPage(){var i,e;const s=this._selectionSets.filter((i=>i.workflowType!==n.REFINE)).length>0,l=m(this._selectionSets);return s?t("calcite-panel",null,t("div",{class:"padding-top-sides-1"},t("calcite-label",{class:"font-bold"},this._translations.myLists)),this._getNotice(this._translations.listHasSetsTip,"padding-sides-1 padding-bottom-1"),t("div",{class:"display-flex padding-sides-1"},t("calcite-label",{class:"font-bold width-full"},this._translations.addresseeLayer,t("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChange(i),selectedLayers:this.addresseeLayer?[null===(i=this.addresseeLayer)||void 0===i?void 0:i.layer.title]:[],selectionMode:"single"}))),t("div",{class:"padding-sides-1 height-1-1-2"},t("div",{class:"position-left"},t("calcite-label",{alignment:"start",class:"font-bold"},this._translations.notifications)),t("div",{class:"position-right"},t("calcite-input-message",{active:!0,class:"info-blue margin-top-0",scale:"m"},this._translations.uniqueCout.replace("{{n}}",l.toString())))),s?this._getSelectionSetList():t("div",{class:"info-message"},t("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.noNotifications)),t("div",{class:"display-flex padding-1"},t("calcite-button",{onClick:()=>{this._setPageType(a.SELECT)},width:"full"},this._translations.add))):t("calcite-panel",null,t("div",{class:"padding-top-sides-1"},t("calcite-label",{class:"font-bold"},this._translations.myLists)),t("div",{class:"padding-sides-1"},t("calcite-label",null,this._translations.notifications)),t("div",{class:"info-message padding-bottom-1"},t("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.noNotifications)),this._getNotice(this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1"),t("div",{class:"display-flex padding-sides-1"},t("calcite-label",{class:"font-bold width-full"},this._translations.addresseeLayer,t("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChange(i),selectedLayers:this.addresseeLayer?[null===(e=this.addresseeLayer)||void 0===e?void 0:e.layer.title]:[],selectionMode:"single"}))),t("div",{class:"display-flex padding-1"},t("calcite-button",{onClick:()=>{this._setPageType(a.SELECT)},width:"full"},this._translations.add)))}_getSelectionSetList(){return t("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((i,e,s)=>(e.workflowType!==n.REFINE&&i.push(t("calcite-list-item",{description:this._translations.selectedFeatures.replace("{{n}}",e.selectedIds.length.toString()),label:e.label,onClick:()=>this._gotoSelection(e,this.mapView)},this._getAction(!0,"pencil","",(i=>this._openSelection(e,i)),!1,"actions-end"),this._getAction(!0,"x","",(i=>this._deleteSelection(s,i)),!1,"actions-end"))),i)),[]))}_getSelectPage(){var i,e;const s=this._selectionWorkflowType===n.SELECT?this._translations.selectLayerTip:this._selectionWorkflowType===n.SKETCH?this._sketchType===l.INTERACTIVE?this._translations.selectSketchTip:this._translations.selectLayerTip:this._translations.selectSearchTip;return t("calcite-panel",null,this._getLabel(this._translations.stepTwoFull.replace("{{layer}}",null===(i=this.addresseeLayer)||void 0===i?void 0:i.layer.title)),this._getNotice(s),t("div",{class:"padding-1"},t("map-select-tools",{class:"font-bold",isUpdate:!!this._activeSelection,mapView:this.mapView,onSelectionSetChange:i=>this._updateForSelection(i),onWorkflowTypeChange:i=>this._updateForWorkflowType(i),ref:i=>{this._selectTools=i},selectLayerView:this.addresseeLayer,selectionSet:this._activeSelection})),t("div",{class:"padding-sides-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},t("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),t("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.selectedAddresses.replace("{{n}}",this._numSelected.toString()).replace("{{layer}}",(null===(e=this.addresseeLayer)||void 0===e?void 0:e.layer.title)||""))),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getRefinePage(){return t("calcite-panel",null,this._getLabel(this._translations.refineSelection),this._getNotice(this._translations.refineTip,"padding-sides-1"),t("refine-selection",{addresseeLayer:this.addresseeLayer,mapView:this.mapView,selectionSets:this._selectionSets}))}_getPDFPage(){return this._getDownloadPage(d.PDF)}_getCSVPage(){return this._getDownloadPage(d.CSV)}_getDownloadPage(i){const e=i===d.PDF;return t("calcite-panel",null,t("div",null,t("div",{class:"padding-top-sides-1"},t("calcite-label",{class:"font-bold"},e?this._translations.pdfDownloads:this._translations.csvDownloads),t("calcite-label",null,this._translations.notifications)),this._getSelectionLists(),t("div",{class:"margin-side-1 padding-top-1 border-bottom"}),t("div",{class:"padding-top-sides-1"},t("calcite-label",{layout:"inline"},t("calcite-checkbox",{disabled:!this._downloadActive,ref:i=>{this._removeDuplicates=i}}),this._translations.removeDuplicate)),t("div",{class:e?"":"display-none"},this._getLabel(this._translations.selectPDFLabelOption,!1),t("div",{class:"padding-sides-1"},t("pdf-download",{disabled:!this._downloadActive,layerView:this.addresseeLayer,ref:i=>{this._downloadTools=i}}))),t("div",{class:"padding-1 display-flex"},t("calcite-button",{disabled:!this._downloadActive,onClick:e?()=>this._downloadPDF():()=>this._downloadCSV(),width:"full"},e?this._translations.downloadPDF:this._translations.downloadCSV))))}_getPageNavButtons(i,e,s,a,l,n){return t("div",null,t("div",{class:"display-flex padding-top-sides-1"},t("calcite-button",{disabled:e,onClick:s,width:"full"},i)),t("div",{class:"display-flex padding-top-1-2 padding-sides-1"},t("calcite-button",{appearance:"outline",disabled:l,onClick:n,width:"full"},a)))}_getNotice(i,e="padding-1"){return t("calcite-notice",{class:e,color:"green",icon:"lightbulb",open:!0},t("div",{slot:"message"},i))}_getLabel(i,e=!1){return t("div",{class:"padding-top-sides-1"},t("calcite-label",{class:"font-bold","disable-spacing":e},i))}_getSelectionLists(){return this._selectionSets.reduce(((i,e)=>(e.workflowType!==n.REFINE&&(!this._downloadActive&&e.download&&(this._downloadActive=!0),i.push(t("div",{class:"display-flex padding-sides-1 padding-bottom-1"},t("calcite-checkbox",{checked:e.download,onClick:()=>{this._toggleDownload(e.id)}}),t("calcite-list",{class:"list-border margin-start-1-2 w-100",id:"download-list"},t("calcite-list-item",{description:this._translations.selectedFeatures.replace("{{n}}",e.selectedIds.length.toString()),disabled:!e.download,label:e.label,onClick:()=>{this._toggleDownload(e.id)}}))))),i)),[])||t("div",null)}async _toggleDownload(i){let t=!1;this._selectionSets=this._selectionSets.map((e=>(e.download=e.id===i?!e.download:e.download,t=!!e.download||t,e))),this._downloadActive=t,await this._highlightFeatures()}_downloadPDF(){const i=u(this._getDownloadSelectionSets());this._downloadTools.downloadPDF(i,this._removeDuplicates.checked)}_downloadCSV(){const i=u(this._getDownloadSelectionSets());this._downloadTools.downloadCSV(i,this._removeDuplicates.checked)}_getDownloadSelectionSets(){return this._selectionSets.filter((i=>i.download||i.workflowType===n.REFINE))}_updateForWorkflowType(i){this._selectionWorkflowType=i.detail}_getAction(i,e,s,a,l=!1,n=""){return t("calcite-action",{disabled:!i,icon:e,indicator:l,onClick:a,slot:n,text:s})}_updateForSelection(i){this._numSelected=i.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),"boolean"==typeof this._popupsEnabled&&this.mapView.popup&&(this.mapView.popup.autoOpenEnabled=this._popupsEnabled),this._setPageType(a.LIST)}async _layerSelectionChange(i){var t,e;const s=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";s!==(null===(e=this.addresseeLayer)||void 0===e?void 0:e.layer.title)&&(this.addresseeLayer=await c(this.mapView,s),await this._updateSelectionSets(this.addresseeLayer))}async _updateSelectionSets(i){const t=this._selectionSets.filter((i=>i.workflowType!==n.REFINE)),e=[];return t.forEach((t=>{t.layerView=i,t.selectedIds=[],e.push(r(t,this._geometryEngine))})),Promise.all(e).then((async i=>{i.forEach(((i,e)=>{t[e].selectedIds=i})),await this._highlightFeatures(),this._selectionSets=[...t]}))}async _saveSelection(){var i,t;const e=await(null===(i=this._selectTools)||void 0===i?void 0:i.getSelection()),s=null===(t=this._selectTools)||void 0===t?void 0:t.isUpdate;return this._selectionSets=s?this._selectionSets.map((i=>i.id===e.id?e:i)):[...this._selectionSets,e],this._home()}async _clearSelection(){var i;await(null===(i=this._selectTools)||void 0===i?void 0:i.clearSelection()),this._numSelected=0,this._activeSelection=void 0}_deleteSelection(i,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter(((t,e)=>{if(e!==i)return t})),this._highlightFeatures()}_gotoSelection(i,t){h(i.selectedIds,i.layerView,t)}_openSelection(i,t){t.stopPropagation(),this._activeSelection=i,this._pageType=a.SELECT}async _highlightFeatures(){this._clearHighlight();const i=u(this._selectionSets);i.length>0&&(g.highlightHandle=await p(i,this.addresseeLayer,this.mapView))}_checkPopups(){var i;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(i=this.mapView)||void 0===i?void 0:i.popup.autoOpenEnabled)}_clearHighlight(){var i;g&&g.highlightHandle&&(null===(i=g.highlightHandle)||void 0===i||i.remove())}async _getTranslations(){const i=await b(this.el);this._translations=i[0]}get el(){return s(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],_selectionSets:["selectionSetsWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};f.style=':host{display:block}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir="rtl"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.position-right{position:absolute;right:1rem}.position-right[dir="rtl"]{position:absolute;left:1rem}.position-left{position:absolute;left:1rem}.position-left[dir="rtl"]{position:absolute;right:1rem}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}';export{f as public_notification}
@@ -1,17 +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 i,h as t,H as e,g as s,c as a}from"./p-c023e6a1.js";import{s as n,g as o,a as c}from"./p-83166522.js";import{S as l}from"./p-6fe17794.js";import{c as r,d as h}from"./p-ea534300.js";import{l as d}from"./p-1c567f3a.js";import{a as m,h as u,e as p,f as g}from"./p-7dcab29d.js";import{E as v,f,g as b,c as w}from"./p-be41429f.js";import{s as y}from"./p-15cd8a97.js";import{g as k}from"./p-44da2507.js";import{p as x}from"./p-e99b1247.js";import{e as _}from"./p-ad42039f.js";import{a as z,g as S}from"./p-fc884dd6.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";import"./p-4307dacd.js";import"./p-3b010ce1.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */var C;!function(i){i.valid="check-circle",i.invalid="exclamation-mark-triangle",i.idle="information"}(C||(C={}));const D=class{constructor(t){i(this,t),this.active=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=n(C,this.icon,this.status)}connectedCallback(){this.status=o(this.el,"status",this.status),this.scale=o(this.el,"scale",this.scale),this.requestedIcon=n(C,this.icon,this.status)}render(){return t(e,{"calcite-hydrated-hidden":!this.active},this.renderIcon(this.requestedIcon),t("slot",null))}renderIcon(i){if(i)return t("calcite-icon",{class:"calcite-input-message-icon",icon:i,scale:"s"})}get el(){return s(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};D.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([active][scale=m]),:host([active][scale=l]){--calcite-input-message-spacing-value:0.25rem}:host{visibility:hidden;box-sizing:border-box;display:flex;block-size:0px;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active]){visibility:visible;block-size:auto;opacity:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active][scale=m]),:host([active][scale=l]){-webkit-margin-before:var(--calcite-input-message-spacing-value);margin-block-start:var(--calcite-input-message-spacing-value)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-ui-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-ui-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-ui-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-ui-brand)}:host([status][active]){color:var(--calcite-ui-text-1)}:host([status][scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([status][scale=m]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([status][scale=l]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}";
12
- /*!
13
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
14
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
15
- * v1.0.0-beta.97
16
- */
17
- const I="actions-end",j=class{constructor(t){i(this,t),this.calciteNoticeClose=a(this,"calciteNoticeClose",6),this.calciteNoticeOpen=a(this,"calciteNoticeOpen",6),this.active=!1,this.open=!1,this.color="blue",this.dismissible=!1,this.closable=!1,this.intlClose="Close",this.scale="m",this.width="auto",this.close=()=>{this.open=!1,this.calciteNoticeClose.emit()}}activeHandler(i){this.open=i}openHandler(i){this.active=i}handleDismissible(i){this.closable=i}handleClosable(i){this.dismissible=i}updateRequestedIcon(){this.requestedIcon=n(l,this.icon,this.color)}connectedCallback(){r(this);const i=this.active||this.open;i&&(this.activeHandler(i),this.openHandler(i)),this.dismissible&&this.handleDismissible(this.dismissible),this.closable&&this.handleClosable(this.closable)}disconnectedCallback(){h(this)}componentWillLoad(){this.requestedIcon=n(l,this.icon,this.color)}render(){const{el:i}=this,e=t("button",{"aria-label":this.intlClose,class:"notice-close",onClick:this.close,ref:i=>this.closeButton=i},t("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"})),s=c(i,I);return t("div",{class:"container"},this.requestedIcon?t("div",{class:"notice-icon"},t("calcite-icon",{icon:this.requestedIcon,scale:"l"===this.scale?"m":"s"})):null,t("div",{class:"notice-content"},t("slot",{name:"title"}),t("slot",{name:"message"}),t("slot",{name:"link"})),s?t("div",{class:"actions-end"},t("slot",{name:I})):null,this.closable?e:null)}async setFocus(){const i=this.el.querySelector("calcite-link");(this.closeButton||i)&&(i?i.setFocus():this.closeButton&&this.closeButton.focus())}get el(){return s(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],dismissible:["handleDismissible"],closable:["handleClosable"],icon:["updateRequestedIcon"],color:["updateRequestedIcon"]}}};j.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:none;inline-size:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;max-block-size:0;text-align:start;-webkit-border-start:0px solid;border-inline-start:0px solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";const R=class{constructor(t){i(this,t),this.selectionSetChange=a(this,"selectionSetChange",7),this.sketchTypeChange=a(this,"sketchTypeChange",7),this.workflowTypeChange=a(this,"workflowTypeChange",7),this._selectedIds=[],this._selectionLabel="",this.geometries=void 0,this.isUpdate=!1,this.mapView=void 0,this.selectionSet=void 0,this.selectLayerView=void 0,this.showBufferTools=!0,this._layerSelectChecked=void 0,this._searchTerm=void 0,this._translations=void 0,this._workflowType=void 0}async watchGeometriesHandler(i,t){if(i!==t){if(i.length>0)return this._geomQuery(this.geometries);if(0===i.length)return this._clearResults(!0,!0)}}async workflowTypeHandler(i,t){i!==t&&(this.mapView.popup.autoOpenEnabled=["SELECT","SKETCH","REFINE"].indexOf(i)<0,this.workflowTypeChange.emit(i))}async clearSelection(){return this._clearResults()}async getSelection(){return{id:this.isUpdate?this.selectionSet.id:Date.now(),workflowType:this._workflowType,searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._workflowType===v.SEARCH?this._selectionLabel:`${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,refineSelectLayers:this._refineTools.layerViews}}sketchGraphicsChange(i){this._updateSelection(v.SKETCH,i.detail,this._translations.sketch)}refineSelectionGraphicsChange(i){const t=i.detail;this._updateSelection(v.SELECT,t,this._translations.select);const e=Array.isArray(t)?t.map((i=>i.attributes[i.layer.objectIdField])):[];return this._highlightFeatures(e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){var i,s;const a=this._workflowType===v.SEARCH,n=a?" div-visible-search":" div-not-visible",o=this._workflowType===v.SKETCH||this._workflowType===v.SELECT,c=this.showBufferTools?"search-distance":"div-not-visible",l=this._layerSelectChecked&&!a?" div-visible":" div-not-visible",r=this._layerSelectChecked||a?" div-not-visible":" div-visible",h=a?"div-not-visible":"div-visible";return t(e,null,t("div",{class:"padding-bottom-1"},t("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:i=>this._workflowChange(i)},t("calcite-radio-group-item",{checked:a,class:"w-50 end-border",value:v.SEARCH},this._translations.search),t("calcite-radio-group-item",{checked:o,class:"w-50",value:v.SKETCH},this._translations.sketch))),t("div",{class:n},t("div",{class:"search-widget",ref:i=>{this._searchElement=i}})),t("div",{class:h},t("calcite-label",{layout:"inline"},t("calcite-checkbox",{onCalciteCheckboxChange:()=>this._layerSelectChanged(),ref:i=>this._selectFromLayerElement=i}),"Use layer features")),t("div",{class:r},t("map-draw-tools",{active:!0,border:!0,mapView:this.mapView,ref:i=>{this._drawTools=i}})),t("div",{class:l},t("refine-selection-tools",{active:!0,border:!0,layerViews:this._refineSelectLayers,mapView:this.mapView,mode:f.ADD,ref:i=>{this._refineTools=i},refineMode:b.SUBSET})),t("calcite-label",{class:c},this._translations.searchDistance,t("buffer-tools",{distance:null===(i=this.selectionSet)||void 0===i?void 0:i.distance,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:null===(s=this.selectionSet)||void 0===s?void 0:s.unit})),t("slot",null))}async _initModules(){const[i,t,e,s]=await d(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=e,this._geometryEngine=s}async _init(){this._initGraphicsLayer(),this._initSelectionSet(),this._initSearchWidget()}_initSelectionSet(){var i,t,e,s,a,n,o;this.selectionSet?(this._searchTerm=null===(t=null===(i=this.selectionSet)||void 0===i?void 0:i.searchResult)||void 0===t?void 0:t.name,this._workflowType=null===(e=this.selectionSet)||void 0===e?void 0:e.workflowType,this._searchResult=null===(s=this.selectionSet)||void 0===s?void 0:s.searchResult,this._refineSelectLayers=null===(a=this.selectionSet)||void 0===a?void 0:a.refineSelectLayers,this.geometries=[...null===(n=this.selectionSet)||void 0===n?void 0:n.geometries],this._selectionLabel=this._workflowType===v.SKETCH?this._translations.sketch:this._workflowType===v.SELECT?this._translations.select:null===(o=this.selectionSet)||void 0===o?void 0:o.label,m(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1)):this._workflowType=v.SEARCH}_initSearchWidget(){this.mapView&&this._searchElement&&(this._searchWidget=new this.Search({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm}),this._searchWidget.on("search-clear",(()=>{this._clearResults(!1)})),this._searchWidget.on("select-result",(i=>{var t;this._clearResults(!1),i.result&&(this._searchResult=i.result,this._updateSelection(v.SEARCH,[i.result.feature],null===(t=null==i?void 0:i.result)||void 0===t?void 0:t.name))})))}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i}),y.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}_layerSelectChanged(){this._layerSelectChecked=this._selectFromLayerElement.checked,this.sketchTypeChange.emit(this._layerSelectChecked?w.LAYER:w.INTERACTIVE)}_workflowChange(i){this._workflowType=i.detail}async _highlightFeatures(i){var t;null===(t=y.highlightHandle)||void 0===t||t.remove(),i.length>0&&(y.highlightHandle=await u(i,this.selectLayerView,this.mapView)),this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectedIds=await p(i,this.selectLayerView.layer),this._drawTools.graphics=this.geometries.map((i=>{var t,e,s;const a={geometry:i,symbol:"point"===i.type?null===(t=this._drawTools)||void 0===t?void 0:t.pointSymbol:"polyline"===i.type?null===(e=this._drawTools)||void 0===e?void 0:e.polylineSymbol:"polygon"===i.type?null===(s=this._drawTools)||void 0===s?void 0:s.polygonSymbol:void 0};return new this.Graphic(a)})),this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){if(this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail,this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:[227,139,79,.8],outline:{color:[255,255,255],width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),this._selectFeatures([this._bufferGeometry]),this.mapView.goTo(i.geometry.extent)}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),this._geomQuery(this.geometries)}_geomQuery(i){const t=g(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!0){var e,s;this._selectedIds=[],t&&(this._selectionLabel=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._searchWidget.clear(),null===(e=y.highlightHandle)||void 0===e||e.remove(),(null===(s=this._drawTools)||void 0===s?void 0:s.clear)&&this._drawTools.clear(),this.selectionSetChange.emit(this._selectedIds.length)}_updateSelection(i,t,e){this.geometries=Array.isArray(t)?t.map((i=>i.geometry)):this.geometries,this._workflowType=i,this._selectionLabel=e}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}get el(){return s(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],_workflowType:["workflowTypeHandler"]}}};R.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}';const T=class{constructor(t){i(this,t),this.disabled=!0,this.layerView=void 0,this._translations=void 0}async downloadPDF(i,t){return this._downloadPDF(i,t)}async downloadCSV(i,t){return this._downloadCSV(i,t)}async componentWillLoad(){await this._getTranslations()}render(){return t(e,null,t("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}},this._renderItems()))}_renderItems(){return(x.default||x).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),s=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<s?-1:e>s?1:0})).map((i=>t("calcite-option",{value:i},this._getLabelSizeText(i))))}async _downloadPDF(i,t){alert(`PDF download: (${this._getLabelSizeText(this._labelInfoElement.selectedOption.value)}) (remove dups: ${t}) ${i.join(", ")}`)}async _downloadCSV(i,t){console.log(t),await _(this.layerView,i)}_getLabelSizeText(i){const t=`${i.descriptionPDF.labelWidthDisplay} x ${i.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}get el(){return s(this)}};T.style=":host{display:block}";const L=class{constructor(t){i(this,t),this.selectionSetsChanged=a(this,"selectionSetsChanged",7),this._addEnabled=!0,this.addresseeLayer=void 0,this.mapView=void 0,this.selectionSets=[],this.GraphicsLayer=void 0,this.SketchViewModel=void 0,this._translations=void 0}refineSelectionIdsChange(i){var t,e;const s=(null===(t=i.detail)||void 0===t?void 0:t.addIds)||[],a=(null===(e=i.detail)||void 0===e?void 0:e.removeIds)||[];this._updateSelectionSets(a),this._updateRefineSelectionSet(s,a)}async componentWillLoad(){await this._getTranslations()}render(){return t(e,null,t("div",{class:"padding-1"},t("div",null,t("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:i=>this._modeChanged(i)},t("calcite-radio-group-item",{checked:this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(f.ADD),value:f.ADD},this._translations.add),t("calcite-radio-group-item",{checked:!this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(f.REMOVE),value:f.REMOVE},this._translations.remove)),t("refine-selection-tools",{border:!0,ids:z(this.selectionSets),layerViews:[this.addresseeLayer],mapView:this.mapView,mode:this._addEnabled?f.ADD:f.REMOVE,ref:i=>{this._refineTools=i},useLayerPicker:!1})),t("br",null),t("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_modeChanged(i){this._addEnabled=i.detail===f.ADD}_setSelectionMode(i){this._refineTools.mode=i}_getRefineSelectionSetList(){const i=S(this.selectionSets),e=this._getRefineSelectionSet(this.selectionSets),s=(null==e?void 0:e.refineIds.removeIds.length)||0;return[t("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",((null==e?void 0:e.refineIds.addIds.length)||0).toString())}),t("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",s.toString())}),t("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString())})]}_getRefineSelectionSet(i){let t;return i.some((i=>{if(i.workflowType===v.REFINE)return t=i,!0})),t}_updateSelectionSets(i){i.length>0&&(this.selectionSets=this.selectionSets.reduce(((t,e)=>(e.selectedIds=e.selectedIds.filter((t=>i.indexOf(t)<0)),e.selectedIds.length>0&&t.push(e),t)),[]),this.selectionSetsChanged.emit(this.selectionSets))}_updateRefineSelectionSet(i,t){const e=this._getRefineSelectionSet(this.selectionSets);this.selectionSets=e?this._updateRefineIds(e,i,t):this._addRefineSelectionSet(i,t),this.selectionSetsChanged.emit(this.selectionSets)}_updateRefineIds(i,t,e){i.refineIds.addIds=i.refineIds.addIds.filter((i=>e.indexOf(i)<0)),i.refineIds.removeIds=i.refineIds.removeIds.filter((i=>t.indexOf(i)<0));const s=[...new Set(i.refineIds.addIds.concat(t))],a=[...new Set(i.refineIds.removeIds.concat(e))];return i.refineIds={addIds:s.filter((i=>a.indexOf(i)<0)),removeIds:a.filter((i=>s.indexOf(i)<0))},i.selectedIds=i.refineIds.addIds.length>0?[...new Set(i.selectedIds.concat(i.refineIds.addIds))]:i.selectedIds.filter((t=>i.refineIds.removeIds.indexOf(t)<0)),this.selectionSets.map((t=>t.workflowType===v.REFINE?i:t))}_addRefineSelectionSet(i,t){return[...this.selectionSets,{buffer:void 0,distance:0,download:!0,geometries:[],id:Date.now(),label:"Refine",layerView:this.addresseeLayer,refineSelectLayers:[],searchResult:void 0,selectedIds:i,unit:"feet",workflowType:v.REFINE,refineIds:{addIds:i,removeIds:t}}]}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}_testAccess(i,t){switch(i){case"_modeChanged":return this._modeChanged(t);case"_setSelectionMode":return this._setSelectionMode(t)}return null}get el(){return s(this)}};L.style=":host{display:block}";export{D as calcite_input_message,j as calcite_notice,R as map_select_tools,T as pdf_download,L as refine_selection}
@@ -1,6 +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 t,h as s,H as i,g as a}from"./p-c023e6a1.js";import{g as e}from"./p-44da2507.js";import{p as n}from"./p-e99b1247.js";import"./p-3b010ce1.js";const l=class{constructor(s){t(this,s),this.defaultChecked=!0,this._formatOptions=[],this._translations=void 0}async getConfigInfo(){const t=await this._formatOptionsCheckList.getConfigInfo(),s=await this._csvOptionsCheckList.getConfigInfo();return Object.assign(Object.assign({},t),s)}async componentWillLoad(){await this._getTranslations(),await this._setFormatOptions()}render(){return s(i,null,s("div",null,s("div",{class:"padding-block-end-1"},s("calcite-label",{class:"label-spacing"},this._translations.availableLabelFormats)),s("div",{class:"padding-block-end-1 padding-inline-start-1"},s("check-list",{defaultChecked:this.defaultChecked,ref:t=>{this._formatOptionsCheckList=t},values:this._formatOptions})),s("div",{class:"padding-block-end-1"},s("calcite-label",{class:"label-spacing"},this._translations.csvOptions)),s("div",{class:"padding-block-end-1 padding-inline-start-1"},s("check-list",{defaultChecked:this.defaultChecked,ref:t=>{this._csvOptionsCheckList=t},values:[this._translations.csvColumnTitle]}))))}async _setFormatOptions(){const t=(n.default||n).sort(((t,s)=>{const i=parseInt(t.descriptionPDF.labelsPerPageDisplay,10),a=parseInt(s.descriptionPDF.labelsPerPageDisplay,10);return i<a?-1:i>a?1:0}));this._formatOptions=t.map((t=>this._getLabelSizeText(t)))}_getLabelSizeText(t){const s=`${t.descriptionPDF.labelWidthDisplay} x ${t.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",t.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",s)}async _getTranslations(){const t=await e(this.el);this._translations=t[0]}get el(){return a(this)}};l.style=":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}";export{l as config_pdf_download}
@@ -1,6 +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 i,h as t,H as e,g as a}from"./p-c023e6a1.js";import{g as s}from"./p-44da2507.js";import"./p-3b010ce1.js";const n=class{constructor(t){i(this,t),this.distance=100,this.unit="Meters",this._showBufferChecked=!0,this._translations=void 0}async getConfigInfo(){return{distance:this.distance,unit:this.unit}}async componentWillLoad(){await this._getTranslations()}render(){return t(e,null,t("div",null,t("calcite-label",{layout:"inline"},t("calcite-checkbox",{checked:this._showBufferChecked,onCalciteCheckboxChange:()=>this._setShowBufferChecked(),ref:i=>{this._showBufferElement=i}}),this._translations.showSearchDistance)),t("div",{class:"padding-inline-start-1"},t("div",{class:"padding-block-end-1 width-full"},t("calcite-label",{class:"label-spacing"},this._translations.defaultBufferDistance,t("calcite-input",{disabled:!this._showBufferChecked,min:0,"number-button-type":"vertical",onCalciteInputInput:i=>{this._distanceChanged(i)},type:"number",value:this.distance.toString()}))),t("div",{class:"width-full"},t("calcite-label",{class:"label-spacing"},this._translations.defaultUnit,t("calcite-select",{disabled:!this._showBufferChecked,label:this._translations.defaultUnit,onCalciteSelectChange:i=>{this._unitSelectionChange(i)}},this._renderUnitOptions())))))}_distanceChanged(i){this.distance=i.detail.value}_unitSelectionChange(i){this.unit=i.target.value}_renderUnitOptions(){const i=this._translations.units||{};return Object.keys(i).map((t=>i[t])).map((i=>t("calcite-option",{label:i,selected:i===this.unit,value:i})))}_setShowBufferChecked(){this._showBufferChecked=this._showBufferElement.checked}async _getTranslations(){const i=await s(this.el);this._translations=i[0]}get el(){return a(this)}};n.style=":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%}";export{n as config_buffer_tools}