@everymatrix/pam-login 0.0.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.
Files changed (56) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-c5001c3e.js +1227 -0
  3. package/dist/cjs/index.cjs.js +10 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/pam-login-45f1f99f.js +22332 -0
  6. package/dist/cjs/pam-login.cjs.js +25 -0
  7. package/dist/cjs/pam-login_2.cjs.entry.js +175 -0
  8. package/dist/collection/collection-manifest.json +19 -0
  9. package/dist/collection/components/pam-login/index.js +1 -0
  10. package/dist/collection/components/pam-login/pam-login.css +206 -0
  11. package/dist/collection/components/pam-login/pam-login.js +723 -0
  12. package/dist/collection/index.js +1 -0
  13. package/dist/collection/utils/locale.utils.js +271 -0
  14. package/dist/collection/utils/types.js +1 -0
  15. package/dist/esm/app-globals-0f993ce5.js +3 -0
  16. package/dist/esm/index-a126c540.js +1200 -0
  17. package/dist/esm/index.js +2 -0
  18. package/dist/esm/loader.js +11 -0
  19. package/dist/esm/pam-login-f43d7eb6.js +22330 -0
  20. package/dist/esm/pam-login.js +20 -0
  21. package/dist/esm/pam-login_2.entry.js +170 -0
  22. package/dist/index.cjs.js +1 -0
  23. package/dist/index.js +1 -0
  24. package/dist/pam-login/index.esm.js +1 -0
  25. package/dist/pam-login/p-83cb37b3.js +2 -0
  26. package/dist/pam-login/p-c6405762.js +2655 -0
  27. package/dist/pam-login/p-e1255160.js +1 -0
  28. package/dist/pam-login/p-e23846e0.entry.js +1 -0
  29. package/dist/pam-login/pam-login.esm.js +1 -0
  30. package/dist/stencil.config.dev.js +19 -0
  31. package/dist/stencil.config.js +18 -0
  32. package/dist/storybook/main.js +43 -0
  33. package/dist/storybook/preview.js +9 -0
  34. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  35. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/packages/stencil/pam-login/stencil.config.d.ts +2 -0
  36. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/packages/stencil/pam-login/stencil.config.dev.d.ts +2 -0
  37. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/packages/stencil/pam-login/storybook/main.d.ts +3 -0
  38. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/packages/stencil/pam-login/storybook/preview.d.ts +70 -0
  39. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/tools/plugins/index.d.ts +3 -0
  40. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  41. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  42. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/pam-login/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  43. package/dist/types/components/pam-login/index.d.ts +1 -0
  44. package/dist/types/components/pam-login/pam-login.d.ts +200 -0
  45. package/dist/types/components.d.ts +149 -0
  46. package/dist/types/index.d.ts +1 -0
  47. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  48. package/dist/types/utils/locale.utils.d.ts +2 -0
  49. package/dist/types/utils/types.d.ts +6 -0
  50. package/loader/cdn.js +1 -0
  51. package/loader/index.cjs.js +1 -0
  52. package/loader/index.d.ts +24 -0
  53. package/loader/index.es2017.js +1 -0
  54. package/loader/index.js +2 -0
  55. package/loader/package.json +11 -0
  56. package/package.json +26 -0
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1 @@
1
+ export{P as pam_login}from"./p-c6405762.js";import{r as e,h as t,H as n}from"./p-83cb37b3.js";const o=class{constructor(t){e(this,t),this.structure=void 0,this.width=void 0,this.height=void 0,this.borderRadius=void 0,this.marginBottom=void 0,this.marginTop=void 0,this.marginLeft=void 0,this.marginRight=void 0,this.animation=!0,this.rows=void 0,this.size=void 0,this.color=void 0,this.primaryColor=void 0,this.secondaryColor=void 0}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.width};\n --emw-skeleton-logo-height: ${this.height};\n --emw-skeleton-logo-border-radius: ${this.borderRadius}px;\n --emw-skeleton-logo-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-logo-margin-top: ${this.marginTop}px;\n --emw-skeleton-logo-margin-left: ${this.marginLeft}px;\n --emw-skeleton-logo-margin-right: ${this.marginRight}px;\n --emw-skeleton-logo-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.width};\n --emw-skeleton-image-height: ${this.height};\n --emw-skeleton-image-border-radius: ${this.borderRadius}px;\n --emw-skeleton-image-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-image-margin-top: ${this.marginTop}px;\n --emw-skeleton-image-margin-left: ${this.marginLeft}px;\n --emw-skeleton-image-margin-right: ${this.marginRight}px;\n --emw-skeleton-image-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.width};\n --emw-skeleton-title-height: ${this.height};\n --emw-skeleton-title-border-radius: ${this.borderRadius}px;\n --emw-skeleton-title-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-title-margin-top: ${this.marginTop}px;\n --emw-skeleton-title-margin-left: ${this.marginLeft}px;\n --emw-skeleton-title-margin-right: ${this.marginRight}px;\n --emw-skeleton-title-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.width};\n --emw-skeleton-text-height: ${this.height};\n --emw-skeleton-text-border-radius: ${this.borderRadius}px;\n --emw-skeleton-text-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-text-margin-top: ${this.marginTop}px;\n --emw-skeleton-text-margin-left: ${this.marginLeft}px;\n --emw-skeleton-text-margin-right: ${this.marginRight}px;\n --emw-skeleton-text-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.width};\n --emw-skeleton-rectangle-height: ${this.height};\n --emw-skeleton-rectangle-border-radius: ${this.borderRadius}px;\n --emw-skeleton-rectangle-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-rectangle-margin-top: ${this.marginTop}px;\n --emw-skeleton-rectangle-margin-left: ${this.marginLeft}px;\n --emw-skeleton-rectangle-margin-right: ${this.marginRight}px;\n --emw-skeleton-rectangle-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.size};\n --emw-skeleton-circle-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;default:e=""}return t(n,{key:"3bb792a149db7fe732d5cbfa092cdb4d6ca0689e"},t("style",{key:"a4607599b60659f385ae2660513e38b383739674"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};o.style=":host{display:block;--emw-skeleton-rectangle-background:#c2c2c2;--emw-skeleton-circle-background:#c2c2c2;--emw-skeleton-text-background:#c2c2c2;--emw-skeleton-title-background:#c2c2c2;--emw-skeleton-image-background:#c2c2c2;--emw-skeleton-logo-background:#c2c2c2;--emw-skeleton-primary-color:#e0e0e0;--emw-skeleton-secondary-color:#f0f0f0}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 2px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, inherit)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";export{o as ui_skeleton}
@@ -0,0 +1 @@
1
+ import{p as e,b as r}from"./p-83cb37b3.js";export{s as setNonce}from"./p-83cb37b3.js";import{g as n}from"./p-e1255160.js";(()=>{const r=import.meta.url,n={};return""!==r&&(n.resourcesUrl=new URL(".",r).href),e(n)})().then((async e=>(await n(),r([["p-e23846e0",[[1,"pam-login",{endpoint:[513],lang:[1537],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],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"],loginByPhoneNumber:[513,"login-by-phone-number"],isLoading:[32],contactValue:[32],passwordValue:[32],prefixValue:[32],prefixOptions:[32],isContactValid:[32],isPasswordValid:[32],isPasswordVisible:[32],apiErrorMessage:[32],captchaData:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[2,"border-radius"],marginBottom:[2,"margin-bottom"],marginTop:[2,"margin-top"],marginLeft:[2,"margin-left"],marginRight:[2,"margin-right"],animation:[4],rows:[2],size:[1],color:[1],primaryColor:[1,"primary-color"],secondaryColor:[1,"secondary-color"]},null,{structure:["handleStructureChange"]}]]]],e))));
@@ -0,0 +1,19 @@
1
+ import { sass } from "@stencil/sass";
2
+ export const config = {
3
+ namespace: 'pam-login',
4
+ taskQueue: 'async',
5
+ sourceMap: false,
6
+ minifyJs: true,
7
+ extras: {
8
+ experimentalImportInjection: true
9
+ },
10
+ plugins: [sass()],
11
+ outputTargets: [
12
+ {
13
+ type: 'www'
14
+ },
15
+ {
16
+ type: 'docs-readme'
17
+ }
18
+ ]
19
+ };
@@ -0,0 +1,18 @@
1
+ import { cleanPackageJsonStencil } from "../../../tools/plugins";
2
+ import { sass } from "@stencil/sass";
3
+ export const config = {
4
+ namespace: 'pam-login',
5
+ taskQueue: 'async',
6
+ sourceMap: false,
7
+ minifyJs: true,
8
+ extras: {
9
+ experimentalImportInjection: true
10
+ },
11
+ plugins: [cleanPackageJsonStencil(), sass()],
12
+ outputTargets: [
13
+ {
14
+ type: 'dist',
15
+ esmLoaderPath: '../loader'
16
+ }
17
+ ]
18
+ };
@@ -0,0 +1,43 @@
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: ['@storybook/addon-essentials', '@storybook/addon-interactions', 'storybook-dark-mode'],
6
+ docs: {
7
+ defaultName: 'Documentation',
8
+ autodocs: 'tag'
9
+ },
10
+ framework: {
11
+ name: '@storybook/web-components-vite',
12
+ options: {}
13
+ },
14
+ // Async viteFinal to build dependent packages before finalizing configuration.
15
+ viteFinal: async (config) => {
16
+ const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
17
+ const usedPackages = detectUsedPackages(storyFiles);
18
+ const buildPromises = usedPackages.map(async (pkg) => {
19
+ try {
20
+ console.log(`Building package ${pkg}...`);
21
+ const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
22
+ console.log(`Built package ${pkg}: ${stdout}`);
23
+ if (stderr) {
24
+ console.error(`Build warning/error for package ${pkg}: ${stderr}`);
25
+ }
26
+ }
27
+ catch (error) {
28
+ console.error(`Error building package ${pkg}:`, error);
29
+ }
30
+ });
31
+ await Promise.all(buildPromises);
32
+ const parsedPaths = parseTsConfig() || {};
33
+ const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
34
+ return Object.assign(Object.assign({}, config), { resolve: {
35
+ alias: Object.assign({}, filteredParsedPaths)
36
+ }, define: {
37
+ process: {
38
+ env: {}
39
+ }
40
+ } });
41
+ }
42
+ };
43
+ 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,3 @@
1
+ export * from "./vite-chunk-plugin";
2
+ export * from "./stencil-clean-deps-plugin";
3
+ export * from "./vite-clean-deps-plugin";
@@ -0,0 +1,5 @@
1
+ export declare function cleanPackageJsonStencil(): {
2
+ name: string;
3
+ apply: string;
4
+ buildEnd(): void;
5
+ };
@@ -0,0 +1,6 @@
1
+ export declare function viteChunkPlugin(): {
2
+ name: string;
3
+ config(config: any, { command }: {
4
+ command: any;
5
+ }): void;
6
+ };
@@ -0,0 +1,4 @@
1
+ export declare function cleanPackageJsonVite(widgetName: any): {
2
+ name: string;
3
+ closeBundle(): void;
4
+ };
@@ -0,0 +1 @@
1
+ export { PamLogin } from './pam-login';
@@ -0,0 +1,200 @@
1
+ import { CaptchaData } from '../../utils/types';
2
+ import '@vaadin/combo-box';
3
+ import "../../../../../../dist/packages/stencil/ui-skeleton/dist/types/index";
4
+ export declare class PamLogin {
5
+ /**
6
+ * API endpoint URL for login requests
7
+ */
8
+ endpoint: string;
9
+ /**
10
+ * Language code for translations (default is 'en')
11
+ */
12
+ lang: string;
13
+ /**
14
+ * Inline CSS styling provided by the client
15
+ */
16
+ clientStyling: string;
17
+ /**
18
+ * URL to load additional CSS styling
19
+ */
20
+ clientStylingUrl: string;
21
+ /**
22
+ * The source identifier for message bus styling.
23
+ * This is used to apply styles dynamically from a stream.
24
+ */
25
+ mbSource: string;
26
+ /**
27
+ * URL for fetching translations
28
+ */
29
+ translationUrl: string;
30
+ /**
31
+ * Flag indicating whether the password reset feature is enabled
32
+ */
33
+ passwordReset: string;
34
+ /**
35
+ * Regular expression for validating the user email
36
+ */
37
+ userEmailRegex: string;
38
+ /**
39
+ * Regex options for user email validation
40
+ */
41
+ userEmailRegexOptions: string;
42
+ /**
43
+ * User phone regex
44
+ */
45
+ userPhoneRegex: string;
46
+ /**
47
+ * User phone regex options
48
+ */
49
+ userPhoneRegexOptions: string;
50
+ /**
51
+ * Regular expression for validating the password
52
+ */
53
+ passwordRegex: string;
54
+ /**
55
+ * Regex options for password validation
56
+ */
57
+ passwordRegexOptions: string;
58
+ /**
59
+ * If set to true, login will be done by phone number, else by username/email
60
+ */
61
+ loginByPhoneNumber: string;
62
+ /** Boolean for preventing user for clicking multiple times the login button */
63
+ isLoading: boolean;
64
+ /** User email or username or phone number entered in the form */
65
+ contactValue: string;
66
+ /** Password entered in the form */
67
+ passwordValue: string;
68
+ /** User prefix entered in the form */
69
+ prefixValue: string;
70
+ /** User prefix options for phone number login */
71
+ prefixOptions: Record<string, string>[];
72
+ /** Flag to indicate whether the entered email is valid */
73
+ isContactValid: boolean;
74
+ /** Flag to indicate whether the entered password is valid */
75
+ isPasswordValid: boolean;
76
+ /** Toggles visibility of the password field */
77
+ isPasswordVisible: boolean;
78
+ /** Stores error message from the API */
79
+ apiErrorMessage: string;
80
+ /**
81
+ * Captcha configuration and state.
82
+ * Stores captcha-related data, including its status, token, provider, and site key.
83
+ */
84
+ captchaData: CaptchaData;
85
+ updateLoginCredentialsEvent: CustomEvent;
86
+ private stylingContainer;
87
+ private stylingSubscription;
88
+ /**
89
+ * Watch for changes in the translation URL and fetch new translations
90
+ */
91
+ handleNewTranslations(): void;
92
+ /**
93
+ * Watch for changes in the client styling and apply the new styling
94
+ *
95
+ * @param newValue - new client styling
96
+ * @param oldValue - previous client styling
97
+ */
98
+ handleClientStylingChange(newValue: any, oldValue: any): void;
99
+ /**
100
+ * Watch for changes in the client styling URL and fetch the new CSS
101
+ *
102
+ * @param newValue - new client styling URL
103
+ * @param oldValue - previous client styling URL
104
+ */
105
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
106
+ /**
107
+ * Lifecycle method: Fetch translations on component load
108
+ */
109
+ componentWillLoad(): Promise<void>;
110
+ /**
111
+ * Lifecycle method: Set up event listeners after the component is rendered
112
+ */
113
+ componentDidLoad(): void;
114
+ /**
115
+ * Lifecycle method: Clean up event listeners when the component is removed
116
+ */
117
+ disconnectedCallback(): void;
118
+ /**
119
+ * Fetches the login configuration from the backend API.
120
+ *
121
+ * @returns A Promise that resolves once the configuration is fetched and set.
122
+ */
123
+ getLoginConfig(): Promise<void>;
124
+ /**
125
+ * Handles the integration of CAPTCHA based on the login configuration.
126
+ * Dynamically injects the necessary CAPTCHA script if enabled.
127
+ */
128
+ handleCaptcha(): void;
129
+ /**
130
+ * Common callback function for CAPTCHA response handling.
131
+ * @param token CAPTCHA response token.
132
+ */
133
+ private captchaCallback;
134
+ /**
135
+ * Dynamically loads the Turnstile script and renders CAPTCHA when ready.
136
+ * @param src - The URL of the CAPTCHA script to load.
137
+ * @param captcha - The CAPTCHA configuration.
138
+ */
139
+ appendCaptchaScript(): void;
140
+ /**
141
+ * Fetch phone prefixes from the API
142
+ */
143
+ getPrefixOptions: () => Promise<void>;
144
+ /**
145
+ * Handle autofilling of credentials from a dispatched event
146
+ */
147
+ handleAutofillCredentials: (e: CustomEvent) => void;
148
+ /**
149
+ * Get login token from password-management service
150
+ */
151
+ getLoginToken: () => Promise<string>;
152
+ /**
153
+ * Function to send legislation login request
154
+ */
155
+ loginPlayer: (token: string) => Promise<{
156
+ sessionId: string;
157
+ playerId: string;
158
+ }>;
159
+ /**
160
+ * Send error notification as a post message
161
+ */
162
+ sendErrorNotification(errorMessage: string): void;
163
+ /**
164
+ * Handle login process
165
+ */
166
+ handleLogin: () => void;
167
+ /**
168
+ * Dispatch event to notify about login credential updates
169
+ */
170
+ dispatchUpdateLoginCredentialsEvent(): void;
171
+ /**
172
+ * Handle input changes for username/email and password
173
+ *
174
+ * @param event - input event
175
+ * @param location - 'user' | 'phone' | 'password'
176
+ */
177
+ handleInputChange: (event: Event, location: string) => void;
178
+ handleInputChangePartial: (location: string) => (e: Event) => void;
179
+ /**
180
+ * Validate input based on the specific regex
181
+ *
182
+ * @param useRuleFor - 'user' | 'phone' | 'password'
183
+ * @param input - input value to validate
184
+ */
185
+ validate: (useRuleFor: 'user' | 'phone' | 'password', input: string) => boolean;
186
+ isSubmitDisabled: () => boolean;
187
+ handleSubmit: (e: KeyboardEvent) => void;
188
+ /**
189
+ * Toggle password
190
+ */
191
+ togglePassword: () => void;
192
+ /**
193
+ * Reset password
194
+ */
195
+ resetPassword: () => void;
196
+ /**
197
+ * Render function
198
+ */
199
+ render(): any;
200
+ }
@@ -0,0 +1,149 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ export namespace Components {
9
+ interface PamLogin {
10
+ /**
11
+ * Inline CSS styling provided by the client
12
+ */
13
+ "clientStyling": string;
14
+ /**
15
+ * URL to load additional CSS styling
16
+ */
17
+ "clientStylingUrl": string;
18
+ /**
19
+ * API endpoint URL for login requests
20
+ */
21
+ "endpoint": string;
22
+ /**
23
+ * Language code for translations (default is 'en')
24
+ */
25
+ "lang": string;
26
+ /**
27
+ * If set to true, login will be done by phone number, else by username/email
28
+ */
29
+ "loginByPhoneNumber": string;
30
+ /**
31
+ * The source identifier for message bus styling. This is used to apply styles dynamically from a stream.
32
+ */
33
+ "mbSource": string;
34
+ /**
35
+ * Regular expression for validating the password
36
+ */
37
+ "passwordRegex": string;
38
+ /**
39
+ * Regex options for password validation
40
+ */
41
+ "passwordRegexOptions": string;
42
+ /**
43
+ * Flag indicating whether the password reset feature is enabled
44
+ */
45
+ "passwordReset": string;
46
+ /**
47
+ * URL for fetching translations
48
+ */
49
+ "translationUrl": string;
50
+ /**
51
+ * Regular expression for validating the user email
52
+ */
53
+ "userEmailRegex": string;
54
+ /**
55
+ * Regex options for user email validation
56
+ */
57
+ "userEmailRegexOptions": string;
58
+ /**
59
+ * User phone regex
60
+ */
61
+ "userPhoneRegex": string;
62
+ /**
63
+ * User phone regex options
64
+ */
65
+ "userPhoneRegexOptions": string;
66
+ }
67
+ }
68
+ declare global {
69
+ interface HTMLPamLoginElement extends Components.PamLogin, HTMLStencilElement {
70
+ }
71
+ var HTMLPamLoginElement: {
72
+ prototype: HTMLPamLoginElement;
73
+ new (): HTMLPamLoginElement;
74
+ };
75
+ interface HTMLElementTagNameMap {
76
+ "pam-login": HTMLPamLoginElement;
77
+ }
78
+ }
79
+ declare namespace LocalJSX {
80
+ interface PamLogin {
81
+ /**
82
+ * Inline CSS styling provided by the client
83
+ */
84
+ "clientStyling"?: string;
85
+ /**
86
+ * URL to load additional CSS styling
87
+ */
88
+ "clientStylingUrl"?: string;
89
+ /**
90
+ * API endpoint URL for login requests
91
+ */
92
+ "endpoint"?: string;
93
+ /**
94
+ * Language code for translations (default is 'en')
95
+ */
96
+ "lang"?: string;
97
+ /**
98
+ * If set to true, login will be done by phone number, else by username/email
99
+ */
100
+ "loginByPhoneNumber"?: string;
101
+ /**
102
+ * The source identifier for message bus styling. This is used to apply styles dynamically from a stream.
103
+ */
104
+ "mbSource"?: string;
105
+ /**
106
+ * Regular expression for validating the password
107
+ */
108
+ "passwordRegex"?: string;
109
+ /**
110
+ * Regex options for password validation
111
+ */
112
+ "passwordRegexOptions"?: string;
113
+ /**
114
+ * Flag indicating whether the password reset feature is enabled
115
+ */
116
+ "passwordReset"?: string;
117
+ /**
118
+ * URL for fetching translations
119
+ */
120
+ "translationUrl"?: string;
121
+ /**
122
+ * Regular expression for validating the user email
123
+ */
124
+ "userEmailRegex"?: string;
125
+ /**
126
+ * Regex options for user email validation
127
+ */
128
+ "userEmailRegexOptions"?: string;
129
+ /**
130
+ * User phone regex
131
+ */
132
+ "userPhoneRegex"?: string;
133
+ /**
134
+ * User phone regex options
135
+ */
136
+ "userPhoneRegexOptions"?: string;
137
+ }
138
+ interface IntrinsicElements {
139
+ "pam-login": PamLogin;
140
+ }
141
+ }
142
+ export { LocalJSX as JSX };
143
+ declare module "@stencil/core" {
144
+ export namespace JSX {
145
+ interface IntrinsicElements {
146
+ "pam-login": LocalJSX.PamLogin & JSXBase.HTMLAttributes<HTMLPamLoginElement>;
147
+ }
148
+ }
149
+ }
@@ -0,0 +1 @@
1
+ export * from './components/pam-login';