@primer-io/primer-js 1.6.3 → 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 +12 -0
- package/dist/custom-elements.json +288 -238
- package/dist/jsx/index.d.ts +21 -1
- package/dist/primer-loader.d.ts +207 -247
- package/dist/primer-loader.js +41 -41
- package/dist/vscode.html-custom-data.json +13 -1
- package/dist/web-types.json +30 -3
- package/package.json +1 -1
|
@@ -98,263 +98,268 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"kind": "variable",
|
|
101
|
-
"name": "
|
|
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?
|
|
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}}"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"kind": "variable",
|
|
106
|
-
"name": "
|
|
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=
|
|
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)}}"
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
"kind": "function",
|
|
111
|
-
"name": "
|
|
111
|
+
"name": "Ql"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"kind": "function",
|
|
115
|
-
"name": "
|
|
115
|
+
"name": "Xl"
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"kind": "function",
|
|
119
|
-
"name": "
|
|
119
|
+
"name": "fg"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"kind": "function",
|
|
123
|
-
"name": "
|
|
123
|
+
"name": "vg"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"kind": "variable",
|
|
127
|
-
"name": "
|
|
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
|
|
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>`}}"
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"kind": "variable",
|
|
132
|
-
"name": "
|
|
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
|
|
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>`}}"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"kind": "variable",
|
|
137
|
-
"name": "
|
|
138
|
-
"default": "class extends b{constructor(){super(...arguments);this.for=\"\";this.disabled=!1}render(){return
|
|
137
|
+
"name": "et",
|
|
138
|
+
"default": "class extends b{constructor(){super(...arguments);this.for=\"\";this.disabled=!1}render(){return p`<label for=${this.for}><slot></slot></label>`}}"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"kind": "variable",
|
|
142
|
-
"name": "
|
|
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?
|
|
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>`}}"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"kind": "variable",
|
|
147
|
-
"name": "
|
|
148
|
-
"default": "class extends b{constructor(){super(...arguments);this.for=\"\";this.active=!0}render(){return
|
|
147
|
+
"name": "tt",
|
|
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>`}}"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"kind": "variable",
|
|
152
|
-
"name": "
|
|
153
|
-
"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>`}}"
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
"kind": "variable",
|
|
157
|
-
"name": "
|
|
158
|
-
"default": "class extends b{constructor(){super(...arguments);this.type=\"complete\"}render(){return this.type===\"complete\"?
|
|
157
|
+
"name": "rt",
|
|
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>`} `}}"
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"kind": "variable",
|
|
162
|
-
"name": "
|
|
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
|
|
162
|
+
"name": "H",
|
|
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)}}"
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
"kind": "variable",
|
|
167
|
-
"name": "
|
|
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
|
|
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>`}}"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"kind": "variable",
|
|
172
|
-
"name": "
|
|
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(
|
|
172
|
+
"name": "ye",
|
|
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>`}}"
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
"kind": "variable",
|
|
177
|
-
"name": "
|
|
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
|
|
177
|
+
"name": "de",
|
|
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>`}}"
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
"kind": "variable",
|
|
182
|
-
"name": "
|
|
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
|
|
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>`}}"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"kind": "variable",
|
|
187
|
-
"name": "
|
|
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?
|
|
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``}}"
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"kind": "variable",
|
|
192
|
-
"name": "
|
|
193
|
-
"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})}}"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"kind": "variable",
|
|
197
|
-
"name": "
|
|
198
|
-
"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>`}}"
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
"kind": "variable",
|
|
202
|
-
"name": "
|
|
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)
|
|
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>`}}"
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"kind": "variable",
|
|
207
|
-
"name": "
|
|
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
|
|
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>`}}"
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
"kind": "variable",
|
|
212
|
-
"name": "
|
|
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?.
|
|
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>`}}"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"kind": "variable",
|
|
217
|
-
"name": "
|
|
218
|
-
"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>`}})}}"
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
"kind": "variable",
|
|
222
|
-
"name": "
|
|
223
|
-
"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>`}}"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
"kind": "variable",
|
|
227
|
-
"name": "
|
|
228
|
-
"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>`}}"
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
"kind": "variable",
|
|
232
|
-
"name": "
|
|
233
|
-
"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>`}}"
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
"kind": "variable",
|
|
237
|
-
"name": "
|
|
238
|
-
"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>`}}"
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
"kind": "variable",
|
|
242
|
-
"name": "
|
|
243
|
-
"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)})}}"
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
"kind": "variable",
|
|
247
|
-
"name": "
|
|
248
|
-
"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>`)} `}}"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"kind": "variable",
|
|
252
|
-
"name": "
|
|
253
|
-
"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>`}})}}"
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"kind": "variable",
|
|
257
|
-
"name": "
|
|
258
|
-
"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>`}}"
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
"kind": "variable",
|
|
262
|
-
"name": "
|
|
263
|
-
"default": "class extends b{render(){return
|
|
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>`}}"
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
266
|
"kind": "variable",
|
|
267
|
-
"name": "
|
|
268
|
-
"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>`}}"
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
"kind": "variable",
|
|
272
|
-
"name": "
|
|
273
|
-
"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>`}}"
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"kind": "variable",
|
|
277
|
-
"name": "
|
|
278
|
-
"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
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"kind": "variable",
|
|
282
|
-
"name": "
|
|
283
|
-
"default": "class extends b{constructor(){super(
|
|
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>`})}}"
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
"kind": "variable",
|
|
287
|
-
"name": "
|
|
288
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
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}}"
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"kind": "variable",
|
|
292
|
-
"name": "
|
|
293
|
-
"default": "class extends
|
|
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>`}}"
|
|
294
294
|
},
|
|
295
295
|
{
|
|
296
296
|
"kind": "variable",
|
|
297
|
-
"name": "
|
|
298
|
-
"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()}}"
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"kind": "variable",
|
|
302
|
-
"name": "
|
|
303
|
-
"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()}}"
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
"kind": "variable",
|
|
307
|
-
"name": "
|
|
308
|
-
"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()}}"
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
311
|
"kind": "variable",
|
|
312
|
-
"name": "
|
|
313
|
-
"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()}}"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"kind": "variable",
|
|
317
|
-
"name": "
|
|
318
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
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>`}}"
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"kind": "variable",
|
|
322
|
-
"name": "
|
|
323
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
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)} `}}"
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
"kind": "variable",
|
|
327
|
-
"name": "
|
|
328
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
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>`}}"
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
"kind": "variable",
|
|
332
|
-
"name": "
|
|
333
|
-
"default": "class extends b{constructor(){super(...arguments);this.disabled=!1;this.loading=!1}
|
|
332
|
+
"name": "Ie",
|
|
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>`}}"
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
336
|
"kind": "variable",
|
|
337
|
-
"name": "
|
|
338
|
-
"default": "class extends b{render(){return
|
|
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>`}}"
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"kind": "variable",
|
|
342
|
-
"name": "
|
|
343
|
-
"default": "class extends b{render(){return
|
|
342
|
+
"name": "hr",
|
|
343
|
+
"default": "class extends b{render(){return p`<primer-checkout-state type=\"complete\"></primer-checkout-state>`}}"
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
"kind": "variable",
|
|
347
|
-
"name": "
|
|
348
|
-
"default": "class extends b{
|
|
347
|
+
"name": "zt",
|
|
348
|
+
"default": "class extends b{render(){return p`<primer-checkout-state type=\"failure\" description=${this.primerContext?.sdkState?.primerJsError?.message||\"\"} ></primer-checkout-state>`}}"
|
|
349
349
|
},
|
|
350
350
|
{
|
|
351
351
|
"kind": "variable",
|
|
352
|
-
"name": "
|
|
353
|
-
"default": "class extends b{constructor(){super(...arguments);this.
|
|
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}}"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"kind": "variable",
|
|
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>`)} `}}"
|
|
354
359
|
},
|
|
355
360
|
{
|
|
356
361
|
"kind": "function",
|
|
357
|
-
"name": "
|
|
362
|
+
"name": "MB"
|
|
358
363
|
}
|
|
359
364
|
],
|
|
360
365
|
"exports": [
|
|
@@ -378,7 +383,15 @@
|
|
|
378
383
|
"kind": "js",
|
|
379
384
|
"name": "AdyenMbway",
|
|
380
385
|
"declaration": {
|
|
381
|
-
"name": "
|
|
386
|
+
"name": "Te",
|
|
387
|
+
"module": "dist/primer-loader.js"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"kind": "js",
|
|
392
|
+
"name": "BackendDriven",
|
|
393
|
+
"declaration": {
|
|
394
|
+
"name": "He",
|
|
382
395
|
"module": "dist/primer-loader.js"
|
|
383
396
|
}
|
|
384
397
|
},
|
|
@@ -386,7 +399,7 @@
|
|
|
386
399
|
"kind": "js",
|
|
387
400
|
"name": "BillingAddress",
|
|
388
401
|
"declaration": {
|
|
389
|
-
"name": "
|
|
402
|
+
"name": "ae",
|
|
390
403
|
"module": "dist/primer-loader.js"
|
|
391
404
|
}
|
|
392
405
|
},
|
|
@@ -394,7 +407,7 @@
|
|
|
394
407
|
"kind": "js",
|
|
395
408
|
"name": "Blik",
|
|
396
409
|
"declaration": {
|
|
397
|
-
"name": "
|
|
410
|
+
"name": "ve",
|
|
398
411
|
"module": "dist/primer-loader.js"
|
|
399
412
|
}
|
|
400
413
|
},
|
|
@@ -402,7 +415,7 @@
|
|
|
402
415
|
"kind": "js",
|
|
403
416
|
"name": "Button",
|
|
404
417
|
"declaration": {
|
|
405
|
-
"name": "
|
|
418
|
+
"name": "le",
|
|
406
419
|
"module": "dist/primer-loader.js"
|
|
407
420
|
}
|
|
408
421
|
},
|
|
@@ -410,7 +423,7 @@
|
|
|
410
423
|
"kind": "js",
|
|
411
424
|
"name": "CardForm",
|
|
412
425
|
"declaration": {
|
|
413
|
-
"name": "
|
|
426
|
+
"name": "Ce",
|
|
414
427
|
"module": "dist/primer-loader.js"
|
|
415
428
|
}
|
|
416
429
|
},
|
|
@@ -418,7 +431,7 @@
|
|
|
418
431
|
"kind": "js",
|
|
419
432
|
"name": "CardFormCVV",
|
|
420
433
|
"declaration": {
|
|
421
|
-
"name": "
|
|
434
|
+
"name": "nt",
|
|
422
435
|
"module": "dist/primer-loader.js"
|
|
423
436
|
}
|
|
424
437
|
},
|
|
@@ -426,7 +439,7 @@
|
|
|
426
439
|
"kind": "js",
|
|
427
440
|
"name": "CardFormCardNetworkSelector",
|
|
428
441
|
"declaration": {
|
|
429
|
-
"name": "
|
|
442
|
+
"name": "ue",
|
|
430
443
|
"module": "dist/primer-loader.js"
|
|
431
444
|
}
|
|
432
445
|
},
|
|
@@ -434,7 +447,7 @@
|
|
|
434
447
|
"kind": "js",
|
|
435
448
|
"name": "CardFormCardNumber",
|
|
436
449
|
"declaration": {
|
|
437
|
-
"name": "
|
|
450
|
+
"name": "it",
|
|
438
451
|
"module": "dist/primer-loader.js"
|
|
439
452
|
}
|
|
440
453
|
},
|
|
@@ -442,7 +455,7 @@
|
|
|
442
455
|
"kind": "js",
|
|
443
456
|
"name": "CardFormError",
|
|
444
457
|
"declaration": {
|
|
445
|
-
"name": "
|
|
458
|
+
"name": "tt",
|
|
446
459
|
"module": "dist/primer-loader.js"
|
|
447
460
|
}
|
|
448
461
|
},
|
|
@@ -450,7 +463,7 @@
|
|
|
450
463
|
"kind": "js",
|
|
451
464
|
"name": "CardFormExpiry",
|
|
452
465
|
"declaration": {
|
|
453
|
-
"name": "
|
|
466
|
+
"name": "ot",
|
|
454
467
|
"module": "dist/primer-loader.js"
|
|
455
468
|
}
|
|
456
469
|
},
|
|
@@ -458,7 +471,7 @@
|
|
|
458
471
|
"kind": "js",
|
|
459
472
|
"name": "CardFormName",
|
|
460
473
|
"declaration": {
|
|
461
|
-
"name": "
|
|
474
|
+
"name": "st",
|
|
462
475
|
"module": "dist/primer-loader.js"
|
|
463
476
|
}
|
|
464
477
|
},
|
|
@@ -466,7 +479,7 @@
|
|
|
466
479
|
"kind": "js",
|
|
467
480
|
"name": "CardFormSubmit",
|
|
468
481
|
"declaration": {
|
|
469
|
-
"name": "
|
|
482
|
+
"name": "ce",
|
|
470
483
|
"module": "dist/primer-loader.js"
|
|
471
484
|
}
|
|
472
485
|
},
|
|
@@ -474,7 +487,7 @@
|
|
|
474
487
|
"kind": "js",
|
|
475
488
|
"name": "Collapsable",
|
|
476
489
|
"declaration": {
|
|
477
|
-
"name": "
|
|
490
|
+
"name": "de",
|
|
478
491
|
"module": "dist/primer-loader.js"
|
|
479
492
|
}
|
|
480
493
|
},
|
|
@@ -482,7 +495,7 @@
|
|
|
482
495
|
"kind": "js",
|
|
483
496
|
"name": "Dialog",
|
|
484
497
|
"declaration": {
|
|
485
|
-
"name": "
|
|
498
|
+
"name": "we",
|
|
486
499
|
"module": "dist/primer-loader.js"
|
|
487
500
|
}
|
|
488
501
|
},
|
|
@@ -490,7 +503,7 @@
|
|
|
490
503
|
"kind": "js",
|
|
491
504
|
"name": "ErrorMessage",
|
|
492
505
|
"declaration": {
|
|
493
|
-
"name": "
|
|
506
|
+
"name": "Ue",
|
|
494
507
|
"module": "dist/primer-loader.js"
|
|
495
508
|
}
|
|
496
509
|
},
|
|
@@ -498,7 +511,7 @@
|
|
|
498
511
|
"kind": "js",
|
|
499
512
|
"name": "ErrorMessageContainer",
|
|
500
513
|
"declaration": {
|
|
501
|
-
"name": "
|
|
514
|
+
"name": "dt",
|
|
502
515
|
"module": "dist/primer-loader.js"
|
|
503
516
|
}
|
|
504
517
|
},
|
|
@@ -506,7 +519,7 @@
|
|
|
506
519
|
"kind": "js",
|
|
507
520
|
"name": "Input",
|
|
508
521
|
"declaration": {
|
|
509
|
-
"name": "
|
|
522
|
+
"name": "H",
|
|
510
523
|
"module": "dist/primer-loader.js"
|
|
511
524
|
}
|
|
512
525
|
},
|
|
@@ -514,7 +527,7 @@
|
|
|
514
527
|
"kind": "js",
|
|
515
528
|
"name": "InputLabel",
|
|
516
529
|
"declaration": {
|
|
517
|
-
"name": "
|
|
530
|
+
"name": "et",
|
|
518
531
|
"module": "dist/primer-loader.js"
|
|
519
532
|
}
|
|
520
533
|
},
|
|
@@ -522,7 +535,7 @@
|
|
|
522
535
|
"kind": "js",
|
|
523
536
|
"name": "InputWrapper",
|
|
524
537
|
"declaration": {
|
|
525
|
-
"name": "
|
|
538
|
+
"name": "Ke",
|
|
526
539
|
"module": "dist/primer-loader.js"
|
|
527
540
|
}
|
|
528
541
|
},
|
|
@@ -530,7 +543,7 @@
|
|
|
530
543
|
"kind": "js",
|
|
531
544
|
"name": "NativePayment",
|
|
532
545
|
"declaration": {
|
|
533
|
-
"name": "
|
|
546
|
+
"name": "xe",
|
|
534
547
|
"module": "dist/primer-loader.js"
|
|
535
548
|
}
|
|
536
549
|
},
|
|
@@ -538,7 +551,7 @@
|
|
|
538
551
|
"kind": "js",
|
|
539
552
|
"name": "PaymentMethod",
|
|
540
553
|
"declaration": {
|
|
541
|
-
"name": "
|
|
554
|
+
"name": "Re",
|
|
542
555
|
"module": "dist/primer-loader.js"
|
|
543
556
|
}
|
|
544
557
|
},
|
|
@@ -546,7 +559,7 @@
|
|
|
546
559
|
"kind": "js",
|
|
547
560
|
"name": "PaymentMethodAccordion",
|
|
548
561
|
"declaration": {
|
|
549
|
-
"name": "
|
|
562
|
+
"name": "Ie",
|
|
550
563
|
"module": "dist/primer-loader.js"
|
|
551
564
|
}
|
|
552
565
|
},
|
|
@@ -554,7 +567,7 @@
|
|
|
554
567
|
"kind": "js",
|
|
555
568
|
"name": "PaymentMethodAccordionConfirmButton",
|
|
556
569
|
"declaration": {
|
|
557
|
-
"name": "
|
|
570
|
+
"name": "lt",
|
|
558
571
|
"module": "dist/primer-loader.js"
|
|
559
572
|
}
|
|
560
573
|
},
|
|
@@ -562,7 +575,7 @@
|
|
|
562
575
|
"kind": "js",
|
|
563
576
|
"name": "PaymentMethodButton",
|
|
564
577
|
"declaration": {
|
|
565
|
-
"name": "
|
|
578
|
+
"name": "Ve",
|
|
566
579
|
"module": "dist/primer-loader.js"
|
|
567
580
|
}
|
|
568
581
|
},
|
|
@@ -570,7 +583,7 @@
|
|
|
570
583
|
"kind": "js",
|
|
571
584
|
"name": "PaymentMethodContainer",
|
|
572
585
|
"declaration": {
|
|
573
|
-
"name": "
|
|
586
|
+
"name": "Be",
|
|
574
587
|
"module": "dist/primer-loader.js"
|
|
575
588
|
}
|
|
576
589
|
},
|
|
@@ -578,7 +591,7 @@
|
|
|
578
591
|
"kind": "js",
|
|
579
592
|
"name": "PaymentMethodContentComponent",
|
|
580
593
|
"declaration": {
|
|
581
|
-
"name": "
|
|
594
|
+
"name": "Ye",
|
|
582
595
|
"module": "dist/primer-loader.js"
|
|
583
596
|
}
|
|
584
597
|
},
|
|
@@ -586,7 +599,7 @@
|
|
|
586
599
|
"kind": "js",
|
|
587
600
|
"name": "PortalDialog",
|
|
588
601
|
"declaration": {
|
|
589
|
-
"name": "
|
|
602
|
+
"name": "Q",
|
|
590
603
|
"module": "dist/primer-loader.js"
|
|
591
604
|
}
|
|
592
605
|
},
|
|
@@ -594,7 +607,7 @@
|
|
|
594
607
|
"kind": "js",
|
|
595
608
|
"name": "PrimerCheckoutComplete",
|
|
596
609
|
"declaration": {
|
|
597
|
-
"name": "
|
|
610
|
+
"name": "hr",
|
|
598
611
|
"module": "dist/primer-loader.js"
|
|
599
612
|
}
|
|
600
613
|
},
|
|
@@ -602,7 +615,7 @@
|
|
|
602
615
|
"kind": "js",
|
|
603
616
|
"name": "PrimerCheckoutComponent",
|
|
604
617
|
"declaration": {
|
|
605
|
-
"name": "
|
|
618
|
+
"name": "ge",
|
|
606
619
|
"module": "dist/primer-loader.js"
|
|
607
620
|
}
|
|
608
621
|
},
|
|
@@ -610,7 +623,7 @@
|
|
|
610
623
|
"kind": "js",
|
|
611
624
|
"name": "PrimerCheckoutFailure",
|
|
612
625
|
"declaration": {
|
|
613
|
-
"name": "
|
|
626
|
+
"name": "zt",
|
|
614
627
|
"module": "dist/primer-loader.js"
|
|
615
628
|
}
|
|
616
629
|
},
|
|
@@ -618,7 +631,7 @@
|
|
|
618
631
|
"kind": "js",
|
|
619
632
|
"name": "PrimerCheckoutState",
|
|
620
633
|
"declaration": {
|
|
621
|
-
"name": "
|
|
634
|
+
"name": "rt",
|
|
622
635
|
"module": "dist/primer-loader.js"
|
|
623
636
|
}
|
|
624
637
|
},
|
|
@@ -626,7 +639,7 @@
|
|
|
626
639
|
"kind": "js",
|
|
627
640
|
"name": "PrimerIcon",
|
|
628
641
|
"declaration": {
|
|
629
|
-
"name": "
|
|
642
|
+
"name": "Fe",
|
|
630
643
|
"module": "dist/primer-loader.js"
|
|
631
644
|
}
|
|
632
645
|
},
|
|
@@ -634,7 +647,7 @@
|
|
|
634
647
|
"kind": "js",
|
|
635
648
|
"name": "PrimerKlarna",
|
|
636
649
|
"declaration": {
|
|
637
|
-
"name": "
|
|
650
|
+
"name": "fe",
|
|
638
651
|
"module": "dist/primer-loader.js"
|
|
639
652
|
}
|
|
640
653
|
},
|
|
@@ -642,7 +655,7 @@
|
|
|
642
655
|
"kind": "js",
|
|
643
656
|
"name": "PrimerMain",
|
|
644
657
|
"declaration": {
|
|
645
|
-
"name": "
|
|
658
|
+
"name": "Lt",
|
|
646
659
|
"module": "dist/primer-loader.js"
|
|
647
660
|
}
|
|
648
661
|
},
|
|
@@ -650,7 +663,7 @@
|
|
|
650
663
|
"kind": "js",
|
|
651
664
|
"name": "PtPhoneNumberInput",
|
|
652
665
|
"declaration": {
|
|
653
|
-
"name": "
|
|
666
|
+
"name": "te",
|
|
654
667
|
"module": "dist/primer-loader.js"
|
|
655
668
|
}
|
|
656
669
|
},
|
|
@@ -658,7 +671,7 @@
|
|
|
658
671
|
"kind": "js",
|
|
659
672
|
"name": "QRCode",
|
|
660
673
|
"declaration": {
|
|
661
|
-
"name": "
|
|
674
|
+
"name": "be",
|
|
662
675
|
"module": "dist/primer-loader.js"
|
|
663
676
|
}
|
|
664
677
|
},
|
|
@@ -666,7 +679,7 @@
|
|
|
666
679
|
"kind": "js",
|
|
667
680
|
"name": "RedirectPayment",
|
|
668
681
|
"declaration": {
|
|
669
|
-
"name": "
|
|
682
|
+
"name": "$e",
|
|
670
683
|
"module": "dist/primer-loader.js"
|
|
671
684
|
}
|
|
672
685
|
},
|
|
@@ -674,7 +687,7 @@
|
|
|
674
687
|
"kind": "js",
|
|
675
688
|
"name": "Select",
|
|
676
689
|
"declaration": {
|
|
677
|
-
"name": "
|
|
690
|
+
"name": "ye",
|
|
678
691
|
"module": "dist/primer-loader.js"
|
|
679
692
|
}
|
|
680
693
|
},
|
|
@@ -682,7 +695,7 @@
|
|
|
682
695
|
"kind": "js",
|
|
683
696
|
"name": "ShowOtherPayments",
|
|
684
697
|
"declaration": {
|
|
685
|
-
"name": "
|
|
698
|
+
"name": "_e",
|
|
686
699
|
"module": "dist/primer-loader.js"
|
|
687
700
|
}
|
|
688
701
|
},
|
|
@@ -690,7 +703,7 @@
|
|
|
690
703
|
"kind": "js",
|
|
691
704
|
"name": "Spinner",
|
|
692
705
|
"declaration": {
|
|
693
|
-
"name": "
|
|
706
|
+
"name": "Ge",
|
|
694
707
|
"module": "dist/primer-loader.js"
|
|
695
708
|
}
|
|
696
709
|
},
|
|
@@ -698,7 +711,7 @@
|
|
|
698
711
|
"kind": "js",
|
|
699
712
|
"name": "VaultCvvInput",
|
|
700
713
|
"declaration": {
|
|
701
|
-
"name": "
|
|
714
|
+
"name": "re",
|
|
702
715
|
"module": "dist/primer-loader.js"
|
|
703
716
|
}
|
|
704
717
|
},
|
|
@@ -706,7 +719,7 @@
|
|
|
706
719
|
"kind": "js",
|
|
707
720
|
"name": "VaultDeleteConfirmation",
|
|
708
721
|
"declaration": {
|
|
709
|
-
"name": "
|
|
722
|
+
"name": "ke",
|
|
710
723
|
"module": "dist/primer-loader.js"
|
|
711
724
|
}
|
|
712
725
|
},
|
|
@@ -714,7 +727,7 @@
|
|
|
714
727
|
"kind": "js",
|
|
715
728
|
"name": "VaultEmptyState",
|
|
716
729
|
"declaration": {
|
|
717
|
-
"name": "
|
|
730
|
+
"name": "at",
|
|
718
731
|
"module": "dist/primer-loader.js"
|
|
719
732
|
}
|
|
720
733
|
},
|
|
@@ -722,7 +735,7 @@
|
|
|
722
735
|
"kind": "js",
|
|
723
736
|
"name": "VaultErrorMessage",
|
|
724
737
|
"declaration": {
|
|
725
|
-
"name": "
|
|
738
|
+
"name": "ze",
|
|
726
739
|
"module": "dist/primer-loader.js"
|
|
727
740
|
}
|
|
728
741
|
},
|
|
@@ -730,7 +743,7 @@
|
|
|
730
743
|
"kind": "js",
|
|
731
744
|
"name": "VaultManager",
|
|
732
745
|
"declaration": {
|
|
733
|
-
"name": "
|
|
746
|
+
"name": "ie",
|
|
734
747
|
"module": "dist/primer-loader.js"
|
|
735
748
|
}
|
|
736
749
|
},
|
|
@@ -738,7 +751,7 @@
|
|
|
738
751
|
"kind": "js",
|
|
739
752
|
"name": "VaultManagerHeader",
|
|
740
753
|
"declaration": {
|
|
741
|
-
"name": "
|
|
754
|
+
"name": "De",
|
|
742
755
|
"module": "dist/primer-loader.js"
|
|
743
756
|
}
|
|
744
757
|
},
|
|
@@ -746,7 +759,7 @@
|
|
|
746
759
|
"kind": "js",
|
|
747
760
|
"name": "VaultPaymentMethodItem",
|
|
748
761
|
"declaration": {
|
|
749
|
-
"name": "
|
|
762
|
+
"name": "Pe",
|
|
750
763
|
"module": "dist/primer-loader.js"
|
|
751
764
|
}
|
|
752
765
|
},
|
|
@@ -754,7 +767,7 @@
|
|
|
754
767
|
"kind": "js",
|
|
755
768
|
"name": "VaultPaymentSubmit",
|
|
756
769
|
"declaration": {
|
|
757
|
-
"name": "
|
|
770
|
+
"name": "Se",
|
|
758
771
|
"module": "dist/primer-loader.js"
|
|
759
772
|
}
|
|
760
773
|
},
|
|
@@ -762,7 +775,7 @@
|
|
|
762
775
|
"kind": "js",
|
|
763
776
|
"name": "injectDarkTheme",
|
|
764
777
|
"declaration": {
|
|
765
|
-
"name": "
|
|
778
|
+
"name": "vg",
|
|
766
779
|
"module": "dist/primer-loader.js"
|
|
767
780
|
}
|
|
768
781
|
},
|
|
@@ -770,7 +783,7 @@
|
|
|
770
783
|
"kind": "js",
|
|
771
784
|
"name": "injectLightTheme",
|
|
772
785
|
"declaration": {
|
|
773
|
-
"name": "
|
|
786
|
+
"name": "fg",
|
|
774
787
|
"module": "dist/primer-loader.js"
|
|
775
788
|
}
|
|
776
789
|
},
|
|
@@ -778,7 +791,7 @@
|
|
|
778
791
|
"kind": "js",
|
|
779
792
|
"name": "injectLoaderStyles",
|
|
780
793
|
"declaration": {
|
|
781
|
-
"name": "
|
|
794
|
+
"name": "Ql",
|
|
782
795
|
"module": "dist/primer-loader.js"
|
|
783
796
|
}
|
|
784
797
|
},
|
|
@@ -786,7 +799,7 @@
|
|
|
786
799
|
"kind": "js",
|
|
787
800
|
"name": "injectThemeStyles",
|
|
788
801
|
"declaration": {
|
|
789
|
-
"name": "
|
|
802
|
+
"name": "Xl",
|
|
790
803
|
"module": "dist/primer-loader.js"
|
|
791
804
|
}
|
|
792
805
|
},
|
|
@@ -794,7 +807,7 @@
|
|
|
794
807
|
"kind": "js",
|
|
795
808
|
"name": "loadPrimer",
|
|
796
809
|
"declaration": {
|
|
797
|
-
"name": "
|
|
810
|
+
"name": "MB",
|
|
798
811
|
"module": "dist/primer-loader.js"
|
|
799
812
|
}
|
|
800
813
|
}
|
|
@@ -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."
|
|
@@ -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": [
|
|
@@ -13407,7 +13457,7 @@
|
|
|
13407
13457
|
"kind": "field",
|
|
13408
13458
|
"name": "_hostedInput",
|
|
13409
13459
|
"type": {
|
|
13410
|
-
"text": "
|
|
13460
|
+
"text": "HostedInput | null"
|
|
13411
13461
|
},
|
|
13412
13462
|
"privacy": "private",
|
|
13413
13463
|
"default": "null"
|
|
@@ -13566,7 +13616,7 @@
|
|
|
13566
13616
|
{
|
|
13567
13617
|
"name": "hostedInput",
|
|
13568
13618
|
"type": {
|
|
13569
|
-
"text": "
|
|
13619
|
+
"text": "HostedInput"
|
|
13570
13620
|
}
|
|
13571
13621
|
},
|
|
13572
13622
|
{
|
|
@@ -14161,7 +14211,7 @@
|
|
|
14161
14211
|
{
|
|
14162
14212
|
"name": "paymentMethod",
|
|
14163
14213
|
"type": {
|
|
14164
|
-
"text": "
|
|
14214
|
+
"text": "VaultedPaymentMethod"
|
|
14165
14215
|
}
|
|
14166
14216
|
}
|
|
14167
14217
|
],
|