@tivio/sdk-react 2.1.4 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -0
- package/coverage/clover.xml +356 -95
- package/coverage/lcov-report/index.html +55 -25
- package/coverage/lcov-report/src/components/ContextProvider.tsx.html +194 -0
- package/coverage/lcov-report/src/components/TivioProvider.tsx.html +109 -37
- package/coverage/lcov-report/src/components/TivioWidgetError.tsx.html +3 -3
- package/coverage/lcov-report/src/components/TivioWidgetLoader.tsx.html +3 -3
- package/coverage/lcov-report/src/components/context/ChannelsContext.tsx.html +197 -0
- package/coverage/lcov-report/src/components/context/OrganizationSubscriptionsContext.tsx.html +179 -0
- package/coverage/lcov-report/src/components/context/PurchasesWithVideosContext.tsx.html +179 -0
- package/coverage/lcov-report/src/components/context/RowItemsContext.tsx.html +191 -0
- package/coverage/lcov-report/src/components/context/ScreensContext.tsx.html +185 -0
- package/coverage/lcov-report/src/components/context/SectionsContext.tsx.html +200 -0
- package/coverage/lcov-report/src/components/context/UserContext.tsx.html +176 -0
- package/coverage/lcov-report/src/components/context/VideosContext.tsx.html +200 -0
- package/coverage/lcov-report/src/components/context/index.html +231 -0
- package/coverage/lcov-report/src/components/context/index.ts.html +104 -0
- package/coverage/lcov-report/src/components/index.html +32 -32
- package/coverage/lcov-report/src/conf.ts.html +27 -21
- package/coverage/lcov-report/src/index.html +21 -6
- package/coverage/lcov-report/src/services/bundleLoader.ts.html +127 -157
- package/coverage/lcov-report/src/services/dependencyResolver.ts.html +36 -30
- package/coverage/lcov-report/src/services/index.html +102 -42
- package/coverage/lcov-report/src/services/logger.ts.html +53 -98
- package/coverage/lcov-report/src/services/packageLoader.ts.html +31 -31
- package/coverage/lcov-report/src/services/pubSub.ts.html +9 -9
- package/coverage/lcov-report/src/services/sentry.ts.html +170 -0
- package/coverage/lcov-report/src/services/settings.ts.html +34 -34
- package/coverage/lcov-report/src/setupTests.ts.html +9 -9
- package/coverage/lcov.info +641 -141
- package/dist/components/TivioProvider.d.ts +3 -0
- package/dist/components/hooks/usePurchaseSubscription.d.ts +2 -7
- package/dist/components/hooks/useTransactionPayment.d.ts +2 -7
- package/dist/conf.d.ts +1 -0
- package/dist/index.js +1 -2
- package/dist/services/dependencyResolver.d.ts +2 -1
- package/dist/services/sentry.d.ts +2 -5
- package/dist/types.d.ts +5 -13
- package/env +0 -0
- package/package.json +12 -12
- package/scripts/build_dev.sh +3 -0
- package/scripts/build_prod.sh +3 -0
- package/scripts/postpublish.ts +10 -0
- package/scripts/start.sh +3 -0
- package/dist/index.js.LICENSE.txt +0 -114
@@ -23,30 +23,30 @@
|
|
23
23
|
<div class='clearfix'>
|
24
24
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
26
|
-
<span class="strong">
|
26
|
+
<span class="strong">100% </span>
|
27
27
|
<span class="quiet">Statements</span>
|
28
|
-
<span class='fraction'>
|
28
|
+
<span class='fraction'>14/14</span>
|
29
29
|
</div>
|
30
30
|
|
31
31
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
33
|
-
<span class="strong">
|
33
|
+
<span class="strong">100% </span>
|
34
34
|
<span class="quiet">Branches</span>
|
35
|
-
<span class='fraction'>
|
35
|
+
<span class='fraction'>6/6</span>
|
36
36
|
</div>
|
37
37
|
|
38
38
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
40
|
-
<span class="strong">
|
40
|
+
<span class="strong">100% </span>
|
41
41
|
<span class="quiet">Functions</span>
|
42
|
-
<span class='fraction'>
|
42
|
+
<span class='fraction'>3/3</span>
|
43
43
|
</div>
|
44
44
|
|
45
45
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
47
|
-
<span class="strong">
|
47
|
+
<span class="strong">100% </span>
|
48
48
|
<span class="quiet">Lines</span>
|
49
|
-
<span class='fraction'>
|
49
|
+
<span class='fraction'>13/13</span>
|
50
50
|
</div>
|
51
51
|
|
52
52
|
|
@@ -55,7 +55,7 @@
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
56
56
|
</p>
|
57
57
|
</div>
|
58
|
-
<div class='status-line
|
58
|
+
<div class='status-line high'></div>
|
59
59
|
<pre><table class="coverage">
|
60
60
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
61
61
|
<a name='L2'></a><a href='#L2'>2</a>
|
@@ -120,31 +120,31 @@
|
|
120
120
|
<span class="cline-any cline-neutral"> </span>
|
121
121
|
<span class="cline-any cline-neutral"> </span>
|
122
122
|
<span class="cline-any cline-neutral"> </span>
|
123
|
-
<span class="cline-any cline-yes">
|
124
|
-
<span class="cline-any cline-yes">
|
123
|
+
<span class="cline-any cline-yes">2x</span>
|
124
|
+
<span class="cline-any cline-yes">19x</span>
|
125
125
|
<span class="cline-any cline-neutral"> </span>
|
126
126
|
<span class="cline-any cline-neutral"> </span>
|
127
127
|
<span class="cline-any cline-neutral"> </span>
|
128
|
-
<span class="cline-any cline-yes">
|
128
|
+
<span class="cline-any cline-yes">19x</span>
|
129
129
|
<span class="cline-any cline-neutral"> </span>
|
130
|
-
<span class="cline-any cline-yes">
|
130
|
+
<span class="cline-any cline-yes">19x</span>
|
131
131
|
<span class="cline-any cline-neutral"> </span>
|
132
|
-
<span class="cline-any cline-
|
133
|
-
<span class="cline-any cline-
|
132
|
+
<span class="cline-any cline-yes">6x</span>
|
133
|
+
<span class="cline-any cline-yes">4x</span>
|
134
134
|
<span class="cline-any cline-neutral"> </span>
|
135
|
-
<span class="cline-any cline-
|
135
|
+
<span class="cline-any cline-yes">2x</span>
|
136
136
|
<span class="cline-any cline-neutral"> </span>
|
137
|
-
<span class="cline-any cline-
|
138
|
-
<span class="cline-any cline-
|
137
|
+
<span class="cline-any cline-yes">2x</span>
|
138
|
+
<span class="cline-any cline-yes">1x</span>
|
139
139
|
<span class="cline-any cline-neutral"> </span>
|
140
140
|
<span class="cline-any cline-neutral"> </span>
|
141
141
|
<span class="cline-any cline-neutral"> </span>
|
142
142
|
<span class="cline-any cline-neutral"> </span>
|
143
|
-
<span class="cline-any cline-
|
144
|
-
<span class="cline-any cline-
|
145
|
-
<span class="cline-any cline-
|
143
|
+
<span class="cline-any cline-yes">2x</span>
|
144
|
+
<span class="cline-any cline-yes">1x</span>
|
145
|
+
<span class="cline-any cline-yes">1x</span>
|
146
146
|
<span class="cline-any cline-neutral"> </span>
|
147
|
-
<span class="cline-any cline-
|
147
|
+
<span class="cline-any cline-yes">1x</span>
|
148
148
|
<span class="cline-any cline-neutral"> </span>
|
149
149
|
<span class="cline-any cline-neutral"> </span>
|
150
150
|
<span class="cline-any cline-neutral"> </span>
|
@@ -174,23 +174,23 @@ export const createSettings = (conf: InternalConf) => {
|
|
174
174
|
} | null = null
|
175
175
|
|
176
176
|
return ({
|
177
|
-
onSetUser:
|
178
|
-
|
179
|
-
|
177
|
+
onSetUser: (handler: (userId: string, userPayload: unknown) => void) => {
|
178
|
+
if (typeof handler !== 'function') {
|
179
|
+
conf.logger?.exception('Tivio Bundle setUser handler must be a function')
|
180
180
|
} else {
|
181
|
-
|
181
|
+
setUserHandler = handler
|
182
182
|
|
183
|
-
|
184
|
-
|
183
|
+
if (value !== null) {
|
184
|
+
handler(value.userId, value.userPayload)
|
185
185
|
}
|
186
186
|
}
|
187
187
|
},
|
188
|
-
setUser:
|
189
|
-
|
190
|
-
|
191
|
-
|
188
|
+
setUser: (userId: string, userPayload: unknown) => {
|
189
|
+
if (typeof setUserHandler === 'function') {
|
190
|
+
value = null
|
191
|
+
setUserHandler(userId, userPayload)
|
192
192
|
} else {
|
193
|
-
|
193
|
+
value = { userId, userPayload }
|
194
194
|
}
|
195
195
|
},
|
196
196
|
})
|
@@ -202,7 +202,7 @@ export const createSettings = (conf: InternalConf) => {
|
|
202
202
|
<div class='footer quiet pad2 space-top1 center small'>
|
203
203
|
Code coverage generated by
|
204
204
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
205
|
-
at
|
205
|
+
at Sat Oct 23 2021 10:01:51 GMT+0200 (Central European Summer Time)
|
206
206
|
</div>
|
207
207
|
</div>
|
208
208
|
<script src="../../prettify.js"></script>
|
@@ -83,17 +83,17 @@
|
|
83
83
|
<a name='L24'></a><a href='#L24'>24</a>
|
84
84
|
<a name='L25'></a><a href='#L25'>25</a>
|
85
85
|
<a name='L26'></a><a href='#L26'>26</a>
|
86
|
-
<a name='L27'></a><a href='#L27'>27</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">
|
86
|
+
<a name='L27'></a><a href='#L27'>27</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
87
87
|
<span class="cline-any cline-neutral"> </span>
|
88
88
|
<span class="cline-any cline-neutral"> </span>
|
89
|
-
<span class="cline-any cline-yes">
|
90
|
-
<span class="cline-any cline-yes">
|
91
|
-
<span class="cline-any cline-yes">
|
92
|
-
<span class="cline-any cline-yes">
|
89
|
+
<span class="cline-any cline-yes">7x</span>
|
90
|
+
<span class="cline-any cline-yes">7x</span>
|
91
|
+
<span class="cline-any cline-yes">7x</span>
|
92
|
+
<span class="cline-any cline-yes">7x</span>
|
93
93
|
<span class="cline-any cline-neutral"> </span>
|
94
|
-
<span class="cline-any cline-yes">
|
94
|
+
<span class="cline-any cline-yes">7x</span>
|
95
95
|
<span class="cline-any cline-neutral"> </span>
|
96
|
-
<span class="cline-any cline-yes">
|
96
|
+
<span class="cline-any cline-yes">7x</span>
|
97
97
|
<span class="cline-any cline-neutral"> </span>
|
98
98
|
<span class="cline-any cline-neutral"> </span>
|
99
99
|
<span class="cline-any cline-neutral"> </span>
|
@@ -105,7 +105,7 @@
|
|
105
105
|
<span class="cline-any cline-neutral"> </span>
|
106
106
|
<span class="cline-any cline-neutral"> </span>
|
107
107
|
<span class="cline-any cline-neutral"> </span>
|
108
|
-
<span class="cline-any cline-yes">
|
108
|
+
<span class="cline-any cline-yes">7x</span>
|
109
109
|
<span class="cline-any cline-neutral"> </span>
|
110
110
|
<span class="cline-any cline-neutral"> </span>
|
111
111
|
<span class="cline-any cline-neutral"> </span>
|
@@ -142,7 +142,7 @@ export const pubSubMock = {
|
|
142
142
|
<div class='footer quiet pad2 space-top1 center small'>
|
143
143
|
Code coverage generated by
|
144
144
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
145
|
-
at
|
145
|
+
at Sat Oct 23 2021 10:01:51 GMT+0200 (Central European Summer Time)
|
146
146
|
</div>
|
147
147
|
</div>
|
148
148
|
<script src="../prettify.js"></script>
|