@primer-io/primer-js 1.6.2 → 1.7.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/CHANGELOG.md +20 -0
- package/dist/custom-elements.json +552 -495
- package/dist/jsx/index.d.ts +23 -1
- package/dist/primer-loader.d.ts +209 -251
- package/dist/primer-loader.js +41 -41
- package/dist/vscode.html-custom-data.json +13 -1
- package/dist/web-types.json +32 -4
- package/package.json +1 -1
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "e2e/utils.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "test",
|
|
12
|
+
"default": "chromaticTest"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"exports": [
|
|
16
|
+
{
|
|
17
|
+
"kind": "js",
|
|
18
|
+
"name": "expect",
|
|
19
|
+
"declaration": {
|
|
20
|
+
"name": "expect",
|
|
21
|
+
"package": "@chromatic-com/playwright"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"kind": "js",
|
|
26
|
+
"name": "test",
|
|
27
|
+
"declaration": {
|
|
28
|
+
"name": "test",
|
|
29
|
+
"module": "e2e/utils.ts"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
5
34
|
{
|
|
6
35
|
"kind": "javascript-module",
|
|
7
36
|
"path": "dist/primer-loader.js",
|
|
@@ -69,263 +98,268 @@
|
|
|
69
98
|
},
|
|
70
99
|
{
|
|
71
100
|
"kind": "variable",
|
|
72
|
-
"name": "
|
|
73
|
-
"default": "class extends b{constructor(){super(...arguments);this.size=\"large\";this.showCloseButton=!1;this.darkMode=!1;this.open=!1}openDialog(){this.open=!0}closeDialog(){let e=()=>{this.open=!1,this.removeEventListener(\"primer:dialog-close\",e)};this.addEventListener(\"primer:dialog-close\",e),this.dialog.startExitAnimation()}connectedCallback(){super.connectedCallback(),this.darkMode&&this.classList.add(\"primer-dark-theme\"),this.open||this.openDialog()}updated(e){super.updated(e),e.has(\"darkMode\")&&(this.darkMode?this.classList.add(\"primer-dark-theme\"):this.classList.remove(\"primer-dark-theme\")),e.has(\"open\")&&this.open&&this.onOpen&&this.onOpen(),e.has(\"open\")&&this.open&&this.onContentRendered&&this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.onContentRendered?.()})})}render(){return this.open?p`<primer-dialog class=\"${this.darkMode?\"primer-dark-theme\":\"\"}\" .open=${this.open} size=${this.size} .showCloseButton=${this.showCloseButton} @primer:dialog-close=\"${()=>{this.open=!1}}\" ><slot></slot>${this.cta?p`<primer-button @click=${this.cta.onClick} class=\"cta-button\">${this.cta.icon?p`<primer-icon name=\"${this.cta.icon}\" size=\"sm\" color=\"var(--primer-color-background-outlined-default)\" ></primer-icon>`:
|
|
101
|
+
"name": "Q",
|
|
102
|
+
"default": "class extends b{constructor(){super(...arguments);this.size=\"large\";this.showCloseButton=!1;this.darkMode=!1;this.open=!1}openDialog(){this.open=!0}closeDialog(){let e=()=>{this.open=!1,this.removeEventListener(\"primer:dialog-close\",e)};this.addEventListener(\"primer:dialog-close\",e),this.dialog.startExitAnimation()}connectedCallback(){super.connectedCallback(),this.darkMode&&this.classList.add(\"primer-dark-theme\"),this.open||this.openDialog()}updated(e){super.updated(e),e.has(\"darkMode\")&&(this.darkMode?this.classList.add(\"primer-dark-theme\"):this.classList.remove(\"primer-dark-theme\")),e.has(\"open\")&&this.open&&this.onOpen&&this.onOpen(),e.has(\"open\")&&this.open&&this.onContentRendered&&this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.onContentRendered?.()})})}render(){return this.open?p`<primer-dialog class=\"${this.darkMode?\"primer-dark-theme\":\"\"}\" .open=${this.open} size=${this.size} .showCloseButton=${this.showCloseButton} @primer:dialog-close=\"${()=>{this.open=!1}}\" ><slot></slot>${this.cta?p`<primer-button @click=${this.cta.onClick} class=\"cta-button\">${this.cta.icon?p`<primer-icon name=\"${this.cta.icon}\" size=\"sm\" color=\"var(--primer-color-background-outlined-default)\" ></primer-icon>`:y} ${this.cta.label}</primer-button>`:y}</primer-dialog>`:y}}"
|
|
74
103
|
},
|
|
75
104
|
{
|
|
76
105
|
"kind": "variable",
|
|
77
|
-
"name": "
|
|
78
|
-
"default": "class extends b{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this.disableLoader=!1;this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this._loadingTimeoutId=null;this._eventListenerController=null;this._classObserver=null;this.locale=
|
|
106
|
+
"name": "ge",
|
|
107
|
+
"default": "class extends b{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this.disableLoader=!1;this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this._loadingTimeoutId=null;this._eventListenerController=null;this._classObserver=null;this.locale=rr(Ma());this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new ca(this),this.primerEventsController=new Xt(this),this.styleProcessingController=new ua(this),this.vaultManagerController=new Ar(this),this.headlessSdkController=new Ka(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}get primerJS(){return this.headlessSdkController?.primerJSInstance??void 0}connectedCallback(){super.connectedCallback(),this.sdkContextController.setEventsController(this.primerEventsController),this._eventListenerController=new AbortController,document.addEventListener(\"primer:card-submit\",this.handleExternalCardSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:vault-submit\",this.handleExternalVaultSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:show-other-payments-toggle\",this.handleExternalShowOtherPaymentsToggle.bind(this),{signal:this._eventListenerController.signal}),this._classObserver=new MutationObserver(()=>{this.requestUpdate()}),this._classObserver.observe(this,{attributes:!0,attributeFilter:[\"class\"]})}attributeChangedCallback(e,a,i){e===pg.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,a,i)}disconnectedCallback(){this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null),this.sdkContextController.contextProvider.value.sdkState?.isLoading&&this.sdkContextController.setSdkState({isLoading:!1}),this._eventListenerController&&(this._eventListenerController.abort(),this._eventListenerController=null),this._classObserver&&(this._classObserver.disconnect(),this._classObserver=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(Cn(this.options?.locale)?this.locale=rr(this.options?.locale):R.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to system locale\")),bn(this.locale))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}handleExternalCardSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:card-submit\",e.detail)}handleExternalVaultSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:vault-submit\",e.detail)}handleExternalShowOtherPaymentsToggle(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:show-other-payments-toggle\",e.detail)}checkLoadingStateChange(){let e=this.sdkContextController.contextProvider.value.sdkState.isLoading||!1;if(this.previousLoadingState&&!e){this.jsInitialized=!0;let a=this.sdkContextController.contextProvider.value.telemetry;a?.analytics.sendEvent({eventName:\"CHECKOUT_FLOW_STARTED\"});let i=a?.getSdkInitStartTime();a?.remoteLog.checkoutInitialized(i?Date.now()-i:void 0)}this.previousLoadingState=e,e&&!this._loadingTimeoutId?this._loadingTimeoutId=window.setTimeout(()=>{this.sdkContextController.contextProvider.value.sdkState.isLoading&&(R.warn(\"Loading timeout in component, forcing completion\"),this.sdkContextController.setSdkState({isLoading:!1}),this.jsInitialized=!0),this._loadingTimeoutId=null},1e4):!e&&this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null)}render(){let e=this.sdkContextController.contextProvider.value.sdkState,a=e.isLoading,i=e.primerJsError,n=!a&&!i;return p` ${N(i,()=>p`<primer-checkout-error></primer-checkout-error>`)}<slot name=\"main\" @slotchange=${this.onSlotChange}></slot>${N(this.hasAssignedContent||!n,()=>y,()=>p`<primer-main></primer-main>`)} `}addEventListener(e,a,i){super.addEventListener(e,a,i)}removeEventListener(e,a,i){super.removeEventListener(e,a,i)}}"
|
|
79
108
|
},
|
|
80
109
|
{
|
|
81
110
|
"kind": "function",
|
|
82
|
-
"name": "
|
|
111
|
+
"name": "Ql"
|
|
83
112
|
},
|
|
84
113
|
{
|
|
85
114
|
"kind": "function",
|
|
86
|
-
"name": "
|
|
115
|
+
"name": "Xl"
|
|
87
116
|
},
|
|
88
117
|
{
|
|
89
118
|
"kind": "function",
|
|
90
|
-
"name": "
|
|
119
|
+
"name": "fg"
|
|
91
120
|
},
|
|
92
121
|
{
|
|
93
122
|
"kind": "function",
|
|
94
|
-
"name": "
|
|
123
|
+
"name": "vg"
|
|
95
124
|
},
|
|
96
125
|
{
|
|
97
126
|
"kind": "variable",
|
|
98
|
-
"name": "
|
|
99
|
-
"default": "class extends b{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in
|
|
127
|
+
"name": "Ge",
|
|
128
|
+
"default": "class extends b{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in Fn)return Fn[this.size];let e=parseInt(this.size,10);return isNaN(e)?Fn.medium:e}render(){let e=this.getSize(),a=20,i=`0 0 ${a} ${a}`;return this.style.setProperty(\"--spinner-color\",this.color),this.style.setProperty(\"--spinner-size\",`${e}px`),p`<div class=\"spinner-container ${this.compact?\"compact\":\"\"}\"><svg class=\"spinner\" width=\"${e}\" height=\"${e}\" viewBox=\"${i}\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" role=\"status\" aria-label=\"Loading\" ><path d=\"M4.27827 10.002C4.27827 6.84166 6.84019 4.27973 10.0005 4.27973C10.7676 4.27973 11.3894 3.6579 11.3894 2.89084C11.3894 2.12378 10.7676 1.50195 10.0005 1.50195C5.30607 1.50195 1.50049 5.30753 1.50049 10.002C1.50049 14.6964 5.30607 18.502 10.0005 18.502C14.6949 18.502 18.5005 14.6964 18.5005 10.002C18.5005 9.23489 17.8787 8.61306 17.1116 8.61306C16.3445 8.61306 15.7227 9.23489 15.7227 10.002C15.7227 13.1622 13.1608 15.7242 10.0005 15.7242C6.84019 15.7242 4.27827 13.1622 4.27827 10.002Z\" fill=\"currentColor\" class=\"path\" /></svg></div>`}}"
|
|
100
129
|
},
|
|
101
130
|
{
|
|
102
131
|
"kind": "variable",
|
|
103
|
-
"name": "
|
|
104
|
-
"default": "class extends b{constructor(){super(...arguments);this.focusWithin=!1;this.hasError=!1;this.handleWrapperClick=e=>{if(e.target!==e.currentTarget)return;let a=this.findSlottedPrimerInput();a?a.focus():this.dispatchEvent(new CustomEvent(\"wrapper-click\",{bubbles:!0,composed:!0}))}}findSlottedPrimerInput(){if(!this.inputSlot)return null;let e=this.inputSlot.assignedElements({flatten:!0}),a=e.find(i=>i.tagName.toLowerCase()===\"primer-input\");if(a)return a;for(let i of e){let n=i.querySelector(\"primer-input\");if(n)return n}return null}render(){let e={\"input-slot\":!0,\"focus-within\":this.focusWithin};return p`<div class=\"input-wrapper\"><slot name=\"label\"></slot><div class=\"${
|
|
132
|
+
"name": "Ke",
|
|
133
|
+
"default": "class extends b{constructor(){super(...arguments);this.focusWithin=!1;this.hasError=!1;this.handleWrapperClick=e=>{if(e.target!==e.currentTarget)return;let a=this.findSlottedPrimerInput();a?a.focus():this.dispatchEvent(new CustomEvent(\"wrapper-click\",{bubbles:!0,composed:!0}))}}findSlottedPrimerInput(){if(!this.inputSlot)return null;let e=this.inputSlot.assignedElements({flatten:!0}),a=e.find(i=>i.tagName.toLowerCase()===\"primer-input\");if(a)return a;for(let i of e){let n=i.querySelector(\"primer-input\");if(n)return n}return null}render(){let e={\"input-slot\":!0,\"focus-within\":this.focusWithin};return p`<div class=\"input-wrapper\"><slot name=\"label\"></slot><div class=\"${Z(e)}\" @click=\"${this.handleWrapperClick}\"><slot name=\"input\"></slot></div><slot name=\"error\"></slot></div>`}}"
|
|
105
134
|
},
|
|
106
135
|
{
|
|
107
136
|
"kind": "variable",
|
|
108
|
-
"name": "
|
|
137
|
+
"name": "et",
|
|
109
138
|
"default": "class extends b{constructor(){super(...arguments);this.for=\"\";this.disabled=!1}render(){return p`<label for=${this.for}><slot></slot></label>`}}"
|
|
110
139
|
},
|
|
111
140
|
{
|
|
112
141
|
"kind": "variable",
|
|
113
|
-
"name": "
|
|
114
|
-
"default": "class extends b{constructor(){super(...arguments);this.variant=\"primary\";this.disabled=!1;this.loading=!1;this.buttonType=\"button\";this.selectionState=\"default\";this.selectable=!1;this.flex=!0;this.handleClick=()=>{!this.selectable||this.disabled||this.loading||(this.selectionState=this.selectionState===\"default\"?\"checked\":\"default\",this.dispatchEvent(new CustomEvent(\"selection-change\",{bubbles:!0,composed:!0,detail:{state:this.selectionState}})))}}renderCheckmark(){return!this.selectable||this.selectionState!==\"checked\"||this.loading?
|
|
142
|
+
"name": "le",
|
|
143
|
+
"default": "class extends b{constructor(){super(...arguments);this.variant=\"primary\";this.disabled=!1;this.loading=!1;this.buttonType=\"button\";this.selectionState=\"default\";this.selectable=!1;this.flex=!0;this.handleClick=()=>{!this.selectable||this.disabled||this.loading||(this.selectionState=this.selectionState===\"default\"?\"checked\":\"default\",this.dispatchEvent(new CustomEvent(\"selection-change\",{bubbles:!0,composed:!0,detail:{state:this.selectionState}})))}}renderCheckmark(){return!this.selectable||this.selectionState!==\"checked\"||this.loading?y:p`<primer-icon name=\"checkmark\" size=\"sm\" color=\"var(--primer-color-brand)\" ></primer-icon>`}renderSpinner(){if(!this.loading)return y;let e;return this.variant===\"primary\"?e=\"var(--primer-color-background-outlined-default)\":(this.variant===\"secondary\"||this.variant===\"tertiary\")&&(e=\"var(--primer-color-gray-900)\"),p`<primer-spinner size=\"small\" color=\"${e}\" compact ></primer-spinner>`}render(){return p`<button type=${this.buttonType} ?disabled=${this.disabled||this.loading} @click=${this.handleClick} part=\"button\" aria-checked=${this.selectionState===\"checked\"} aria-busy=${this.loading} aria-label=${this.ariaLabel?this.ariaLabel:y} >${this.renderSpinner()} ${this.flex?p`<span class=\"button-content ${this.loading?\"loading\":\"\"}\"><slot></slot></span>`:p`<span class=\"button-content-base ${this.loading?\"loading\":\"\"}\" ><slot></slot></span>`} ${this.renderCheckmark()}</button>`}}"
|
|
115
144
|
},
|
|
116
145
|
{
|
|
117
146
|
"kind": "variable",
|
|
118
|
-
"name": "
|
|
147
|
+
"name": "tt",
|
|
119
148
|
"default": "class extends b{constructor(){super(...arguments);this.for=\"\";this.active=!0}render(){return p`<span class=\"error\" role=\"alert\" aria-live=\"polite\" id=\"${this.for||\"\"}\" ><slot></slot></span>`}}"
|
|
120
149
|
},
|
|
121
150
|
{
|
|
122
151
|
"kind": "variable",
|
|
123
|
-
"name": "
|
|
124
|
-
"default": "class extends b{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?
|
|
152
|
+
"name": "Fe",
|
|
153
|
+
"default": "class extends b{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?Fa[this.name]:null;return p`<div style=\"--internal-icon-color: ${this.color}\">${e||p`<slot></slot>`}</div>`}}"
|
|
125
154
|
},
|
|
126
155
|
{
|
|
127
156
|
"kind": "variable",
|
|
128
|
-
"name": "
|
|
157
|
+
"name": "rt",
|
|
129
158
|
"default": "class extends b{constructor(){super(...arguments);this.type=\"complete\"}render(){return this.type===\"complete\"?p`<primer-icon size=\"lg\" name=\"successful-check\" color=\"var(--primer-color-icon-positive)\" ></primer-icon><p>Checkout complete!</p><p class=\"secondary\"> You'll be redirected to the order confirmation page soon. </p>`:p`<primer-icon size=\"lg\" name=\"failure-icon\" color=\"var(--primer-color-icon-negative)\" ></primer-icon><p>Payment failed</p>${this.description?p`<p class=\"secondary\">${this.description}</p>`:p`<p class=\"secondary\">Something went wrong.</p>`} `}}"
|
|
130
159
|
},
|
|
131
160
|
{
|
|
132
161
|
"kind": "variable",
|
|
133
|
-
"name": "
|
|
162
|
+
"name": "H",
|
|
134
163
|
"default": "class extends b{constructor(){super(...arguments);this.value=\"\";this.placeholder=\"\";this.disabled=!1;this.name=\"\";this.type=\"text\";this.required=!1;this.readonly=!1;this.pattern=\"\";this.min=\"\";this.max=\"\";this.step=\"\";this.autocomplete=\"\";this._id=\"\";this.hasFocus=!1;this.hasError=!1;this.handleInput=e=>{e.stopPropagation();let a=e.target;this.value=a.value;let i=new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0});this.dispatchEvent(i)};this.handleChange=e=>{e.stopPropagation();let a=e.target;this.value=a.value;let i=new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0});this.dispatchEvent(i)};this.handleFocus=()=>{this.hasFocus=!0,this.dispatchEvent(new FocusEvent(\"focus\",{bubbles:!0,composed:!0}))};this.handleBlur=()=>{this.hasFocus=!1,this.dispatchEvent(new FocusEvent(\"blur\",{bubbles:!0,composed:!0}))};this.handleInvalid=e=>{e.stopPropagation(),this.hasError=!0,this.dispatchEvent(new Event(\"invalid\",{bubbles:!0,composed:!0}))}}get id(){return this._id}set id(e){this._id=e,this.setAttribute(\"id\",e)}focus(e){this.inputElement?.focus(e)}blur(){this.inputElement?.blur()}select(){this.inputElement?.select()}setSelectionRange(e,a,i){this.inputElement?.setSelectionRange(e,a,i)}get validity(){return this.inputElement?.validity||{}}get validationMessage(){return this.inputElement?.validationMessage||\"\"}checkValidity(){return this.inputElement?.checkValidity()||!1}reportValidity(){return this.inputElement?.reportValidity()||!1}render(){let e={input:!0,\"input--focused\":this.hasFocus,\"input--disabled\":this.disabled,\"input--error\":this.hasError,\"input--readonly\":this.readonly},a=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join(\" \");return p`<input part=\"input\" class=${a} .value=${this.value} .type=${this.type} ?disabled=${this.disabled} ?required=${this.required} ?readonly=${this.readonly} placeholder=${this.placeholder} pattern=${this.pattern} minlength=${this.minlength??\"\"} maxlength=${this.maxlength??\"\"} min=${this.min} max=${this.max} step=${this.step} autocomplete=${this.autocomplete} name=${this.name} id=${this.id} @input=${this.handleInput} @change=${this.handleChange} @focus=${this.handleFocus} @blur=${this.handleBlur} @invalid=${this.handleInvalid} />`}addEventListener(e,a,i){super.addEventListener(e,a,i)}removeEventListener(e,a,i){super.removeEventListener(e,a,i)}}"
|
|
135
164
|
},
|
|
136
165
|
{
|
|
137
166
|
"kind": "variable",
|
|
138
|
-
"name": "
|
|
139
|
-
"default": "class extends b{constructor(){super(...arguments);this.prefix=\"+351\";this.value=\"\";this.placeholder=\"\";this.inputId=\"primer-pt-phone-number-input\";this.maxLength=15;this.minLength=9;this.disabled=!1;this.hasErrors=!1;this.handleInput=e=>{e.stopPropagation();let a=e.target,n=a.value.replace(/\\D/g,\"\").slice(0,this.maxLocalDigits);a.value!==n&&(a.value=n),this.dispatchValueEvent(\"input\",n)};this.handleChange=e=>{e.stopPropagation();let i=e.target.value.replace(/\\D/g,\"\");this.dispatchValueEvent(\"change\",i)};this.handleHostClick=()=>{this.inputEl?.focus()}}get localDigits(){let a=(this.value==null?\"\":String(this.value)).replace(/[^\\d+]/g,\"\");return a.startsWith(this.prefix)?a.slice(this.prefix.length):a.replace(/^\\+/,\"\")}get maxLocalDigits(){return Math.max(this.maxLength-this.prefix.length,0)}updated(e){if(!e.has(\"value\")&&!e.has(\"prefix\"))return;let a=this.inputEl;if(!a)return;let i=this.localDigits;a.value!==i&&(a.value=i)}dispatchValueEvent(e,a){let i=a.length?`${this.prefix}${a}`:\"\";this.dispatchEvent(new CustomEvent(e,{detail:i,bubbles:!0,composed:!0}))}focus(){this.inputEl?.focus()}render(){return p`<div @click=${this.handleHostClick} style=\"display: contents;\"><span class=\"flag\" aria-hidden=\"true\">${
|
|
167
|
+
"name": "te",
|
|
168
|
+
"default": "class extends b{constructor(){super(...arguments);this.prefix=\"+351\";this.value=\"\";this.placeholder=\"\";this.inputId=\"primer-pt-phone-number-input\";this.maxLength=15;this.minLength=9;this.disabled=!1;this.hasErrors=!1;this.handleInput=e=>{e.stopPropagation();let a=e.target,n=a.value.replace(/\\D/g,\"\").slice(0,this.maxLocalDigits);a.value!==n&&(a.value=n),this.dispatchValueEvent(\"input\",n)};this.handleChange=e=>{e.stopPropagation();let i=e.target.value.replace(/\\D/g,\"\");this.dispatchValueEvent(\"change\",i)};this.handleHostClick=()=>{this.inputEl?.focus()}}get localDigits(){let a=(this.value==null?\"\":String(this.value)).replace(/[^\\d+]/g,\"\");return a.startsWith(this.prefix)?a.slice(this.prefix.length):a.replace(/^\\+/,\"\")}get maxLocalDigits(){return Math.max(this.maxLength-this.prefix.length,0)}updated(e){if(!e.has(\"value\")&&!e.has(\"prefix\"))return;let a=this.inputEl;if(!a)return;let i=this.localDigits;a.value!==i&&(a.value=i)}dispatchValueEvent(e,a){let i=a.length?`${this.prefix}${a}`:\"\";this.dispatchEvent(new CustomEvent(e,{detail:i,bubbles:!0,composed:!0}))}focus(){this.inputEl?.focus()}render(){return p`<div @click=${this.handleHostClick} style=\"display: contents;\"><span class=\"flag\" aria-hidden=\"true\">${Cg}</span><span class=\"prefix\">${this.prefix}</span><input id=${this.inputId} type=\"tel\" inputmode=\"numeric\" autocomplete=\"tel-national\" ?disabled=${this.disabled} placeholder=${this.placeholder} @input=${this.handleInput} @change=${this.handleChange} /></div>`}}"
|
|
140
169
|
},
|
|
141
170
|
{
|
|
142
171
|
"kind": "variable",
|
|
143
|
-
"name": "
|
|
172
|
+
"name": "ye",
|
|
144
173
|
"default": "class extends b{constructor(){super(...arguments);this.name=\"\";this.value=\"\";this.disabled=!1;this.hasError=!1;this.placeholder=\"\";this.options=[];this.handleChange=e=>{let i=e.target.value;this.dispatchEvent(new CustomEvent(\"change\",{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(\"input\",{detail:i,bubbles:!0,composed:!0}))};this.handleFocus=()=>{this.dispatchEvent(new CustomEvent(\"focus\",{bubbles:!0,composed:!0}))};this.handleBlur=()=>{this.dispatchEvent(new CustomEvent(\"blur\",{bubbles:!0,composed:!0}))};this.stopNativeEvent=e=>{e.stopPropagation()}}renderSelectOptions(){let e=[];for(let a of this.options)e.push(p`<option value=${a.value} ?selected=${this.value===a.value} >${a.label}</option>`);return e}render(){return p`<select id=${this.id} name=${this.name} ?disabled=${this.disabled} ?required=${!this.value} @change=${this.handleChange} @input=${this.stopNativeEvent} @focus=${this.handleFocus} @blur=${this.handleBlur} aria-invalid=${this.hasError?\"true\":\"false\"} ><option value=\"\" disabled ?selected=${!this.value}>${this.placeholder||\"Select an option\"}</option>${this.renderSelectOptions()}</select>`}}"
|
|
145
174
|
},
|
|
146
175
|
{
|
|
147
176
|
"kind": "variable",
|
|
148
|
-
"name": "
|
|
177
|
+
"name": "de",
|
|
149
178
|
"default": "class extends b{constructor(){super(...arguments);this.header=\"\";this.expanded=!1;this.expandText=\"Expand\";this.collapseText=\"Collapse\";this.ariaLabel=\"\";this.buttonVariant=\"primary\";this.isExpanded=!1;this.toggleExpanded=()=>{this.isExpanded=!this.isExpanded,this.dispatchExpandedChangedEvent(this.isExpanded)}}connectedCallback(){super.connectedCallback(),this.isExpanded=this.expanded}dispatchExpandedChangedEvent(e){this.dispatchEvent(new CustomEvent(\"expanded-changed\",{bubbles:!0,composed:!0,detail:{expanded:e}}))}expand(){this.isExpanded||(this.isExpanded=!0,this.dispatchExpandedChangedEvent(!0))}collapse(){this.isExpanded&&(this.isExpanded=!1,this.dispatchExpandedChangedEvent(!1))}render(){let e=this.isExpanded?this.collapseText:this.expandText,a=this.ariaLabel||this.header||e,i=this.header||e;return p`<div class=\"collapsable\"><primer-button variant=${this.buttonVariant} buttonType=\"button\" @click=${this.toggleExpanded} aria-expanded=${this.isExpanded} aria-controls=\"collapsable-content\" aria-label=${a} ><span>${i}</span></primer-button><div class=\"collapsable-wrapper ${this.isExpanded?\"expanded\":\"\"}\" id=\"collapsable-content\" role=\"region\" aria-labelledby=\"collapsable-header\" ><div class=\"collapsable-content\"><slot></slot></div></div></div>`}}"
|
|
150
179
|
},
|
|
151
180
|
{
|
|
152
181
|
"kind": "variable",
|
|
153
|
-
"name": "
|
|
154
|
-
"default": "class extends b{constructor(){super();this.message=\"\";this.visible=!1;this._role=\"alert\";this.showMessage=!1;this.role=\"alert\"}get role(){return this._role}set role(e){this._role=e,this.setAttribute(\"role\",e)}updated(e){e.has(\"visible\")&&this.handleVisibilityChange()}handleVisibilityChange(){this.visible?(this.showMessage=!0,this.setAttribute(\"aria-hidden\",\"false\")):setTimeout(()=>{this.showMessage=!1,this.setAttribute(\"aria-hidden\",\"true\")},200)}render(){if(!this.showMessage&&!this.visible)return
|
|
182
|
+
"name": "Ue",
|
|
183
|
+
"default": "class extends b{constructor(){super();this.message=\"\";this.visible=!1;this._role=\"alert\";this.showMessage=!1;this.role=\"alert\"}get role(){return this._role}set role(e){this._role=e,this.setAttribute(\"role\",e)}updated(e){e.has(\"visible\")&&this.handleVisibilityChange()}handleVisibilityChange(){this.visible?(this.showMessage=!0,this.setAttribute(\"aria-hidden\",\"false\")):setTimeout(()=>{this.showMessage=!1,this.setAttribute(\"aria-hidden\",\"true\")},200)}render(){if(!this.showMessage&&!this.visible)return y;let e={\"error-message\":!0,hidden:!this.visible};return p`<div part=\"error-message\" class=${Z(e)} aria-live=\"assertive\" aria-atomic=\"true\" ><div part=\"error-icon\" class=\"error-icon\"><primer-icon name=\"failure-icon\" size=\"sm\" color=\"var(--primer-color-icon-negative)\" ></primer-icon></div><div part=\"error-content\" class=\"error-content\">${this.message}</div></div>`}}"
|
|
155
184
|
},
|
|
156
185
|
{
|
|
157
186
|
"kind": "variable",
|
|
158
|
-
"name": "
|
|
159
|
-
"default": "class extends b{constructor(){super(...arguments);this.size=\"flex\";this.showCloseButton=!0;this._animationState=\"entering\";this._isVisible=!1;this._handleCloseClick=()=>{this._startExitAnimation()}}startExitAnimation(){this._startExitAnimation()}connectedCallback(){super.connectedCallback(),document.body.style.overflow=\"hidden\",this._startEnterAnimation()}disconnectedCallback(){super.disconnectedCallback(),document.body.style.overflow=\"\",this._animationTimeout&&clearTimeout(this._animationTimeout)}_startEnterAnimation(){this._animationState=\"entering\",this._isVisible=!0,requestAnimationFrame(()=>{this._animationTimeout=window.setTimeout(()=>{this._animationState=\"entered\",this.dispatchEvent(new CustomEvent(\"primer:dialog-open\",{bubbles:!0,composed:!0}))},500)})}_startExitAnimation(){this._animationTimeout&&clearTimeout(this._animationTimeout),this._animationState=\"exiting\",this._animationTimeout=window.setTimeout(()=>{this._animationState=\"exited\",this._isVisible=!1,this.dispatchEvent(new CustomEvent(\"primer:dialog-close\",{bubbles:!0,composed:!0}))},500)}render(){return this._isVisible?p`<div class=${
|
|
187
|
+
"name": "we",
|
|
188
|
+
"default": "class extends b{constructor(){super(...arguments);this.size=\"flex\";this.showCloseButton=!0;this._animationState=\"entering\";this._isVisible=!1;this._handleCloseClick=()=>{this._startExitAnimation()}}startExitAnimation(){this._startExitAnimation()}connectedCallback(){super.connectedCallback(),document.body.style.overflow=\"hidden\",this._startEnterAnimation()}disconnectedCallback(){super.disconnectedCallback(),document.body.style.overflow=\"\",this._animationTimeout&&clearTimeout(this._animationTimeout)}_startEnterAnimation(){this._animationState=\"entering\",this._isVisible=!0,requestAnimationFrame(()=>{this._animationTimeout=window.setTimeout(()=>{this._animationState=\"entered\",this.dispatchEvent(new CustomEvent(\"primer:dialog-open\",{bubbles:!0,composed:!0}))},500)})}_startExitAnimation(){this._animationTimeout&&clearTimeout(this._animationTimeout),this._animationState=\"exiting\",this._animationTimeout=window.setTimeout(()=>{this._animationState=\"exited\",this._isVisible=!1,this.dispatchEvent(new CustomEvent(\"primer:dialog-close\",{bubbles:!0,composed:!0}))},500)}render(){return this._isVisible?p`<div class=${Z({backdrop:!0,\"backdrop--entering\":this._animationState===\"entering\",\"backdrop--entered\":this._animationState===\"entered\",\"backdrop--exiting\":this._animationState===\"exiting\"})} @click=${e=>{e.preventDefault()}} ><div class=${Z({dialog:!0,[this.size]:!0,\"dialog--entering\":this._animationState===\"entering\",\"dialog--entered\":this._animationState===\"entered\",\"dialog--exiting\":this._animationState===\"exiting\"})} ><div class=\"header\">${this.showCloseButton?p`<primer-button class=\"close\" variant=\"tertiary\" @click=${this._handleCloseClick} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></primer-button>`:\"\"}</div><div class=\"content\"><slot></slot></div></div></div>`:p``}}"
|
|
160
189
|
},
|
|
161
190
|
{
|
|
162
191
|
"kind": "variable",
|
|
163
|
-
"name": "
|
|
164
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.selectedCategory=null;this.isExpanded=!1;this.categoryLoading=!1;this._setupTask=new
|
|
192
|
+
"name": "fe",
|
|
193
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.selectedCategory=null;this.isExpanded=!1;this.categoryLoading=!1;this._setupTask=new V(this,{task:async([e,a])=>{let i=e?.find(n=>n.type===I.KLARNA);return i?.type!==I.KLARNA||!a?U:{method:i}},args:()=>[this.primerContext?.paymentMethods,this.primerContext?.headlessUtils]});this.handleExpandedChange=e=>{this.isExpanded=e.detail.expanded,this.isExpanded||(this.selectedCategory=null,this.categoryLoading=!1,this.klarnaContainer&&(this.klarnaContainer.innerHTML=\"\"))};this.klarnaPaymentInProgress=!1}async startKlarnaPayment(){if(!(!this._setupTask.value||!this.selectedCategory||this.klarnaPaymentInProgress)){this.klarnaPaymentInProgress=!0;try{this._setupTask.value.method.setSelectedCategory(this.selectedCategory),await this._setupTask.value.method.start()}catch{}finally{this.klarnaPaymentInProgress=!1}}}async renderSelectedCategory(){if(!(!this._setupTask.value||!this.selectedCategory||!this.klarnaContainer))try{this.klarnaContainer.innerHTML=\"\",this.categoryLoading=!0,await this._setupTask.value.method.renderCategory({containerId:this.klarnaContainer,paymentMethodCategoryId:this.selectedCategory,onHeightChange:()=>{}})}catch{}finally{this.categoryLoading=!1}}selectCategory(e){this.disabled||(this.selectedCategory=e)}updated(e){e.has(\"selectedCategory\")&&this.selectedCategory&&this.renderSelectedCategory()}renderCategorySelection(){let e=this._setupTask?.value?.method.getCategories()||[];return e.length>0&&!this.selectedCategory&&this.selectCategory(e[0].identifier),e.length===1?y:p`<div class=\"category-selection\">${e.map(a=>p`<button class=${Z({\"category-button\":!0,selected:a.identifier===this.selectedCategory,loading:this.categoryLoading&&a.identifier===this.selectedCategory})} @click=${()=>{this.selectCategory(a.identifier)}} ?disabled=${this.disabled} ><span class=${Z({\"category-label\":!0,hidden:this.categoryLoading&&a.identifier===this.selectedCategory})} >${a.name}</span >${this.categoryLoading&&a.identifier===this.selectedCategory?p`<primer-spinner class=\"category-spinner\" size=\"small\" compact ></primer-spinner>`:y}</button>`)}</div>`}renderExpandedContent(){return p` ${this.renderCategorySelection()}<div class=\"klarna-category-container ${!this.categoryLoading&&this.selectedCategory?\"visible\":\"\"}\" ><div id=\"klarna-category-container\" class=\"klarna-category-content\" ></div></div><primer-payment-method-accordion-confirm-button ?disabled=${!this.selectedCategory||this.disabled} ?loading=${yt(this.primerContext?.sdkState)} @confirm=${()=>this.startKlarnaPayment()} ></primer-payment-method-accordion-confirm-button>`}render(){return this._setupTask.render({error:e=>{let a=e instanceof Error?e.message:\"Unknown error in Klarna\";return p`<div class=\"error\"> Error loading Klarna: ${a}</div>`},complete:({method:e})=>e?p`<primer-payment-method-accordion .type=${I.KLARNA} ?disabled=${this.disabled} .expanded=${this.isExpanded} ?suppress-blur-collapse=${this.klarnaPaymentInProgress} @expanded-change=${this.handleExpandedChange} >${this.renderExpandedContent()}</primer-payment-method-accordion>`:y})}}"
|
|
165
194
|
},
|
|
166
195
|
{
|
|
167
196
|
"kind": "variable",
|
|
168
|
-
"name": "
|
|
169
|
-
"default": "class extends b{constructor(){super();this.type=void 0;this.disabled=!1;this.buttonContainerRef=
|
|
197
|
+
"name": "xe",
|
|
198
|
+
"default": "class extends b{constructor(){super();this.type=void 0;this.disabled=!1;this.buttonContainerRef=Fr();this.renderButtonTask=new V(this,{args:()=>[this.paymentMethod],task:async([e])=>{if(!e)return U;await this.updateComplete;let a=this.buttonContainerRef.value;if(!a)throw new J({origin:\"integration\",message:\"Button container not found\",code:xs.CONTAINER_NOT_FOUND});let i=e.type===\"GOOGLE_PAY\"?{shadowRoot:this.shadowRoot}:e.type===\"APPLE_PAY\"?{buttonHeight:vd(a)}:{buttonHeight:Pg(vd(this))};return await e.render(a,{style:i}),this.disabled&&await e.setDisabled(this.disabled),e}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}willUpdate(e){e.has(\"paymentMethod\")&&(this.type=this.paymentMethod?.type)}render(){return p`<div class=\"native-button-container\" ${dr(this.buttonContainerRef)} ></div>`}}"
|
|
170
199
|
},
|
|
171
200
|
{
|
|
172
201
|
"kind": "variable",
|
|
173
|
-
"name": "
|
|
174
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.currentState=\"collapsed\";this.blikCode=\"\";this.errorMessage=\"\";this.pollingDuration=0;this.pollingTimer=null;this.handleExpandedChange=async e=>{if(this.disabled)
|
|
202
|
+
"name": "ve",
|
|
203
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.currentState=\"collapsed\";this.blikCode=\"\";this.errorMessage=\"\";this.pollingDuration=0;this.pollingTimer=null;this.handleExpandedChange=async e=>{if(!this.disabled){if(!e.detail.expanded){this.handleCollapse();return}if(this.currentState===\"collapsed\"){if(!this.paymentMethod){this.errorMessage=E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"}),this.currentState=\"error\",R.error(\"Payment method not available when expanding BLIK form\");return}this.currentState=\"expanded-input\",await this.updateComplete,this.shadowRoot?.querySelector(\"#blik-code\")?.focus()}}};this.handleCollapse=()=>{this.currentState=\"collapsed\",this.blikCode=\"\",this.errorMessage=\"\",this.stopPollingTimer()};this.handleInput=e=>{let a=e.target,i=a.value,o=i.replace(/\\D/g,\"\").slice(0,6);i!==o&&(a.value=o),this.blikCode=o,this.currentState===\"error\"&&(this.currentState=\"expanded-input\",this.errorMessage=\"\"),o.length===6&&this.submitBlikCode()};this.handleRetry=async()=>{this.currentState=\"expanded-input\",this.errorMessage=\"\",this.blikCode=\"\",await this.updateComplete,this.shadowRoot?.querySelector(\"#blik-code\")?.focus()}}get isExpanded(){return this.currentState!==\"collapsed\"}startPollingTimer(){this.pollingDuration=0,this.pollingTimer=window.setInterval(()=>{this.pollingDuration+=1},1e3)}stopPollingTimer(){this.pollingTimer!==null&&(window.clearInterval(this.pollingTimer),this.pollingTimer=null),this.pollingDuration=0}async submitBlikCode(){if(this.currentState!==\"loading\"){if(this.blikCode.length!==6){this.errorMessage=E(\"sixDigitCodeErrorTooShort\",{id:\"sixDigitCodeErrorTooShort\"}),this.currentState=\"error\";return}if(!this.paymentMethod){this.errorMessage=\"BLIK payment method not initialized\",this.currentState=\"error\",R.error(\"BLIK payment method not available\");return}this.currentState=\"loading\",this.errorMessage=\"\",this.startPollingTimer();try{this.paymentMethod.setBlikCode(this.blikCode),await this.paymentMethod.start(),this.stopPollingTimer(),this.currentState=\"collapsed\",this.blikCode=\"\"}catch(e){this.stopPollingTimer(),this.currentState=\"error\",this.errorMessage=e instanceof Error?e.message:E(\"tokenizationError\",{id:\"tokenizationError\"})}}}renderExpandedInput(){return p`<div class=\"blik-input-wrapper\"><label for=\"blik-code\" class=\"blik-label\">${E(\"getCodeFromBankingApp\",{id:\"getCodeFromBankingApp\"})}</label><input id=\"blik-code\" type=\"text\" inputmode=\"numeric\" pattern=\"[0-9]*\" maxlength=\"6\" class=\"blik-input\" .value=\"${this.blikCode}\" @input=\"${this.handleInput}\" ?disabled=\"${this.disabled}\" placeholder=\"000000\" aria-label=\"${E(\"sixDigitCodeLabel\",{id:\"sixDigitCodeLabel\"})}\" autocomplete=\"off\" spellcheck=\"false\" /></div>`}renderLoading(){return p`<div class=\"blik-loading\"><primer-spinner size=\"medium\"></primer-spinner>${this.pollingDuration>30?p`<div class=\"blik-timeout-warning\"> This is taking longer than expected... </div>`:y}</div>`}renderError(){return p`<div class=\"blik-error\"><div class=\"blik-error-message\" role=\"alert\">${this.errorMessage||E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}</div><button class=\"blik-retry-button\" @click=\"${this.handleRetry}\" ?disabled=\"${this.disabled}\" >${E(\"retry_button\",{id:\"retry_button\"})}</button></div>`}renderExpandedState(){switch(this.currentState){case\"expanded-input\":return this.renderExpandedInput();case\"loading\":return this.renderLoading();case\"error\":return this.renderError();default:return y}}disconnectedCallback(){super.disconnectedCallback(),this.stopPollingTimer()}render(){return p`<primer-payment-method-accordion .type=${this.paymentMethod?.type} ?disabled=${this.disabled} .expanded=${this.isExpanded} @expanded-change=${this.handleExpandedChange} >${this.isExpanded?this.renderExpandedState():y}</primer-payment-method-accordion>`}}"
|
|
175
204
|
},
|
|
176
205
|
{
|
|
177
206
|
"kind": "variable",
|
|
178
|
-
"name": "
|
|
179
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.currentState=\"collapsed\";this.phoneNumber=\"\";this.errorMessage=\"\";this.handleExpandedChange=async e=>{if(!this.disabled){if(!e.detail.expanded){this.handleCollapse();return}if(this.currentState===\"collapsed\"){if(!this.paymentMethod
|
|
207
|
+
"name": "Te",
|
|
208
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.currentState=\"collapsed\";this.phoneNumber=\"\";this.errorMessage=\"\";this.handleExpandedChange=async e=>{if(!this.disabled){if(!e.detail.expanded){this.handleCollapse();return}if(this.currentState===\"collapsed\"){if(!this.paymentMethod){this.errorMessage=E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"}),this.currentState=\"error\",R.error(\"Payment method not available when expanding MB WAY form\");return}this.currentState=\"expanded-input\",await this.updateComplete,this.shadowRoot?.querySelector(\"primer-pt-phone-number-input\")?.focus()}}};this.handleCollapse=()=>{this.currentState=\"collapsed\",this.phoneNumber=\"\",this.errorMessage=\"\"};this.handleInput=e=>{this.phoneNumber=e.detail,this.currentState===\"error\"&&(this.currentState=\"expanded-input\",this.errorMessage=\"\")};this.handleRetry=async()=>{this.currentState=\"expanded-input\",this.errorMessage=\"\",this.phoneNumber=\"\",await this.updateComplete,this.shadowRoot?.querySelector(\"primer-pt-phone-number-input\")?.focus()}}get isExpanded(){return this.currentState!==\"collapsed\"}get isPhoneValid(){return this.phoneNumber.length>=Ed&&this.phoneNumber.length<=Ad&&/^\\+\\d+$/.test(this.phoneNumber)}async submit(){if(this.currentState===\"loading\")return;if(!this.isPhoneValid){this.errorMessage=E(\"telephoneNumberErrorTooShort\",{id:\"telephoneNumberErrorTooShort\"}),this.currentState=\"error\";return}let e=this.paymentMethod;if(!e){this.errorMessage=\"MB WAY payment method not initialized\",this.currentState=\"error\",R.error(\"MB WAY payment method not available\");return}this.currentState=\"loading\",this.errorMessage=\"\";try{e.setPhoneNumber(this.phoneNumber),await e.start(),this.currentState=\"collapsed\",this.phoneNumber=\"\"}catch(a){this.currentState=\"error\",this.errorMessage=a instanceof Error?a.message:E(\"tokenizationError\",{id:\"tokenizationError\"})}}renderExpandedInput(){return p`<div class=\"mbway-input-wrapper\"><label class=\"mbway-label\" for=\"primer-mbway-phone\">${E(\"telephoneNumberLabel\",{id:\"telephoneNumberLabel\"})}</label><primer-pt-phone-number-input input-id=\"primer-mbway-phone\" .value=${this.phoneNumber} .placeholder=${E(\"telephoneNumberPlaceholder\",{id:\"telephoneNumberPlaceholder\"})} .maxLength=${Ad} .minLength=${Ed} ?disabled=${this.disabled} ?has-errors=${!!this.errorMessage} @input=${this.handleInput} ></primer-pt-phone-number-input><button class=\"mbway-submit-button\" @click=${()=>void this.submit()} ?disabled=${this.disabled||!this.isPhoneValid} >${E(\"pay\",{id:\"pay\"})}</button></div>`}renderLoading(){let e=E(\"Complete your payment in {appName}\",{id:\"completeYourPaymentInTheApp\"}).replace(\"{appName}\",\"MB WAY\");return p`<div class=\"mbway-loading\"><primer-spinner size=\"medium\"></primer-spinner><div class=\"mbway-loading-message\">${e}</div></div>`}renderError(){return p`<div class=\"mbway-error\"><div class=\"mbway-error-message\" role=\"alert\">${this.errorMessage||E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}</div><button class=\"mbway-retry-button\" @click=${this.handleRetry} ?disabled=${this.disabled} >${E(\"retry_button\",{id:\"retry_button\"})}</button></div>`}renderExpandedState(){switch(this.currentState){case\"expanded-input\":return this.renderExpandedInput();case\"loading\":return this.renderLoading();case\"error\":return this.renderError();default:return y}}render(){return p`<primer-payment-method-accordion .type=${this.paymentMethod?.type} ?disabled=${this.disabled} .expanded=${this.isExpanded} @expanded-change=${this.handleExpandedChange} >${this.isExpanded?this.renderExpandedState():y}</primer-payment-method-accordion>`}}"
|
|
180
209
|
},
|
|
181
210
|
{
|
|
182
211
|
"kind": "variable",
|
|
183
|
-
"name": "
|
|
184
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.isExpanded=!1;this.isLoading=!1;this.handleExpandedChange=e=>{this.isExpanded=e.detail.expanded,this.isExpanded?this.loadQRCode():(this.paymentMethod?.
|
|
212
|
+
"name": "be",
|
|
213
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.isExpanded=!1;this.isLoading=!1;this.handleExpandedChange=e=>{this.isExpanded=e.detail.expanded,this.isExpanded?this.loadQRCode():(this.paymentMethod?.stop(),this.qrCodeUrl=void 0,this.isLoading=!1)}}disconnectedCallback(){super.disconnectedCallback(),this.isExpanded&&this.paymentMethod?.stop()}async loadQRCode(){!this.paymentMethod||this.isLoading||(this.isLoading=!0,this.paymentMethod.setOnQRCodeReceived(e=>{this.qrCodeUrl=e,this.isLoading=!1}),await this.paymentMethod.start())}willUpdate(e){e.has(\"primerContext\")&&this.isLoading&&this.isExpanded&&this.primerContext?.sdkState.paymentFailure&&(this.isLoading=!1,this.isExpanded=!1,this.qrCodeUrl=void 0)}renderQRCode(){return this.isLoading?p`<div class=\"qrcode-loading\"><primer-spinner size=\"medium\"></primer-spinner></div>`:p`<div class=\"qrcode-content\"><div class=\"qrcode-labels\"><h3 class=\"qrcode-title\">${E(\"scanToPay\",{id:\"scanToPay\"})}</h3><p class=\"qrcode-description\">${E(\"uploadScreenshot\",{id:\"uploadScreenshot\"})}</p></div><div class=\"qrcode-image\">${this.qrCodeUrl?p`<img src=${this.qrCodeUrl} alt=${E(\"qrCode\",{id:\"qrCode\"})} />`:y}</div></div>`}render(){return p`<primer-payment-method-accordion .type=${this.paymentMethod?.type} ?disabled=${this.disabled&&!this.isExpanded} ?loading=${this.isLoading} .expanded=${this.isExpanded} suppress-blur-collapse @expanded-change=${this.handleExpandedChange} >${this.isExpanded?this.renderQRCode():y}</primer-payment-method-accordion>`}}"
|
|
185
214
|
},
|
|
186
215
|
{
|
|
187
216
|
"kind": "variable",
|
|
188
|
-
"name": "
|
|
189
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
217
|
+
"name": "Ve",
|
|
218
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this._setupTask=new V(this,{task:([e,a])=>{if(!e||!a)return U;let i=a.getPaymentMethodConfiguration(e);if(!i)return U;let n=Pd(e)?this.primerContext?.clientOptions?.giftCard:void 0,o=i.displayMetadata.button,s=this._getBackgroundColor(e,o,n?.background),l=this._getTextColor(s);return{backgroundColor:s,textColor:l,name:i.name,alt:n?.logoAlt??i.name,displayName:this._getDisplayName(e,o.text,n?.text),iconUrl:this._getIconUrl(e,o,s,n?.logoSrc),iconPosition:this._getIconPosition(e,o)}},args:()=>[this.type,this.primerContext?.headlessUtils]})}_legacyGetButtonLabel(e){if(!e)return;let a=e?Hn(e):\"\";return a===\"payWith\"&&(a=\"pay_with\"),E(a,{id:a})}_getBackgroundColor(e,a,i){switch(e){case I.KLARNA:case I.ADYEN_KLARNA:return a.backgroundColor.light??a.backgroundColor.colored;default:return i??a.backgroundColor.colored??a.backgroundColor.light}}_getIconUrl(e,a,i,n){if(n)return n;switch(e){case I.KLARNA:case I.ADYEN_KLARNA:return xg;case I.PAY_NL_PAYCONIQ:return i===a.backgroundColor.light?Ng:Lg;case I.ADYEN_CASHAPP:return a.iconUrl.dark??a.iconUrl.colored??a.iconUrl.light;default:return e===\"TRIPLE_A\"?wg:a.iconUrl.colored??a.iconUrl.light}}_getIconPosition(e,a){switch(e){case I.KLARNA:case I.ADYEN_KLARNA:return\"END\";default:return a.iconPositionRelativeToText||\"START\"}}_getTextColor(e){let a=e.replace(\"#\",\"\");if(a.length<6)return;let i=parseInt(a.substring(0,2),16),n=parseInt(a.substring(2,4),16),o=parseInt(a.substring(4,6),16);return isNaN(i)||isNaN(n)||isNaN(o)?void 0:(.2126*i+.7152*n+.0722*o)/255>.6?\"#000000\":\"#FFFFFF\"}_getDisplayName(e,a,i){switch(e){case I.KLARNA:return this.primerContext?.clientOptions?.klarna?.buttonOptions?.text??i??this._legacyGetButtonLabel(a)??this._legacyGetButtonLabel(\"Pay with\");case I.ADYEN_KLARNA:return this.primerContext?.clientOptions?.adyenKlarna?.buttonOptions?.text??i??this._legacyGetButtonLabel(a)??this._legacyGetButtonLabel(\"Pay with\");default:return i??this._legacyGetButtonLabel(a)}}_handleClick(){this.disabled||this.dispatchEvent(new Event(\"payment-method-click\",{bubbles:!0,composed:!0}))}render(){return this._setupTask.render({error:()=>y,complete:e=>{this.style.setProperty(\"--payment-method-button-bg-color\",e.backgroundColor),e.textColor&&this.style.setProperty(\"--payment-method-button-text-color\",e.textColor);let a={loading:yt(this.primerContext?.sdkState),\"icon-end\":e.iconPosition===\"END\",\"image-only\":!e.displayName};return p`<primer-button @click=\"${()=>this._handleClick()}\" class=${Z(a)} title=\"${E(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" ?disabled=${this.disabled} ><img src=\"${e.iconUrl}\" alt=\"${e.alt}\" />${N(e.displayName,()=>p`<span class=\"button-text\">${e.displayName}</span>`)}</primer-button>`}})}}"
|
|
190
219
|
},
|
|
191
220
|
{
|
|
192
221
|
"kind": "variable",
|
|
193
|
-
"name": "
|
|
194
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1}
|
|
222
|
+
"name": "He",
|
|
223
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1}_handleClick(){this.disabled||!this.paymentMethod||this.primerContext?.sdkState.isProcessing||(this.primerContext?.setProcessing?.(!0),this.paymentMethod.start())}render(){return p`<primer-payment-method-button .type=${this.paymentMethod?.type} ?disabled=${this.disabled} @payment-method-click=${()=>this._handleClick()} ></primer-payment-method-button>`}}"
|
|
195
224
|
},
|
|
196
225
|
{
|
|
197
226
|
"kind": "variable",
|
|
198
|
-
"name": "
|
|
199
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.
|
|
227
|
+
"name": "Re",
|
|
228
|
+
"default": "class extends b{constructor(){super(...arguments);this.type=void 0;this.disabled=!1;this.isActive=!1;this.handleClick=()=>{this.disabled||this.primerContext?.paymentMethods?.find(a=>a.type===this.type)?.managerType===\"CARD\"||this.primerContext?.telemetry?.analytics.sendEvent({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:this.type})}}updated(){let e=!!this.primerContext?.sdkState?.isProcessing;this.toggleAttribute(\"processing-inactive\",e&&!this.isActive)}render(){if(!this.type)return y;let e=this.primerContext?.paymentMethods.find(i=>i.type===this.type);if(!e)return y;let a;switch(e?.managerType){case\"CARD\":a=p`<primer-card-form ?disabled=${this.disabled} ></primer-card-form>`;break;case\"NATIVE\":a=p`<primer-native-payment .paymentMethod=${e} ?disabled=${this.disabled} ></primer-native-payment>`;break;case\"QRCODE\":a=p`<primer-qrcode .paymentMethod=${e} ?disabled=${this.disabled} ></primer-qrcode>`;break;case\"BLIK\":a=p`<primer-blik .paymentMethod=${e} ?disabled=${this.disabled} ></primer-blik>`;break;case\"BACKEND_DRIVEN\":a=p`<primer-backend-driven .paymentMethod=${e} ?disabled=${this.disabled} ></primer-backend-driven>`;break;case\"REDIRECT\":a=p`<primer-redirect-payment .paymentMethod=${e} ?disabled=${this.disabled} ></primer-redirect-payment>`;break;case\"KLARNA\":a=p`<primer-klarna .paymentMethod=${e} ?disabled=${this.disabled} ></primer-klarna>`;break;case\"ADYEN_KLARNA\":a=p`<primer-adyen-klarna .paymentMethod=${e} ?disabled=${this.disabled} ></primer-adyen-klarna>`;break;case\"MBWAY\":a=p`<primer-adyen-mbway .paymentMethod=${e} ?disabled=${this.disabled} ></primer-adyen-mbway>`;break;default:return y}return p`<div @click=${this.handleClick} @expanded-change=${i=>{this.isActive=i.detail.expanded}} >${a}</div>`}}"
|
|
200
229
|
},
|
|
201
230
|
{
|
|
202
231
|
"kind": "variable",
|
|
203
|
-
"name": "
|
|
204
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1}
|
|
232
|
+
"name": "Be",
|
|
233
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1}getFilteredMethods(){if(!this.primerContext?.paymentMethods)return[];let e=[...this.primerContext.paymentMethods];if(this.include){let a=this.include.split(\",\").map(i=>i.trim());e=e.filter(i=>a.includes(i.type))}if(this.exclude){let a=this.exclude.split(\",\").map(i=>i.trim());e=e.filter(i=>!a.includes(i.type))}return e}render(){let e=this.getFilteredMethods();return e.length===0?y:p`<div class=\"payment-methods-container\">${e.map(a=>p`<primer-payment-method type=\"${a.type}\" ?disabled=\"${this.disabled||this.primerContext?.clientOptions?.disabledPayments===!0}\" ></primer-payment-method>`)}</div>`}}"
|
|
205
234
|
},
|
|
206
235
|
{
|
|
207
236
|
"kind": "variable",
|
|
208
|
-
"name": "
|
|
209
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
237
|
+
"name": "$e",
|
|
238
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1}_handleClick(){this.disabled||!this.paymentMethod||this.primerContext?.sdkState.isProcessing||(this.primerContext?.setProcessing?.(!0),this.paymentMethod.start())}render(){return p`<primer-payment-method-button .type=${this.paymentMethod?.type} ?disabled=${this.disabled} @payment-method-click=${()=>this._handleClick()} ></primer-payment-method-button>`}}"
|
|
210
239
|
},
|
|
211
240
|
{
|
|
212
241
|
"kind": "variable",
|
|
213
|
-
"name": "
|
|
214
|
-
"default": "class extends b{constructor(){super();this.
|
|
242
|
+
"name": "ae",
|
|
243
|
+
"default": "class extends b{constructor(){super(...arguments);this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new V(this,{task:async([e,a])=>{if(!e||!a)return U;let i=this.extractFieldConfig(e);return await this.initializeCountryOptions(),i},args:()=>[this.primerContext?.configuration??null,this.primerContext?.headlessUtils]})}connectedCallback(){super.connectedCallback(),this._initializationTask.value}extractFieldConfig(e){if(e?.checkoutModules){let a=e.checkoutModules.find(i=>i.type===\"BILLING_ADDRESS\");if(a?.options){let i=a.options;return Object.keys(jn).reduce((n,o)=>({...n,[o]:i[o]??!1}),{})}}return this.defaultFieldConfig}async initializeCountryOptions(){try{let e=Yn(\"en\");this.countryOptions=[...e.map(([n,o])=>({value:n,label:o}))],this.requestUpdate(\"countryOptions\");let a=Sn();if(a===\"en\"||a===\"en-GB\"||a.startsWith(\"en-\"))return;if(await uc(a)){let n=Yn(a);this.countryOptions=[...n.map(([o,s])=>({value:o,label:s}))],this.requestUpdate(\"countryOptions\")}}catch(e){tr(this.primerContext?.telemetry,\"Failed to load country locale\",{error:e})}}get fieldConfig(){return this.extractFieldConfig(this.primerContext?.configuration)}get defaultFieldConfig(){return Object.keys(jn).reduce((e,a)=>({...e,[a]:!1}),{})}get shouldShowForm(){return this.fieldConfig.postalCode}handleInput(e,a){this.formData={...this.formData,[e]:a},this.dirtyFields.add(e),(this.submitted||this.dirtyFields.has(e)&&this.touchedFields.has(e))&&this.validateField(e),this.dispatchEvent(new CustomEvent(\"primer-billing-address-change\",{detail:this.formData,bubbles:!0,composed:!0}))}handleFocus(e){this.focusedField=e}handleBlur(e){this.focusedField=null,this.touchedFields.add(e),this.validateField(e)}validateField(e){let a=this.formData[e],i=this.fieldConfig[e];if(!i){delete this.errors[e];return}if(i&&(!a||a.trim()===\"\")){let n=`${e}ErrorRequired`;this.errors={...this.errors,[e]:E(\"This field is required\",{id:n})}}else{let n={...this.errors};delete n[e],this.errors=n}}validateForm(){return Object.keys(jn).forEach(e=>{let a=e;this.fieldConfig[a]&&this.validateField(a)}),Object.keys(this.errors).length===0}async validateForSubmission(){if(!this.shouldShowForm)return!0;this.submitted=!0,Object.keys(this.fieldConfig).forEach(a=>{this.fieldConfig[a]&&this.touchedFields.add(a)});let e=this.validateForm();return this.requestUpdate(),await this.updateComplete,e}async submitToSDK(){if(this.primerContext?.headlessUtils?.setBillingAddress)try{return await this.primerContext?.headlessUtils.setBillingAddress(this.formData),this.dispatchEvent(new CustomEvent(\"primer-billing-address-submit\",{detail:this.formData,bubbles:!0,composed:!0})),!0}catch{return!1}return!0}shouldShowError(e){let a=!!this.errors[e],i=this.dirtyFields.has(e),n=this.touchedFields.has(e);return a&&(this.submitted||i&&n)}render(){return this._initializationTask.render({pending:()=>y,error:()=>y,complete:()=>this.shouldShowForm?(this.removeAttribute(\"hidden\"),p`<div class=\"billing-address-form\"><div class=\"billing-address-title\">${E(\"Billing address\",{id:\"billingAddressLabel\"})}</div>${N(this.fieldConfig.countryCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"countryCode\"} .hasError=${this.shouldShowError(\"countryCode\")} ><primer-input-label slot=\"label\">${E(\"Country code\",{id:\"countryCodeLabel\"})}</primer-input-label><primer-select slot=\"input\" id=\"countryCode\" name=\"countryCode\" .value=${this.formData.countryCode||\"\"} .options=${this.countryOptions} .hasError=${this.shouldShowError(\"countryCode\")} placeholder=${E(\"Select a country\",{id:\"countrySelectPlaceholder\"})} @input=${e=>this.handleInput(\"countryCode\",e.detail)} @focus=${()=>this.handleFocus(\"countryCode\")} @blur=${()=>this.handleBlur(\"countryCode\")} ></primer-select>${N(this.shouldShowError(\"countryCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.countryCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${N(this.fieldConfig.firstName||this.fieldConfig.lastName,()=>p`<div class=\"billing-address-row\">${N(this.fieldConfig.firstName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"firstName\"} .hasError=${this.shouldShowError(\"firstName\")} ><primer-input-label slot=\"label\">${E(\"First name\",{id:\"firstNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"firstName\" name=\"firstName\" type=\"text\" .value=${this.formData.firstName||\"\"} placeholder=${E(\"First name\",{id:\"firstNamePlaceholder\"})} @input=${e=>this.handleInput(\"firstName\",e.detail)} @focus=${()=>this.handleFocus(\"firstName\")} @blur=${()=>this.handleBlur(\"firstName\")} ></primer-input>${N(this.shouldShowError(\"firstName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.firstName}</primer-input-error>`)}</primer-input-wrapper>`)} ${N(this.fieldConfig.lastName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"lastName\"} .hasError=${this.shouldShowError(\"lastName\")} ><primer-input-label slot=\"label\">${E(\"Last name\",{id:\"lastNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"lastName\" name=\"lastName\" type=\"text\" .value=${this.formData.lastName||\"\"} placeholder=${E(\"Last name\",{id:\"lastNamePlaceholder\"})} @input=${e=>this.handleInput(\"lastName\",e.detail)} @focus=${()=>this.handleFocus(\"lastName\")} @blur=${()=>this.handleBlur(\"lastName\")} ></primer-input>${N(this.shouldShowError(\"lastName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.lastName}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${N(this.fieldConfig.addressLine1,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine1\"} .hasError=${this.shouldShowError(\"addressLine1\")} ><primer-input-label slot=\"label\">${E(\"Address line 1\",{id:\"addressLine1\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine1\" name=\"addressLine1\" type=\"text\" .value=${this.formData.addressLine1||\"\"} placeholder=${E(\"Address line 1\",{id:\"addressLine1Placeholder\"})} @input=${e=>this.handleInput(\"addressLine1\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine1\")} @blur=${()=>this.handleBlur(\"addressLine1\")} ></primer-input>${N(this.shouldShowError(\"addressLine1\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine1}</primer-input-error>`)}</primer-input-wrapper>`)} ${N(this.fieldConfig.addressLine2,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine2\"} .hasError=${this.shouldShowError(\"addressLine2\")} ><primer-input-label slot=\"label\">${E(\"Address line 2\",{id:\"addressLine2\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine2\" name=\"addressLine2\" type=\"text\" .value=${this.formData.addressLine2||\"\"} placeholder=${E(\"Address line 2\",{id:\"addressLine2Placeholder\"})} @input=${e=>this.handleInput(\"addressLine2\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine2\")} @blur=${()=>this.handleBlur(\"addressLine2\")} ></primer-input>${N(this.shouldShowError(\"addressLine2\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine2}</primer-input-error>`)}</primer-input-wrapper>`)} ${N(this.fieldConfig.postalCode||this.fieldConfig.city,()=>p`<div class=\"billing-address-row\">${N(this.fieldConfig.postalCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"postalCode\"} .hasError=${this.shouldShowError(\"postalCode\")} ><primer-input-label slot=\"label\">${E(\"Postal code\",{id:\"postalCodeLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"postalCode\" name=\"postalCode\" type=\"text\" .value=${this.formData.postalCode||\"\"} placeholder=${E(\"90210\",{id:\"postalCodePlaceholder\"})} @input=${e=>this.handleInput(\"postalCode\",e.detail)} @focus=${()=>this.handleFocus(\"postalCode\")} @blur=${()=>this.handleBlur(\"postalCode\")} ></primer-input>${N(this.shouldShowError(\"postalCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.postalCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${N(this.fieldConfig.city,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"city\"} .hasError=${this.shouldShowError(\"city\")} ><primer-input-label slot=\"label\">${E(\"City\",{id:\"cityLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"city\" name=\"city\" type=\"text\" .value=${this.formData.city||\"\"} placeholder=${E(\"Cape Town\",{id:\"cityPlaceholder\"})} @input=${e=>this.handleInput(\"city\",e.detail)} @focus=${()=>this.handleFocus(\"city\")} @blur=${()=>this.handleBlur(\"city\")} ></primer-input>${N(this.shouldShowError(\"city\"),()=>p`<primer-input-error slot=\"error\">${this.errors.city}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${N(this.fieldConfig.state,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"state\"} .hasError=${this.shouldShowError(\"state\")} ><primer-input-label slot=\"label\">${E(\"State / Region / County\",{id:\"stateLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"state\" name=\"state\" type=\"text\" .value=${this.formData.state||\"\"} placeholder=${E(\"State / Region / County\",{id:\"statePlaceholder\"})} @input=${e=>this.handleInput(\"state\",e.detail)} @focus=${()=>this.handleFocus(\"state\")} @blur=${()=>this.handleBlur(\"state\")} ></primer-input>${N(this.shouldShowError(\"state\"),()=>p`<primer-input-error slot=\"error\">${this.errors.state}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`):(this.setAttribute(\"hidden\",\"\"),y)})}}"
|
|
215
244
|
},
|
|
216
245
|
{
|
|
217
246
|
"kind": "variable",
|
|
218
|
-
"name": "
|
|
219
|
-
"default": "class extends b{constructor(){super(
|
|
247
|
+
"name": "ie",
|
|
248
|
+
"default": "class extends b{constructor(){super();this.hasSlottedSubmit=!1;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\";this.animationDuration=300;this._isHandlingContextEvent=!1;this._contextVaultSubmitListener=null;this.deleteAssetConfig=null;this.handleSubmitSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasSlottedSubmit=i.length>0};this.handleToggleEditMode=e=>{this.isEditMode=e.detail,this.deletePaymentMethodId=null,this.isEditMode&&this.primerContext?.vaultItem&&this.primerContext?.vaultItem.setSelectedVaultedPaymentMethod(null)};this.handleDeletePaymentMethod=async e=>{if(this.deletePaymentMethodId=e.detail,this.deletePaymentMethodId&&this.primerContext?.vaultManager&&this.primerContext?.headlessUtils){let a=this.primerContext?.vaultManager.vaultedPaymentMethods.find(i=>i.id===this.deletePaymentMethodId);a&&(this.deleteAssetConfig=await Ha(a,this.primerContext?.headlessUtils,this.primerContext?.vaultManager))}};this.handleCancelDelete=()=>{this.deletePaymentMethodId=null,this.deleteAssetConfig=null};this.handleConfirmDelete=async()=>{if(!this.primerContext?.vaultManager?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.primerContext?.vaultManager.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null,this.deleteAssetConfig=null}catch(e){this.errorMessage=e instanceof Error?e.message:E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}};this.handlePaymentError=e=>{let a=e.detail?.error;this.errorMessage=a instanceof Error?a.message:E(\"payment_processing_error\",{id:\"payment_processing_error\"})};this.handleCloseError=()=>{this.errorMessage=\"\"};this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitVaultPayment())};this.handleDirectSubmit=()=>{this.submitVaultPayment()};this.handleContextVaultSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitVaultPayment())}finally{this._isHandlingContextEvent=!1}}};new cr(this,{defaultOptions:{keyframeOptions:{duration:Number(getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-duration\").trim().replace(\"ms\",\"\")),easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim()}}})}getAnimationConfig(){return{keyframeOptions:{duration:this.animationDuration,easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim(),fill:\"both\"}}}isSubmitButton(e){let a=e.tagName.toLowerCase(),i=a===\"button\",n=a===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitVaultPayment(){if(this.primerContext?.vaultManager)try{await this.primerContext?.vaultManager.startVaultedPaymentFlow()}catch(e){this.dispatchEvent(new CustomEvent(\"primer-vault-payment-error\",{detail:{error:e},bubbles:!0,composed:!0}))}}getPaymentMethodName(e){if(!this.primerContext?.vaultManager)return\"\";let a=this.primerContext?.vaultManager.vaultedPaymentMethods.find(i=>i.id===e);if(!a)return\"\";try{return Wn(a,this.primerContext?.telemetry).description||\"\"}catch{return\"\"}}setupContextEventListeners(){this.primerContext?.events?.host&&this._contextVaultSubmitListener&&this.primerContext?.events.host.addEventListener(\"primer:vault-submit\",this._contextVaultSubmitListener)}cleanupContextEventListeners(){this.primerContext?.events?.host&&this._contextVaultSubmitListener&&this.primerContext?.events.host.removeEventListener(\"primer:vault-submit\",this._contextVaultSubmitListener)}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:vault-submit\",this.handleDirectSubmit),this._contextVaultSubmitListener=e=>{this.handleContextVaultSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:vault-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}renderLoadingOverlay(){return p`<div class=\"loading-overlay\" ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ><primer-spinner size=\"medium\" color=\"var(--primer-color-loader)\" ></primer-spinner></div>`}renderDeleteConfirmation(){if(!this.deletePaymentMethodId||!this.deleteAssetConfig)return y;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return p`<div class=\"delete-confirmation-container\"><primer-button disabled variant=\"secondary\"><primer-payment-method-content .assetConfig=${this.deleteAssetConfig} ></primer-payment-method-content></primer-button><primer-vault-delete-confirmation .isDeleting=${this.isDeleting} .paymentMethodId=${this.deletePaymentMethodId} .paymentMethodName=${e} @confirm-delete=${this.handleConfirmDelete} @cancel-delete=${this.handleCancelDelete} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-delete-confirmation></div>`}renderPaymentMethodItem(e){return this.deletePaymentMethodId===e.id?y:p`<primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-method-item>`}renderPaymentMethodList(){let e=this.primerContext?.vaultManager?.vaultedPaymentMethods||[],a=!this.isEditMode&&e.length>0&&!this.deletePaymentMethodId;return p`<div class=\"payment-methods-list\">${e.map(i=>this.renderPaymentMethodItem(i))} ${N(a,()=>p`<div class=\"submit-button-container\"><slot name=\"submit-button\" @slotchange=${this.handleSubmitSlotChange} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></slot>${N(!this.hasSlottedSubmit,()=>p`<primer-vault-payment-submit class=\"submit-button\" @primer-vault-payment-error=${this.handlePaymentError} ></primer-vault-payment-submit>`)}</div>`,()=>y)}</div>`}render(){if(!this.primerContext?.vaultManager?.enabled||this.primerContext?.vaultManager?.headless)return y;let e=this.primerContext?.vaultManager.vaultedPaymentMethods.length>0,a=this.primerContext?.vaultManager.isLoading,i=this.primerContext?.vaultManager.isUpdating;return p` ${N(!this.primerContext?.vaultManager?.showEmptyState&&!e,()=>y,()=>p`<slot name=\"vault-empty-state\"><div class=\"vault-manager ${i?\"is-updating\":\"\"}\"><primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header>${N(this.errorMessage,()=>p`<primer-vault-error-message .errorMessage=${this.errorMessage} @close-error=${this.handleCloseError} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-error-message>`,()=>y)}<div class=\"vault-manager-content\">${N(!a&&!e,()=>p`<div class=\"content-container\"><primer-vault-empty-state ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-empty-state></div>`,()=>y)} ${N(!a&&e,()=>p`<div class=\"content-container\">${N(this.deletePaymentMethodId,()=>this.renderDeleteConfirmation(),()=>this.renderPaymentMethodList())}</div>`,()=>y)}</div>${N(i,()=>this.renderLoadingOverlay(),()=>y)}</div></slot>`)} `}}"
|
|
220
249
|
},
|
|
221
250
|
{
|
|
222
251
|
"kind": "variable",
|
|
223
|
-
"name": "
|
|
224
|
-
"default": "class extends b{constructor(){super(...arguments);this.isEditMode=!1;this.
|
|
252
|
+
"name": "Pe",
|
|
253
|
+
"default": "class extends b{constructor(){super(...arguments);this.paymentMethod=void 0;this.isEditMode=!1;this._getAssetsTask=new V(this,{task:async([e,a,i])=>await Ha(e,a,i),args:()=>[this.paymentMethod,this.primerContext?.headlessUtils,this.primerContext?.vaultManager]});this.handleClick=()=>{this.isEditMode||!this.primerContext?.vaultManager||!this.paymentMethod||(this.isSelected()?this.primerContext?.vaultItem?.setSelectedVaultedPaymentMethod(null):this.primerContext?.vaultItem?.setSelectedVaultedPaymentMethod(this.paymentMethod))};this.handleDeleteClick=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent(\"delete-payment-method\",{detail:this.paymentMethod?.id,bubbles:!0,composed:!0}))}}isSelected(){if(!this.primerContext?.vaultManager||!this.paymentMethod)return!1;let e=this.primerContext?.vaultItem?.selectedVaultedPaymentMethod;return!!e&&e.id===this.paymentMethod.id}render(){return this._getAssetsTask.render({error:()=>y,complete:e=>{let a=this.isSelected()?\"checked\":\"default\",i=!1,n=e?.description;return p`<div class=\"payment-method-wrapper\"><div class=\"payment-method-container\"><primer-button variant=\"secondary\" class=\"payment-method-button ${e.shouldShowCVV?\"with-cvv\":\"\"}\" selectable ?disabled=${this.isEditMode} selectionState=${a} .flex=${i} @click=${this.handleClick} ><primer-payment-method-content .assetConfig=${e} ></primer-payment-method-content>${N(e.shouldShowCVV&&this.isSelected()&&!this.isEditMode,()=>p`<div class=\"payment-method-row mt-2\"><span class=\"flex-center\"><primer-icon name=\"lock\" size=\"sm\"></primer-icon><span class=\"payment-method-subtitle\"> Input the card CVV for a secure payment</span ></span><span class=\"cell-2\"><primer-vault-cvv-input .paymentMethod=\"${this.paymentMethod}\" ><span slot=\"label\"></span></primer-vault-cvv-input></span></div>`,()=>y)}</primer-button>${this.isEditMode?p`<primer-button variant=\"tertiary\" class=\"delete-button\" @click=${this.handleDeleteClick} aria-label=${`${E(\"delete\",{id:\"delete\"})} ${n}`} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></primer-button>`:y}</div></div>`}})}}"
|
|
225
254
|
},
|
|
226
255
|
{
|
|
227
256
|
"kind": "variable",
|
|
228
|
-
"name": "
|
|
229
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
257
|
+
"name": "De",
|
|
258
|
+
"default": "class extends b{constructor(){super(...arguments);this.isEditMode=!1;this.hasPaymentMethods=!1;this.toggleEditMode=()=>{this.dispatchEvent(new CustomEvent(\"toggle-edit-mode\",{detail:!this.isEditMode,bubbles:!0,composed:!0}))}}render(){return p`<div class=\"vault-manager-header\"><h3>${E(\"previouslyUsed\",{id:\"previouslyUsed\"})}</h3>${this.hasPaymentMethods?p`<primer-button variant=\"tertiary\" class=\"edit-button ${this.isEditMode?\"active\":\"\"}\" @click=${this.toggleEditMode} aria-label=${this.isEditMode?E(\"confirm\",{id:\"confirm\"}):E(\"editPaymentMethods\",{id:\"editPaymentMethods\"})} >${this.isEditMode?p`<primer-icon name=\"checkmark\" size=\"sm\"></primer-icon>`:p`<primer-icon name=\"edit\" size=\"sm\"></primer-icon>`}</primer-button>`:y}</div>`}}"
|
|
230
259
|
},
|
|
231
260
|
{
|
|
232
261
|
"kind": "variable",
|
|
233
|
-
"name": "
|
|
234
|
-
"default": "class extends b{render(){return p`<div class=\"
|
|
262
|
+
"name": "ke",
|
|
263
|
+
"default": "class extends b{constructor(){super(...arguments);this.isDeleting=!1;this.paymentMethodId=\"\";this.paymentMethodName=\"\";this.handleConfirmClick=()=>{this.dispatchEvent(new CustomEvent(\"confirm-delete\",{bubbles:!0,composed:!0}))};this.handleCancelClick=()=>{this.dispatchEvent(new CustomEvent(\"cancel-delete\",{bubbles:!0,composed:!0}))}}render(){return p`<div class=\"delete-confirmation\"><p class=\"delete-confirmation-text\"> Are you sure you want to delete this payment method? </p><div class=\"delete-actions\"><primer-button variant=\"secondary\" @click=${this.handleCancelClick} ?disabled=${this.isDeleting} >${E(\"cancel\",{id:\"cancel\"})}</primer-button><primer-button @click=${this.handleConfirmClick} ?disabled=${this.isDeleting} >${this.isDeleting?E(\"deleting\",{id:\"deleting\"}):E(\"confirmVaultedPaymentMethodDeletion\",{id:\"confirmVaultedPaymentMethodDeletion\"})}</primer-button></div></div>`}}"
|
|
235
264
|
},
|
|
236
265
|
{
|
|
237
266
|
"kind": "variable",
|
|
238
|
-
"name": "
|
|
239
|
-
"default": "class extends b{
|
|
267
|
+
"name": "at",
|
|
268
|
+
"default": "class extends b{render(){return p`<div class=\"empty-state\"><p>${E(\"savedPaymentMethodsEmpty\",{id:\"savedPaymentMethodsEmpty\"})}</p></div>`}}"
|
|
240
269
|
},
|
|
241
270
|
{
|
|
242
271
|
"kind": "variable",
|
|
243
|
-
"name": "
|
|
244
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
272
|
+
"name": "ze",
|
|
273
|
+
"default": "class extends b{constructor(){super(...arguments);this.errorMessage=\"\";this.handleDismiss=()=>{this.dispatchEvent(new CustomEvent(\"close-error\",{bubbles:!0,composed:!0}))}}render(){return p`<div class=\"error-message\"><div class=\"error-content\"><primer-icon name=\"warning\" size=\"sm\" color=\"var(--primer-color-red-500)\" ></primer-icon><p>${this.errorMessage}</p></div><button @click=${this.handleDismiss} aria-label=${E(\"closeErrorMessage\",{id:\"closeErrorMessage\"})} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></button></div>`}}"
|
|
245
274
|
},
|
|
246
275
|
{
|
|
247
276
|
"kind": "variable",
|
|
248
|
-
"name": "
|
|
249
|
-
"default": "class extends b{constructor(){super();this.
|
|
277
|
+
"name": "Se",
|
|
278
|
+
"default": "class extends b{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.variant=\"primary\";this.disabled=!1;this.handleClick=async e=>{if(e.preventDefault(),!this.isButtonDisabled)try{await this.primerContext?.vaultManager?.startVaultedPaymentFlow()}catch(a){let i=new CustomEvent(\"primer-vault-payment-error\",{bubbles:!0,composed:!0,detail:{error:a}});this.dispatchEvent(i)}}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:E(\"pay\",{id:\"pay\"})}set buttonText(e){let a=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",a)}get isButtonDisabled(){return!!(this.disabled||!this.primerContext?.vaultItem?.selectedVaultedPaymentMethod||this.primerContext?.vaultManager?.isLoading)}render(){let e=this.primerContext?.clientOptions?.submitButton?.amountVisible?this.primerContext?.headlessUtils?.getUIOrderAmount():null,a=e?` ${e}`:y;return p`<primer-button buttonType=\"submit\" variant=${this.variant} @click=${this.handleClick} .disabled=${this.isButtonDisabled} .loading=${yt(this.primerContext?.sdkState)} data-submit >${this.buttonText}${a}</primer-button>`}}"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "variable",
|
|
282
|
+
"name": "re",
|
|
283
|
+
"default": "class extends b{constructor(){super();this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this.isFocused=!1;this._setupCVVIframe=new V(this,{task:([e,a])=>!e||!a||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||a.createCvvInput===null?U:{network:e.paymentInstrumentData.network,createCvvInput:a.createCvvInput},args:()=>[this.paymentMethod,this.primerContext?.vaultManager]});this.cvvContainerId=`cvv-container-${Math.random().toString(36).substring(2,9)}`,new V(this,{task:async([e])=>{if(!e)return U;await this.updateComplete;let a=this.renderRoot.querySelector(`#${this.cvvContainerId}`);if(!a)return;let i=Ur(this.primerContext?.computedStyles??null),n=i?{input:{base:i}}:void 0,o={cardNetwork:e.network,container:a,name:\"cvv\",placeholder:\"123\",style:n,ariaLabel:E(\"CVV\",{id:\"cardCVV\"})};this.cvvInput=await e.createCvvInput?.(o)??null,this.cvvInput&&(this.cvvInput.focus(),this.cvvError=this.cvvInput.metadata.errorCode||null,this.primerContext?.vaultItem?.setCvvInput(this.cvvInput),this.cvvInput.addListener(\"change\",()=>{this.onCvvInputChange()}),this.cvvInput.addListener(\"blur\",()=>{this.onBlur()}),this.cvvInput.addListener(\"focus\",()=>{this.onFocus()}))},args:()=>[this._setupCVVIframe.value]})}disconnectedCallback(){super.disconnectedCallback(),this.cvvInput&&(this.cvvInput.remove(),this.cvvInput=null,this.cvvError=null,this.primerContext?.vaultItem?.setCvvInput(null))}onCvvInputChange(){!this.cvvInput||!this.primerContext?.vaultItem||(this.cvvInputIsDirty=!0,this.cvvError=this.cvvInput.metadata.errorCode||null)}onBlur(){this.cvvInput&&(this.cvvInputIsBlurred=!0,this.cvvError=this.cvvInput.metadata.errorCode||null,this.isFocused=!1)}onFocus(){this.isFocused=!0}render(){return this._setupCVVIframe.render({error:()=>y,complete:()=>p`<div class=\"cvv-input-container\"><primer-input-wrapper .focusWithin=${this.isFocused} .hasError=${!!this.cvvError&&(this.primerContext?.vaultItem?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred)} ><slot name=\"label\" slot=\"label\"><primer-input-label>CVV</primer-input-label></slot><div slot=\"input\" id=\"${this.cvvContainerId}\"></div>${N(this.cvvError&&(this.primerContext?.vaultItem?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred),()=>p`<primer-input-error slot=\"error\">${E(this.cvvError,{id:this.cvvError})}</primer-input-error>`)}</primer-input-wrapper></div>`})}}"
|
|
250
284
|
},
|
|
251
285
|
{
|
|
252
286
|
"kind": "variable",
|
|
253
|
-
"name": "
|
|
254
|
-
"default": "class extends b{constructor(){super(...arguments);this.assetConfig=null}render(){if(!this.assetConfig)return
|
|
287
|
+
"name": "Ye",
|
|
288
|
+
"default": "class extends b{constructor(){super(...arguments);this.assetConfig=null}render(){if(!this.assetConfig)return y;let e=this.assetConfig.description,a=this.assetConfig.icon,i=N(this.assetConfig.icon,()=>p`<img class=\"payment-method-icon\" src=${a} alt=${e} />`,()=>p`<div class=\"payment-method-icon payment-method-icon-generic\"><primer-icon name=\"payment-card\" size=\"sm\"></primer-icon></div>`);return this.assetConfig.type===\"paypal\"?p`<span class=\"payment-method-card\"><div class=\"payment-method-row\"><span class=\"payment-method-header\" >${this.assetConfig.fullName}</span ></div><div class=\"payment-method-row\"><span class=\"flex\">${i}<span class=\"payment-method-subtitle\" >${this.assetConfig.paymentMethodType}</span ></span></div></span>`:this.assetConfig.type===\"other\"&&this.assetConfig.paymentMethodType!==\"ACH\"?p`<div class=\"payment-method-card-other\"><div class=\"left-column\"><div class=\"payment-method-header\">${this.assetConfig.fullName}</div><div class=\"flex\">${i}<span class=\"payment-method-subtitle\" >${this.assetConfig.paymentMethodType}</span ></div></div><div class=\"payment-method-right-column-text\">${this.assetConfig.email||`\\u2022\\u2022\\u2022\\u2022 ${this.assetConfig.last4}`}</div></div>`:this.assetConfig.type===\"other\"&&this.assetConfig.paymentMethodType===\"ACH\"?p`<span class=\"payment-method-card\"><div class=\"payment-method-row\"><span class=\"payment-method-header\" >${this.assetConfig.fullName}</span ><span class=\"payment-method-header cell-2\" >•••• ${this.assetConfig.last4}</span ></div><div class=\"payment-method-row\"><span class=\"flex\">${i}<span class=\"payment-method-subtitle\" >${this.assetConfig.bankName}</span ></span><span class=\"payment-method-subtitle cell-2\" >${this.assetConfig.accountType}</span ></div></span>`:this.assetConfig.type===\"card\"?p`<span class=\"payment-method-card\"><div class=\"payment-method-row\"><span class=\"payment-method-header\" >${this.assetConfig.cardholderName}</span ><span class=\"payment-method-header cell-2\" >•••• ${this.assetConfig.last4}</span ></div><div class=\"payment-method-row\"><span class=\"flex\">${i}<span class=\"payment-method-subtitle\" >${this.assetConfig.network}</span ></span><span class=\"payment-method-subtitle cell-2\" >${this.assetConfig.expiresDate}</span ></div></span>`:this.assetConfig.type===\"GOOGLE_PAY\"?p`<span class=\"payment-method-card\"><div class=\"payment-method-row\">${i}<span class=\"payment-method-header cell-2\" >•••• ${this.assetConfig.last4}</span ></div><div class=\"payment-method-row\"><span class=\"payment-method-subtitle\" >${this.assetConfig.network}</span ><span class=\"payment-method-subtitle cell-2\" >${this.assetConfig.expiresDate}</span ></div></span>`:y}}"
|
|
255
289
|
},
|
|
256
290
|
{
|
|
257
291
|
"kind": "variable",
|
|
258
|
-
"name": "
|
|
259
|
-
"default": "class extends b{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=null;this.paymentMethodSelectionSent=!1;this.cardFormProvider=new
|
|
292
|
+
"name": "Ce",
|
|
293
|
+
"default": "class extends b{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=null;this.paymentMethodSelectionSent=!1;this.cardFormProvider=new gt(this,{context:ur,initialValue:null});this.eventsController=new Xt(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new V(this,{task:([e])=>{let a=e?.find(l=>l.type===I.PAYMENT_CARD);if(!a)return U;let{cardNumber:i,cardExpiryDate:n,cardSecurityCode:o,cardholderName:s}=a.iframes;return this.cardFormProvider.setValue({cardholderNameInput:s,cardNumberInput:i,expiryInput:n,cvvInput:o,setCardholderName:l=>{a.setCardholderName(l),this.shouldRequireCardholderName&&a.validate().then(c=>{let h=c?.validationErrors?.find(M=>M.name===Bc.cardholderName),g=this.inputControllers.get(\"cardholderName\");g&&g.updateMetaFromValidation({valid:!1,error:h?.message||h?.error||null,errorCode:h?.message||h?.error||null})})},setCardNetwork:l=>{this.selectedCardNetwork=l},validate:()=>a.validate(),submit:l=>a.submit(l),hideLabels:this.hideLabels,disabled:this.disabled,setSubmissionState:l=>{this.inputControllers.forEach(c=>{c.setSubmitted(l)})},propagateValidationErrors:l=>{l&&l.forEach(c=>{let u=c.field||c.name,h=c.message||c.error,g=Bc[u];if(g){let M=this.inputControllers.get(g);if(M){let L={valid:!1,error:h,errorCode:h};M.updateMetaFromValidation(L)}}})},registerInputController:(l,c)=>{this.inputControllers.set(l,c)},unregisterInputController:l=>{this.inputControllers.delete(l)},onUserInteraction:()=>{this.sendPaymentMethodSelectionEvent(),this.checkAndSendPaymentDetailsEnteredEvent()}}),!0},args:()=>[this.primerContext?.paymentMethods]});this.paymentDetailsEnteredSent=!1;this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitCardPayment())};this.handleDirectSubmit=e=>{e.stopPropagation(),this.submitCardPayment()};this.handleContextCardSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitCardPayment())}finally{this._isHandlingContextEvent=!1}}};this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0};this.handleFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.submitCardPayment()}}updated(e){if(super.updated(e),(e.has(\"hideLabels\")||e.has(\"disabled\"))&&this.cardFormProvider.value&&this.cardFormProvider.setValue({...this.cardFormProvider.value,hideLabels:this.hideLabels,disabled:this.disabled}),e.has(\"context\")){let i=e.get(\"context\")?.events??null;i?.host&&this._contextCardSubmitListener&&i.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener),this.setupContextEventListeners()}}get shouldShowCardholderName(){let e=this.primerContext?.clientOptions?.card?.cardholderName;return typeof e?.visible==\"boolean\"?e.visible:!0}get shouldRequireCardholderName(){if(!this.shouldShowCardholderName)return!1;let e=this.primerContext?.clientOptions?.card?.cardholderName;return typeof e?.required==\"boolean\"?e.required:!0}sendPaymentMethodSelectionEvent(){this.paymentMethodSelectionSent||(this.paymentMethodSelectionSent=!0,this.primerContext?.telemetry?.analytics.sendEvent({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:\"PAYMENT_CARD\"}))}checkAndSendPaymentDetailsEnteredEvent(){if(this.paymentDetailsEnteredSent)return;let e=this.inputControllers.get(\"cardNumber\"),a=this.inputControllers.get(\"expire\"),i=this.inputControllers.get(\"cvv\"),n=e?.meta?.dirty===!0,o=a?.meta?.dirty===!0,s=i?.meta?.dirty===!0,l=!0;this.shouldRequireCardholderName&&(l=this.inputControllers.get(\"cardholderName\")?.meta?.dirty===!0),n&&o&&s&&l&&(this.sendPaymentDetailsEnteredEvent(),this.paymentDetailsEnteredSent=!0)}sendPaymentDetailsEnteredEvent(){this.primerContext?.telemetry?.analytics.sendEvent({eventName:\"PAYMENT_DETAILS_ENTERED\",paymentMethod:\"PAYMENT_CARD\"})}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:card-submit\",this.handleDirectSubmit),this._contextCardSubmitListener=e=>{this.handleContextCardSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:card-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}setupContextEventListeners(){this.primerContext?.events?.host&&this._contextCardSubmitListener&&this.primerContext?.events.host.addEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}cleanupContextEventListeners(){this.primerContext?.events?.host&&this._contextCardSubmitListener&&this.primerContext?.events.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}isSubmitButton(e){let a=e.tagName.toLowerCase(),i=a===\"button\",n=a===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value,a=this.primerContext?.sdkState.isProcessing;if(!e||this.disabled||a)return;this.primerContext?.setProcessing?.(!0),this.formErrorMessage=null,e.setSubmissionState?.(!0);let i=this.querySelector(\"primer-billing-address\")||this.renderRoot.querySelector(\"primer-billing-address\"),n=!0;i&&(n=await i.validateForSubmission());let o=await e.validate?.();if(o?.valid&&n){if(i&&!await i.submitToSDK()){let u=E(\"tokenizationError\",{id:\"tokenizationError\"});this.formErrorMessage=u,this.primerContext?.setProcessing?.(!1),this.eventsController.dispatchFormSubmitErrors([{field:\"billingAddress\",name:\"billingAddress\",error:\"BILLING_ADDRESS_SUBMISSION_FAILED\",message:u}]);return}let s={success:!0};this.eventsController.dispatchFormSubmitSuccess(s);let l=this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0;await e.submit?.(l)}else{this.primerContext?.setProcessing?.(!1);let s=o?.validationErrors;e.propagateValidationErrors?.(s||[]),this.cardFormProvider.setValue({...e,errors:s}),this.eventsController.dispatchFormSubmitErrors(s)}}render(){return this.setupCardFormTask.status===bt.ERROR||this.setupCardFormTask.status===bt.INITIAL?y:p`<form @submit=${this.handleFormSubmit}><slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot>${this.setupCardFormTask.render({complete:()=>N(this.hasAssignedContent,()=>y,()=>p`<div class=\"card-form\"><primer-input-card-number></primer-input-card-number><div class=\"card-form-row\"><primer-input-card-expiry></primer-input-card-expiry><primer-input-cvv></primer-input-cvv></div>${N(this.shouldShowCardholderName,()=>p`<primer-input-card-holder-name></primer-input-card-holder-name>`,()=>y)}<primer-billing-address></primer-billing-address></div><primer-card-form-submit></primer-card-form-submit><primer-error-message message=\"${this.formErrorMessage||\"\"}\" ?visible=\"${!!this.formErrorMessage}\" ></primer-error-message>`)})}</form>`}}"
|
|
260
294
|
},
|
|
261
295
|
{
|
|
262
296
|
"kind": "variable",
|
|
263
|
-
"name": "
|
|
264
|
-
"default": "class extends
|
|
297
|
+
"name": "it",
|
|
298
|
+
"default": "class extends ne{constructor(){super();this.config={inputType:\"cardNumber\",containerSelector:\"#cardNumber\",errorName:\"cardNumber-card\",translations:{label:{id:\"cardNumber\",defaultMessage:\"Card Number\"},placeholder:\"4111 1111 1111 1111\",ariaLabel:{id:\"cardNumber\",defaultMessage:\"Card Number\"}}};this.handleNetworkSelected=e=>{let{network:a}=e.detail;this.cardFormContext&&this.cardFormContext.setCardNetwork(a)};this.childUpdated()}renderInput(){if(this.hostedInputController.setupTask.status===bt.ERROR)return y;let e=this.getError();return p`<primer-input-wrapper .focusWithin=\"${this.hostedInputController.meta.active}\" .hasError=${!!e} >${N(!this.cardFormContext?.hideLabels,()=>p`<primer-input-label slot=\"label\" >${this.label}</primer-input-label >`,()=>y)}<div slot=\"input\" class=\"card-number-container\" aria-label=\"${this.ariaLabel}\" ><div id=\"${this.config.containerSelector.substring(1)}\"></div><div class=\"network-selector-container\"><primer-card-network-selector @network-selected=${this.handleNetworkSelected} ></primer-card-network-selector></div></div>${N(e,a=>p`<primer-input-error slot=\"error\">${E(a,{id:a})}</primer-input-error>`,()=>y)}</primer-input-wrapper>`}render(){return this.renderInput()}}"
|
|
265
299
|
},
|
|
266
300
|
{
|
|
267
301
|
"kind": "variable",
|
|
268
|
-
"name": "
|
|
269
|
-
"default": "class extends
|
|
302
|
+
"name": "nt",
|
|
303
|
+
"default": "class extends ne{constructor(){super();this.config={inputType:\"cvv\",containerSelector:\"#cvv\",errorName:\"cvv-card\",translations:{label:\"CVV\",placeholder:\"123\"}};this.childUpdated()}render(){return this.renderInput()}}"
|
|
270
304
|
},
|
|
271
305
|
{
|
|
272
306
|
"kind": "variable",
|
|
273
|
-
"name": "
|
|
274
|
-
"default": "class extends
|
|
307
|
+
"name": "ot",
|
|
308
|
+
"default": "class extends ne{constructor(){super();this.config={inputType:\"expire\",containerSelector:\"#expiry\",errorName:\"expiryDate-card\",translations:{label:{id:\"cardExpiry\",defaultMessage:\"Expiry Date\"},placeholder:{id:\"cardExpiryPlaceholder\",defaultMessage:\"MM/YY\"},ariaLabel:{id:\"cardExpiry\",defaultMessage:\"Expiry Date\"}}};this.childUpdated()}render(){return this.renderInput()}}"
|
|
275
309
|
},
|
|
276
310
|
{
|
|
277
311
|
"kind": "variable",
|
|
278
|
-
"name": "
|
|
279
|
-
"default": "class extends
|
|
312
|
+
"name": "st",
|
|
313
|
+
"default": "class extends ne{constructor(){super();this.config={inputType:\"cardholderName\",containerSelector:\"#cardFormName\",errorName:\"cardholderName\",translations:{label:{id:\"cardholderNameLabel\",defaultMessage:\"Cardholder Name\"},placeholder:{id:\"cardholderNamePlaceholder\",defaultMessage:\"Name on card\"},ariaLabel:{id:\"cardholderNameLabel\",defaultMessage:\"Cardholder Name\"}},onInput:e=>this.handleInput(e)};this.childUpdated()}handleInput(e){this.cardFormContext?.setCardholderName?.(e)}render(){return this.renderInput()}}"
|
|
280
314
|
},
|
|
281
315
|
{
|
|
282
316
|
"kind": "variable",
|
|
283
|
-
"name": "
|
|
284
|
-
"default": "class extends b{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.cardFormContext=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;this.primerContext?.telemetry?.analytics.sendEvent({eventName:\"PAYMENT_SUBMITTED\",paymentMethod:\"PAYMENT_CARD\"});let a=new CustomEvent(\"primer:card-submit\",{bubbles:!0,composed:!0,detail:{source:\"primer-card-form-submit\"}});this.dispatchEvent(a)}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:
|
|
317
|
+
"name": "ce",
|
|
318
|
+
"default": "class extends b{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.cardFormContext=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;this.primerContext?.telemetry?.analytics.sendEvent({eventName:\"PAYMENT_SUBMITTED\",paymentMethod:\"PAYMENT_CARD\"});let a=new CustomEvent(\"primer:card-submit\",{bubbles:!0,composed:!0,detail:{source:\"primer-card-form-submit\"}});this.dispatchEvent(a)}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:E(\"pay\",{id:\"pay\"})}set buttonText(e){let a=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",a)}get submitButtonConfig(){return this.primerContext?.clientOptions?.submitButton??null}get shouldShowBuiltInButton(){return this.submitButtonConfig?.useBuiltInButton??!0}render(){if(!this.shouldShowBuiltInButton)return y;let e=this.submitButtonConfig?.amountVisible?this.primerContext?.headlessUtils?.getUIOrderAmount():null,a=e?` ${e}`:y,i=this.disabled||this.cardFormContext?.disabled||!1;return p`<primer-button type=\"submit\" variant=${this.variant} ?disabled=${i} @click=${this.handleClick} .loading=${yt(this.primerContext?.sdkState)} data-submit >${this.buttonText}${a}</primer-button>`}}"
|
|
285
319
|
},
|
|
286
320
|
{
|
|
287
321
|
"kind": "variable",
|
|
288
|
-
"name": "
|
|
289
|
-
"default": "class extends b{constructor(){super(...arguments);this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=
|
|
322
|
+
"name": "ue",
|
|
323
|
+
"default": "class extends b{constructor(){super(...arguments);this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=Fr();this.dropdownRef=Fr();this.networkOptionRefs=[];this.toggleDropdown=e=>{this.isKeyboardNavigation=!1,e.stopPropagation(),this.getSelectableNetworks().length>1&&(this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))};this.handleClickOutside=e=>{this.isDropdownOpen&&(this.contains(e.target)||(this.isDropdownOpen=!1,this.isKeyboardNavigation=!1))};this.handleMouseMove=()=>{this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1)};this.handleKeyDown=e=>{if(!(!(this.getSelectableNetworks().length>1)||!(this.contains(e.target)||this===e.target||this.isDropdownOpen&&e.target===document.body)))switch(this.isKeyboardNavigation=!0,e.key){case\"ArrowDown\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex+1)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"ArrowUp\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex-1+this.getSelectableNetworks().length)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Enter\":case\" \":this.isDropdownOpen&&this.focusedNetworkIndex>=0?(e.preventDefault(),this.selectNetwork(e,this.getSelectableNetworks()[this.focusedNetworkIndex])):!this.isDropdownOpen&&this.buttonRef.value===document.activeElement&&(e.preventDefault(),this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Escape\":this.isDropdownOpen&&(e.preventDefault(),this.isDropdownOpen=!1,this.buttonRef.value?.focus());break;case\"Tab\":this.isDropdownOpen&&(this.isDropdownOpen=!1);break}};this.handleDocumentKeyDown=e=>{this.isDropdownOpen&&this.handleKeyDown(e)}}getNetworkIconUrl(e){return this.primerContext?.headlessUtils?.getCardNetworkAsset(e.network)?.cardUrl}renderDefaultCardIcon(){return p`<div class=\"network-icon\">${Fa[\"payment-card\"]}</div>`}getSelectableNetworks(){return this.primerContext?.cardNetworks?.selectableCardNetworks||[]}getDetectedNetwork(){return this.selectedCardNetwork??(this.primerContext?.cardNetworks?.detectedCardNetwork||null)}getSelectedNetworkIndex(){let e=this.getDetectedNetwork();if(!e)return 0;let a=this.getSelectableNetworks().findIndex(i=>i.network===e.network);return a>=0?a:0}selectNetwork(e,a){e.stopPropagation(),this.selectedCardNetwork=a,this.isDropdownOpen=!1,this.buttonRef.value?.focus(),this.primerContext?.cardNetworks&&this.dispatchEvent(new CustomEvent(\"network-selected\",{detail:{network:a.network},bubbles:!0,composed:!0}))}focusNetworkOption(){requestAnimationFrame(()=>{this.networkOptionRefs[this.focusedNetworkIndex]&&this.networkOptionRefs[this.focusedNetworkIndex].focus()})}setNetworkOptionRef(e,a){this.networkOptionRefs[a]=e}connectedCallback(){super.connectedCallback(),setTimeout(()=>{document.addEventListener(\"click\",this.handleClickOutside),document.addEventListener(\"mousemove\",this.handleMouseMove),this.addEventListener(\"keydown\",this.handleKeyDown),document.addEventListener(\"keydown\",this.handleDocumentKeyDown)},0)}disconnectedCallback(){document.removeEventListener(\"click\",this.handleClickOutside),document.removeEventListener(\"keydown\",this.handleDocumentKeyDown),document.removeEventListener(\"mousemove\",this.handleMouseMove),this.removeEventListener(\"keydown\",this.handleKeyDown),super.disconnectedCallback()}render(){if(this.primerContext?.cardNetworks?.isLoading)return p`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return this.renderDefaultCardIcon();let a=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!a)return this.renderDefaultCardIcon();let i=e.length>1;return i&&!uu(e.map(o=>o.network))?p`<div class=\"network-selector-inline\">${e.map(o=>p`<div class=\"network-icon-container\"><img class=\"network-icon\" src=${this.getNetworkIconUrl(o)??\"\"} alt=${o.displayName} /></div>`)}</div>`:p`<button ${dr(this.buttonRef)} class=\"network-selector ${i?\"\":\"static\"}\" tabindex=${i?\"0\":\"-1\"} @click=${this.toggleDropdown} @keydown=${o=>{(o.key===\" \"||o.key===\"Enter\")&&i&&(o.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${i?`Selected card network: ${a.displayName}. Click to change.`:`Card network: ${a.displayName}`} aria-expanded=${i?this.isDropdownOpen:y} aria-haspopup=${i?\"true\":y} aria-controls=${i?\"network-dropdown\":y} ><img class=\"network-icon\" src=${this.getNetworkIconUrl(a)} alt=${a.displayName} />${N(i,()=>p`<primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" size=\"sm\" name=\"chevron-down\" ></primer-icon>`,()=>y)}</button>${N(this.isDropdownOpen,()=>p`<div ${dr(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" >${e.map((o,s)=>p`<div ${dr(l=>this.setNetworkOptionRef(l,s))} class=\"network-option ${this.isKeyboardNavigation&&s===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${l=>this.selectNetwork(l,o)} @keydown=${l=>{(l.key===\"Enter\"||l.key===\" \")&&this.selectNetwork(l,o)}} role=\"option\" aria-selected=${o.network===a.network} tabindex=\"${s===this.focusedNetworkIndex?\"0\":\"-1\"}\" ><img class=\"network-option-icon\" src=${this.getNetworkIconUrl(o)} alt=${o.displayName} /><span class=\"network-name\">${o.displayName}</span>${N(o.network===a.network,()=>p`<primer-icon class=\"checkmark\" name=\"checkmark\" size=\"sm\" ></primer-icon>`,()=>y)}</div>`)}</div>`,()=>y)} `}}"
|
|
290
324
|
},
|
|
291
325
|
{
|
|
292
326
|
"kind": "variable",
|
|
293
|
-
"name": "
|
|
294
|
-
"default": "class extends b{constructor(){super(...arguments);this.hasSlottedToggle=!1;this.isExpanded=!1;this._isHandlingContextEvent=!1;this._contextToggleListener=null;this.handleToggleSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasSlottedToggle=i.length>0};this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isToggleButton(n)&&(e.preventDefault(),this.toggleAccordion())};this.handleDirectToggle=e=>{let a=e.detail?.action;a===\"expand\"?this.expand():a===\"collapse\"?this.collapse():this.toggleAccordion()};this.handleContextToggle=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{if(e.target!==this){e.stopPropagation();let a=e.detail?.action;a===\"expand\"?this.expand():a===\"collapse\"?this.collapse():this.toggleAccordion()}}finally{this._isHandlingContextEvent=!1}}}}isToggleButton(e){let a=this.shadowRoot?.querySelector('slot[name=\"show-other-payments-toggle-button\"]');return a?a.assignedElements({flatten:!0}).some(n=>n===e||n.contains(e)):!1}toggleAccordion(){this.hasSlottedToggle?(this.isExpanded=!this.isExpanded,this.dispatchExpandedEvent(this.isExpanded)):this.collapsableElement&&(this.collapsableElement.isExpanded?this.collapsableElement.collapse():this.collapsableElement.expand())}dispatchExpandedEvent(e){this.dispatchEvent(new CustomEvent(\"primer:show-other-payments-toggled\",{bubbles:!0,composed:!0,detail:{expanded:e}}))}expand(){this.hasSlottedToggle?this.isExpanded||(this.isExpanded=!0,this.dispatchExpandedEvent(!0)):this.collapsableElement?.expand()}collapse(){this.hasSlottedToggle?this.isExpanded&&(this.isExpanded=!1,this.dispatchExpandedEvent(!1)):this.collapsableElement?.collapse()}setupContextEventListeners(){this.primerContext?.events?.host&&this._contextToggleListener&&this.primerContext?.events.host.addEventListener(\"primer:show-other-payments-toggle\",this._contextToggleListener)}cleanupContextEventListeners(){this.primerContext?.events?.host&&this._contextToggleListener&&this.primerContext?.events.host.removeEventListener(\"primer:show-other-payments-toggle\",this._contextToggleListener)}connectedCallback(){super.connectedCallback(),this.isExpanded=this.primerContext?.vaultManager?.vaultedPaymentMethods.length===0,this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:show-other-payments-toggle\",this.handleDirectToggle),this._contextToggleListener=e=>{this.handleContextToggle(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:show-other-payments-toggle\",this.handleDirectToggle),this.cleanupContextEventListeners(),super.disconnectedCallback()}render(){if(this.primerContext?.vaultManager?.isLoading)return
|
|
327
|
+
"name": "_e",
|
|
328
|
+
"default": "class extends b{constructor(){super(...arguments);this.hasSlottedToggle=!1;this.isExpanded=!1;this._isHandlingContextEvent=!1;this._contextToggleListener=null;this.handleToggleSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasSlottedToggle=i.length>0};this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isToggleButton(n)&&(e.preventDefault(),this.toggleAccordion())};this.handleDirectToggle=e=>{let a=e.detail?.action;a===\"expand\"?this.expand():a===\"collapse\"?this.collapse():this.toggleAccordion()};this.handleContextToggle=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{if(e.target!==this){e.stopPropagation();let a=e.detail?.action;a===\"expand\"?this.expand():a===\"collapse\"?this.collapse():this.toggleAccordion()}}finally{this._isHandlingContextEvent=!1}}}}isToggleButton(e){let a=this.shadowRoot?.querySelector('slot[name=\"show-other-payments-toggle-button\"]');return a?a.assignedElements({flatten:!0}).some(n=>n===e||n.contains(e)):!1}toggleAccordion(){this.hasSlottedToggle?(this.isExpanded=!this.isExpanded,this.dispatchExpandedEvent(this.isExpanded)):this.collapsableElement&&(this.collapsableElement.isExpanded?this.collapsableElement.collapse():this.collapsableElement.expand())}dispatchExpandedEvent(e){this.dispatchEvent(new CustomEvent(\"primer:show-other-payments-toggled\",{bubbles:!0,composed:!0,detail:{expanded:e}}))}expand(){this.hasSlottedToggle?this.isExpanded||(this.isExpanded=!0,this.dispatchExpandedEvent(!0)):this.collapsableElement?.expand()}collapse(){this.hasSlottedToggle?this.isExpanded&&(this.isExpanded=!1,this.dispatchExpandedEvent(!1)):this.collapsableElement?.collapse()}setupContextEventListeners(){this.primerContext?.events?.host&&this._contextToggleListener&&this.primerContext?.events.host.addEventListener(\"primer:show-other-payments-toggle\",this._contextToggleListener)}cleanupContextEventListeners(){this.primerContext?.events?.host&&this._contextToggleListener&&this.primerContext?.events.host.removeEventListener(\"primer:show-other-payments-toggle\",this._contextToggleListener)}connectedCallback(){super.connectedCallback(),this.isExpanded=this.primerContext?.vaultManager?.vaultedPaymentMethods.length===0,this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:show-other-payments-toggle\",this.handleDirectToggle),this._contextToggleListener=e=>{this.handleContextToggle(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:show-other-payments-toggle\",this.handleDirectToggle),this.cleanupContextEventListeners(),super.disconnectedCallback()}render(){if(this.primerContext?.vaultManager?.isLoading)return y;let e=this.primerContext?.vaultManager?.showEmptyState||this.primerContext?.vaultManager?.vaultedPaymentMethods.length;return!this.primerContext?.vaultManager||!this.primerContext?.vaultManager.enabled||this.primerContext?.vaultManager.headless||!e?p`<slot name=\"other-payments\"></slot>`:p`<div class=\"other-payment-methods-container\"><slot name=\"show-other-payments-toggle-button\" @slotchange=${this.handleToggleSlotChange} ></slot>${N(!this.hasSlottedToggle,()=>p`<primer-collapsable buttonVariant=\"secondary\" .expanded=\"${this.primerContext?.vaultManager?.vaultedPaymentMethods.length===0}\" .header=\"${E(\"navigateToPaymentMethods\",{id:\"navigateToPaymentMethods\"})}\" ><div class=\"other-payment-methods-content\"><slot name=\"other-payments\"></slot></div></primer-collapsable>`,()=>p`<div class=\"collapsable-wrapper ${this.isExpanded?\"expanded\":\"\"}\" role=\"region\" aria-labelledby=\"custom-toggle-button\" ><div class=\"collapsable-content\"><div class=\"other-payment-methods-content\"><slot name=\"other-payments\"></slot></div></div></div>`)}</div>`}}"
|
|
295
329
|
},
|
|
296
330
|
{
|
|
297
331
|
"kind": "variable",
|
|
298
|
-
"name": "
|
|
332
|
+
"name": "Ie",
|
|
299
333
|
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.expanded=!1;this.suppressBlurCollapse=!1;this.loading=!1;this._handleDocumentClick=e=>{this.expanded&&(this.suppressBlurCollapse||this.loading||e.composedPath().includes(this)||this._collapseFromOutsideInteraction())};this._handleWindowBlur=()=>{!this.expanded||this.suppressBlurCollapse||this.loading||setTimeout(()=>{document.hasFocus()&&this._collapseFromOutsideInteraction()},100)}}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleDocumentClick),window.addEventListener(\"blur\",this._handleWindowBlur)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleDocumentClick),window.removeEventListener(\"blur\",this._handleWindowBlur)}_collapseFromOutsideInteraction(){this.expanded&&(this.expanded=!1,this.dispatchEvent(new CustomEvent(\"expanded-change\",{detail:{expanded:!1},bubbles:!0,composed:!0})))}_handleButtonClick(){this.disabled||this.loading||(this.expanded=!this.expanded,this.dispatchEvent(new CustomEvent(\"expanded-change\",{detail:{expanded:this.expanded},bubbles:!0,composed:!0})))}render(){return p`<div class=\"container ${this.expanded?\"expanded\":\"\"}\"><primer-payment-method-button .type=${this.type} ?disabled=${this.disabled||this.loading} @payment-method-click=${()=>this._handleButtonClick()} ></primer-payment-method-button><div class=\"expanded-content\"><div class=\"content-wrapper\"><slot></slot></div></div></div>`}}"
|
|
300
334
|
},
|
|
301
335
|
{
|
|
302
336
|
"kind": "variable",
|
|
303
|
-
"name": "
|
|
304
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.loading=!1}render(){return p`<button class=${
|
|
337
|
+
"name": "lt",
|
|
338
|
+
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.loading=!1}render(){return p`<button class=${Z({loading:this.loading})} ?disabled=${this.disabled||this.loading} @click=${()=>this.dispatchEvent(new Event(\"confirm\",{bubbles:!0,composed:!0}))} >${this.loading?p`<primer-spinner size=\"small\" compact></primer-spinner>`:E(\"confirm\",{id:\"confirm\"})}</button>`}}"
|
|
305
339
|
},
|
|
306
340
|
{
|
|
307
341
|
"kind": "variable",
|
|
308
|
-
"name": "
|
|
342
|
+
"name": "hr",
|
|
309
343
|
"default": "class extends b{render(){return p`<primer-checkout-state type=\"complete\"></primer-checkout-state>`}}"
|
|
310
344
|
},
|
|
311
345
|
{
|
|
312
346
|
"kind": "variable",
|
|
313
|
-
"name": "
|
|
347
|
+
"name": "zt",
|
|
314
348
|
"default": "class extends b{render(){return p`<primer-checkout-state type=\"failure\" description=${this.primerContext?.sdkState?.primerJsError?.message||\"\"} ></primer-checkout-state>`}}"
|
|
315
349
|
},
|
|
316
350
|
{
|
|
317
351
|
"kind": "variable",
|
|
318
|
-
"name": "
|
|
319
|
-
"default": "class extends b{constructor(){super(...arguments);this.showProcessingErrors=!0}get shouldShowError(){return!this.primerContext?.sdkState||this.primerContext.sdkState.isProcessing?!1:!!(this.primerContext.sdkState.paymentFailure&&this.showProcessingErrors)}render(){return this.primerContext?.sdkState?p`<primer-error-message message=\"${
|
|
352
|
+
"name": "dt",
|
|
353
|
+
"default": "class extends b{constructor(){super(...arguments);this.showProcessingErrors=!0}get shouldShowError(){return!this.primerContext?.sdkState||this.primerContext.sdkState.isProcessing?!1:!!(this.primerContext.sdkState.paymentFailure&&this.showProcessingErrors)}render(){return this.primerContext?.sdkState?p`<primer-error-message message=\"${E(this.primerContext.sdkState.paymentFailure?.message??\"\",{id:\"tokenizationError\"})}\" ?visible=\"${this.shouldShowError}\" ></primer-error-message>`:y}}"
|
|
320
354
|
},
|
|
321
355
|
{
|
|
322
356
|
"kind": "variable",
|
|
323
|
-
"name": "
|
|
324
|
-
"default": "class extends b{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()}}render(){return this.primerContext?.sdkState?.isLoading?
|
|
357
|
+
"name": "Lt",
|
|
358
|
+
"default": "class extends b{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()}}render(){return this.primerContext?.sdkState?.isLoading?y:this.primerContext?.sdkState?.isSuccessful?p`<slot name=\"checkout-complete\"><primer-checkout-complete></primer-checkout-complete></slot>`:p`<slot name=\"payments\" @slotchange=${this.onSlotChange}></slot>${N(this.hasAssignedContent,()=>y,()=>p`<div class=${Z({\"primer-is-processing\":!!this.primerContext?.sdkState?.isProcessing})} ><primer-vault-manager></primer-vault-manager><primer-show-other-payments><div slot=\"other-payments\" class=\"primer-main-list\">${this.primerContext?.paymentMethods?.map(e=>p`<primer-payment-method type=${e.type} ?disabled=${this.primerContext?.clientOptions?.disabledPayments===!0} ></primer-payment-method>`)}</div></primer-show-other-payments><primer-error-message-container></primer-error-message-container></div>`)} `}}"
|
|
325
359
|
},
|
|
326
360
|
{
|
|
327
361
|
"kind": "function",
|
|
328
|
-
"name": "
|
|
362
|
+
"name": "MB"
|
|
329
363
|
}
|
|
330
364
|
],
|
|
331
365
|
"exports": [
|
|
@@ -349,7 +383,15 @@
|
|
|
349
383
|
"kind": "js",
|
|
350
384
|
"name": "AdyenMbway",
|
|
351
385
|
"declaration": {
|
|
352
|
-
"name": "
|
|
386
|
+
"name": "Te",
|
|
387
|
+
"module": "dist/primer-loader.js"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"kind": "js",
|
|
392
|
+
"name": "BackendDriven",
|
|
393
|
+
"declaration": {
|
|
394
|
+
"name": "He",
|
|
353
395
|
"module": "dist/primer-loader.js"
|
|
354
396
|
}
|
|
355
397
|
},
|
|
@@ -357,7 +399,7 @@
|
|
|
357
399
|
"kind": "js",
|
|
358
400
|
"name": "BillingAddress",
|
|
359
401
|
"declaration": {
|
|
360
|
-
"name": "
|
|
402
|
+
"name": "ae",
|
|
361
403
|
"module": "dist/primer-loader.js"
|
|
362
404
|
}
|
|
363
405
|
},
|
|
@@ -365,7 +407,7 @@
|
|
|
365
407
|
"kind": "js",
|
|
366
408
|
"name": "Blik",
|
|
367
409
|
"declaration": {
|
|
368
|
-
"name": "
|
|
410
|
+
"name": "ve",
|
|
369
411
|
"module": "dist/primer-loader.js"
|
|
370
412
|
}
|
|
371
413
|
},
|
|
@@ -373,7 +415,7 @@
|
|
|
373
415
|
"kind": "js",
|
|
374
416
|
"name": "Button",
|
|
375
417
|
"declaration": {
|
|
376
|
-
"name": "
|
|
418
|
+
"name": "le",
|
|
377
419
|
"module": "dist/primer-loader.js"
|
|
378
420
|
}
|
|
379
421
|
},
|
|
@@ -381,7 +423,7 @@
|
|
|
381
423
|
"kind": "js",
|
|
382
424
|
"name": "CardForm",
|
|
383
425
|
"declaration": {
|
|
384
|
-
"name": "
|
|
426
|
+
"name": "Ce",
|
|
385
427
|
"module": "dist/primer-loader.js"
|
|
386
428
|
}
|
|
387
429
|
},
|
|
@@ -389,7 +431,7 @@
|
|
|
389
431
|
"kind": "js",
|
|
390
432
|
"name": "CardFormCVV",
|
|
391
433
|
"declaration": {
|
|
392
|
-
"name": "
|
|
434
|
+
"name": "nt",
|
|
393
435
|
"module": "dist/primer-loader.js"
|
|
394
436
|
}
|
|
395
437
|
},
|
|
@@ -397,7 +439,7 @@
|
|
|
397
439
|
"kind": "js",
|
|
398
440
|
"name": "CardFormCardNetworkSelector",
|
|
399
441
|
"declaration": {
|
|
400
|
-
"name": "
|
|
442
|
+
"name": "ue",
|
|
401
443
|
"module": "dist/primer-loader.js"
|
|
402
444
|
}
|
|
403
445
|
},
|
|
@@ -405,7 +447,7 @@
|
|
|
405
447
|
"kind": "js",
|
|
406
448
|
"name": "CardFormCardNumber",
|
|
407
449
|
"declaration": {
|
|
408
|
-
"name": "
|
|
450
|
+
"name": "it",
|
|
409
451
|
"module": "dist/primer-loader.js"
|
|
410
452
|
}
|
|
411
453
|
},
|
|
@@ -413,7 +455,7 @@
|
|
|
413
455
|
"kind": "js",
|
|
414
456
|
"name": "CardFormError",
|
|
415
457
|
"declaration": {
|
|
416
|
-
"name": "
|
|
458
|
+
"name": "tt",
|
|
417
459
|
"module": "dist/primer-loader.js"
|
|
418
460
|
}
|
|
419
461
|
},
|
|
@@ -421,7 +463,7 @@
|
|
|
421
463
|
"kind": "js",
|
|
422
464
|
"name": "CardFormExpiry",
|
|
423
465
|
"declaration": {
|
|
424
|
-
"name": "
|
|
466
|
+
"name": "ot",
|
|
425
467
|
"module": "dist/primer-loader.js"
|
|
426
468
|
}
|
|
427
469
|
},
|
|
@@ -429,7 +471,7 @@
|
|
|
429
471
|
"kind": "js",
|
|
430
472
|
"name": "CardFormName",
|
|
431
473
|
"declaration": {
|
|
432
|
-
"name": "
|
|
474
|
+
"name": "st",
|
|
433
475
|
"module": "dist/primer-loader.js"
|
|
434
476
|
}
|
|
435
477
|
},
|
|
@@ -437,7 +479,7 @@
|
|
|
437
479
|
"kind": "js",
|
|
438
480
|
"name": "CardFormSubmit",
|
|
439
481
|
"declaration": {
|
|
440
|
-
"name": "
|
|
482
|
+
"name": "ce",
|
|
441
483
|
"module": "dist/primer-loader.js"
|
|
442
484
|
}
|
|
443
485
|
},
|
|
@@ -445,7 +487,7 @@
|
|
|
445
487
|
"kind": "js",
|
|
446
488
|
"name": "Collapsable",
|
|
447
489
|
"declaration": {
|
|
448
|
-
"name": "
|
|
490
|
+
"name": "de",
|
|
449
491
|
"module": "dist/primer-loader.js"
|
|
450
492
|
}
|
|
451
493
|
},
|
|
@@ -453,7 +495,7 @@
|
|
|
453
495
|
"kind": "js",
|
|
454
496
|
"name": "Dialog",
|
|
455
497
|
"declaration": {
|
|
456
|
-
"name": "
|
|
498
|
+
"name": "we",
|
|
457
499
|
"module": "dist/primer-loader.js"
|
|
458
500
|
}
|
|
459
501
|
},
|
|
@@ -461,7 +503,7 @@
|
|
|
461
503
|
"kind": "js",
|
|
462
504
|
"name": "ErrorMessage",
|
|
463
505
|
"declaration": {
|
|
464
|
-
"name": "
|
|
506
|
+
"name": "Ue",
|
|
465
507
|
"module": "dist/primer-loader.js"
|
|
466
508
|
}
|
|
467
509
|
},
|
|
@@ -469,7 +511,7 @@
|
|
|
469
511
|
"kind": "js",
|
|
470
512
|
"name": "ErrorMessageContainer",
|
|
471
513
|
"declaration": {
|
|
472
|
-
"name": "
|
|
514
|
+
"name": "dt",
|
|
473
515
|
"module": "dist/primer-loader.js"
|
|
474
516
|
}
|
|
475
517
|
},
|
|
@@ -477,7 +519,7 @@
|
|
|
477
519
|
"kind": "js",
|
|
478
520
|
"name": "Input",
|
|
479
521
|
"declaration": {
|
|
480
|
-
"name": "
|
|
522
|
+
"name": "H",
|
|
481
523
|
"module": "dist/primer-loader.js"
|
|
482
524
|
}
|
|
483
525
|
},
|
|
@@ -485,7 +527,7 @@
|
|
|
485
527
|
"kind": "js",
|
|
486
528
|
"name": "InputLabel",
|
|
487
529
|
"declaration": {
|
|
488
|
-
"name": "
|
|
530
|
+
"name": "et",
|
|
489
531
|
"module": "dist/primer-loader.js"
|
|
490
532
|
}
|
|
491
533
|
},
|
|
@@ -493,7 +535,7 @@
|
|
|
493
535
|
"kind": "js",
|
|
494
536
|
"name": "InputWrapper",
|
|
495
537
|
"declaration": {
|
|
496
|
-
"name": "
|
|
538
|
+
"name": "Ke",
|
|
497
539
|
"module": "dist/primer-loader.js"
|
|
498
540
|
}
|
|
499
541
|
},
|
|
@@ -501,7 +543,7 @@
|
|
|
501
543
|
"kind": "js",
|
|
502
544
|
"name": "NativePayment",
|
|
503
545
|
"declaration": {
|
|
504
|
-
"name": "
|
|
546
|
+
"name": "xe",
|
|
505
547
|
"module": "dist/primer-loader.js"
|
|
506
548
|
}
|
|
507
549
|
},
|
|
@@ -509,7 +551,7 @@
|
|
|
509
551
|
"kind": "js",
|
|
510
552
|
"name": "PaymentMethod",
|
|
511
553
|
"declaration": {
|
|
512
|
-
"name": "
|
|
554
|
+
"name": "Re",
|
|
513
555
|
"module": "dist/primer-loader.js"
|
|
514
556
|
}
|
|
515
557
|
},
|
|
@@ -517,7 +559,7 @@
|
|
|
517
559
|
"kind": "js",
|
|
518
560
|
"name": "PaymentMethodAccordion",
|
|
519
561
|
"declaration": {
|
|
520
|
-
"name": "
|
|
562
|
+
"name": "Ie",
|
|
521
563
|
"module": "dist/primer-loader.js"
|
|
522
564
|
}
|
|
523
565
|
},
|
|
@@ -525,7 +567,7 @@
|
|
|
525
567
|
"kind": "js",
|
|
526
568
|
"name": "PaymentMethodAccordionConfirmButton",
|
|
527
569
|
"declaration": {
|
|
528
|
-
"name": "
|
|
570
|
+
"name": "lt",
|
|
529
571
|
"module": "dist/primer-loader.js"
|
|
530
572
|
}
|
|
531
573
|
},
|
|
@@ -533,7 +575,7 @@
|
|
|
533
575
|
"kind": "js",
|
|
534
576
|
"name": "PaymentMethodButton",
|
|
535
577
|
"declaration": {
|
|
536
|
-
"name": "
|
|
578
|
+
"name": "Ve",
|
|
537
579
|
"module": "dist/primer-loader.js"
|
|
538
580
|
}
|
|
539
581
|
},
|
|
@@ -541,7 +583,7 @@
|
|
|
541
583
|
"kind": "js",
|
|
542
584
|
"name": "PaymentMethodContainer",
|
|
543
585
|
"declaration": {
|
|
544
|
-
"name": "
|
|
586
|
+
"name": "Be",
|
|
545
587
|
"module": "dist/primer-loader.js"
|
|
546
588
|
}
|
|
547
589
|
},
|
|
@@ -549,7 +591,7 @@
|
|
|
549
591
|
"kind": "js",
|
|
550
592
|
"name": "PaymentMethodContentComponent",
|
|
551
593
|
"declaration": {
|
|
552
|
-
"name": "
|
|
594
|
+
"name": "Ye",
|
|
553
595
|
"module": "dist/primer-loader.js"
|
|
554
596
|
}
|
|
555
597
|
},
|
|
@@ -557,7 +599,7 @@
|
|
|
557
599
|
"kind": "js",
|
|
558
600
|
"name": "PortalDialog",
|
|
559
601
|
"declaration": {
|
|
560
|
-
"name": "
|
|
602
|
+
"name": "Q",
|
|
561
603
|
"module": "dist/primer-loader.js"
|
|
562
604
|
}
|
|
563
605
|
},
|
|
@@ -565,7 +607,7 @@
|
|
|
565
607
|
"kind": "js",
|
|
566
608
|
"name": "PrimerCheckoutComplete",
|
|
567
609
|
"declaration": {
|
|
568
|
-
"name": "
|
|
610
|
+
"name": "hr",
|
|
569
611
|
"module": "dist/primer-loader.js"
|
|
570
612
|
}
|
|
571
613
|
},
|
|
@@ -573,7 +615,7 @@
|
|
|
573
615
|
"kind": "js",
|
|
574
616
|
"name": "PrimerCheckoutComponent",
|
|
575
617
|
"declaration": {
|
|
576
|
-
"name": "
|
|
618
|
+
"name": "ge",
|
|
577
619
|
"module": "dist/primer-loader.js"
|
|
578
620
|
}
|
|
579
621
|
},
|
|
@@ -581,7 +623,7 @@
|
|
|
581
623
|
"kind": "js",
|
|
582
624
|
"name": "PrimerCheckoutFailure",
|
|
583
625
|
"declaration": {
|
|
584
|
-
"name": "
|
|
626
|
+
"name": "zt",
|
|
585
627
|
"module": "dist/primer-loader.js"
|
|
586
628
|
}
|
|
587
629
|
},
|
|
@@ -589,7 +631,7 @@
|
|
|
589
631
|
"kind": "js",
|
|
590
632
|
"name": "PrimerCheckoutState",
|
|
591
633
|
"declaration": {
|
|
592
|
-
"name": "
|
|
634
|
+
"name": "rt",
|
|
593
635
|
"module": "dist/primer-loader.js"
|
|
594
636
|
}
|
|
595
637
|
},
|
|
@@ -597,7 +639,7 @@
|
|
|
597
639
|
"kind": "js",
|
|
598
640
|
"name": "PrimerIcon",
|
|
599
641
|
"declaration": {
|
|
600
|
-
"name": "
|
|
642
|
+
"name": "Fe",
|
|
601
643
|
"module": "dist/primer-loader.js"
|
|
602
644
|
}
|
|
603
645
|
},
|
|
@@ -605,7 +647,7 @@
|
|
|
605
647
|
"kind": "js",
|
|
606
648
|
"name": "PrimerKlarna",
|
|
607
649
|
"declaration": {
|
|
608
|
-
"name": "
|
|
650
|
+
"name": "fe",
|
|
609
651
|
"module": "dist/primer-loader.js"
|
|
610
652
|
}
|
|
611
653
|
},
|
|
@@ -613,7 +655,7 @@
|
|
|
613
655
|
"kind": "js",
|
|
614
656
|
"name": "PrimerMain",
|
|
615
657
|
"declaration": {
|
|
616
|
-
"name": "
|
|
658
|
+
"name": "Lt",
|
|
617
659
|
"module": "dist/primer-loader.js"
|
|
618
660
|
}
|
|
619
661
|
},
|
|
@@ -621,7 +663,7 @@
|
|
|
621
663
|
"kind": "js",
|
|
622
664
|
"name": "PtPhoneNumberInput",
|
|
623
665
|
"declaration": {
|
|
624
|
-
"name": "
|
|
666
|
+
"name": "te",
|
|
625
667
|
"module": "dist/primer-loader.js"
|
|
626
668
|
}
|
|
627
669
|
},
|
|
@@ -629,7 +671,7 @@
|
|
|
629
671
|
"kind": "js",
|
|
630
672
|
"name": "QRCode",
|
|
631
673
|
"declaration": {
|
|
632
|
-
"name": "
|
|
674
|
+
"name": "be",
|
|
633
675
|
"module": "dist/primer-loader.js"
|
|
634
676
|
}
|
|
635
677
|
},
|
|
@@ -637,7 +679,7 @@
|
|
|
637
679
|
"kind": "js",
|
|
638
680
|
"name": "RedirectPayment",
|
|
639
681
|
"declaration": {
|
|
640
|
-
"name": "
|
|
682
|
+
"name": "$e",
|
|
641
683
|
"module": "dist/primer-loader.js"
|
|
642
684
|
}
|
|
643
685
|
},
|
|
@@ -645,7 +687,7 @@
|
|
|
645
687
|
"kind": "js",
|
|
646
688
|
"name": "Select",
|
|
647
689
|
"declaration": {
|
|
648
|
-
"name": "
|
|
690
|
+
"name": "ye",
|
|
649
691
|
"module": "dist/primer-loader.js"
|
|
650
692
|
}
|
|
651
693
|
},
|
|
@@ -653,7 +695,7 @@
|
|
|
653
695
|
"kind": "js",
|
|
654
696
|
"name": "ShowOtherPayments",
|
|
655
697
|
"declaration": {
|
|
656
|
-
"name": "
|
|
698
|
+
"name": "_e",
|
|
657
699
|
"module": "dist/primer-loader.js"
|
|
658
700
|
}
|
|
659
701
|
},
|
|
@@ -661,7 +703,7 @@
|
|
|
661
703
|
"kind": "js",
|
|
662
704
|
"name": "Spinner",
|
|
663
705
|
"declaration": {
|
|
664
|
-
"name": "
|
|
706
|
+
"name": "Ge",
|
|
665
707
|
"module": "dist/primer-loader.js"
|
|
666
708
|
}
|
|
667
709
|
},
|
|
@@ -669,7 +711,7 @@
|
|
|
669
711
|
"kind": "js",
|
|
670
712
|
"name": "VaultCvvInput",
|
|
671
713
|
"declaration": {
|
|
672
|
-
"name": "
|
|
714
|
+
"name": "re",
|
|
673
715
|
"module": "dist/primer-loader.js"
|
|
674
716
|
}
|
|
675
717
|
},
|
|
@@ -677,7 +719,7 @@
|
|
|
677
719
|
"kind": "js",
|
|
678
720
|
"name": "VaultDeleteConfirmation",
|
|
679
721
|
"declaration": {
|
|
680
|
-
"name": "
|
|
722
|
+
"name": "ke",
|
|
681
723
|
"module": "dist/primer-loader.js"
|
|
682
724
|
}
|
|
683
725
|
},
|
|
@@ -685,7 +727,7 @@
|
|
|
685
727
|
"kind": "js",
|
|
686
728
|
"name": "VaultEmptyState",
|
|
687
729
|
"declaration": {
|
|
688
|
-
"name": "
|
|
730
|
+
"name": "at",
|
|
689
731
|
"module": "dist/primer-loader.js"
|
|
690
732
|
}
|
|
691
733
|
},
|
|
@@ -693,7 +735,7 @@
|
|
|
693
735
|
"kind": "js",
|
|
694
736
|
"name": "VaultErrorMessage",
|
|
695
737
|
"declaration": {
|
|
696
|
-
"name": "
|
|
738
|
+
"name": "ze",
|
|
697
739
|
"module": "dist/primer-loader.js"
|
|
698
740
|
}
|
|
699
741
|
},
|
|
@@ -701,7 +743,7 @@
|
|
|
701
743
|
"kind": "js",
|
|
702
744
|
"name": "VaultManager",
|
|
703
745
|
"declaration": {
|
|
704
|
-
"name": "
|
|
746
|
+
"name": "ie",
|
|
705
747
|
"module": "dist/primer-loader.js"
|
|
706
748
|
}
|
|
707
749
|
},
|
|
@@ -709,7 +751,7 @@
|
|
|
709
751
|
"kind": "js",
|
|
710
752
|
"name": "VaultManagerHeader",
|
|
711
753
|
"declaration": {
|
|
712
|
-
"name": "
|
|
754
|
+
"name": "De",
|
|
713
755
|
"module": "dist/primer-loader.js"
|
|
714
756
|
}
|
|
715
757
|
},
|
|
@@ -717,7 +759,7 @@
|
|
|
717
759
|
"kind": "js",
|
|
718
760
|
"name": "VaultPaymentMethodItem",
|
|
719
761
|
"declaration": {
|
|
720
|
-
"name": "
|
|
762
|
+
"name": "Pe",
|
|
721
763
|
"module": "dist/primer-loader.js"
|
|
722
764
|
}
|
|
723
765
|
},
|
|
@@ -725,7 +767,7 @@
|
|
|
725
767
|
"kind": "js",
|
|
726
768
|
"name": "VaultPaymentSubmit",
|
|
727
769
|
"declaration": {
|
|
728
|
-
"name": "
|
|
770
|
+
"name": "Se",
|
|
729
771
|
"module": "dist/primer-loader.js"
|
|
730
772
|
}
|
|
731
773
|
},
|
|
@@ -733,7 +775,7 @@
|
|
|
733
775
|
"kind": "js",
|
|
734
776
|
"name": "injectDarkTheme",
|
|
735
777
|
"declaration": {
|
|
736
|
-
"name": "
|
|
778
|
+
"name": "vg",
|
|
737
779
|
"module": "dist/primer-loader.js"
|
|
738
780
|
}
|
|
739
781
|
},
|
|
@@ -741,7 +783,7 @@
|
|
|
741
783
|
"kind": "js",
|
|
742
784
|
"name": "injectLightTheme",
|
|
743
785
|
"declaration": {
|
|
744
|
-
"name": "
|
|
786
|
+
"name": "fg",
|
|
745
787
|
"module": "dist/primer-loader.js"
|
|
746
788
|
}
|
|
747
789
|
},
|
|
@@ -749,7 +791,7 @@
|
|
|
749
791
|
"kind": "js",
|
|
750
792
|
"name": "injectLoaderStyles",
|
|
751
793
|
"declaration": {
|
|
752
|
-
"name": "
|
|
794
|
+
"name": "Ql",
|
|
753
795
|
"module": "dist/primer-loader.js"
|
|
754
796
|
}
|
|
755
797
|
},
|
|
@@ -757,7 +799,7 @@
|
|
|
757
799
|
"kind": "js",
|
|
758
800
|
"name": "injectThemeStyles",
|
|
759
801
|
"declaration": {
|
|
760
|
-
"name": "
|
|
802
|
+
"name": "Xl",
|
|
761
803
|
"module": "dist/primer-loader.js"
|
|
762
804
|
}
|
|
763
805
|
},
|
|
@@ -765,41 +807,12 @@
|
|
|
765
807
|
"kind": "js",
|
|
766
808
|
"name": "loadPrimer",
|
|
767
809
|
"declaration": {
|
|
768
|
-
"name": "
|
|
810
|
+
"name": "MB",
|
|
769
811
|
"module": "dist/primer-loader.js"
|
|
770
812
|
}
|
|
771
813
|
}
|
|
772
814
|
]
|
|
773
815
|
},
|
|
774
|
-
{
|
|
775
|
-
"kind": "javascript-module",
|
|
776
|
-
"path": "e2e/utils.ts",
|
|
777
|
-
"declarations": [
|
|
778
|
-
{
|
|
779
|
-
"kind": "variable",
|
|
780
|
-
"name": "test",
|
|
781
|
-
"default": "chromaticTest"
|
|
782
|
-
}
|
|
783
|
-
],
|
|
784
|
-
"exports": [
|
|
785
|
-
{
|
|
786
|
-
"kind": "js",
|
|
787
|
-
"name": "expect",
|
|
788
|
-
"declaration": {
|
|
789
|
-
"name": "expect",
|
|
790
|
-
"package": "@chromatic-com/playwright"
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
|
-
{
|
|
794
|
-
"kind": "js",
|
|
795
|
-
"name": "test",
|
|
796
|
-
"declaration": {
|
|
797
|
-
"name": "test",
|
|
798
|
-
"module": "e2e/utils.ts"
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
]
|
|
802
|
-
},
|
|
803
816
|
{
|
|
804
817
|
"kind": "javascript-module",
|
|
805
818
|
"path": "src/consts.ts",
|
|
@@ -1673,28 +1686,219 @@
|
|
|
1673
1686
|
},
|
|
1674
1687
|
{
|
|
1675
1688
|
"kind": "javascript-module",
|
|
1676
|
-
"path": "
|
|
1689
|
+
"path": "e2e/mocks/billing-address.ts",
|
|
1677
1690
|
"declarations": [
|
|
1678
1691
|
{
|
|
1679
1692
|
"kind": "variable",
|
|
1680
|
-
"name": "
|
|
1681
|
-
"
|
|
1693
|
+
"name": "CONFIGURATION_RESPONSE",
|
|
1694
|
+
"type": {
|
|
1695
|
+
"text": "object"
|
|
1696
|
+
},
|
|
1697
|
+
"default": "{ coreUrl: 'https://api.sandbox.primer.io', pciUrl: 'https://sdk.api.sandbox.primer.io', binDataUrl: 'https://bin-data.api.sandbox.core.primer.io', assetsUrl: 'https://assets.sandbox.core.primer.io', checkoutModules: [ { type: 'BILLING_ADDRESS', options: { firstName: false, lastName: false, city: true, countryCode: true, postalCode: true, addressLine1: true, addressLine2: true, state: false, }, }, ], clientSession: { clientSessionId: '0ad5b471-5b80-436b-ad03-57850585e3fd', order: { orderId: '12577', currencyCode: 'EUR', countryCode: 'FR', totalOrderAmount: 1050, merchantAmount: 1050, lineItems: [ { itemId: 'primer-hoodie-gray', description: 'Primer Hoodie', amount: 950, quantity: 1, }, { itemId: 'primer-hoodie-blue', description: 'Primer Blue', amount: 50, quantity: 1, }, ], shipping: { amount: 50, methodId: 'Regular', methodName: 'Regular 50', methodDescription: 'Regular', }, }, customer: { customerId: 'Customer123', billingAddress: { firstName: 'testt', lastName: 'test', postalCode: '51662', addressLine1: 'aksjlkajl', addressLine2: 'jfjkahk', countryCode: 'PL', city: 'wroclaw', state: 'test', }, shippingAddress: {}, nationalDocumentId: '9011211234567', }, paymentMethod: { vaultOnSuccess: false, orderedAllowedCardNetworks: [ 'VISA', 'MASTERCARD', 'AMEX', 'MAESTRO', 'UNIONPAY', 'CARTES_BANCAIRES', 'DANKORT', 'DINERS_CLUB', 'DISCOVER', 'ENROUTE', 'ELO', 'HIPER', 'INTERAC', 'JCB', 'MIR', 'OTHER', ], vaultOnAgreement: false, }, }, primerAccountId: '75dc7012-785c-443a-80b1-0e1f88fd4fad', env: 'SANDBOX', paymentMethods: [ { id: '42e32c6e-7faa-4f5a-97d0-9c4f7b848ae1', type: 'APPLE_PAY', options: { merchantId: '75dc7012785c443a80b10e1f88fd4fad', merchantName: 'Primer', merchantDomains: [], }, implementationType: 'NATIVE_SDK', name: 'Apple Pay', displayMetadata: { button: { iconUrl: { dark: 'https://assets.sandbox.core.primer.io/APPLE_PAY/apple-pay-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/APPLE_PAY/apple-pay-logo-light@3x.png', }, backgroundColor: { dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, }, }, implementation: {}, }, { type: 'PAYMENT_CARD', options: { threeDSecureProvider: '3DSECUREIO', threeDSecureEnabled: true, }, implementationType: 'NATIVE_SDK', name: 'Card', displayMetadata: { button: { iconUrl: { dark: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-light@3x.png', }, backgroundColor: { dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, text: 'Pay by card', textColor: { dark: '#FFFFFF', light: '#000000', }, }, }, forceRedirect: false, implementation: {}, }, ], styleDefaults: {}, }"
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"kind": "variable",
|
|
1701
|
+
"name": "CARD_NUMBER",
|
|
1702
|
+
"type": {
|
|
1703
|
+
"text": "string"
|
|
1704
|
+
},
|
|
1705
|
+
"default": "'4242 4242 4242 4242'"
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"kind": "function",
|
|
1709
|
+
"name": "mockBinData",
|
|
1710
|
+
"parameters": [
|
|
1711
|
+
{
|
|
1712
|
+
"name": "page",
|
|
1713
|
+
"type": {
|
|
1714
|
+
"text": "Page"
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
]
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"kind": "function",
|
|
1721
|
+
"name": "mockPaymentInstruments",
|
|
1722
|
+
"parameters": [
|
|
1723
|
+
{
|
|
1724
|
+
"name": "page",
|
|
1725
|
+
"type": {
|
|
1726
|
+
"text": "Page"
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
]
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
"kind": "function",
|
|
1733
|
+
"name": "mockPayments",
|
|
1734
|
+
"parameters": [
|
|
1735
|
+
{
|
|
1736
|
+
"name": "page",
|
|
1737
|
+
"type": {
|
|
1738
|
+
"text": "Page"
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
]
|
|
1682
1742
|
}
|
|
1683
1743
|
],
|
|
1684
1744
|
"exports": [
|
|
1685
1745
|
{
|
|
1686
1746
|
"kind": "js",
|
|
1687
|
-
"name": "
|
|
1747
|
+
"name": "CONFIGURATION_RESPONSE",
|
|
1688
1748
|
"declaration": {
|
|
1689
|
-
"name": "
|
|
1690
|
-
"module": "
|
|
1749
|
+
"name": "CONFIGURATION_RESPONSE",
|
|
1750
|
+
"module": "e2e/mocks/billing-address.ts"
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"kind": "js",
|
|
1755
|
+
"name": "CARD_NUMBER",
|
|
1756
|
+
"declaration": {
|
|
1757
|
+
"name": "CARD_NUMBER",
|
|
1758
|
+
"module": "e2e/mocks/billing-address.ts"
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"kind": "js",
|
|
1763
|
+
"name": "mockBinData",
|
|
1764
|
+
"declaration": {
|
|
1765
|
+
"name": "mockBinData",
|
|
1766
|
+
"module": "e2e/mocks/billing-address.ts"
|
|
1767
|
+
}
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"kind": "js",
|
|
1771
|
+
"name": "mockPaymentInstruments",
|
|
1772
|
+
"declaration": {
|
|
1773
|
+
"name": "mockPaymentInstruments",
|
|
1774
|
+
"module": "e2e/mocks/billing-address.ts"
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
"kind": "js",
|
|
1779
|
+
"name": "mockPayments",
|
|
1780
|
+
"declaration": {
|
|
1781
|
+
"name": "mockPayments",
|
|
1782
|
+
"module": "e2e/mocks/billing-address.ts"
|
|
1691
1783
|
}
|
|
1692
1784
|
}
|
|
1693
1785
|
]
|
|
1694
1786
|
},
|
|
1695
1787
|
{
|
|
1696
1788
|
"kind": "javascript-module",
|
|
1697
|
-
"path": "
|
|
1789
|
+
"path": "e2e/mocks/paypal.ts",
|
|
1790
|
+
"declarations": [
|
|
1791
|
+
{
|
|
1792
|
+
"kind": "variable",
|
|
1793
|
+
"name": "CONFIGURATION_RESPONSE",
|
|
1794
|
+
"type": {
|
|
1795
|
+
"text": "object"
|
|
1796
|
+
},
|
|
1797
|
+
"default": "{ coreUrl: 'https://api.sandbox.primer.io', pciUrl: 'https://sdk.api.sandbox.primer.io', binDataUrl: 'https://bin-data.api.sandbox.core.primer.io', assetsUrl: 'https://assets.sandbox.core.primer.io', checkoutModules: [], clientSession: { clientSessionId: 'f2868f83-9f30-44d0-ae15-c67d6424badc', order: { orderId: '1257721757579', currencyCode: 'USD', countryCode: 'FR', totalOrderAmount: 5050, merchantAmount: 5050, lineItems: [ { itemId: 'primer-hoodie-gray', description: 'Primer Hoodie', amount: 4950, quantity: 1, }, { itemId: 'primer-hoodie-blue', description: 'Primer Blue', amount: 50, quantity: 1, }, ], shipping: { amount: 50, methodId: 'Regular', methodName: 'Regular 50', methodDescription: 'Regular', }, }, customer: { customerId: 'Customer1234367', billingAddress: { countryCode: 'FR', }, shippingAddress: { firstName: 'test', lastName: 'test', postalCode: '51786', addressLine1: 'test', addressLine2: 'test', countryCode: 'FR', city: 'test', }, nationalDocumentId: '9011211234567', }, paymentMethod: { vaultOnSuccess: false, orderedAllowedCardNetworks: [ 'VISA', 'MASTERCARD', 'AMEX', 'MAESTRO', 'UNIONPAY', 'CARTES_BANCAIRES', 'DANKORT', 'DINERS_CLUB', 'DISCOVER', 'ENROUTE', 'ELO', 'HIPER', 'INTERAC', 'JCB', 'MIR', 'OTHER', ], vaultOnAgreement: false, }, }, primerAccountId: '33c6e1fc-5199-43ed-a734-acd3deb27d81', env: 'SANDBOX', paymentMethods: [ { id: 'a04ecba7-cc9d-40de-96b9-7bd6a85b4e0d', type: 'GOOGLE_PAY', options: { merchantId: 'Chris', merchantName: 'Chisisthebest', type: 'GOOGLE_PAY', }, implementationType: 'NATIVE_SDK', name: 'Google Pay', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/GOOGLE_PAY/google-pay-logo-dark@3x.png', dark: 'https://assets.sandbox.core.primer.io/GOOGLE_PAY/google-pay-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/GOOGLE_PAY/google-pay-logo-light@3x.png', }, backgroundColor: { colored: '#000000', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 1, dark: 1, light: 1, }, borderColor: { colored: '#8E8E93', dark: '#FFFFFF', light: '#212121', }, }, }, forceRedirect: false, implementation: {}, }, { id: '1c2bb0fc-d8ed-4399-9154-2aba015ec50a', type: 'BRAINTREE_VENMO', options: { merchantId: 'primer', merchantAccountId: 'cde7e786-5324-5e41-9694-1aa394ed5be1', }, processorConfigId: '52bef1ae-fdfc-4cae-bb91-3fb9b81a7b5a', implementationType: 'WEB_REDIRECT', name: 'Venmo', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/VENMO/venmo-logo@3x.png', dark: 'https://assets.sandbox.core.primer.io/VENMO/venmo-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/VENMO/venmo-logo-light@3x.png', }, backgroundColor: { colored: '#008CFF', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#000000', }, }, }, forceRedirect: false, implementation: {}, }, { id: '2fc60a42-3729-40c4-bf52-4427e87db7eb', type: 'KLARNA', options: { merchantId: 'PK55462', merchantAccountId: 'fcd08555-1d1a-588f-b7d7-c3058b9fcd26', clientId: 'PK55462', }, processorConfigId: 'a38c95ba-8381-4bd7-b7c5-07f36c1f0a98', implementationType: 'NATIVE_SDK', name: 'Klarna', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/KLARNA/klarna-logo@3x.png', dark: 'https://assets.sandbox.core.primer.io/KLARNA/klarna-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/KLARNA/klarna-logo-light@3x.png', }, backgroundColor: { colored: '#FFB3C7', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { colored: '#FFB3C7', dark: '#FFFFFF', light: '#212121', }, }, }, forceRedirect: false, implementation: {}, }, { id: '30294d7c-d820-470e-9d43-5b701cd925d8', type: 'PAYPAL', options: { merchantId: 'Default Application', merchantAccountId: '49989e77-764d-585f-b66c-3ea34551094b', clientId: 'AW0qJdOMrgWr2ste9V9pZ1njg3tilO-8P9-vkSfm9e0f82wlXfsAxjoNSCmu-xGfFd6vqNM9XAHB6vX_', intent: 'authorize', }, processorConfigId: 'bf904deb-a083-4168-883d-f55eb142e993', implementationType: 'NATIVE_SDK', name: 'PayPal', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/PAYPAL/paypal-logo@3x.png', dark: 'https://assets.sandbox.core.primer.io/PAYPAL/paypal-logo-dark@3x.png', }, backgroundColor: { colored: '#FFC439', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, }, }, forceRedirect: false, implementation: {}, }, { type: 'PAYMENT_CARD', options: { threeDSecureProvider: '3DSECUREIO', threeDSecureEnabled: true, }, implementationType: 'NATIVE_SDK', name: 'Card', displayMetadata: { button: { iconUrl: { dark: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-light@3x.png', }, backgroundColor: { dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, text: 'Pay by card', textColor: { dark: '#FFFFFF', light: '#000000', }, }, }, forceRedirect: false, implementation: {}, }, ], styleDefaults: {}, }"
|
|
1798
|
+
}
|
|
1799
|
+
],
|
|
1800
|
+
"exports": [
|
|
1801
|
+
{
|
|
1802
|
+
"kind": "js",
|
|
1803
|
+
"name": "CONFIGURATION_RESPONSE",
|
|
1804
|
+
"declaration": {
|
|
1805
|
+
"name": "CONFIGURATION_RESPONSE",
|
|
1806
|
+
"module": "e2e/mocks/paypal.ts"
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
]
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
"kind": "javascript-module",
|
|
1813
|
+
"path": "e2e/mocks/shared.ts",
|
|
1814
|
+
"declarations": [
|
|
1815
|
+
{
|
|
1816
|
+
"kind": "function",
|
|
1817
|
+
"name": "mockConfigurationCall",
|
|
1818
|
+
"parameters": [
|
|
1819
|
+
{
|
|
1820
|
+
"name": "page",
|
|
1821
|
+
"type": {
|
|
1822
|
+
"text": "Page"
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "config",
|
|
1827
|
+
"type": {
|
|
1828
|
+
"text": "unknown"
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
]
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"kind": "function",
|
|
1835
|
+
"name": "mockDemoUrl",
|
|
1836
|
+
"parameters": [
|
|
1837
|
+
{
|
|
1838
|
+
"name": "primerCheckoutOptions",
|
|
1839
|
+
"optional": true,
|
|
1840
|
+
"type": {
|
|
1841
|
+
"text": "PrimerCheckoutOptions"
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
]
|
|
1845
|
+
}
|
|
1846
|
+
],
|
|
1847
|
+
"exports": [
|
|
1848
|
+
{
|
|
1849
|
+
"kind": "js",
|
|
1850
|
+
"name": "mockConfigurationCall",
|
|
1851
|
+
"declaration": {
|
|
1852
|
+
"name": "mockConfigurationCall",
|
|
1853
|
+
"module": "e2e/mocks/shared.ts"
|
|
1854
|
+
}
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
"kind": "js",
|
|
1858
|
+
"name": "mockDemoUrl",
|
|
1859
|
+
"declaration": {
|
|
1860
|
+
"name": "mockDemoUrl",
|
|
1861
|
+
"module": "e2e/mocks/shared.ts"
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
]
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
"kind": "javascript-module",
|
|
1868
|
+
"path": "e2e/tests/card-form-billing-address.spec.ts",
|
|
1869
|
+
"declarations": [],
|
|
1870
|
+
"exports": []
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
"kind": "javascript-module",
|
|
1874
|
+
"path": "e2e/tests/paypal.spec.ts",
|
|
1875
|
+
"declarations": [],
|
|
1876
|
+
"exports": []
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"kind": "javascript-module",
|
|
1880
|
+
"path": "dist/chunks/ar.BIHRX5RF.js",
|
|
1881
|
+
"declarations": [
|
|
1882
|
+
{
|
|
1883
|
+
"kind": "variable",
|
|
1884
|
+
"name": "o",
|
|
1885
|
+
"default": "e"
|
|
1886
|
+
}
|
|
1887
|
+
],
|
|
1888
|
+
"exports": [
|
|
1889
|
+
{
|
|
1890
|
+
"kind": "js",
|
|
1891
|
+
"name": "templates",
|
|
1892
|
+
"declaration": {
|
|
1893
|
+
"name": "o",
|
|
1894
|
+
"module": "dist/chunks/ar.BIHRX5RF.js"
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
]
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
"kind": "javascript-module",
|
|
1901
|
+
"path": "dist/chunks/bg.FGU6YCAF.js",
|
|
1698
1902
|
"declarations": [
|
|
1699
1903
|
{
|
|
1700
1904
|
"kind": "variable",
|
|
@@ -2726,275 +2930,84 @@
|
|
|
2726
2930
|
"declarations": [
|
|
2727
2931
|
{
|
|
2728
2932
|
"kind": "variable",
|
|
2729
|
-
"name": "a",
|
|
2730
|
-
"default": "t"
|
|
2731
|
-
}
|
|
2732
|
-
],
|
|
2733
|
-
"exports": [
|
|
2734
|
-
{
|
|
2735
|
-
"kind": "js",
|
|
2736
|
-
"name": "templates",
|
|
2737
|
-
"declaration": {
|
|
2738
|
-
"name": "a",
|
|
2739
|
-
"module": "dist/chunks/zf.LNP32XVM.js"
|
|
2740
|
-
}
|
|
2741
|
-
}
|
|
2742
|
-
]
|
|
2743
|
-
},
|
|
2744
|
-
{
|
|
2745
|
-
"kind": "javascript-module",
|
|
2746
|
-
"path": "dist/chunks/zh-CN.SRN7TXMD.js",
|
|
2747
|
-
"declarations": [
|
|
2748
|
-
{
|
|
2749
|
-
"kind": "variable",
|
|
2750
|
-
"name": "o",
|
|
2751
|
-
"default": "e"
|
|
2752
|
-
}
|
|
2753
|
-
],
|
|
2754
|
-
"exports": [
|
|
2755
|
-
{
|
|
2756
|
-
"kind": "js",
|
|
2757
|
-
"name": "templates",
|
|
2758
|
-
"declaration": {
|
|
2759
|
-
"name": "o",
|
|
2760
|
-
"module": "dist/chunks/zh-CN.SRN7TXMD.js"
|
|
2761
|
-
}
|
|
2762
|
-
}
|
|
2763
|
-
]
|
|
2764
|
-
},
|
|
2765
|
-
{
|
|
2766
|
-
"kind": "javascript-module",
|
|
2767
|
-
"path": "dist/chunks/zh-HK.3JAKYZ5N.js",
|
|
2768
|
-
"declarations": [
|
|
2769
|
-
{
|
|
2770
|
-
"kind": "variable",
|
|
2771
|
-
"name": "o",
|
|
2772
|
-
"default": "e"
|
|
2773
|
-
}
|
|
2774
|
-
],
|
|
2775
|
-
"exports": [
|
|
2776
|
-
{
|
|
2777
|
-
"kind": "js",
|
|
2778
|
-
"name": "templates",
|
|
2779
|
-
"declaration": {
|
|
2780
|
-
"name": "o",
|
|
2781
|
-
"module": "dist/chunks/zh-HK.3JAKYZ5N.js"
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
]
|
|
2785
|
-
},
|
|
2786
|
-
{
|
|
2787
|
-
"kind": "javascript-module",
|
|
2788
|
-
"path": "dist/chunks/zh-TW.WTNQLAHV.js",
|
|
2789
|
-
"declarations": [
|
|
2790
|
-
{
|
|
2791
|
-
"kind": "variable",
|
|
2792
|
-
"name": "o",
|
|
2793
|
-
"default": "e"
|
|
2794
|
-
}
|
|
2795
|
-
],
|
|
2796
|
-
"exports": [
|
|
2797
|
-
{
|
|
2798
|
-
"kind": "js",
|
|
2799
|
-
"name": "templates",
|
|
2800
|
-
"declaration": {
|
|
2801
|
-
"name": "o",
|
|
2802
|
-
"module": "dist/chunks/zh-TW.WTNQLAHV.js"
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
2805
|
-
]
|
|
2806
|
-
},
|
|
2807
|
-
{
|
|
2808
|
-
"kind": "javascript-module",
|
|
2809
|
-
"path": "e2e/mocks/billing-address.ts",
|
|
2810
|
-
"declarations": [
|
|
2811
|
-
{
|
|
2812
|
-
"kind": "variable",
|
|
2813
|
-
"name": "CONFIGURATION_RESPONSE",
|
|
2814
|
-
"type": {
|
|
2815
|
-
"text": "object"
|
|
2816
|
-
},
|
|
2817
|
-
"default": "{ coreUrl: 'https://api.sandbox.primer.io', pciUrl: 'https://sdk.api.sandbox.primer.io', binDataUrl: 'https://bin-data.api.sandbox.core.primer.io', assetsUrl: 'https://assets.sandbox.core.primer.io', checkoutModules: [ { type: 'BILLING_ADDRESS', options: { firstName: false, lastName: false, city: true, countryCode: true, postalCode: true, addressLine1: true, addressLine2: true, state: false, }, }, ], clientSession: { clientSessionId: '0ad5b471-5b80-436b-ad03-57850585e3fd', order: { orderId: '12577', currencyCode: 'EUR', countryCode: 'FR', totalOrderAmount: 1050, merchantAmount: 1050, lineItems: [ { itemId: 'primer-hoodie-gray', description: 'Primer Hoodie', amount: 950, quantity: 1, }, { itemId: 'primer-hoodie-blue', description: 'Primer Blue', amount: 50, quantity: 1, }, ], shipping: { amount: 50, methodId: 'Regular', methodName: 'Regular 50', methodDescription: 'Regular', }, }, customer: { customerId: 'Customer123', billingAddress: { firstName: 'testt', lastName: 'test', postalCode: '51662', addressLine1: 'aksjlkajl', addressLine2: 'jfjkahk', countryCode: 'PL', city: 'wroclaw', state: 'test', }, shippingAddress: {}, nationalDocumentId: '9011211234567', }, paymentMethod: { vaultOnSuccess: false, orderedAllowedCardNetworks: [ 'VISA', 'MASTERCARD', 'AMEX', 'MAESTRO', 'UNIONPAY', 'CARTES_BANCAIRES', 'DANKORT', 'DINERS_CLUB', 'DISCOVER', 'ENROUTE', 'ELO', 'HIPER', 'INTERAC', 'JCB', 'MIR', 'OTHER', ], vaultOnAgreement: false, }, }, primerAccountId: '75dc7012-785c-443a-80b1-0e1f88fd4fad', env: 'SANDBOX', paymentMethods: [ { id: '42e32c6e-7faa-4f5a-97d0-9c4f7b848ae1', type: 'APPLE_PAY', options: { merchantId: '75dc7012785c443a80b10e1f88fd4fad', merchantName: 'Primer', merchantDomains: [], }, implementationType: 'NATIVE_SDK', name: 'Apple Pay', displayMetadata: { button: { iconUrl: { dark: 'https://assets.sandbox.core.primer.io/APPLE_PAY/apple-pay-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/APPLE_PAY/apple-pay-logo-light@3x.png', }, backgroundColor: { dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, }, }, implementation: {}, }, { type: 'PAYMENT_CARD', options: { threeDSecureProvider: '3DSECUREIO', threeDSecureEnabled: true, }, implementationType: 'NATIVE_SDK', name: 'Card', displayMetadata: { button: { iconUrl: { dark: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-light@3x.png', }, backgroundColor: { dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, text: 'Pay by card', textColor: { dark: '#FFFFFF', light: '#000000', }, }, }, forceRedirect: false, implementation: {}, }, ], styleDefaults: {}, }"
|
|
2818
|
-
},
|
|
2819
|
-
{
|
|
2820
|
-
"kind": "variable",
|
|
2821
|
-
"name": "CARD_NUMBER",
|
|
2822
|
-
"type": {
|
|
2823
|
-
"text": "string"
|
|
2824
|
-
},
|
|
2825
|
-
"default": "'4242 4242 4242 4242'"
|
|
2826
|
-
},
|
|
2827
|
-
{
|
|
2828
|
-
"kind": "function",
|
|
2829
|
-
"name": "mockBinData",
|
|
2830
|
-
"parameters": [
|
|
2831
|
-
{
|
|
2832
|
-
"name": "page",
|
|
2833
|
-
"type": {
|
|
2834
|
-
"text": "Page"
|
|
2835
|
-
}
|
|
2836
|
-
}
|
|
2837
|
-
]
|
|
2838
|
-
},
|
|
2839
|
-
{
|
|
2840
|
-
"kind": "function",
|
|
2841
|
-
"name": "mockPaymentInstruments",
|
|
2842
|
-
"parameters": [
|
|
2843
|
-
{
|
|
2844
|
-
"name": "page",
|
|
2845
|
-
"type": {
|
|
2846
|
-
"text": "Page"
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
]
|
|
2850
|
-
},
|
|
2851
|
-
{
|
|
2852
|
-
"kind": "function",
|
|
2853
|
-
"name": "mockPayments",
|
|
2854
|
-
"parameters": [
|
|
2855
|
-
{
|
|
2856
|
-
"name": "page",
|
|
2857
|
-
"type": {
|
|
2858
|
-
"text": "Page"
|
|
2859
|
-
}
|
|
2860
|
-
}
|
|
2861
|
-
]
|
|
2862
|
-
}
|
|
2863
|
-
],
|
|
2864
|
-
"exports": [
|
|
2865
|
-
{
|
|
2866
|
-
"kind": "js",
|
|
2867
|
-
"name": "CONFIGURATION_RESPONSE",
|
|
2868
|
-
"declaration": {
|
|
2869
|
-
"name": "CONFIGURATION_RESPONSE",
|
|
2870
|
-
"module": "e2e/mocks/billing-address.ts"
|
|
2871
|
-
}
|
|
2872
|
-
},
|
|
2873
|
-
{
|
|
2874
|
-
"kind": "js",
|
|
2875
|
-
"name": "CARD_NUMBER",
|
|
2876
|
-
"declaration": {
|
|
2877
|
-
"name": "CARD_NUMBER",
|
|
2878
|
-
"module": "e2e/mocks/billing-address.ts"
|
|
2879
|
-
}
|
|
2880
|
-
},
|
|
2881
|
-
{
|
|
2882
|
-
"kind": "js",
|
|
2883
|
-
"name": "mockBinData",
|
|
2884
|
-
"declaration": {
|
|
2885
|
-
"name": "mockBinData",
|
|
2886
|
-
"module": "e2e/mocks/billing-address.ts"
|
|
2887
|
-
}
|
|
2888
|
-
},
|
|
2889
|
-
{
|
|
2890
|
-
"kind": "js",
|
|
2891
|
-
"name": "mockPaymentInstruments",
|
|
2892
|
-
"declaration": {
|
|
2893
|
-
"name": "mockPaymentInstruments",
|
|
2894
|
-
"module": "e2e/mocks/billing-address.ts"
|
|
2895
|
-
}
|
|
2896
|
-
},
|
|
2933
|
+
"name": "a",
|
|
2934
|
+
"default": "t"
|
|
2935
|
+
}
|
|
2936
|
+
],
|
|
2937
|
+
"exports": [
|
|
2897
2938
|
{
|
|
2898
2939
|
"kind": "js",
|
|
2899
|
-
"name": "
|
|
2940
|
+
"name": "templates",
|
|
2900
2941
|
"declaration": {
|
|
2901
|
-
"name": "
|
|
2902
|
-
"module": "
|
|
2942
|
+
"name": "a",
|
|
2943
|
+
"module": "dist/chunks/zf.LNP32XVM.js"
|
|
2903
2944
|
}
|
|
2904
2945
|
}
|
|
2905
2946
|
]
|
|
2906
2947
|
},
|
|
2907
2948
|
{
|
|
2908
2949
|
"kind": "javascript-module",
|
|
2909
|
-
"path": "
|
|
2950
|
+
"path": "dist/chunks/zh-CN.SRN7TXMD.js",
|
|
2910
2951
|
"declarations": [
|
|
2911
2952
|
{
|
|
2912
2953
|
"kind": "variable",
|
|
2913
|
-
"name": "
|
|
2914
|
-
"
|
|
2915
|
-
"text": "object"
|
|
2916
|
-
},
|
|
2917
|
-
"default": "{ coreUrl: 'https://api.sandbox.primer.io', pciUrl: 'https://sdk.api.sandbox.primer.io', binDataUrl: 'https://bin-data.api.sandbox.core.primer.io', assetsUrl: 'https://assets.sandbox.core.primer.io', checkoutModules: [], clientSession: { clientSessionId: 'f2868f83-9f30-44d0-ae15-c67d6424badc', order: { orderId: '1257721757579', currencyCode: 'USD', countryCode: 'FR', totalOrderAmount: 5050, merchantAmount: 5050, lineItems: [ { itemId: 'primer-hoodie-gray', description: 'Primer Hoodie', amount: 4950, quantity: 1, }, { itemId: 'primer-hoodie-blue', description: 'Primer Blue', amount: 50, quantity: 1, }, ], shipping: { amount: 50, methodId: 'Regular', methodName: 'Regular 50', methodDescription: 'Regular', }, }, customer: { customerId: 'Customer1234367', billingAddress: { countryCode: 'FR', }, shippingAddress: { firstName: 'test', lastName: 'test', postalCode: '51786', addressLine1: 'test', addressLine2: 'test', countryCode: 'FR', city: 'test', }, nationalDocumentId: '9011211234567', }, paymentMethod: { vaultOnSuccess: false, orderedAllowedCardNetworks: [ 'VISA', 'MASTERCARD', 'AMEX', 'MAESTRO', 'UNIONPAY', 'CARTES_BANCAIRES', 'DANKORT', 'DINERS_CLUB', 'DISCOVER', 'ENROUTE', 'ELO', 'HIPER', 'INTERAC', 'JCB', 'MIR', 'OTHER', ], vaultOnAgreement: false, }, }, primerAccountId: '33c6e1fc-5199-43ed-a734-acd3deb27d81', env: 'SANDBOX', paymentMethods: [ { id: 'a04ecba7-cc9d-40de-96b9-7bd6a85b4e0d', type: 'GOOGLE_PAY', options: { merchantId: 'Chris', merchantName: 'Chisisthebest', type: 'GOOGLE_PAY', }, implementationType: 'NATIVE_SDK', name: 'Google Pay', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/GOOGLE_PAY/google-pay-logo-dark@3x.png', dark: 'https://assets.sandbox.core.primer.io/GOOGLE_PAY/google-pay-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/GOOGLE_PAY/google-pay-logo-light@3x.png', }, backgroundColor: { colored: '#000000', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 1, dark: 1, light: 1, }, borderColor: { colored: '#8E8E93', dark: '#FFFFFF', light: '#212121', }, }, }, forceRedirect: false, implementation: {}, }, { id: '1c2bb0fc-d8ed-4399-9154-2aba015ec50a', type: 'BRAINTREE_VENMO', options: { merchantId: 'primer', merchantAccountId: 'cde7e786-5324-5e41-9694-1aa394ed5be1', }, processorConfigId: '52bef1ae-fdfc-4cae-bb91-3fb9b81a7b5a', implementationType: 'WEB_REDIRECT', name: 'Venmo', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/VENMO/venmo-logo@3x.png', dark: 'https://assets.sandbox.core.primer.io/VENMO/venmo-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/VENMO/venmo-logo-light@3x.png', }, backgroundColor: { colored: '#008CFF', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#000000', }, }, }, forceRedirect: false, implementation: {}, }, { id: '2fc60a42-3729-40c4-bf52-4427e87db7eb', type: 'KLARNA', options: { merchantId: 'PK55462', merchantAccountId: 'fcd08555-1d1a-588f-b7d7-c3058b9fcd26', clientId: 'PK55462', }, processorConfigId: 'a38c95ba-8381-4bd7-b7c5-07f36c1f0a98', implementationType: 'NATIVE_SDK', name: 'Klarna', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/KLARNA/klarna-logo@3x.png', dark: 'https://assets.sandbox.core.primer.io/KLARNA/klarna-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/KLARNA/klarna-logo-light@3x.png', }, backgroundColor: { colored: '#FFB3C7', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { colored: '#FFB3C7', dark: '#FFFFFF', light: '#212121', }, }, }, forceRedirect: false, implementation: {}, }, { id: '30294d7c-d820-470e-9d43-5b701cd925d8', type: 'PAYPAL', options: { merchantId: 'Default Application', merchantAccountId: '49989e77-764d-585f-b66c-3ea34551094b', clientId: 'AW0qJdOMrgWr2ste9V9pZ1njg3tilO-8P9-vkSfm9e0f82wlXfsAxjoNSCmu-xGfFd6vqNM9XAHB6vX_', intent: 'authorize', }, processorConfigId: 'bf904deb-a083-4168-883d-f55eb142e993', implementationType: 'NATIVE_SDK', name: 'PayPal', displayMetadata: { button: { iconUrl: { colored: 'https://assets.sandbox.core.primer.io/PAYPAL/paypal-logo@3x.png', dark: 'https://assets.sandbox.core.primer.io/PAYPAL/paypal-logo-dark@3x.png', }, backgroundColor: { colored: '#FFC439', dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, }, }, forceRedirect: false, implementation: {}, }, { type: 'PAYMENT_CARD', options: { threeDSecureProvider: '3DSECUREIO', threeDSecureEnabled: true, }, implementationType: 'NATIVE_SDK', name: 'Card', displayMetadata: { button: { iconUrl: { dark: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-dark@3x.png', light: 'https://assets.sandbox.core.primer.io/PAYMENT_CARD/payment-card-logo-light@3x.png', }, backgroundColor: { dark: '#000000', light: '#FFFFFF', }, cornerRadius: 4, borderWidth: { colored: 0, dark: 1, light: 1, }, borderColor: { dark: '#FFFFFF', light: '#212121', }, text: 'Pay by card', textColor: { dark: '#FFFFFF', light: '#000000', }, }, }, forceRedirect: false, implementation: {}, }, ], styleDefaults: {}, }"
|
|
2954
|
+
"name": "o",
|
|
2955
|
+
"default": "e"
|
|
2918
2956
|
}
|
|
2919
2957
|
],
|
|
2920
2958
|
"exports": [
|
|
2921
2959
|
{
|
|
2922
2960
|
"kind": "js",
|
|
2923
|
-
"name": "
|
|
2961
|
+
"name": "templates",
|
|
2924
2962
|
"declaration": {
|
|
2925
|
-
"name": "
|
|
2926
|
-
"module": "
|
|
2963
|
+
"name": "o",
|
|
2964
|
+
"module": "dist/chunks/zh-CN.SRN7TXMD.js"
|
|
2927
2965
|
}
|
|
2928
2966
|
}
|
|
2929
2967
|
]
|
|
2930
2968
|
},
|
|
2931
2969
|
{
|
|
2932
2970
|
"kind": "javascript-module",
|
|
2933
|
-
"path": "
|
|
2971
|
+
"path": "dist/chunks/zh-HK.3JAKYZ5N.js",
|
|
2934
2972
|
"declarations": [
|
|
2935
2973
|
{
|
|
2936
|
-
"kind": "
|
|
2937
|
-
"name": "
|
|
2938
|
-
"
|
|
2939
|
-
{
|
|
2940
|
-
"name": "page",
|
|
2941
|
-
"type": {
|
|
2942
|
-
"text": "Page"
|
|
2943
|
-
}
|
|
2944
|
-
},
|
|
2945
|
-
{
|
|
2946
|
-
"name": "config",
|
|
2947
|
-
"type": {
|
|
2948
|
-
"text": "unknown"
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
|
-
]
|
|
2952
|
-
},
|
|
2953
|
-
{
|
|
2954
|
-
"kind": "function",
|
|
2955
|
-
"name": "mockDemoUrl",
|
|
2956
|
-
"parameters": [
|
|
2957
|
-
{
|
|
2958
|
-
"name": "primerCheckoutOptions",
|
|
2959
|
-
"optional": true,
|
|
2960
|
-
"type": {
|
|
2961
|
-
"text": "PrimerCheckoutOptions"
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
]
|
|
2974
|
+
"kind": "variable",
|
|
2975
|
+
"name": "o",
|
|
2976
|
+
"default": "e"
|
|
2965
2977
|
}
|
|
2966
2978
|
],
|
|
2967
2979
|
"exports": [
|
|
2968
2980
|
{
|
|
2969
2981
|
"kind": "js",
|
|
2970
|
-
"name": "
|
|
2982
|
+
"name": "templates",
|
|
2971
2983
|
"declaration": {
|
|
2972
|
-
"name": "
|
|
2973
|
-
"module": "
|
|
2984
|
+
"name": "o",
|
|
2985
|
+
"module": "dist/chunks/zh-HK.3JAKYZ5N.js"
|
|
2974
2986
|
}
|
|
2975
|
-
}
|
|
2987
|
+
}
|
|
2988
|
+
]
|
|
2989
|
+
},
|
|
2990
|
+
{
|
|
2991
|
+
"kind": "javascript-module",
|
|
2992
|
+
"path": "dist/chunks/zh-TW.WTNQLAHV.js",
|
|
2993
|
+
"declarations": [
|
|
2994
|
+
{
|
|
2995
|
+
"kind": "variable",
|
|
2996
|
+
"name": "o",
|
|
2997
|
+
"default": "e"
|
|
2998
|
+
}
|
|
2999
|
+
],
|
|
3000
|
+
"exports": [
|
|
2976
3001
|
{
|
|
2977
3002
|
"kind": "js",
|
|
2978
|
-
"name": "
|
|
3003
|
+
"name": "templates",
|
|
2979
3004
|
"declaration": {
|
|
2980
|
-
"name": "
|
|
2981
|
-
"module": "
|
|
3005
|
+
"name": "o",
|
|
3006
|
+
"module": "dist/chunks/zh-TW.WTNQLAHV.js"
|
|
2982
3007
|
}
|
|
2983
3008
|
}
|
|
2984
3009
|
]
|
|
2985
3010
|
},
|
|
2986
|
-
{
|
|
2987
|
-
"kind": "javascript-module",
|
|
2988
|
-
"path": "e2e/tests/card-form-billing-address.spec.ts",
|
|
2989
|
-
"declarations": [],
|
|
2990
|
-
"exports": []
|
|
2991
|
-
},
|
|
2992
|
-
{
|
|
2993
|
-
"kind": "javascript-module",
|
|
2994
|
-
"path": "e2e/tests/paypal.spec.ts",
|
|
2995
|
-
"declarations": [],
|
|
2996
|
-
"exports": []
|
|
2997
|
-
},
|
|
2998
3011
|
{
|
|
2999
3012
|
"kind": "javascript-module",
|
|
3000
3013
|
"path": "src/__tests__/setup.ts",
|
|
@@ -3173,6 +3186,14 @@
|
|
|
3173
3186
|
"module": "./redirect-payment/redirect-payment"
|
|
3174
3187
|
}
|
|
3175
3188
|
},
|
|
3189
|
+
{
|
|
3190
|
+
"kind": "js",
|
|
3191
|
+
"name": "BackendDriven",
|
|
3192
|
+
"declaration": {
|
|
3193
|
+
"name": "BackendDriven",
|
|
3194
|
+
"module": "./backend-driven/backend-driven"
|
|
3195
|
+
}
|
|
3196
|
+
},
|
|
3176
3197
|
{
|
|
3177
3198
|
"kind": "js",
|
|
3178
3199
|
"name": "BillingAddress",
|
|
@@ -3653,25 +3674,6 @@
|
|
|
3653
3674
|
"kind": "method",
|
|
3654
3675
|
"name": "initializeHeadless"
|
|
3655
3676
|
},
|
|
3656
|
-
{
|
|
3657
|
-
"kind": "method",
|
|
3658
|
-
"name": "createManager",
|
|
3659
|
-
"privacy": "private",
|
|
3660
|
-
"parameters": [
|
|
3661
|
-
{
|
|
3662
|
-
"name": "paymentMethod",
|
|
3663
|
-
"type": {
|
|
3664
|
-
"text": "PaymentMethodInfo"
|
|
3665
|
-
}
|
|
3666
|
-
},
|
|
3667
|
-
{
|
|
3668
|
-
"name": "headlessInstance",
|
|
3669
|
-
"type": {
|
|
3670
|
-
"text": "PrimerHeadlessCheckout"
|
|
3671
|
-
}
|
|
3672
|
-
}
|
|
3673
|
-
]
|
|
3674
|
-
},
|
|
3675
3677
|
{
|
|
3676
3678
|
"kind": "method",
|
|
3677
3679
|
"name": "updateCardNetworksState",
|
|
@@ -3711,9 +3713,9 @@
|
|
|
3711
3713
|
},
|
|
3712
3714
|
"parameters": [
|
|
3713
3715
|
{
|
|
3714
|
-
"name": "
|
|
3716
|
+
"name": "paymentMethods",
|
|
3715
3717
|
"type": {
|
|
3716
|
-
"text": "
|
|
3718
|
+
"text": "InitializedPaymentMethod[]"
|
|
3717
3719
|
}
|
|
3718
3720
|
}
|
|
3719
3721
|
]
|
|
@@ -3725,7 +3727,8 @@
|
|
|
3725
3727
|
"name": "paymentMethods",
|
|
3726
3728
|
"type": {
|
|
3727
3729
|
"text": "InitializedPaymentMethod[]"
|
|
3728
|
-
}
|
|
3730
|
+
},
|
|
3731
|
+
"default": "[]"
|
|
3729
3732
|
}
|
|
3730
3733
|
],
|
|
3731
3734
|
"exports": [
|
|
@@ -4526,7 +4529,7 @@
|
|
|
4526
4529
|
"name": "getPaymentMethods",
|
|
4527
4530
|
"return": {
|
|
4528
4531
|
"type": {
|
|
4529
|
-
"text": "
|
|
4532
|
+
"text": "InitializedPaymentMethod[]"
|
|
4530
4533
|
}
|
|
4531
4534
|
},
|
|
4532
4535
|
"description": "Returns the cached list of payment methods."
|
|
@@ -4586,7 +4589,7 @@
|
|
|
4586
4589
|
"type": {
|
|
4587
4590
|
"text": "ContextProvider<{\n __context__: ContextType;\n }>"
|
|
4588
4591
|
},
|
|
4589
|
-
"default": "new ContextProvider(host, { context, initialValue: structuredClone(initialContext), })"
|
|
4592
|
+
"default": "new ContextProvider(host, { context, initialValue: { ...structuredClone(initialContext), setProcessing: (isProcessing: boolean) => this.setSdkState({ isProcessing }), }, })"
|
|
4590
4593
|
},
|
|
4591
4594
|
{
|
|
4592
4595
|
"kind": "method",
|
|
@@ -4669,40 +4672,6 @@
|
|
|
4669
4672
|
}
|
|
4670
4673
|
]
|
|
4671
4674
|
},
|
|
4672
|
-
{
|
|
4673
|
-
"kind": "method",
|
|
4674
|
-
"name": "setKlarnaCategories",
|
|
4675
|
-
"return": {
|
|
4676
|
-
"type": {
|
|
4677
|
-
"text": "void"
|
|
4678
|
-
}
|
|
4679
|
-
},
|
|
4680
|
-
"parameters": [
|
|
4681
|
-
{
|
|
4682
|
-
"name": "value",
|
|
4683
|
-
"type": {
|
|
4684
|
-
"text": "KlarnaCategoriesContextType"
|
|
4685
|
-
}
|
|
4686
|
-
}
|
|
4687
|
-
]
|
|
4688
|
-
},
|
|
4689
|
-
{
|
|
4690
|
-
"kind": "method",
|
|
4691
|
-
"name": "setAdyenKlarnaOptions",
|
|
4692
|
-
"return": {
|
|
4693
|
-
"type": {
|
|
4694
|
-
"text": "void"
|
|
4695
|
-
}
|
|
4696
|
-
},
|
|
4697
|
-
"parameters": [
|
|
4698
|
-
{
|
|
4699
|
-
"name": "value",
|
|
4700
|
-
"type": {
|
|
4701
|
-
"text": "AdyenKlarnaOptionsContextType"
|
|
4702
|
-
}
|
|
4703
|
-
}
|
|
4704
|
-
]
|
|
4705
|
-
},
|
|
4706
4675
|
{
|
|
4707
4676
|
"kind": "method",
|
|
4708
4677
|
"name": "setComputedStyles",
|
|
@@ -5397,9 +5366,9 @@
|
|
|
5397
5366
|
},
|
|
5398
5367
|
{
|
|
5399
5368
|
"kind": "js",
|
|
5400
|
-
"name": "
|
|
5369
|
+
"name": "HostedInput",
|
|
5401
5370
|
"declaration": {
|
|
5402
|
-
"name": "
|
|
5371
|
+
"name": "HostedInput",
|
|
5403
5372
|
"package": "@primer-io/sdk-core"
|
|
5404
5373
|
}
|
|
5405
5374
|
},
|
|
@@ -5419,14 +5388,6 @@
|
|
|
5419
5388
|
"package": "@primer-io/sdk-core"
|
|
5420
5389
|
}
|
|
5421
5390
|
},
|
|
5422
|
-
{
|
|
5423
|
-
"kind": "js",
|
|
5424
|
-
"name": "PaymentMethodInfo",
|
|
5425
|
-
"declaration": {
|
|
5426
|
-
"name": "PaymentMethodInfo",
|
|
5427
|
-
"package": "@primer-io/sdk-core"
|
|
5428
|
-
}
|
|
5429
|
-
},
|
|
5430
5391
|
{
|
|
5431
5392
|
"kind": "js",
|
|
5432
5393
|
"name": "PaymentSummary",
|
|
@@ -8742,7 +8703,7 @@
|
|
|
8742
8703
|
"kind": "field",
|
|
8743
8704
|
"name": "paymentMethod",
|
|
8744
8705
|
"type": {
|
|
8745
|
-
"text": "
|
|
8706
|
+
"text": "AdyenKlarnaPaymentMethod | undefined"
|
|
8746
8707
|
},
|
|
8747
8708
|
"description": "The payment method from context",
|
|
8748
8709
|
"attribute": "paymentMethod"
|
|
@@ -8796,15 +8757,6 @@
|
|
|
8796
8757
|
"privacy": "private",
|
|
8797
8758
|
"default": "false"
|
|
8798
8759
|
},
|
|
8799
|
-
{
|
|
8800
|
-
"kind": "field",
|
|
8801
|
-
"name": "manager",
|
|
8802
|
-
"type": {
|
|
8803
|
-
"text": "IAdyenKlarnaPaymentMethodManager | null"
|
|
8804
|
-
},
|
|
8805
|
-
"privacy": "private",
|
|
8806
|
-
"readonly": true
|
|
8807
|
-
},
|
|
8808
8760
|
{
|
|
8809
8761
|
"kind": "field",
|
|
8810
8762
|
"name": "klarnaLogoUrl",
|
|
@@ -8843,7 +8795,7 @@
|
|
|
8843
8795
|
{
|
|
8844
8796
|
"name": "paymentMethod",
|
|
8845
8797
|
"type": {
|
|
8846
|
-
"text": "
|
|
8798
|
+
"text": "AdyenKlarnaPaymentMethod | undefined"
|
|
8847
8799
|
},
|
|
8848
8800
|
"description": "The payment method from context",
|
|
8849
8801
|
"fieldName": "paymentMethod"
|
|
@@ -9136,6 +9088,104 @@
|
|
|
9136
9088
|
}
|
|
9137
9089
|
]
|
|
9138
9090
|
},
|
|
9091
|
+
{
|
|
9092
|
+
"kind": "javascript-module",
|
|
9093
|
+
"path": "src/containers/backend-driven/backend-driven.component.ts",
|
|
9094
|
+
"declarations": [
|
|
9095
|
+
{
|
|
9096
|
+
"kind": "class",
|
|
9097
|
+
"description": "Surface for a payment method whose flow the backend drives through a step\ntree. Today every step tree starts by handing off to a third party, so this\nrenders a button — but unlike a redirect method, what the flow needs of this\ncomponent is open-ended: steps can ask for input, render UI, or wait, and\nthis is where that grows.",
|
|
9098
|
+
"name": "BackendDrivenComponent",
|
|
9099
|
+
"members": [
|
|
9100
|
+
{
|
|
9101
|
+
"kind": "field",
|
|
9102
|
+
"name": "paymentMethod",
|
|
9103
|
+
"type": {
|
|
9104
|
+
"text": "BackendDrivenPaymentMethod | undefined"
|
|
9105
|
+
},
|
|
9106
|
+
"attribute": "paymentMethod"
|
|
9107
|
+
},
|
|
9108
|
+
{
|
|
9109
|
+
"kind": "field",
|
|
9110
|
+
"name": "disabled",
|
|
9111
|
+
"type": {
|
|
9112
|
+
"text": "boolean"
|
|
9113
|
+
},
|
|
9114
|
+
"default": "false",
|
|
9115
|
+
"attribute": "disabled"
|
|
9116
|
+
},
|
|
9117
|
+
{
|
|
9118
|
+
"kind": "field",
|
|
9119
|
+
"name": "primerContext",
|
|
9120
|
+
"type": {
|
|
9121
|
+
"text": "ContextType | undefined"
|
|
9122
|
+
}
|
|
9123
|
+
},
|
|
9124
|
+
{
|
|
9125
|
+
"kind": "method",
|
|
9126
|
+
"name": "_handleClick",
|
|
9127
|
+
"privacy": "private"
|
|
9128
|
+
}
|
|
9129
|
+
],
|
|
9130
|
+
"attributes": [
|
|
9131
|
+
{
|
|
9132
|
+
"name": "paymentMethod",
|
|
9133
|
+
"type": {
|
|
9134
|
+
"text": "BackendDrivenPaymentMethod | undefined"
|
|
9135
|
+
},
|
|
9136
|
+
"fieldName": "paymentMethod"
|
|
9137
|
+
},
|
|
9138
|
+
{
|
|
9139
|
+
"name": "disabled",
|
|
9140
|
+
"type": {
|
|
9141
|
+
"text": "boolean"
|
|
9142
|
+
},
|
|
9143
|
+
"default": "false",
|
|
9144
|
+
"fieldName": "disabled"
|
|
9145
|
+
}
|
|
9146
|
+
],
|
|
9147
|
+
"superclass": {
|
|
9148
|
+
"name": "LitElement",
|
|
9149
|
+
"package": "lit"
|
|
9150
|
+
},
|
|
9151
|
+
"tagName": "primer-backend-driven",
|
|
9152
|
+
"customElement": true
|
|
9153
|
+
}
|
|
9154
|
+
],
|
|
9155
|
+
"exports": [
|
|
9156
|
+
{
|
|
9157
|
+
"kind": "js",
|
|
9158
|
+
"name": "BackendDrivenComponent",
|
|
9159
|
+
"declaration": {
|
|
9160
|
+
"name": "BackendDrivenComponent",
|
|
9161
|
+
"module": "src/containers/backend-driven/backend-driven.component.ts"
|
|
9162
|
+
}
|
|
9163
|
+
},
|
|
9164
|
+
{
|
|
9165
|
+
"kind": "custom-element-definition",
|
|
9166
|
+
"name": "primer-backend-driven",
|
|
9167
|
+
"declaration": {
|
|
9168
|
+
"name": "BackendDrivenComponent",
|
|
9169
|
+
"module": "src/containers/backend-driven/backend-driven.component.ts"
|
|
9170
|
+
}
|
|
9171
|
+
}
|
|
9172
|
+
]
|
|
9173
|
+
},
|
|
9174
|
+
{
|
|
9175
|
+
"kind": "javascript-module",
|
|
9176
|
+
"path": "src/containers/backend-driven/backend-driven.ts",
|
|
9177
|
+
"declarations": [],
|
|
9178
|
+
"exports": [
|
|
9179
|
+
{
|
|
9180
|
+
"kind": "js",
|
|
9181
|
+
"name": "BackendDriven",
|
|
9182
|
+
"declaration": {
|
|
9183
|
+
"name": "BackendDrivenComponent",
|
|
9184
|
+
"module": "src/containers/backend-driven/backend-driven.ts"
|
|
9185
|
+
}
|
|
9186
|
+
}
|
|
9187
|
+
]
|
|
9188
|
+
},
|
|
9139
9189
|
{
|
|
9140
9190
|
"kind": "javascript-module",
|
|
9141
9191
|
"path": "src/containers/billing-address/billing-address.component.ts",
|
|
@@ -9951,7 +10001,7 @@
|
|
|
9951
10001
|
"name": "setupCardFormTask",
|
|
9952
10002
|
"privacy": "private",
|
|
9953
10003
|
"readonly": true,
|
|
9954
|
-
"default": "new Task(this, { task: ([methods]) => { const
|
|
10004
|
+
"default": "new Task(this, { task: ([methods]) => { const method = methods?.find( (pm) => pm.type === PaymentMethodType.PAYMENT_CARD, ); if (!method) { return initialState; } const { cardNumber, cardExpiryDate, cardSecurityCode, cardholderName } = method.iframes; this.cardFormProvider.setValue({ cardholderNameInput: cardholderName, cardNumberInput: cardNumber, expiryInput: cardExpiryDate, cvvInput: cardSecurityCode, setCardholderName: (val: string) => { method.setCardholderName(val); if (this.shouldRequireCardholderName) { void method.validate().then((validationResult) => { const errors = validationResult?.validationErrors; const cardholderNameError = errors?.find( (error) => error.name === fieldToInputType.cardholderName, ); const controller = this.inputControllers.get( HostedInputType.CARD_HOLDER_NAME, ); if (controller) { controller.updateMetaFromValidation({ valid: false, error: cardholderNameError?.message || cardholderNameError?.error || null, errorCode: cardholderNameError?.message || cardholderNameError?.error || null, }); } }); } }, setCardNetwork: (val: string) => { this.selectedCardNetwork = val; }, validate: () => method.validate(), submit: (args) => method.submit(args), hideLabels: this.hideLabels, disabled: this.disabled, // New meta state management methods setSubmissionState: (submitted: boolean) => { this.inputControllers.forEach((controller) => { controller.setSubmitted(submitted); }); }, propagateValidationErrors: (errors: InputValidationError[]) => { if (!errors) { return; } errors.forEach((error) => { const fieldName = error.field || error.name; const errorMessage = error.message || error.error; const inputType = fieldToInputType[fieldName]; if (inputType) { const controller = this.inputControllers.get(inputType); if (controller) { const updateData = { valid: false, error: errorMessage, errorCode: errorMessage, // Use error message (localization key) instead of field name }; controller.updateMetaFromValidation(updateData); } } }); }, registerInputController: ( inputType: HostedInputType, controller: IHostedInputController, ) => { this.inputControllers.set(inputType, controller); }, unregisterInputController: (inputType: HostedInputType) => { this.inputControllers.delete(inputType); }, onUserInteraction: () => { this.sendPaymentMethodSelectionEvent(); this.checkAndSendPaymentDetailsEnteredEvent(); }, }); return true; }, args: () => [this.primerContext?.paymentMethods], })",
|
|
9955
10005
|
"description": "Task to set up the card form with hosted inputs"
|
|
9956
10006
|
},
|
|
9957
10007
|
{
|
|
@@ -10379,7 +10429,7 @@
|
|
|
10379
10429
|
"kind": "field",
|
|
10380
10430
|
"name": "_setupTask",
|
|
10381
10431
|
"privacy": "private",
|
|
10382
|
-
"default": "new Task(this, { task: async ([methods, headlessUtils]) => { const
|
|
10432
|
+
"default": "new Task(this, { task: async ([methods, headlessUtils]) => { const method = methods?.find( (pm) => pm.type === PaymentMethodType.KLARNA, ); if (method?.type !== PaymentMethodType.KLARNA || !headlessUtils) { return initialState; } return { method }; }, args: () => [ this.primerContext?.paymentMethods, this.primerContext?.headlessUtils, ], })"
|
|
10383
10433
|
},
|
|
10384
10434
|
{
|
|
10385
10435
|
"kind": "field",
|
|
@@ -10545,7 +10595,7 @@
|
|
|
10545
10595
|
"kind": "field",
|
|
10546
10596
|
"name": "renderButtonTask",
|
|
10547
10597
|
"privacy": "private",
|
|
10548
|
-
"default": "new Task(this, { args: () => [this.paymentMethod], task: async ([paymentMethod]) => { if (!paymentMethod) { return initialState; } // Ensure the component's DOM is updated await this.updateComplete; const
|
|
10598
|
+
"default": "new Task(this, { args: () => [this.paymentMethod], task: async ([paymentMethod]) => { if (!paymentMethod) { return initialState; } // Ensure the component's DOM is updated await this.updateComplete; const buttonContainer = this.buttonContainerRef.value; if (!buttonContainer) { throw new SdkError({ origin: 'integration', message: 'Button container not found', code: InitializationErrorCodes.CONTAINER_NOT_FOUND, }); } const style = paymentMethod.type === 'GOOGLE_PAY' ? { shadowRoot: this.shadowRoot } : paymentMethod.type === 'APPLE_PAY' ? { buttonHeight: calculateButtonHeight(buttonContainer) } : { buttonHeight: getPayPalConstrainedHeight( calculateButtonHeight(this), ), }; await paymentMethod.render(buttonContainer, { style }); // Apply current disabled state to newly rendered button if (this.disabled) { await paymentMethod.setDisabled(this.disabled); } return paymentMethod; }, })"
|
|
10549
10599
|
}
|
|
10550
10600
|
],
|
|
10551
10601
|
"attributes": [
|
|
@@ -12014,6 +12064,13 @@
|
|
|
12014
12064
|
"default": "false",
|
|
12015
12065
|
"attribute": "disabled"
|
|
12016
12066
|
},
|
|
12067
|
+
{
|
|
12068
|
+
"kind": "field",
|
|
12069
|
+
"name": "primerContext",
|
|
12070
|
+
"type": {
|
|
12071
|
+
"text": "ContextType | undefined"
|
|
12072
|
+
}
|
|
12073
|
+
},
|
|
12017
12074
|
{
|
|
12018
12075
|
"kind": "method",
|
|
12019
12076
|
"name": "_handleClick",
|
|
@@ -13400,7 +13457,7 @@
|
|
|
13400
13457
|
"kind": "field",
|
|
13401
13458
|
"name": "_hostedInput",
|
|
13402
13459
|
"type": {
|
|
13403
|
-
"text": "
|
|
13460
|
+
"text": "HostedInput | null"
|
|
13404
13461
|
},
|
|
13405
13462
|
"privacy": "private",
|
|
13406
13463
|
"default": "null"
|
|
@@ -13559,7 +13616,7 @@
|
|
|
13559
13616
|
{
|
|
13560
13617
|
"name": "hostedInput",
|
|
13561
13618
|
"type": {
|
|
13562
|
-
"text": "
|
|
13619
|
+
"text": "HostedInput"
|
|
13563
13620
|
}
|
|
13564
13621
|
},
|
|
13565
13622
|
{
|
|
@@ -14154,7 +14211,7 @@
|
|
|
14154
14211
|
{
|
|
14155
14212
|
"name": "paymentMethod",
|
|
14156
14213
|
"type": {
|
|
14157
|
-
"text": "
|
|
14214
|
+
"text": "VaultedPaymentMethod"
|
|
14158
14215
|
}
|
|
14159
14216
|
}
|
|
14160
14217
|
],
|