@everymatrix/user-login 1.56.3 → 1.58.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.
Files changed (20) hide show
  1. package/dist/cjs/user-login.cjs.entry.js +1 -1
  2. package/dist/collection/components/user-login/user-login.stories.js +78 -0
  3. package/dist/esm/user-login.entry.js +1 -1
  4. package/dist/storybook/main.js +47 -0
  5. package/dist/storybook/preview.js +9 -0
  6. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  7. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +2 -0
  8. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +2 -0
  9. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/main.d.ts +3 -0
  10. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/preview.d.ts +70 -0
  11. package/dist/types/components/user-login/user-login.stories.d.ts +5 -0
  12. package/dist/user-login/{p-ae8e5f4e.entry.js → p-471e64ab.entry.js} +1 -1
  13. package/dist/user-login/user-login.esm.js +1 -1
  14. package/package.json +1 -1
  15. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +0 -2
  16. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +0 -2
  17. /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/index.d.ts +0 -0
  18. /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  19. /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  20. /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -279,7 +279,7 @@ function setStreamStyling(stylingContainer, domain, subscription) {
279
279
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
280
280
  */
281
281
 
282
- function defineCustomElement(CustomElement, version = '24.5.10') {
282
+ function defineCustomElement(CustomElement, version = '24.5.11') {
283
283
  Object.defineProperty(CustomElement, 'version', {
284
284
  get() {
285
285
  return version;
@@ -0,0 +1,78 @@
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 `<user-login
44
+ endpoint="${args.endpoint}"
45
+ lang="${args.lang}"
46
+ clientStyling="${args.clientStyling}"
47
+ clientStylingUrl="${args.clientStylingUrl}"
48
+ translationUrl="${args.translationUrl}"
49
+ passwordReset="${args.passwordReset}"
50
+ userEmailRegex="${args.userEmailRegex}"
51
+ userEmailRegexOptions="${args.userEmailRegexOptions}"
52
+ userPhoneRegex="${args.userPhoneRegex}"
53
+ userPhoneRegexOptions="${args.userPhoneRegexOptions}"
54
+ passwordRegex="${args.passwordRegex}"
55
+ passwordRegexOptions="${args.passwordRegexOptions}"
56
+ version="${args.version}"
57
+ loginByPhoneNumber="${args.loginByPhoneNumber}"
58
+ mbSource="${args.mbSource}"
59
+ ></user-login>`;
60
+ };
61
+ export const Default = Template.bind({});
62
+ Default.args = {
63
+ endpoint: "",
64
+ lang: "en",
65
+ clientStyling: "",
66
+ clientStylingUrl: "",
67
+ translationUrl: "",
68
+ passwordReset: "false",
69
+ userEmailRegex: "",
70
+ userEmailRegexOptions: "i",
71
+ userPhoneRegex: "",
72
+ userPhoneRegexOptions: "",
73
+ passwordRegex: "",
74
+ passwordRegexOptions: "",
75
+ version: "gm16",
76
+ loginByPhoneNumber: "false",
77
+ mbSource: "",
78
+ };
@@ -275,7 +275,7 @@ function setStreamStyling(stylingContainer, domain, subscription) {
275
275
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
276
276
  */
277
277
 
278
- function defineCustomElement(CustomElement, version = '24.5.10') {
278
+ function defineCustomElement(CustomElement, version = '24.5.11') {
279
279
  Object.defineProperty(CustomElement, 'version', {
280
280
  get() {
281
281
  return version;
@@ -0,0 +1,47 @@
1
+ import path from "path";
2
+ import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
3
+ const config = {
4
+ stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
5
+ addons: [
6
+ '@storybook/addon-essentials',
7
+ '@storybook/addon-interactions',
8
+ 'storybook-dark-mode'
9
+ ],
10
+ docs: {
11
+ defaultName: 'Documentation',
12
+ autodocs: 'tag'
13
+ },
14
+ framework: {
15
+ name: '@storybook/web-components-vite',
16
+ options: {}
17
+ },
18
+ // Async viteFinal to build dependent packages before finalizing configuration.
19
+ viteFinal: async (config) => {
20
+ const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
21
+ const usedPackages = detectUsedPackages(storyFiles);
22
+ const buildPromises = usedPackages.map(async (pkg) => {
23
+ try {
24
+ console.log(`Building package ${pkg}...`);
25
+ const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
26
+ console.log(`Built package ${pkg}: ${stdout}`);
27
+ if (stderr) {
28
+ console.error(`Build warning/error for package ${pkg}: ${stderr}`);
29
+ }
30
+ }
31
+ catch (error) {
32
+ console.error(`Error building package ${pkg}:`, error);
33
+ }
34
+ });
35
+ await Promise.all(buildPromises);
36
+ const parsedPaths = parseTsConfig() || {};
37
+ const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
38
+ return Object.assign(Object.assign({}, config), { resolve: {
39
+ alias: Object.assign({}, filteredParsedPaths)
40
+ }, define: {
41
+ process: {
42
+ env: {}
43
+ }
44
+ } });
45
+ }
46
+ };
47
+ export default config;
@@ -0,0 +1,9 @@
1
+ import { themes } from "@storybook/theming";
2
+ export const parameters = {
3
+ darkMode: {
4
+ dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
5
+ light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
6
+ current: 'light',
7
+ stylePreview: true
8
+ }
9
+ };
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { exec as execCallback } from 'child_process';
3
+ export declare const exec: typeof execCallback.__promisify__;
4
+ /**
5
+ * Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
6
+ * @param dir The directory to search.
7
+ * @returns Array of story file paths.
8
+ */
9
+ export declare const getStoryFiles: (dir: string) => string[];
10
+ /**
11
+ * Detects which internal packages are used in the provided story files.
12
+ * It looks at every import that starts with the given package alias prefix,
13
+ * then extracts the package name (the segment immediately following the prefix).
14
+ *
15
+ * @param stories Array of story file paths.
16
+ * @returns Array of unique package names (e.g. ['foo', 'bar']).
17
+ */
18
+ export declare const detectUsedPackages: (stories: string[]) => string[];
19
+ /**
20
+ * Extracts all import paths from a file using the TypeScript compiler API.
21
+ * @param filePath The file path to parse.
22
+ * @returns Array of import strings.
23
+ */
24
+ export declare const extractImports: (filePath: string) => string[];
25
+ /**
26
+ * Parses the tsconfig paths and resolves them to absolute paths.
27
+ * @param tsconfigPath The path to the tsconfig file.
28
+ * @returns An object mapping alias keys to absolute paths.
29
+ */
30
+ export declare const parseTsConfig: () => Record<string, string> | null;
31
+ /**
32
+ * Filters the parsed tsconfig alias mapping to only include keys that correspond
33
+ * to the used packages.
34
+ *
35
+ * @param parsedPaths The full alias mapping from tsconfig.
36
+ * @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
37
+ * @returns Filtered alias mapping.
38
+ */
39
+ export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/web-components-vite';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1,70 @@
1
+ export declare const parameters: {
2
+ darkMode: {
3
+ dark: {
4
+ appBg: string;
5
+ base: "light" | "dark";
6
+ colorPrimary: string;
7
+ colorSecondary: string;
8
+ appContentBg: string;
9
+ appPreviewBg: string;
10
+ appBorderColor: string;
11
+ appBorderRadius: number;
12
+ fontBase: string;
13
+ fontCode: string;
14
+ textColor: string;
15
+ textInverseColor: string;
16
+ textMutedColor: string;
17
+ barTextColor: string;
18
+ barHoverColor: string;
19
+ barSelectedColor: string;
20
+ barBg: string;
21
+ buttonBg: string;
22
+ buttonBorder: string;
23
+ booleanBg: string;
24
+ booleanSelectedBg: string;
25
+ inputBg: string;
26
+ inputBorder: string;
27
+ inputTextColor: string;
28
+ inputBorderRadius: number;
29
+ brandTitle?: string;
30
+ brandUrl?: string;
31
+ brandImage?: string;
32
+ brandTarget?: string;
33
+ gridCellSize?: number;
34
+ };
35
+ light: {
36
+ appBg: string;
37
+ base: "light" | "dark";
38
+ colorPrimary: string;
39
+ colorSecondary: string;
40
+ appContentBg: string;
41
+ appPreviewBg: string;
42
+ appBorderColor: string;
43
+ appBorderRadius: number;
44
+ fontBase: string;
45
+ fontCode: string;
46
+ textColor: string;
47
+ textInverseColor: string;
48
+ textMutedColor: string;
49
+ barTextColor: string;
50
+ barHoverColor: string;
51
+ barSelectedColor: string;
52
+ barBg: string;
53
+ buttonBg: string;
54
+ buttonBorder: string;
55
+ booleanBg: string;
56
+ booleanSelectedBg: string;
57
+ inputBg: string;
58
+ inputBorder: string;
59
+ inputTextColor: string;
60
+ inputBorderRadius: number;
61
+ brandTitle?: string;
62
+ brandUrl?: string;
63
+ brandImage?: string;
64
+ brandTarget?: string;
65
+ gridCellSize?: number;
66
+ };
67
+ current: string;
68
+ stylePreview: boolean;
69
+ };
70
+ };
@@ -0,0 +1,5 @@
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;
@@ -4,7 +4,7 @@ import{r as t,h as e}from"./p-8cb697c3.js";const i={en:{invalidField:"This field
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
5
5
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
6
  */
7
- function a(t,e="24.5.10"){Object.defineProperty(t,"version",{get:()=>e});const i=customElements.get(t.is);if(i){const e=i.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
7
+ function a(t,e="24.5.11"){Object.defineProperty(t,"version",{get:()=>e});const i=customElements.get(t.is);if(i){const e=i.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
8
8
  /**
9
9
  * @license
10
10
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -1 +1 @@
1
- import{p as e,b as r}from"./p-8cb697c3.js";export{s as setNonce}from"./p-8cb697c3.js";import{g as n}from"./p-e1255160.js";(()=>{const s=import.meta.url,r={};return""!==s&&(r.resourcesUrl=new URL(".",s).href),e(r)})().then((async e=>(await n(),r([["p-ae8e5f4e",[[1,"user-login",{endpoint:[513],lang:[1537],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],passwordReset:[513,"password-reset"],userEmailRegex:[513,"user-email-regex"],userEmailRegexOptions:[513,"user-email-regex-options"],userPhoneRegex:[513,"user-phone-regex"],userPhoneRegexOptions:[513,"user-phone-regex-options"],passwordRegex:[513,"password-regex"],passwordRegexOptions:[513,"password-regex-options"],version:[513],loginByPhoneNumber:[513,"login-by-phone-number"],mbSource:[513,"mb-source"],userNameEmail:[32],userPassword:[32],isValidUserEmail:[32],userPhone:[32],userPrefix:[32],isValidPassword:[32],isValidUserPhone:[32],isPasswordVisible:[32],errorMessage:[32],hasError:[32],userPrefixOptions:[32],isLoginLoading:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],e))));
1
+ import{p as e,b as r}from"./p-8cb697c3.js";export{s as setNonce}from"./p-8cb697c3.js";import{g as n}from"./p-e1255160.js";(()=>{const s=import.meta.url,r={};return""!==s&&(r.resourcesUrl=new URL(".",s).href),e(r)})().then((async e=>(await n(),r([["p-471e64ab",[[1,"user-login",{endpoint:[513],lang:[1537],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],passwordReset:[513,"password-reset"],userEmailRegex:[513,"user-email-regex"],userEmailRegexOptions:[513,"user-email-regex-options"],userPhoneRegex:[513,"user-phone-regex"],userPhoneRegexOptions:[513,"user-phone-regex-options"],passwordRegex:[513,"password-regex"],passwordRegexOptions:[513,"password-regex-options"],version:[513],loginByPhoneNumber:[513,"login-by-phone-number"],mbSource:[513,"mb-source"],userNameEmail:[32],userPassword:[32],isValidUserEmail:[32],userPhone:[32],userPrefix:[32],isValidPassword:[32],isValidUserPhone:[32],isPasswordVisible:[32],errorMessage:[32],hasError:[32],userPrefixOptions:[32],isLoginLoading:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-login",
3
- "version": "1.56.3",
3
+ "version": "1.58.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;