@saasquatch/squatch-js 2.3.2-8 → 2.4.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +260 -167
  2. package/LICENSE +20 -20
  3. package/README.md +144 -144
  4. package/SECURITY.md +10 -10
  5. package/babelregister.js +16 -16
  6. package/cucumber.js +45 -45
  7. package/demo/generate.tsx +39 -39
  8. package/demo/index.d.ts +15 -15
  9. package/demo/sandbox.ts +122 -122
  10. package/demo/styles.css +24 -24
  11. package/demo/templates/MintGA.ts +106 -96
  12. package/demo/templates/MintGAContainer.ts +105 -95
  13. package/demo/templates/MintGAContainerDisplayBlock.ts +104 -95
  14. package/demo/templates/QuirksMintGA.ts +104 -95
  15. package/demo/templates/QuirksMintGAContainer.ts +104 -95
  16. package/demo/templates/QuirksMintGAContainerDisplayBlock.ts +104 -95
  17. package/demo/templates/QuirksVanillaGA.ts +308 -308
  18. package/demo/templates/VanillaGA.ts +308 -308
  19. package/demo/templates/VanillaGANoContainer.ts +308 -308
  20. package/demo/templates/classic.ts +1234 -1234
  21. package/demo/toolbar.tsx +526 -493
  22. package/demo/tsconfig.json +14 -14
  23. package/demo/util.ts +21 -21
  24. package/demo/versions.ts +14 -14
  25. package/dist/api/EventsApi.d.ts +1 -0
  26. package/dist/squatch.d.ts +2 -2
  27. package/dist/squatch.esm.js +92 -23
  28. package/dist/squatch.esm.js.map +1 -1
  29. package/dist/squatch.js +92 -23
  30. package/dist/squatch.js.map +1 -1
  31. package/dist/squatch.min.js +2 -2
  32. package/dist/stats.html +1 -1
  33. package/dist/types.d.ts +22 -0
  34. package/dist/widgets/EmbedWidget.d.ts +4 -2
  35. package/dist/widgets/Widgets.d.ts +3 -2
  36. package/package.json +104 -103
  37. package/tsconfig.json +22 -22
  38. package/dist/squatch.WidgetApi.js +0 -1395
  39. package/dist/squatch.WidgetApi.min.js +0 -8
package/CHANGELOG.md CHANGED
@@ -1,167 +1,260 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## [Unreleased]
8
-
9
- ## [2.3.1] - 2022-01-11
10
- ### Changed
11
- - Reduced resize timeout to 500ms from 5000ms
12
-
13
- ## [2.3.0] - 2021-05-19
14
- ### Added
15
- - Typescript definitions
16
- - CommonJS/ES modules build for smaller bundle sizes when using squatch-js from NPM
17
-
18
- ### Changed
19
- - `main` is now a CommonJS build instead of a UMD build
20
-
21
- ## [2.2.1] - 2020-06-17
22
- ### Changed
23
- - Remove the need to have JS Options, so that older clients can upgrade to squatch.js v2 easily.
24
-
25
- ## [2.2.0] - 2020-06-12
26
- ### Added
27
- - Reads `_saasquatch` from the URL and stores a 1st-party cookie on the specified landing page's domain.
28
- - Sets `cookies` on users during an upsert **automatically**
29
- ```js
30
- {
31
- user: {
32
- id: "abc",
33
- accountId: "abc",
34
- cookies: "SAASQUATCHCOOKIE",
35
- ...
36
- }
37
- ```
38
- - Reads the 1st-party cookie when using `autofill`
39
- ```js
40
- squatch.api().squatchReferralCookie().then(function(response) {
41
- element.value = response.codes["program-id"];
42
- });
43
- ```
44
-
45
- ## [2.1.8] - 2020-05-25
46
- No release notes.
47
-
48
- ## [2.1.7] - 2020-05-21
49
- No release notes.
50
-
51
- ## [2.1.6] - 2019-04-15
52
- No release notes.
53
-
54
- ## [2.1.5] - 2019-02-19
55
- No release notes.
56
-
57
- ## [2.1.4] - 2019-01-03
58
- No release notes.
59
-
60
- ## [2.1.3] - 2018-12-05
61
- No release notes.
62
-
63
- ## [2.1.2] - 2018-10-22
64
- No release notes.
65
-
66
- ## [2.1.1] - 2018-10-19
67
- ### Fixed
68
- - POPUP Widget in iOS Safari is not clickable when is hidden anymore
69
-
70
- ## [2.1.0] - 2018-09-26
71
- No release notes.
72
-
73
- ## [2.0.17] - 2017-12-21
74
- ### Fixed
75
- - Fixed content-type detection bug
76
-
77
- ## [2.0.16] - 2017-10-24
78
- ### Fixed
79
- - Fix scrolling issue to allow scrolling within popup modal
80
-
81
- ## [2.0.15] - 2017-10-12
82
- ### Added
83
- - Support for scrolling popup in mobile
84
-
85
- ## [2.0.14] - 2017-10-11
86
- ### Fixed
87
- - Fix registration form message in popup
88
-
89
- ## [2.0.13] - 2017-08-03
90
- No release notes.
91
-
92
- ## [2.0.12] - 2017-07-18
93
- No release notes.
94
-
95
- ## [2.0.11] - 2017-07-18
96
- No release notes.
97
-
98
- ## [2.0.10] - 2017-06-30
99
- No release notes.
100
-
101
- ## [2.0.9] - 2017-06-08
102
- No release notes.
103
-
104
- ## [2.0.8] - 2017-06-08
105
- No release notes.
106
-
107
- ## [2.0.7] - 2017-04-24
108
- No release notes.
109
-
110
- ## [2.0.6] - 2017-02-14
111
- ### Fixed
112
- - Fix share tracking
113
- - Ignore CONVERSION_WIDGET widget rules when there's no referrals
114
-
115
- ### Changed
116
- - Auto-fill content type check changed to non-case sensitive
117
-
118
- ## [2.0.5] - 2016-12-07
119
- No release notes.
120
-
121
- ## [2.0.4] - 2016-12-06
122
- No release notes.
123
-
124
- ## [2.0.3] - 2016-11-30
125
- No release notes.
126
-
127
- ## [2.0.2] - 2016-11-29
128
- No release notes.
129
-
130
- ## [2.0.1] - 2016-11-25
131
- No release notes.
132
-
133
- ## [2.0.0] - 2016-11-25
134
- No release notes.
135
-
136
- [Unreleased]: https://github.com/saasquatch/squatch-js/compare/v2.3.1...HEAD
137
- [2.3.1]: https://github.com/saasquatch/squatch-js/compare/v2.3.0...v2.3.1
138
- [2.3.0]: https://github.com/saasquatch/squatch-js/compare/v2.2.1...v2.3.0
139
- [2.2.1]: https://github.com/saasquatch/squatch-js/compare/v2.2.0...v2.2.1
140
- [2.2.0]: https://github.com/saasquatch/squatch-js/compare/v2.1.8...v2.2.0
141
- [2.1.8]: https://github.com/saasquatch/squatch-js/compare/v2.1.7...v2.1.8
142
- [2.1.7]: https://github.com/saasquatch/squatch-js/compare/v2.1.6...v2.1.7
143
- [2.1.6]: https://github.com/saasquatch/squatch-js/compare/v2.1.5...v2.1.6
144
- [2.1.5]: https://github.com/saasquatch/squatch-js/compare/v2.1.4...v2.1.5
145
- [2.1.4]: https://github.com/saasquatch/squatch-js/compare/v2.1.3...v2.1.4
146
- [2.1.3]: https://github.com/saasquatch/squatch-js/compare/v2.1.2...v2.1.3
147
- [2.1.2]: https://github.com/saasquatch/squatch-js/compare/v2.1.1...v2.1.2
148
- [2.1.1]: https://github.com/saasquatch/squatch-js/compare/v2.1.0...v2.1.1
149
- [2.1.0]: https://github.com/saasquatch/squatch-js/compare/v2.0.17...v2.1.0
150
- [2.0.17]: https://github.com/saasquatch/squatch-js/compare/v2.0.16...v2.0.17
151
- [2.0.16]: https://github.com/saasquatch/squatch-js/compare/v2.0.15...v2.0.16
152
- [2.0.15]: https://github.com/saasquatch/squatch-js/compare/v2.0.14...v2.0.15
153
- [2.0.14]: https://github.com/saasquatch/squatch-js/compare/v2.0.13...v2.0.14
154
- [2.0.13]: https://github.com/saasquatch/squatch-js/compare/v2.0.12...v2.0.13
155
- [2.0.12]: https://github.com/saasquatch/squatch-js/compare/v2.0.11...v2.0.12
156
- [2.0.11]: https://github.com/saasquatch/squatch-js/compare/v2.0.10...v2.0.11
157
- [2.0.10]: https://github.com/saasquatch/squatch-js/compare/v2.0.9...v2.0.10
158
- [2.0.9]: https://github.com/saasquatch/squatch-js/compare/v2.0.8...v2.0.9
159
- [2.0.8]: https://github.com/saasquatch/squatch-js/compare/v2.0.7...v2.0.8
160
- [2.0.7]: https://github.com/saasquatch/squatch-js/compare/v2.0.6...v2.0.7
161
- [2.0.6]: https://github.com/saasquatch/squatch-js/compare/v2.0.5...v2.0.6
162
- [2.0.5]: https://github.com/saasquatch/squatch-js/compare/v2.0.4...v2.0.5
163
- [2.0.4]: https://github.com/saasquatch/squatch-js/compare/v2.0.3...v2.0.4
164
- [2.0.3]: https://github.com/saasquatch/squatch-js/compare/v2.0.2...v2.0.3
165
- [2.0.2]: https://github.com/saasquatch/squatch-js/compare/v2.0.1...v2.0.2
166
- [2.0.1]: https://github.com/saasquatch/squatch-js/compare/v2.0.0...v2.0.1
167
- [2.0.0]: https://github.com/saasquatch/squatch-js/releases/tag/v2.0.0
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [2.4.0] - 2022-03-15
11
+
12
+ ### Changed
13
+
14
+ - EmbedWidget now supports a `container` as either a selector or an HTMLElement as a parameter
15
+
16
+ - Widget contents will be loaded in a hidden widget and can be opened and closed with `widget.open()` and `widget.close()`
17
+
18
+ - Example:
19
+
20
+ ```js
21
+ var initObj = {
22
+ id: "testUser",
23
+ accountId: "testUser",
24
+ widgetType: "<MY_WIDGET>",
25
+ user: {
26
+ id: "testUser",
27
+ accountId: "testUser",
28
+ },
29
+ jwt: "<MY_JWT>",
30
+ engagementMedium: "EMBED",
31
+ container: ".myContainer",
32
+ };
33
+
34
+ squatch
35
+ .widgets()
36
+ .upsertUser(initObj)
37
+ .then(function (response) {
38
+ widget = response.widget;
39
+ widget.open();
40
+ })
41
+ .catch(function (error) {
42
+ console.log(error);
43
+ });
44
+ ```
45
+
46
+ - PopupWidget now supports a `trigger` as a selector
47
+
48
+ - provides the ability to use a class other than `.squatchpop` for opening the widget
49
+
50
+ - `sq:refresh` event is sent when `.open()` is called on EmbedWidget and PopupWidget
51
+
52
+ ## [2.3.1] - 2022-01-11
53
+
54
+ ### Changed
55
+
56
+ - Reduced resize timeout to 500ms from 5000ms
57
+
58
+ ## [2.3.0] - 2021-05-19
59
+
60
+ ### Added
61
+
62
+ - Typescript definitions
63
+ - CommonJS/ES modules build for smaller bundle sizes when using squatch-js from NPM
64
+
65
+ ### Changed
66
+
67
+ - `main` is now a CommonJS build instead of a UMD build
68
+
69
+ ## [2.2.1] - 2020-06-17
70
+
71
+ ### Changed
72
+
73
+ - Remove the need to have JS Options, so that older clients can upgrade to squatch.js v2 easily.
74
+
75
+ ## [2.2.0] - 2020-06-12
76
+
77
+ ### Added
78
+
79
+ - Reads `_saasquatch` from the URL and stores a 1st-party cookie on the specified landing page's domain.
80
+ - Sets `cookies` on users during an upsert **automatically**
81
+
82
+ ```js
83
+ {
84
+ user: {
85
+ id: "abc",
86
+ accountId: "abc",
87
+ cookies: "SAASQUATCHCOOKIE",
88
+ ...
89
+ }
90
+ ```
91
+
92
+ - Reads the 1st-party cookie when using `autofill`
93
+
94
+ ```js
95
+ squatch
96
+ .api()
97
+ .squatchReferralCookie()
98
+ .then(function (response) {
99
+ element.value = response.codes["program-id"];
100
+ });
101
+ ```
102
+
103
+ ## [2.1.8] - 2020-05-25
104
+
105
+ No release notes.
106
+
107
+ ## [2.1.7] - 2020-05-21
108
+
109
+ No release notes.
110
+
111
+ ## [2.1.6] - 2019-04-15
112
+
113
+ No release notes.
114
+
115
+ ## [2.1.5] - 2019-02-19
116
+
117
+ No release notes.
118
+
119
+ ## [2.1.4] - 2019-01-03
120
+
121
+ No release notes.
122
+
123
+ ## [2.1.3] - 2018-12-05
124
+
125
+ No release notes.
126
+
127
+ ## [2.1.2] - 2018-10-22
128
+
129
+ No release notes.
130
+
131
+ ## [2.1.1] - 2018-10-19
132
+
133
+ ### Fixed
134
+
135
+ - POPUP Widget in iOS Safari is not clickable when is hidden anymore
136
+
137
+ ## [2.1.0] - 2018-09-26
138
+
139
+ No release notes.
140
+
141
+ ## [2.0.17] - 2017-12-21
142
+
143
+ ### Fixed
144
+
145
+ - Fixed content-type detection bug
146
+
147
+ ## [2.0.16] - 2017-10-24
148
+
149
+ ### Fixed
150
+
151
+ - Fix scrolling issue to allow scrolling within popup modal
152
+
153
+ ## [2.0.15] - 2017-10-12
154
+
155
+ ### Added
156
+
157
+ - Support for scrolling popup in mobile
158
+
159
+ ## [2.0.14] - 2017-10-11
160
+
161
+ ### Fixed
162
+
163
+ - Fix registration form message in popup
164
+
165
+ ## [2.0.13] - 2017-08-03
166
+
167
+ No release notes.
168
+
169
+ ## [2.0.12] - 2017-07-18
170
+
171
+ No release notes.
172
+
173
+ ## [2.0.11] - 2017-07-18
174
+
175
+ No release notes.
176
+
177
+ ## [2.0.10] - 2017-06-30
178
+
179
+ No release notes.
180
+
181
+ ## [2.0.9] - 2017-06-08
182
+
183
+ No release notes.
184
+
185
+ ## [2.0.8] - 2017-06-08
186
+
187
+ No release notes.
188
+
189
+ ## [2.0.7] - 2017-04-24
190
+
191
+ No release notes.
192
+
193
+ ## [2.0.6] - 2017-02-14
194
+
195
+ ### Fixed
196
+
197
+ - Fix share tracking
198
+ - Ignore CONVERSION_WIDGET widget rules when there's no referrals
199
+
200
+ ### Changed
201
+
202
+ - Auto-fill content type check changed to non-case sensitive
203
+
204
+ ## [2.0.5] - 2016-12-07
205
+
206
+ No release notes.
207
+
208
+ ## [2.0.4] - 2016-12-06
209
+
210
+ No release notes.
211
+
212
+ ## [2.0.3] - 2016-11-30
213
+
214
+ No release notes.
215
+
216
+ ## [2.0.2] - 2016-11-29
217
+
218
+ No release notes.
219
+
220
+ ## [2.0.1] - 2016-11-25
221
+
222
+ No release notes.
223
+
224
+ ## [2.0.0] - 2016-11-25
225
+
226
+ No release notes.
227
+
228
+ [unreleased]: https://github.com/saasquatch/squatch-js/compare/v2.4.0...HEAD
229
+ [2.4.0]: https://github.com/saasquatch/squatch-js/compare/v2.3.1...v2.4.0
230
+ [2.3.1]: https://github.com/saasquatch/squatch-js/compare/v2.3.0...v2.3.1
231
+ [2.3.0]: https://github.com/saasquatch/squatch-js/compare/v2.2.1...v2.3.0
232
+ [2.2.1]: https://github.com/saasquatch/squatch-js/compare/v2.2.0...v2.2.1
233
+ [2.2.0]: https://github.com/saasquatch/squatch-js/compare/v2.1.8...v2.2.0
234
+ [2.1.8]: https://github.com/saasquatch/squatch-js/compare/v2.1.7...v2.1.8
235
+ [2.1.7]: https://github.com/saasquatch/squatch-js/compare/v2.1.6...v2.1.7
236
+ [2.1.6]: https://github.com/saasquatch/squatch-js/compare/v2.1.5...v2.1.6
237
+ [2.1.5]: https://github.com/saasquatch/squatch-js/compare/v2.1.4...v2.1.5
238
+ [2.1.4]: https://github.com/saasquatch/squatch-js/compare/v2.1.3...v2.1.4
239
+ [2.1.3]: https://github.com/saasquatch/squatch-js/compare/v2.1.2...v2.1.3
240
+ [2.1.2]: https://github.com/saasquatch/squatch-js/compare/v2.1.1...v2.1.2
241
+ [2.1.1]: https://github.com/saasquatch/squatch-js/compare/v2.1.0...v2.1.1
242
+ [2.1.0]: https://github.com/saasquatch/squatch-js/compare/v2.0.17...v2.1.0
243
+ [2.0.17]: https://github.com/saasquatch/squatch-js/compare/v2.0.16...v2.0.17
244
+ [2.0.16]: https://github.com/saasquatch/squatch-js/compare/v2.0.15...v2.0.16
245
+ [2.0.15]: https://github.com/saasquatch/squatch-js/compare/v2.0.14...v2.0.15
246
+ [2.0.14]: https://github.com/saasquatch/squatch-js/compare/v2.0.13...v2.0.14
247
+ [2.0.13]: https://github.com/saasquatch/squatch-js/compare/v2.0.12...v2.0.13
248
+ [2.0.12]: https://github.com/saasquatch/squatch-js/compare/v2.0.11...v2.0.12
249
+ [2.0.11]: https://github.com/saasquatch/squatch-js/compare/v2.0.10...v2.0.11
250
+ [2.0.10]: https://github.com/saasquatch/squatch-js/compare/v2.0.9...v2.0.10
251
+ [2.0.9]: https://github.com/saasquatch/squatch-js/compare/v2.0.8...v2.0.9
252
+ [2.0.8]: https://github.com/saasquatch/squatch-js/compare/v2.0.7...v2.0.8
253
+ [2.0.7]: https://github.com/saasquatch/squatch-js/compare/v2.0.6...v2.0.7
254
+ [2.0.6]: https://github.com/saasquatch/squatch-js/compare/v2.0.5...v2.0.6
255
+ [2.0.5]: https://github.com/saasquatch/squatch-js/compare/v2.0.4...v2.0.5
256
+ [2.0.4]: https://github.com/saasquatch/squatch-js/compare/v2.0.3...v2.0.4
257
+ [2.0.3]: https://github.com/saasquatch/squatch-js/compare/v2.0.2...v2.0.3
258
+ [2.0.2]: https://github.com/saasquatch/squatch-js/compare/v2.0.1...v2.0.2
259
+ [2.0.1]: https://github.com/saasquatch/squatch-js/compare/v2.0.0...v2.0.1
260
+ [2.0.0]: https://github.com/saasquatch/squatch-js/releases/tag/v2.0.0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 ReferralSaaSquatch.com, Inc
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 ReferralSaaSquatch.com, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  THE SOFTWARE.