@timum/booking 0.1.3 → 0.2.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/LICENSE.md +85 -0
- package/build/android-chrome-144x144.png +0 -0
- package/build/android-chrome-192x192.png +0 -0
- package/build/android-chrome-36x36.png +0 -0
- package/build/android-chrome-48x48.png +0 -0
- package/build/android-chrome-72x72.png +0 -0
- package/build/android-chrome-96x96.png +0 -0
- package/build/apple-touch-icon-114x114.png +0 -0
- package/build/apple-touch-icon-120x120.png +0 -0
- package/build/apple-touch-icon-144x144.png +0 -0
- package/build/apple-touch-icon-152x152.png +0 -0
- package/build/apple-touch-icon-180x180.png +0 -0
- package/build/apple-touch-icon-57x57.png +0 -0
- package/build/apple-touch-icon-60x60.png +0 -0
- package/build/apple-touch-icon-72x72.png +0 -0
- package/build/apple-touch-icon-76x76.png +0 -0
- package/build/apple-touch-icon-precomposed.png +0 -0
- package/build/apple-touch-icon.png +0 -0
- package/build/asset-manifest.json +13 -0
- package/build/browserconfig.xml +12 -0
- package/build/favicon-16x16.png +0 -0
- package/build/favicon-194x194.png +0 -0
- package/build/favicon-32x32.png +0 -0
- package/build/favicon-96x96.png +0 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -60
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +46 -0
- package/build/mockServiceWorker.js +338 -0
- package/build/mstile-144x144.png +0 -0
- package/build/mstile-150x150.png +0 -0
- package/build/mstile-310x150.png +0 -0
- package/build/mstile-310x310.png +0 -0
- package/build/mstile-70x70.png +0 -0
- package/build/static/css/main.2cb80f6b.css +2 -0
- package/build/static/css/{main.ef2ccb8b.css.map → main.2cb80f6b.css.map} +1 -1
- package/build/timum-bg-large.png +0 -0
- package/build/timum-booking.js +1 -1
- package/build/timum-booking.js.map +1 -1
- package/build/timum-logo-bright.svg +63 -0
- package/build/timum-logo-white.svg +63 -0
- package/examples/callbacks.htm +1 -1
- package/examples/fields.htm +1 -1
- package/examples/group-bookings.htm +1 -1
- package/examples/list-view.htm +1 -1
- package/examples/local-language.htm +1 -1
- package/examples/local-preset.htm +1 -1
- package/examples/local-strings.htm +1 -1
- package/examples/multiple.htm +1 -1
- package/examples/selectable-product.htm +1 -1
- package/examples/single.htm +1 -1
- package/examples/usingChannelId.htm +1 -1
- package/examples/usingChannelKeyAndResourceRef.htm +1 -1
- package/examples/usingFullCalendar.htm +1 -1
- package/package.json +1 -1
- package/build/static/css/main.ef2ccb8b.css +0 -2
package/LICENSE.md
CHANGED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
Creative Commons Attribution-NoDerivatives 4.0 International Public License
|
|
2
|
+
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
|
3
|
+
|
|
4
|
+
Section 1 – Definitions.
|
|
5
|
+
|
|
6
|
+
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
|
7
|
+
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
|
8
|
+
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
|
9
|
+
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
|
10
|
+
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
|
11
|
+
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
|
12
|
+
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
|
13
|
+
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
|
14
|
+
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
|
15
|
+
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
|
16
|
+
Section 2 – Scope.
|
|
17
|
+
|
|
18
|
+
License grant.
|
|
19
|
+
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
|
20
|
+
reproduce and Share the Licensed Material, in whole or in part; and
|
|
21
|
+
produce and reproduce, but not Share, Adapted Material.
|
|
22
|
+
Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
|
23
|
+
Term. The term of this Public License is specified in Section 6(a).
|
|
24
|
+
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
|
25
|
+
Downstream recipients.
|
|
26
|
+
Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
|
27
|
+
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
|
28
|
+
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
|
29
|
+
Other rights.
|
|
30
|
+
|
|
31
|
+
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
|
32
|
+
Patent and trademark rights are not licensed under this Public License.
|
|
33
|
+
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
|
34
|
+
Section 3 – License Conditions.
|
|
35
|
+
|
|
36
|
+
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
|
37
|
+
|
|
38
|
+
Attribution.
|
|
39
|
+
|
|
40
|
+
If You Share the Licensed Material, You must:
|
|
41
|
+
|
|
42
|
+
retain the following if it is supplied by the Licensor with the Licensed Material:
|
|
43
|
+
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
|
44
|
+
a copyright notice;
|
|
45
|
+
a notice that refers to this Public License;
|
|
46
|
+
a notice that refers to the disclaimer of warranties;
|
|
47
|
+
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
|
48
|
+
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
|
49
|
+
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
|
50
|
+
For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material.
|
|
51
|
+
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
|
52
|
+
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
|
53
|
+
Section 4 – Sui Generis Database Rights.
|
|
54
|
+
|
|
55
|
+
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
|
56
|
+
|
|
57
|
+
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database, provided You do not Share Adapted Material;
|
|
58
|
+
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
|
|
59
|
+
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
|
60
|
+
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
|
61
|
+
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
|
62
|
+
|
|
63
|
+
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
|
64
|
+
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
|
65
|
+
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
|
66
|
+
Section 6 – Term and Termination.
|
|
67
|
+
|
|
68
|
+
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
|
69
|
+
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
|
70
|
+
|
|
71
|
+
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
|
72
|
+
upon express reinstatement by the Licensor.
|
|
73
|
+
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
|
74
|
+
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
|
75
|
+
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
|
76
|
+
Section 7 – Other Terms and Conditions.
|
|
77
|
+
|
|
78
|
+
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
|
79
|
+
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
|
80
|
+
Section 8 – Interpretation.
|
|
81
|
+
|
|
82
|
+
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
|
83
|
+
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
|
84
|
+
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
|
85
|
+
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"main.js": "/timum-booking.js",
|
|
4
|
+
"main.css": "/static/css/main.2cb80f6b.css",
|
|
5
|
+
"index.html": "/index.html",
|
|
6
|
+
"timum-booking.js.map": "/timum-booking.js.map",
|
|
7
|
+
"main.2cb80f6b.css.map": "/static/css/main.2cb80f6b.css.map"
|
|
8
|
+
},
|
|
9
|
+
"entrypoints": [
|
|
10
|
+
"timum-booking.js",
|
|
11
|
+
"static/css/main.2cb80f6b.css"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<browserconfig>
|
|
3
|
+
<msapplication>
|
|
4
|
+
<tile>
|
|
5
|
+
<square70x70logo src="/public/mstile-70x70.png"/>
|
|
6
|
+
<square150x150logo src="/public/mstile-150x150.png"/>
|
|
7
|
+
<square310x310logo src="/public/mstile-310x310.png"/>
|
|
8
|
+
<wide310x150logo src="/public/mstile-310x150.png"/>
|
|
9
|
+
<TileColor>#2b5797</TileColor>
|
|
10
|
+
</tile>
|
|
11
|
+
</msapplication>
|
|
12
|
+
</browserconfig>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build/index.html
CHANGED
|
@@ -1,60 +1 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<meta name="viewport" content="width=1080, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=0.6" />
|
|
7
|
-
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<meta name="description" content="Web site created using create-react-app" />
|
|
9
|
-
<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/apple-touch-icon-57x57.png" />
|
|
10
|
-
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/apple-touch-icon-60x60.png" />
|
|
11
|
-
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/apple-touch-icon-72x72.png" />
|
|
12
|
-
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/apple-touch-icon-76x76.png" />
|
|
13
|
-
<link rel="apple-touch-icon" sizes="114x114" href="%PUBLIC_URL%/apple-touch-icon-114x114.png" />
|
|
14
|
-
<link rel="apple-touch-icon" sizes="120x120" href="%PUBLIC_URL%/apple-touch-icon-120x120.png" />
|
|
15
|
-
<link rel="apple-touch-icon" sizes="144x144" href="%PUBLIC_URL%/apple-touch-icon-144x144.png" />
|
|
16
|
-
<link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/apple-touch-icon-152x152.png" />
|
|
17
|
-
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon-180x180.png" />
|
|
18
|
-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
19
|
-
<link rel="icon" type="image/png" href="%PUBLIC_URL%/favicon-32x32.png" sizes="32x32" />
|
|
20
|
-
<link rel="icon" type="image/png" href="%PUBLIC_URL%/favicon-194x194.png" sizes="194x194" />
|
|
21
|
-
<link rel="icon" type="image/png" href="%PUBLIC_URL%/favicon-96x96.png" sizes="96x96" />
|
|
22
|
-
<link rel="icon" type="image/png" href="%PUBLIC_URL%/android-chrome-192x192.png" sizes="192x192" />
|
|
23
|
-
<link rel="icon" type="image/png" href="%PUBLIC_URL%/favicon-16x16.png" sizes="16x16" />
|
|
24
|
-
|
|
25
|
-
<meta name="msapplication-TileColor" content="#2b5797" />
|
|
26
|
-
<meta name="msapplication-TileImage" content="%PUBLIC_URL%/mstile-144x144.png" />
|
|
27
|
-
<meta name="theme-color" content="#ffffff" />
|
|
28
|
-
<!--
|
|
29
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
30
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
31
|
-
-->
|
|
32
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
33
|
-
<!--
|
|
34
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
35
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
36
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
37
|
-
|
|
38
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
39
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
40
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
41
|
-
-->
|
|
42
|
-
<title>timum booking</title>
|
|
43
|
-
</head>
|
|
44
|
-
|
|
45
|
-
<body>
|
|
46
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
47
|
-
<div id="root"></div>
|
|
48
|
-
<!--
|
|
49
|
-
This HTML file is a template.
|
|
50
|
-
If you open it directly in the browser, you will see an empty page.
|
|
51
|
-
|
|
52
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
53
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
54
|
-
|
|
55
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
56
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
57
|
-
-->
|
|
58
|
-
</body>
|
|
59
|
-
|
|
60
|
-
</html>
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=1080,initial-scale=1,user-scalable=0,maximum-scale=1,minimum-scale=0.6"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"/><link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"/><link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"/><link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"/><link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"/><link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"/><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"/><link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"/><link rel="icon" type="image/png" href="/favicon-194x194.png" sizes="194x194"/><link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96"/><link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192"/><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"/><meta name="msapplication-TileColor" content="#2b5797"/><meta name="msapplication-TileImage" content="/mstile-144x144.png"/><meta name="theme-color" content="#ffffff"/><link rel="manifest" href="/manifest.json"/><title>timum für Flowfact</title><script defer="defer" src="/timum-booking.js"></script><link href="/static/css/main.2cb80f6b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "Timum for Flowfact",
|
|
3
|
+
"name": "Flowfact Widget to organize timum appointments",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "android-chrome-36x36.png",
|
|
7
|
+
"sizes": "36x36",
|
|
8
|
+
"type": "image/png",
|
|
9
|
+
"density": "0.75"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"src": "android-chrome-48x48.png",
|
|
13
|
+
"sizes": "48x48",
|
|
14
|
+
"type": "image/png",
|
|
15
|
+
"density": "1.0"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"src": "android-chrome-72x72.png",
|
|
19
|
+
"sizes": "72x72",
|
|
20
|
+
"type": "image/png",
|
|
21
|
+
"density": "1.5"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"src": "android-chrome-96x96.png",
|
|
25
|
+
"sizes": "96x96",
|
|
26
|
+
"type": "image/png",
|
|
27
|
+
"density": "2.0"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"src": "android-chrome-144x144.png",
|
|
31
|
+
"sizes": "144x144",
|
|
32
|
+
"type": "image/png",
|
|
33
|
+
"density": "3.0"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"src": "android-chrome-192x192.png",
|
|
37
|
+
"sizes": "192x192",
|
|
38
|
+
"type": "image/png",
|
|
39
|
+
"density": "4.0"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"background_color":"#FFFFFF",
|
|
43
|
+
"theme_color":"#555555",
|
|
44
|
+
"start_url": ".",
|
|
45
|
+
"display": "standalone"
|
|
46
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Mock Service Worker (0.39.2).
|
|
6
|
+
* @see https://github.com/mswjs/msw
|
|
7
|
+
* - Please do NOT modify this file.
|
|
8
|
+
* - Please do NOT serve this file on production.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const INTEGRITY_CHECKSUM = '02f4ad4a2797f85668baf196e553d929'
|
|
12
|
+
const bypassHeaderName = 'x-msw-bypass'
|
|
13
|
+
const activeClientIds = new Set()
|
|
14
|
+
|
|
15
|
+
self.addEventListener('install', function () {
|
|
16
|
+
return self.skipWaiting()
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
self.addEventListener('activate', async function (event) {
|
|
20
|
+
return self.clients.claim()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
self.addEventListener('message', async function (event) {
|
|
24
|
+
const clientId = event.source.id
|
|
25
|
+
|
|
26
|
+
if (!clientId || !self.clients) {
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const client = await self.clients.get(clientId)
|
|
31
|
+
|
|
32
|
+
if (!client) {
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const allClients = await self.clients.matchAll()
|
|
37
|
+
|
|
38
|
+
switch (event.data) {
|
|
39
|
+
case 'KEEPALIVE_REQUEST': {
|
|
40
|
+
sendToClient(client, {
|
|
41
|
+
type: 'KEEPALIVE_RESPONSE',
|
|
42
|
+
})
|
|
43
|
+
break
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
case 'INTEGRITY_CHECK_REQUEST': {
|
|
47
|
+
sendToClient(client, {
|
|
48
|
+
type: 'INTEGRITY_CHECK_RESPONSE',
|
|
49
|
+
payload: INTEGRITY_CHECKSUM,
|
|
50
|
+
})
|
|
51
|
+
break
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
case 'MOCK_ACTIVATE': {
|
|
55
|
+
activeClientIds.add(clientId)
|
|
56
|
+
|
|
57
|
+
sendToClient(client, {
|
|
58
|
+
type: 'MOCKING_ENABLED',
|
|
59
|
+
payload: true,
|
|
60
|
+
})
|
|
61
|
+
break
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
case 'MOCK_DEACTIVATE': {
|
|
65
|
+
activeClientIds.delete(clientId)
|
|
66
|
+
break
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
case 'CLIENT_CLOSED': {
|
|
70
|
+
activeClientIds.delete(clientId)
|
|
71
|
+
|
|
72
|
+
const remainingClients = allClients.filter((client) => {
|
|
73
|
+
return client.id !== clientId
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
// Unregister itself when there are no more clients
|
|
77
|
+
if (remainingClients.length === 0) {
|
|
78
|
+
self.registration.unregister()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
break
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
// Resolve the "main" client for the given event.
|
|
87
|
+
// Client that issues a request doesn't necessarily equal the client
|
|
88
|
+
// that registered the worker. It's with the latter the worker should
|
|
89
|
+
// communicate with during the response resolving phase.
|
|
90
|
+
async function resolveMainClient(event) {
|
|
91
|
+
const client = await self.clients.get(event.clientId)
|
|
92
|
+
|
|
93
|
+
if (client.frameType === 'top-level') {
|
|
94
|
+
return client
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const allClients = await self.clients.matchAll()
|
|
98
|
+
|
|
99
|
+
return allClients
|
|
100
|
+
.filter((client) => {
|
|
101
|
+
// Get only those clients that are currently visible.
|
|
102
|
+
return client.visibilityState === 'visible'
|
|
103
|
+
})
|
|
104
|
+
.find((client) => {
|
|
105
|
+
// Find the client ID that's recorded in the
|
|
106
|
+
// set of clients that have registered the worker.
|
|
107
|
+
return activeClientIds.has(client.id)
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function handleRequest(event, requestId) {
|
|
112
|
+
const client = await resolveMainClient(event)
|
|
113
|
+
const response = await getResponse(event, client, requestId)
|
|
114
|
+
|
|
115
|
+
// Send back the response clone for the "response:*" life-cycle events.
|
|
116
|
+
// Ensure MSW is active and ready to handle the message, otherwise
|
|
117
|
+
// this message will pend indefinitely.
|
|
118
|
+
if (client && activeClientIds.has(client.id)) {
|
|
119
|
+
;(async function () {
|
|
120
|
+
const clonedResponse = response.clone()
|
|
121
|
+
sendToClient(client, {
|
|
122
|
+
type: 'RESPONSE',
|
|
123
|
+
payload: {
|
|
124
|
+
requestId,
|
|
125
|
+
type: clonedResponse.type,
|
|
126
|
+
ok: clonedResponse.ok,
|
|
127
|
+
status: clonedResponse.status,
|
|
128
|
+
statusText: clonedResponse.statusText,
|
|
129
|
+
body:
|
|
130
|
+
clonedResponse.body === null ? null : await clonedResponse.text(),
|
|
131
|
+
headers: serializeHeaders(clonedResponse.headers),
|
|
132
|
+
redirected: clonedResponse.redirected,
|
|
133
|
+
},
|
|
134
|
+
})
|
|
135
|
+
})()
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return response
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async function getResponse(event, client, requestId) {
|
|
142
|
+
const { request } = event
|
|
143
|
+
const requestClone = request.clone()
|
|
144
|
+
const getOriginalResponse = () => fetch(requestClone)
|
|
145
|
+
|
|
146
|
+
// Bypass mocking when the request client is not active.
|
|
147
|
+
if (!client) {
|
|
148
|
+
return getOriginalResponse()
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Bypass initial page load requests (i.e. static assets).
|
|
152
|
+
// The absence of the immediate/parent client in the map of the active clients
|
|
153
|
+
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
|
|
154
|
+
// and is not ready to handle requests.
|
|
155
|
+
if (!activeClientIds.has(client.id)) {
|
|
156
|
+
return await getOriginalResponse()
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Bypass requests with the explicit bypass header
|
|
160
|
+
if (requestClone.headers.get(bypassHeaderName) === 'true') {
|
|
161
|
+
const cleanRequestHeaders = serializeHeaders(requestClone.headers)
|
|
162
|
+
|
|
163
|
+
// Remove the bypass header to comply with the CORS preflight check.
|
|
164
|
+
delete cleanRequestHeaders[bypassHeaderName]
|
|
165
|
+
|
|
166
|
+
const originalRequest = new Request(requestClone, {
|
|
167
|
+
headers: new Headers(cleanRequestHeaders),
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
return fetch(originalRequest)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Send the request to the client-side MSW.
|
|
174
|
+
const reqHeaders = serializeHeaders(request.headers)
|
|
175
|
+
const body = await request.text()
|
|
176
|
+
|
|
177
|
+
const clientMessage = await sendToClient(client, {
|
|
178
|
+
type: 'REQUEST',
|
|
179
|
+
payload: {
|
|
180
|
+
id: requestId,
|
|
181
|
+
url: request.url,
|
|
182
|
+
method: request.method,
|
|
183
|
+
headers: reqHeaders,
|
|
184
|
+
cache: request.cache,
|
|
185
|
+
mode: request.mode,
|
|
186
|
+
credentials: request.credentials,
|
|
187
|
+
destination: request.destination,
|
|
188
|
+
integrity: request.integrity,
|
|
189
|
+
redirect: request.redirect,
|
|
190
|
+
referrer: request.referrer,
|
|
191
|
+
referrerPolicy: request.referrerPolicy,
|
|
192
|
+
body,
|
|
193
|
+
bodyUsed: request.bodyUsed,
|
|
194
|
+
keepalive: request.keepalive,
|
|
195
|
+
},
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
switch (clientMessage.type) {
|
|
199
|
+
case 'MOCK_SUCCESS': {
|
|
200
|
+
return delayPromise(
|
|
201
|
+
() => respondWithMock(clientMessage),
|
|
202
|
+
clientMessage.payload.delay,
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
case 'MOCK_NOT_FOUND': {
|
|
207
|
+
return getOriginalResponse()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
case 'NETWORK_ERROR': {
|
|
211
|
+
const { name, message } = clientMessage.payload
|
|
212
|
+
const networkError = new Error(message)
|
|
213
|
+
networkError.name = name
|
|
214
|
+
|
|
215
|
+
// Rejecting a request Promise emulates a network error.
|
|
216
|
+
throw networkError
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
case 'INTERNAL_ERROR': {
|
|
220
|
+
const parsedBody = JSON.parse(clientMessage.payload.body)
|
|
221
|
+
|
|
222
|
+
console.error(
|
|
223
|
+
`\
|
|
224
|
+
[MSW] Uncaught exception in the request handler for "%s %s":
|
|
225
|
+
|
|
226
|
+
${parsedBody.location}
|
|
227
|
+
|
|
228
|
+
This exception has been gracefully handled as a 500 response, however, it's strongly recommended to resolve this error, as it indicates a mistake in your code. If you wish to mock an error response, please see this guide: https://mswjs.io/docs/recipes/mocking-error-responses\
|
|
229
|
+
`,
|
|
230
|
+
request.method,
|
|
231
|
+
request.url,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
return respondWithMock(clientMessage)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return getOriginalResponse()
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
self.addEventListener('fetch', function (event) {
|
|
242
|
+
const { request } = event
|
|
243
|
+
const accept = request.headers.get('accept') || ''
|
|
244
|
+
|
|
245
|
+
// Bypass server-sent events.
|
|
246
|
+
if (accept.includes('text/event-stream')) {
|
|
247
|
+
return
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Bypass navigation requests.
|
|
251
|
+
if (request.mode === 'navigate') {
|
|
252
|
+
return
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Opening the DevTools triggers the "only-if-cached" request
|
|
256
|
+
// that cannot be handled by the worker. Bypass such requests.
|
|
257
|
+
if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
|
|
258
|
+
return
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Bypass all requests when there are no active clients.
|
|
262
|
+
// Prevents the self-unregistered worked from handling requests
|
|
263
|
+
// after it's been deleted (still remains active until the next reload).
|
|
264
|
+
if (activeClientIds.size === 0) {
|
|
265
|
+
return
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const requestId = uuidv4()
|
|
269
|
+
|
|
270
|
+
return event.respondWith(
|
|
271
|
+
handleRequest(event, requestId).catch((error) => {
|
|
272
|
+
if (error.name === 'NetworkError') {
|
|
273
|
+
console.warn(
|
|
274
|
+
'[MSW] Successfully emulated a network error for the "%s %s" request.',
|
|
275
|
+
request.method,
|
|
276
|
+
request.url,
|
|
277
|
+
)
|
|
278
|
+
return
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// At this point, any exception indicates an issue with the original request/response.
|
|
282
|
+
console.error(
|
|
283
|
+
`\
|
|
284
|
+
[MSW] Caught an exception from the "%s %s" request (%s). This is probably not a problem with Mock Service Worker. There is likely an additional logging output above.`,
|
|
285
|
+
request.method,
|
|
286
|
+
request.url,
|
|
287
|
+
`${error.name}: ${error.message}`,
|
|
288
|
+
)
|
|
289
|
+
}),
|
|
290
|
+
)
|
|
291
|
+
})
|
|
292
|
+
|
|
293
|
+
function serializeHeaders(headers) {
|
|
294
|
+
const reqHeaders = {}
|
|
295
|
+
headers.forEach((value, name) => {
|
|
296
|
+
reqHeaders[name] = reqHeaders[name]
|
|
297
|
+
? [].concat(reqHeaders[name]).concat(value)
|
|
298
|
+
: value
|
|
299
|
+
})
|
|
300
|
+
return reqHeaders
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function sendToClient(client, message) {
|
|
304
|
+
return new Promise((resolve, reject) => {
|
|
305
|
+
const channel = new MessageChannel()
|
|
306
|
+
|
|
307
|
+
channel.port1.onmessage = (event) => {
|
|
308
|
+
if (event.data && event.data.error) {
|
|
309
|
+
return reject(event.data.error)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
resolve(event.data)
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
client.postMessage(JSON.stringify(message), [channel.port2])
|
|
316
|
+
})
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function delayPromise(cb, duration) {
|
|
320
|
+
return new Promise((resolve) => {
|
|
321
|
+
setTimeout(() => resolve(cb()), duration)
|
|
322
|
+
})
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function respondWithMock(clientMessage) {
|
|
326
|
+
return new Response(clientMessage.payload.body, {
|
|
327
|
+
...clientMessage.payload,
|
|
328
|
+
headers: clientMessage.payload.headers,
|
|
329
|
+
})
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function uuidv4() {
|
|
333
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
334
|
+
const r = (Math.random() * 16) | 0
|
|
335
|
+
const v = c == 'x' ? r : (r & 0x3) | 0x8
|
|
336
|
+
return v.toString(16)
|
|
337
|
+
})
|
|
338
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|