maplibre-gl-js-amplify 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/maplibre-gl-js-amplify.umd.css +394 -0
- package/dist/maplibre-gl-js-amplify.umd.js +958 -42
- package/dist/maplibre-gl-js-amplify.umd.js.map +1 -1
- package/dist/maplibre-gl-js-amplify.umd.min.js +1 -1
- package/dist/maplibre-gl-js-amplify.umd.min.js.gz +0 -0
- package/dist/maplibre-gl-js-amplify.umd.min.js.map +1 -1
- package/dist/public/amplify-ctrl-geofence.css +394 -0
- package/dist/public/editIcon.svg +3 -0
- package/dist/public/popupStep1.svg +7 -0
- package/dist/public/popupStep2.svg +5 -0
- package/dist/public/popupStep3.svg +4 -0
- package/dist/public/popupStep4.svg +4 -0
- package/dist/public/trashIcon.svg +3 -0
- package/lib/cjs/AmplifyGeofenceControl/AmplifyMapDraw.d.ts +30 -0
- package/lib/cjs/AmplifyGeofenceControl/AmplifyMapDraw.js +131 -0
- package/lib/cjs/AmplifyGeofenceControl/AmplifyMapDraw.js.map +1 -0
- package/lib/cjs/AmplifyGeofenceControl/index.d.ts +56 -0
- package/lib/cjs/AmplifyGeofenceControl/index.js +275 -0
- package/lib/cjs/AmplifyGeofenceControl/index.js.map +1 -0
- package/lib/cjs/AmplifyGeofenceControl/ui.d.ts +19 -0
- package/lib/cjs/AmplifyGeofenceControl/ui.js +397 -0
- package/lib/cjs/AmplifyGeofenceControl/ui.js.map +1 -0
- package/lib/cjs/constants.d.ts +4 -0
- package/lib/cjs/constants.js +5 -1
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/drawGeofences.d.ts +4 -0
- package/lib/cjs/drawGeofences.js +35 -33
- package/lib/cjs/drawGeofences.js.map +1 -1
- package/lib/cjs/geofenceUtils.d.ts +13 -0
- package/lib/cjs/geofenceUtils.js +113 -0
- package/lib/cjs/geofenceUtils.js.map +1 -0
- package/lib/cjs/index.d.ts +2 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/public/amplify-ctrl-geofence.css +394 -0
- package/lib/cjs/public/amplify-geocoder.css +22 -0
- package/lib/cjs/public/editIcon.svg +3 -0
- package/lib/cjs/public/popupStep1.svg +7 -0
- package/lib/cjs/public/popupStep2.svg +5 -0
- package/lib/cjs/public/popupStep3.svg +4 -0
- package/lib/cjs/public/popupStep4.svg +4 -0
- package/lib/cjs/public/trashIcon.svg +3 -0
- package/lib/cjs/types.d.ts +3 -3
- package/lib/cjs/utils.d.ts +6 -1
- package/lib/cjs/utils.js +42 -2
- package/lib/cjs/utils.js.map +1 -1
- package/lib/esm/AmplifyGeofenceControl/AmplifyMapDraw.d.ts +30 -0
- package/lib/esm/AmplifyGeofenceControl/AmplifyMapDraw.js +124 -0
- package/lib/esm/AmplifyGeofenceControl/AmplifyMapDraw.js.map +1 -0
- package/lib/esm/AmplifyGeofenceControl/index.d.ts +56 -0
- package/lib/esm/AmplifyGeofenceControl/index.js +271 -0
- package/lib/esm/AmplifyGeofenceControl/index.js.map +1 -0
- package/lib/esm/AmplifyGeofenceControl/ui.d.ts +19 -0
- package/lib/esm/AmplifyGeofenceControl/ui.js +390 -0
- package/lib/esm/AmplifyGeofenceControl/ui.js.map +1 -0
- package/lib/esm/constants.d.ts +4 -0
- package/lib/esm/constants.js +4 -0
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/drawGeofences.d.ts +4 -0
- package/lib/esm/drawGeofences.js +35 -33
- package/lib/esm/drawGeofences.js.map +1 -1
- package/lib/esm/geofenceUtils.d.ts +13 -0
- package/lib/esm/geofenceUtils.js +100 -0
- package/lib/esm/geofenceUtils.js.map +1 -0
- package/lib/esm/index.d.ts +2 -1
- package/lib/esm/index.js +2 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/public/amplify-ctrl-geofence.css +394 -0
- package/lib/esm/public/amplify-geocoder.css +22 -0
- package/lib/esm/public/editIcon.svg +3 -0
- package/lib/esm/public/popupStep1.svg +7 -0
- package/lib/esm/public/popupStep2.svg +5 -0
- package/lib/esm/public/popupStep3.svg +4 -0
- package/lib/esm/public/popupStep4.svg +4 -0
- package/lib/esm/public/trashIcon.svg +3 -0
- package/lib/esm/types.d.ts +3 -3
- package/lib/esm/utils.d.ts +6 -1
- package/lib/esm/utils.js +36 -1
- package/lib/esm/utils.js.map +1 -1
- package/package.json +19 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
## master
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
- Added `AmplifyGeofenceControl` [#81](https://github.com/aws-amplify/maplibre-gl-js-amplify/pull/81)
|
|
6
|
+
|
|
7
|
+
### Features / Improvements 🚀
|
|
8
|
+
|
|
9
|
+
- Added `drawGeofences` function [#62](https://github.com/aws-amplify/maplibre-gl-js-amplify/pull/62)
|
|
10
|
+
- add setData, show, hide, utility functions to drawPoints return [#70](https://github.com/aws-amplify/maplibre-gl-js-amplify/pull/70)
|
|
11
|
+
|
|
3
12
|
## 1.1.3
|
|
4
13
|
|
|
5
14
|
### Features / Improvements 🚀
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
.amplify-ctrl {
|
|
2
|
+
font-size: 14px;
|
|
3
|
+
line-height: 18px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.amplify-ctrl-button {
|
|
7
|
+
background: unset;
|
|
8
|
+
color: white;
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
padding: 4px 16px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* List Styles */
|
|
15
|
+
.amplify-ctrl-list-container {
|
|
16
|
+
position: absolute;
|
|
17
|
+
height: 100vh;
|
|
18
|
+
left: 0;
|
|
19
|
+
top: 0;
|
|
20
|
+
width: 15%;
|
|
21
|
+
max-width: 240px;
|
|
22
|
+
background: white;
|
|
23
|
+
z-index: 100;
|
|
24
|
+
line-height: 24px;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.amplify-ctrl-list {
|
|
30
|
+
height: 100%;
|
|
31
|
+
overflow: scroll;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.amplify-ctrl-noHover {
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.amplify-ctrl-list-header {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
text-align: initial;
|
|
43
|
+
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.amplify-ctrl-list-header-title {
|
|
48
|
+
border-bottom: 1px solid #e2e2e2;
|
|
49
|
+
padding: 4px 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.amplify-ctrl-list-checkbox-all-container {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: 4px 12px 4px 8px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.amplify-ctrl-list-checkbox-all-title {
|
|
60
|
+
padding-left: 8px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.amplify-ctrl-list-header-add-button {
|
|
64
|
+
border: none;
|
|
65
|
+
background: none;
|
|
66
|
+
position: absolute;
|
|
67
|
+
right: 8px;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.amplify-ctrl-list-item-container {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.amplify-ctrl-list-item {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
align-items: center;
|
|
80
|
+
padding-left: 8px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.amplify-ctrl-list-selected-item {
|
|
84
|
+
display: flex;
|
|
85
|
+
background: #003560;
|
|
86
|
+
padding-top: 8px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.amplify-ctrl-list-selected-item .amplify-ctrl-list-item-checkbox {
|
|
90
|
+
visibility: hidden;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.amplify-ctrl-list-item:hover {
|
|
94
|
+
background: #003560;
|
|
95
|
+
color: white;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.amplify-ctrl-list-item:hover .amplify-ctrl-edit-button {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.amplify-ctrl-list-item-title-container {
|
|
105
|
+
display: flex;
|
|
106
|
+
justify-content: space-between;
|
|
107
|
+
width: 100%;
|
|
108
|
+
padding: 4px 0px 4px 8px;
|
|
109
|
+
margin-left: 8px;
|
|
110
|
+
border-left: 1px solid #e9e9e9;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.amplify-ctrl-list-selected-item .amplify-ctrl-list-item-title-container {
|
|
114
|
+
border: unset;
|
|
115
|
+
color: white;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Delete Geofence Prompt Styles */
|
|
119
|
+
|
|
120
|
+
.amplify-ctrl-delete-prompt-container {
|
|
121
|
+
position: absolute;
|
|
122
|
+
background: rgba(0, 0, 0, 0.4);
|
|
123
|
+
height: 100vh;
|
|
124
|
+
width: 100vw;
|
|
125
|
+
top: 0;
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
align-items: center;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.amplify-ctrl-delete-prompt {
|
|
132
|
+
background: white;
|
|
133
|
+
padding: 24px;
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.12);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.amplify-ctrl-delete-geofence-buttons {
|
|
139
|
+
display: flex;
|
|
140
|
+
justify-content: flex-end;
|
|
141
|
+
padding-top: 8px;
|
|
142
|
+
font-weight: bold;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.amplify-ctrl-delete-geofence-confirm-button {
|
|
146
|
+
background: black;
|
|
147
|
+
border-radius: 4px;
|
|
148
|
+
color: white;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
padding: 8px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.amplify-ctrl-delete-geofence-cancel-button {
|
|
154
|
+
color: #6e6e6e;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
padding: 8px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Create Geofence Prompt Styles */
|
|
160
|
+
|
|
161
|
+
.amplify-ctrl-create-prompt-container {
|
|
162
|
+
position: absolute;
|
|
163
|
+
height: 100vh;
|
|
164
|
+
width: 100vw;
|
|
165
|
+
top: 0;
|
|
166
|
+
display: flex;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
align-items: flex-end;
|
|
169
|
+
pointer-events: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.amplify-ctrl-create-prompt {
|
|
173
|
+
box-shadow: 0px -2px 4px rgb(0 0 0 / 12%);
|
|
174
|
+
border-radius: 4px;
|
|
175
|
+
background: white;
|
|
176
|
+
padding: 12px;
|
|
177
|
+
pointer-events: auto;
|
|
178
|
+
height: 88px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.amplify-ctrl-create-prompt-buttons {
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.amplify-ctrl-create-prompt-button {
|
|
187
|
+
color: black;
|
|
188
|
+
background: white;
|
|
189
|
+
border: 1px solid #d8d8d8;
|
|
190
|
+
font-weight: 600;
|
|
191
|
+
padding: 8px 24px;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.amplify-ctrl-create-prompt-selected {
|
|
196
|
+
color: white;
|
|
197
|
+
background: black;
|
|
198
|
+
border-color: black;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.amplify-ctrl-create-prompt-button-circle {
|
|
202
|
+
border-radius: 4px 0 0 4px;
|
|
203
|
+
border-right: unset;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.amplify-ctrl-create-prompt-button-polygon {
|
|
207
|
+
border-radius: 0 4px 4px 0;
|
|
208
|
+
border-left: unset;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.amplify-ctrl-create-circle-mode-container {
|
|
212
|
+
display: flex;
|
|
213
|
+
flex-direction: column;
|
|
214
|
+
align-items: center;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.amplify-ctrl-create-circle-mode-title {
|
|
218
|
+
padding: 4px 0;
|
|
219
|
+
width: 124px;
|
|
220
|
+
text-align: initial;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.amplify-ctrl-create-circle-mode-input {
|
|
224
|
+
width: 124px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.amplify-ctrl-create-polygon-mode-container {
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
display: flex;
|
|
230
|
+
flex-direction: column;
|
|
231
|
+
align-items: center;
|
|
232
|
+
padding-top: 8px;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.amplify-ctrl-create-polygon-mode-info-container {
|
|
238
|
+
display: flex;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.amplify-ctrl-create-polygon-mode-icon {
|
|
242
|
+
background: black;
|
|
243
|
+
color: white;
|
|
244
|
+
height: 18px;
|
|
245
|
+
width: 18px;
|
|
246
|
+
border-radius: 50%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.amplify-ctrl-create-polygon-mode-title {
|
|
250
|
+
padding-left: 8px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.amplify-ctrl-create-polygon-mode-reset-button {
|
|
254
|
+
border-radius: 4px;
|
|
255
|
+
background: black;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* Popup container */
|
|
259
|
+
.amplify-ctrl-create-polygon-mode-popup-container {
|
|
260
|
+
position: relative;
|
|
261
|
+
display: inline-block;
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* The actual popup (appears on top) */
|
|
266
|
+
.amplify-ctrl-create-polygon-mode-popup-container
|
|
267
|
+
.amplify-ctrl-create-polygon-mode-popup {
|
|
268
|
+
visibility: hidden;
|
|
269
|
+
width: 560px;
|
|
270
|
+
height: 100px;
|
|
271
|
+
background-color: white;
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
|
|
274
|
+
border-radius: 4px;
|
|
275
|
+
text-align: center;
|
|
276
|
+
padding: 8px 24px;
|
|
277
|
+
position: absolute;
|
|
278
|
+
z-index: 1;
|
|
279
|
+
bottom: 125%;
|
|
280
|
+
left: 50%;
|
|
281
|
+
margin-left: -280px;
|
|
282
|
+
margin-bottom: 30px;
|
|
283
|
+
display: flex;
|
|
284
|
+
justify-content: space-between;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Popup arrow */
|
|
288
|
+
.amplify-ctrl-create-polygon-mode-popup-container
|
|
289
|
+
.amplify-ctrl-create-polygon-mode-popup::after {
|
|
290
|
+
content: "";
|
|
291
|
+
position: absolute;
|
|
292
|
+
top: 100%;
|
|
293
|
+
left: 50%;
|
|
294
|
+
margin-left: -5px;
|
|
295
|
+
border-width: 5px;
|
|
296
|
+
border-style: solid;
|
|
297
|
+
border-color: white transparent transparent transparent;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Toggle this class when clicking on the popup container (hide and show the popup) */
|
|
301
|
+
.amplify-ctrl-create-polygon-mode-popup-container .show {
|
|
302
|
+
visibility: visible;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.amplify-ctrl-create-polygon-mode-popup-step {
|
|
306
|
+
color: black;
|
|
307
|
+
display: flex;
|
|
308
|
+
flex-direction: column;
|
|
309
|
+
justify-content: center;
|
|
310
|
+
font-weight: 500;
|
|
311
|
+
text-align: initial;
|
|
312
|
+
width: 116px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* Add Geofence Prompt Styles */
|
|
316
|
+
|
|
317
|
+
.amplify-ctrl-add-geofence {
|
|
318
|
+
background: #003560;
|
|
319
|
+
display: flex;
|
|
320
|
+
flex-direction: column;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.amplify-ctrl-add-geofence-input {
|
|
324
|
+
padding: 5px 8px;
|
|
325
|
+
border: 1px solid #b0b8bf;
|
|
326
|
+
border-radius: 4px;
|
|
327
|
+
margin: 8px;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.amplify-ctrl-add-geofence-buttons {
|
|
331
|
+
display: flex;
|
|
332
|
+
justify-content: flex-end;
|
|
333
|
+
padding: 0 8px 8px 0px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* Delete Popup */
|
|
337
|
+
.amplify-ctrl-delete-popdown-container {
|
|
338
|
+
position: absolute;
|
|
339
|
+
right: 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.amplify-ctrl-delete-popdown {
|
|
343
|
+
padding: 12px;
|
|
344
|
+
font-weight: 600;
|
|
345
|
+
color: white;
|
|
346
|
+
background: #459844;
|
|
347
|
+
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.amplify-ctrl-delete-popdown-close-button {
|
|
351
|
+
text-align: right;
|
|
352
|
+
cursor: pointer;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* Other Styles */
|
|
356
|
+
|
|
357
|
+
.amplify-ctrl-list-item-controls {
|
|
358
|
+
display: flex;
|
|
359
|
+
flex-direction: row;
|
|
360
|
+
background: #003560;
|
|
361
|
+
pointer-events: auto;
|
|
362
|
+
justify-content: space-around;
|
|
363
|
+
padding-bottom: 8px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.amplify-ctrl-list-item-controls-right {
|
|
367
|
+
display: flex;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.amplify-ctrl-edit-button {
|
|
371
|
+
margin-right: 12px;
|
|
372
|
+
display: none;
|
|
373
|
+
cursor: pointer;
|
|
374
|
+
background: rgba(255, 255, 255, 0.3);
|
|
375
|
+
width: 24px;
|
|
376
|
+
height: 24px;
|
|
377
|
+
border-radius: 50%;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.amplify-ctrl-save-button {
|
|
381
|
+
background: #ffffff;
|
|
382
|
+
border-radius: 4px;
|
|
383
|
+
padding: 4px 16px;
|
|
384
|
+
font-weight: bold;
|
|
385
|
+
cursor: pointer;
|
|
386
|
+
color: black;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.maplibregl-ctrl-full-screen {
|
|
390
|
+
position: absolute;
|
|
391
|
+
height: 100vh;
|
|
392
|
+
width: 100vw;
|
|
393
|
+
pointer-events: none;
|
|
394
|
+
}
|