@everymatrix/user-login 1.73.1 → 1.74.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-login",
3
- "version": "1.73.1",
3
+ "version": "1.74.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,95 +0,0 @@
1
- import { html } from "lit";
2
- import "@everymatrix/user-login";
3
- const meta = {
4
- title: 'User/Components/user-login',
5
- component: 'user-login',
6
- args: {
7
- endpoint: "",
8
- lang: "en",
9
- clientStyling: "",
10
- clientStylingUrl: "",
11
- translationUrl: "",
12
- passwordReset: "false",
13
- userEmailRegex: "",
14
- userEmailRegexOptions: "i",
15
- userPhoneRegex: "",
16
- userPhoneRegexOptions: "",
17
- passwordRegex: "",
18
- passwordRegexOptions: "",
19
- version: "gm16",
20
- loginByPhoneNumber: "false",
21
- mbSource: "",
22
- },
23
- argTypes: {
24
- endpoint: { control: 'text', description: '' },
25
- lang: { control: 'text', description: '' },
26
- clientStyling: { control: 'text', description: '' },
27
- clientStylingUrl: { control: 'text', description: '' },
28
- translationUrl: { control: 'text', description: '' },
29
- passwordReset: { control: 'text', description: '' },
30
- userEmailRegex: { control: 'text', description: '' },
31
- userEmailRegexOptions: { control: 'text', description: '' },
32
- userPhoneRegex: { control: 'text', description: '' },
33
- userPhoneRegexOptions: { control: 'text', description: '' },
34
- passwordRegex: { control: 'text', description: '' },
35
- passwordRegexOptions: { control: 'text', description: '' },
36
- version: { control: 'text', description: '' },
37
- loginByPhoneNumber: { control: 'text', description: '' },
38
- mbSource: { control: 'text', description: '' },
39
- },
40
- };
41
- export default meta;
42
- const Template = (args) => {
43
- return html `
44
- <user-login
45
- endpoint="${args.endpoint}"
46
- lang="${args.lang}"
47
- client-styling="${args.clientStyling}"
48
- client-styling-url="${args.clientStylingUrl}"
49
- translation-url="${args.translationUrl}"
50
- password-reset="${args.passwordReset}"
51
- user-email-regex="${args.userEmailRegex}"
52
- user-email-regex-options="${args.userEmailRegexOptions}"
53
- user-phone-regex="${args.userPhoneRegex}"
54
- user-phone-regex-options="${args.userPhoneRegexOptions}"
55
- password-regex="${args.passwordRegex}"
56
- password-regex-options="${args.passwordRegexOptions}"
57
- version="${args.version}"
58
- login-by-phone-number="${args.loginByPhoneNumber}"
59
- mb-source="${args.mbSource}"
60
- ></user-login>
61
- <!-- Placeholder to display the User Session ID -->
62
- <div id="session-id-container" style="margin-top: 16px; font-family: sans-serif;">
63
- <strong>User Session ID:</strong> <span id="user-session-id">Waiting for session ID...</span>
64
- </div>
65
- `;
66
- };
67
- export const Default = Template.bind({});
68
- Default.args = {
69
- endpoint: "",
70
- lang: "en",
71
- clientStyling: "",
72
- clientStylingUrl: "",
73
- translationUrl: "",
74
- passwordReset: "false",
75
- userEmailRegex: "",
76
- userEmailRegexOptions: "i",
77
- userPhoneRegex: "",
78
- userPhoneRegexOptions: "",
79
- passwordRegex: "",
80
- passwordRegexOptions: "",
81
- version: "gm16",
82
- loginByPhoneNumber: "false",
83
- mbSource: "",
84
- };
85
- if (typeof window !== 'undefined') {
86
- window.addEventListener('message', (event) => {
87
- var _a;
88
- if (((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) === 'UserSessionID') {
89
- const sessionSpan = document.getElementById('user-session-id');
90
- if (sessionSpan) {
91
- sessionSpan.textContent = event.data.session || 'No session ID provided';
92
- }
93
- }
94
- });
95
- }
@@ -1,5 +0,0 @@
1
- import type { Meta } from '@storybook/web-components';
2
- import '@everymatrix/user-login';
3
- declare const meta: Meta;
4
- export default meta;
5
- export declare const Default: any;