@blaze-cms/plugin-google-maps-fe 0.146.0-node18-tooltips.42 → 0.146.0-node18-core-styles-tooltips.56
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 +111 -23
- package/lib/GoogleMaps/GoogleMaps.js +1 -1
- package/lib/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsFactory.js +1 -0
- package/lib/GoogleMaps/GoogleMapsFactory.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-map-shapes.js +4 -4
- package/lib/GoogleMaps/helpers/build-map-shapes.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-query.js +2 -0
- package/lib/GoogleMaps/helpers/build-query.js.map +1 -1
- package/lib/GoogleMaps/helpers/set-shapes.js +5 -5
- package/lib/GoogleMaps/helpers/set-shapes.js.map +1 -1
- package/lib/GoogleMaps/queries.js +1 -0
- package/lib/GoogleMaps/queries.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsHtml.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-query.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-shapes-configs.js.map +1 -1
- package/lib-es/GoogleMaps/queries.js.map +1 -1
- package/lib-es/index.js +1 -1
- package/lib-es/index.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [0.146.0-node18-tooltips.
|
|
6
|
+
# [0.146.0-node18-core-styles-tooltips.56](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.55...v0.146.0-node18-core-styles-tooltips.56) (2026-03-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.146.0-node18-core-styles-tooltips.55](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.54...v0.146.0-node18-core-styles-tooltips.55) (2026-03-10)
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
### Bug Fixes
|
|
@@ -14,7 +22,87 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
14
22
|
|
|
15
23
|
|
|
16
24
|
|
|
17
|
-
# [0.146.0-node18-tooltips.
|
|
25
|
+
# [0.146.0-node18-core-styles-tooltips.54](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.53...v0.146.0-node18-core-styles-tooltips.54) (2026-03-02)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [0.146.0-node18-core-styles-tooltips.52](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.51...v0.146.0-node18-core-styles-tooltips.52) (2026-02-17)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# [0.146.0-node18-core-styles-tooltips.51](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.50...v0.146.0-node18-core-styles-tooltips.51) (2026-02-16)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# [0.146.0-node18-core-styles-tooltips.46](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.45...v0.146.0-node18-core-styles-tooltips.46) (2026-01-16)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# [0.146.0-node18-core-styles-tooltips.45](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.44...v0.146.0-node18-core-styles-tooltips.45) (2026-01-15)
|
|
58
|
+
|
|
59
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# [0.146.0-node18-core-styles-tooltips.44](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.43...v0.146.0-node18-core-styles-tooltips.44) (2026-01-02)
|
|
66
|
+
|
|
67
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# [0.146.0-node18-core-styles-tooltips.43](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.42...v0.146.0-node18-core-styles-tooltips.43) (2025-12-17)
|
|
74
|
+
|
|
75
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# [0.146.0-node18-core-styles-tooltips.42](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.41...v0.146.0-node18-core-styles-tooltips.42) (2025-12-17)
|
|
82
|
+
|
|
83
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
# [0.146.0-node18-core-styles-tooltips.41](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.40...v0.146.0-node18-core-styles-tooltips.41) (2025-12-15)
|
|
90
|
+
|
|
91
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
# [0.146.0-node18-core-styles-tooltips.38](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.37...v0.146.0-node18-core-styles-tooltips.38) (2025-12-04)
|
|
98
|
+
|
|
99
|
+
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# [0.146.0-node18-core-styles-tooltips.34](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.33...v0.146.0-node18-core-styles-tooltips.34) (2025-11-27)
|
|
18
106
|
|
|
19
107
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
20
108
|
|
|
@@ -22,7 +110,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
22
110
|
|
|
23
111
|
|
|
24
112
|
|
|
25
|
-
# [0.146.0-node18-tooltips.
|
|
113
|
+
# [0.146.0-node18-core-styles-tooltips.32](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.31...v0.146.0-node18-core-styles-tooltips.32) (2025-11-26)
|
|
26
114
|
|
|
27
115
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
28
116
|
|
|
@@ -30,7 +118,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
30
118
|
|
|
31
119
|
|
|
32
120
|
|
|
33
|
-
# [0.146.0-node18-tooltips.
|
|
121
|
+
# [0.146.0-node18-core-styles-tooltips.31](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.30...v0.146.0-node18-core-styles-tooltips.31) (2025-11-26)
|
|
34
122
|
|
|
35
123
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
36
124
|
|
|
@@ -38,7 +126,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
38
126
|
|
|
39
127
|
|
|
40
128
|
|
|
41
|
-
# [0.146.0-node18-tooltips.
|
|
129
|
+
# [0.146.0-node18-core-styles-tooltips.30](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.29...v0.146.0-node18-core-styles-tooltips.30) (2025-11-25)
|
|
42
130
|
|
|
43
131
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
44
132
|
|
|
@@ -46,7 +134,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
46
134
|
|
|
47
135
|
|
|
48
136
|
|
|
49
|
-
# [0.146.0-node18-tooltips.
|
|
137
|
+
# [0.146.0-node18-core-styles-tooltips.29](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.28...v0.146.0-node18-core-styles-tooltips.29) (2025-11-17)
|
|
50
138
|
|
|
51
139
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
52
140
|
|
|
@@ -54,7 +142,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
54
142
|
|
|
55
143
|
|
|
56
144
|
|
|
57
|
-
# [0.146.0-node18-tooltips.
|
|
145
|
+
# [0.146.0-node18-core-styles-tooltips.27](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.26...v0.146.0-node18-core-styles-tooltips.27) (2025-11-13)
|
|
58
146
|
|
|
59
147
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
60
148
|
|
|
@@ -62,7 +150,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
62
150
|
|
|
63
151
|
|
|
64
152
|
|
|
65
|
-
# [0.146.0-node18-tooltips.
|
|
153
|
+
# [0.146.0-node18-core-styles-tooltips.26](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.25...v0.146.0-node18-core-styles-tooltips.26) (2025-11-12)
|
|
66
154
|
|
|
67
155
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
68
156
|
|
|
@@ -70,7 +158,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
70
158
|
|
|
71
159
|
|
|
72
160
|
|
|
73
|
-
# [0.146.0-node18-tooltips.
|
|
161
|
+
# [0.146.0-node18-core-styles-tooltips.25](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.24...v0.146.0-node18-core-styles-tooltips.25) (2025-11-07)
|
|
74
162
|
|
|
75
163
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
76
164
|
|
|
@@ -78,7 +166,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
78
166
|
|
|
79
167
|
|
|
80
168
|
|
|
81
|
-
# [0.146.0-node18-tooltips.
|
|
169
|
+
# [0.146.0-node18-core-styles-tooltips.24](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.23...v0.146.0-node18-core-styles-tooltips.24) (2025-11-03)
|
|
82
170
|
|
|
83
171
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
84
172
|
|
|
@@ -86,7 +174,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
86
174
|
|
|
87
175
|
|
|
88
176
|
|
|
89
|
-
# [0.146.0-node18-tooltips.
|
|
177
|
+
# [0.146.0-node18-core-styles-tooltips.23](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.22...v0.146.0-node18-core-styles-tooltips.23) (2025-10-27)
|
|
90
178
|
|
|
91
179
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
92
180
|
|
|
@@ -94,7 +182,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
94
182
|
|
|
95
183
|
|
|
96
184
|
|
|
97
|
-
# [0.146.0-node18-tooltips.
|
|
185
|
+
# [0.146.0-node18-core-styles-tooltips.22](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.21...v0.146.0-node18-core-styles-tooltips.22) (2025-10-20)
|
|
98
186
|
|
|
99
187
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
100
188
|
|
|
@@ -102,7 +190,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
102
190
|
|
|
103
191
|
|
|
104
192
|
|
|
105
|
-
# [0.146.0-node18-tooltips.
|
|
193
|
+
# [0.146.0-node18-core-styles-tooltips.20](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.19...v0.146.0-node18-core-styles-tooltips.20) (2025-10-03)
|
|
106
194
|
|
|
107
195
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
108
196
|
|
|
@@ -110,7 +198,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
110
198
|
|
|
111
199
|
|
|
112
200
|
|
|
113
|
-
# [0.146.0-node18-tooltips.
|
|
201
|
+
# [0.146.0-node18-core-styles-tooltips.19](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.18...v0.146.0-node18-core-styles-tooltips.19) (2025-10-01)
|
|
114
202
|
|
|
115
203
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
116
204
|
|
|
@@ -118,7 +206,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
118
206
|
|
|
119
207
|
|
|
120
208
|
|
|
121
|
-
# [0.146.0-node18-tooltips.
|
|
209
|
+
# [0.146.0-node18-core-styles-tooltips.18](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.17...v0.146.0-node18-core-styles-tooltips.18) (2025-09-29)
|
|
122
210
|
|
|
123
211
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
124
212
|
|
|
@@ -126,7 +214,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
126
214
|
|
|
127
215
|
|
|
128
216
|
|
|
129
|
-
# [0.146.0-node18-tooltips.
|
|
217
|
+
# [0.146.0-node18-core-styles-tooltips.15](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.14...v0.146.0-node18-core-styles-tooltips.15) (2025-09-23)
|
|
130
218
|
|
|
131
219
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
132
220
|
|
|
@@ -134,7 +222,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
134
222
|
|
|
135
223
|
|
|
136
224
|
|
|
137
|
-
# [0.146.0-node18-tooltips.
|
|
225
|
+
# [0.146.0-node18-core-styles-tooltips.13](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.12...v0.146.0-node18-core-styles-tooltips.13) (2025-09-15)
|
|
138
226
|
|
|
139
227
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
140
228
|
|
|
@@ -142,7 +230,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
142
230
|
|
|
143
231
|
|
|
144
232
|
|
|
145
|
-
# [0.146.0-node18-tooltips.
|
|
233
|
+
# [0.146.0-node18-core-styles-tooltips.12](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.11...v0.146.0-node18-core-styles-tooltips.12) (2025-08-27)
|
|
146
234
|
|
|
147
235
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
148
236
|
|
|
@@ -150,7 +238,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
150
238
|
|
|
151
239
|
|
|
152
240
|
|
|
153
|
-
# [0.146.0-node18-tooltips.11](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.10...v0.146.0-node18-tooltips.11) (2025-
|
|
241
|
+
# [0.146.0-node18-core-styles-tooltips.11](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.10...v0.146.0-node18-core-styles-tooltips.11) (2025-08-27)
|
|
154
242
|
|
|
155
243
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
156
244
|
|
|
@@ -158,7 +246,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
158
246
|
|
|
159
247
|
|
|
160
248
|
|
|
161
|
-
# [0.146.0-node18-tooltips.
|
|
249
|
+
# [0.146.0-node18-core-styles-tooltips.5](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.4...v0.146.0-node18-core-styles-tooltips.5) (2025-07-18)
|
|
162
250
|
|
|
163
251
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
164
252
|
|
|
@@ -166,7 +254,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
166
254
|
|
|
167
255
|
|
|
168
256
|
|
|
169
|
-
# [0.146.0-node18-tooltips.4](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.3...v0.146.0-node18-tooltips.4) (2025-
|
|
257
|
+
# [0.146.0-node18-core-styles-tooltips.4](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.3...v0.146.0-node18-core-styles-tooltips.4) (2025-07-10)
|
|
170
258
|
|
|
171
259
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
172
260
|
|
|
@@ -174,7 +262,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
174
262
|
|
|
175
263
|
|
|
176
264
|
|
|
177
|
-
# [0.146.0-node18-tooltips.
|
|
265
|
+
# [0.146.0-node18-core-styles-tooltips.1](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.0...v0.146.0-node18-core-styles-tooltips.1) (2025-06-20)
|
|
178
266
|
|
|
179
267
|
**Note:** Version bump only for package @blaze-cms/plugin-google-maps-fe
|
|
180
268
|
|
|
@@ -182,7 +270,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
182
270
|
|
|
183
271
|
|
|
184
272
|
|
|
185
|
-
# [0.146.0-node18-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-tooltips.0) (2025-
|
|
273
|
+
# [0.146.0-node18-core-styles-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-core-styles-tooltips.0) (2025-06-18)
|
|
186
274
|
|
|
187
275
|
|
|
188
276
|
### Bug Fixes
|
|
@@ -35,7 +35,7 @@ var _constants = require("../constants");
|
|
|
35
35
|
var _GoogleMapsHtml = _interopRequireDefault(require("./GoogleMapsHtml"));
|
|
36
36
|
var _excluded = ["type", "name", "modifier", "elementTitle", "imageData", "onMount", "onMountProps", "parent", "mapShapes", "centerCoordinates"];
|
|
37
37
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
38
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
38
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
39
39
|
var shouldNotUpdate = function shouldNotUpdate(props, nextProps) {
|
|
40
40
|
var _ref = [(0, _lodash.functions)(props), (0, _lodash.functions)(nextProps)],
|
|
41
41
|
funcs = _ref[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMaps.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_router","_reactPageBuilder","_customHooks","_lodash","_helpers","_constants","_GoogleMapsHtml","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof3","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","shouldNotUpdate","props","nextProps","_ref","functions","funcs","nextFuncs","noPropChange","isEqual","omit","noFuncChange","length","every","fn","toString","GoogleMaps","_ref2","type","name","modifier","elementTitle","imageData","onMount","onMountProps","parent","mapShapes","centerCoordinates","otherProps","_objectWithoutProperties2","router","useRouter","_useInView","useInView","IN_VIEW_CONFIG","_useInView2","_slicedToArray2","isIntersecting","mapRef","client","useApolloClient","_useState","useState","_useState2","map","setMap","useEffect","options","setMapOptions","onLoad","initialMap","window","google","maps","Map","current","_centerCoordinates","_centerCoordinates$","lat","latitude","lng","longitude","setCenter","bounds","LatLngBounds","forEach","_ref3","extend","LatLng","fitBounds","script","document","createElement","SCRIPT","src","concat","GOOGLE_MAPS_SCRIPT","process","env","GOOGLE_MAPS_API_KEY","head","append","addEventListener","LOAD","removeEventListener","setOptions","enableGeolocation","shouldActivateGeolocation","navigator","geolocation","getCurrentPosition","position","center","coords","addZoomListener","_typeof2","propTypes","PropTypes","array","string","func","object","defaultProps","_default","exports","React","memo","withTitle"],"sources":["../../src/GoogleMaps/GoogleMaps.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useApolloClient } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { withTitle } from '@blaze-cms/react-page-builder';\nimport { useInView } from '@blaze-react/utils/lib/customHooks';\nimport { functions, isEqual, omit } from 'lodash';\nimport { setMapOptions, addZoomListener } from './helpers';\nimport { GOOGLE_MAPS_SCRIPT, LOAD, SCRIPT, IN_VIEW_CONFIG } from '../constants';\nimport GoogleMapsHtml from './GoogleMapsHtml';\n\nconst shouldNotUpdate = (props, nextProps) => {\n const [funcs, nextFuncs] = [functions(props), functions(nextProps)];\n const noPropChange = isEqual(omit(props, funcs), omit(nextProps, nextFuncs));\n const noFuncChange =\n funcs.length === nextFuncs.length &&\n funcs.every(fn => props[fn].toString() === nextProps[fn].toString());\n return noPropChange && noFuncChange;\n};\n\nconst GoogleMaps = ({\n type,\n name,\n modifier,\n elementTitle,\n imageData,\n onMount,\n onMountProps,\n parent,\n mapShapes,\n centerCoordinates,\n ...otherProps\n}) => {\n const router = useRouter();\n const [isIntersecting, mapRef] = useInView(IN_VIEW_CONFIG);\n const client = useApolloClient();\n const [map, setMap] = useState();\n\n useEffect(() => {\n const options = setMapOptions(otherProps);\n const onLoad = () => {\n const initialMap = new window.google.maps.Map(mapRef.current, options);\n if (centerCoordinates.length === 1) {\n const [{ latitude: lat, longitude: lng }] = centerCoordinates;\n initialMap.setCenter({ lat, lng });\n } else {\n const bounds = new window.google.maps.LatLngBounds();\n centerCoordinates.forEach(({ latitude, longitude }) => {\n bounds.extend(new window.google.maps.LatLng(latitude, longitude));\n });\n initialMap.fitBounds(bounds);\n }\n setMap(initialMap);\n };\n\n if (!window.google) {\n const script = document.createElement(SCRIPT);\n script.src = `${GOOGLE_MAPS_SCRIPT}${process.env.GOOGLE_MAPS_API_KEY}`;\n document.head.append(script);\n script.addEventListener(LOAD, onLoad);\n return () => script.removeEventListener(LOAD, onLoad);\n }\n\n onLoad();\n\n if (map) {\n map.setOptions(options);\n const { enableGeolocation } = otherProps;\n const shouldActivateGeolocation = enableGeolocation && navigator.geolocation;\n if (shouldActivateGeolocation) {\n navigator.geolocation.getCurrentPosition(\n position => {\n const center = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n map.setCenter(center);\n },\n () => {}\n );\n }\n }\n\n return () => {};\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(\n () => {\n if (isIntersecting) addZoomListener(map, router, mapShapes, imageData, client);\n },\n [isIntersecting, map, mapShapes, imageData, router, client]\n );\n\n if (map && typeof onMount === `function`) onMount(map, onMountProps);\n\n return <GoogleMapsHtml mapRef={mapRef} />;\n};\n\nGoogleMaps.propTypes = {\n mapShapes: PropTypes.array,\n imageData: PropTypes.array,\n type: PropTypes.string,\n name: PropTypes.string,\n modifier: PropTypes.string,\n elementTitle: PropTypes.string,\n onMount: PropTypes.func,\n onMountProps: PropTypes.object,\n parent: PropTypes.object,\n centerCoordinates: PropTypes.array\n};\n\nGoogleMaps.defaultProps = {\n mapShapes: [],\n imageData: [],\n centerCoordinates: [],\n type: '',\n name: '',\n modifier: '',\n elementTitle: '',\n onMount: null,\n onMountProps: null,\n parent: {}\n};\n\nexport default React.memo(withTitle(GoogleMaps), shouldNotUpdate);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAR,sBAAA,CAAAF,OAAA;AAA8C,IAAAW,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAA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B,GAAG,EAAEpB,YAAY,CAAC;EAEpE,oBAAO1D,MAAA,YAAA0G,aAAA,CAAC9F,eAAA,WAAc;IAAC4D,MAAM,EAAEA;EAAO,CAAE,CAAC;AAC3C,CAAC;AAEDtB,UAAU,CAACgF,SAAS,GAAG;EACrBtE,SAAS,EAAEuE,qBAAS,CAACC,KAAK;EAC1B5E,SAAS,EAAE2E,qBAAS,CAACC,KAAK;EAC1BhF,IAAI,EAAE+E,qBAAS,CAACE,MAAM;EACtBhF,IAAI,EAAE8E,qBAAS,CAACE,MAAM;EACtB/E,QAAQ,EAAE6E,qBAAS,CAACE,MAAM;EAC1B9E,YAAY,EAAE4E,qBAAS,CAACE,MAAM;EAC9B5E,OAAO,EAAE0E,qBAAS,CAACG,IAAI;EACvB5E,YAAY,EAAEyE,qBAAS,CAACI,MAAM;EAC9B5E,MAAM,EAAEwE,qBAAS,CAACI,MAAM;EACxB1E,iBAAiB,EAAEsE,qBAAS,CAACC;AAC/B,CAAC;AAEDlF,UAAU,CAACsF,YAAY,GAAG;EACxB5E,SAAS,EAAE,EAAE;EACbJ,SAAS,EAAE,EAAE;EACbK,iBAAiB,EAAE,EAAE;EACrBT,IAAI,EAAE,EAAE;EACRC,IAAI,EAAE,EAAE;EACRC,QAAQ,EAAE,EAAE;EACZC,YAAY,EAAE,EAAE;EAChBE,OAAO,EAAE,IAAI;EACbC,YAAY,EAAE,IAAI;EAClBC,MAAM,EAAE,CAAC;AACX,CAAC;AAAC,IAAA8E,QAAA,GAAAC,OAAA,2BAEaC,iBAAK,CAACC,IAAI,CAAC,IAAAC,2BAAS,EAAC3F,UAAU,CAAC,EAAEf,eAAe,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"GoogleMaps.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_router","_reactPageBuilder","_customHooks","_lodash","_helpers","_constants","_GoogleMapsHtml","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof3","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","shouldNotUpdate","props","nextProps","_ref","functions","funcs","nextFuncs","noPropChange","isEqual","omit","noFuncChange","length","every","fn","toString","GoogleMaps","_ref2","type","name","modifier","elementTitle","imageData","onMount","onMountProps","parent","mapShapes","centerCoordinates","otherProps","_objectWithoutProperties2","router","useRouter","_useInView","useInView","IN_VIEW_CONFIG","_useInView2","_slicedToArray2","isIntersecting","mapRef","client","useApolloClient","_useState","useState","_useState2","map","setMap","useEffect","options","setMapOptions","onLoad","initialMap","window","google","maps","Map","current","_centerCoordinates","_centerCoordinates$","lat","latitude","lng","longitude","setCenter","bounds","LatLngBounds","forEach","_ref3","extend","LatLng","fitBounds","script","document","createElement","SCRIPT","src","concat","GOOGLE_MAPS_SCRIPT","process","env","GOOGLE_MAPS_API_KEY","head","append","addEventListener","LOAD","removeEventListener","setOptions","enableGeolocation","shouldActivateGeolocation","navigator","geolocation","getCurrentPosition","position","center","coords","addZoomListener","_typeof2","propTypes","PropTypes","array","string","func","object","defaultProps","_default","exports","React","memo","withTitle"],"sources":["../../src/GoogleMaps/GoogleMaps.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useApolloClient } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { withTitle } from '@blaze-cms/react-page-builder';\nimport { useInView } from '@blaze-react/utils/lib/customHooks';\nimport { functions, isEqual, omit } from 'lodash';\nimport { setMapOptions, addZoomListener } from './helpers';\nimport { GOOGLE_MAPS_SCRIPT, LOAD, SCRIPT, IN_VIEW_CONFIG } from '../constants';\nimport GoogleMapsHtml from './GoogleMapsHtml';\n\nconst shouldNotUpdate = (props, nextProps) => {\n const [funcs, nextFuncs] = [functions(props), functions(nextProps)];\n const noPropChange = isEqual(omit(props, funcs), omit(nextProps, nextFuncs));\n const noFuncChange =\n funcs.length === nextFuncs.length &&\n funcs.every(fn => props[fn].toString() === nextProps[fn].toString());\n return noPropChange && noFuncChange;\n};\n\nconst GoogleMaps = ({\n type,\n name,\n modifier,\n elementTitle,\n imageData,\n onMount,\n onMountProps,\n parent,\n mapShapes,\n centerCoordinates,\n ...otherProps\n}) => {\n const router = useRouter();\n const [isIntersecting, mapRef] = useInView(IN_VIEW_CONFIG);\n const client = useApolloClient();\n const [map, setMap] = useState();\n\n useEffect(() => {\n const options = setMapOptions(otherProps);\n const onLoad = () => {\n const initialMap = new window.google.maps.Map(mapRef.current, options);\n if (centerCoordinates.length === 1) {\n const [{ latitude: lat, longitude: lng }] = centerCoordinates;\n initialMap.setCenter({ lat, lng });\n } else {\n const bounds = new window.google.maps.LatLngBounds();\n centerCoordinates.forEach(({ latitude, longitude }) => {\n bounds.extend(new window.google.maps.LatLng(latitude, longitude));\n });\n initialMap.fitBounds(bounds);\n }\n setMap(initialMap);\n };\n\n if (!window.google) {\n const script = document.createElement(SCRIPT);\n script.src = `${GOOGLE_MAPS_SCRIPT}${process.env.GOOGLE_MAPS_API_KEY}`;\n document.head.append(script);\n script.addEventListener(LOAD, onLoad);\n return () => script.removeEventListener(LOAD, onLoad);\n }\n\n onLoad();\n\n if (map) {\n map.setOptions(options);\n const { enableGeolocation } = otherProps;\n const shouldActivateGeolocation = enableGeolocation && navigator.geolocation;\n if (shouldActivateGeolocation) {\n navigator.geolocation.getCurrentPosition(\n position => {\n const center = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n map.setCenter(center);\n },\n () => {}\n );\n }\n }\n\n return () => {};\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(\n () => {\n if (isIntersecting) addZoomListener(map, router, mapShapes, imageData, client);\n },\n [isIntersecting, map, mapShapes, imageData, router, client]\n );\n\n if (map && typeof onMount === `function`) onMount(map, onMountProps);\n\n return <GoogleMapsHtml mapRef={mapRef} />;\n};\n\nGoogleMaps.propTypes = {\n mapShapes: PropTypes.array,\n imageData: PropTypes.array,\n type: PropTypes.string,\n name: PropTypes.string,\n modifier: PropTypes.string,\n elementTitle: PropTypes.string,\n onMount: PropTypes.func,\n onMountProps: PropTypes.object,\n parent: PropTypes.object,\n centerCoordinates: PropTypes.array\n};\n\nGoogleMaps.defaultProps = {\n mapShapes: [],\n imageData: [],\n centerCoordinates: [],\n type: '',\n name: '',\n modifier: '',\n elementTitle: '',\n onMount: null,\n onMountProps: null,\n parent: {}\n};\n\nexport default React.memo(withTitle(GoogleMaps), shouldNotUpdate);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAR,sBAAA,CAAAF,OAAA;AAA8C,IAAAW,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAd,wBAAAc,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,QAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC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E,qBAAS,CAACE,MAAM;EAC1B9E,YAAY,EAAE4E,qBAAS,CAACE,MAAM;EAC9B5E,OAAO,EAAE0E,qBAAS,CAACG,IAAI;EACvB5E,YAAY,EAAEyE,qBAAS,CAACI,MAAM;EAC9B5E,MAAM,EAAEwE,qBAAS,CAACI,MAAM;EACxB1E,iBAAiB,EAAEsE,qBAAS,CAACC;AAC/B,CAAC;AAEDlF,UAAU,CAACsF,YAAY,GAAG;EACxB5E,SAAS,EAAE,EAAE;EACbJ,SAAS,EAAE,EAAE;EACbK,iBAAiB,EAAE,EAAE;EACrBT,IAAI,EAAE,EAAE;EACRC,IAAI,EAAE,EAAE;EACRC,QAAQ,EAAE,EAAE;EACZC,YAAY,EAAE,EAAE;EAChBE,OAAO,EAAE,IAAI;EACbC,YAAY,EAAE,IAAI;EAClBC,MAAM,EAAE,CAAC;AACX,CAAC;AAAC,IAAA8E,QAAA,GAAAC,OAAA,2BAEaC,iBAAK,CAACC,IAAI,CAAC,IAAAC,2BAAS,EAAC3F,UAAU,CAAC,EAAEf,eAAe,CAAC","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
require("core-js/modules/es.array.map.js");
|
|
10
|
+
require("core-js/modules/es.object.to-string.js");
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
13
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsFactory.js","names":["_react","_interopRequireDefault","require","_propTypes","_reactPageBuilder","_helpers","_GoogleMapsRender","_GoogleMapsHtml","_excluded","GoogleMapsFactory","_ref","entityGroups","parent","otherProps","_objectWithoutProperties2","_useGetEntitySchemasA","useGetEntitySchemasAsObj","map","_ref2","entity","data","loading","error","createElement","message","shapeConfigs","buildShapesConfig","_extends2","propTypes","PropTypes","object","array","defaultProps","_default","exports"],"sources":["../../src/GoogleMaps/GoogleMapsFactory.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGetEntitySchemasAsObj } from '@blaze-cms/react-page-builder';\nimport { buildShapesConfig } from './helpers';\nimport GoogleMapsRender from './GoogleMapsRender';\nimport GoogleMapsHtml from './GoogleMapsHtml';\n\nconst GoogleMapsFactory = ({ entityGroups, parent, ...otherProps }) => {\n const { data, loading, error } = useGetEntitySchemasAsObj(\n entityGroups.map(({ entity }) => entity)\n );\n\n if (loading) return <GoogleMapsHtml />;\n if (error) return error.message;\n\n const shapeConfigs = buildShapesConfig(data, entityGroups, parent);\n\n return (\n <GoogleMapsRender\n shapeConfigs={shapeConfigs}\n entityGroups={entityGroups}\n parent={parent}\n {...otherProps}\n />\n );\n};\n\nGoogleMapsFactory.propTypes = {\n parent: PropTypes.object,\n entityGroups: PropTypes.array\n};\n\nGoogleMapsFactory.defaultProps = {\n parent: {},\n entityGroups: []\n};\n\nexport default GoogleMapsFactory;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GoogleMapsFactory.js","names":["_react","_interopRequireDefault","require","_propTypes","_reactPageBuilder","_helpers","_GoogleMapsRender","_GoogleMapsHtml","_excluded","GoogleMapsFactory","_ref","entityGroups","parent","otherProps","_objectWithoutProperties2","_useGetEntitySchemasA","useGetEntitySchemasAsObj","map","_ref2","entity","data","loading","error","createElement","message","shapeConfigs","buildShapesConfig","_extends2","propTypes","PropTypes","object","array","defaultProps","_default","exports"],"sources":["../../src/GoogleMaps/GoogleMapsFactory.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGetEntitySchemasAsObj } from '@blaze-cms/react-page-builder';\nimport { buildShapesConfig } from './helpers';\nimport GoogleMapsRender from './GoogleMapsRender';\nimport GoogleMapsHtml from './GoogleMapsHtml';\n\nconst GoogleMapsFactory = ({ entityGroups, parent, ...otherProps }) => {\n const { data, loading, error } = useGetEntitySchemasAsObj(\n entityGroups.map(({ entity }) => entity)\n );\n\n if (loading) return <GoogleMapsHtml />;\n if (error) return error.message;\n\n const shapeConfigs = buildShapesConfig(data, entityGroups, parent);\n\n return (\n <GoogleMapsRender\n shapeConfigs={shapeConfigs}\n entityGroups={entityGroups}\n parent={parent}\n {...otherProps}\n />\n );\n};\n\nGoogleMapsFactory.propTypes = {\n parent: PropTypes.object,\n entityGroups: PropTypes.array\n};\n\nGoogleMapsFactory.defaultProps = {\n parent: {},\n entityGroups: []\n};\n\nexport default GoogleMapsFactory;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AAA8C,IAAAM,SAAA;AAE9C,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAAgD;EAAA,IAA1CC,YAAY,GAAAD,IAAA,CAAZC,YAAY;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAKC,UAAU,OAAAC,yBAAA,aAAAJ,IAAA,EAAAF,SAAA;EAC9D,IAAAO,qBAAA,GAAiC,IAAAC,0CAAwB,EACvDL,YAAY,CAACM,GAAG,CAAC,UAAAC,KAAA;MAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;MAAA,OAAOA,MAAM;IAAA,EACzC,CAAC;IAFOC,IAAI,GAAAL,qBAAA,CAAJK,IAAI;IAAEC,OAAO,GAAAN,qBAAA,CAAPM,OAAO;IAAEC,KAAK,GAAAP,qBAAA,CAALO,KAAK;EAI5B,IAAID,OAAO,EAAE,oBAAOrB,MAAA,YAAAuB,aAAA,CAAChB,eAAA,WAAc,MAAE,CAAC;EACtC,IAAIe,KAAK,EAAE,OAAOA,KAAK,CAACE,OAAO;EAE/B,IAAMC,YAAY,GAAG,IAAAC,0BAAiB,EAACN,IAAI,EAAET,YAAY,EAAEC,MAAM,CAAC;EAElE,oBACEZ,MAAA,YAAAuB,aAAA,CAACjB,iBAAA,WAAgB,MAAAqB,SAAA;IACfF,YAAY,EAAEA,YAAa;IAC3Bd,YAAY,EAAEA,YAAa;IAC3BC,MAAM,EAAEA;EAAO,GACXC,UAAU,CACf,CAAC;AAEN,CAAC;AAEDJ,iBAAiB,CAACmB,SAAS,GAAG;EAC5BhB,MAAM,EAAEiB,qBAAS,CAACC,MAAM;EACxBnB,YAAY,EAAEkB,qBAAS,CAACE;AAC1B,CAAC;AAEDtB,iBAAiB,CAACuB,YAAY,GAAG;EAC/BpB,MAAM,EAAE,CAAC,CAAC;EACVD,YAAY,EAAE;AAChB,CAAC;AAAC,IAAAsB,QAAA,GAAAC,OAAA,cAEazB,iBAAiB","ignoreList":[]}
|
|
@@ -19,10 +19,10 @@ require("core-js/modules/es.object.to-string.js");
|
|
|
19
19
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
20
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
var
|
|
22
|
+
var _getLatLonValues = function getLatLonValues(keys, data) {
|
|
23
23
|
if (keys.length === 1) return data[keys];
|
|
24
24
|
var key = keys.shift();
|
|
25
|
-
return
|
|
25
|
+
return _getLatLonValues(keys, data[key]);
|
|
26
26
|
};
|
|
27
27
|
var getLatLong = function getLatLong(latProp, lonProp, shape, data) {
|
|
28
28
|
var latitude = shape.latitude,
|
|
@@ -33,8 +33,8 @@ var getLatLong = function getLatLong(latProp, lonProp, shape, data) {
|
|
|
33
33
|
};
|
|
34
34
|
var latKeys = latProp.split('.');
|
|
35
35
|
var lonKeys = lonProp.split('.');
|
|
36
|
-
var lat =
|
|
37
|
-
var lon =
|
|
36
|
+
var lat = _getLatLonValues(latKeys, data);
|
|
37
|
+
var lon = _getLatLonValues(lonKeys, data);
|
|
38
38
|
return {
|
|
39
39
|
latitude: lat,
|
|
40
40
|
longitude: lon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-map-shapes.js","names":["getLatLonValues","keys","data","length","key","shift","getLatLong","latProp","lonProp","shape","latitude","longitude","latKeys","split","lonKeys","lat","lon","buildMapShapes","shapesOptions","shapesData","mapShapes","forEach","shapeKey","entityOptions","shapeOptions","dataSummaries","enableInfoPane","shapeData","Array","isArray","results","url","_getLatLong","formatedShape","_objectSpread","push","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-map-shapes.js"],"sourcesContent":["const getLatLonValues = (keys, data) => {\n if (keys.length === 1) return data[keys];\n const key = keys.shift();\n return getLatLonValues(keys, data[key]);\n};\n\nconst getLatLong = (latProp, lonProp, shape, data) => {\n const { latitude, longitude } = shape;\n\n if (!latProp || !lonProp) return { latitude, longitude };\n const latKeys = latProp.split('.');\n const lonKeys = lonProp.split('.');\n const lat = getLatLonValues(latKeys, data);\n const lon = getLatLonValues(lonKeys, data);\n\n return { latitude: lat, longitude: lon };\n};\n\nconst buildMapShapes = (shapesOptions, shapesData) => {\n if (!shapesData) return [];\n const mapShapes = [];\n shapesOptions.forEach(shape => {\n const { shapeKey, entityOptions, shapeOptions } = shape;\n const { dataSummaries, enableInfoPane } = entityOptions;\n\n const shapeData = Array.isArray(shapesData[shapeKey])\n ? shapesData[shapeKey]\n : shapesData[shapeKey].results;\n if (!shapeData) return;\n const { latProp, lonProp } = entityOptions;\n\n shapeData.forEach(data => {\n const { url } = data;\n const { latitude, longitude } = getLatLong(latProp, lonProp, shapeOptions, data);\n\n const formatedShape = {\n ...shapeOptions,\n latitude,\n longitude,\n dataSummaries,\n enableInfoPane,\n url,\n shapeData: data\n };\n\n mapShapes.push(formatedShape);\n });\n });\n\n return mapShapes;\n};\n\nexport default buildMapShapes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,
|
|
1
|
+
{"version":3,"file":"build-map-shapes.js","names":["getLatLonValues","keys","data","length","key","shift","getLatLong","latProp","lonProp","shape","latitude","longitude","latKeys","split","lonKeys","lat","lon","buildMapShapes","shapesOptions","shapesData","mapShapes","forEach","shapeKey","entityOptions","shapeOptions","dataSummaries","enableInfoPane","shapeData","Array","isArray","results","url","_getLatLong","formatedShape","_objectSpread","push","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-map-shapes.js"],"sourcesContent":["const getLatLonValues = (keys, data) => {\n if (keys.length === 1) return data[keys];\n const key = keys.shift();\n return getLatLonValues(keys, data[key]);\n};\n\nconst getLatLong = (latProp, lonProp, shape, data) => {\n const { latitude, longitude } = shape;\n\n if (!latProp || !lonProp) return { latitude, longitude };\n const latKeys = latProp.split('.');\n const lonKeys = lonProp.split('.');\n const lat = getLatLonValues(latKeys, data);\n const lon = getLatLonValues(lonKeys, data);\n\n return { latitude: lat, longitude: lon };\n};\n\nconst buildMapShapes = (shapesOptions, shapesData) => {\n if (!shapesData) return [];\n const mapShapes = [];\n shapesOptions.forEach(shape => {\n const { shapeKey, entityOptions, shapeOptions } = shape;\n const { dataSummaries, enableInfoPane } = entityOptions;\n\n const shapeData = Array.isArray(shapesData[shapeKey])\n ? shapesData[shapeKey]\n : shapesData[shapeKey].results;\n if (!shapeData) return;\n const { latProp, lonProp } = entityOptions;\n\n shapeData.forEach(data => {\n const { url } = data;\n const { latitude, longitude } = getLatLong(latProp, lonProp, shapeOptions, data);\n\n const formatedShape = {\n ...shapeOptions,\n latitude,\n longitude,\n dataSummaries,\n enableInfoPane,\n url,\n shapeData: data\n };\n\n mapShapes.push(formatedShape);\n });\n });\n\n return mapShapes;\n};\n\nexport default buildMapShapes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,gBAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAI,EAAEC,IAAI,EAAK;EACtC,IAAID,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOD,IAAI,CAACD,IAAI,CAAC;EACxC,IAAMG,GAAG,GAAGH,IAAI,CAACI,KAAK,CAAC,CAAC;EACxB,OAAOL,gBAAe,CAACC,IAAI,EAAEC,IAAI,CAACE,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,IAAME,UAAU,GAAG,SAAbA,UAAUA,CAAIC,OAAO,EAAEC,OAAO,EAAEC,KAAK,EAAEP,IAAI,EAAK;EACpD,IAAQQ,QAAQ,GAAgBD,KAAK,CAA7BC,QAAQ;IAAEC,SAAS,GAAKF,KAAK,CAAnBE,SAAS;EAE3B,IAAI,CAACJ,OAAO,IAAI,CAACC,OAAO,EAAE,OAAO;IAAEE,QAAQ,EAARA,QAAQ;IAAEC,SAAS,EAATA;EAAU,CAAC;EACxD,IAAMC,OAAO,GAAGL,OAAO,CAACM,KAAK,CAAC,GAAG,CAAC;EAClC,IAAMC,OAAO,GAAGN,OAAO,CAACK,KAAK,CAAC,GAAG,CAAC;EAClC,IAAME,GAAG,GAAGf,gBAAe,CAACY,OAAO,EAAEV,IAAI,CAAC;EAC1C,IAAMc,GAAG,GAAGhB,gBAAe,CAACc,OAAO,EAAEZ,IAAI,CAAC;EAE1C,OAAO;IAAEQ,QAAQ,EAAEK,GAAG;IAAEJ,SAAS,EAAEK;EAAI,CAAC;AA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S,CAACe,IAAI,CAACF,aAAa,CAAC;IAC/B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOb,SAAS;AAClB,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,cAEapB,cAAc","ignoreList":[]}
|
|
@@ -10,6 +10,8 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
require("core-js/modules/es.array.index-of.js");
|
|
11
11
|
require("core-js/modules/es.array.join.js");
|
|
12
12
|
require("core-js/modules/es.array.map.js");
|
|
13
|
+
require("core-js/modules/es.date.to-json.js");
|
|
14
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
15
|
require("core-js/modules/es.string.trim.js");
|
|
14
16
|
var _lodash = _interopRequireDefault(require("lodash.upperfirst"));
|
|
15
17
|
var _lodash2 = _interopRequireDefault(require("lodash.camelcase"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-query.js","names":["_lodash","_interopRequireDefault","require","_lodash2","_queries","buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","upperFirst","camelcase","filterQueryKey","indexOf","concat","push","apply","_toConsumableArray2","props","trim","singleItemQuery","generateFiltersQuery","JSON","stringify","generateIdsQuery","join","query","generateQuery","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import upperFirst from 'lodash.upperfirst';\nimport camelcase from 'lodash.camelcase';\nimport { generateQuery, generateIdsQuery, generateFiltersQuery } from '../queries';\n\nconst buildQuery = entityConfigs => {\n const entityIds = [];\n const rawQueryStringified = '';\n const queryString = entityConfigs\n .map(entityConfig => {\n const { action, ids, entity, propsQuery, shapeKey, filtersObject } = entityConfig;\n if (!action) return '';\n const formatedEntity = upperFirst(camelcase(entity));\n const filterQueryKey =\n action.indexOf('Published') !== -1 ? `Published${formatedEntity}` : formatedEntity;\n\n entityIds.push(...ids);\n const props = propsQuery.trim() || 'id';\n const singleItemQuery = filtersObject\n ? generateFiltersQuery(shapeKey, props, JSON.stringify(filtersObject), filterQueryKey)\n : generateIdsQuery(shapeKey, props, action, ids);\n\n return singleItemQuery;\n })\n .join(' ');\n\n return {\n query: queryString ? generateQuery(queryString) : '',\n ids: entityIds,\n rawQueryStringified\n };\n};\n\nexport default buildQuery;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-query.js","names":["_lodash","_interopRequireDefault","require","_lodash2","_queries","buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","upperFirst","camelcase","filterQueryKey","indexOf","concat","push","apply","_toConsumableArray2","props","trim","singleItemQuery","generateFiltersQuery","JSON","stringify","generateIdsQuery","join","query","generateQuery","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import upperFirst from 'lodash.upperfirst';\nimport camelcase from 'lodash.camelcase';\nimport { generateQuery, generateIdsQuery, generateFiltersQuery } from '../queries';\n\nconst buildQuery = entityConfigs => {\n const entityIds = [];\n const rawQueryStringified = '';\n const queryString = entityConfigs\n .map(entityConfig => {\n const { action, ids, entity, propsQuery, shapeKey, filtersObject } = entityConfig;\n if (!action) return '';\n const formatedEntity = upperFirst(camelcase(entity));\n const filterQueryKey =\n action.indexOf('Published') !== -1 ? `Published${formatedEntity}` : formatedEntity;\n\n entityIds.push(...ids);\n const props = propsQuery.trim() || 'id';\n const singleItemQuery = filtersObject\n ? generateFiltersQuery(shapeKey, props, JSON.stringify(filtersObject), filterQueryKey)\n : generateIdsQuery(shapeKey, props, action, ids);\n\n return singleItemQuery;\n })\n .join(' ');\n\n return {\n query: queryString ? generateQuery(queryString) : '',\n ids: entityIds,\n rawQueryStringified\n };\n};\n\nexport default buildQuery;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CA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,WAAW,GAAG,IAAA2B,sBAAa,EAAC3B,WAAW,CAAC,GAAG,EAAE;IACpDI,GAAG,EAAEN,SAAS;IACdC,mBAAmB,EAAnBA;EACF,CAAC;AACH,CAAC;AAAC,IAAA6B,QAAA,GAAAC,OAAA,cAEajC,UAAU","ignoreList":[]}
|
|
@@ -41,7 +41,7 @@ var _getPath = _interopRequireDefault(require("./get-path"));
|
|
|
41
41
|
var _constants = require("../../constants");
|
|
42
42
|
var _excluded = ["elementTitle", "type", "propsToDisplay"];
|
|
43
43
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
44
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
44
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
45
45
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
46
46
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
47
47
|
var shapesArray = [];
|
|
@@ -74,7 +74,7 @@ var addShapeListeners = function addShapeListeners(map, router, shape, imageData
|
|
|
74
74
|
content: ''
|
|
75
75
|
});
|
|
76
76
|
shapeInstance.addListener(_constants.CLICK, /*#__PURE__*/function () {
|
|
77
|
-
var _ref = (0, _asyncToGenerator2["default"])(
|
|
77
|
+
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(event) {
|
|
78
78
|
var content;
|
|
79
79
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
80
80
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -145,14 +145,14 @@ var getIconUrl = function getIconUrl(imageId, imageData) {
|
|
|
145
145
|
return image.url;
|
|
146
146
|
};
|
|
147
147
|
var infoWindowContent = /*#__PURE__*/function () {
|
|
148
|
-
var _ref3 = (0, _asyncToGenerator2["default"])(
|
|
148
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(imageData, dataSummaries, url, shapeData, client) {
|
|
149
149
|
var summariesWithContent, _ref5, imageId, image, shouldShowImage, getImageElement;
|
|
150
150
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
151
151
|
while (1) switch (_context3.prev = _context3.next) {
|
|
152
152
|
case 0:
|
|
153
153
|
_context3.next = 2;
|
|
154
|
-
return Promise.all(dataSummaries.map(
|
|
155
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(
|
|
154
|
+
return Promise.all(dataSummaries.map(/*#__PURE__*/function () {
|
|
155
|
+
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(dataSummary) {
|
|
156
156
|
var elementTitle, type, propsToDisplay, otherProps, isTypeHeading, summaryPropsWithContent, modifier, SummaryComponent, getDataSummaryComponent;
|
|
157
157
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
158
158
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-shapes.js","names":["_react","_interopRequireDefault","require","_lodash","ReactDOMServer","_interopRequireWildcard","_nextjsComponents","_client","_reactPageBuilder","_getPath","_constants","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","shapesArray","infoWindowArray","clearShapes","shape","setMap","closeInfoWindows","infoWindow","close","addShapeListeners","map","router","imageData","shapeInstance","client","_shape$enableInfoPane","enableInfoPane","_shape$dataSummaries","dataSummaries","url","shapeData","window","google","maps","InfoWindow","content","addListener","CLICK","_ref","_asyncToGenerator2","_regenerator","mark","_callee","event","wrap","_callee$","_context","prev","next","t0","infoWindowContent","t1","sent","renderToString","setContent","setPosition","latLng","open","stop","_x","setStyleOptions","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","styleSettings","reduce","acc","key","settingValue","shouldValueBeNumber","includes","COLOR","hasValuePassedCondition","isNumber","areRectangleBoundsNumbers","bounds","every","bound","isPositionCorrect","lat","lng","getIconUrl","imageId","image","find","_ref2","id","_ref3","_callee3","summariesWithContent","_ref5","shouldShowImage","getImageElement","_callee3$","_context3","Promise","all","_ref4","_callee2","dataSummary","elementTitle","type","propsToDisplay","otherProps","isTypeHeading","summaryPropsWithContent","modifier","SummaryComponent","getDataSummaryComponent","_callee2$","_context2","_objectWithoutProperties2","HEADING_LARGE","buildPropsToDisplayWithContent","getClassModifiers","LIST","summaryComponents","render","preload","abrupt","component","createElement","ApolloProvider","Link","href","_x7","_ref6","imageUrl","data","imageElement","className","src","alt","altText","Fragment","_x2","_x3","_x4","_x5","_x6","getIcon","_shape$markerWidth","markerWidth","_shape$markerHeight","markerHeight","svgPath","iconUrl","icon","scaledSize","Size","svgMarker","path","DEFAULT_CUSTOM_MARKER_PATH","rotation","scale","setMarker","_shape$label","label","latitude","longitude","marker","Marker","position","title","setPolyline","paths","getPath","polyline","Polyline","geodesic","setPolygon","unParsedPaths","polygon","Polygon","setRectangle","northBound","southBound","eastBound","westBound","rectangle","Rectangle","north","south","east","west","setCircle","radius","circle","Circle","center","setShapes","shapes","mapZoom","getZoom","minZoom","maxZoom","MARKER","POLYLINE","POLYGON","RECTANGLE","CIRCLE","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/set-shapes.js"],"sourcesContent":["import React from 'react';\nimport isNumber from 'lodash.isnumber';\nimport * as ReactDOMServer from 'react-dom/server';\nimport { Link } from '@blaze-cms/nextjs-components';\nimport { ApolloProvider } from '@apollo/client';\nimport {\n buildPropsToDisplayWithContent,\n summaryComponents,\n getClassModifiers\n} from '@blaze-cms/react-page-builder';\nimport getPath from './get-path';\nimport {\n MARKER,\n POLYLINE,\n POLYGON,\n RECTANGLE,\n CIRCLE,\n COLOR,\n CLICK,\n HEADING_LARGE,\n LIST,\n DEFAULT_CUSTOM_MARKER_PATH\n} from '../../constants';\n\nconst shapesArray = [];\nconst infoWindowArray = [];\n\nconst clearShapes = () => {\n if (shapesArray.length) {\n shapesArray.forEach(shape => shape.setMap(null));\n shapesArray.length = 0;\n }\n};\n\nconst closeInfoWindows = () => {\n if (infoWindowArray.length) {\n infoWindowArray.forEach(infoWindow => infoWindow.close());\n infoWindowArray.length = 0;\n }\n};\n\nconst addShapeListeners = (map, router, shape, imageData, shapeInstance, client) => {\n const { enableInfoPane = false, dataSummaries = [], url, shapeData } = shape;\n\n if (enableInfoPane) {\n const infoWindow = new window.google.maps.InfoWindow({\n content: ''\n });\n\n shapeInstance.addListener(CLICK, async event => {\n closeInfoWindows();\n const content = ReactDOMServer.renderToString(\n await infoWindowContent(imageData, dataSummaries, url, shapeData, client)\n );\n infoWindow.setContent(content);\n infoWindow.setPosition(event.latLng);\n infoWindow.open(map, shapeInstance);\n infoWindowArray.push(infoWindow);\n });\n } else if (url) {\n shapeInstance.addListener(CLICK, () => {\n router.push(url);\n });\n }\n};\n\nconst setStyleOptions = shape => {\n const { strokeColor, strokeOpacity, strokeWeight, fillColor, fillOpacity } = shape;\n const styleSettings = { strokeColor, fillColor, strokeOpacity, strokeWeight, fillOpacity };\n\n return {\n ...Object.keys(styleSettings).reduce((acc, key) => {\n const settingValue = styleSettings[key];\n const shouldValueBeNumber = !key.includes(COLOR);\n const hasValuePassedCondition = shouldValueBeNumber ? isNumber(settingValue) : settingValue;\n if (hasValuePassedCondition) acc[key] = settingValue;\n return acc;\n }, {})\n };\n};\n\nconst areRectangleBoundsNumbers = bounds => bounds.every(bound => isNumber(bound));\n\nconst isPositionCorrect = (lat, lng) => isNumber(lat) && isNumber(lng);\n\nconst getIconUrl = (imageId, imageData) => {\n if (!imageId) return '';\n const image = imageData.find(({ id }) => id === imageId);\n if (!image || !image.url) return '';\n\n return image.url;\n};\n\nconst infoWindowContent = async (imageData, dataSummaries, url, shapeData, client) => {\n const summariesWithContent = await Promise.all(\n dataSummaries.map(async dataSummary => {\n const { elementTitle, type, propsToDisplay, ...otherProps } = dataSummary;\n const isTypeHeading = type === HEADING_LARGE;\n const summaryPropsWithContent = buildPropsToDisplayWithContent(shapeData, propsToDisplay);\n const modifier = getClassModifiers(LIST, otherProps);\n const SummaryComponent = summaryComponents[type];\n await SummaryComponent.render.preload(); // preload dynamic nextjs component\n\n if (!summaryPropsWithContent.length) return null;\n\n const getDataSummaryComponent = () => {\n const component = (\n <ApolloProvider client={client}>\n <SummaryComponent\n key={type}\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryPropsWithContent}\n />\n </ApolloProvider>\n );\n\n if (isTypeHeading && url) return <Link href={url}>{component}</Link>;\n\n return component;\n };\n\n return getDataSummaryComponent();\n })\n );\n const { imageId } = shapeData || {};\n const image = imageData.find(({ id }) => id === imageId);\n const shouldShowImage = image && image.url;\n\n const getImageElement = () => {\n const { url: imageUrl, data } = image;\n const imageElement = (\n <img className=\"info__window\" src={imageUrl} alt={data && data.altText ? data.altText : ''} />\n );\n\n if (url) return <Link href={url}>{imageElement}</Link>;\n\n return imageElement;\n };\n\n return (\n <>\n {shouldShowImage && getImageElement()}\n {summariesWithContent}\n </>\n );\n};\n\nfunction getIcon(imageData, shape) {\n const {\n imageId,\n markerWidth = 50,\n markerHeight = 50,\n strokeColor,\n strokeOpacity,\n strokeWeight,\n fillColor,\n fillOpacity,\n svgPath\n } = shape;\n const iconUrl = getIconUrl(imageId, imageData);\n\n const icon = iconUrl\n ? {\n url: iconUrl,\n scaledSize: new window.google.maps.Size(markerWidth || 50, markerHeight || 50)\n }\n : null;\n\n if (icon) return icon;\n\n if (!svgPath && !fillColor && !strokeColor) return {}; // any can be true for custom marker\n\n const svgMarker = {\n path: svgPath || DEFAULT_CUSTOM_MARKER_PATH,\n strokeColor,\n strokeOpacity,\n strokeWeight,\n fillColor,\n fillOpacity,\n rotation: 0,\n scale: 2\n };\n return svgMarker;\n}\n\nconst setMarker = (map, router, shape, imageData, client) => {\n const { label = '', latitude, longitude } = shape;\n\n if (isPositionCorrect(latitude, longitude)) {\n const svgMarker = getIcon(imageData, shape);\n\n const marker = new window.google.maps.Marker({\n position: { lat: latitude, lng: longitude },\n map,\n icon: svgMarker,\n title: label || ''\n });\n\n addShapeListeners(map, router, shape, imageData, marker, client);\n\n shapesArray.push(marker);\n\n marker.setMap(map);\n }\n};\n\nconst setPolyline = (map, router, shape, imageData) => {\n const { paths } = shape;\n const path = getPath(paths);\n\n if (path.length) {\n const polyline = new window.google.maps.Polyline({\n path,\n geodesic: true,\n ...setStyleOptions(shape)\n });\n\n addShapeListeners(map, router, shape, imageData, polyline);\n\n shapesArray.push(polyline);\n\n polyline.setMap(map);\n }\n};\n\nconst setPolygon = (map, router, shape, imageData) => {\n const { paths: unParsedPaths } = shape;\n const paths = getPath(unParsedPaths);\n\n if (paths.length) {\n const polygon = new window.google.maps.Polygon({\n paths,\n ...setStyleOptions(shape)\n });\n\n addShapeListeners(map, router, shape, imageData, polygon);\n\n shapesArray.push(polygon);\n\n polygon.setMap(map);\n }\n};\n\nconst setRectangle = (map, router, shape, imageData) => {\n const { northBound, southBound, eastBound, westBound } = shape;\n if (areRectangleBoundsNumbers([northBound, southBound, eastBound, westBound])) {\n const rectangle = new window.google.maps.Rectangle({\n ...setStyleOptions(shape),\n map,\n bounds: {\n north: northBound,\n south: southBound,\n east: eastBound,\n west: westBound\n }\n });\n\n addShapeListeners(map, router, shape, imageData, rectangle);\n\n shapesArray.push(rectangle);\n\n rectangle.setMap(map);\n }\n};\n\nconst setCircle = (map, router, shape, imageData) => {\n const { latitude, longitude, radius } = shape;\n if (isPositionCorrect(latitude, longitude) && isNumber(radius)) {\n const circle = new window.google.maps.Circle({\n ...setStyleOptions(shape),\n map,\n center: { lat: latitude, lng: longitude },\n radius\n });\n\n addShapeListeners(map, router, shape, imageData, circle);\n\n shapesArray.push(circle);\n\n circle.setMap(map);\n }\n};\n\nconst setShapes = (map, router, shapes, imageData, client) => {\n const mapZoom = map.getZoom();\n clearShapes();\n\n shapes.forEach(shape => {\n const { type, minZoom, maxZoom } = shape;\n\n if (mapZoom >= minZoom && mapZoom <= maxZoom) {\n switch (type) {\n case MARKER: {\n setMarker(map, router, shape, imageData, client);\n break;\n }\n case POLYLINE: {\n setPolyline(map, router, shape, imageData);\n break;\n }\n case POLYGON: {\n setPolygon(map, router, shape, imageData);\n break;\n }\n case RECTANGLE: {\n setRectangle(map, router, shape, imageData);\n break;\n }\n case CIRCLE: {\n setCircle(map, router, shape, imageData);\n break;\n }\n default:\n break;\n }\n }\n });\n};\n\nexport default setSh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AAS;UAAE;YACdzB,YAAY,CAAC5J,GAAG,EAAEC,MAAM,EAAEP,KAAK,EAAEQ,SAAS,CAAC;YAC3C;UACF;QACA,KAAKoL,iBAAM;UAAE;YACXf,SAAS,CAACvK,GAAG,EAAEC,MAAM,EAAEP,KAAK,EAAEQ,SAAS,CAAC;YACxC;UACF;QACA;UACE;MACJ;IACF;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqL,QAAA,GAAAC,OAAA,cAEaZ,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"set-shapes.js","names":["_react","_interopRequireDefault","require","_lodash","ReactDOMServer","_interopRequireWildcard","_nextjsComponents","_client","_reactPageBuilder","_getPath","_constants","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","shapesArray","infoWindowArray","clearShapes","shape","setMap","closeInfoWindows","infoWindow","close","addShapeListeners","map","router","imageData","shapeInstance","client","_shape$enableInfoPane","enableInfoPane","_shape$dataSummaries","dataSummaries","url","shapeData","window","google","maps","InfoWindow","content","addListener","CLICK","_ref","_asyncToGenerator2","_regenerator","mark","_callee","event","wrap","_callee$","_context","prev","next","t0","infoWindowContent","t1","sent","renderToString","setContent","setPosition","latLng","open","stop","_x","setStyleOptions","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","styleSettings","reduce","acc","key","settingValue","shouldValueBeNumber","includes","COLOR","hasValuePassedCondition","isNumber","areRectangleBoundsNumbers","bounds","every","bound","isPositionCorrect","lat","lng","getIconUrl","imageId","image","find","_ref2","id","_ref3","_callee3","summariesWithContent","_ref5","shouldShowImage","getImageElement","_callee3$","_context3","Promise","all","_ref4","_callee2","dataSummary","elementTitle","type","propsToDisplay","otherProps","isTypeHeading","summaryPropsWithContent","modifier","SummaryComponent","getDataSummaryComponent","_callee2$","_context2","_objectWithoutProperties2","HEADING_LARGE","buildPropsToDisplayWithContent","getClassModifiers","LIST","summaryComponents","render","preload","abrupt","component","createElement","ApolloProvider","Link","href","_x7","_ref6","imageUrl","data","imageElement","className","src","alt","altText","Fragment","_x2","_x3","_x4","_x5","_x6","getIcon","_shape$markerWidth","markerWidth","_shape$markerHeight","markerHeight","svgPath","iconUrl","icon","scaledSize","Size","svgMarker","path","DEFAULT_CUSTOM_MARKER_PATH","rotation","scale","setMarker","_shape$label","label","latitude","longitude","marker","Marker","position","title","setPolyline","paths","getPath","polyline","Polyline","geodesic","setPolygon","unParsedPaths","polygon","Polygon","setRectangle","northBound","southBound","eastBound","westBound","rectangle","Rectangle","north","south","east","west","setCircle","radius","circle","Circle","center","setShapes","shapes","mapZoom","getZoom","minZoom","maxZoom","MARKER","POLYLINE","POLYGON","RECTANGLE","CIRCLE","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/set-shapes.js"],"sourcesContent":["import React from 'react';\nimport isNumber from 'lodash.isnumber';\nimport * as ReactDOMServer from 'react-dom/server';\nimport { Link } from '@blaze-cms/nextjs-components';\nimport { ApolloProvider } from '@apollo/client';\nimport {\n buildPropsToDisplayWithContent,\n summaryComponents,\n getClassModifiers\n} from '@blaze-cms/react-page-builder';\nimport getPath from './get-path';\nimport {\n MARKER,\n POLYLINE,\n POLYGON,\n RECTANGLE,\n CIRCLE,\n COLOR,\n CLICK,\n HEADING_LARGE,\n LIST,\n DEFAULT_CUSTOM_MARKER_PATH\n} from '../../constants';\n\nconst shapesArray = [];\nconst infoWindowArray = [];\n\nconst clearShapes = () => {\n if (shapesArray.length) {\n shapesArray.forEach(shape => shape.setMap(null));\n shapesArray.length = 0;\n }\n};\n\nconst closeInfoWindows = () => {\n if (infoWindowArray.length) {\n infoWindowArray.forEach(infoWindow => infoWindow.close());\n infoWindowArray.length = 0;\n }\n};\n\nconst addShapeListeners = (map, router, shape, imageData, shapeInstance, client) => {\n const { enableInfoPane = false, dataSummaries = [], url, shapeData } = shape;\n\n if (enableInfoPane) {\n const infoWindow = new window.google.maps.InfoWindow({\n content: ''\n });\n\n shapeInstance.addListener(CLICK, async event => {\n closeInfoWindows();\n const content = ReactDOMServer.renderToString(\n await infoWindowContent(imageData, dataSummaries, url, shapeData, client)\n );\n infoWindow.setContent(content);\n infoWindow.setPosition(event.latLng);\n infoWindow.open(map, shapeInstance);\n infoWindowArray.push(infoWindow);\n });\n } else if (url) {\n shapeInstance.addListener(CLICK, () => {\n router.push(url);\n });\n }\n};\n\nconst setStyleOptions = shape => {\n const { strokeColor, strokeOpacity, strokeWeight, fillColor, fillOpacity } = shape;\n const styleSettings = { strokeColor, fillColor, strokeOpacity, strokeWeight, fillOpacity };\n\n return {\n ...Object.keys(styleSettings).reduce((acc, key) => {\n const settingValue = styleSettings[key];\n const shouldValueBeNumber = !key.includes(COLOR);\n const hasValuePassedCondition = shouldValueBeNumber ? isNumber(settingValue) : settingValue;\n if (hasValuePassedCondition) acc[key] = settingValue;\n return acc;\n }, {})\n };\n};\n\nconst areRectangleBoundsNumbers = bounds => bounds.every(bound => isNumber(bound));\n\nconst isPositionCorrect = (lat, lng) => isNumber(lat) && isNumber(lng);\n\nconst getIconUrl = (imageId, imageData) => {\n if (!imageId) return '';\n const image = imageData.find(({ id }) => id === imageId);\n if (!image || !image.url) return '';\n\n return image.url;\n};\n\nconst infoWindowContent = async (imageData, dataSummaries, url, shapeData, client) => {\n const summariesWithContent = await Promise.all(\n dataSummaries.map(async dataSummary => {\n const { elementTitle, type, propsToDisplay, ...otherProps } = dataSummary;\n const isTypeHeading = type === HEADING_LARGE;\n const summaryPropsWithContent = buildPropsToDisplayWithContent(shapeData, propsToDisplay);\n const modifier = getClassModifiers(LIST, otherProps);\n const SummaryComponent = summaryComponents[type];\n await SummaryComponent.render.preload(); // preload dynamic nextjs component\n\n if (!summaryPropsWithContent.length) return null;\n\n const getDataSummaryComponent = () => {\n const component = (\n <ApolloProvider client={client}>\n <SummaryComponent\n key={type}\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryPropsWithContent}\n />\n </ApolloProvider>\n );\n\n if (isTypeHeading && url) return <Link href={url}>{component}</Link>;\n\n return component;\n };\n\n return getDataSummaryComponent();\n })\n );\n const { imageId } = shapeData || {};\n const image = imageData.find(({ id }) => id === imageId);\n const shouldShowImage = image && image.url;\n\n const getImageElement = () => {\n const { url: imageUrl, data } = image;\n const imageElement = (\n <img className=\"info__window\" src={imageUrl} alt={data && data.altText ? data.altText : ''} />\n );\n\n if (url) return <Link href={url}>{imageElement}</Link>;\n\n return imageElement;\n };\n\n return (\n <>\n {shouldShowImage && getImageElement()}\n {summariesWithContent}\n </>\n );\n};\n\nfunction getIcon(imageData, shape) {\n const {\n imageId,\n markerWidth = 50,\n markerHeight = 50,\n strokeColor,\n strokeOpacity,\n strokeWeight,\n fillColor,\n fillOpacity,\n svgPath\n } = shape;\n const iconUrl = getIconUrl(imageId, imageData);\n\n const icon = iconUrl\n ? {\n url: iconUrl,\n scaledSize: new window.google.maps.Size(markerWidth || 50, markerHeight || 50)\n }\n : null;\n\n if (icon) return icon;\n\n if (!svgPath && !fillColor && !strokeColor) return {}; // any can be true for custom marker\n\n const svgMarker = {\n path: svgPath || DEFAULT_CUSTOM_MARKER_PATH,\n strokeColor,\n strokeOpacity,\n strokeWeight,\n fillColor,\n fillOpacity,\n rotation: 0,\n scale: 2\n };\n return svgMarker;\n}\n\nconst setMarker = (map, router, shape, imageData, client) => {\n const { label = '', latitude, longitude } = shape;\n\n if (isPositionCorrect(latitude, longitude)) {\n const svgMarker = getIcon(imageData, shape);\n\n const marker = new window.google.maps.Marker({\n position: { lat: latitude, lng: longitude },\n map,\n icon: svgMarker,\n title: label || ''\n });\n\n addShapeListeners(map, router, shape, imageData, marker, client);\n\n shapesArray.push(marker);\n\n marker.setMap(map);\n }\n};\n\nconst setPolyline = (map, router, shape, imageData) => {\n const { paths } = shape;\n const path = getPath(paths);\n\n if (path.length) {\n const polyline = new window.google.maps.Polyline({\n path,\n geodesic: true,\n ...setStyleOptions(shape)\n });\n\n addShapeListeners(map, router, shape, imageData, polyline);\n\n shapesArray.push(polyline);\n\n polyline.setMap(map);\n }\n};\n\nconst setPolygon = (map, router, shape, imageData) => {\n const { paths: unParsedPaths } = shape;\n const paths = getPath(unParsedPaths);\n\n if (paths.length) {\n const polygon = new window.google.maps.Polygon({\n paths,\n ...setStyleOptions(shape)\n });\n\n addShapeListeners(map, router, shape, imageData, polygon);\n\n shapesArray.push(polygon);\n\n polygon.setMap(map);\n }\n};\n\nconst setRectangle = (map, router, shape, imageData) => {\n const { northBound, southBound, eastBound, westBound } = shape;\n if (areRectangleBoundsNumbers([northBound, southBound, eastBound, westBound])) {\n const rectangle = new window.google.maps.Rectangle({\n ...setStyleOptions(shape),\n map,\n bounds: {\n north: northBound,\n south: southBound,\n east: eastBound,\n west: westBound\n }\n });\n\n addShapeListeners(map, router, shape, imageData, rectangle);\n\n shapesArray.push(rectangle);\n\n rectangle.setMap(map);\n }\n};\n\nconst setCircle = (map, router, shape, imageData) => {\n const { latitude, longitude, radius } = shape;\n if (isPositionCorrect(latitude, longitude) && isNumber(radius)) {\n const circle = new window.google.maps.Circle({\n ...setStyleOptions(shape),\n map,\n center: { lat: latitude, lng: longitude },\n radius\n });\n\n addShapeListeners(map, router, shape, imageData, circle);\n\n shapesArray.push(circle);\n\n circle.setMap(map);\n }\n};\n\nconst setShapes = (map, router, shapes, imageData, client) => {\n const mapZoom = map.getZoom();\n clearShapes();\n\n shapes.forEach(shape => {\n const { type, minZoom, maxZoom } = shape;\n\n if (mapZoom >= minZoom && mapZoom <= maxZoom) {\n switch (type) {\n case MARKER: {\n setMarker(map, router, shape, imageData, client);\n break;\n }\n case POLYLINE: {\n setPolyline(map, router, shape, imageData);\n break;\n }\n case POLYGON: {\n setPolygon(map, router, shape, imageData);\n break;\n }\n case RECTANGLE: {\n setRectangle(map, router, shape, im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EAAEP,KAAK,EAAEQ,SAAS,CAAC;YACzC;UACF;QACA,KAAKmL,oBAAS;UAAE;YACdzB,YAAY,CAAC5J,GAAG,EAAEC,MAAM,EAAEP,KAAK,EAAEQ,SAAS,CAAC;YAC3C;UACF;QACA,KAAKoL,iBAAM;UAAE;YACXf,SAAS,CAACvK,GAAG,EAAEC,MAAM,EAAEP,KAAK,EAAEQ,SAAS,CAAC;YACxC;UACF;QACA;UACE;MACJ;IACF;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqL,QAAA,GAAAC,OAAA,cAEaZ,SAAS","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.generateWhereQuery = exports.generateQueryString = exports.generateQuery = exports.generateIdsQuery = exports.generateFiltersQuery = exports.GET_ENTITY_SCHEMAS = void 0;
|
|
9
9
|
require("core-js/modules/es.array.concat.js");
|
|
10
|
+
require("core-js/modules/es.date.to-json.js");
|
|
10
11
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
12
|
var _client = require("@apollo/client");
|
|
12
13
|
var _templateObject, _templateObject2, _templateObject3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","names":["_client","require","_templateObject","_templateObject2","_templateObject3","GET_ENTITY_SCHEMAS","exports","gql","_taggedTemplateLiteral2","generateQuery","queryString","generateWhereQuery","generateQueryString","action","query","props","concat","generateIdsQuery","ids","JSON","stringify","generateFiltersQuery","rawQUery","filterQueryKey"],"sources":["../../src/GoogleMaps/queries.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst GET_ENTITY_SCHEMAS = gql`\n query getEntitySchemas($identifier: String) {\n getEntitySchemas(identifier: $identifier) {\n id\n identifier\n actions\n dynamicProperties\n properties\n relations\n }\n }\n`;\n\nconst generateQuery = queryString => gql`\n query getEntityData {\n ${queryString}\n }\n`;\n\nconst generateWhereQuery = queryString => gql`\n query getEntityData($where: JSON){\n ${queryString}\n }\n`;\nconst generateQueryString = (action, query, props) => `\n ${query}: ${action}(where: $where){\n id\n ${props}\n }\n`;\n\nconst generateIdsQuery = (query, props, action, ids) => `\n ${query}: ${action}(where: { id: { _in: ${JSON.stringify(ids)} } }){\n id\n ${props}\n }\n`;\n\nconst generateFiltersQuery = (query, props, rawQUery, filterQueryKey) => `\n ${query}: searchPublishedContent(rawQueryStringified: ${JSON.stringify(rawQUery)}){\n results {\n ...on ${filterQueryKey} {\n id\n ${props}\n }\n }\n }\n`;\n\nexport {\n GET_ENTITY_SCHEMAS,\n generateQuery,\n generateQueryString,\n generateIdsQuery,\n generateFiltersQuery,\n generateWhereQuery\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"queries.js","names":["_client","require","_templateObject","_templateObject2","_templateObject3","GET_ENTITY_SCHEMAS","exports","gql","_taggedTemplateLiteral2","generateQuery","queryString","generateWhereQuery","generateQueryString","action","query","props","concat","generateIdsQuery","ids","JSON","stringify","generateFiltersQuery","rawQUery","filterQueryKey"],"sources":["../../src/GoogleMaps/queries.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst GET_ENTITY_SCHEMAS = gql`\n query getEntitySchemas($identifier: String) {\n getEntitySchemas(identifier: $identifier) {\n id\n identifier\n actions\n dynamicProperties\n properties\n relations\n }\n }\n`;\n\nconst generateQuery = queryString => gql`\n query getEntityData {\n ${queryString}\n }\n`;\n\nconst generateWhereQuery = queryString => gql`\n query getEntityData($where: JSON){\n ${queryString}\n }\n`;\nconst generateQueryString = (action, query, props) => `\n ${query}: ${action}(where: $where){\n id\n ${props}\n }\n`;\n\nconst generateIdsQuery = (query, props, action, ids) => `\n ${query}: ${action}(where: { id: { _in: ${JSON.stringify(ids)} } }){\n id\n ${props}\n }\n`;\n\nconst generateFiltersQuery = (query, props, rawQUery, filterQueryKey) => `\n ${query}: searchPublishedContent(rawQueryStringified: ${JSON.stringify(rawQUery)}){\n results {\n ...on ${filterQueryKey} {\n id\n ${props}\n }\n }\n }\n`;\n\nexport {\n GET_ENTITY_SCHEMAS,\n generateQuery,\n generateQueryString,\n generateIdsQuery,\n generateFiltersQuery,\n generateWhereQuery\n};\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAqC,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAErC,IAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,OAAGE,WAAG,EAAAL,eAAA,KAAAA,eAAA,OAAAM,uBAAA,2OAW7B;AAED,IAAMC,aAAa,GAAAH,OAAA,CAAAG,aAAA,GAAG,SAAhBA,aAAaA,CAAGC,WAAW;EAAA,WAAIH,WAAG,EAAAJ,gBAAA,KAAAA,gBAAA,OAAAK,uBAAA,+DAElCE,WAAW;AAAA,CAEhB;AAED,IAAMC,kBAAkB,GAAAL,OAAA,CAAAK,kBAAA,GAAG,SAArBA,kBAAkBA,CAAGD,WAAW;EAAA,WAAIH,WAAG,EAAAH,gBAAA,KAAAA,gBAAA,OAAAI,uBAAA,4EAEvCE,WAAW;AAAA,CAEhB;AACD,IAAME,mBAAmB,GAAAN,OAAA,CAAAM,mBAAA,GAAG,SAAtBA,mBAAmBA,CAAIC,MAAM,EAAEC,KAAK,EAAEC,KAAK;EAAA,cAAAC,MAAA,CAC7CF,KAAK,QAAAE,MAAA,CAAKH,MAAM,oCAAAG,MAAA,CAEdD,KAAK;AAAA,CAEV;AAED,IAAME,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAAG,SAAnBA,gBAAgBA,CAAIH,KAAK,EAAEC,KAAK,EAAEF,MAAM,EAAEK,GAAG;EAAA,cAAAF,MAAA,CAC/CF,KAAK,QAAAE,MAAA,CAAKH,MAAM,2BAAAG,MAAA,CAAwBG,IAAI,CAACC,SAAS,CAACF,GAAG,CAAC,0BAAAF,MAAA,CAEzDD,KAAK;AAAA,CAEV;AAED,IAAMM,oBAAoB,GAAAf,OAAA,CAAAe,oBAAA,GAAG,SAAvBA,oBAAoBA,CAAIP,KAAK,EAAEC,KAAK,EAAEO,QAAQ,EAAEC,cAAc;EAAA,cAAAP,MAAA,CAChEF,KAAK,qDAAAE,MAAA,CAAkDG,IAAI,CAACC,SAAS,CAACE,QAAQ,CAAC,qCAAAN,MAAA,CAErEO,cAAc,8BAAAP,MAAA,CAElBD,KAAK;AAAA,CAId","ignoreList":[]}
|
package/lib/index.js
CHANGED
|
@@ -20,12 +20,12 @@ var _dynamic = _interopRequireDefault(require("next/dynamic"));
|
|
|
20
20
|
var _package = _interopRequireDefault(require("../package.json"));
|
|
21
21
|
var _constants = require("./constants");
|
|
22
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2["default"])(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2["default"])(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
24
24
|
function load(_x) {
|
|
25
25
|
return _load.apply(this, arguments);
|
|
26
26
|
}
|
|
27
27
|
function _load() {
|
|
28
|
-
_load = (0, _asyncToGenerator2["default"])(
|
|
28
|
+
_load = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(app) {
|
|
29
29
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
30
30
|
while (1) switch (_context.prev = _context.next) {
|
|
31
31
|
case 0:
|
|
@@ -34,7 +34,7 @@ function _load() {
|
|
|
34
34
|
key: 'googlemaps',
|
|
35
35
|
component: (0, _dynamic["default"])(function () {
|
|
36
36
|
return Promise.resolve().then(function () {
|
|
37
|
-
return _interopRequireWildcard(require(
|
|
37
|
+
return _interopRequireWildcard(require(/* webpackChunkName: "blazePbGoogleMaps" */'./GoogleMaps'));
|
|
38
38
|
});
|
|
39
39
|
})
|
|
40
40
|
});
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_dynamic","_interopRequireDefault","require","_package","_constants","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","_typeof2","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dynamic","_interopRequireDefault","require","_package","_constants","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","_typeof2","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","load","_x","_load","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","app","wrap","_callee$","_context","prev","next","events","once","addComponent","key","component","dynamic","Promise","resolve","then","abrupt","name","PLUGIN_NAME","version","pkg","stop","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport pkg from '../package.json';\nimport { PLUGIN_NAME } from './constants';\n\nexport default async function load(app) {\n app.events.once('load:custom:page-builder:component', addComponent => {\n addComponent({\n key: 'googlemaps',\n component: dynamic(() => import(/* webpackChunkName: \"blazePbGoogleMaps\" */ './GoogleMaps'))\n });\n });\n\n return {\n name: PLUGIN_NAME,\n version: pkg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AAS,CAAA,GAAAA,CAAA;AAAA,SAEZW,IAAIA,CAAAC,EAAA;EAAA,OAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,MAAA;EAAAA,KAAA,OAAAG,kBAAA,0BAAAC,YAAA,YAAAC,IAAA,CAAnB,SAAAC,QAAoBC,GAAG;IAAA,OAAAH,YAAA,YAAAI,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UACpCL,GAAG,CAACM,MAAM,CAACC,IAAI,CAAC,oCAAoC,EAAE,UAAAC,YAAY,EAAI;YACpEA,YAAY,CAAC;cACXC,GAAG,EAAE,YAAY;cACjBC,SAAS,EAAE,IAAAC,mBAAO,EAAC;gBAAA,OAAAC,OAAA,CAAAC,OAAA,GAAAC,IAAA;kBAAA,OAAAvC,uBAAA,CAAAR,OAAA,CAAa,2CAA4C,cAAc;gBAAA;cAAA,CAAC;YAC7F,CAAC,CAAC;UACJ,CAAC,CAAC;UAAC,OAAAoC,QAAA,CAAAY,MAAA,WAEI;YACLC,IAAI,EAAEC,sBAAW;YACjBC,OAAO,EAAEC,mBAAG,CAACD;UACf,CAAC;QAAA;QAAA;UAAA,OAAAf,QAAA,CAAAiB,IAAA;MAAA;IAAA,GAAArB,OAAA;EAAA,CACF;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDJ,IAAI,CAAC8B,UAAU,GAAGJ,sBAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMaps.js","names":["React","useEffect","useState","PropTypes","useApolloClient","useRouter","withTitle","useInView","functions","isEqual","omit","setMapOptions","addZoomListener","GOOGLE_MAPS_SCRIPT","LOAD","SCRIPT","IN_VIEW_CONFIG","GoogleMapsHtml","shouldNotUpdate","props","nextProps","funcs","nextFuncs","noPropChange","noFuncChange","length","every","fn","toString","GoogleMaps","_ref","type","name","modifier","elementTitle","imageData","onMount","onMountProps","parent","mapShapes","centerCoordinates","otherProps","_objectWithoutProperties","_excluded","router","isIntersecting","mapRef","client","map","setMap","options","onLoad","initialMap","window","google","maps","Map","current","latitude","lat","longitude","lng","setCenter","bounds","LatLngBounds","forEach","extend","LatLng","fitBounds","script","document","createElement","src","process","env","GOOGLE_MAPS_API_KEY","head","append","addEventListener","removeEventListener","setOptions","enableGeolocation","shouldActivateGeolocation","navigator","geolocation","getCurrentPosition","position","center","coords","propTypes","array","string","func","object","defaultProps","memo"],"sources":["../../src/GoogleMaps/GoogleMaps.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useApolloClient } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { withTitle } from '@blaze-cms/react-page-builder';\nimport { useInView } from '@blaze-react/utils/lib/customHooks';\nimport { functions, isEqual, omit } from 'lodash';\nimport { setMapOptions, addZoomListener } from './helpers';\nimport { GOOGLE_MAPS_SCRIPT, LOAD, SCRIPT, IN_VIEW_CONFIG } from '../constants';\nimport GoogleMapsHtml from './GoogleMapsHtml';\n\nconst shouldNotUpdate = (props, nextProps) => {\n const [funcs, nextFuncs] = [functions(props), functions(nextProps)];\n const noPropChange = isEqual(omit(props, funcs), omit(nextProps, nextFuncs));\n const noFuncChange =\n funcs.length === nextFuncs.length &&\n funcs.every(fn => props[fn].toString() === nextProps[fn].toString());\n return noPropChange && noFuncChange;\n};\n\nconst GoogleMaps = ({\n type,\n name,\n modifier,\n elementTitle,\n imageData,\n onMount,\n onMountProps,\n parent,\n mapShapes,\n centerCoordinates,\n ...otherProps\n}) => {\n const router = useRouter();\n const [isIntersecting, mapRef] = useInView(IN_VIEW_CONFIG);\n const client = useApolloClient();\n const [map, setMap] = useState();\n\n useEffect(() => {\n const options = setMapOptions(otherProps);\n const onLoad = () => {\n const initialMap = new window.google.maps.Map(mapRef.current, options);\n if (centerCoordinates.length === 1) {\n const [{ latitude: lat, longitude: lng }] = centerCoordinates;\n initialMap.setCenter({ lat, lng });\n } else {\n const bounds = new window.google.maps.LatLngBounds();\n centerCoordinates.forEach(({ latitude, longitude }) => {\n bounds.extend(new window.google.maps.LatLng(latitude, longitude));\n });\n initialMap.fitBounds(bounds);\n }\n setMap(initialMap);\n };\n\n if (!window.google) {\n const script = document.createElement(SCRIPT);\n script.src = `${GOOGLE_MAPS_SCRIPT}${process.env.GOOGLE_MAPS_API_KEY}`;\n document.head.append(script);\n script.addEventListener(LOAD, onLoad);\n return () => script.removeEventListener(LOAD, onLoad);\n }\n\n onLoad();\n\n if (map) {\n map.setOptions(options);\n const { enableGeolocation } = otherProps;\n const shouldActivateGeolocation = enableGeolocation && navigator.geolocation;\n if (shouldActivateGeolocation) {\n navigator.geolocation.getCurrentPosition(\n position => {\n const center = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n map.setCenter(center);\n },\n () => {}\n );\n }\n }\n\n return () => {};\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(\n () => {\n if (isIntersecting) addZoomListener(map, router, mapShapes, imageData, client);\n },\n [isIntersecting, map, mapShapes, imageData, router, client]\n );\n\n if (map && typeof onMount === `function`) onMount(map, onMountProps);\n\n return <GoogleMapsHtml mapRef={mapRef} />;\n};\n\nGoogleMaps.propTypes = {\n mapShapes: PropTypes.array,\n imageData: PropTypes.array,\n type: PropTypes.string,\n name: PropTypes.string,\n modifier: PropTypes.string,\n elementTitle: PropTypes.string,\n onMount: PropTypes.func,\n onMountProps: PropTypes.object,\n parent: PropTypes.object,\n centerCoordinates: PropTypes.array\n};\n\nGoogleMaps.defaultProps = {\n mapShapes: [],\n imageData: [],\n centerCoordinates: [],\n type: '',\n name: '',\n modifier: '',\n elementTitle: '',\n onMount: null,\n onMountProps: null,\n parent: {}\n};\n\nexport default React.memo(withTitle(GoogleMaps), shouldNotUpdate);\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ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
|
1
|
+
{"version":3,"file":"GoogleMaps.js","names":["React","useEffect","useState","PropTypes","useApolloClient","useRouter","withTitle","useInView","functions","isEqual","omit","setMapOptions","addZoomListener","GOOGLE_MAPS_SCRIPT","LOAD","SCRIPT","IN_VIEW_CONFIG","GoogleMapsHtml","shouldNotUpdate","props","nextProps","funcs","nextFuncs","noPropChange","noFuncChange","length","every","fn","toString","GoogleMaps","_ref","type","name","modifier","elementTitle","imageData","onMount","onMountProps","parent","mapShapes","centerCoordinates","otherProps","_objectWithoutProperties","_excluded","router","isIntersecting","mapRef","client","map","setMap","options","onLoad","initialMap","window","google","maps","Map","current","latitude","lat","longitude","lng","setCenter","bounds","LatLngBounds","forEach","extend","LatLng","fitBounds","script","document","createElement","src","process","env","GOOGLE_MAPS_API_KEY","head","append","addEventListener","removeEventListener","setOptions","enableGeolocation","shouldActivateGeolocation","navigator","geolocation","getCurrentPosition","position","center","coords","propTypes","array","string","func","object","defaultProps","memo"],"sources":["../../src/GoogleMaps/GoogleMaps.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useApolloClient } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { withTitle } from '@blaze-cms/react-page-builder';\nimport { useInView } from '@blaze-react/utils/lib/customHooks';\nimport { functions, isEqual, omit } from 'lodash';\nimport { setMapOptions, addZoomListener } from './helpers';\nimport { GOOGLE_MAPS_SCRIPT, LOAD, SCRIPT, IN_VIEW_CONFIG } from '../constants';\nimport GoogleMapsHtml from './GoogleMapsHtml';\n\nconst shouldNotUpdate = (props, nextProps) => {\n const [funcs, nextFuncs] = [functions(props), functions(nextProps)];\n const noPropChange = isEqual(omit(props, funcs), omit(nextProps, nextFuncs));\n const noFuncChange =\n funcs.length === nextFuncs.length &&\n funcs.every(fn => props[fn].toString() === nextProps[fn].toString());\n return noPropChange && noFuncChange;\n};\n\nconst GoogleMaps = ({\n type,\n name,\n modifier,\n elementTitle,\n imageData,\n onMount,\n onMountProps,\n parent,\n mapShapes,\n centerCoordinates,\n ...otherProps\n}) => {\n const router = useRouter();\n const [isIntersecting, mapRef] = useInView(IN_VIEW_CONFIG);\n const client = useApolloClient();\n const [map, setMap] = useState();\n\n useEffect(() => {\n const options = setMapOptions(otherProps);\n const onLoad = () => {\n const initialMap = new window.google.maps.Map(mapRef.current, options);\n if (centerCoordinates.length === 1) {\n const [{ latitude: lat, longitude: lng }] = centerCoordinates;\n initialMap.setCenter({ lat, lng });\n } else {\n const bounds = new window.google.maps.LatLngBounds();\n centerCoordinates.forEach(({ latitude, longitude }) => {\n bounds.extend(new window.google.maps.LatLng(latitude, longitude));\n });\n initialMap.fitBounds(bounds);\n }\n setMap(initialMap);\n };\n\n if (!window.google) {\n const script = document.createElement(SCRIPT);\n script.src = `${GOOGLE_MAPS_SCRIPT}${process.env.GOOGLE_MAPS_API_KEY}`;\n document.head.append(script);\n script.addEventListener(LOAD, onLoad);\n return () => script.removeEventListener(LOAD, onLoad);\n }\n\n onLoad();\n\n if (map) {\n map.setOptions(options);\n const { enableGeolocation } = otherProps;\n const shouldActivateGeolocation = enableGeolocation && navigator.geolocation;\n if (shouldActivateGeolocation) {\n navigator.geolocation.getCurrentPosition(\n position => {\n const center = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n map.setCenter(center);\n },\n () => {}\n );\n }\n }\n\n return () => {};\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(\n () => {\n if (isIntersecting) addZoomListener(map, router, mapShapes, imageData, client);\n },\n [isIntersecting, map, mapShapes, imageData, router, client]\n );\n\n if (map && typeof onMount === `function`) onMount(map, onMountProps);\n\n return <GoogleMapsHtml mapRef={mapRef} />;\n};\n\nGoogleMaps.propTypes = {\n mapShapes: PropTypes.array,\n imageData: PropTypes.array,\n type: PropTypes.string,\n name: PropTypes.string,\n modifier: PropTypes.string,\n elementTitle: PropTypes.string,\n onMount: PropTypes.func,\n onMountProps: PropTypes.object,\n parent: PropTypes.object,\n centerCoordinates: PropTypes.array\n};\n\nGoogleMaps.defaultProps = {\n mapShapes: [],\n imageData: [],\n centerCoordinates: [],\n type: '',\n name: '',\n modifier: '',\n elementTitle: '',\n onMount: null,\n onMountProps: null,\n parent: {}\n};\n\nexport default React.memo(withTitle(GoogleMaps), shouldNotUpdate);\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,SAAS,QAAQ,oCAAoC;AAC9D,SAASC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AACjD,SAASC,aAAa,EAAEC,eAAe,QAAQ,WAAW;AAC1D,SAASC,kBAAkB,EAAEC,IAAI,EAAEC,MAAM,EAAEC,cAAc,QAAQ,cAAc;AAC/E,OAAOC,cAAc,MAAM,kBAAkB;AAE7C,MAAMC,eAAe,GAAGA,CAACC,KAAK,EAAEC,SAAS,KAAK;EAC5C,MAAM,CAACC,KAAK,EAAEC,SAAS,CAAC,GAAG,CAACd,SAAS,CAACW,KAAK,CAAC,EAAEX,SAAS,CAACY,SAAS,CAAC,CAAC;EACnE,MAAMG,YAAY,GAAGd,OAAO,CAACC,IAAI,CAACS,KAAK,EAAEE,KAAK,CAAC,EAAEX,IAAI,CAACU,SAAS,EAAEE,SAAS,CAAC,CAAC;EAC5E,MAAME,YAAY,GAChBH,KAAK,CAACI,MAAM,KAAKH,SAAS,CAACG,MAAM,IACjCJ,KAAK,CAACK,KAAK,CAACC,EAAE,IAAIR,KAAK,CAACQ,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,KAAKR,SAAS,CAACO,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,CAAC;EACtE,OAAOL,YAAY,IAAIC,YAAY;AACrC,CAAC;AAED,MAAMK,UA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3,"file":"GoogleMapsHtml.js","names":["React","PropTypes","GoogleMapsFactory","mapRef","createElement","className","ref","propTypes","object","defaultProps"],"sources":["../../src/GoogleMaps/GoogleMapsHtml.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst GoogleMapsFactory = ({ mapRef }) => (\n <div className={`google-maps ${!mapRef ? 'loading' : ''}`} ref={mapRef} />\n);\n\nGoogleMapsFactory.propTypes = {\n mapRef: PropTypes.object\n};\n\nGoogleMapsFactory.defaultProps = {\n mapRef: null\n};\n\nexport default GoogleMapsFactory;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC;AAAO,CAAC,kBACnCH,KAAA,CAAAI,aAAA;EAAKC,SAAS,
|
|
1
|
+
{"version":3,"file":"GoogleMapsHtml.js","names":["React","PropTypes","GoogleMapsFactory","mapRef","createElement","className","ref","propTypes","object","defaultProps"],"sources":["../../src/GoogleMaps/GoogleMapsHtml.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst GoogleMapsFactory = ({ mapRef }) => (\n <div className={`google-maps ${!mapRef ? 'loading' : ''}`} ref={mapRef} />\n);\n\nGoogleMapsFactory.propTypes = {\n mapRef: PropTypes.object\n};\n\nGoogleMapsFactory.defaultProps = {\n mapRef: null\n};\n\nexport default GoogleMapsFactory;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC;AAAO,CAAC,kBACnCH,KAAA,CAAAI,aAAA;EAAKC,SAAS,EAAE,eAAe,CAACF,MAAM,GAAG,SAAS,GAAG,EAAE,EAAG;EAACG,GAAG,EAAEH;AAAO,CAAE,CAC1E;AAEDD,iBAAiB,CAACK,SAAS,GAAG;EAC5BJ,MAAM,EAAEF,SAAS,CAACO;AACpB,CAAC;AAEDN,iBAAiB,CAACO,YAAY,GAAG;EAC/BN,MAAM,EAAE;AACV,CAAC;AAED,eAAeD,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-query.js","names":["upperFirst","camelcase","generateQuery","generateIdsQuery","generateFiltersQuery","buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","filterQueryKey","indexOf","push","props","trim","singleItemQuery","JSON","stringify","join","query"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import upperFirst from 'lodash.upperfirst';\nimport camelcase from 'lodash.camelcase';\nimport { generateQuery, generateIdsQuery, generateFiltersQuery } from '../queries';\n\nconst buildQuery = entityConfigs => {\n const entityIds = [];\n const rawQueryStringified = '';\n const queryString = entityConfigs\n .map(entityConfig => {\n const { action, ids, entity, propsQuery, shapeKey, filtersObject } = entityConfig;\n if (!action) return '';\n const formatedEntity = upperFirst(camelcase(entity));\n const filterQueryKey =\n action.indexOf('Published') !== -1 ? `Published${formatedEntity}` : formatedEntity;\n\n entityIds.push(...ids);\n const props = propsQuery.trim() || 'id';\n const singleItemQuery = filtersObject\n ? generateFiltersQuery(shapeKey, props, JSON.stringify(filtersObject), filterQueryKey)\n : generateIdsQuery(shapeKey, props, action, ids);\n\n return singleItemQuery;\n })\n .join(' ');\n\n return {\n query: queryString ? generateQuery(queryString) : '',\n ids: entityIds,\n rawQueryStringified\n };\n};\n\nexport default buildQuery;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,mBAAmB;AAC1C,OAAOC,SAAS,MAAM,kBAAkB;AACxC,SAASC,aAAa,EAAEC,gBAAgB,EAAEC,oBAAoB,QAAQ,YAAY;AAElF,MAAMC,UAAU,GAAGC,aAAa,IAAI;EAClC,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,mBAAmB,GAAG,EAAE;EAC9B,MAAMC,WAAW,GAAGH,aAAa,CAC9BI,GAAG,CAACC,YAAY,IAAI;IACnB,MAAM;MAAEC,MAAM;MAAEC,GAAG;MAAEC,MAAM;MAAEC,UAAU;MAAEC,QAAQ;MAAEC;IAAc,CAAC,GAAGN,YAAY;IACjF,IAAI,CAACC,MAAM,EAAE,OAAO,EAAE;IACtB,MAAMM,cAAc,GAAGlB,UAAU,CAACC,SAAS,CAACa,MAAM,CAAC,CAAC;IACpD,MAAMK,cAAc,GAClBP,MAAM,CAACQ,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"build-query.js","names":["upperFirst","camelcase","generateQuery","generateIdsQuery","generateFiltersQuery","buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","filterQueryKey","indexOf","push","props","trim","singleItemQuery","JSON","stringify","join","query"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import upperFirst from 'lodash.upperfirst';\nimport camelcase from 'lodash.camelcase';\nimport { generateQuery, generateIdsQuery, generateFiltersQuery } from '../queries';\n\nconst buildQuery = entityConfigs => {\n const entityIds = [];\n const rawQueryStringified = '';\n const queryString = entityConfigs\n .map(entityConfig => {\n const { action, ids, entity, propsQuery, shapeKey, filtersObject } = entityConfig;\n if (!action) return '';\n const formatedEntity = upperFirst(camelcase(entity));\n const filterQueryKey =\n action.indexOf('Published') !== -1 ? `Published${formatedEntity}` : formatedEntity;\n\n entityIds.push(...ids);\n const props = propsQuery.trim() || 'id';\n const singleItemQuery = filtersObject\n ? generateFiltersQuery(shapeKey, props, JSON.stringify(filtersObject), filterQueryKey)\n : generateIdsQuery(shapeKey, props, action, ids);\n\n return singleItemQuery;\n })\n .join(' ');\n\n return {\n query: queryString ? generateQuery(queryString) : '',\n ids: entityIds,\n rawQueryStringified\n };\n};\n\nexport default buildQuery;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,mBAAmB;AAC1C,OAAOC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ten","IMAGE_ID","URL","ID","getPropValues","properties","reduce","acc","property","includes","relationName","relationProp","split","trim","getUpdatedPropsQuery","propsQuery","entityData","dynamicProperties","url","Object","keys","filter","prop","hasImage","length","updatedPropsQuery","buildFilterQueryString","filterKey","filterValue","filterKeyword","bool","should","match","buildFilters","filters","filterQueryProps","map","buiildShapeProps","shape","shapeKey","dataSummaries","parentId","entityGroup","displayItems","filterBy","latProp","lonProp","entity","actions","relations","action","getAllPublished","getAll","dataSummaryProps","propsToDisplay","propsToDisplayValues","propertiesToDisplay","propsToDisplayString","ids","push","filtersObject","formatProp","mainProp","nestedProp","idProp","find","localField","buildShapesConfig","schemas","entityGroups","parent","itemId","itemEntity","shapeGroups","forEach","i","shapes","Boolean","shapeIndex","shapeValues","_objectSpread","shapeOptions","entityOptions"],"sources":["../../../src/GoogleMaps/helpers/build-shapes-configs.js"],"sourcesContent":["import flatten from 'lodash.flatten';\nimport { IMAGE_ID, URL, ID } from '../../constants';\n\nconst getPropValues = properties =>\n properties\n .reduce((acc, property) => {\n if (property.includes('.')) {\n const [relationName, relationProp] = property.split('.');\n return `${acc} ${relationName} { ${relationProp} }`;\n }\n return `${acc} ${property}`;\n }, '')\n .trim();\n\nconst getUpdatedPropsQuery = (propsQuery, entityData) => {\n const { properties = {}, dynamicProperties = {} } = entityData;\n\n const [url] = Object.keys(dynamicProperties).filter(prop => prop === URL);\n const hasImage = !!Object.keys(properties).filter(prop => prop === IMAGE_ID).length;\n\n let updatedPropsQuery = hasImage ? `${propsQuery} ${IMAGE_ID}` : propsQuery;\n updatedPropsQuery = url ? `${updatedPropsQuery} ${URL}` : updatedPropsQuery;\n\n return updatedPropsQuery;\n};\n\nconst buildFilterQueryString = filter => {\n const [filterKey, filterValue] = filter.split('/');\n const filterKeyword = `${filterKey}.keyword`;\n return { bool: { should: [{ match: { [filterKeyword]: filterValue } }] } };\n};\n\nconst buildFilters = filters => {\n if (!filters || !filters.length) return null;\n const filterQueryProps = filters.map(buildFilterQueryString);\n return { bool: { should: filterQueryProps } };\n};\n\nconst buiildShapeProps = (shape, shapeKey, dataSummaries, parentId, entityData, entityGroup) => {\n const { displayItems = [], filterBy } = shape;\n const { latProp, lonProp, entity } = entityGroup;\n const { actions, relations } = entityData;\n const action = actions ? actions.getAllPublished || actions.getAll : '';\n\n const dataSummaryProps = dataSummaries\n .reduce((acc, { propsToDisplay }) => {\n const propsToDisplayValues = flatten(\n propsToDisplay.map(({ propertiesToDisplay }) => propertiesToDisplay)\n );\n const propsToDisplayString = getPropValues(propsToDisplayValues);\n\n return `${acc} ${propsToDisplayString}`;\n }, '')\n .trim();\n const ids = [];\n displayItems.length ? ids.push(displayItems[0]) : ids.push(parentId);\n\n const filtersObject = buildFilters(filterBy);\n let propsQuery = dataSummaryProps ? `${dataSummaryProps}` : '';\n propsQuery = getUpdatedPropsQuery(propsQuery, entityData);\n if (latProp && lonProp) {\n propsQuery = `${propsQuery} ${formatProp(latProp, relations)} ${formatProp(\n lonProp,\n relations\n )}`;\n }\n if (ids.length && !propsQuery.includes(ID)) propsQuery = `${propsQuery.trim()} ${ID}`;\n\n return {\n shapeKey,\n entity,\n propsQuery,\n ids,\n action,\n filtersObject\n };\n};\n\nconst formatProp = (prop, relations = []) => {\n if (!prop.includes('.')) return prop;\n\n const [mainProp, nestedProp] = prop.split('.');\n const idProp = relations.find(({ localField }) => localField === mainProp) ? 'id ' : '';\n return `${mainProp}{${idProp}${nestedProp}}`;\n};\n\nconst buildShapesConfig = (schemas, entityGroups, parent) => {\n if (!schemas || !entityGroups) return [];\n const { itemId, itemEntity } = parent;\n const shapeGroups = [];\n entityGroups.forEach((entityGroup, i) => {\n const { entity, shapes, dataSummaries = [] } = entityGroup;\n const parentId = entity === itemEntity && itemId;\n if (!entity) return null;\n const entityData = schemas[entity] || {};\n\n shapes.filter(Boolean).forEach((shape, shapeIndex) => {\n const shapeKey = `shape${i}${shapeIndex}`;\n const shapeValues = buiildShapeProps(\n shape,\n shapeKey,\n dataSummaries,\n parentId,\n entityData,\n entityGroup\n );\n shapeGroups.push({ ...shapeValues, shapeOptions: shape, entityOptions: entityGroup });\n });\n });\n\n return shapeGroups;\n};\n\nexport default buildShapesConfig;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,gBAAgB;AACpC,SAASC,QAAQ,EAAEC,GAAG,EAAEC,EAAE,QAAQ,iBAAiB;AAEnD,MAAMC,aAAa,GAAGC,UAAU,IAC9BA,UAAU,CACPC,MAAM,CAAC,CAACC,GAAG,EAAEC,QAAQ,KAAK;EACzB,IAAIA,QAAQ,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC1B,MAAM,CAACC,YAAY,EAAEC,YAAY,CAAC,GAAGH,QAAQ,CAACI,KAAK,CAAC,GAAG,CAAC;IACxD,
|
|
1
|
+
{"version":3,"file":"build-shapes-configs.js","names":["flatten","IMAGE_ID","URL","ID","getPropValues","properties","reduce","acc","property","includes","relationName","relationProp","split","trim","getUpdatedPropsQuery","propsQuery","entityData","dynamicProperties","url","Object","keys","filter","prop","hasImage","length","updatedPropsQuery","buildFilterQueryString","filterKey","filterValue","filterKeyword","bool","should","match","buildFilters","filters","filterQueryProps","map","buiildShapeProps","shape","shapeKey","dataSummaries","parentId","entityGroup","displayItems","filterBy","latProp","lonProp","entity","actions","relations","action","getAllPublished","getAll","dataSummaryProps","propsToDisplay","propsToDisplayValues","propertiesToDisplay","propsToDisplayString","ids","push","filtersObject","formatProp","mainProp","nestedProp","idProp","find","localField","buildShapesConfig","schemas","entityGroups","parent","itemId","itemEntity","shapeGroups","forEach","i","shapes","Boolean","shapeIndex","shapeValues","_objectSpread","shapeOptions","entityOptions"],"sources":["../../../src/GoogleMaps/helpers/build-shapes-configs.js"],"sourcesContent":["import flatten from 'lodash.flatten';\nimport { IMAGE_ID, URL, ID } from '../../constants';\n\nconst getPropValues = properties =>\n properties\n .reduce((acc, property) => {\n if (property.includes('.')) {\n const [relationName, relationProp] = property.split('.');\n return `${acc} ${relationName} { ${relationProp} }`;\n }\n return `${acc} ${property}`;\n }, '')\n .trim();\n\nconst getUpdatedPropsQuery = (propsQuery, entityData) => {\n const { properties = {}, dynamicProperties = {} } = entityData;\n\n const [url] = Object.keys(dynamicProperties).filter(prop => prop === URL);\n const hasImage = !!Object.keys(properties).filter(prop => prop === IMAGE_ID).length;\n\n let updatedPropsQuery = hasImage ? `${propsQuery} ${IMAGE_ID}` : propsQuery;\n updatedPropsQuery = url ? `${updatedPropsQuery} ${URL}` : updatedPropsQuery;\n\n return updatedPropsQuery;\n};\n\nconst buildFilterQueryString = filter => {\n const [filterKey, filterValue] = filter.split('/');\n const filterKeyword = `${filterKey}.keyword`;\n return { bool: { should: [{ match: { [filterKeyword]: filterValue } }] } };\n};\n\nconst buildFilters = filters => {\n if (!filters || !filters.length) return null;\n const filterQueryProps = filters.map(buildFilterQueryString);\n return { bool: { should: filterQueryProps } };\n};\n\nconst buiildShapeProps = (shape, shapeKey, dataSummaries, parentId, entityData, entityGroup) => {\n const { displayItems = [], filterBy } = shape;\n const { latProp, lonProp, entity } = entityGroup;\n const { actions, relations } = entityData;\n const action = actions ? actions.getAllPublished || actions.getAll : '';\n\n const dataSummaryProps = dataSummaries\n .reduce((acc, { propsToDisplay }) => {\n const propsToDisplayValues = flatten(\n propsToDisplay.map(({ propertiesToDisplay }) => propertiesToDisplay)\n );\n const propsToDisplayString = getPropValues(propsToDisplayValues);\n\n return `${acc} ${propsToDisplayString}`;\n }, '')\n .trim();\n const ids = [];\n displayItems.length ? ids.push(displayItems[0]) : ids.push(parentId);\n\n const filtersObject = buildFilters(filterBy);\n let propsQuery = dataSummaryProps ? `${dataSummaryProps}` : '';\n propsQuery = getUpdatedPropsQuery(propsQuery, entityData);\n if (latProp && lonProp) {\n propsQuery = `${propsQuery} ${formatProp(latProp, relations)} ${formatProp(\n lonProp,\n relations\n )}`;\n }\n if (ids.length && !propsQuery.includes(ID)) propsQuery = `${propsQuery.trim()} ${ID}`;\n\n return {\n shapeKey,\n entity,\n propsQuery,\n ids,\n action,\n filtersObject\n };\n};\n\nconst formatProp = (prop, relations = []) => {\n if (!prop.includes('.')) return prop;\n\n const [mainProp, nestedProp] = prop.split('.');\n const idProp = relations.find(({ localField }) => localField === mainProp) ? 'id ' : '';\n return `${mainProp}{${idProp}${nestedProp}}`;\n};\n\nconst buildShapesConfig = (schemas, entityGroups, parent) => {\n if (!schemas || !entityGroups) return [];\n const { itemId, itemEntity } = parent;\n const shapeGroups = [];\n entityGroups.forEach((entityGroup, i) => {\n const { entity, shapes, dataSummaries = [] } = entityGroup;\n const parentId = entity === itemEntity && itemId;\n if (!entity) return null;\n const entityData = schemas[entity] || {};\n\n shapes.filter(Boolean).forEach((shape, shapeIndex) => {\n const shapeKey = `shape${i}${shapeIndex}`;\n const shapeValues = buiildShapeProps(\n shape,\n shapeKey,\n dataSummaries,\n parentId,\n entityData,\n entityGroup\n );\n shapeGroups.push({ ...shapeValues, shapeOptions: shape, entityOptions: entityGroup });\n });\n });\n\n return shapeGroups;\n};\n\nexport default buildShapesConfig;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,gBAAgB;AACpC,SAASC,QAAQ,EAAEC,GAAG,EAAEC,EAAE,QAAQ,iBAAiB;AAEnD,MAAMC,aAAa,GAAGC,UAAU,IAC9BA,UAAU,CACPC,MAAM,CAAC,CAACC,GAAG,EAAEC,QAAQ,KAAK;EACzB,IAAIA,QAAQ,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC1B,MAAM,CAACC,YAAY,EAAEC,YAAY,CAAC,GAAGH,QAAQ,CAACI,KAAK,CAAC,GAAG,CAAC;IACxD,OAAO,GAAGL,GAAG,IAAIG,YAAY,MAAMC,YAAY,IAAI;EACrD;EACA,OAAO,GAAGJ,GAAG,IAAIC,QAAQ,EAAE;AAC7B,CAAC,EAAE,EAAE,CAAC,CACLK,IAAI,CAAC,CAAC;AAEX,MAAMC,oBAAoB,GAAGA,CAACC,UAAU,EAAEC,UAAU,KAAK;EACvD,MAAM;IAAEX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;IACxB,MAAM/B,UAAU,GAAGoD,OAAO,CAACrB,MAAM,CAAC,IAAI,CAAC,CAAC;IAExC6B,MAAM,CAACvD,MAAM,CAACwD,OAAO,CAAC,CAACH,OAAO,CAAC,CAACpC,KAAK,EAAEwC,UAAU,KAAK;MACpD,MAAMvC,QAAQ,GAAG,QAAQoC,CAAC,GAAGG,UAAU,EAAE;MACzC,MAAMC,WAAW,GAAG1C,gBAAgB,CAClCC,KAAK,EACLC,QAAQ,EACRC,aAAa,EACbC,QAAQ,EACRzB,UAAU,EACV0B,WACF,CAAC;MACD+B,WAAW,CAACd,IAAI,CAAAqB,aAAA,CAAAA,aAAA,KAAMD,WAAW;QAAEE,YAAY,EAAE3C,KAAK;QAAE4C,aAAa,EAAExC;MAAW,EAAE,CAAC;IACvF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAO+B,WAAW;AACpB,CAAC;AAED,eAAeN,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","names":["gql","GET_ENTITY_SCHEMAS","generateQuery","queryString","generateWhereQuery","generateQueryString","action","query","props","generateIdsQuery","ids","JSON","stringify","generateFiltersQuery","rawQUery","filterQueryKey"],"sources":["../../src/GoogleMaps/queries.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst GET_ENTITY_SCHEMAS = gql`\n query getEntitySchemas($identifier: String) {\n getEntitySchemas(identifier: $identifier) {\n id\n identifier\n actions\n dynamicProperties\n properties\n relations\n }\n }\n`;\n\nconst generateQuery = queryString => gql`\n query getEntityData {\n ${queryString}\n }\n`;\n\nconst generateWhereQuery = queryString => gql`\n query getEntityData($where: JSON){\n ${queryString}\n }\n`;\nconst generateQueryString = (action, query, props) => `\n ${query}: ${action}(where: $where){\n id\n ${props}\n }\n`;\n\nconst generateIdsQuery = (query, props, action, ids) => `\n ${query}: ${action}(where: { id: { _in: ${JSON.stringify(ids)} } }){\n id\n ${props}\n }\n`;\n\nconst generateFiltersQuery = (query, props, rawQUery, filterQueryKey) => `\n ${query}: searchPublishedContent(rawQueryStringified: ${JSON.stringify(rawQUery)}){\n results {\n ...on ${filterQueryKey} {\n id\n ${props}\n }\n }\n }\n`;\n\nexport {\n GET_ENTITY_SCHEMAS,\n generateQuery,\n generateQueryString,\n generateIdsQuery,\n generateFiltersQuery,\n generateWhereQuery\n};\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,kBAAkB,GAAGD,
|
|
1
|
+
{"version":3,"file":"queries.js","names":["gql","GET_ENTITY_SCHEMAS","generateQuery","queryString","generateWhereQuery","generateQueryString","action","query","props","generateIdsQuery","ids","JSON","stringify","generateFiltersQuery","rawQUery","filterQueryKey"],"sources":["../../src/GoogleMaps/queries.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst GET_ENTITY_SCHEMAS = gql`\n query getEntitySchemas($identifier: String) {\n getEntitySchemas(identifier: $identifier) {\n id\n identifier\n actions\n dynamicProperties\n properties\n relations\n }\n }\n`;\n\nconst generateQuery = queryString => gql`\n query getEntityData {\n ${queryString}\n }\n`;\n\nconst generateWhereQuery = queryString => gql`\n query getEntityData($where: JSON){\n ${queryString}\n }\n`;\nconst generateQueryString = (action, query, props) => `\n ${query}: ${action}(where: $where){\n id\n ${props}\n }\n`;\n\nconst generateIdsQuery = (query, props, action, ids) => `\n ${query}: ${action}(where: { id: { _in: ${JSON.stringify(ids)} } }){\n id\n ${props}\n }\n`;\n\nconst generateFiltersQuery = (query, props, rawQUery, filterQueryKey) => `\n ${query}: searchPublishedContent(rawQueryStringified: ${JSON.stringify(rawQUery)}){\n results {\n ...on ${filterQueryKey} {\n id\n ${props}\n }\n }\n }\n`;\n\nexport {\n GET_ENTITY_SCHEMAS,\n generateQuery,\n generateQueryString,\n generateIdsQuery,\n generateFiltersQuery,\n generateWhereQuery\n};\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,kBAAkB,GAAGD,GAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAME,aAAa,GAAGC,WAAW,IAAIH,GAAG;AACxC;AACA,MAAMG,WAAW;AACjB;AACA,CAAC;AAED,MAAMC,kBAAkB,GAAGD,WAAW,IAAIH,GAAG;AAC7C;AACA,MAAMG,WAAW;AACjB;AACA,CAAC;AACD,MAAME,mBAAmB,GAAGA,CAACC,MAAM,EAAEC,KAAK,EAAEC,KAAK,KAAK;AACtD,IAAID,KAAK,KAAKD,MAAM;AACpB;AACA,MAAME,KAAK;AACX;AACA,CAAC;AAED,MAAMC,gBAAgB,GAAGA,CAACF,KAAK,EAAEC,KAAK,EAAEF,MAAM,EAAEI,GAAG,KAAK;AACxD,IAAIH,KAAK,KAAKD,MAAM,wBAAwBK,IAAI,CAACC,SAAS,CAACF,GAAG,CAAC;AAC/D;AACA,MAAMF,KAAK;AACX;AACA,CAAC;AAED,MAAMK,oBAAoB,GAAGA,CAACN,KAAK,EAAEC,KAAK,EAAEM,QAAQ,EAAEC,cAAc,KAAK;AACzE,IAAIR,KAAK,kDAAkDI,IAAI,CAACC,SAAS,CAACE,QAAQ,CAAC;AACnF;AACA,cAAcC,cAAc;AAC5B;AACA,UAAUP,KAAK;AACf;AACA;AACA;AACA,CAAC;AAED,SACEP,kBAAkB,EAClBC,aAAa,EACbG,mBAAmB,EACnBI,gBAAgB,EAChBI,oBAAoB,EACpBT,kBAAkB","ignoreList":[]}
|
package/lib-es/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export default async function load(app) {
|
|
|
5
5
|
app.events.once('load:custom:page-builder:component', addComponent => {
|
|
6
6
|
addComponent({
|
|
7
7
|
key: 'googlemaps',
|
|
8
|
-
component: dynamic(() => import(
|
|
8
|
+
component: dynamic(() => import(/* webpackChunkName: "blazePbGoogleMaps" */'./GoogleMaps'))
|
|
9
9
|
});
|
|
10
10
|
});
|
|
11
11
|
return {
|
package/lib-es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["dynamic","pkg","PLUGIN_NAME","load","app","events","once","addComponent","key","component","name","version","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport pkg from '../package.json';\nimport { PLUGIN_NAME } from './constants';\n\nexport default async function load(app) {\n app.events.once('load:custom:page-builder:component', addComponent => {\n addComponent({\n key: 'googlemaps',\n component: dynamic(() => import(/* webpackChunkName: \"blazePbGoogleMaps\" */ './GoogleMaps'))\n });\n });\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,cAAc;AAClC,OAAOC,GAAG,MAAM,iBAAiB;AACjC,SAASC,WAAW,QAAQ,aAAa;AAEzC,eAAe,eAAeC,IAAIA,CAACC,GAAG,EAAE;EACtCA,GAAG,CAACC,MAAM,CAACC,IAAI,CAAC,oCAAoC,EAAEC,YAAY,IAAI;IACpEA,YAAY,CAAC;MACXC,GAAG,EAAE,YAAY;MACjBC,SAAS,EAAET,OAAO,CAAC,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","names":["dynamic","pkg","PLUGIN_NAME","load","app","events","once","addComponent","key","component","name","version","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport pkg from '../package.json';\nimport { PLUGIN_NAME } from './constants';\n\nexport default async function load(app) {\n app.events.once('load:custom:page-builder:component', addComponent => {\n addComponent({\n key: 'googlemaps',\n component: dynamic(() => import(/* webpackChunkName: \"blazePbGoogleMaps\" */ './GoogleMaps'))\n });\n });\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,cAAc;AAClC,OAAOC,GAAG,MAAM,iBAAiB;AACjC,SAASC,WAAW,QAAQ,aAAa;AAEzC,eAAe,eAAeC,IAAIA,CAACC,GAAG,EAAE;EACtCA,GAAG,CAACC,MAAM,CAACC,IAAI,CAAC,oCAAoC,EAAEC,YAAY,IAAI;IACpEA,YAAY,CAAC;MACXC,GAAG,EAAE,YAAY;MACjBC,SAAS,EAAET,OAAO,CAAC,MAAM,MAAM,CAAC,2CAA4C,cAAc,CAAC;IAC7F,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAO;IACLU,IAAI,EAAER,WAAW;IACjBS,OAAO,EAAEV,GAAG,CAACU;EACf,CAAC;AACH;AAEAR,IAAI,CAACS,UAAU,GAAGV,WAAW","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/plugin-google-maps-fe",
|
|
3
|
-
"version": "0.146.0-node18-tooltips.
|
|
3
|
+
"version": "0.146.0-node18-core-styles-tooltips.56",
|
|
4
4
|
"description": "Blaze Google maps plugin fe",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/nextjs-components": "0.146.0-node18-tooltips.
|
|
31
|
-
"@blaze-cms/react-page-builder": "0.146.0-node18-tooltips.
|
|
32
|
-
"@blaze-cms/setup-ui": "0.146.0-node18-tooltips.
|
|
30
|
+
"@blaze-cms/nextjs-components": "0.146.0-node18-core-styles-tooltips.46",
|
|
31
|
+
"@blaze-cms/react-page-builder": "0.146.0-node18-core-styles-tooltips.56",
|
|
32
|
+
"@blaze-cms/setup-ui": "0.146.0-node18-core-styles-tooltips.46",
|
|
33
33
|
"@blaze-react/more": "^0.7.0",
|
|
34
34
|
"@blaze-react/utils": "^0.7.0",
|
|
35
35
|
"core-js": "^3.2.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"regenerator-runtime": "^0.13.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@blaze-cms/core-ui": "0.146.0-node18-tooltips.
|
|
42
|
+
"@blaze-cms/core-ui": "0.146.0-node18-core-styles-tooltips.46"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"next": "14.1.0"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"lib/*",
|
|
49
49
|
"lib-es/*"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "03c3266a9697c0ca7daff2a03165ded4d4cbc845"
|
|
52
52
|
}
|