@globalpayments-private/gpds-pattern-web 0.0.0-stage → 0.1.0-pr.7.gdcb74cd
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/README.md +567 -2
- package/dist/cjs/control-strategy-DhhYTbse.js +113 -0
- package/dist/cjs/gpds-pattern-web.cjs.js +24 -0
- package/dist/cjs/index-Dzm6P89U.js +1565 -0
- package/dist/cjs/index.cjs.js +180 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/uds-pattern-login-card_2.cjs.entry.js +1662 -0
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/components/uds-pattern-login-card/slimmers/identity-memory.slimmer.js +63 -0
- package/dist/collection/components/uds-pattern-login-card/slimmers/login-workflow.slimmer.js +357 -0
- package/dist/collection/components/uds-pattern-login-card/slimmers/renderers/login-card-renderer.js +100 -0
- package/dist/collection/components/uds-pattern-login-card/slimmers/renderers/login-field-renderer.js +129 -0
- package/dist/collection/components/uds-pattern-login-card/slimmers/renderers/login-step-renderer.js +192 -0
- package/dist/collection/components/uds-pattern-login-card/slimmers/resend-throttle.slimmer.js +65 -0
- package/dist/collection/components/uds-pattern-login-card/uds-pattern-login-card.css +154 -0
- package/dist/collection/components/uds-pattern-login-card/uds-pattern-login-card.js +508 -0
- package/dist/collection/components/uds-pattern-login-card/validation/login-validation-rules.js +86 -0
- package/dist/collection/components/uds-pattern-login-card/view-model/login-card-handlers.js +1 -0
- package/dist/collection/components/uds-pattern-login-card/view-model/login-step.view-model.js +138 -0
- package/dist/collection/components/uds-pattern-login-page/uds-pattern-login-page.css +37 -0
- package/dist/collection/components/uds-pattern-login-page/uds-pattern-login-page.js +97 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/providers/auth-provider.js +28 -0
- package/dist/collection/providers/control-strategy.js +21 -0
- package/dist/collection/providers/login-config.js +4 -0
- package/dist/collection/providers/memory-auth-provider.js +133 -0
- package/dist/collection/providers/parse-auth-result.js +135 -0
- package/dist/collection/slimmer/common/log.js +14 -0
- package/dist/collection/slimmer/common/symbols.js +10 -0
- package/dist/collection/slimmer/common/types.js +2 -0
- package/dist/collection/slimmer/decorators/inject-slimmer.js +73 -0
- package/dist/collection/slimmer/decorators/map-to-component-field.js +41 -0
- package/dist/collection/slimmer/decorators/map-to-component-method.js +33 -0
- package/dist/collection/slimmer/decorators/slimmer.js +10 -0
- package/dist/collection/slimmer/index.js +5 -0
- package/dist/collection/utils/labels.js +81 -0
- package/dist/collection/utils/types.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-DOrg55po.js +1 -0
- package/dist/components/p-_G8A9gg0.js +1 -0
- package/dist/components/uds-pattern-login-card.d.ts +11 -0
- package/dist/components/uds-pattern-login-card.js +1 -0
- package/dist/components/uds-pattern-login-page.d.ts +11 -0
- package/dist/components/uds-pattern-login-page.js +1 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +549 -0
- package/dist/esm/control-strategy-DOrg55po.js +105 -0
- package/dist/esm/gpds-pattern-web.js +20 -0
- package/dist/esm/index-DsXlLyGj.js +1537 -0
- package/dist/esm/index.js +170 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/uds-pattern-login-card_2.entry.js +1659 -0
- package/dist/gpds-pattern-web/gpds-pattern-web.css +1 -0
- package/dist/gpds-pattern-web/gpds-pattern-web.esm.js +1 -0
- package/dist/gpds-pattern-web/index.esm.js +1 -0
- package/dist/gpds-pattern-web/p-2c97d2da.entry.js +1 -0
- package/dist/gpds-pattern-web/p-DOrg55po.js +1 -0
- package/dist/gpds-pattern-web/p-DsXlLyGj.js +3 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/uds-pattern-login-card/slimmers/identity-memory.slimmer.d.ts +21 -0
- package/dist/types/components/uds-pattern-login-card/slimmers/login-workflow.slimmer.d.ts +100 -0
- package/dist/types/components/uds-pattern-login-card/slimmers/renderers/login-card-renderer.d.ts +44 -0
- package/dist/types/components/uds-pattern-login-card/slimmers/renderers/login-field-renderer.d.ts +91 -0
- package/dist/types/components/uds-pattern-login-card/slimmers/renderers/login-step-renderer.d.ts +40 -0
- package/dist/types/components/uds-pattern-login-card/slimmers/resend-throttle.slimmer.d.ts +21 -0
- package/dist/types/components/uds-pattern-login-card/uds-pattern-login-card.d.ts +134 -0
- package/dist/types/components/uds-pattern-login-card/validation/login-validation-rules.d.ts +72 -0
- package/dist/types/components/uds-pattern-login-card/view-model/login-card-handlers.d.ts +21 -0
- package/dist/types/components/uds-pattern-login-card/view-model/login-step.view-model.d.ts +96 -0
- package/dist/types/components/uds-pattern-login-page/uds-pattern-login-page.d.ts +21 -0
- package/dist/types/components.d.ts +327 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/providers/auth-provider.d.ts +168 -0
- package/dist/types/providers/control-strategy.d.ts +144 -0
- package/dist/types/providers/login-config.d.ts +52 -0
- package/dist/types/providers/memory-auth-provider.d.ts +37 -0
- package/dist/types/providers/parse-auth-result.d.ts +8 -0
- package/dist/types/slimmer/common/log.d.ts +8 -0
- package/dist/types/slimmer/common/symbols.d.ts +10 -0
- package/dist/types/slimmer/common/types.d.ts +30 -0
- package/dist/types/slimmer/decorators/inject-slimmer.d.ts +24 -0
- package/dist/types/slimmer/decorators/map-to-component-field.d.ts +16 -0
- package/dist/types/slimmer/decorators/map-to-component-method.d.ts +11 -0
- package/dist/types/slimmer/decorators/slimmer.d.ts +10 -0
- package/dist/types/slimmer/index.d.ts +6 -0
- package/dist/types/stencil-public-runtime.d.ts +1879 -0
- package/dist/types/utils/labels.d.ts +13 -0
- package/dist/types/utils/types.d.ts +106 -0
- package/dist/types/vega.d.ts +11 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +82 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UdsLoginLabels } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Default (en-US) copy for the login workflow pattern.
|
|
4
|
+
*
|
|
5
|
+
* Wording mirrors the approved Global Payments sign-in design
|
|
6
|
+
* (Figma: "Design System and Pilot Portals Rollout", node 14:2748 / 14:2765).
|
|
7
|
+
*
|
|
8
|
+
* The `errors` map is part of the pattern, not the consumer: shipping approved
|
|
9
|
+
* failure copy is how every GP product ends up failing in the same words.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_LOGIN_LABELS: UdsLoginLabels;
|
|
12
|
+
/** Substitutes `{name}` placeholders in a label template. */
|
|
13
|
+
export declare function formatLabel(template: string, values: Record<string, string | number>): string;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { UdsAuthErrorCode } from '../providers/auth-provider';
|
|
2
|
+
/**
|
|
3
|
+
* Every screen `uds-pattern-login-card` is able to render.
|
|
4
|
+
*
|
|
5
|
+
* The card selects the step itself from the `UdsAuthResult` the provider
|
|
6
|
+
* returns. A consumer never sets a step directly; to change the course of the
|
|
7
|
+
* workflow, intercept it through `UdsLoginControlStrategy`.
|
|
8
|
+
*/
|
|
9
|
+
export type UdsLoginStep = 'identifier' | 'password' | 'mfa-method' | 'otp' | 'forgot-password' | 'forgot-username' | 'reset-password' | 'sign-up' | 'check-email' | 'locked' | 'success';
|
|
10
|
+
/**
|
|
11
|
+
* Secondary intents the card cannot resolve itself and therefore delegates to
|
|
12
|
+
* the host via `udsLoginAction`.
|
|
13
|
+
*
|
|
14
|
+
* Navigation *within* the workflow (forgot password, back, resend, change
|
|
15
|
+
* method, sign-up) is handled internally and is deliberately absent here.
|
|
16
|
+
*/
|
|
17
|
+
export type UdsLoginAction = 'trouble-signing-in' | 'login-help';
|
|
18
|
+
/** Payload of `udsLoginStepChange`. */
|
|
19
|
+
export interface UdsLoginStepChangeDetail {
|
|
20
|
+
step: UdsLoginStep;
|
|
21
|
+
previousStep: UdsLoginStep;
|
|
22
|
+
}
|
|
23
|
+
/** Payload of `udsLoginAction`. */
|
|
24
|
+
export interface UdsLoginActionDetail {
|
|
25
|
+
action: UdsLoginAction;
|
|
26
|
+
step: UdsLoginStep;
|
|
27
|
+
}
|
|
28
|
+
/** Payload of `udsLoginError`. */
|
|
29
|
+
export interface UdsLoginErrorDetail {
|
|
30
|
+
code: UdsAuthErrorCode;
|
|
31
|
+
step: UdsLoginStep;
|
|
32
|
+
/** Raw message from the adapter, when it supplied one. */
|
|
33
|
+
message?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Approved, domain-neutral copy for each failure reason.
|
|
37
|
+
*
|
|
38
|
+
* The pattern owns this map so that every GP product fails in the same words.
|
|
39
|
+
* Consumers may override individual entries through `labels.errors`, but the
|
|
40
|
+
* default is intentionally complete so that nobody *has* to.
|
|
41
|
+
*/
|
|
42
|
+
export type UdsLoginErrorLabels = Record<UdsAuthErrorCode, string>;
|
|
43
|
+
/**
|
|
44
|
+
* Every user-facing string in the card. Consumers override any subset via the
|
|
45
|
+
* `labels` property so the pattern can be localised without forking it.
|
|
46
|
+
*/
|
|
47
|
+
export interface UdsLoginLabels {
|
|
48
|
+
identifierHeading: string;
|
|
49
|
+
identifierFieldLabel: string;
|
|
50
|
+
rememberIdentifier: string;
|
|
51
|
+
passwordHeading: string;
|
|
52
|
+
passwordFieldLabel: string;
|
|
53
|
+
showPassword: string;
|
|
54
|
+
hidePassword: string;
|
|
55
|
+
forgotPassword: string;
|
|
56
|
+
forgotUsername: string;
|
|
57
|
+
mfaMethodHeading: string;
|
|
58
|
+
mfaMethodDescription: string;
|
|
59
|
+
otpHeading: string;
|
|
60
|
+
otpDescription: string;
|
|
61
|
+
/** Used when the provider named the delivery method. `{method}` is substituted. */
|
|
62
|
+
otpDescriptionForMethod: string;
|
|
63
|
+
otpFieldLabel: string;
|
|
64
|
+
/** Shown when the code is only partly entered. `{count}` is substituted. */
|
|
65
|
+
otpIncomplete: string;
|
|
66
|
+
otpSubmit: string;
|
|
67
|
+
showCode: string;
|
|
68
|
+
hideCode: string;
|
|
69
|
+
resendCode: string;
|
|
70
|
+
/** Shown while the resend throttle is active. `{seconds}` is substituted. */
|
|
71
|
+
resendCodeIn: string;
|
|
72
|
+
changeMfaMethodPrompt: string;
|
|
73
|
+
changeMfaMethod: string;
|
|
74
|
+
forgotPasswordHeading: string;
|
|
75
|
+
forgotPasswordDescription: string;
|
|
76
|
+
forgotUsernameHeading: string;
|
|
77
|
+
forgotUsernameDescription: string;
|
|
78
|
+
checkEmailHeading: string;
|
|
79
|
+
checkEmailDescription: string;
|
|
80
|
+
/** Used when the provider reported where it sent the message. `{destination}` is substituted. */
|
|
81
|
+
checkEmailDescriptionWithDestination: string;
|
|
82
|
+
lockedHeading: string;
|
|
83
|
+
lockedDescription: string;
|
|
84
|
+
/** Used when the provider reported an unlock time. `{minutes}` is substituted. */
|
|
85
|
+
lockedDescriptionWithTime: string;
|
|
86
|
+
resetPasswordHeading: string;
|
|
87
|
+
newPasswordFieldLabel: string;
|
|
88
|
+
confirmPasswordFieldLabel: string;
|
|
89
|
+
signUpHeading: string;
|
|
90
|
+
signUpDescription: string;
|
|
91
|
+
firstNameFieldLabel: string;
|
|
92
|
+
lastNameFieldLabel: string;
|
|
93
|
+
signUpSubmit: string;
|
|
94
|
+
haveAccountPrompt: string;
|
|
95
|
+
signIn: string;
|
|
96
|
+
successHeading: string;
|
|
97
|
+
continue: string;
|
|
98
|
+
back: string;
|
|
99
|
+
troubleSigningInPrompt: string;
|
|
100
|
+
troubleSigningIn: string;
|
|
101
|
+
helpPrompt: string;
|
|
102
|
+
help: string;
|
|
103
|
+
noAccountPrompt: string;
|
|
104
|
+
createAccount: string;
|
|
105
|
+
errors: UdsLoginErrorLabels;
|
|
106
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pulls Vega's JSX declarations into our compilation.
|
|
3
|
+
*
|
|
4
|
+
* Without this the elements still *work* at runtime, but Stencil's
|
|
5
|
+
* `IntrinsicElements` carries a `[tagName: string]: any` catch-all, so every
|
|
6
|
+
* `<vega-*>` tag and every prop on it would be silently unchecked — a typo'd
|
|
7
|
+
* prop name would compile cleanly and fail only in the browser. Importing the
|
|
8
|
+
* package's types activates its `declare module "@stencil/core"` augmentation,
|
|
9
|
+
* which takes precedence over the catch-all for the tags it names.
|
|
10
|
+
*/
|
|
11
|
+
import '@globalpayments/vega/dist/types/components';
|
package/loader/cdn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from '../dist/types/components';
|
|
2
|
+
export interface CustomElementsDefineOptions {
|
|
3
|
+
exclude?: string[];
|
|
4
|
+
resourcesUrl?: string;
|
|
5
|
+
syncQueue?: boolean;
|
|
6
|
+
jmp?: (c: Function) => any;
|
|
7
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
8
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyPolyfills(): Promise<void>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
19
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
20
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
21
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
22
|
+
* will result in the same behavior.
|
|
23
|
+
*/
|
|
24
|
+
export declare function setNonce(nonce: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/esm/loader.js';
|
package/loader/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
2
|
+
export * from '../dist/esm/loader.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalpayments-private/gpds-pattern-web",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-pr.7.gdcb74cd",
|
|
4
|
+
"description": "GPDS pattern library for Web — domain-neutral application patterns composed from UDS components.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/globalpayments-internal/gpds-pattern-web.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/globalpayments-internal/gpds-pattern-web#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/globalpayments-internal/gpds-pattern-web/issues"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"registry": "https://registry.npmjs.org/"
|
|
17
|
+
},
|
|
18
|
+
"main": "dist/index.cjs.js",
|
|
19
|
+
"module": "dist/index.js",
|
|
20
|
+
"types": "dist/types/index.d.ts",
|
|
21
|
+
"es2015": "dist/esm/index.js",
|
|
22
|
+
"es2017": "dist/esm/index.js",
|
|
23
|
+
"unpkg": "dist/gpds-pattern-web/gpds-pattern-web.esm.js",
|
|
24
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
25
|
+
"collection:main": "dist/collection/index.js",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/types/index.d.ts",
|
|
29
|
+
"import": "./dist/esm/index.js",
|
|
30
|
+
"require": "./dist/index.cjs.js"
|
|
31
|
+
},
|
|
32
|
+
"./components/*": {
|
|
33
|
+
"types": "./dist/components/*.d.ts",
|
|
34
|
+
"import": "./dist/components/*.js"
|
|
35
|
+
},
|
|
36
|
+
"./loader": {
|
|
37
|
+
"types": "./loader/index.d.ts",
|
|
38
|
+
"import": "./loader/index.js",
|
|
39
|
+
"require": "./loader/index.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./tokens.css": "./dist/gpds-pattern-web/gpds-pattern-web.css"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist/",
|
|
45
|
+
"loader/"
|
|
46
|
+
],
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=20.0.0"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "stencil build --docs",
|
|
52
|
+
"build:sandbox": "node scripts/build-sandbox.mjs",
|
|
53
|
+
"prepack": "npm run build",
|
|
54
|
+
"start": "stencil build --dev --watch --serve",
|
|
55
|
+
"test": "stencil test --spec",
|
|
56
|
+
"test:watch": "stencil test --spec --watchAll",
|
|
57
|
+
"test:coverage": "stencil test --spec -- --coverage",
|
|
58
|
+
"e2e-app:install": "npm --prefix e2e-app install",
|
|
59
|
+
"e2e-app:build": "npm run build && npm run e2e-app:install && npm --prefix e2e-app run build",
|
|
60
|
+
"serve:e2e-app": "npm --prefix e2e-app run preview",
|
|
61
|
+
"cypress:open": "cypress open --e2e --config baseUrl=http://localhost:4210",
|
|
62
|
+
"cypress:run": "cypress run --e2e --config baseUrl=http://localhost:4210",
|
|
63
|
+
"e2e": "npm run e2e-app:build && start-server-and-test serve:e2e-app http-get://localhost:4210 cypress:run",
|
|
64
|
+
"generate": "stencil generate",
|
|
65
|
+
"prepare": "patch-package"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@stencil/core": "^4.45.2"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@globalpayments/vega-sandbox-app": "^0.1.0-alpha.4",
|
|
72
|
+
"@globalpayments/vega-sandbox-url-codec": "^0.1.0-alpha.6",
|
|
73
|
+
"@types/jest": "^29.5.12",
|
|
74
|
+
"cypress": "^13.6.5",
|
|
75
|
+
"jest": "^29.7.0",
|
|
76
|
+
"jest-cli": "^29.7.0",
|
|
77
|
+
"patch-package": "^8.0.1",
|
|
78
|
+
"start-server-and-test": "^2.1.5",
|
|
79
|
+
"typescript": "^5.5.4"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"@globalpayments/vega": "^2.106.0"
|
|
83
|
+
}
|
|
84
|
+
}
|