@ututrust/web-components 2.3.0 → 2.3.1
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/README.md +55 -25
- package/dist/index.cjs +212 -213
- package/dist/index.js +25818 -27002
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -24,15 +24,16 @@ $ npm install @ututrust/web-components
|
|
|
24
24
|
|
|
25
25
|
## Configuration options
|
|
26
26
|
|
|
27
|
-
The SDK can be configured by
|
|
28
|
-
|
|
27
|
+
The SDK can be configured by calling a function on the SDK to inform it what the environment is so
|
|
28
|
+
that the SDK talks to the correct endpoints:
|
|
29
29
|
|
|
30
|
-
If set to `true`, the SDK will connect to UTU's production API services.
|
|
31
|
-
Otherwise (default), it will connect to UTU API testing services.
|
|
32
|
-
|
|
33
|
-
Use it like so, after the SDK has been loaded:
|
|
34
30
|
```
|
|
35
|
-
|
|
31
|
+
const config: IConfig = {
|
|
32
|
+
production,
|
|
33
|
+
provider: walletProvider
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
updateConfig(config);
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
## Examples
|
|
@@ -224,6 +225,20 @@ To mock an UTU API response, specify ```api-url``` of ```<x-utu-root>```:
|
|
|
224
225
|
|
|
225
226
|
Example of a JSON file can be find at ```/packages/utu-web-components/src/api-mock```
|
|
226
227
|
|
|
228
|
+
## Using / Not using Unlock
|
|
229
|
+
|
|
230
|
+
Unlock is a library that allows us to charge for access to signal. The SDK can be built / run with unlock integrated or not integrated. This is controlled by an .env file.
|
|
231
|
+
|
|
232
|
+
Please copy .env_example and rename it to .env
|
|
233
|
+
|
|
234
|
+
Inside the .env file it has:
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
VITE_USE_UNLOCK=false
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
If you want to use Unlock set the above variable to true
|
|
241
|
+
|
|
227
242
|
## Local Development
|
|
228
243
|
Development stack:
|
|
229
244
|
- [preactjs](https://preactjs.com)
|
|
@@ -247,13 +262,30 @@ Install dependencies
|
|
|
247
262
|
$ npm install
|
|
248
263
|
```
|
|
249
264
|
|
|
250
|
-
Start watch mode with preview in a browser
|
|
265
|
+
Start watch mode with preview in a browser.
|
|
251
266
|
|
|
252
267
|
```bash
|
|
253
268
|
$ npm run dev
|
|
254
269
|
```
|
|
270
|
+
To mock out talking to the UTU backend run this command in another terminal window:
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
npm run api-mock
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
To mock out the video recording make sure you are in this directory:
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
<project-dir>/packages/video-server-mock
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
and run this command in another terminal window:
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
npm run start
|
|
286
|
+
```
|
|
255
287
|
|
|
256
|
-
Production build
|
|
288
|
+
To test that there are no compilation issues in the Production build run:
|
|
257
289
|
|
|
258
290
|
```bash
|
|
259
291
|
$ npm run build
|
|
@@ -304,16 +336,15 @@ git checkout -b release-[version]
|
|
|
304
336
|
|
|
305
337
|
```
|
|
306
338
|
|
|
307
|
-
➡️
|
|
339
|
+
➡️ To get `FeedbackDetails.tsx` to NOT use Unlock for showing feedback you need to set the .env file to have this attribute:
|
|
308
340
|
|
|
309
|
-
|
|
341
|
+
```
|
|
342
|
+
VITE_USE_UNLOCK=false
|
|
343
|
+
```
|
|
310
344
|
|
|
311
|
-
|
|
312
|
-
<UnlockGateway address={sourceUuid}>
|
|
313
|
-
...feedback details...
|
|
314
|
-
</UnlockGateway>
|
|
345
|
+
Internally it will not inject the UnlockGateway tags
|
|
315
346
|
|
|
316
|
-
|
|
347
|
+
Note that Unlock functionality is about the user paying to see Signal.
|
|
317
348
|
|
|
318
349
|
➡️ In `package.json`
|
|
319
350
|
|
|
@@ -342,23 +373,22 @@ git pull
|
|
|
342
373
|
|
|
343
374
|
# create + switch to a staging branch
|
|
344
375
|
git checkout -b release-[version]-alpha
|
|
345
|
-
|
|
346
376
|
```
|
|
347
377
|
|
|
348
|
-
➡️
|
|
378
|
+
➡️ To get `FeedbackDetails.tsx` to use Unlock for showing feedback you need to set the .env file to have this attribute:
|
|
349
379
|
|
|
350
|
-
|
|
380
|
+
```
|
|
381
|
+
VITE_USE_UNLOCK=true
|
|
382
|
+
```
|
|
351
383
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
{/* </UnlockGateway> */}
|
|
384
|
+
Internally it will inject the UnlockGateway tags
|
|
385
|
+
|
|
386
|
+
Note that Unlock functionality is about the user paying to see Signal.
|
|
356
387
|
|
|
357
|
-
```
|
|
358
388
|
|
|
359
389
|
➡️ In `package.json`
|
|
360
390
|
|
|
361
|
-
Update the version number with an alpha tag (e.g. `1.2.3-alpha`)
|
|
391
|
+
Update the version number with an alpha tag (e.g. `1.2.3-alpha.0`)
|
|
362
392
|
|
|
363
393
|
```bash
|
|
364
394
|
git add .
|