@salesforcedevs/docs-components 1.28.2-paymentcard-gc-alpha1 → 1.28.3
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/lwc.config.json +2 -1
- package/package.json +2 -3
- package/src/modules/doc/banner/banner.css +88 -0
- package/src/modules/doc/banner/banner.html +47 -0
- package/src/modules/doc/banner/banner.ts +73 -0
- package/src/modules/doc/localeBanner/localeBanner.css +3 -0
- package/src/modules/doc/localeBanner/localeBanner.html +9 -0
- package/src/modules/doc/localeBanner/localeBanner.ts +195 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.html +4 -1
- package/src/modules/doc/xmlContent/xmlContent.ts +28 -1
- package/src/modules/doc/paymentCard/paymentCard.css +0 -118
- package/src/modules/doc/paymentCard/paymentCard.html +0 -22
- package/src/modules/doc/paymentCard/paymentCard.ts +0 -91
package/lwc.config.json
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
],
|
|
7
7
|
"expose": [
|
|
8
8
|
"doc/amfReference",
|
|
9
|
+
"doc/banner",
|
|
10
|
+
"doc/localeBanner",
|
|
9
11
|
"doc/breadcrumbs",
|
|
10
12
|
"doc/componentPlayground",
|
|
11
13
|
"doc/content",
|
|
@@ -19,7 +21,6 @@
|
|
|
19
21
|
"doc/heading",
|
|
20
22
|
"doc/headingAnchor",
|
|
21
23
|
"doc/overview",
|
|
22
|
-
"doc/paymentCard",
|
|
23
24
|
"doc/phase",
|
|
24
25
|
"doc/redocReference",
|
|
25
26
|
"doc/specificationContent",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.3",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,6 +25,5 @@
|
|
|
25
25
|
"@types/lodash.orderby": "4.6.9",
|
|
26
26
|
"@types/lodash.uniqby": "4.7.9"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
|
|
29
|
-
"stableVersion": "1.28.2"
|
|
28
|
+
"gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
|
|
30
29
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
|
|
7
|
+
--doc-banner-padding-left: var(--dx-g-spacing-2xl);
|
|
8
|
+
--doc-banner-padding-right: var(--dx-g-spacing-lg);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.container {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
background: var(--dx-g-gray-90);
|
|
15
|
+
padding: 0 var(--doc-banner-padding-right) 0 var(--doc-banner-padding-left);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.icon {
|
|
19
|
+
--dx-c-icon-size: var(--dx-g-icon-size-lg);
|
|
20
|
+
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
margin-top: var(--dx-g-spacing-smd);
|
|
23
|
+
margin-right: var(--dx-g-spacing-sm);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.main {
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
column-gap: var(--dx-g-spacing-md);
|
|
33
|
+
padding: calc((var(--dx-g-spacing-xs) + var(--dx-g-spacing-sm)) / 2) 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.message {
|
|
37
|
+
flex: 0 1 auto;
|
|
38
|
+
font-size: var(--dx-g-text-sm);
|
|
39
|
+
color: var(--dx-g-gray-10);
|
|
40
|
+
padding: calc((var(--dx-g-spacing-xs) + var(--dx-g-spacing-sm)) / 2) 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.message a {
|
|
44
|
+
color: var(--dx-g-cloud-blue-vibrant-50);
|
|
45
|
+
text-decoration: underline;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.actions {
|
|
49
|
+
flex: 0 0 auto;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: var(--dx-g-spacing-smd);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.actions dx-button {
|
|
56
|
+
--dx-c-button-font-size: var(--dx-g-text-sm);
|
|
57
|
+
--dx-c-button-font-weight: var(--dx-g-font-normal);
|
|
58
|
+
|
|
59
|
+
flex: 0 0 auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.close {
|
|
63
|
+
--dx-c-icon-size: var(--dx-g-icon-size-lg);
|
|
64
|
+
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
align-self: flex-start;
|
|
67
|
+
width: calc(var(--dx-g-spacing-3xl) + var(--dx-g-spacing-xs));
|
|
68
|
+
height: calc(var(--dx-g-spacing-2xl) + var(--dx-g-spacing-xs));
|
|
69
|
+
margin-left: auto;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (max-width: 1279px) {
|
|
77
|
+
:host {
|
|
78
|
+
--doc-banner-padding-left: var(--dx-g-spacing-xl);
|
|
79
|
+
--doc-banner-padding-right: var(--dx-g-spacing-md);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (max-width: 768px) {
|
|
84
|
+
:host {
|
|
85
|
+
--doc-banner-padding-left: var(--dx-g-spacing-lg);
|
|
86
|
+
--doc-banner-padding-right: var(--dx-g-spacing-sm);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template lwc:if={showBanner}>
|
|
3
|
+
<div class="container" part="container">
|
|
4
|
+
<dx-icon
|
|
5
|
+
class="icon"
|
|
6
|
+
symbol="info"
|
|
7
|
+
size="override"
|
|
8
|
+
color="gray-50"
|
|
9
|
+
part="icon"
|
|
10
|
+
></dx-icon>
|
|
11
|
+
<div class="main">
|
|
12
|
+
<div class="message" part="message" lwc:dom="manual"></div>
|
|
13
|
+
<div class="actions" part="actions">
|
|
14
|
+
<template lwc:if={hasPrimaryButton}>
|
|
15
|
+
<dx-button
|
|
16
|
+
href={buttonHref}
|
|
17
|
+
variant="primary"
|
|
18
|
+
size="small"
|
|
19
|
+
part="button"
|
|
20
|
+
>
|
|
21
|
+
{buttonLabel}
|
|
22
|
+
</dx-button>
|
|
23
|
+
</template>
|
|
24
|
+
<template lwc:if={hasSecondaryAction}>
|
|
25
|
+
<dx-button
|
|
26
|
+
variant="inline"
|
|
27
|
+
onclick={handleSecondaryClick}
|
|
28
|
+
part="secondary"
|
|
29
|
+
>
|
|
30
|
+
{secondaryLabel}
|
|
31
|
+
</dx-button>
|
|
32
|
+
</template>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<dx-button
|
|
36
|
+
class="close"
|
|
37
|
+
variant="icon-only"
|
|
38
|
+
icon-symbol="close"
|
|
39
|
+
icon-size="override"
|
|
40
|
+
icon-color="gray-50"
|
|
41
|
+
aria-label="Close"
|
|
42
|
+
onclick={handleCloseClick}
|
|
43
|
+
part="close"
|
|
44
|
+
></dx-button>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
|
|
3
|
+
const BANNER_STORAGE_PREFIX = "doc-banner-";
|
|
4
|
+
|
|
5
|
+
export default class Banner extends LightningElement {
|
|
6
|
+
@api message = "";
|
|
7
|
+
|
|
8
|
+
@api buttonLabel = "";
|
|
9
|
+
|
|
10
|
+
@api buttonHref = "";
|
|
11
|
+
|
|
12
|
+
@api secondaryLabel = "";
|
|
13
|
+
|
|
14
|
+
@api dismissStorageKey = "";
|
|
15
|
+
|
|
16
|
+
private _dismissed = false;
|
|
17
|
+
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
if (this.dismissStorageKey && window?.sessionStorage) {
|
|
20
|
+
this._dismissed =
|
|
21
|
+
window.sessionStorage.getItem(
|
|
22
|
+
`${BANNER_STORAGE_PREFIX}${this.dismissStorageKey}`
|
|
23
|
+
) === "true";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
renderedCallback() {
|
|
28
|
+
if (this.message) {
|
|
29
|
+
const messageElement = this.template.querySelector(".message");
|
|
30
|
+
if (messageElement) {
|
|
31
|
+
messageElement.innerHTML = this.message;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get showBanner(): boolean {
|
|
37
|
+
return !this._dismissed;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
get hasPrimaryButton(): boolean {
|
|
41
|
+
return !!(this.buttonLabel && this.buttonHref);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
get hasSecondaryAction(): boolean {
|
|
45
|
+
return !!this.secondaryLabel;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private dismissBanner() {
|
|
49
|
+
if (this.dismissStorageKey && window?.sessionStorage) {
|
|
50
|
+
window.sessionStorage.setItem(
|
|
51
|
+
`${BANNER_STORAGE_PREFIX}${this.dismissStorageKey}`,
|
|
52
|
+
"true"
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
this._dismissed = true;
|
|
56
|
+
this.dispatchEvent(
|
|
57
|
+
new CustomEvent("dismissbanner", {
|
|
58
|
+
bubbles: true,
|
|
59
|
+
composed: true
|
|
60
|
+
})
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@api
|
|
65
|
+
handleSecondaryClick() {
|
|
66
|
+
this.dismissBanner();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@api
|
|
70
|
+
handleCloseClick() {
|
|
71
|
+
this.dismissBanner();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
|
|
3
|
+
interface LocaleStrings {
|
|
4
|
+
messageText: string;
|
|
5
|
+
linkUrl: string;
|
|
6
|
+
linkText: string;
|
|
7
|
+
buttonLabel: string;
|
|
8
|
+
secondaryLabel: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const DEFAULT_LOCALE = "en-us";
|
|
12
|
+
|
|
13
|
+
const LOCALE_STRINGS: Record<string, LocaleStrings> = {
|
|
14
|
+
"en-us": {
|
|
15
|
+
messageText:
|
|
16
|
+
"This text has been translated using Salesforce machine translation system. More details {link}.",
|
|
17
|
+
linkUrl:
|
|
18
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1",
|
|
19
|
+
linkText: "here",
|
|
20
|
+
buttonLabel: "Switch to English",
|
|
21
|
+
secondaryLabel: "Not Now"
|
|
22
|
+
},
|
|
23
|
+
"ja-jp": {
|
|
24
|
+
messageText:
|
|
25
|
+
"この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細は{link}をご参照ください。",
|
|
26
|
+
linkUrl:
|
|
27
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=ja",
|
|
28
|
+
linkText: "こちら",
|
|
29
|
+
buttonLabel: "英語に切り替える",
|
|
30
|
+
secondaryLabel: "今はしません"
|
|
31
|
+
},
|
|
32
|
+
"zh-cn": {
|
|
33
|
+
messageText:
|
|
34
|
+
"此文本已使用 Salesforce 机器翻译系统进行翻译。如需了解更多详情,请点击{link}。",
|
|
35
|
+
linkUrl:
|
|
36
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=zh_CN",
|
|
37
|
+
linkText: "此处",
|
|
38
|
+
buttonLabel: "切换为英语",
|
|
39
|
+
secondaryLabel: "而非现在"
|
|
40
|
+
},
|
|
41
|
+
"zh-tw": {
|
|
42
|
+
messageText:
|
|
43
|
+
"此文已使用 Salesforce 機器翻譯系統翻譯。更多詳細資料請參見{link}。",
|
|
44
|
+
linkUrl:
|
|
45
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=zh_TW",
|
|
46
|
+
linkText: "此處",
|
|
47
|
+
buttonLabel: "切換至英文",
|
|
48
|
+
secondaryLabel: "不要現在"
|
|
49
|
+
},
|
|
50
|
+
"fr-fr": {
|
|
51
|
+
messageText:
|
|
52
|
+
"Ce texte a été traduit à l’aide du système de traduction automatique de Salesforce. Plus de détails, consultez {link}.",
|
|
53
|
+
linkUrl:
|
|
54
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=fr",
|
|
55
|
+
linkText: "cette page",
|
|
56
|
+
buttonLabel: "Basculer vers la page en anglais",
|
|
57
|
+
secondaryLabel: "Pas maintenant"
|
|
58
|
+
},
|
|
59
|
+
"de-de": {
|
|
60
|
+
messageText:
|
|
61
|
+
"Dieser Text wurde mit dem maschinellen Übersetzungssystem von Salesforce übersetzt. Weitere Details finden Sie {link}.",
|
|
62
|
+
linkUrl:
|
|
63
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=de",
|
|
64
|
+
linkText: "hier",
|
|
65
|
+
buttonLabel: "Zu Englisch wechseln",
|
|
66
|
+
secondaryLabel: "Nicht jetzt"
|
|
67
|
+
},
|
|
68
|
+
"it-it": {
|
|
69
|
+
messageText:
|
|
70
|
+
"Questo testo è stato tradotto utilizzando il sistema di traduzione automatica di Salesforce. Ulteriori dettagli sono disponibili {link}.",
|
|
71
|
+
linkUrl:
|
|
72
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=it",
|
|
73
|
+
linkText: "qui",
|
|
74
|
+
buttonLabel: "Passa all'inglese",
|
|
75
|
+
secondaryLabel: "Non ora"
|
|
76
|
+
},
|
|
77
|
+
"ko-kr": {
|
|
78
|
+
messageText:
|
|
79
|
+
"본 텍스트는 Salesforce 기계 번역 시스템으로 번역되었습니다. 자세한 내용은 {link}를 참조하세요.",
|
|
80
|
+
linkUrl:
|
|
81
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=ko",
|
|
82
|
+
linkText: "여기",
|
|
83
|
+
buttonLabel: "영어로 전환",
|
|
84
|
+
secondaryLabel: "지금 안 함"
|
|
85
|
+
},
|
|
86
|
+
"pt-br": {
|
|
87
|
+
messageText:
|
|
88
|
+
"Este texto foi traduzido pelo sistema de tradução automática da Salesforce. Mais detalhes {link}.",
|
|
89
|
+
linkUrl:
|
|
90
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=pt_BR",
|
|
91
|
+
linkText: "aqui",
|
|
92
|
+
buttonLabel: "Alternar para inglês",
|
|
93
|
+
secondaryLabel: "Agora não"
|
|
94
|
+
},
|
|
95
|
+
"es-mx": {
|
|
96
|
+
messageText:
|
|
97
|
+
"Este texto se tradujo con el sistema de traducción automática de Salesforce. Obtenga más detalles {link}.",
|
|
98
|
+
linkUrl:
|
|
99
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=es_MX",
|
|
100
|
+
linkText: "aquí",
|
|
101
|
+
buttonLabel: "Cambiar a inglés",
|
|
102
|
+
secondaryLabel: "Ahora no"
|
|
103
|
+
},
|
|
104
|
+
"es-es": {
|
|
105
|
+
messageText:
|
|
106
|
+
"Este texto se ha traducido utilizando un sistema de traducción automática de Salesforce. Más información {link}.",
|
|
107
|
+
linkUrl:
|
|
108
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=es",
|
|
109
|
+
linkText: "aquí",
|
|
110
|
+
buttonLabel: "Cambiar a inglés",
|
|
111
|
+
secondaryLabel: "Ahora no"
|
|
112
|
+
},
|
|
113
|
+
"ru-ru": {
|
|
114
|
+
messageText:
|
|
115
|
+
"Данный текст был переведен при помощи системы машинного перевода Salesforce. Дополнительные сведения см. {link}.",
|
|
116
|
+
linkUrl:
|
|
117
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=ru",
|
|
118
|
+
linkText: "здесь",
|
|
119
|
+
buttonLabel: "Переключить на английский",
|
|
120
|
+
secondaryLabel: "Не сейчас"
|
|
121
|
+
},
|
|
122
|
+
"fi-fi": {
|
|
123
|
+
messageText:
|
|
124
|
+
"Tämä teksti on käännetty Salesforcen konekäännösjärjestelmän avulla. Katso lisätietoja {link}.",
|
|
125
|
+
linkUrl:
|
|
126
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=fi",
|
|
127
|
+
linkText: "täältä",
|
|
128
|
+
buttonLabel: "Vaihda englantiin",
|
|
129
|
+
secondaryLabel: "Ei nyt"
|
|
130
|
+
},
|
|
131
|
+
"da-dk": {
|
|
132
|
+
messageText:
|
|
133
|
+
"Denne tekst er oversat ved hjælp af Salesforce-maskinoversættelsessystem. Du finder flere detaljer {link}.",
|
|
134
|
+
linkUrl:
|
|
135
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=da",
|
|
136
|
+
linkText: "her",
|
|
137
|
+
buttonLabel: "Skift til engelsk",
|
|
138
|
+
secondaryLabel: "Ikke nu"
|
|
139
|
+
},
|
|
140
|
+
"sv-se": {
|
|
141
|
+
messageText:
|
|
142
|
+
"Den här texten har översatts med Salesforces maskinöversättningssystem. Mer information {link}.",
|
|
143
|
+
linkUrl:
|
|
144
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=sv",
|
|
145
|
+
linkText: "här",
|
|
146
|
+
buttonLabel: "Byt till engelska",
|
|
147
|
+
secondaryLabel: "Inte nu"
|
|
148
|
+
},
|
|
149
|
+
"nl-nl": {
|
|
150
|
+
messageText:
|
|
151
|
+
"Deze tekst werd vertaald aan de hand van het systeem voor automatische vertaling van Salesforce. U vindt {link} meer details.",
|
|
152
|
+
linkUrl:
|
|
153
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=nl_NL",
|
|
154
|
+
linkText: "hier",
|
|
155
|
+
buttonLabel: "Overschakelen op Engels",
|
|
156
|
+
secondaryLabel: "Niet nu"
|
|
157
|
+
},
|
|
158
|
+
"nb-no": {
|
|
159
|
+
messageText:
|
|
160
|
+
"Denne teksten er oversatt med Salesforce maskinoversettingssystem. Flere detaljer {link}.",
|
|
161
|
+
linkUrl:
|
|
162
|
+
"https://help.salesforce.com/s/articleView?id=000396076&type=1&language=no",
|
|
163
|
+
linkText: "her",
|
|
164
|
+
buttonLabel: "Bytt til engelsk",
|
|
165
|
+
secondaryLabel: "Ikke nå"
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export default class LocaleBanner extends LightningElement {
|
|
170
|
+
@api locale = DEFAULT_LOCALE;
|
|
171
|
+
@api targetHref = "";
|
|
172
|
+
@api dismissStorageKey = "";
|
|
173
|
+
|
|
174
|
+
get localeData(): LocaleStrings {
|
|
175
|
+
return LOCALE_STRINGS[this.locale] || LOCALE_STRINGS[DEFAULT_LOCALE];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
get bannerMessage(): string {
|
|
179
|
+
const data = this.localeData;
|
|
180
|
+
const link = `<a href="${data.linkUrl}">${data.linkText}</a>`;
|
|
181
|
+
return data.messageText.replace("{link}", link);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
get bannerButtonLabel(): string {
|
|
185
|
+
return this.localeData.buttonLabel;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
get bannerButtonHref(): string {
|
|
189
|
+
return this.targetHref;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
get bannerSecondaryLabel(): string {
|
|
193
|
+
return this.localeData.secondaryLabel;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -57,7 +57,10 @@
|
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
59
59
|
<div lwc:if={showFooter} class="footer-container">
|
|
60
|
-
<dx-footer
|
|
60
|
+
<dx-footer
|
|
61
|
+
variant="no-signup"
|
|
62
|
+
mfe-config-origin={effectiveFooterOrigin}
|
|
63
|
+
></dx-footer>
|
|
61
64
|
</div>
|
|
62
65
|
</div>
|
|
63
66
|
</div>
|
|
@@ -322,8 +322,10 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
private handlePopState = (event: PopStateEvent): void =>
|
|
325
|
+
private handlePopState = (event: PopStateEvent): void => {
|
|
326
326
|
this.updatePageReference(this.getReferenceFromUrl(), event);
|
|
327
|
+
this.handleLocaleReload();
|
|
328
|
+
};
|
|
327
329
|
|
|
328
330
|
handleDismissVersionBanner() {
|
|
329
331
|
this.showVersionBanner = false;
|
|
@@ -598,6 +600,31 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
598
600
|
"docs",
|
|
599
601
|
this.pageReferenceToString(this.pageReference)
|
|
600
602
|
);
|
|
603
|
+
this.handleLocaleReload();
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/* This method reloads the page as locale banner context is not available in developer-website. */
|
|
607
|
+
private handleLocaleReload(): void {
|
|
608
|
+
const targetLocale = this.language?.id;
|
|
609
|
+
if (!targetLocale) {
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
const currentPath = window.location.pathname;
|
|
614
|
+
const localePattern = /atlas\.[a-z]{2}-[a-z]{2}\./;
|
|
615
|
+
|
|
616
|
+
if (localePattern.test(currentPath)) {
|
|
617
|
+
const newPath = currentPath.replace(
|
|
618
|
+
localePattern,
|
|
619
|
+
`atlas.${targetLocale}.`
|
|
620
|
+
);
|
|
621
|
+
const newUrl =
|
|
622
|
+
window.location.origin +
|
|
623
|
+
newPath +
|
|
624
|
+
window.location.search +
|
|
625
|
+
window.location.hash;
|
|
626
|
+
window.location.href = newUrl;
|
|
627
|
+
}
|
|
601
628
|
}
|
|
602
629
|
|
|
603
630
|
private updateHighlighting(searchParam: string): void {
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
@import "dxHelpers/reset";
|
|
2
|
-
@import "dxHelpers/text";
|
|
3
|
-
|
|
4
|
-
:host {
|
|
5
|
-
display: block;
|
|
6
|
-
max-width: 520px;
|
|
7
|
-
margin: 2rem auto;
|
|
8
|
-
min-height: 400px;
|
|
9
|
-
border-radius: 8px;
|
|
10
|
-
padding: 1rem;
|
|
11
|
-
--x-deg: 0deg;
|
|
12
|
-
--y-deg: 0deg;
|
|
13
|
-
--bg-x: 50%;
|
|
14
|
-
--bg-y: 50%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.container {
|
|
18
|
-
perspective: 1000px;
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-items: center;
|
|
22
|
-
padding: 50px;
|
|
23
|
-
border-radius: 8px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.card {
|
|
27
|
-
width: 400px;
|
|
28
|
-
height: 250px;
|
|
29
|
-
background: rgba(255, 255, 255, 0.07);
|
|
30
|
-
backdrop-filter: blur(16px);
|
|
31
|
-
-webkit-backdrop-filter: blur(16px);
|
|
32
|
-
border-radius: 16px;
|
|
33
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
34
|
-
position: relative;
|
|
35
|
-
padding: 30px;
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
justify-content: space-between;
|
|
39
|
-
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
|
|
40
|
-
color: white;
|
|
41
|
-
transform: rotateX(var(--x-deg)) rotateY(var(--y-deg));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.card.debit {
|
|
45
|
-
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.card.credit {
|
|
49
|
-
background: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #b8860b 100%);
|
|
50
|
-
border-color: rgba(255, 215, 0, 0.4);
|
|
51
|
-
color: #1a1508;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.card.credit .label {
|
|
55
|
-
color: rgba(26, 21, 8, 0.85);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.card-label,
|
|
59
|
-
.chip,
|
|
60
|
-
.number,
|
|
61
|
-
.details {
|
|
62
|
-
position: relative;
|
|
63
|
-
z-index: 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.card-label {
|
|
67
|
-
font-family: var(--dx-g-font-display, system-ui, sans-serif);
|
|
68
|
-
font-size: var(--dx-g-spacing-md, 0.875rem);
|
|
69
|
-
font-weight: 600;
|
|
70
|
-
line-height: 1.25;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.card::before {
|
|
74
|
-
content: '';
|
|
75
|
-
position: absolute;
|
|
76
|
-
inset: 0;
|
|
77
|
-
z-index: 0;
|
|
78
|
-
background: linear-gradient(125deg,
|
|
79
|
-
transparent 0%,
|
|
80
|
-
rgba(255, 255, 255, 0.1) 45%,
|
|
81
|
-
rgba(255, 255, 255, 0.3) 50%,
|
|
82
|
-
rgba(255, 255, 255, 0.1) 55%,
|
|
83
|
-
transparent 100%);
|
|
84
|
-
background-size: 200% 200%;
|
|
85
|
-
background-position: var(--bg-x) var(--bg-y);
|
|
86
|
-
border-radius: inherit;
|
|
87
|
-
pointer-events: none;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.chip {
|
|
91
|
-
width: 50px;
|
|
92
|
-
height: 40px;
|
|
93
|
-
background: linear-gradient(135deg, #fceabb 0%, #f8b500 50%, #fceabb 100%);
|
|
94
|
-
border-radius: 6px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.number,
|
|
98
|
-
.value {
|
|
99
|
-
font-family: 'Courier New', monospace;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.number {
|
|
103
|
-
font-size: 1.6rem;
|
|
104
|
-
letter-spacing: 2px;
|
|
105
|
-
margin-top: 20px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.label {
|
|
109
|
-
display: block;
|
|
110
|
-
font-size: 0.65rem;
|
|
111
|
-
text-transform: uppercase;
|
|
112
|
-
color: rgba(255, 255, 255, 0.8);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.value {
|
|
116
|
-
font-size: 0.9rem;
|
|
117
|
-
font-weight: bold;
|
|
118
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="container">
|
|
3
|
-
<div class={cardClass}>
|
|
4
|
-
<div class={cardLabelClass}>{cardLabel}</div>
|
|
5
|
-
|
|
6
|
-
<div class="chip"></div>
|
|
7
|
-
|
|
8
|
-
<div class="number">{number}</div>
|
|
9
|
-
|
|
10
|
-
<div class="details">
|
|
11
|
-
<div>
|
|
12
|
-
<span class="label">Cardholder Name</span>
|
|
13
|
-
<span class="value">{cardHolder}</span>
|
|
14
|
-
</div>
|
|
15
|
-
<div>
|
|
16
|
-
<span class="label">Valid Thru</span>
|
|
17
|
-
<span class="value">{expires}</span>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { normalizeBoolean } from "dxUtils/normalizers";
|
|
3
|
-
|
|
4
|
-
export default class PaymentCard extends LightningElement {
|
|
5
|
-
_isDebit: boolean = false;
|
|
6
|
-
_number: string | null = null;
|
|
7
|
-
|
|
8
|
-
@api
|
|
9
|
-
get number(): string | null {
|
|
10
|
-
return this._number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
set number(value: string | null) {
|
|
14
|
-
if (value) {
|
|
15
|
-
const digits = value.replace(/\s/g, "");
|
|
16
|
-
this._number = digits.replace(/(.{4})/g, "$1 ").trim();
|
|
17
|
-
} else {
|
|
18
|
-
this._number = value;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
_cardHolder: string | null = null;
|
|
22
|
-
|
|
23
|
-
@api
|
|
24
|
-
get cardHolder(): string | null {
|
|
25
|
-
return this._cardHolder;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
set cardHolder(value: string | null) {
|
|
29
|
-
this._cardHolder = value ? value.toUpperCase() : value;
|
|
30
|
-
}
|
|
31
|
-
@api expires: string | null = null;
|
|
32
|
-
@api
|
|
33
|
-
get isDebit(): boolean {
|
|
34
|
-
return this._isDebit;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
set isDebit(value) {
|
|
38
|
-
this._isDebit = normalizeBoolean(value);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get cardClass(): string {
|
|
42
|
-
return this._isDebit ? "card debit" : "card credit";
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
get cardLabelClass(): string {
|
|
46
|
-
return this._isDebit ? "card-label debit" : "card-label credit";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get cardLabel(): string {
|
|
50
|
-
return this._isDebit ? "Debit" : "Credit";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
renderedCallback() {
|
|
54
|
-
if (this._initialized) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
this._initialized = true;
|
|
58
|
-
|
|
59
|
-
const card = this.template.querySelector(".card") as HTMLElement;
|
|
60
|
-
if (!card) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
let mouseX = 0;
|
|
65
|
-
let mouseY = 0;
|
|
66
|
-
let rotateX = 0;
|
|
67
|
-
let rotateY = 0;
|
|
68
|
-
|
|
69
|
-
const onMouseMove = (e: MouseEvent) => {
|
|
70
|
-
mouseX = (window.innerWidth / 2 - e.clientX) / 15;
|
|
71
|
-
mouseY = (e.clientY - window.innerHeight / 2) / 15;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const animate = () => {
|
|
75
|
-
rotateX += (mouseY - rotateX) * 0.1;
|
|
76
|
-
rotateY += (mouseX - rotateY) * 0.1;
|
|
77
|
-
|
|
78
|
-
card.style.setProperty("--x-deg", `${rotateX}deg`);
|
|
79
|
-
card.style.setProperty("--y-deg", `${rotateY}deg`);
|
|
80
|
-
card.style.setProperty("--bg-x", `${50 + rotateY * 2}%`);
|
|
81
|
-
card.style.setProperty("--bg-y", `${50 + rotateX * 2}%`);
|
|
82
|
-
|
|
83
|
-
requestAnimationFrame(animate);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
window.addEventListener("mousemove", onMouseMove);
|
|
87
|
-
requestAnimationFrame(animate);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
_initialized = false;
|
|
91
|
-
}
|