@everymatrix/player-email-verification 1.0.16 → 1.0.70

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/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/player-email-verification.js';
Binary file
package/public/reset.css DELETED
@@ -1,48 +0,0 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- v2.0 | 20110126
3
- License: none (public domain)
4
- */
5
-
6
- html, body, div, span, applet, object, iframe,
7
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8
- a, abbr, acronym, address, big, cite, code,
9
- del, dfn, em, img, ins, kbd, q, s, samp,
10
- small, strike, strong, sub, sup, tt, var,
11
- b, u, i, center,
12
- dl, dt, dd, ol, ul, li,
13
- fieldset, form, label, legend,
14
- table, caption, tbody, tfoot, thead, tr, th, td,
15
- article, aside, canvas, details, embed,
16
- figure, figcaption, footer, header, hgroup,
17
- menu, nav, output, ruby, section, summary,
18
- time, mark, audio, video {
19
- margin: 0;
20
- padding: 0;
21
- border: 0;
22
- font-size: 100%;
23
- font: inherit;
24
- vertical-align: baseline;
25
- }
26
- /* HTML5 display-role reset for older browsers */
27
- article, aside, details, figcaption, figure,
28
- footer, header, hgroup, menu, nav, section {
29
- display: block;
30
- }
31
- body {
32
- line-height: 1;
33
- }
34
- ol, ul {
35
- list-style: none;
36
- }
37
- blockquote, q {
38
- quotes: none;
39
- }
40
- blockquote:before, blockquote:after,
41
- q:before, q:after {
42
- content: '';
43
- content: none;
44
- }
45
- table {
46
- border-collapse: collapse;
47
- border-spacing: 0;
48
- }
package/rollup.config.js DELETED
@@ -1,59 +0,0 @@
1
- import svelte from 'rollup-plugin-svelte';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import resolve from '@rollup/plugin-node-resolve';
4
- import serve from 'rollup-plugin-dev-server';
5
- import livereload from 'rollup-plugin-livereload';
6
- import { terser } from 'rollup-plugin-terser';
7
- import sveltePreprocess from 'svelte-preprocess';
8
- import typescript from '@rollup/plugin-typescript';
9
- const production = process.env.NODE_ENV === 'production';
10
- const dev = process.env.NODE_ENV === 'development';
11
-
12
- export default {
13
- input: 'src/index.ts',
14
- output: {
15
- sourcemap: true,
16
- format: 'umd',
17
- name: 'app',
18
- file: 'dist/player-email-verification.js'
19
- },
20
- plugins: [
21
- svelte({
22
- preprocess: sveltePreprocess(),
23
- compilerOptions: {
24
- // enable run-time checks when not in production
25
- customElement: true,
26
- dev: !production
27
- }
28
- }),
29
- commonjs(),
30
- resolve({
31
- browser: true,
32
- dedupe: ['svelte']
33
- }),
34
- dev && serve({
35
- open: true,
36
- verbose: true,
37
- allowCrossOrigin: true,
38
- historyApiFallback: false,
39
- host: 'localhost',
40
- port: 5050,
41
- }),
42
- dev && livereload({ watch: ['', 'dist'] }),
43
- typescript({
44
- sourceMap: !production,
45
- inlineSources: !production,
46
- }),
47
- // If we're building for production (npm run build
48
- // instead of npm run dev), minify
49
- production &&
50
- terser({
51
- output: {
52
- comments: "all"
53
- },
54
- })
55
- ],
56
- watch: {
57
- clearScreen: false
58
- }
59
- };
@@ -1,70 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- export let endpoint:string = '';
5
- export let key:string = '';
6
-
7
- const sendKey = ():void => {
8
- let url:URL = new URL(`${endpoint}/player/activatePlayerByHashKey`);
9
-
10
- let requestBody = {
11
- hashKey: key
12
- };
13
-
14
- let options = {
15
- method: 'POST',
16
- headers: {
17
- 'Content-Type': "application/json",
18
- 'Accept': 'application/json',
19
- },
20
- body: JSON.stringify(requestBody),
21
- };
22
-
23
- fetch(url.href, options)
24
- .then((res:any) => {
25
- if (res.status > 500) {
26
- window.postMessage({ type: 'ActivatePlayerResponseFailed' }, window.location.href);
27
- window.postMessage({ type: 'WidgetNotification', data: {
28
- type: 'error',
29
- message: 'Server unavailable'
30
- }}, window.location.href);
31
- }
32
- return res.json();
33
- })
34
- .then((data:any) => {
35
- let message;
36
-
37
- window.postMessage({ type: 'ActivatePlayerResponse', data }, window.location.href);
38
-
39
- if (data.error) {
40
- // Parsing GMCore message 'cuz it's stupid and it doesn't know how to send error messages in 2021 ffs
41
- // LE: Yea, I'm adding this here too :) I won't let anyone forget that GMCore doesn't know how to send an error over the API, in 2022!!!
42
- message = data.error.substring(data.error.indexOf('errorMessage') + 13, data.error.length);
43
- message = message.substring(0, message.indexOf('errorCode'));
44
-
45
- window.postMessage({ type: 'WidgetNotification', data: {
46
- type: 'error',
47
- message: 'Sorry! Your e-mail could not be verified. Please try again.'
48
- }}, window.location.href);
49
- window.postMessage({ type: 'WidgetNotification', data: {
50
- type: 'info',
51
- message
52
- }}, window.location.href);
53
- }
54
-
55
- if (data.SESSION_ID) {
56
- window.postMessage({ type: 'WidgetNotification', data: {
57
- type: 'success',
58
- message: 'Success! Your e-mail has been successfully verified.'
59
- }}, window.location.href);
60
- }
61
- });
62
- }
63
-
64
- $: endpoint && key && sendKey();
65
- </script>
66
-
67
- <div></div>
68
-
69
- <style lang="scss">
70
- </style>
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import PlayerEmailVerification from './PlayerEmailVerification.svelte';
2
-
3
- !customElements.get('player-email-verification') && customElements.define('player-email-verification', PlayerEmailVerification);
4
- export default PlayerEmailVerification;
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import PlayerEmailVerification from '../src/PlayerEmailVerification';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'PlayerEmailVerification',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const PlayerEmailVerification = ({ aProperty }) => html`<player-email-verification></player-email-verification>`;
12
-
13
- export const FirstStory = PlayerEmailVerification.bind({});
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "@tsconfig/svelte/tsconfig.json",
3
-
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
6
- }