@saasquatch/squatch-js 2.6.0 → 2.6.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.
- package/.github/workflows/size-limit.yml +14 -14
- package/.github/workflows/static.yml +89 -89
- package/CHANGELOG.md +388 -388
- package/LICENSE +20 -20
- package/README.md +259 -259
- package/babel.config.js +7 -7
- package/cucumber.js +45 -45
- package/demo/sandbox.ts +124 -124
- package/demo/toolbar.tsx +526 -526
- package/dist/squatch.esm.js +4 -4
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +4 -4
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/jest.config.ts +200 -200
- package/package.json +123 -123
- package/tsconfig.json +23 -23
- package/dist/squatch.min.js.br +0 -0
- package/dist/squatch.min.js.map +0 -1
- package/dist/squatch.modern.js +0 -2
- package/dist/squatch.modern.js.map +0 -1
- package/dist/stats.html +0 -208
- package/dist/utils/decodeJwt.d.ts +0 -1
- package/dist/utils/domUtils.d.ts +0 -1
- package/dist/utils/loadEvent.d.ts +0 -2
- package/dist/widgets/CtaWidget.d.ts +0 -24
- package/dist/widgets/IREmbedWidget.d.ts +0 -29
- package/dist/widgets/IRPopupWidget.d.ts +0 -32
- package/dist/widgets/declarative/DeclarativeEmbedWidget.d.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,388 +1,388 @@
|
|
|
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
|
-
- Added custom web-components `squatch-embed` and `squatch-popup` for easier widget rendering.
|
|
11
|
-
- Support for additional namespacing of squatchjs
|
|
12
|
-
|
|
13
|
-
## [2.6.0] - 2023-08-23
|
|
14
|
-
|
|
15
|
-
### Added
|
|
16
|
-
|
|
17
|
-
- SquatchJS now supports declarative widget initialization
|
|
18
|
-
|
|
19
|
-
- For rendering widgets and API calls, squatchjs respects configurations set on the following:
|
|
20
|
-
|
|
21
|
-
- `window.squatchToken`: Signed JWT for calls to the SaaSquatch API -- [How to generate valid JWT Tokens](https://docs.saasquatch.com/topics/json-web-tokens#example-building-the-jwt)
|
|
22
|
-
- `window.squatchTenant`: SaaSquatch tenant alias
|
|
23
|
-
- `window.squatchConfig`: Additional configuration overrides (Optional)
|
|
24
|
-
- debug: Turn on console debugging (Default: false)
|
|
25
|
-
- `window.squatchOnReady`: Declarative on ready function to be run when the squatch-js module has finished loading
|
|
26
|
-
|
|
27
|
-
- Note: If window.squatchToken is undefined, widgets will be rendered as [Instant Access widgets.](https://docs.saasquatch.com/topics/widget-types#instant-access-widgets)
|
|
28
|
-
|
|
29
|
-
- Widget components added:
|
|
30
|
-
|
|
31
|
-
- `<squatch-embed></squatch-embed>`
|
|
32
|
-
|
|
33
|
-
- widget: Specifies the SaaSquatch widgetType identifier of the desired widget
|
|
34
|
-
- Required
|
|
35
|
-
- Changing this attribute's value causes the widget to reload
|
|
36
|
-
- container: A CSS selector for a container element to use as the parent of the widget's iframe
|
|
37
|
-
- Default: null
|
|
38
|
-
- Note, if no container is specified, the widget iframe will attach to the shadow DOM of squatch-embed
|
|
39
|
-
- locale: Locale that determines the widget translation displayed. Should be of the form "xx_XX"
|
|
40
|
-
- Default: Browser's current locale
|
|
41
|
-
- Changing this attribute's value causes the widget to reload
|
|
42
|
-
|
|
43
|
-
- `<squatch-popup></squatch-popup>`
|
|
44
|
-
- widget: string: Specifies the SaaSquatch widgetType identifier of the desired widget
|
|
45
|
-
- Required
|
|
46
|
-
- open: boolean: Whether to the popup is open when loaded into the page
|
|
47
|
-
- Default: false
|
|
48
|
-
- container: A CSS selector for a container element to use as the parent of the widget's iframe.
|
|
49
|
-
- Default: null
|
|
50
|
-
- Note, if no container is specified, the widget iframe will attach to the shadow DOM of squatch-embed.
|
|
51
|
-
- locale: Locale that determines the widget translation displayed. Should be of the form "xx_XX".
|
|
52
|
-
- Default: Browser's current locale
|
|
53
|
-
- Changing this attribute's value causes the widget to reload.
|
|
54
|
-
|
|
55
|
-
### Removed
|
|
56
|
-
|
|
57
|
-
- Deprecated api functions have been removed
|
|
58
|
-
- Removed functions:
|
|
59
|
-
- `squatch.api().invite()`
|
|
60
|
-
- `squatch.submitEmail()`
|
|
61
|
-
- Removed widgets:
|
|
62
|
-
- `CtaWidget`
|
|
63
|
-
|
|
64
|
-
### Changed
|
|
65
|
-
|
|
66
|
-
- Bundle size reduced significantly thanks to the removal of deprecated features and other optimizations
|
|
67
|
-
- Before: 19.75 kB
|
|
68
|
-
- After: 12.06 kB
|
|
69
|
-
|
|
70
|
-
## [2.5.0] - 2023-05-16
|
|
71
|
-
|
|
72
|
-
### Removed
|
|
73
|
-
|
|
74
|
-
- Removed WidgetApi.cookieUser method and associated usage
|
|
75
|
-
|
|
76
|
-
### Changed
|
|
77
|
-
|
|
78
|
-
- Widgets.render now queries renderWidget rather than cookieUser api method
|
|
79
|
-
- Added squatch.widget function to render a widget without user upsert
|
|
80
|
-
|
|
81
|
-
- Example:
|
|
82
|
-
|
|
83
|
-
```js
|
|
84
|
-
var initObj = {
|
|
85
|
-
widgetType: "<MY_WIDGET>",
|
|
86
|
-
engagementMedium: "EMBED",
|
|
87
|
-
container: ".myContainer",
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
squatch
|
|
91
|
-
.widget(initObj)
|
|
92
|
-
.then(function (response) {
|
|
93
|
-
const widget = response.widget;
|
|
94
|
-
})
|
|
95
|
-
.catch(function (error) {
|
|
96
|
-
console.log(error);
|
|
97
|
-
});
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
- Added auto-popup widget support:
|
|
101
|
-
- Reads `_saasquatchExtra` from the URL on load
|
|
102
|
-
- Renders the encoded widget from `_saasquatchExtra` parameter as a Popup Widget on load
|
|
103
|
-
|
|
104
|
-
## [2.4.3] - 2023-04-20
|
|
105
|
-
|
|
106
|
-
### Changed
|
|
107
|
-
|
|
108
|
-
- Updated license copyright to be in line with SaaSquatch open-source policy.
|
|
109
|
-
|
|
110
|
-
## [2.4.2] - 2023-04-10
|
|
111
|
-
|
|
112
|
-
### Added
|
|
113
|
-
|
|
114
|
-
- Added value to return data `squatchReferralCookie` to retrieve the encoded cookie
|
|
115
|
-
|
|
116
|
-
- Example:
|
|
117
|
-
|
|
118
|
-
```js
|
|
119
|
-
squatch
|
|
120
|
-
.api()
|
|
121
|
-
.squatchReferralCookie()
|
|
122
|
-
.then(function (response) {
|
|
123
|
-
const cookie = response.encodedCookie;
|
|
124
|
-
});
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## [2.4.1] - 2022-09-23
|
|
128
|
-
|
|
129
|
-
### Added
|
|
130
|
-
|
|
131
|
-
- Added event idempotencyKey to types
|
|
132
|
-
|
|
133
|
-
## [2.4.0] - 2022-03-15
|
|
134
|
-
|
|
135
|
-
### Changed
|
|
136
|
-
|
|
137
|
-
- EmbedWidget now supports a `container` as either a selector or an HTMLElement as a parameter
|
|
138
|
-
|
|
139
|
-
- Widget contents will be loaded in a hidden widget and can be opened and closed with `widget.open()` and `widget.close()`
|
|
140
|
-
|
|
141
|
-
- Example:
|
|
142
|
-
|
|
143
|
-
```js
|
|
144
|
-
var initObj = {
|
|
145
|
-
id: "testUser",
|
|
146
|
-
accountId: "testUser",
|
|
147
|
-
widgetType: "<MY_WIDGET>",
|
|
148
|
-
user: {
|
|
149
|
-
id: "testUser",
|
|
150
|
-
accountId: "testUser",
|
|
151
|
-
},
|
|
152
|
-
jwt: "<MY_JWT>",
|
|
153
|
-
engagementMedium: "EMBED",
|
|
154
|
-
container: ".myContainer",
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
squatch
|
|
158
|
-
.widgets()
|
|
159
|
-
.upsertUser(initObj)
|
|
160
|
-
.then(function (response) {
|
|
161
|
-
widget = response.widget;
|
|
162
|
-
widget.open();
|
|
163
|
-
})
|
|
164
|
-
.catch(function (error) {
|
|
165
|
-
console.log(error);
|
|
166
|
-
});
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
- PopupWidget now supports a `trigger` as a selector
|
|
170
|
-
|
|
171
|
-
- provides the ability to use a class other than `.squatchpop` for opening the widget
|
|
172
|
-
|
|
173
|
-
- `sq:refresh` event is sent when `.open()` is called on EmbedWidget and PopupWidget
|
|
174
|
-
|
|
175
|
-
## [2.3.1] - 2022-01-11
|
|
176
|
-
|
|
177
|
-
### Changed
|
|
178
|
-
|
|
179
|
-
- Reduced resize timeout to 500ms from 5000ms
|
|
180
|
-
|
|
181
|
-
## [2.3.0] - 2021-05-19
|
|
182
|
-
|
|
183
|
-
### Added
|
|
184
|
-
|
|
185
|
-
- Typescript definitions
|
|
186
|
-
- CommonJS/ES modules build for smaller bundle sizes when using squatch-js from NPM
|
|
187
|
-
|
|
188
|
-
### Changed
|
|
189
|
-
|
|
190
|
-
- `main` is now a CommonJS build instead of a UMD build
|
|
191
|
-
|
|
192
|
-
## [2.2.1] - 2020-06-17
|
|
193
|
-
|
|
194
|
-
### Changed
|
|
195
|
-
|
|
196
|
-
- Remove the need to have JS Options, so that older clients can upgrade to squatch.js v2 easily.
|
|
197
|
-
|
|
198
|
-
## [2.2.0] - 2020-06-12
|
|
199
|
-
|
|
200
|
-
### Added
|
|
201
|
-
|
|
202
|
-
- Reads `_saasquatch` from the URL and stores a 1st-party cookie on the specified landing page's domain.
|
|
203
|
-
- Sets `cookies` on users during an upsert **automatically**
|
|
204
|
-
|
|
205
|
-
```js
|
|
206
|
-
{
|
|
207
|
-
user: {
|
|
208
|
-
id: "abc",
|
|
209
|
-
accountId: "abc",
|
|
210
|
-
cookies: "SAASQUATCHCOOKIE",
|
|
211
|
-
...
|
|
212
|
-
}
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
- Reads the 1st-party cookie when using `autofill`
|
|
216
|
-
|
|
217
|
-
```js
|
|
218
|
-
squatch
|
|
219
|
-
.api()
|
|
220
|
-
.squatchReferralCookie()
|
|
221
|
-
.then(function (response) {
|
|
222
|
-
element.value = response.codes["program-id"];
|
|
223
|
-
});
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## [2.1.8] - 2020-05-25
|
|
227
|
-
|
|
228
|
-
No release notes.
|
|
229
|
-
|
|
230
|
-
## [2.1.7] - 2020-05-21
|
|
231
|
-
|
|
232
|
-
No release notes.
|
|
233
|
-
|
|
234
|
-
## [2.1.6] - 2019-04-15
|
|
235
|
-
|
|
236
|
-
No release notes.
|
|
237
|
-
|
|
238
|
-
## [2.1.5] - 2019-02-19
|
|
239
|
-
|
|
240
|
-
No release notes.
|
|
241
|
-
|
|
242
|
-
## [2.1.4] - 2019-01-03
|
|
243
|
-
|
|
244
|
-
No release notes.
|
|
245
|
-
|
|
246
|
-
## [2.1.3] - 2018-12-05
|
|
247
|
-
|
|
248
|
-
No release notes.
|
|
249
|
-
|
|
250
|
-
## [2.1.2] - 2018-10-22
|
|
251
|
-
|
|
252
|
-
No release notes.
|
|
253
|
-
|
|
254
|
-
## [2.1.1] - 2018-10-19
|
|
255
|
-
|
|
256
|
-
### Fixed
|
|
257
|
-
|
|
258
|
-
- POPUP Widget in iOS Safari is not clickable when is hidden anymore
|
|
259
|
-
|
|
260
|
-
## [2.1.0] - 2018-09-26
|
|
261
|
-
|
|
262
|
-
No release notes.
|
|
263
|
-
|
|
264
|
-
## [2.0.17] - 2017-12-21
|
|
265
|
-
|
|
266
|
-
### Fixed
|
|
267
|
-
|
|
268
|
-
- Fixed content-type detection bug
|
|
269
|
-
|
|
270
|
-
## [2.0.16] - 2017-10-24
|
|
271
|
-
|
|
272
|
-
### Fixed
|
|
273
|
-
|
|
274
|
-
- Fix scrolling issue to allow scrolling within popup modal
|
|
275
|
-
|
|
276
|
-
## [2.0.15] - 2017-10-12
|
|
277
|
-
|
|
278
|
-
### Added
|
|
279
|
-
|
|
280
|
-
- Support for scrolling popup in mobile
|
|
281
|
-
|
|
282
|
-
## [2.0.14] - 2017-10-11
|
|
283
|
-
|
|
284
|
-
### Fixed
|
|
285
|
-
|
|
286
|
-
- Fix registration form message in popup
|
|
287
|
-
|
|
288
|
-
## [2.0.13] - 2017-08-03
|
|
289
|
-
|
|
290
|
-
No release notes.
|
|
291
|
-
|
|
292
|
-
## [2.0.12] - 2017-07-18
|
|
293
|
-
|
|
294
|
-
No release notes.
|
|
295
|
-
|
|
296
|
-
## [2.0.11] - 2017-07-18
|
|
297
|
-
|
|
298
|
-
No release notes.
|
|
299
|
-
|
|
300
|
-
## [2.0.10] - 2017-06-30
|
|
301
|
-
|
|
302
|
-
No release notes.
|
|
303
|
-
|
|
304
|
-
## [2.0.9] - 2017-06-08
|
|
305
|
-
|
|
306
|
-
No release notes.
|
|
307
|
-
|
|
308
|
-
## [2.0.8] - 2017-06-08
|
|
309
|
-
|
|
310
|
-
No release notes.
|
|
311
|
-
|
|
312
|
-
## [2.0.7] - 2017-04-24
|
|
313
|
-
|
|
314
|
-
No release notes.
|
|
315
|
-
|
|
316
|
-
## [2.0.6] - 2017-02-14
|
|
317
|
-
|
|
318
|
-
### Fixed
|
|
319
|
-
|
|
320
|
-
- Fix share tracking
|
|
321
|
-
- Ignore CONVERSION_WIDGET widget rules when there's no referrals
|
|
322
|
-
|
|
323
|
-
### Changed
|
|
324
|
-
|
|
325
|
-
- Auto-fill content type check changed to non-case sensitive
|
|
326
|
-
|
|
327
|
-
## [2.0.5] - 2016-12-07
|
|
328
|
-
|
|
329
|
-
No release notes.
|
|
330
|
-
|
|
331
|
-
## [2.0.4] - 2016-12-06
|
|
332
|
-
|
|
333
|
-
No release notes.
|
|
334
|
-
|
|
335
|
-
## [2.0.3] - 2016-11-30
|
|
336
|
-
|
|
337
|
-
No release notes.
|
|
338
|
-
|
|
339
|
-
## [2.0.2] - 2016-11-29
|
|
340
|
-
|
|
341
|
-
No release notes.
|
|
342
|
-
|
|
343
|
-
## [2.0.1] - 2016-11-25
|
|
344
|
-
|
|
345
|
-
No release notes.
|
|
346
|
-
|
|
347
|
-
## [2.0.0] - 2016-11-25
|
|
348
|
-
|
|
349
|
-
No release notes.
|
|
350
|
-
|
|
351
|
-
[unreleased]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.6.0...HEAD
|
|
352
|
-
[2.6.0]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.5.0...@saasquatch%2Fsquatch-js@2.6.0
|
|
353
|
-
[2.5.0]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.1...@saasquatch%2Fsquatch-js@2.5.0
|
|
354
|
-
[2.4.3]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.2...@saasquatch%2Fsquatch-js@2.4.3
|
|
355
|
-
[2.4.2]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.1...@saasquatch%2Fsquatch-js@2.4.2
|
|
356
|
-
[2.4.1]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.0...@saasquatch%2Fsquatch-js@2.4.1
|
|
357
|
-
[2.4.0]: https://github.com/saasquatch/squatch-js/compare/v2.3.1...@saasquatch%2Fsquatch-js@2.4.0
|
|
358
|
-
[2.3.1]: https://github.com/saasquatch/squatch-js/compare/v2.3.0...v2.3.1
|
|
359
|
-
[2.3.0]: https://github.com/saasquatch/squatch-js/compare/v2.2.1...v2.3.0
|
|
360
|
-
[2.2.1]: https://github.com/saasquatch/squatch-js/compare/v2.2.0...v2.2.1
|
|
361
|
-
[2.2.0]: https://github.com/saasquatch/squatch-js/compare/v2.1.8...v2.2.0
|
|
362
|
-
[2.1.8]: https://github.com/saasquatch/squatch-js/compare/v2.1.7...v2.1.8
|
|
363
|
-
[2.1.7]: https://github.com/saasquatch/squatch-js/compare/v2.1.6...v2.1.7
|
|
364
|
-
[2.1.6]: https://github.com/saasquatch/squatch-js/compare/v2.1.5...v2.1.6
|
|
365
|
-
[2.1.5]: https://github.com/saasquatch/squatch-js/compare/v2.1.4...v2.1.5
|
|
366
|
-
[2.1.4]: https://github.com/saasquatch/squatch-js/compare/v2.1.3...v2.1.4
|
|
367
|
-
[2.1.3]: https://github.com/saasquatch/squatch-js/compare/v2.1.2...v2.1.3
|
|
368
|
-
[2.1.2]: https://github.com/saasquatch/squatch-js/compare/v2.1.1...v2.1.2
|
|
369
|
-
[2.1.1]: https://github.com/saasquatch/squatch-js/compare/v2.1.0...v2.1.1
|
|
370
|
-
[2.1.0]: https://github.com/saasquatch/squatch-js/compare/v2.0.17...v2.1.0
|
|
371
|
-
[2.0.17]: https://github.com/saasquatch/squatch-js/compare/v2.0.16...v2.0.17
|
|
372
|
-
[2.0.16]: https://github.com/saasquatch/squatch-js/compare/v2.0.15...v2.0.16
|
|
373
|
-
[2.0.15]: https://github.com/saasquatch/squatch-js/compare/v2.0.14...v2.0.15
|
|
374
|
-
[2.0.14]: https://github.com/saasquatch/squatch-js/compare/v2.0.13...v2.0.14
|
|
375
|
-
[2.0.13]: https://github.com/saasquatch/squatch-js/compare/v2.0.12...v2.0.13
|
|
376
|
-
[2.0.12]: https://github.com/saasquatch/squatch-js/compare/v2.0.11...v2.0.12
|
|
377
|
-
[2.0.11]: https://github.com/saasquatch/squatch-js/compare/v2.0.10...v2.0.11
|
|
378
|
-
[2.0.10]: https://github.com/saasquatch/squatch-js/compare/v2.0.9...v2.0.10
|
|
379
|
-
[2.0.9]: https://github.com/saasquatch/squatch-js/compare/v2.0.8...v2.0.9
|
|
380
|
-
[2.0.8]: https://github.com/saasquatch/squatch-js/compare/v2.0.7...v2.0.8
|
|
381
|
-
[2.0.7]: https://github.com/saasquatch/squatch-js/compare/v2.0.6...v2.0.7
|
|
382
|
-
[2.0.6]: https://github.com/saasquatch/squatch-js/compare/v2.0.5...v2.0.6
|
|
383
|
-
[2.0.5]: https://github.com/saasquatch/squatch-js/compare/v2.0.4...v2.0.5
|
|
384
|
-
[2.0.4]: https://github.com/saasquatch/squatch-js/compare/v2.0.3...v2.0.4
|
|
385
|
-
[2.0.3]: https://github.com/saasquatch/squatch-js/compare/v2.0.2...v2.0.3
|
|
386
|
-
[2.0.2]: https://github.com/saasquatch/squatch-js/compare/v2.0.1...v2.0.2
|
|
387
|
-
[2.0.1]: https://github.com/saasquatch/squatch-js/compare/v2.0.0...v2.0.1
|
|
388
|
-
[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
|
+
- Added custom web-components `squatch-embed` and `squatch-popup` for easier widget rendering.
|
|
11
|
+
- Support for additional namespacing of squatchjs
|
|
12
|
+
|
|
13
|
+
## [2.6.0] - 2023-08-23
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- SquatchJS now supports declarative widget initialization
|
|
18
|
+
|
|
19
|
+
- For rendering widgets and API calls, squatchjs respects configurations set on the following:
|
|
20
|
+
|
|
21
|
+
- `window.squatchToken`: Signed JWT for calls to the SaaSquatch API -- [How to generate valid JWT Tokens](https://docs.saasquatch.com/topics/json-web-tokens#example-building-the-jwt)
|
|
22
|
+
- `window.squatchTenant`: SaaSquatch tenant alias
|
|
23
|
+
- `window.squatchConfig`: Additional configuration overrides (Optional)
|
|
24
|
+
- debug: Turn on console debugging (Default: false)
|
|
25
|
+
- `window.squatchOnReady`: Declarative on ready function to be run when the squatch-js module has finished loading
|
|
26
|
+
|
|
27
|
+
- Note: If window.squatchToken is undefined, widgets will be rendered as [Instant Access widgets.](https://docs.saasquatch.com/topics/widget-types#instant-access-widgets)
|
|
28
|
+
|
|
29
|
+
- Widget components added:
|
|
30
|
+
|
|
31
|
+
- `<squatch-embed></squatch-embed>`
|
|
32
|
+
|
|
33
|
+
- widget: Specifies the SaaSquatch widgetType identifier of the desired widget
|
|
34
|
+
- Required
|
|
35
|
+
- Changing this attribute's value causes the widget to reload
|
|
36
|
+
- container: A CSS selector for a container element to use as the parent of the widget's iframe
|
|
37
|
+
- Default: null
|
|
38
|
+
- Note, if no container is specified, the widget iframe will attach to the shadow DOM of squatch-embed
|
|
39
|
+
- locale: Locale that determines the widget translation displayed. Should be of the form "xx_XX"
|
|
40
|
+
- Default: Browser's current locale
|
|
41
|
+
- Changing this attribute's value causes the widget to reload
|
|
42
|
+
|
|
43
|
+
- `<squatch-popup></squatch-popup>`
|
|
44
|
+
- widget: string: Specifies the SaaSquatch widgetType identifier of the desired widget
|
|
45
|
+
- Required
|
|
46
|
+
- open: boolean: Whether to the popup is open when loaded into the page
|
|
47
|
+
- Default: false
|
|
48
|
+
- container: A CSS selector for a container element to use as the parent of the widget's iframe.
|
|
49
|
+
- Default: null
|
|
50
|
+
- Note, if no container is specified, the widget iframe will attach to the shadow DOM of squatch-embed.
|
|
51
|
+
- locale: Locale that determines the widget translation displayed. Should be of the form "xx_XX".
|
|
52
|
+
- Default: Browser's current locale
|
|
53
|
+
- Changing this attribute's value causes the widget to reload.
|
|
54
|
+
|
|
55
|
+
### Removed
|
|
56
|
+
|
|
57
|
+
- Deprecated api functions have been removed
|
|
58
|
+
- Removed functions:
|
|
59
|
+
- `squatch.api().invite()`
|
|
60
|
+
- `squatch.submitEmail()`
|
|
61
|
+
- Removed widgets:
|
|
62
|
+
- `CtaWidget`
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- Bundle size reduced significantly thanks to the removal of deprecated features and other optimizations
|
|
67
|
+
- Before: 19.75 kB
|
|
68
|
+
- After: 12.06 kB
|
|
69
|
+
|
|
70
|
+
## [2.5.0] - 2023-05-16
|
|
71
|
+
|
|
72
|
+
### Removed
|
|
73
|
+
|
|
74
|
+
- Removed WidgetApi.cookieUser method and associated usage
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
- Widgets.render now queries renderWidget rather than cookieUser api method
|
|
79
|
+
- Added squatch.widget function to render a widget without user upsert
|
|
80
|
+
|
|
81
|
+
- Example:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
var initObj = {
|
|
85
|
+
widgetType: "<MY_WIDGET>",
|
|
86
|
+
engagementMedium: "EMBED",
|
|
87
|
+
container: ".myContainer",
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
squatch
|
|
91
|
+
.widget(initObj)
|
|
92
|
+
.then(function (response) {
|
|
93
|
+
const widget = response.widget;
|
|
94
|
+
})
|
|
95
|
+
.catch(function (error) {
|
|
96
|
+
console.log(error);
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- Added auto-popup widget support:
|
|
101
|
+
- Reads `_saasquatchExtra` from the URL on load
|
|
102
|
+
- Renders the encoded widget from `_saasquatchExtra` parameter as a Popup Widget on load
|
|
103
|
+
|
|
104
|
+
## [2.4.3] - 2023-04-20
|
|
105
|
+
|
|
106
|
+
### Changed
|
|
107
|
+
|
|
108
|
+
- Updated license copyright to be in line with SaaSquatch open-source policy.
|
|
109
|
+
|
|
110
|
+
## [2.4.2] - 2023-04-10
|
|
111
|
+
|
|
112
|
+
### Added
|
|
113
|
+
|
|
114
|
+
- Added value to return data `squatchReferralCookie` to retrieve the encoded cookie
|
|
115
|
+
|
|
116
|
+
- Example:
|
|
117
|
+
|
|
118
|
+
```js
|
|
119
|
+
squatch
|
|
120
|
+
.api()
|
|
121
|
+
.squatchReferralCookie()
|
|
122
|
+
.then(function (response) {
|
|
123
|
+
const cookie = response.encodedCookie;
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## [2.4.1] - 2022-09-23
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
|
|
131
|
+
- Added event idempotencyKey to types
|
|
132
|
+
|
|
133
|
+
## [2.4.0] - 2022-03-15
|
|
134
|
+
|
|
135
|
+
### Changed
|
|
136
|
+
|
|
137
|
+
- EmbedWidget now supports a `container` as either a selector or an HTMLElement as a parameter
|
|
138
|
+
|
|
139
|
+
- Widget contents will be loaded in a hidden widget and can be opened and closed with `widget.open()` and `widget.close()`
|
|
140
|
+
|
|
141
|
+
- Example:
|
|
142
|
+
|
|
143
|
+
```js
|
|
144
|
+
var initObj = {
|
|
145
|
+
id: "testUser",
|
|
146
|
+
accountId: "testUser",
|
|
147
|
+
widgetType: "<MY_WIDGET>",
|
|
148
|
+
user: {
|
|
149
|
+
id: "testUser",
|
|
150
|
+
accountId: "testUser",
|
|
151
|
+
},
|
|
152
|
+
jwt: "<MY_JWT>",
|
|
153
|
+
engagementMedium: "EMBED",
|
|
154
|
+
container: ".myContainer",
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
squatch
|
|
158
|
+
.widgets()
|
|
159
|
+
.upsertUser(initObj)
|
|
160
|
+
.then(function (response) {
|
|
161
|
+
widget = response.widget;
|
|
162
|
+
widget.open();
|
|
163
|
+
})
|
|
164
|
+
.catch(function (error) {
|
|
165
|
+
console.log(error);
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
- PopupWidget now supports a `trigger` as a selector
|
|
170
|
+
|
|
171
|
+
- provides the ability to use a class other than `.squatchpop` for opening the widget
|
|
172
|
+
|
|
173
|
+
- `sq:refresh` event is sent when `.open()` is called on EmbedWidget and PopupWidget
|
|
174
|
+
|
|
175
|
+
## [2.3.1] - 2022-01-11
|
|
176
|
+
|
|
177
|
+
### Changed
|
|
178
|
+
|
|
179
|
+
- Reduced resize timeout to 500ms from 5000ms
|
|
180
|
+
|
|
181
|
+
## [2.3.0] - 2021-05-19
|
|
182
|
+
|
|
183
|
+
### Added
|
|
184
|
+
|
|
185
|
+
- Typescript definitions
|
|
186
|
+
- CommonJS/ES modules build for smaller bundle sizes when using squatch-js from NPM
|
|
187
|
+
|
|
188
|
+
### Changed
|
|
189
|
+
|
|
190
|
+
- `main` is now a CommonJS build instead of a UMD build
|
|
191
|
+
|
|
192
|
+
## [2.2.1] - 2020-06-17
|
|
193
|
+
|
|
194
|
+
### Changed
|
|
195
|
+
|
|
196
|
+
- Remove the need to have JS Options, so that older clients can upgrade to squatch.js v2 easily.
|
|
197
|
+
|
|
198
|
+
## [2.2.0] - 2020-06-12
|
|
199
|
+
|
|
200
|
+
### Added
|
|
201
|
+
|
|
202
|
+
- Reads `_saasquatch` from the URL and stores a 1st-party cookie on the specified landing page's domain.
|
|
203
|
+
- Sets `cookies` on users during an upsert **automatically**
|
|
204
|
+
|
|
205
|
+
```js
|
|
206
|
+
{
|
|
207
|
+
user: {
|
|
208
|
+
id: "abc",
|
|
209
|
+
accountId: "abc",
|
|
210
|
+
cookies: "SAASQUATCHCOOKIE",
|
|
211
|
+
...
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- Reads the 1st-party cookie when using `autofill`
|
|
216
|
+
|
|
217
|
+
```js
|
|
218
|
+
squatch
|
|
219
|
+
.api()
|
|
220
|
+
.squatchReferralCookie()
|
|
221
|
+
.then(function (response) {
|
|
222
|
+
element.value = response.codes["program-id"];
|
|
223
|
+
});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## [2.1.8] - 2020-05-25
|
|
227
|
+
|
|
228
|
+
No release notes.
|
|
229
|
+
|
|
230
|
+
## [2.1.7] - 2020-05-21
|
|
231
|
+
|
|
232
|
+
No release notes.
|
|
233
|
+
|
|
234
|
+
## [2.1.6] - 2019-04-15
|
|
235
|
+
|
|
236
|
+
No release notes.
|
|
237
|
+
|
|
238
|
+
## [2.1.5] - 2019-02-19
|
|
239
|
+
|
|
240
|
+
No release notes.
|
|
241
|
+
|
|
242
|
+
## [2.1.4] - 2019-01-03
|
|
243
|
+
|
|
244
|
+
No release notes.
|
|
245
|
+
|
|
246
|
+
## [2.1.3] - 2018-12-05
|
|
247
|
+
|
|
248
|
+
No release notes.
|
|
249
|
+
|
|
250
|
+
## [2.1.2] - 2018-10-22
|
|
251
|
+
|
|
252
|
+
No release notes.
|
|
253
|
+
|
|
254
|
+
## [2.1.1] - 2018-10-19
|
|
255
|
+
|
|
256
|
+
### Fixed
|
|
257
|
+
|
|
258
|
+
- POPUP Widget in iOS Safari is not clickable when is hidden anymore
|
|
259
|
+
|
|
260
|
+
## [2.1.0] - 2018-09-26
|
|
261
|
+
|
|
262
|
+
No release notes.
|
|
263
|
+
|
|
264
|
+
## [2.0.17] - 2017-12-21
|
|
265
|
+
|
|
266
|
+
### Fixed
|
|
267
|
+
|
|
268
|
+
- Fixed content-type detection bug
|
|
269
|
+
|
|
270
|
+
## [2.0.16] - 2017-10-24
|
|
271
|
+
|
|
272
|
+
### Fixed
|
|
273
|
+
|
|
274
|
+
- Fix scrolling issue to allow scrolling within popup modal
|
|
275
|
+
|
|
276
|
+
## [2.0.15] - 2017-10-12
|
|
277
|
+
|
|
278
|
+
### Added
|
|
279
|
+
|
|
280
|
+
- Support for scrolling popup in mobile
|
|
281
|
+
|
|
282
|
+
## [2.0.14] - 2017-10-11
|
|
283
|
+
|
|
284
|
+
### Fixed
|
|
285
|
+
|
|
286
|
+
- Fix registration form message in popup
|
|
287
|
+
|
|
288
|
+
## [2.0.13] - 2017-08-03
|
|
289
|
+
|
|
290
|
+
No release notes.
|
|
291
|
+
|
|
292
|
+
## [2.0.12] - 2017-07-18
|
|
293
|
+
|
|
294
|
+
No release notes.
|
|
295
|
+
|
|
296
|
+
## [2.0.11] - 2017-07-18
|
|
297
|
+
|
|
298
|
+
No release notes.
|
|
299
|
+
|
|
300
|
+
## [2.0.10] - 2017-06-30
|
|
301
|
+
|
|
302
|
+
No release notes.
|
|
303
|
+
|
|
304
|
+
## [2.0.9] - 2017-06-08
|
|
305
|
+
|
|
306
|
+
No release notes.
|
|
307
|
+
|
|
308
|
+
## [2.0.8] - 2017-06-08
|
|
309
|
+
|
|
310
|
+
No release notes.
|
|
311
|
+
|
|
312
|
+
## [2.0.7] - 2017-04-24
|
|
313
|
+
|
|
314
|
+
No release notes.
|
|
315
|
+
|
|
316
|
+
## [2.0.6] - 2017-02-14
|
|
317
|
+
|
|
318
|
+
### Fixed
|
|
319
|
+
|
|
320
|
+
- Fix share tracking
|
|
321
|
+
- Ignore CONVERSION_WIDGET widget rules when there's no referrals
|
|
322
|
+
|
|
323
|
+
### Changed
|
|
324
|
+
|
|
325
|
+
- Auto-fill content type check changed to non-case sensitive
|
|
326
|
+
|
|
327
|
+
## [2.0.5] - 2016-12-07
|
|
328
|
+
|
|
329
|
+
No release notes.
|
|
330
|
+
|
|
331
|
+
## [2.0.4] - 2016-12-06
|
|
332
|
+
|
|
333
|
+
No release notes.
|
|
334
|
+
|
|
335
|
+
## [2.0.3] - 2016-11-30
|
|
336
|
+
|
|
337
|
+
No release notes.
|
|
338
|
+
|
|
339
|
+
## [2.0.2] - 2016-11-29
|
|
340
|
+
|
|
341
|
+
No release notes.
|
|
342
|
+
|
|
343
|
+
## [2.0.1] - 2016-11-25
|
|
344
|
+
|
|
345
|
+
No release notes.
|
|
346
|
+
|
|
347
|
+
## [2.0.0] - 2016-11-25
|
|
348
|
+
|
|
349
|
+
No release notes.
|
|
350
|
+
|
|
351
|
+
[unreleased]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.6.0...HEAD
|
|
352
|
+
[2.6.0]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.5.0...@saasquatch%2Fsquatch-js@2.6.0
|
|
353
|
+
[2.5.0]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.1...@saasquatch%2Fsquatch-js@2.5.0
|
|
354
|
+
[2.4.3]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.2...@saasquatch%2Fsquatch-js@2.4.3
|
|
355
|
+
[2.4.2]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.1...@saasquatch%2Fsquatch-js@2.4.2
|
|
356
|
+
[2.4.1]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.0...@saasquatch%2Fsquatch-js@2.4.1
|
|
357
|
+
[2.4.0]: https://github.com/saasquatch/squatch-js/compare/v2.3.1...@saasquatch%2Fsquatch-js@2.4.0
|
|
358
|
+
[2.3.1]: https://github.com/saasquatch/squatch-js/compare/v2.3.0...v2.3.1
|
|
359
|
+
[2.3.0]: https://github.com/saasquatch/squatch-js/compare/v2.2.1...v2.3.0
|
|
360
|
+
[2.2.1]: https://github.com/saasquatch/squatch-js/compare/v2.2.0...v2.2.1
|
|
361
|
+
[2.2.0]: https://github.com/saasquatch/squatch-js/compare/v2.1.8...v2.2.0
|
|
362
|
+
[2.1.8]: https://github.com/saasquatch/squatch-js/compare/v2.1.7...v2.1.8
|
|
363
|
+
[2.1.7]: https://github.com/saasquatch/squatch-js/compare/v2.1.6...v2.1.7
|
|
364
|
+
[2.1.6]: https://github.com/saasquatch/squatch-js/compare/v2.1.5...v2.1.6
|
|
365
|
+
[2.1.5]: https://github.com/saasquatch/squatch-js/compare/v2.1.4...v2.1.5
|
|
366
|
+
[2.1.4]: https://github.com/saasquatch/squatch-js/compare/v2.1.3...v2.1.4
|
|
367
|
+
[2.1.3]: https://github.com/saasquatch/squatch-js/compare/v2.1.2...v2.1.3
|
|
368
|
+
[2.1.2]: https://github.com/saasquatch/squatch-js/compare/v2.1.1...v2.1.2
|
|
369
|
+
[2.1.1]: https://github.com/saasquatch/squatch-js/compare/v2.1.0...v2.1.1
|
|
370
|
+
[2.1.0]: https://github.com/saasquatch/squatch-js/compare/v2.0.17...v2.1.0
|
|
371
|
+
[2.0.17]: https://github.com/saasquatch/squatch-js/compare/v2.0.16...v2.0.17
|
|
372
|
+
[2.0.16]: https://github.com/saasquatch/squatch-js/compare/v2.0.15...v2.0.16
|
|
373
|
+
[2.0.15]: https://github.com/saasquatch/squatch-js/compare/v2.0.14...v2.0.15
|
|
374
|
+
[2.0.14]: https://github.com/saasquatch/squatch-js/compare/v2.0.13...v2.0.14
|
|
375
|
+
[2.0.13]: https://github.com/saasquatch/squatch-js/compare/v2.0.12...v2.0.13
|
|
376
|
+
[2.0.12]: https://github.com/saasquatch/squatch-js/compare/v2.0.11...v2.0.12
|
|
377
|
+
[2.0.11]: https://github.com/saasquatch/squatch-js/compare/v2.0.10...v2.0.11
|
|
378
|
+
[2.0.10]: https://github.com/saasquatch/squatch-js/compare/v2.0.9...v2.0.10
|
|
379
|
+
[2.0.9]: https://github.com/saasquatch/squatch-js/compare/v2.0.8...v2.0.9
|
|
380
|
+
[2.0.8]: https://github.com/saasquatch/squatch-js/compare/v2.0.7...v2.0.8
|
|
381
|
+
[2.0.7]: https://github.com/saasquatch/squatch-js/compare/v2.0.6...v2.0.7
|
|
382
|
+
[2.0.6]: https://github.com/saasquatch/squatch-js/compare/v2.0.5...v2.0.6
|
|
383
|
+
[2.0.5]: https://github.com/saasquatch/squatch-js/compare/v2.0.4...v2.0.5
|
|
384
|
+
[2.0.4]: https://github.com/saasquatch/squatch-js/compare/v2.0.3...v2.0.4
|
|
385
|
+
[2.0.3]: https://github.com/saasquatch/squatch-js/compare/v2.0.2...v2.0.3
|
|
386
|
+
[2.0.2]: https://github.com/saasquatch/squatch-js/compare/v2.0.1...v2.0.2
|
|
387
|
+
[2.0.1]: https://github.com/saasquatch/squatch-js/compare/v2.0.0...v2.0.1
|
|
388
|
+
[2.0.0]: https://github.com/saasquatch/squatch-js/releases/tag/v2.0.0
|