@blaze-cms/plugin-gtm-fe 0.146.0-node18-core-styles-tooltips.60 → 0.146.0-node18-tooltips.49

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 CHANGED
@@ -3,7 +3,7 @@
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-core-styles-tooltips.60](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.59...v0.146.0-node18-core-styles-tooltips.60) (2026-06-18)
6
+ # [0.146.0-node18-tooltips.49](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.48...v0.146.0-node18-tooltips.49) (2026-06-19)
7
7
 
8
8
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- # [0.146.0-node18-core-styles-tooltips.58](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.57...v0.146.0-node18-core-styles-tooltips.58) (2026-04-28)
14
+ # [0.146.0-node18-tooltips.44](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.43...v0.146.0-node18-tooltips.44) (2026-05-13)
15
15
 
16
16
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
17
17
 
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- # [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)
22
+ # [0.146.0-node18-tooltips.42](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.41...v0.146.0-node18-tooltips.42) (2026-03-24)
23
23
 
24
24
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
25
25
 
@@ -27,7 +27,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
27
 
28
28
 
29
29
 
30
- # [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)
30
+ # [0.146.0-node18-tooltips.41](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.40...v0.146.0-node18-tooltips.41) (2026-03-03)
31
31
 
32
32
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
33
33
 
@@ -35,7 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
35
35
 
36
36
 
37
37
 
38
- # [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)
38
+ # [0.146.0-node18-tooltips.38](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.37...v0.146.0-node18-tooltips.38) (2026-01-27)
39
39
 
40
40
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
41
41
 
@@ -43,7 +43,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
43
43
 
44
44
 
45
45
 
46
- # [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)
46
+ # [0.146.0-node18-tooltips.37](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.36...v0.146.0-node18-tooltips.37) (2026-01-08)
47
47
 
48
48
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
49
49
 
@@ -51,7 +51,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
51
51
 
52
52
 
53
53
 
54
- # [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)
54
+ # [0.146.0-node18-tooltips.35](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.34...v0.146.0-node18-tooltips.35) (2025-12-17)
55
55
 
56
56
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
57
57
 
@@ -59,7 +59,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
59
59
 
60
60
 
61
61
 
62
- # [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)
62
+ # [0.146.0-node18-tooltips.34](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.33...v0.146.0-node18-tooltips.34) (2025-12-17)
63
63
 
64
64
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
65
65
 
@@ -67,7 +67,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
67
67
 
68
68
 
69
69
 
70
- # [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)
70
+ # [0.146.0-node18-tooltips.33](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.32...v0.146.0-node18-tooltips.33) (2025-12-15)
71
71
 
72
72
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
73
73
 
@@ -75,7 +75,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
75
75
 
76
76
 
77
77
 
78
- # [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)
78
+ # [0.146.0-node18-tooltips.32](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.31...v0.146.0-node18-tooltips.32) (2025-12-15)
79
79
 
80
80
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
81
81
 
@@ -83,7 +83,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
83
83
 
84
84
 
85
85
 
86
- # [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)
86
+ # [0.146.0-node18-tooltips.30](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.29...v0.146.0-node18-tooltips.30) (2025-11-17)
87
87
 
88
88
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
89
89
 
@@ -91,7 +91,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
91
91
 
92
92
 
93
93
 
94
- # [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)
94
+ # [0.146.0-node18-tooltips.28](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.27...v0.146.0-node18-tooltips.28) (2025-11-10)
95
95
 
96
96
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
97
97
 
@@ -99,7 +99,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
99
99
 
100
100
 
101
101
 
102
- # [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)
102
+ # [0.146.0-node18-tooltips.27](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.26...v0.146.0-node18-tooltips.27) (2025-11-06)
103
103
 
104
104
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
105
105
 
@@ -107,7 +107,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
107
107
 
108
108
 
109
109
 
110
- # [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)
110
+ # [0.146.0-node18-tooltips.26](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.25...v0.146.0-node18-tooltips.26) (2025-10-29)
111
111
 
112
112
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
113
113
 
@@ -115,7 +115,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
115
115
 
116
116
 
117
117
 
118
- # [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)
118
+ # [0.146.0-node18-tooltips.24](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.23...v0.146.0-node18-tooltips.24) (2025-10-27)
119
119
 
120
120
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
121
121
 
@@ -123,7 +123,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
123
123
 
124
124
 
125
125
 
126
- # [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)
126
+ # [0.146.0-node18-tooltips.23](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.22...v0.146.0-node18-tooltips.23) (2025-10-20)
127
127
 
128
128
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
129
129
 
@@ -131,7 +131,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
131
131
 
132
132
 
133
133
 
134
- # [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)
134
+ # [0.146.0-node18-tooltips.22](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.21...v0.146.0-node18-tooltips.22) (2025-10-17)
135
135
 
136
136
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
137
137
 
@@ -139,7 +139,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
139
139
 
140
140
 
141
141
 
142
- # [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)
142
+ # [0.146.0-node18-tooltips.21](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.20...v0.146.0-node18-tooltips.21) (2025-10-14)
143
143
 
144
144
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
145
145
 
@@ -147,7 +147,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
147
147
 
148
148
 
149
149
 
150
- # [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)
150
+ # [0.146.0-node18-tooltips.19](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.18...v0.146.0-node18-tooltips.19) (2025-10-10)
151
151
 
152
152
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
153
153
 
@@ -155,7 +155,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
155
155
 
156
156
 
157
157
 
158
- # [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)
158
+ # [0.146.0-node18-tooltips.13](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.12...v0.146.0-node18-tooltips.13) (2025-10-02)
159
159
 
160
160
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
161
161
 
@@ -163,7 +163,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
163
163
 
164
164
 
165
165
 
166
- # [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)
166
+ # [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-10-01)
167
167
 
168
168
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
169
169
 
@@ -171,7 +171,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
171
171
 
172
172
 
173
173
 
174
- # [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)
174
+ # [0.146.0-node18-tooltips.8](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.7...v0.146.0-node18-tooltips.8) (2025-09-24)
175
175
 
176
176
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
177
177
 
@@ -179,7 +179,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
179
179
 
180
180
 
181
181
 
182
- # [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)
182
+ # [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-09-22)
183
183
 
184
184
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
185
185
 
@@ -187,7 +187,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
187
187
 
188
188
 
189
189
 
190
- # [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)
190
+ # [0.146.0-node18-tooltips.2](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.1...v0.146.0-node18-tooltips.2) (2025-09-17)
191
191
 
192
192
  **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
193
193
 
@@ -195,87 +195,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
195
195
 
196
196
 
197
197
 
198
- # [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)
199
-
200
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
201
-
202
-
203
-
204
-
205
-
206
- # [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)
207
-
208
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
209
-
210
-
211
-
212
-
213
-
214
- # [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)
215
-
216
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
217
-
218
-
219
-
220
-
221
-
222
- # [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)
223
-
224
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
225
-
226
-
227
-
228
-
229
-
230
- # [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)
231
-
232
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
233
-
234
-
235
-
236
-
237
-
238
- # [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)
239
-
240
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
241
-
242
-
243
-
244
-
245
-
246
- # [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)
247
-
248
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
249
-
250
-
251
-
252
-
253
-
254
- # [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)
255
-
256
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
257
-
258
-
259
-
260
-
261
-
262
- # [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)
263
-
264
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
265
-
266
-
267
-
268
-
269
-
270
- # [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)
271
-
272
- **Note:** Version bump only for package @blaze-cms/plugin-gtm-fe
273
-
274
-
275
-
276
-
277
-
278
- # [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)
198
+ # [0.146.0-node18-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-tooltips.0) (2025-09-09)
279
199
 
280
200
 
281
201
  ### Bug Fixes
@@ -21,7 +21,7 @@ var _nextjsComponents = require("@blaze-cms/nextjs-components");
21
21
  var _GTMRender = _interopRequireDefault(require("./GTMRender"));
22
22
  var _helpers = require("../helpers");
23
23
  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); }
24
- 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 && Object.prototype.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
+ 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; }
25
25
  var GTMFactory = function GTMFactory(_ref) {
26
26
  var propsToDisplay = _ref.propsToDisplay,
27
27
  userPropsToDisplay = _ref.userPropsToDisplay,
@@ -1 +1 @@
1
- {"version":3,"file":"GTMFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMRender","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","GTMFactory","_ref","propsToDisplay","userPropsToDisplay","parent","gtmWebVitals","_useContext","useContext","MainContext","isPreview","_useQuery","useQuery","getSingleEntitySchema","variables","id","itemEntity","data","error","loading","window","propsToDisplayArr","buildPropsToDisplayArray","extraProps","buildPropsQuery","_getRenderProps","getRenderProps","action","actionKey","createElement","parentId","itemId","webVitals","propTypes","PropTypes","array","object","isRequired","bool","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManager/GTMFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMRender from './GTMRender';\nimport { getRenderProps, buildPropsToDisplayArray } from '../helpers';\n\nconst GTMFactory = ({ propsToDisplay, userPropsToDisplay, parent, gtmWebVitals }) => {\n const { isPreview } = useContext(MainContext);\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: parent.itemEntity }\n });\n\n if (typeof window === 'undefined') return null;\n if (loading || error || !data) return null;\n\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = buildPropsQuery(data, propsToDisplayArr) || '';\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data);\n\n return (\n <GTMRender\n action={action}\n actionKey={actionKey}\n userPropsToDisplay={userPropsToDisplay}\n propsToDisplay={propsToDisplay}\n parentId={parent.itemId}\n webVitals={gtmWebVitals}\n />\n );\n};\n\nGTMFactory.propTypes = {\n propsToDisplay: PropTypes.array,\n userPropsToDisplay: PropTypes.array,\n parent: PropTypes.object.isRequired,\n gtmWebVitals: PropTypes.bool\n};\n\nGTMFactory.defaultProps = {\n propsToDisplay: [],\n userPropsToDisplay: [],\n gtmWebVitals: false\n};\n\nexport default GTMFactory;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAsE,SAAAQ,yBAAAC,CAAA,6BAAAC,OA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K;EACnC9B,MAAM,EAAE6B,qBAAS,CAACE,MAAM,CAACC,UAAU;EACnC/B,YAAY,EAAE4B,qBAAS,CAACI;AAC1B,CAAC;AAEDrC,UAAU,CAACsC,YAAY,GAAG;EACxBpC,cAAc,EAAE,EAAE;EAClBC,kBAAkB,EAAE,EAAE;EACtBE,YAAY,EAAE;AAChB,CAAC;AAAC,IAAAkC,QAAA,GAAAC,OAAA,cAEaxC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"GTMFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMRender","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GTMFactory","_ref","propsToDisplay","userPropsToDisplay","parent","gtmWebVitals","_useContext","useContext","MainContext","isPreview","_useQuery","useQuery","getSingleEntitySchema","variables","id","itemEntity","data","error","loading","window","propsToDisplayArr","buildPropsToDisplayArray","extraProps","buildPropsQuery","_getRenderProps","getRenderProps","action","actionKey","createElement","parentId","itemId","webVitals","propTypes","PropTypes","array","object","isRequired","bool","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManager/GTMFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMRender from './GTMRender';\nimport { getRenderProps, buildPropsToDisplayArray } from '../helpers';\n\nconst GTMFactory = ({ propsToDisplay, userPropsToDisplay, parent, gtmWebVitals }) => {\n const { isPreview } = useContext(MainContext);\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: parent.itemEntity }\n });\n\n if (typeof window === 'undefined') return null;\n if (loading || error || !data) return null;\n\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = buildPropsQuery(data, propsToDisplayArr) || '';\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data);\n\n return (\n <GTMRender\n action={action}\n actionKey={actionKey}\n userPropsToDisplay={userPropsToDisplay}\n propsToDisplay={propsToDisplay}\n parentId={parent.itemId}\n webVitals={gtmWebVitals}\n />\n );\n};\n\nGTMFactory.propTypes = {\n propsToDisplay: PropTypes.array,\n userPropsToDisplay: PropTypes.array,\n parent: PropTypes.object.isRequired,\n gtmWebVitals: PropTypes.bool\n};\n\nGTMFactory.defaultProps = {\n propsToDisplay: [],\n userPropsToDisplay: [],\n gtmWebVitals: false\n};\n\nexport default GTMFactory;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAsE,SAAAQ,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,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,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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AAI,EAAE,OAAO,IAAI;EAE1C,IAAMI,iBAAiB,GAAG,IAAAC,iCAAwB,EAACnB,cAAc,CAAC;EAClE,IAAMoB,UAAU,GAAG,IAAAC,iCAAe,EAACP,IAAI,EAAEI,iBAAiB,CAAC,IAAI,EAAE;EACjE,IAAAI,eAAA,GAA8B,IAAAC,uBAAc,EAACH,UAAU,EAAEb,SAAS,EAAEO,IAAI,CAAC;IAAjEU,MAAM,GAAAF,eAAA,CAANE,MAAM;IAAEC,SAAS,GAAAH,eAAA,CAATG,SAAS;EAEzB,oBACEzD,MAAA,YAAA0D,aAAA,CAAClD,UAAA,WAAS;IACRgD,MAAM,EAAEA,MAAO;IACfC,SAAS,EAAEA,SAAU;IACrBxB,kBAAkB,EAAEA,kBAAmB;IACvCD,cAAc,EAAEA,cAAe;IAC/B2B,QAAQ,EAAEzB,MAAM,CAAC0B,MAAO;IACxBC,SAAS,EAAE1B;EAAa,CACzB,CAAC;AAEN,CAAC;AAEDL,UAAU,CAACgC,SAAS,GAAG;EACrB9B,cAAc,EAAE+B,qBAAS,CAACC,KAAK;EAC/B/B,kBAAkB,EAAE8B,qBAAS,CAACC,KAAK;EACnC9B,MAAM,EAAE6B,qBAAS,CAACE,MAAM,CAACC,UAAU;EACnC/B,YAAY,EAAE4B,qBAAS,CAACI;AAC1B,CAAC;AAEDrC,UAAU,CAACsC,YAAY,GAAG;EACxBpC,cAAc,EAAE,EAAE;EAClBC,kBAAkB,EAAE,EAAE;EACtBE,YAAY,EAAE;AAChB,CAAC;AAAC,IAAAkC,QAAA,GAAAC,OAAA,cAEaxC,UAAU","ignoreList":[]}
@@ -9,6 +9,7 @@ exports["default"] = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  require("core-js/modules/es.array.join.js");
11
11
  require("core-js/modules/es.array.map.js");
12
+ require("core-js/modules/es.object.to-string.js");
12
13
  var _react = _interopRequireDefault(require("react"));
13
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
15
  var _GTMClickEvent = _interopRequireDefault(require("./GTMClickEvent"));
@@ -1 +1 @@
1
- {"version":3,"file":"GTMClickEvents.js","names":["_react","_interopRequireDefault","require","_propTypes","_GTMClickEvent","GTMClickEvents","_ref","gtmEvents","componentProps","parentComponent","map","event","index","eventName","dynamicKey","join","createElement","_extends2","key","propTypes","PropTypes","array","oneOfType","object","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMClickEvents.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport GTMClickEvent from './GTMClickEvent';\n\nconst GTMClickEvents = ({ gtmEvents, componentProps, parentComponent }) =>\n gtmEvents.map((event, index) => {\n const { eventName } = event;\n const dynamicKey = [eventName, index].join('-');\n\n return (\n <GTMClickEvent\n key={dynamicKey}\n event={event}\n componentProps={componentProps}\n parentComponent={parentComponent}\n {...event}\n />\n );\n });\n\nGTMClickEvents.propTypes = {\n gtmEvents: PropTypes.array,\n componentProps: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMClickEvents.defaultProps = {\n gtmEvents: [],\n componentProps: {},\n parentComponent: {}\n};\n\nexport default GTMClickEvents;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAMG,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA;EAAA,IAAMC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,eAAe,GAAAH,IAAA,CAAfG,eAAe;EAAA,OAClEF,SAAS,CAACG,GAAG,CAAC,UAACC,KAAK,EAAEC,KAAK,EAAK;IAC9B,IAAQC,SAAS,GAAKF,KAAK,CAAnBE,SAAS;IACjB,IAAMC,UAAU,GAAG,CAACD,SAAS,EAAED,KAAK,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;IAE/C,oBACEf,MAAA,YAAAgB,aAAA,CAACZ,cAAA,WAAa,MAAAa,SAAA;MACZC,GAAG,EAAEJ,UAAW;MAChBH,KAAK,EAAEA,KAAM;MACbH,cAAc,EAAEA,cAAe;MAC/BC,eAAe,EAAEA;IAAgB,GAC7BE,KAAK,CACV,CAAC;EAEN,CAAC,CAAC;AAAA;AAEJN,cAAc,CAACc,SAAS,GAAG;EACzBZ,SAAS,EAAEa,qBAAS,CAACC,KAAK;EAC1Bb,cAAc,EAAEY,qBAAS,CAACE,SAAS,CAAC,CAACF,qBAAS,CAACG,MAAM,EAAEH,qBAAS,CAACC,KAAK,CAAC,CAAC;EACxEZ,eAAe,EAAEW,qBAAS,CAACG;AAC7B,CAAC;AAEDlB,cAAc,CAACmB,YAAY,GAAG;EAC5BjB,SAAS,EAAE,EAAE;EACbC,cAAc,EAAE,CAAC,CAAC;EAClBC,eAAe,EAAE,CAAC;AACpB,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,cAEarB,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"GTMClickEvents.js","names":["_react","_interopRequireDefault","require","_propTypes","_GTMClickEvent","GTMClickEvents","_ref","gtmEvents","componentProps","parentComponent","map","event","index","eventName","dynamicKey","join","createElement","_extends2","key","propTypes","PropTypes","array","oneOfType","object","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMClickEvents.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport GTMClickEvent from './GTMClickEvent';\n\nconst GTMClickEvents = ({ gtmEvents, componentProps, parentComponent }) =>\n gtmEvents.map((event, index) => {\n const { eventName } = event;\n const dynamicKey = [eventName, index].join('-');\n\n return (\n <GTMClickEvent\n key={dynamicKey}\n event={event}\n componentProps={componentProps}\n parentComponent={parentComponent}\n {...event}\n />\n );\n });\n\nGTMClickEvents.propTypes = {\n gtmEvents: PropTypes.array,\n componentProps: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMClickEvents.defaultProps = {\n gtmEvents: [],\n componentProps: {},\n parentComponent: {}\n};\n\nexport default GTMClickEvents;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAMG,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA;EAAA,IAAMC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,eAAe,GAAAH,IAAA,CAAfG,eAAe;EAAA,OAClEF,SAAS,CAACG,GAAG,CAAC,UAACC,KAAK,EAAEC,KAAK,EAAK;IAC9B,IAAQC,SAAS,GAAKF,KAAK,CAAnBE,SAAS;IACjB,IAAMC,UAAU,GAAG,CAACD,SAAS,EAAED,KAAK,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;IAE/C,oBACEf,MAAA,YAAAgB,aAAA,CAACZ,cAAA,WAAa,MAAAa,SAAA;MACZC,GAAG,EAAEJ,UAAW;MAChBH,KAAK,EAAEA,KAAM;MACbH,cAAc,EAAEA,cAAe;MAC/BC,eAAe,EAAEA;IAAgB,GAC7BE,KAAK,CACV,CAAC;EAEN,CAAC,CAAC;AAAA;AAEJN,cAAc,CAACc,SAAS,GAAG;EACzBZ,SAAS,EAAEa,qBAAS,CAACC,KAAK;EAC1Bb,cAAc,EAAEY,qBAAS,CAACE,SAAS,CAAC,CAACF,qBAAS,CAACG,MAAM,EAAEH,qBAAS,CAACC,KAAK,CAAC,CAAC;EACxEZ,eAAe,EAAEW,qBAAS,CAACG;AAC7B,CAAC;AAEDlB,cAAc,CAACmB,YAAY,GAAG;EAC5BjB,SAAS,EAAE,EAAE;EACbC,cAAc,EAAE,CAAC,CAAC;EAClBC,eAAe,EAAE,CAAC;AACpB,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,cAEarB,cAAc","ignoreList":[]}
@@ -20,7 +20,7 @@ var _reactWaypoint = require("react-waypoint");
20
20
  var _helpers = require("../helpers");
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" != _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 && Object.prototype.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; }
23
+ 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; }
24
24
  var GTMEvent = function GTMEvent(_ref) {
25
25
  var dataLayerObject = _ref.dataLayerObject,
26
26
  eventTrigger = _ref.eventTrigger,
@@ -1 +1 @@
1
- {"version":3,"file":"GTMEvent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_reactWaypoint","_helpers","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","GTMEvent","_ref","dataLayerObject","eventTrigger","currentLocation","handleOnSuccess","_useState","useState","_useState2","_slicedToArray2","shouldPushLayer","setShouldPushLayer","isViewEvent","IN_VIEW","isOnSuccess","ON_SUCCESS","useEffect","pushDataLayer","pushToDataLayer","createElement","Waypoint","onEnter","propTypes","PropTypes","func","isRequired","object","string","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMEvent.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport { pushToDataLayer } from '../helpers';\nimport { IN_VIEW, ON_SUCCESS } from '../constants';\n\nconst GTMEvent = ({ dataLayerObject, eventTrigger, currentLocation, handleOnSuccess }) => {\n const [shouldPushLayer, setShouldPushLayer] = useState(false);\n const isViewEvent = eventTrigger === IN_VIEW;\n const isOnSuccess = eventTrigger === ON_SUCCESS && !!handleOnSuccess;\n\n useEffect(() => {\n setShouldPushLayer(true);\n }, [currentLocation]);\n\n const pushDataLayer = () => {\n pushToDataLayer(dataLayerObject);\n setShouldPushLayer(false);\n if (isOnSuccess) handleOnSuccess();\n };\n\n if (!isViewEvent && shouldPushLayer) {\n pushDataLayer();\n return null;\n }\n\n return isViewEvent && shouldPushLayer ? <Waypoint onEnter={pushDataLayer} /> : null;\n};\n\nGTMEvent.propTypes = {\n handleOnSuccess: PropTypes.func.isRequired,\n dataLayerObject: PropTypes.object.isRequired,\n eventTrigger: PropTypes.string.isRequired,\n currentLocation: PropTypes.string.isRequired\n};\n\nexport default GTMEvent;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,O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 {"version":3,"file":"GTMEvent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_reactWaypoint","_helpers","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GTMEvent","_ref","dataLayerObject","eventTrigger","currentLocation","handleOnSuccess","_useState","useState","_useState2","_slicedToArray2","shouldPushLayer","setShouldPushLayer","isViewEvent","IN_VIEW","isOnSuccess","ON_SUCCESS","useEffect","pushDataLayer","pushToDataLayer","createElement","Waypoint","onEnter","propTypes","PropTypes","func","isRequired","object","string","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMEvent.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport { pushToDataLayer } from '../helpers';\nimport { IN_VIEW, ON_SUCCESS } from '../constants';\n\nconst GTMEvent = ({ dataLayerObject, eventTrigger, currentLocation, handleOnSuccess }) => {\n const [shouldPushLayer, setShouldPushLayer] = useState(false);\n const isViewEvent = eventTrigger === IN_VIEW;\n const isOnSuccess = eventTrigger === ON_SUCCESS && !!handleOnSuccess;\n\n useEffect(() => {\n setShouldPushLayer(true);\n }, [currentLocation]);\n\n const pushDataLayer = () => {\n pushToDataLayer(dataLayerObject);\n setShouldPushLayer(false);\n if (isOnSuccess) handleOnSuccess();\n };\n\n if (!isViewEvent && shouldPushLayer) {\n pushDataLayer();\n return null;\n }\n\n return isViewEvent && shouldPushLayer ? <Waypoint onEnter={pushDataLayer} /> : null;\n};\n\nGTMEvent.propTypes = {\n handleOnSuccess: PropTypes.func.isRequired,\n dataLayerObject: PropTypes.object.isRequired,\n eventTrigger: PropTypes.string.isRequired,\n currentLocation: PropTypes.string.isRequired\n};\n\nexport default GTMEvent;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAA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BAAS,CAACI,MAAM,CAACF;AACpC,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,cAEa7B,QAAQ","ignoreList":[]}
@@ -3,7 +3,6 @@
3
3
  require("core-js/modules/es.array.iterator.js");
4
4
  require("core-js/modules/es.object.define-property.js");
5
5
  require("core-js/modules/es.object.get-own-property-descriptor.js");
6
- require("core-js/modules/es.object.to-string.js");
7
6
  require("core-js/modules/es.string.iterator.js");
8
7
  require("core-js/modules/es.weak-map.js");
9
8
  require("core-js/modules/web.dom-collections.iterator.js");
@@ -18,6 +17,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
18
17
  require("core-js/modules/es.array.concat.js");
19
18
  require("core-js/modules/es.array.is-array.js");
20
19
  require("core-js/modules/es.array.map.js");
20
+ require("core-js/modules/es.object.to-string.js");
21
21
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
22
22
  var _react = _interopRequireWildcard(require("react"));
23
23
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -29,7 +29,7 @@ var _helpers = require("../helpers");
29
29
  var _constants = require("../constants");
30
30
  var _excluded = ["propsToDisplay"];
31
31
  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); }
32
- 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 && Object.prototype.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; }
32
+ 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; }
33
33
  var GTMEventFactory = function GTMEventFactory(_ref) {
34
34
  var parent = _ref.parent,
35
35
  gtmEvents = _ref.gtmEvents,
@@ -1 +1 @@
1
- {"version":3,"file":"GTMEventFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMEventRender","_helpers","_constants","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","GTMEventFactory","_ref","parent","gtmEvents","parentData","clickId","parentComponent","_useContext","useContext","MainContext","isPreview","_ref2","_ref3","_slicedToArray2","_ref3$","_ref3$2","_ref3$2$itemEntity","itemEntity","_useQuery","useQuery","getSingleEntitySchema","variables","id","data","error","loading","map","_ref4","propsToDisplay","eventProps","_objectWithoutProperties2","hasNoPropsToDisplay","length","propsToDisplayArr","buildPropsToDisplayArray","extraProps","buildPropsQuery","shouldUseParentData","itemIdToUse","itemId","getIdsToUse","shouldUseMultiQuery","Array","isArray","_getRenderProps","getRenderProps","action","actionKey","dynamicKey","concat","GTM_EVENT_FACTORY","queryVariables","where","_in","skip","createElement","_extends2","key","propTypes","PropTypes","object","isRequired","string","array","oneOfType","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMEventFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMEventRender from './GTMEventRender';\nimport { getRenderProps, getIdsToUse, buildPropsToDisplayArray } from '../helpers';\nimport { GTM_EVENT_FACTORY } from '../constants';\n\nconst GTMEventFactory = ({ parent, gtmEvents, parentData, clickId, parentComponent }) => {\n const { isPreview } = useContext(MainContext);\n const [{ itemEntity = parent.itemEntity } = {}] = parentData || [];\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: itemEntity }\n });\n\n if (loading || error || !data) return null;\n\n return gtmEvents.map(({ propsToDisplay, ...eventProps }, i) => {\n const hasNoPropsToDisplay = !propsToDisplay || !propsToDisplay.length;\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = hasNoPropsToDisplay ? '' : buildPropsQuery(data, propsToDisplayArr);\n const shouldUseParentData = !clickId && parentData && parentData.length;\n const itemIdToUse = clickId || parent.itemId;\n const itemId = shouldUseParentData ? getIdsToUse(parentData) : itemIdToUse;\n const shouldUseMultiQuery = Array.isArray(itemId);\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data, shouldUseMultiQuery);\n const dynamicKey = `${GTM_EVENT_FACTORY}${i}`;\n const queryVariables = shouldUseMultiQuery\n ? {\n variables: { where: { id: { _in: itemId } } },\n skip: hasNoPropsToDisplay\n }\n : {\n variables: { id: itemId },\n skip: hasNoPropsToDisplay\n };\n\n return (\n <GTMEventRender\n key={dynamicKey}\n action={action}\n actionKey={actionKey}\n propsToDisplay={propsToDisplay}\n id={itemId}\n queryVariables={queryVariables}\n parentComponent={parentComponent}\n {...eventProps}\n />\n );\n });\n};\n\nGTMEventFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n clickId: PropTypes.string,\n gtmEvents: PropTypes.array,\n parentData: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMEventFactory.defaultProps = {\n clickId: null,\n gtmEvents: [],\n parentData: null,\n parentCompon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ACEhE,MAAA,YAAAwF,aAAA,CAAChF,eAAA,WAAc,MAAAiF,SAAA;MACbC,GAAG,EAAET,UAAW;MAChBF,MAAM,EAAEA,MAAO;MACfC,SAAS,EAAEA,SAAU;MACrBnB,cAAc,EAAEA,cAAe;MAC/BN,EAAE,EAAEiB,MAAO;MACXY,cAAc,EAAEA,cAAe;MAC/B7C,eAAe,EAAEA;IAAgB,GAC7BuB,UAAU,CACf,CAAC;EAEN,CAAC,CAAC;AACJ,CAAC;AAED7B,eAAe,CAAC0D,SAAS,GAAG;EAC1BxD,MAAM,EAAEyD,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCxD,OAAO,EAAEsD,qBAAS,CAACG,MAAM;EACzB3D,SAAS,EAAEwD,qBAAS,CAACI,KAAK;EAC1B3D,UAAU,EAAEuD,qBAAS,CAACK,SAAS,CAAC,CAACL,qBAAS,CAACC,MAAM,EAAED,qBAAS,CAACI,KAAK,CAAC,CAAC;EACpEzD,eAAe,EAAEqD,qBAAS,CAACC;AAC7B,CAAC;AAED5D,eAAe,CAACiE,YAAY,GAAG;EAC7B5D,OAAO,EAAE,IAAI;EACbF,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,IAAI;EAChBE,eAAe,EAAE,CAAC;AACpB,CAAC;AAAC,IAAA4D,QAAA,GAAAC,OAAA,cAEanE,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"GTMEventFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMEventRender","_helpers","_constants","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GTMEventFactory","_ref","parent","gtmEvents","parentData","clickId","parentComponent","_useContext","useContext","MainContext","isPreview","_ref2","_ref3","_slicedToArray2","_ref3$","_ref3$2","_ref3$2$itemEntity","itemEntity","_useQuery","useQuery","getSingleEntitySchema","variables","id","data","error","loading","map","_ref4","propsToDisplay","eventProps","_objectWithoutProperties2","hasNoPropsToDisplay","length","propsToDisplayArr","buildPropsToDisplayArray","extraProps","buildPropsQuery","shouldUseParentData","itemIdToUse","itemId","getIdsToUse","shouldUseMultiQuery","Array","isArray","_getRenderProps","getRenderProps","action","actionKey","dynamicKey","concat","GTM_EVENT_FACTORY","queryVariables","where","_in","skip","createElement","_extends2","key","propTypes","PropTypes","object","isRequired","string","array","oneOfType","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMEventFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMEventRender from './GTMEventRender';\nimport { getRenderProps, getIdsToUse, buildPropsToDisplayArray } from '../helpers';\nimport { GTM_EVENT_FACTORY } from '../constants';\n\nconst GTMEventFactory = ({ parent, gtmEvents, parentData, clickId, parentComponent }) => {\n const { isPreview } = useContext(MainContext);\n const [{ itemEntity = parent.itemEntity } = {}] = parentData || [];\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: itemEntity }\n });\n\n if (loading || error || !data) return null;\n\n return gtmEvents.map(({ propsToDisplay, ...eventProps }, i) => {\n const hasNoPropsToDisplay = !propsToDisplay || !propsToDisplay.length;\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = hasNoPropsToDisplay ? '' : buildPropsQuery(data, propsToDisplayArr);\n const shouldUseParentData = !clickId && parentData && parentData.length;\n const itemIdToUse = clickId || parent.itemId;\n const itemId = shouldUseParentData ? getIdsToUse(parentData) : itemIdToUse;\n const shouldUseMultiQuery = Array.isArray(itemId);\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data, shouldUseMultiQuery);\n const dynamicKey = `${GTM_EVENT_FACTORY}${i}`;\n const queryVariables = shouldUseMultiQuery\n ? {\n variables: { where: { id: { _in: itemId } } },\n skip: hasNoPropsToDisplay\n }\n : {\n variables: { id: itemId },\n skip: hasNoPropsToDisplay\n };\n\n return (\n <GTMEventRender\n key={dynamicKey}\n action={action}\n actionKey={actionKey}\n propsToDisplay={propsToDisplay}\n id={itemId}\n queryVariables={queryVariables}\n parentComponent={parentComponent}\n {...eventProps}\n />\n );\n });\n};\n\nGTMEventFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n clickId: PropTypes.string,\n gtmEvents: PropTypes.array,\n parentData: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMEventFactory.defaultProps = {\n clickId: null,\n gtmEvents: [],\n parentData: null,\n parentComponent: {}\n};\n\nexport default GTMEventFactory;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAAiD,IAAAS,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,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAA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AC,OAAA,cAEanE,eAAe","ignoreList":[]}
@@ -32,7 +32,7 @@ var _GTMEvent = _interopRequireDefault(require("./GTMEvent"));
32
32
  var _helpers = require("../helpers");
33
33
  var _excluded = ["router", "action", "actionKey", "queryVariables", "parentComponent", "userPropsToDisplay", "handleOnSuccess"];
34
34
  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); }
35
- 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 && Object.prototype.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; }
35
+ 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; }
36
36
  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; }
37
37
  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; }
38
38
  var GTMEventRender = function GTMEventRender(_ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"GTMEventRender.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_router","_GTMEvent","_helpers","_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","GTMEventRender","_ref","router","action","actionKey","queryVariables","parentComponent","userPropsToDisplay","handleOnSuccess","eventProps","_objectWithoutProperties2","asPath","_useState","useState","_useState2","_slicedToArray2","currentLocation","setCurrentLocation","_useQuery","useQuery","_useQuery$data","data","error","loading","hasUserProps","userProps","buildUserQueryProps","_useQuery2","getCurrentUser","variables","skip","userData","userLoading","gtmData","entityData","eventTrigger","propsToDisplay","eventEcommerce","dataLayerProps","buildDataLayer","dataLayerObject","buildNestedEvent","userLayerObject","buildUserLayer","extendedDataLayer","createElement","propTypes","PropTypes","array","object","isRequired","string","func","defaultProps","_default","exports","withRouter"],"sources":["../../src/GoogleTagManagerEvent/GTMEventRender.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getCurrentUser } from '@blaze-cms/react-page-builder';\nimport { withRouter } from 'next/router';\nimport GTMEvent from './GTMEvent';\nimport { buildDataLayer, buildNestedEvent, buildUserQueryProps, buildUserLayer } from '../helpers';\n\nconst GTMEventRender = ({\n router,\n action,\n actionKey,\n queryVariables,\n parentComponent,\n userPropsToDisplay,\n handleOnSuccess,\n ...eventProps\n}) => {\n const { asPath } = router;\n const [currentLocation, setCurrentLocation] = useState('');\n const { data = {}, error, loading } = useQuery(action, queryVariables);\n const hasUserProps = userPropsToDisplay && userPropsToDisplay.length;\n const userProps = hasUserProps ? buildUserQueryProps(userPropsToDisplay) : '';\n const { data: userData, loading: userLoading } = useQuery(getCurrentUser(userProps), {\n variables: {},\n skip: !hasUserProps\n });\n\n if (loading || userLoading || error) return null;\n const gtmData = data.entityData || data[actionKey];\n\n if (currentLocation !== asPath) {\n setCurrentLocation(asPath);\n return null;\n }\n\n const { eventTrigger, propsToDisplay, eventEcommerce } = eventProps;\n const dataLayerProps = buildDataLayer(gtmData, propsToDisplay);\n\n const dataLayerObject = buildNestedEvent(\n eventEcommerce,\n eventProps,\n dataLayerProps,\n parentComponent\n );\n const userLayerObject = buildUserLayer(userData, userPropsToDisplay);\n const extendedDataLayer = { ...dataLayerObject, ...userLayerObject };\n\n return (\n <GTMEvent\n dataLayerObject={extendedDataLayer}\n eventTrigger={eventTrigger}\n currentLocation={currentLocation}\n handleOnSuccess={handleOnSuccess}\n />\n );\n};\n\nGTMEventRender.propTypes = {\n userPropsToDisplay: PropTypes.array,\n router: PropTypes.object.isRequired,\n action: PropTypes.object.isRequired,\n actionKey: PropTypes.string.isRequired,\n queryVariables: PropTypes.object.isRequired,\n parentComponent: PropTypes.object.isRequired,\n handleOnSuccess: PropTypes.func\n};\n\nGTMEventRender.defaultProps = {\n userPropsToDisplay: [],\n handleOnSuccess: () => {}\n};\n\nGTMEventRender.defaultProps = {\n userPropsToDisplay: []\n};\n\nexport default withRouter(GTMEventRender);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IA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AEDR,cAAc,CAACqD,YAAY,GAAG;EAC5B9C,kBAAkB,EAAE;AACtB,CAAC;AAAC,IAAA+C,QAAA,GAAAC,OAAA,cAEa,IAAAC,kBAAU,EAACxD,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"GTMEventRender.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_router","_GTMEvent","_helpers","_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","GTMEventRender","_ref","router","action","actionKey","queryVariables","parentComponent","userPropsToDisplay","handleOnSuccess","eventProps","_objectWithoutProperties2","asPath","_useState","useState","_useState2","_slicedToArray2","currentLocation","setCurrentLocation","_useQuery","useQuery","_useQuery$data","data","error","loading","hasUserProps","userProps","buildUserQueryProps","_useQuery2","getCurrentUser","variables","skip","userData","userLoading","gtmData","entityData","eventTrigger","propsToDisplay","eventEcommerce","dataLayerProps","buildDataLayer","dataLayerObject","buildNestedEvent","userLayerObject","buildUserLayer","extendedDataLayer","createElement","propTypes","PropTypes","array","object","isRequired","string","func","defaultProps","_default","exports","withRouter"],"sources":["../../src/GoogleTagManagerEvent/GTMEventRender.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getCurrentUser } from '@blaze-cms/react-page-builder';\nimport { withRouter } from 'next/router';\nimport GTMEvent from './GTMEvent';\nimport { buildDataLayer, buildNestedEvent, buildUserQueryProps, buildUserLayer } from '../helpers';\n\nconst GTMEventRender = ({\n router,\n action,\n actionKey,\n queryVariables,\n parentComponent,\n userPropsToDisplay,\n handleOnSuccess,\n ...eventProps\n}) => {\n const { asPath } = router;\n const [currentLocation, setCurrentLocation] = useState('');\n const { data = {}, error, loading } = useQuery(action, queryVariables);\n const hasUserProps = userPropsToDisplay && userPropsToDisplay.length;\n const userProps = hasUserProps ? buildUserQueryProps(userPropsToDisplay) : '';\n const { data: userData, loading: userLoading } = useQuery(getCurrentUser(userProps), {\n variables: {},\n skip: !hasUserProps\n });\n\n if (loading || userLoading || error) return null;\n const gtmData = data.entityData || data[actionKey];\n\n if (currentLocation !== asPath) {\n setCurrentLocation(asPath);\n return null;\n }\n\n const { eventTrigger, propsToDisplay, eventEcommerce } = eventProps;\n const dataLayerProps = buildDataLayer(gtmData, propsToDisplay);\n\n const dataLayerObject = buildNestedEvent(\n eventEcommerce,\n eventProps,\n dataLayerProps,\n parentComponent\n );\n const userLayerObject = buildUserLayer(userData, userPropsToDisplay);\n const extendedDataLayer = { ...dataLayerObject, ...userLayerObject };\n\n return (\n <GTMEvent\n dataLayerObject={extendedDataLayer}\n eventTrigger={eventTrigger}\n currentLocation={currentLocation}\n handleOnSuccess={handleOnSuccess}\n />\n );\n};\n\nGTMEventRender.propTypes = {\n userPropsToDisplay: PropTypes.array,\n router: PropTypes.object.isRequired,\n action: PropTypes.object.isRequired,\n actionKey: PropTypes.string.isRequired,\n queryVariables: PropTypes.object.isRequired,\n parentComponent: PropTypes.object.isRequired,\n handleOnSuccess: PropTypes.func\n};\n\nGTMEventRender.defaultProps = {\n userPropsToDisplay: [],\n handleOnSuccess: () => {}\n};\n\nGTMEventRender.defaultProps = {\n userPropsToDisplay: []\n};\n\nexport default withRouter(GTMEventRender);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAA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a,IAAAC,kBAAU,EAACxD,cAAc,CAAC","ignoreList":[]}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = void 0;
8
8
  require("core-js/modules/es.array.map.js");
9
+ require("core-js/modules/es.object.to-string.js");
9
10
  var getIdsToUse = function getIdsToUse(parentData) {
10
11
  if (!parentData || !parentData.length) return [];
11
12
  return parentData.map(function (_ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-ids-to-use.js","names":["getIdsToUse","parentData","length","map","_ref","id","_default","exports"],"sources":["../../src/helpers/get-ids-to-use.js"],"sourcesContent":["const getIdsToUse = parentData => {\n if (!parentData || !parentData.length) return [];\n\n return parentData.map(({ id }) => id);\n};\n\nexport default getIdsToUse;\n"],"mappings":";;;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAGC,UAAU,EAAI;EAChC,IAAI,CAACA,UAAU,IAAI,CAACA,UAAU,CAACC,MAAM,EAAE,OAAO,EAAE;EAEhD,OAAOD,UAAU,CAACE,GAAG,CAAC,UAAAC,IAAA;IAAA,IAAGC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAA,OAAOA,EAAE;EAAA,EAAC;AACvC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaP,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"get-ids-to-use.js","names":["getIdsToUse","parentData","length","map","_ref","id","_default","exports"],"sources":["../../src/helpers/get-ids-to-use.js"],"sourcesContent":["const getIdsToUse = parentData => {\n if (!parentData || !parentData.length) return [];\n\n return parentData.map(({ id }) => id);\n};\n\nexport default getIdsToUse;\n"],"mappings":";;;;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAGC,UAAU,EAAI;EAChC,IAAI,CAACA,UAAU,IAAI,CAACA,UAAU,CAACC,MAAM,EAAE,OAAO,EAAE;EAEhD,OAAOD,UAAU,CAACE,GAAG,CAAC,UAAAC,IAAA;IAAA,IAAGC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAA,OAAOA,EAAE;EAAA,EAAC;AACvC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaP,WAAW","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 && Object.prototype.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; }
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"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(app) {
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: 'gtm',
35
35
  component: (0, _dynamic["default"])(function () {
36
36
  return Promise.resolve().then(function () {
37
- return _interopRequireWildcard(require( /* webpackChunkName: "blazePbGoogleTagManager" */'./GoogleTagManager'));
37
+ return _interopRequireWildcard(require(/* webpackChunkName: "blazePbGoogleTagManager" */'./GoogleTagManager'));
38
38
  });
39
39
  })
40
40
  });
@@ -42,7 +42,7 @@ function _load() {
42
42
  key: 'gtm-events',
43
43
  component: (0, _dynamic["default"])(function () {
44
44
  return Promise.resolve().then(function () {
45
- return _interopRequireWildcard(require( /* webpackChunkName: "blazePbGoogleTagManagerEvent" */'./GoogleTagManagerEvent'));
45
+ return _interopRequireWildcard(require(/* webpackChunkName: "blazePbGoogleTagManagerEvent" */'./GoogleTagManagerEvent'));
46
46
  });
47
47
  })
48
48
  });
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","prototype","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';\n\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: 'gtm',\n component: dynamic(\n () => import(/* webpackChunkName: \"blazePbGoogleTagManager\" */ './GoogleTagManager')\n )\n });\n addComponent({\n key: 'gtm-events',\n component: dynamic(\n () =>\n import(/* webpackChunkName: \"blazePbGoogleTagManagerEvent\" */ './GoogleTagManagerEvent')\n )\n });\n });\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAA0C,SAAAG,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,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,oBAAAM,QAAA,aAAAN,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAe,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CA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F;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDJ,IAAI,CAAC8B,UAAU,GAAGJ,sBAAW","ignoreList":[]}
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';\n\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: 'gtm',\n component: dynamic(\n () => import(/* webpackChunkName: \"blazePbGoogleTagManager\" */ './GoogleTagManager')\n )\n });\n addComponent({\n key: 'gtm-events',\n component: dynamic(\n () =>\n import(/* webpackChunkName: \"blazePbGoogleTagManagerEvent\" */ './GoogleTagManagerEvent')\n )\n });\n });\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAA0C,SAAAG,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,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,C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ACXC,GAAG,EAAE,KAAK;cACVC,SAAS,EAAE,IAAAC,mBAAO,EAChB;gBAAA,OAAAC,OAAA,CAAAC,OAAA,GAAAC,IAAA;kBAAA,OAAAvC,uBAAA,CAAAR,OAAA,CAAa,iDAAkD,oBAAoB;gBAAA;cAAA,CACrF;YACF,CAAC,CAAC;YACFyC,YAAY,CAAC;cACXC,GAAG,EAAE,YAAY;cACjBC,SAAS,EAAE,IAAAC,mBAAO,EAChB;gBAAA,OAAAC,OAAA,CAAAC,OAAA,GAAAC,IAAA;kBAAA,OAAAvC,uBAAA,CAAAR,OAAA,CACS,sDAAuD,yBAAyB;gBAAA;cAAA,CAC3F;YACF,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":"GTMEventFactory.js","names":["React","useContext","PropTypes","useQuery","getSingleEntitySchema","buildPropsQuery","MainContext","GTMEventRender","getRenderProps","getIdsToUse","buildPropsToDisplayArray","GTM_EVENT_FACTORY","GTMEventFactory","parent","gtmEvents","parentData","clickId","parentComponent","isPreview","itemEntity","data","error","loading","variables","id","map","_ref","i","propsToDisplay","eventProps","_objectWithoutProperties","_excluded","hasNoPropsToDisplay","length","propsToDisplayArr","extraProps","shouldUseParentData","itemIdToUse","itemId","shouldUseMultiQuery","Array","isArray","action","actionKey","dynamicKey","queryVariables","where","_in","skip","createElement","_extends","key","propTypes","object","isRequired","string","array","oneOfType","defaultProps"],"sources":["../../src/GoogleTagManagerEvent/GTMEventFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMEventRender from './GTMEventRender';\nimport { getRenderProps, getIdsToUse, buildPropsToDisplayArray } from '../helpers';\nimport { GTM_EVENT_FACTORY } from '../constants';\n\nconst GTMEventFactory = ({ parent, gtmEvents, parentData, clickId, parentComponent }) => {\n const { isPreview } = useContext(MainContext);\n const [{ itemEntity = parent.itemEntity } = {}] = parentData || [];\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: itemEntity }\n });\n\n if (loading || error || !data) return null;\n\n return gtmEvents.map(({ propsToDisplay, ...eventProps }, i) => {\n const hasNoPropsToDisplay = !propsToDisplay || !propsToDisplay.length;\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = hasNoPropsToDisplay ? '' : buildPropsQuery(data, propsToDisplayArr);\n const shouldUseParentData = !clickId && parentData && parentData.length;\n const itemIdToUse = clickId || parent.itemId;\n const itemId = shouldUseParentData ? getIdsToUse(parentData) : itemIdToUse;\n const shouldUseMultiQuery = Array.isArray(itemId);\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data, shouldUseMultiQuery);\n const dynamicKey = `${GTM_EVENT_FACTORY}${i}`;\n const queryVariables = shouldUseMultiQuery\n ? {\n variables: { where: { id: { _in: itemId } } },\n skip: hasNoPropsToDisplay\n }\n : {\n variables: { id: itemId },\n skip: hasNoPropsToDisplay\n };\n\n return (\n <GTMEventRender\n key={dynamicKey}\n action={action}\n actionKey={actionKey}\n propsToDisplay={propsToDisplay}\n id={itemId}\n queryVariables={queryVariables}\n parentComponent={parentComponent}\n {...eventProps}\n />\n );\n });\n};\n\nGTMEventFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n clickId: PropTypes.string,\n gtmEvents: PropTypes.array,\n parentData: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMEventFactory.defaultProps = {\n clickId: null,\n gtmEvents: [],\n parentData: null,\n parentComponent: {}\n};\n\nexport default GTMEventFactory;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,qBAAqB,EAAEC,eAAe,QAAQ,+BAA+B;AACtF,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,cAAc,EAAEC,WAAW,EAAEC,wBAAwB,QAAQ,YAAY;AAClF,SAASC,iBAAiB,QAAQ,cAAc;AAEhD,MAAMC,eAAe,GAAGA,CAAC;EAAEC,MAAM;EAAEC,SAAS;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAgB,CAAC,KAAK;EACvF,MAAM;IAAEC;EAAU,CAAC,GAAGjB,UAAU,CAACK,WAAW,CAAC;EAC7C,MAAM,CAAC;IAAEa,UAAU,GAAGN,MAAM,CAACM;EAAW,CAAC,GAAG,CAAC,CAAC,CAAC,GAAGJ,UAAU,IAAI,EAAE;EAClE,MAAM;IAAEK,IAAI;IAAEC,KAAK;IAAEC;EAAQ,CAAC,GAAGnB,QAAQ,CAACC,qBAAqB,EAAE;IAC/DmB,SAAS,EAAE;MAAEC,EAAE,EAAEL;IAAW;EAC9B,CAAC,CAAC;EAEF,IAAIG,OAAO,IAAID,KAAK,IAAI,CAACD,IAAI,EAAE,OAAO,IAAI;EAE1C,OAAON,SAAS,CAACW,GAAG,CAAC,CAAAC,IAAA,EAAoCC,CAAC,KAAK;IAAA,IAAzC;QAAEC;MAA8B,CAAC,GAAAF,IAAA;MAAZG,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;IACnD,MAAMC,mBAAmB,GAAG,CAACJ,cAAc,IAAI,CAACA,cAAc,CAACK,MAAM;IACrE,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C1BvC,MAAM,EAAEX,SAAS,CAACmD,MAAM,CAACC,UAAU;EACnCtC,OAAO,EAAEd,SAAS,CAACqD,MAAM;EACzBzC,SAAS,EAAEZ,SAAS,CAACsD,KAAK;EAC1BzC,UAAU,EAAEb,SAAS,CAACuD,SAAS,CAAC,CAACvD,SAAS,CAACmD,MAAM,EAAEnD,SAAS,CAACsD,KAAK,CAAC,CAAC;EACpEvC,eAAe,EAAEf,SAAS,CAACmD;AAC7B,CAAC;AAEDzC,eAAe,CAAC8C,YAAY,GAAG;EAC7B1C,OAAO,EAAE,IAAI;EACbF,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,IAAI;EAChBE,eAAe,EAAE,CAAC;AACpB,CAAC;AAED,eAAeL,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"GTMEventFactory.js","names":["React","useContext","PropTypes","useQuery","getSingleEntitySchema","buildPropsQuery","MainContext","GTMEventRender","getRenderProps","getIdsToUse","buildPropsToDisplayArray","GTM_EVENT_FACTORY","GTMEventFactory","parent","gtmEvents","parentData","clickId","parentComponent","isPreview","itemEntity","data","error","loading","variables","id","map","_ref","i","propsToDisplay","eventProps","_objectWithoutProperties","_excluded","hasNoPropsToDisplay","length","propsToDisplayArr","extraProps","shouldUseParentData","itemIdToUse","itemId","shouldUseMultiQuery","Array","isArray","action","actionKey","dynamicKey","queryVariables","where","_in","skip","createElement","_extends","key","propTypes","object","isRequired","string","array","oneOfType","defaultProps"],"sources":["../../src/GoogleTagManagerEvent/GTMEventFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMEventRender from './GTMEventRender';\nimport { getRenderProps, getIdsToUse, buildPropsToDisplayArray } from '../helpers';\nimport { GTM_EVENT_FACTORY } from '../constants';\n\nconst GTMEventFactory = ({ parent, gtmEvents, parentData, clickId, parentComponent }) => {\n const { isPreview } = useContext(MainContext);\n const [{ itemEntity = parent.itemEntity } = {}] = parentData || [];\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: itemEntity }\n });\n\n if (loading || error || !data) return null;\n\n return gtmEvents.map(({ propsToDisplay, ...eventProps }, i) => {\n const hasNoPropsToDisplay = !propsToDisplay || !propsToDisplay.length;\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = hasNoPropsToDisplay ? '' : buildPropsQuery(data, propsToDisplayArr);\n const shouldUseParentData = !clickId && parentData && parentData.length;\n const itemIdToUse = clickId || parent.itemId;\n const itemId = shouldUseParentData ? getIdsToUse(parentData) : itemIdToUse;\n const shouldUseMultiQuery = Array.isArray(itemId);\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data, shouldUseMultiQuery);\n const dynamicKey = `${GTM_EVENT_FACTORY}${i}`;\n const queryVariables = shouldUseMultiQuery\n ? {\n variables: { where: { id: { _in: itemId } } },\n skip: hasNoPropsToDisplay\n }\n : {\n variables: { id: itemId },\n skip: hasNoPropsToDisplay\n };\n\n return (\n <GTMEventRender\n key={dynamicKey}\n action={action}\n actionKey={actionKey}\n propsToDisplay={propsToDisplay}\n id={itemId}\n queryVariables={queryVariables}\n parentComponent={parentComponent}\n {...eventProps}\n />\n );\n });\n};\n\nGTMEventFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n clickId: PropTypes.string,\n gtmEvents: PropTypes.array,\n parentData: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMEventFactory.defaultProps = {\n clickId: null,\n gtmEvents: [],\n parentData: null,\n parentComponent: {}\n};\n\nexport default GTMEventFactory;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,qBAAqB,EAAEC,eAAe,QAA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AC7B,CAAC;AAEDzC,eAAe,CAAC8C,YAAY,GAAG;EAC7B1C,OAAO,EAAE,IAAI;EACbF,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,IAAI;EAChBE,eAAe,EAAE,CAAC;AACpB,CAAC;AAED,eAAeL,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"build-data-layer.js","names":["getFinalValue","data","name","includes","relationName","fieldName","split","Array","isArray","reduce","str","element","index","buildProps","props","acc","label","key","propertiesToDisplay","staticMetric","buildDataLayerProps","map","currentData","buildDataLayer","propsToDisplay","url","length","propsToDisplayValues","_objectSpread","event"],"sources":["../../src/helpers/build-data-layer.js"],"sourcesContent":["const getFinalValue = (data, name) => {\n if (name.includes('.')) {\n const [relationName, fieldName] = name.split('.');\n if (Array.isArray(data[relationName])) {\n return data[relationName].reduce(\n (str, element, index) => `${str}${index ? ',' : ''}${element[fieldName]}`,\n ''\n );\n }\n\n return data[relationName] ? data[relationName][fieldName] : data[fieldName] || '';\n }\n return data[name];\n};\n\nconst buildProps = (props, data) =>\n props.reduce((acc, { label: key, propertiesToDisplay: [name], staticMetric }) => {\n if (key && (staticMetric || name)) {\n acc[key] = staticMetric || getFinalValue(data, name);\n }\n\n return acc;\n }, {});\n\nconst buildDataLayerProps = (props, data) =>\n Array.isArray(data)\n ? data.map(currentData => buildProps(props, currentData))\n : buildProps(props, data);\n\nconst buildDataLayer = (data, propsToDisplay, url) => {\n if (!propsToDisplay || !propsToDisplay.length) return null;\n const propsToDisplayValues = buildDataLayerProps(propsToDisplay, data);\n\n return url\n ? {\n event: 'pageView',\n url,\n ...propsToDisplayValues\n }\n : propsToDisplayValues;\n};\n\nexport default buildDataLayer;\n"],"mappings":";;;AAAA,MAAMA,aAAa,GAAGA,CAACC,IAAI,EAAEC,IAAI,KAAK;EACpC,IAAIA,IAAI,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACtB,MAAM,CAACC,YAAY,EAAEC,SAAS,CAAC,GAAGH,I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ACD,cAAc,IAAI,CAACA,cAAc,CAACE,MAAM,EAAE,OAAO,IAAI;EAC1D,MAAMC,oBAAoB,GAAGP,mBAAmB,CAACI,cAAc,EAAEvB,IAAI,CAAC;EAEtE,OAAOwB,GAAG,GAAAG,aAAA;IAEJC,KAAK,EAAE,UAAU;IACjBJ;EAAG,GACAE,oBAAoB,IAEzBA,oBAAoB;AAC1B,CAAC;AAED,eAAeJ,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"build-data-layer.js","names":["getFinalValue","data","name","includes","relationName","fieldName","split","Array","isArray","reduce","str","element","index","buildProps","props","acc","label","key","propertiesToDisplay","staticMetric","buildDataLayerProps","map","currentData","buildDataLayer","propsToDisplay","url","length","propsToDisplayValues","_objectSpread","event"],"sources":["../../src/helpers/build-data-layer.js"],"sourcesContent":["const getFinalValue = (data, name) => {\n if (name.includes('.')) {\n const [relationName, fieldName] = name.split('.');\n if (Array.isArray(data[relationName])) {\n return data[relationName].reduce(\n (str, element, index) => `${str}${index ? ',' : ''}${element[fieldName]}`,\n ''\n );\n }\n\n return data[relationName] ? data[relationName][fieldName] : data[fieldName] || '';\n }\n return data[name];\n};\n\nconst buildProps = (props, data) =>\n props.reduce((acc, { label: key, propertiesToDisplay: [name], staticMetric }) => {\n if (key && (staticMetric || name)) {\n acc[key] = staticMetric || getFinalValue(data, name);\n }\n\n return acc;\n }, {});\n\nconst buildDataLayerProps = (props, data) =>\n Array.isArray(data)\n ? data.map(currentData => buildProps(props, currentData))\n : buildProps(props, data);\n\nconst buildDataLayer = (data, propsToDisplay, url) => {\n if (!propsToDisplay || !propsToDisplay.length) return null;\n const propsToDisplayValues = buildDataLayerProps(propsToDisplay, data);\n\n return url\n ? {\n event: 'pageView',\n url,\n ...propsToDisplayValues\n }\n : propsToDisplayValues;\n};\n\nexport default buildDataLayer;\n"],"mappings":";;;AAAA,MAAMA,aAAa,GAAGA,CAACC,IAAI,EAAEC,IAAI,KAAK;EACpC,IAAIA,IAAI,CAACC,QAAQ,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B,cAAc,GAAGA,CAACtB,IAAI,EAAEuB,cAAc,EAAEC,GAAG,KAAK;EACpD,IAAI,CAACD,cAAc,IAAI,CAACA,cAAc,CAACE,MAAM,EAAE,OAAO,IAAI;EAC1D,MAAMC,oBAAoB,GAAGP,mBAAmB,CAACI,cAAc,EAAEvB,IAAI,CAAC;EAEtE,OAAOwB,GAAG,GAAAG,aAAA;IAEJC,KAAK,EAAE,UAAU;IACjBJ;EAAG,GACAE,oBAAoB,IAEzBA,oBAAoB;AAC1B,CAAC;AAED,eAAeJ,cAAc","ignoreList":[]}
package/lib-es/index.js CHANGED
@@ -5,11 +5,11 @@ export default async function load(app) {
5
5
  app.events.once('load:custom:page-builder:component', addComponent => {
6
6
  addComponent({
7
7
  key: 'gtm',
8
- component: dynamic(() => import( /* webpackChunkName: "blazePbGoogleTagManager" */'./GoogleTagManager'))
8
+ component: dynamic(() => import(/* webpackChunkName: "blazePbGoogleTagManager" */'./GoogleTagManager'))
9
9
  });
10
10
  addComponent({
11
11
  key: 'gtm-events',
12
- component: dynamic(() => import( /* webpackChunkName: "blazePbGoogleTagManagerEvent" */'./GoogleTagManagerEvent'))
12
+ component: dynamic(() => import(/* webpackChunkName: "blazePbGoogleTagManagerEvent" */'./GoogleTagManagerEvent'))
13
13
  });
14
14
  });
15
15
  return {
@@ -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';\n\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: 'gtm',\n component: dynamic(\n () => import(/* webpackChunkName: \"blazePbGoogleTagManager\" */ './GoogleTagManager')\n )\n });\n addComponent({\n key: 'gtm-events',\n component: dynamic(\n () =>\n import(/* webpackChunkName: \"blazePbGoogleTagManagerEvent\" */ './GoogleTagManagerEvent')\n )\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;AAElC,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,KAAK;MACVC,SAAS,EAAET,OAAO,CAChB,MAAM,MAAM,EAAC,iDAAkD,oBAAoB,CACrF;IACF,CAAC,CAAC;IACFO,YAAY,CAAC;MACXC,GAAG,EAAE,YAAY;MACjBC,SAAS,EAAET,OAAO,CAChB,MACE,MAAM,EAAC,sDAAuD,yBAAyB,CAC3F;IACF,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":[]}
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';\n\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: 'gtm',\n component: dynamic(\n () => import(/* webpackChunkName: \"blazePbGoogleTagManager\" */ './GoogleTagManager')\n )\n });\n addComponent({\n key: 'gtm-events',\n component: dynamic(\n () =>\n import(/* webpackChunkName: \"blazePbGoogleTagManagerEvent\" */ './GoogleTagManagerEvent')\n )\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;AAElC,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,KAAK;MACVC,SAAS,EAAET,OAAO,CAChB,MAAM,MAAM,CAAC,iDAAkD,oBAAoB,CACrF;IACF,CAAC,CAAC;IACFO,YAAY,CAAC;MACXC,GAAG,EAAE,YAAY;MACjBC,SAAS,EAAET,OAAO,CAChB,MACE,MAAM,CAAC,sDAAuD,yBAAyB,CAC3F;IACF,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-gtm-fe",
3
- "version": "0.146.0-node18-core-styles-tooltips.60",
3
+ "version": "0.146.0-node18-tooltips.49",
4
4
  "description": "Blaze GTM plugin fe",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -27,16 +27,16 @@
27
27
  },
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
- "@blaze-cms/core-auth-ui": "0.146.0-node18-core-styles-tooltips.58",
31
- "@blaze-cms/nextjs-components": "0.146.0-node18-core-styles-tooltips.58",
32
- "@blaze-cms/react-page-builder": "0.146.0-node18-core-styles-tooltips.60",
33
- "@blaze-cms/setup-ui": "0.146.0-node18-core-styles-tooltips.46",
30
+ "@blaze-cms/core-auth-ui": "0.146.0-node18-tooltips.44",
31
+ "@blaze-cms/nextjs-components": "0.146.0-node18-tooltips.44",
32
+ "@blaze-cms/react-page-builder": "0.146.0-node18-tooltips.49",
33
+ "@blaze-cms/setup-ui": "0.146.0-node18-tooltips.0",
34
34
  "core-js": "^3.2.1",
35
35
  "regenerator-runtime": "^0.13.3",
36
36
  "web-vitals": "^0.2.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@blaze-cms/core-ui": "0.146.0-node18-core-styles-tooltips.58"
39
+ "@blaze-cms/core-ui": "0.146.0-node18-tooltips.44"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "next": "14.1.0"
@@ -45,5 +45,5 @@
45
45
  "lib/*",
46
46
  "lib-es/*"
47
47
  ],
48
- "gitHead": "447a75ee4bcd2cbbf2ed3fab689d5d0533f3b76e"
48
+ "gitHead": "fda5819600b133737153e8775db35aa0819beecc"
49
49
  }