@primer-io/primer-js 0.3.10 → 0.3.12
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 +13 -0
- package/dist/custom-elements.json +1115 -508
- package/dist/jsx/index.d.ts +77 -30
- package/dist/primer-loader.d.ts +84 -40
- package/dist/primer-loader.js +21 -33
- package/dist/vscode.html-custom-data.json +54 -26
- package/dist/web-types.json +120 -63
- package/package.json +3 -2
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"kind": "variable",
|
|
47
|
-
"name": "
|
|
47
|
+
"name": "Br",
|
|
48
48
|
"default": "class{constructor(t){this._methods=t}get(t){return this._methods.get(t)}toArray(){return Array.from(this._methods.values())}size(){return this._methods.size}}"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -82,233 +82,243 @@
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"kind": "variable",
|
|
85
|
-
"name": "
|
|
86
|
-
"default": "class extends
|
|
85
|
+
"name": "oe",
|
|
86
|
+
"default": "class extends v{constructor(){super(...arguments);this.size=\"large\";this.showCloseButton=!1;this.open=!1}openDialog(){this.open=!0}closeDialog(){let e=document.querySelector(\"primer-dialog\");if(e){e.startExitAnimation();let r=()=>{this.open=!1,this.removeEventListener(\"primer-dialog-close\",r)};this.addEventListener(\"primer-dialog-close\",r)}else this.open=!1}renderContent(){return u`<div class=\"content-container\"><slot></slot>${this.renderSecureHtmlContent()}</div>`}renderSecureHtmlContent(){return this.secureHtmlContent?ho(this.secureHtmlContent)?u`${ln(this.secureHtmlContent.content)}`:(x.warn(\"PortalDialogComponent: Invalid access token provided for htmlContent. Content will not be rendered.\"),f):f}renderDialog(){return this.open?u`<primer-portal><primer-dialog .open=${this.open} size=${this.size} .showCloseButton=${!1} @primer-dialog-close=\"${()=>this.closeDialog()}\" >${this.renderContent()}</primer-dialog></primer-portal>`:f}connectedCallback(){super.connectedCallback(),this.open||this.openDialog()}updated(e){if(super.updated(e),e.has(\"secureHtmlContent\")){let r=this.secureHtmlContent;r&&!ho(r)&&(x.errorWithDatadog(\"PortalDialogComponent: Invalid access token provided for htmlContent. Content will not be rendered.\"),this.secureHtmlContent=void 0)}e.has(\"open\")&&this.open&&this.onOpen&&this.onOpen(),e.has(\"open\")&&this.open&&this.onContentRendered&&this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.onContentRendered?.()})})}render(){return u`${this.renderDialog()}`}}"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"kind": "variable",
|
|
90
90
|
"name": "ue",
|
|
91
|
-
"default": "class extends
|
|
91
|
+
"default": "class extends v{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.locale=\"en-GB\";this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0,this.requestUpdate()};this.sdkContextController=new Er(this),this.sdkStateController=new br(this),this.primerEventsController=new Mt(this),this.styleProcessingController=new xr(this),this.vaultManagerController=new jt(this),this.cardNetworkController=new hr(this),this.achPaymentEventsController=new ni(this),new ai(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}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})}attributeChangedCallback(e,r,o){e===Id.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(o):super.attributeChangedCallback(e,r,o)}disconnectedCallback(){this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null),this.sdkStateController?.currentState.isLoading&&this.sdkStateController.forceCompleteLoading(),this._eventListenerController&&(this._eventListenerController.abort(),this._eventListenerController=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(Oi(this.options?.locale)?this.locale=Ri(this.options?.locale):x.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to default locale `en-GB`\")),Li(this.locale||\"en-GB\"))}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)}checkLoadingStateChange(){let e=this.sdkStateController?.currentState.isLoading||!1;this.previousLoadingState&&!e&&(this.jsInitialized=!0,W({eventName:\"CHECKOUT_FLOW_STARTED\"})),this.previousLoadingState=e,e&&!this._loadingTimeoutId?this._loadingTimeoutId=window.setTimeout(()=>{this.sdkStateController?.currentState.isLoading&&(x.warn(\"Loading timeout in component, forcing completion\"),this.sdkStateController.forceCompleteLoading(),this.jsInitialized=!0),this._loadingTimeoutId=null},1e4):!e&&this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null)}render(){let e=this.sdkStateController.currentState,r=e.isLoading,o=e.error,a=!r&&!o;return u` ${V(r,()=>f)} ${V(o,()=>u`<primer-checkout-error></primer-checkout-error>`)} ${V(a,()=>u`<slot name=\"main\" @slotchange=${this.onSlotChange}></slot>${V(this.hasAssignedContent,()=>f,()=>u`<primer-main></primer-main>`)} `,()=>f)} `}addEventListener(e,r,o){super.addEventListener(e,r,o)}removeEventListener(e,r,o){super.removeEventListener(e,r,o)}}"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"kind": "function",
|
|
95
|
-
"name": "
|
|
95
|
+
"name": "yn"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"kind": "function",
|
|
99
|
-
"name": "
|
|
99
|
+
"name": "gn"
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"kind": "function",
|
|
103
|
-
"name": "
|
|
103
|
+
"name": "Dd"
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"kind": "function",
|
|
107
|
-
"name": "
|
|
107
|
+
"name": "$d"
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
"kind": "variable",
|
|
111
111
|
"name": "ke",
|
|
112
|
-
"default": "class extends
|
|
112
|
+
"default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in go)return go[this.size];let e=parseInt(this.size,10);return isNaN(e)?go.medium:e}render(){let e=this.getSize(),r=20,o=`0 0 ${r} ${r}`;return this.style.setProperty(\"--spinner-color\",this.color),this.style.setProperty(\"--spinner-size\",`${e}px`),u`<div class=\"spinner-container ${this.compact?\"compact\":\"\"}\"><svg class=\"spinner\" width=\"${e}\" height=\"${e}\" viewBox=\"${o}\" 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>`}}"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"kind": "variable",
|
|
116
|
-
"name": "
|
|
117
|
-
"default": "class extends
|
|
116
|
+
"name": "Ie",
|
|
117
|
+
"default": "class extends v{constructor(){super(...arguments);this.focusWithin=!1;this.hasError=!1;this.handleWrapperClick=e=>{if(e.target!==e.currentTarget)return;let r=this.findSlottedPrimerInput();r?r.focus():this.dispatchEvent(new CustomEvent(\"wrapper-click\",{bubbles:!0,composed:!0}))}}findSlottedPrimerInput(){if(!this.inputSlot)return null;let e=this.inputSlot.assignedElements({flatten:!0}),r=e.find(o=>o.tagName.toLowerCase()===\"primer-input\");if(r)return r;for(let o of e){let a=o.querySelector(\"primer-input\");if(a)return a}return null}render(){let e={\"input-slot\":!0,\"focus-within\":this.focusWithin};return u`<div class=\"input-wrapper\"><slot name=\"label\"></slot><div class=\"${X(e)}\" @click=\"${this.handleWrapperClick}\"><slot name=\"input\"></slot></div><slot name=\"error\"></slot></div>`}}"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"kind": "variable",
|
|
121
|
-
"name": "
|
|
122
|
-
"default": "class extends
|
|
121
|
+
"name": "Fe",
|
|
122
|
+
"default": "class extends v{constructor(){super(...arguments);this.for=\"\";this.disabled=!1}render(){return u`<label for=${this.for}><slot></slot></label>`}}"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"kind": "variable",
|
|
126
126
|
"name": "de",
|
|
127
|
-
"default": "class extends
|
|
127
|
+
"default": "class extends v{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?f:u`<primer-icon name=\"checkmark\" size=\"sm\" color=\"var(--primer-color-brand)\" ></primer-icon>`}renderSpinner(){if(!this.loading)return f;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)\"),u`<primer-spinner size=\"small\" color=\"${e}\" compact ></primer-spinner>`}render(){return u`<button type=${this.buttonType} ?disabled=${this.disabled||this.loading} @click=${this.handleClick} part=\"button\" aria-checked=${this.selectionState===\"checked\"} aria-busy=${this.loading} >${this.renderSpinner()} ${this.flex?u`<span class=\"button-content ${this.loading?\"loading\":\"\"}\"><slot></slot></span>`:u`<span class=\"button-content-base ${this.loading?\"loading\":\"\"}\" ><slot></slot></span>`} ${this.renderCheckmark()}</button>`}}"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"kind": "variable",
|
|
131
|
-
"name": "
|
|
132
|
-
"default": "class extends
|
|
131
|
+
"name": "ze",
|
|
132
|
+
"default": "class extends v{constructor(){super(...arguments);this.for=\"\";this.active=!0}render(){return u`<span class=\"error\" role=\"alert\" aria-live=\"polite\" id=\"${this.for||\"\"}\" ><slot></slot></span>`}}"
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"kind": "variable",
|
|
136
|
-
"name": "
|
|
137
|
-
"default": "class extends
|
|
136
|
+
"name": "Ne",
|
|
137
|
+
"default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?An[this.name]:null;return u`<div style=\"--internal-icon-color: ${this.color}\">${e||u`<slot></slot>`}</div>`}}"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"kind": "variable",
|
|
141
|
-
"name": "
|
|
142
|
-
"default": "class extends
|
|
141
|
+
"name": "je",
|
|
142
|
+
"default": "class extends v{constructor(){super(...arguments);this.type=\"complete\"}render(){return this.type===\"complete\"?u`<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>`:u`<primer-icon size=\"lg\" name=\"failure-icon\" color=\"var(--primer-color-icon-negative)\" ></primer-icon><p>Payment failed</p>${this.description?u`<p class=\"secondary\">${this.description}</p>`:u`<p class=\"secondary\">Something went wrong.</p>`} `}}"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"kind": "variable",
|
|
146
|
-
"name": "
|
|
147
|
-
"default": "class extends
|
|
146
|
+
"name": "Y",
|
|
147
|
+
"default": "class extends v{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 r=e.target;this.value=r.value;let o=new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0});this.dispatchEvent(o)};this.handleChange=e=>{e.stopPropagation();let r=e.target;this.value=r.value;let o=new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0});this.dispatchEvent(o)};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,r,o){this.inputElement?.setSelectionRange(e,r,o)}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},r=Object.entries(e).filter(([,o])=>o).map(([o])=>o).join(\" \");return u`<input part=\"input\" class=${r} .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,r,o){super.addEventListener(e,r,o)}removeEventListener(e,r,o){super.removeEventListener(e,r,o)}}"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"kind": "variable",
|
|
151
151
|
"name": "ce",
|
|
152
|
-
"default": "class extends
|
|
152
|
+
"default": "class extends v{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,r=this.ariaLabel||this.header||e,o=this.header||e;return u`<div class=\"collapsable\"><primer-button variant=${this.buttonVariant} buttonType=\"button\" @click=${this.toggleExpanded} aria-expanded=${this.isExpanded} aria-controls=\"collapsable-content\" aria-label=${r} ><span>${o}</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>`}}"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"kind": "variable",
|
|
156
|
-
"name": "
|
|
157
|
-
"default": "class extends
|
|
156
|
+
"name": "Le",
|
|
157
|
+
"default": "class extends v{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 f;let e={\"error-message\":!0,hidden:!this.visible};return u`<div part=\"error-message\" class=${X(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>`}}"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"kind": "variable",
|
|
161
|
+
"name": "dt",
|
|
162
|
+
"default": "class extends v{constructor(){super(...arguments);this._id=`d${Math.random().toString(36).substring(7)}`;this._handleSlotChange=e=>{let o=e.target.assignedNodes();if(!o.length)return;let a=this.getContainer();o.forEach(n=>a.appendChild(n))}}get id(){return this._id}getContainer(){let e=document.querySelector(`#${this._id}`);return e||(e=document.createElement(\"div\"),e.id=this._id,document.body.appendChild(e),this._setupEventListeners(e)),e}_setupEventListeners(e){[\"primer-ach-error\",\"primer-ach-bank-details-collected\",\"primer-ach-mandate-confirmed\",\"primer-ach-mandate-declined\",\"primer-dialog-close\"].forEach(r=>{e.addEventListener(r,o=>{o.stopPropagation(),this.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0,detail:o.detail}))})})}disconnectedCallback(){super.disconnectedCallback(),this.getContainer().remove()}render(){return u`<slot @slotchange=${this._handleSlotChange}></slot>`}}"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"kind": "variable",
|
|
166
|
+
"name": "Ae",
|
|
167
|
+
"default": "class extends v{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\"},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?u`<div class=${X({backdrop:!0,\"backdrop--entering\":this._animationState===\"entering\",\"backdrop--entered\":this._animationState===\"entered\",\"backdrop--exiting\":this._animationState===\"exiting\"})} @click=${e=>{e.preventDefault()}} ><div class=${X({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?u`<primer-button variant=\"tertiary\" @click=${this._handleCloseClick} ><primer-icon name=\"close\"></primer-icon></primer-button>`:\"\"}</div><div class=\"content\"><slot></slot></div></div></div>`:u``}}"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"kind": "variable",
|
|
171
|
+
"name": "Q",
|
|
172
|
+
"default": "class extends v{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.klarnaCategories=null;this.disabled=!1;this.selectedCategory=null;this.isExpanded=!1;this.headerAriaLabel=_(\"pay_with\",{id:\"pay_with\"});this._paymentMethodManagerTask=new D(this,{task:async([e,r])=>{if(!e||!r)return N;let o=await r.getCDNAssets(\"KLARNA\");return{manager:e.manager,klarnaIcon:o?.assets?.icon?`${o.goatCdnUrl}/${o.assets.icon}`:\"\"}},args:()=>[this.paymentManagers.get(\"KLARNA\"),this.headlessUtils]});this.toggleExpand=()=>{this.disabled||(this.isExpanded=!this.isExpanded,this.isExpanded||(this.selectedCategory=null))}}async startKlarnaPayment(){if(!(!this._paymentMethodManagerTask.value||!this.selectedCategory))try{await this._paymentMethodManagerTask.value.manager.start({paymentMethodCategoryId:this.selectedCategory})}catch(e){x.errorWithDatadog(\"Failed to start Klarna payment\",{error:e})}}async renderSelectedCategory(){if(!(!this._paymentMethodManagerTask.value||!this.selectedCategory||!this.klarnaContainer))try{this.klarnaContainer.innerHTML=\"\",await this._paymentMethodManagerTask.value.manager.renderCategory({containerId:this.klarnaContainer,paymentMethodCategoryId:this.selectedCategory,onHeightChange:e=>{e>0&&(this.klarnaContainer.style.height=`${e}px`)}})}catch(e){x.errorWithDatadog(\"Failed to render Klarna category\",{error:e})}}selectCategory(e){this.disabled||(this.selectedCategory=e,this.renderSelectedCategory())}updated(e){e.has(\"selectedCategory\")&&this.selectedCategory&&this.renderSelectedCategory()}renderCategorySelection(){let e=this.klarnaCategories?.categories||[];return this.klarnaCategories?.isLoading||!1?u`<div class=\"loading\"><primer-spinner size=\"small\"></primer-spinner></div>`:u`<div class=\"category-selection\">${e.map(o=>u`<button class=${X({\"category-button\":!0,selected:o.id===this.selectedCategory})} @click=${()=>{this.selectCategory(o.id)}} ?disabled=${this.disabled} >${o.name}</button>`)}</div>`}renderExpandedContent(){return u` ${this.renderCategorySelection()} ${this.selectedCategory?u`<div id=\"klarna-category-container\" class=\"klarna-category-container\" ></div>`:f}<button class=${X({\"klarna-pay-button\":!0,loading:!!this.sdkState?.isProcessing,disabled:!this.selectedCategory||this.disabled})} ?disabled=${!this.selectedCategory||this.sdkState?.isProcessing||this.disabled} @click=${()=>this.startKlarnaPayment()} >${_(\"confirm\",{id:\"confirm\"})}</button>`}render(){return this._paymentMethodManagerTask.render({error:e=>{let r=e instanceof Error?e.message:\"Unknown error in Klarna\";return u`<div class=\"error\"> Error loading Klarna: ${r}</div>`},complete:({manager:e,klarnaIcon:r})=>e?u`<div class=\"klarna-container ${this.isExpanded?\"expanded\":\"\"}\"><div class=\"klarna-button-header\"><primer-button buttonType=\"button\" variant=\"secondary\" class=\"klarna-button\" @click=${this.toggleExpand} aria-expanded=${this.isExpanded} aria-controls=\"collapsable-content\" aria-label=${this.headerAriaLabel} ?disabled=${this.disabled} ><img src=${r} alt=\"Klarna logo\" /><span>${_(\"pay_with\",{id:\"pay_with\"})} Klarna</span><span class=\"klarna-accordion-icon ${this.isExpanded?\"expanded\":\"\"}\" > ▼ </span></primer-button></div><div class=\"klarna-expanded-content ${this.isExpanded?\"visible\":\"\"}\" ><div class=\"klarna-accordion-content\">${this.renderExpandedContent()}</div></div></div>`:f})}}"
|
|
158
173
|
},
|
|
159
174
|
{
|
|
160
175
|
"kind": "variable",
|
|
161
|
-
"name": "
|
|
162
|
-
"default": "class extends
|
|
176
|
+
"name": "Oe",
|
|
177
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return N;let r=this.paymentManagers.get(e)?.manager;if(!r)throw new Error(`No manager found for payment method type ${e}`);return r}}),this.renderButtonTask=new D(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return N;await this.updateComplete;let r=e.createButton();return await r.render(this.shadowRoot?.getRootNode(),{style:{shadowRoot:!0}}),this.disabled&&await r.setDisabled(this.disabled),this.disabled&&this.shadowRoot&&(await this.updateComplete,si(this.disabled,this.shadowRoot)),r}})}attributeChangedCallback(e,r,o){if(super.attributeChangedCallback(e,r,o),e===\"disabled\"&&r!==o){let a=o!==null,n=this.renderButtonTask.value;n&&n.setDisabled(a)}}updated(e){e.has(\"disabled\")&&this.shadowRoot&&si(this.disabled,this.shadowRoot)}render(){return f}}"
|
|
163
178
|
},
|
|
164
179
|
{
|
|
165
180
|
"kind": "variable",
|
|
166
|
-
"name": "
|
|
167
|
-
"default": "class extends
|
|
181
|
+
"name": "Re",
|
|
182
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Pt();this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return N;let r=this.paymentManagers.get(e)?.manager;if(!r)throw new Error(`No manager found for payment method type ${e}`);return r}}),this.renderButtonTask=new D(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return N;await this.updateComplete;let r=this.buttonContainerRef.value;if(!r)throw new Error(\"Button container not found\");let o=e.createButton(),a=di(r);return await o.render(r,{style:{buttonHeight:a}}),this.disabled&&await o.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,Vt(this.disabled,this.buttonContainerRef)),o}})}attributeChangedCallback(e,r,o){if(super.attributeChangedCallback(e,r,o),e===\"disabled\"&&r!==o){let a=o!==null,n=this.renderButtonTask.value;n&&n.setDisabled(a)}}updated(e){e.has(\"disabled\")&&Vt(this.disabled,this.buttonContainerRef)}render(){return u`<div class=\"native-button-container\" ${pt(this.buttonContainerRef)} ></div>`}}"
|
|
168
183
|
},
|
|
169
184
|
{
|
|
170
185
|
"kind": "variable",
|
|
171
|
-
"name": "
|
|
172
|
-
"default": "class extends
|
|
186
|
+
"name": "De",
|
|
187
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Pt();this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return N;let r=this.paymentManagers.get(e)?.manager;if(!r)throw new Error(`No manager found for payment method type ${e}`);return r}}),this.renderButtonTask=new D(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return N;await this.updateComplete;let r=this.buttonContainerRef.value;if(!r)throw new Error(\"Button container not found\");let o=e.createButton(),a=di(r),n=Vn(a),l=55;return a>l&&x.warn(`PayPal button height (${a}px) exceeds maximum allowed height of ${l}px. Button will be capped at ${l}px. This is a PayPal SDK limitation.`),await o.render(r,{style:{buttonHeight:n}}),this.disabled&&await o.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,Vt(this.disabled,this.buttonContainerRef)),o}})}attributeChangedCallback(e,r,o){if(super.attributeChangedCallback(e,r,o),e===\"disabled\"&&r!==o){let a=o!==null,n=this.renderButtonTask.value;n&&n.setDisabled(a)}}updated(e){e.has(\"disabled\")&&Vt(this.disabled,this.buttonContainerRef)}render(){return u`<div class=\"native-button-container\" ${pt(this.buttonContainerRef)} ></div>`}}"
|
|
173
188
|
},
|
|
174
189
|
{
|
|
175
190
|
"kind": "variable",
|
|
176
191
|
"name": "Se",
|
|
177
|
-
"default": "class extends
|
|
192
|
+
"default": "class extends v{constructor(){super(...arguments);this.type=void 0;this.disabled=!1;this.paymentMethods=null;this.analyticsUtils=null;this.handleClick=()=>{this.paymentMethods?.get(this.type)?.managerType!==\"CARD\"&&this.sendPaymentMethodSelectionEvent()}}sendPaymentMethodSelectionEvent(){this.type&&W({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:this.type})}render(){if(!this.type)return f;let e=this.paymentMethods?.get(this.type);if(!e)return f;let r;switch(e?.managerType){case\"CARD\":r=u`<primer-card-form ?disabled=${this.disabled} ></primer-card-form>`;break;case\"NATIVE\":e.type===\"GOOGLE_PAY\"?r=u`<primer-google-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-google-pay>`:e.type===\"APPLE_PAY\"?r=u`<primer-apple-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-apple-pay>`:e.type===\"PAYPAL\"&&(r=u`<primer-paypal .paymentMethod=${e} ?disabled=${this.disabled} ></primer-paypal>`);break;case\"REDIRECT\":r=u`<primer-redirect-payment .paymentMethod=${e} ?disabled=${this.disabled} ></primer-redirect-payment>`;break;case\"KLARNA\":r=u`<primer-klarna ?disabled=${this.disabled} ></primer-klarna>`;break;case\"ACH\":r=u`<primer-dynamic-payment .paymentMethod=${e} ></primer-dynamic-payment>`;break;default:return f}return u`<div @click=${this.handleClick}>${r}</div>`}}"
|
|
178
193
|
},
|
|
179
194
|
{
|
|
180
195
|
"kind": "variable",
|
|
181
196
|
"name": "ve",
|
|
182
|
-
"default": "class extends
|
|
197
|
+
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentMethods=null;this.clientOptions=null}getFilteredMethods(){if(!this.paymentMethods)return[];let e=this.paymentMethods.toArray();if(this.include){let r=this.include.split(\",\").map(o=>o.trim());e=e.filter(o=>r.includes(o.type))}if(this.exclude){let r=this.exclude.split(\",\").map(o=>o.trim());e=e.filter(o=>!r.includes(o.type))}return e}render(){let e=this.getFilteredMethods();return e.length===0?f:u`<div class=\"payment-methods-container\">${e.map(r=>u`<primer-payment-method type=\"${r.type}\" ?disabled=\"${this.disabled||this.clientOptions?.disabledPayments===!0}\" ></primer-payment-method>`)}</div>`}}"
|
|
183
198
|
},
|
|
184
199
|
{
|
|
185
200
|
"kind": "variable",
|
|
186
201
|
"name": "he",
|
|
187
|
-
"default": "class extends
|
|
202
|
+
"default": "class extends v{constructor(){super(...arguments);this.formController=new ci(this,e=>this._paymentMethodManagerTask.value.setAndValidate(e));this.paymentManagers=new Map;this.sdkState=void 0;this.clientOptions=void 0;this.screen=\"form\";this.isSubmitting=!1;this._paymentMethodManagerTask=new D(this,{task:([e])=>e!==\"STRIPE_ACH\"?N:this.paymentManagers.get(e)?.manager,args:()=>[this.paymentMethod?.type]})}_handleInput(e,r){let o=e.target;this.formController.setFieldValue(r,o.value)}_handleBlur(e){this.formController.setFieldTouched(e)}_handleError(e){this.dispatchEvent(new CustomEvent(\"primer-ach-error\",{bubbles:!0,composed:!0,detail:{error:e instanceof Error?e:new Error(typeof e==\"string\"?e:\"Unknown error occurred\")}}))}async _handleSubmitButtonClick(e){if(!this.isSubmitting){this.isSubmitting=!0;try{let r=await e.start(this.formController.formData);if(!r||r.valid)return await this._handleCollectBankAccountDetails(e);r&&this.formController.setValidation(r,!0)}catch(r){this._handleError(r)}finally{this.isSubmitting=!1}}}async _handleCollectBankAccountDetails(e){try{await e.collectBankAccountDetails(),this.screen=\"mandate\",this.dispatchEvent(new CustomEvent(\"primer-ach-bank-details-collected\",{bubbles:!0,composed:!0}))}catch(r){this._handleError(r)}}async _handleConfirmMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.confirmMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-confirmed\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}async _handleDeclineMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.declineMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-declined\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}renderForm(e){return u`<h2>${_(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${_(\"stripe_ach_user_details_collection_subtitle_label\",{id:\"stripe_ach_user_details_collection_subtitle_label\"})}</p><form @submit=${r=>r.preventDefault()}><div class=\"form-row\"><primer-input-wrapper .hasError=${this.formController.hasError.firstName} ><primer-input-label slot=\"label\">${_(\"stripe_ach_user_details_collection_first_name_label\",{id:\"stripe_ach_user_details_collection_first_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.firstName.value} @input=${r=>this._handleInput(r,\"firstName\")} @blur=${()=>this._handleBlur(\"firstName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.firstName?this.formController.formState.firstName.error:f}</primer-input-error></primer-input-wrapper><primer-input-wrapper .hasError=${this.formController.hasError.lastName} ><primer-input-label slot=\"label\">${_(\"stripe_ach_user_details_collection_last_name_label\",{id:\"stripe_ach_user_details_collection_last_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.lastName.value} @input=${r=>this._handleInput(r,\"lastName\")} @blur=${()=>this._handleBlur(\"lastName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.lastName?this.formController.formState.lastName.error:f}</primer-input-error></primer-input-wrapper></div><primer-input-wrapper .hasError=${this.formController.hasError.emailAddress} ><primer-input-label slot=\"label\">${_(\"stripe_ach_user_details_collection_email_address_label\",{id:\"stripe_ach_user_details_collection_email_address_label\"})}</primer-input-label><primer-input slot=\"input\" type=\"email\" .value=${this.formController.formState.emailAddress.value} @input=${r=>this._handleInput(r,\"emailAddress\")} @blur=${()=>this._handleBlur(\"emailAddress\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.emailAddress?this.formController.formState.emailAddress.error:f}</primer-input-error></primer-input-wrapper><p>${_(\"stripe_ach_user_details_collection_data_usage_label\",{id:\"stripe_ach_user_details_collection_data_usage_label\"})}</p><primer-button buttonType=\"submit\" variant=\"primary\" @click=${()=>this._handleSubmitButtonClick(e)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${_(\"stripe_ach_user_details_collection_continue_button\",{id:\"stripe_ach_user_details_collection_continue_button\"})}</primer-button></form>`}renderMandate(){return u`<h2>${_(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${this.clientOptions?.stripe?.mandateData.fullMandateText??_(\"stripe_ach_mandate_template_web\",{id:\"stripe_ach_mandate_template_web\"}).replace(/\\{merchantName\\}/g,this.clientOptions?.stripe?.mandateData.merchantName??\"Merchant\")}</p><div class=\"button-group\"><primer-button variant=\"primary\" @click=${this._handleConfirmMandate.bind(this)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${_(\"stripe_ach_mandate_accept_button\",{id:\"stripe_ach_mandate_accept_button\"})}</primer-button><primer-button variant=\"tertiary\" @click=${this._handleDeclineMandate.bind(this)} ?disabled=${this.isSubmitting} >${_(\"stripe_ach_mandate_cancel_payment_button\",{id:\"stripe_ach_mandate_cancel_payment_button\"})}</primer-button></div>`}render(){return this._paymentMethodManagerTask.render({complete:e=>e?this.screen===\"form\"?this.renderForm(e):this.renderMandate():f})}}"
|
|
188
203
|
},
|
|
189
204
|
{
|
|
190
205
|
"kind": "variable",
|
|
191
206
|
"name": "be",
|
|
192
|
-
"default": "class extends
|
|
207
|
+
"default": "class extends v{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.open=!1;this._paymentMethodManagerTask=new D(this,{task:([e,r])=>!e||!r?N:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new D(this,{task:([e,r])=>{if(!e||!r)return N;let o=r.getPaymentMethodConfiguration(e);return o?{backgroundColor:o.displayMetadata.button.backgroundColor.colored,name:o.name,displayName:this._legacyGetButtonLabel(o.displayMetadata.button.text),iconUrl:o.displayMetadata.button.iconUrl.colored||o.displayMetadata.button.iconUrl.light||o.displayMetadata.button.iconUrl.dark}:N},args:()=>[this.paymentMethod?.type,this.headlessUtils]});this._setupTasks=new D(this,{task:([e,r])=>!e||!r?N:{paymentMethodManager:e,assetsConfig:r},args:()=>[this._paymentMethodManagerTask.value,this._getAssetsTask.value]})}_legacyGetButtonLabel(e){if(!e)return;let r=e?ur(e):\"\";return r===\"payWith\"&&(r=\"pay_with\"),_(r,{id:r})}start(){this._paymentMethodManagerTask.value&&(this.open=!0)}renderDialog(){return this.open?u`<primer-portal><primer-dialog @primer-dialog-close=\"${()=>this.open=!1}\"><primer-ach-payment .paymentMethod=${this.paymentMethod} @primer-ach-error=${()=>this.open=!1} @primer-ach-mandate-confirmed=${()=>this.open=!1} @primer-ach-mandate-declined=${()=>this.open=!1} ></primer-ach-payment></primer-dialog></primer-portal>`:f}render(){return this._setupTasks.render({error:()=>f,complete:({assetsConfig:e})=>(this.style.setProperty(\"--dynamic-payment-button-bg-color\",e.backgroundColor),u`<primer-button @click=\"${()=>this.start()}\" class=${X({loading:!!this.sdkState?.isProcessing,reverse:!0})} title=\"${_(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" ><span class=\"image-container\"><img src=\"${e.iconUrl}\" alt=\"${e.name}\" /></span>${e.displayName}</primer-button>${this.renderDialog()} `)})}}"
|
|
193
208
|
},
|
|
194
209
|
{
|
|
195
210
|
"kind": "variable",
|
|
196
211
|
"name": "Ce",
|
|
197
|
-
"default": "class extends
|
|
212
|
+
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this._paymentMethodManagerTask=new D(this,{task:([e,r])=>!e||!r?N:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new D(this,{task:([e,r])=>{if(!e||!r)return N;let o=r.getPaymentMethodConfiguration(e);if(!o)return N;let a=o.displayMetadata.button.backgroundColor.colored??o.displayMetadata.button.backgroundColor.light,n=o.displayMetadata.button.iconPositionRelativeToText||\"START\";return{backgroundColor:a,name:o.name,displayName:this._legacyGetButtonLabel(o.displayMetadata.button.text),iconUrl:o.displayMetadata.button.iconUrl.colored??o.displayMetadata.button.iconUrl.light,iconPosition:n}},args:()=>[this.paymentMethod?.type,this.headlessUtils]});this._setupTasks=new D(this,{task:([e,r])=>!e||!r?N:{paymentMethodManager:e,assetsConfig:r},args:()=>[this._paymentMethodManagerTask.value,this._getAssetsTask.value]})}_legacyGetButtonLabel(e){if(!e)return;let r=e?ur(e):\"\";return r===\"payWith\"&&(r=\"pay_with\"),_(r,{id:r})}startRedirectPayment(){this.disabled||this._paymentMethodManagerTask.value&&this._paymentMethodManagerTask.value.start()}render(){return this._setupTasks.render({error:()=>f,complete:({assetsConfig:e})=>{this.style.setProperty(\"--redirect-payment-button-bg-color\",e.backgroundColor);let r={loading:!!this.sdkState?.isProcessing,\"icon-end\":e.iconPosition===\"END\",\"image-only\":!e.displayName},o=e.displayName?u`<span class=\"image-container\"><img src=\"${e.iconUrl}\" alt=\"${e.name}\" /></span><span class=\"button-text\">${e.displayName}</span>`:u`<span class=\"image-container\"><img src=\"${e.iconUrl}\" alt=\"${e.name}\" /></span>`;return u`<primer-button @click=\"${()=>this.startRedirectPayment()}\" class=${X(r)} title=\"${_(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" ?disabled=${this.disabled} >${o}</primer-button>`}})}}"
|
|
198
213
|
},
|
|
199
214
|
{
|
|
200
215
|
"kind": "variable",
|
|
201
|
-
"name": "
|
|
202
|
-
"default": "class extends
|
|
216
|
+
"name": "ee",
|
|
217
|
+
"default": "class extends v{constructor(){super();this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\";this.animationDuration=300;this.deleteAssetConfig=null;this.handleToggleEditMode=e=>{this.isEditMode=e.detail,this.deletePaymentMethodId=null,this.isEditMode&&this.vaultItemContext&&this.vaultItemContext.setSelectedVaultedPaymentMethod(null)};this.handleDeletePaymentMethod=async e=>{if(this.deletePaymentMethodId=e.detail,this.deletePaymentMethodId&&this.vaultManagerContext&&this.headlessUtils){let r=this.vaultManagerContext.vaultedPaymentMethods.find(o=>o.id===this.deletePaymentMethodId);r&&(this.deleteAssetConfig=await pi(r,this.headlessUtils,this.vaultManagerContext))}};this.handleCancelDelete=()=>{this.deletePaymentMethodId=null,this.deleteAssetConfig=null};this.handleConfirmDelete=async()=>{if(!this.vaultManagerContext?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=_(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.vaultManagerContext.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null,this.deleteAssetConfig=null}catch(e){this.errorMessage=e instanceof Error?e.message:_(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}};this.handlePaymentError=e=>{let r=e.detail?.error;this.errorMessage=r instanceof Error?r.message:_(\"payment_processing_error\",{id:\"payment_processing_error\"})};this.handleCloseError=()=>{this.errorMessage=\"\"};new Ut(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\"}}}getPaymentMethodName(e){if(!this.vaultManagerContext)return\"\";let r=this.vaultManagerContext.vaultedPaymentMethods.find(o=>o.id===e);if(!r)return\"\";try{return Co(r).description||\"\"}catch{return\"\"}}renderLoadingOverlay(){return u`<div class=\"loading-overlay\" ${mt({...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 f;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return u`<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} ${mt({...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?f:u`<primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ${mt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-method-item>`}renderPaymentMethodList(){let e=this.vaultManagerContext?.vaultedPaymentMethods||[],r=!this.isEditMode&&e.length>0&&!this.deletePaymentMethodId;return u`<div class=\"payment-methods-list\">${e.map(o=>this.renderPaymentMethodItem(o))} ${V(r,()=>u`<div class=\"submit-button-container\"><primer-vault-payment-submit class=\"submit-button\" @primer-vault-payment-error=${this.handlePaymentError} ${mt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-submit></div>`,()=>f)}</div>`}render(){if(!this.vaultManagerContext?.enabled)return f;let e=this.vaultManagerContext.vaultedPaymentMethods.length>0,r=this.vaultManagerContext.isLoading,o=this.vaultManagerContext.isUpdating;return u` ${V(!this.vaultManagerContext?.showEmptyState&&!e,()=>f,()=>u`<slot name=\"vault-empty-state\"><div class=\"vault-manager ${o?\"is-updating\":\"\"}\"><primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header>${V(this.errorMessage,()=>u`<primer-vault-error-message .errorMessage=${this.errorMessage} @close-error=${this.handleCloseError} ${mt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-error-message>`,()=>f)}<div class=\"vault-manager-content\">${V(!r&&!e,()=>u`<div class=\"content-container\"><primer-vault-empty-state ${mt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-empty-state></div>`,()=>f)} ${V(!r&&e,()=>u`<div class=\"content-container\">${V(this.deletePaymentMethodId,()=>this.renderDeleteConfirmation(),()=>this.renderPaymentMethodList())}</div>`,()=>f)}</div>${V(o,()=>this.renderLoadingOverlay(),()=>f)}</div></slot>`)} `}}"
|
|
203
218
|
},
|
|
204
219
|
{
|
|
205
220
|
"kind": "variable",
|
|
206
221
|
"name": "pe",
|
|
207
|
-
"default": "class extends
|
|
222
|
+
"default": "class extends v{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new D(this,{task:async([e,r,o])=>await pi(e,r,o),args:()=>[this.paymentMethod,this.headlessUtils,this.vaultManagerContext]});this.handleClick=()=>{this.isEditMode||!this.vaultManagerContext||!this.paymentMethod||(this.isSelected()?this.vaultItemContext?.setSelectedVaultedPaymentMethod(null):this.vaultItemContext?.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.vaultManagerContext||!this.paymentMethod)return!1;let e=this.vaultItemContext?.selectedVaultedPaymentMethod;return!!e&&e.id===this.paymentMethod.id}render(){return this._getAssetsTask.render({error:()=>f,complete:e=>{let r=this.isSelected()?\"checked\":\"default\",o=!1,a=e?.description;return u`<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=${r} .flex=${o} @click=${this.handleClick} ><primer-payment-method-content .assetConfig=${e} ></primer-payment-method-content>${V(e.shouldShowCVV&&this.isSelected()&&!this.isEditMode,()=>u`<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>`,()=>f)}</primer-button>${this.isEditMode?u`<primer-button variant=\"tertiary\" class=\"delete-button\" @click=${this.handleDeleteClick} aria-label=${`${_(\"delete\",{id:\"delete\"})} ${a}`} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></primer-button>`:f}</div></div>`}})}}"
|
|
208
223
|
},
|
|
209
224
|
{
|
|
210
225
|
"kind": "variable",
|
|
211
226
|
"name": "_e",
|
|
212
|
-
"default": "class extends
|
|
227
|
+
"default": "class extends v{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 u`<div class=\"vault-manager-header\"><h3>${_(\"previouslyUsed\",{id:\"previouslyUsed\"})}</h3>${this.hasPaymentMethods?u`<primer-button variant=\"tertiary\" class=\"edit-button ${this.isEditMode?\"active\":\"\"}\" @click=${this.toggleEditMode} aria-label=${this.isEditMode?_(\"confirm\",{id:\"confirm\"}):_(\"editPaymentMethods\",{id:\"editPaymentMethods\"})} >${this.isEditMode?u`<primer-icon name=\"checkmark\" size=\"sm\"></primer-icon>`:u`<primer-icon name=\"edit\" size=\"sm\"></primer-icon>`}</primer-button>`:f}</div>`}}"
|
|
213
228
|
},
|
|
214
229
|
{
|
|
215
230
|
"kind": "variable",
|
|
216
231
|
"name": "fe",
|
|
217
|
-
"default": "class extends
|
|
232
|
+
"default": "class extends v{constructor(){super(...arguments);this.isDeleting=!1;this.paymentMethodId=\"\";this.paymentMethodName=\"\";this.vaultManager=null;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 u`<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} >${_(\"cancel\",{id:\"cancel\"})}</primer-button><primer-button @click=${this.handleConfirmClick} ?disabled=${this.isDeleting} >${this.isDeleting?_(\"deleting\",{id:\"deleting\"}):_(\"confirmVaultedPaymentMethodDeletion\",{id:\"confirmVaultedPaymentMethodDeletion\"})}</primer-button></div></div>`}}"
|
|
218
233
|
},
|
|
219
234
|
{
|
|
220
235
|
"kind": "variable",
|
|
221
|
-
"name": "
|
|
222
|
-
"default": "class extends
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"kind": "variable",
|
|
226
|
-
"name": "Oe",
|
|
227
|
-
"default": "class extends g{constructor(){super(...arguments);this.errorMessage=\"\";this.handleDismiss=()=>{this.dispatchEvent(new CustomEvent(\"close-error\",{bubbles:!0,composed:!0}))}}render(){return m`<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=${S(\"closeErrorMessage\",{id:\"closeErrorMessage\"})} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></button></div>`}}"
|
|
236
|
+
"name": "Ke",
|
|
237
|
+
"default": "class extends v{render(){return u`<div class=\"empty-state\"><p>${_(\"savedPaymentMethodsEmpty\",{id:\"savedPaymentMethodsEmpty\"})}</p></div>`}}"
|
|
228
238
|
},
|
|
229
239
|
{
|
|
230
240
|
"kind": "variable",
|
|
231
|
-
"name": "
|
|
232
|
-
"default": "class extends
|
|
241
|
+
"name": "$e",
|
|
242
|
+
"default": "class extends v{constructor(){super(...arguments);this.errorMessage=\"\";this.handleDismiss=()=>{this.dispatchEvent(new CustomEvent(\"close-error\",{bubbles:!0,composed:!0}))}}render(){return u`<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=${_(\"closeErrorMessage\",{id:\"closeErrorMessage\"})} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></button></div>`}}"
|
|
233
243
|
},
|
|
234
244
|
{
|
|
235
245
|
"kind": "variable",
|
|
236
|
-
"name": "
|
|
237
|
-
"default": "class extends
|
|
246
|
+
"name": "Z",
|
|
247
|
+
"default": "class extends v{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.headlessInstance=null;this.sdkState=null;this.vaultItemContext=null;this.vaultManager=null;this.clientOptions=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=async e=>{if(e.preventDefault(),!this.isButtonDisabled)try{await this.vaultManager?.startVaultedPaymentFlow()}catch(r){let o=new CustomEvent(\"primer-vault-payment-error\",{bubbles:!0,composed:!0,detail:{error:r}});this.dispatchEvent(o)}}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:_(\"pay\",{id:\"pay\"})}set buttonText(e){let r=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",r)}get isButtonDisabled(){return!!(this.disabled||!this.vaultItemContext?.selectedVaultedPaymentMethod||this.vaultManager?.isLoading)}render(){let e=this.clientOptions?.submitButton?.amountVisible?this.headlessInstance?.getUIOrderAmount():null,r=e?` ${e}`:f;return u`<primer-button buttonType=\"submit\" variant=${this.variant} @click=${this.handleClick} .disabled=${this.isButtonDisabled} .loading=${this.sdkState?.isProcessing} data-submit >${this.buttonText}${r}</primer-button>`}}"
|
|
238
248
|
},
|
|
239
249
|
{
|
|
240
250
|
"kind": "variable",
|
|
241
|
-
"name": "
|
|
242
|
-
"default": "class extends
|
|
251
|
+
"name": "K",
|
|
252
|
+
"default": "class extends v{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this.isFocused=!1;this._setupCVVIframe=new D(this,{task:([e,r])=>!e||!r||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||r.createCvvInput===null?N:{network:e.paymentInstrumentData.network,createCvvInput:r.createCvvInput},args:()=>[this.paymentMethod,this.vaultManagerFormContext]});this.cvvContainerId=`cvv-container-${Math.random().toString(36).substring(2,9)}`,new D(this,{task:async([e])=>{if(!e)return N;await this.updateComplete;let r=this.renderRoot.querySelector(`#${this.cvvContainerId}`);if(!r)return;let o=yi(this.computedStyles),a=o?{input:{base:o}}:void 0,n={cardNetwork:e.network,container:r,name:\"cvv\",placeholder:\"123\",style:a};this.cvvInput=await e.createCvvInput?.(n)??null,this.cvvInput&&(this.cvvInput.focus(),this.cvvError=this.cvvInput.metadata.errorCode||null,this.vaultManagerCvvContext?.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.vaultManagerCvvContext?.setCvvInput(null))}onCvvInputChange(){!this.cvvInput||!this.vaultManagerCvvContext||(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:()=>f,complete:()=>u`<div class=\"cvv-input-container\"><primer-input-wrapper .focusWithin=${this.isFocused} .hasError=${!!this.cvvError&&(this.vaultManagerCvvContext?.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>${V(this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred),()=>u`<primer-input-error slot=\"error\">${_(this.cvvError,{id:this.cvvError})}</primer-input-error>`)}</primer-input-wrapper></div>`})}}"
|
|
243
253
|
},
|
|
244
254
|
{
|
|
245
255
|
"kind": "variable",
|
|
246
|
-
"name": "
|
|
247
|
-
"default": "class extends
|
|
256
|
+
"name": "Ve",
|
|
257
|
+
"default": "class extends v{constructor(){super(...arguments);this.assetConfig=null}render(){if(!this.assetConfig)return f;let e=this.assetConfig.description,r=this.assetConfig.icon,o=V(this.assetConfig.icon,()=>u`<img class=\"payment-method-icon\" src=${r} alt=${e} />`,()=>u`<div class=\"payment-method-icon payment-method-icon-generic\"><primer-icon name=\"payment-card\" size=\"sm\"></primer-icon></div>`);return this.assetConfig.type===\"other\"&&this.assetConfig.paymentMethodType!==\"ACH\"?u`<div class=\"payment-method-card-other\"><div class=\"left-column\"><div class=\"payment-method-header\">${this.assetConfig.fullName}</div><div class=\"flex\">${o}<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\"?u`<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\">${o}<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\"?u`<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\">${o}<span class=\"payment-method-subtitle\" >${this.assetConfig.network}</span ></span><span class=\"payment-method-subtitle cell-2\" >${this.assetConfig.expiresDate}</span ></div></span>`:f}}"
|
|
248
258
|
},
|
|
249
259
|
{
|
|
250
260
|
"kind": "variable",
|
|
251
|
-
"name": "
|
|
252
|
-
"default": "class extends
|
|
261
|
+
"name": "te",
|
|
262
|
+
"default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.paymentMethodSelectionSent=!1;this.paymentManagers=new Map;this.clientOptions=null;this.headlessUtils=null;this.analyticsUtils=null;this.contextEventsController=null;this.cardFormProvider=new z(this,{context:Yt,initialValue:null});this.eventsController=new Mt(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new D(this,{task:([e])=>{if(!e?.manager)return N;let{manager:r}=e,o=r.createHostedInputs(),{cardNumberInput:a,expiryInput:n,cvvInput:l}=o;return this.cardFormProvider.setValue({cardholderNameInput:o.cardholderNameInput,cardNumberInput:a,expiryInput:n,cvvInput:l,setCardholderName:s=>{r.setCardholderName(s),this.shouldRequireCardholderName&&r.validate?.().then(c=>{let y=c?.validationErrors?.find(E=>E.name===hs.cardholderName),h=this.inputControllers.get(\"cardholderName\");h&&h.updateMetaFromValidation({valid:!1,error:y?.message||y?.error||null,errorCode:y?.message||y?.error||null})})},setCardNetwork:s=>{this.selectedCardNetwork=s},validate:()=>r.validate(),submit:s=>r.submit(s),hideLabels:this.hideLabels,disabled:this.disabled,setSubmissionState:s=>{this.inputControllers.forEach(c=>{c.setSubmitted(s)})},propagateValidationErrors:s=>{s&&s.forEach(c=>{let m=c.field||c.name,y=c.message||c.error,h=hs[m];if(h){let E=this.inputControllers.get(h);if(E){let A={valid:!1,error:y,errorCode:y};E.updateMetaFromValidation(A)}}})},registerInputController:(s,c)=>{this.inputControllers.set(s,c)},unregisterInputController:s=>{this.inputControllers.delete(s)},onUserInteraction:()=>{this.sendPaymentMethodSelectionEvent(),this.checkAndSendPaymentDetailsEnteredEvent()}}),!0},args:()=>[this.paymentManagers.get(\"PAYMENT_CARD\")]});this.paymentDetailsEnteredSent=!1;this.handleSlotButtonClick=e=>{let o=e.target.closest(\"button, primer-button\");if(!o)return;let a=o;this.isSubmitButton(a)&&(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 o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.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(\"contextEventsController\")){let r=e.get(\"contextEventsController\");r?.host&&this._contextCardSubmitListener&&r.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener),this.setupContextEventListeners()}}get shouldShowCardholderName(){let e=this.clientOptions?.card?.cardholderName;return typeof e?.visible==\"boolean\"?e.visible:!0}get shouldRequireCardholderName(){if(!this.shouldShowCardholderName)return!1;let e=this.clientOptions?.card?.cardholderName;return typeof e?.required==\"boolean\"?e.required:!0}sendPaymentMethodSelectionEvent(){this.paymentMethodSelectionSent||(this.paymentMethodSelectionSent=!0,W({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:\"PAYMENT_CARD\"}))}checkAndSendPaymentDetailsEnteredEvent(){if(this.paymentDetailsEnteredSent)return;let e=this.inputControllers.get(\"cardNumber\"),r=this.inputControllers.get(\"expire\"),o=this.inputControllers.get(\"cvv\"),a=e?.meta?.dirty===!0,n=r?.meta?.dirty===!0,l=o?.meta?.dirty===!0,s=!0;this.shouldRequireCardholderName&&(s=this.inputControllers.get(\"cardholderName\")?.meta?.dirty===!0),a&&n&&l&&s&&(this.sendPaymentDetailsEnteredEvent(),this.paymentDetailsEnteredSent=!0)}sendPaymentDetailsEnteredEvent(){W({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.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.addEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}cleanupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}isSubmitButton(e){let r=e.tagName.toLowerCase(),o=r===\"button\",a=r===\"primer-button\";return o&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||a&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value;if(!e||this.disabled)return;e.setSubmissionState?.(!0);let r=await e.validate?.();if(r?.valid){let o=this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0;await e.submit?.(o);let a={success:!0};this.eventsController.dispatchFormSubmitSuccess(a)}else{let o=r?.validationErrors;e.propagateValidationErrors?.(o||[]),this.cardFormProvider.setValue({...e,errors:o}),this.eventsController.dispatchFormSubmitErrors(o)}}render(){return this.setupCardFormTask.status===it.ERROR||this.setupCardFormTask.status===it.INITIAL?f:u`<form @submit=${this.handleFormSubmit}><slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot>${this.setupCardFormTask.render({complete:()=>V(this.hasAssignedContent,()=>f,()=>u`<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>${V(this.shouldShowCardholderName,()=>u`<primer-input-card-holder-name></primer-input-card-holder-name>`,()=>f)}</div><primer-card-form-submit></primer-card-form-submit>`)})}</form>`}}"
|
|
253
263
|
},
|
|
254
264
|
{
|
|
255
265
|
"kind": "variable",
|
|
256
|
-
"name": "
|
|
257
|
-
"default": "class extends
|
|
266
|
+
"name": "Ge",
|
|
267
|
+
"default": "class extends ae{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:r}=e.detail;this.cardFormContext&&this.cardFormContext.setCardNetwork(r)};this.childUpdated()}renderInput(){if(this.hostedInputController.setupTask.status===it.ERROR)return f;let e=this.getError();return u`<primer-input-wrapper .focusWithin=\"${this.hostedInputController.meta.active}\" .hasError=${!!e} >${V(!this.cardFormContext?.hideLabels,()=>u`<primer-input-label slot=\"label\" >${this.label}</primer-input-label >`,()=>f)}<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>${V(e,r=>u`<primer-input-error slot=\"error\">${_(r,{id:r})}</primer-input-error>`,()=>f)}</primer-input-wrapper>`}render(){return this.renderInput()}}"
|
|
258
268
|
},
|
|
259
269
|
{
|
|
260
270
|
"kind": "variable",
|
|
261
|
-
"name": "
|
|
262
|
-
"default": "class extends
|
|
271
|
+
"name": "We",
|
|
272
|
+
"default": "class extends ae{constructor(){super();this.config={inputType:\"cvv\",containerSelector:\"#cvv\",errorName:\"cvv-card\",translations:{label:\"CVV\",placeholder:\"123\"}};this.childUpdated()}render(){return this.renderInput()}}"
|
|
263
273
|
},
|
|
264
274
|
{
|
|
265
275
|
"kind": "variable",
|
|
266
276
|
"name": "qe",
|
|
267
|
-
"default": "class extends
|
|
277
|
+
"default": "class extends ae{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()}}"
|
|
268
278
|
},
|
|
269
279
|
{
|
|
270
280
|
"kind": "variable",
|
|
271
|
-
"name": "
|
|
272
|
-
"default": "class extends
|
|
281
|
+
"name": "Je",
|
|
282
|
+
"default": "class extends ae{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()}}"
|
|
273
283
|
},
|
|
274
284
|
{
|
|
275
285
|
"kind": "variable",
|
|
276
|
-
"name": "
|
|
277
|
-
"default": "class extends
|
|
286
|
+
"name": "G",
|
|
287
|
+
"default": "class extends v{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.headlessInstance=null;this.clientOptions=null;this.sdkState=null;this.cardFormContext=null;this.analyticsUtils=null;this.contextEventsController=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;W({eventName:\"PAYMENT_SUBMITTED\",paymentMethod:\"PAYMENT_CARD\"});let r=new CustomEvent(\"primer:card-submit\",{bubbles:!0,composed:!0,detail:{source:\"primer-card-form-submit\"}});this.dispatchEvent(r)}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:_(\"pay\",{id:\"pay\"})}set buttonText(e){let r=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",r)}get submitButtonConfig(){return this.clientOptions?.submitButton??null}get shouldShowBuiltInButton(){return this.submitButtonConfig?.useBuiltInButton??!0}render(){if(!this.shouldShowBuiltInButton)return f;let e=this.submitButtonConfig?.amountVisible?this.headlessInstance?.getUIOrderAmount():null,r=e?` ${e}`:f,o=this.disabled||this.cardFormContext?.disabled||!1;return u`<primer-button type=\"submit\" variant=${this.variant} ?disabled=${o} @click=${this.handleClick} .loading=${!!this.sdkState?.isProcessing} data-submit >${this.buttonText}${r}</primer-button>`}}"
|
|
278
288
|
},
|
|
279
289
|
{
|
|
280
290
|
"kind": "variable",
|
|
281
|
-
"name": "
|
|
282
|
-
"default": "class extends
|
|
291
|
+
"name": "ne",
|
|
292
|
+
"default": "class extends v{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=Pt();this.dropdownRef=Pt();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.headlessUtils?.getCardNetworkAsset(e.network)?.cardUrl}getSelectableNetworks(){return this.cardNetworks?.selectableCardNetworks||[]}getDetectedNetwork(){return this.selectedCardNetwork??(this.cardNetworks?.detectedCardNetwork||null)}getSelectedNetworkIndex(){let e=this.getDetectedNetwork();if(!e)return 0;let r=this.getSelectableNetworks().findIndex(o=>o.network===e.network);return r>=0?r:0}selectNetwork(e,r){e.stopPropagation(),this.selectedCardNetwork=r,this.isDropdownOpen=!1,this.buttonRef.value?.focus(),this.cardNetworks&&this.dispatchEvent(new CustomEvent(\"network-selected\",{detail:{network:r.network},bubbles:!0,composed:!0}))}focusNetworkOption(){requestAnimationFrame(()=>{this.networkOptionRefs[this.focusedNetworkIndex]&&this.networkOptionRefs[this.focusedNetworkIndex].focus()})}setNetworkOptionRef(e,r){this.networkOptionRefs[r]=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.cardNetworks?.isLoading)return u`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return u`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let r=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!r)return u`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let o=e.length>1;return u`<button ${pt(this.buttonRef)} class=\"network-selector\" @click=${this.toggleDropdown} @keydown=${a=>{(a.key===\" \"||a.key===\"Enter\")&&o&&(a.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${o?`Selected card network: ${r.displayName}. Click to change.`:`Card network: ${r.displayName}`} aria-expanded=${o?this.isDropdownOpen:f} aria-haspopup=${o?\"true\":f} aria-controls=${o?\"network-dropdown\":f} ><img class=\"network-icon\" src=${this.getNetworkIconUrl(r)} alt=${r.displayName} />${V(o,()=>u`<primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" size=\"sm\" name=\"chevron-down\" ></primer-icon>`,()=>f)}</button>${V(this.isDropdownOpen,()=>u`<div ${pt(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" >${e.map((a,n)=>u`<div ${pt(l=>this.setNetworkOptionRef(l,n))} class=\"network-option ${this.isKeyboardNavigation&&n===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${l=>this.selectNetwork(l,a)} @keydown=${l=>{(l.key===\"Enter\"||l.key===\" \")&&this.selectNetwork(l,a)}} role=\"option\" aria-selected=${a.network===r.network} tabindex=\"${n===this.focusedNetworkIndex?\"0\":\"-1\"}\" ><img class=\"network-option-icon\" src=${this.getNetworkIconUrl(a)} alt=${a.displayName} /><span class=\"network-name\">${a.displayName}</span>${V(a.network===r.network,()=>u`<primer-icon class=\"checkmark\" name=\"checkmark\" size=\"sm\" ></primer-icon>`,()=>f)}</div>`)}</div>`,()=>f)} `}}"
|
|
283
293
|
},
|
|
284
294
|
{
|
|
285
295
|
"kind": "variable",
|
|
286
|
-
"name": "
|
|
287
|
-
"default": "class extends
|
|
296
|
+
"name": "ht",
|
|
297
|
+
"default": "class extends v{constructor(){super(...arguments);this.vaultManager=null}render(){if(this.vaultManager?.isLoading)return f;let e=this.vaultManager?.showEmptyState&&this.vaultManager?.vaultedPaymentMethods.length;return!this.vaultManager||!this.vaultManager.enabled||!e?u`<slot name=\"other-payments\"></slot>`:u`<div class=\"other-payment-methods-container\"><primer-collapsable buttonVariant=\"secondary\" .expanded=\"${this.vaultManager?.vaultedPaymentMethods.length===0}\" .header=\"${_(\"navigateToPaymentMethods\",{id:\"navigateToPaymentMethods\"})}\" ><div class=\"other-payment-methods-content\"><slot name=\"other-payments\"></slot></div></primer-collapsable></div>`}}"
|
|
288
298
|
},
|
|
289
299
|
{
|
|
290
300
|
"kind": "variable",
|
|
291
|
-
"name": "
|
|
292
|
-
"default": "class extends
|
|
301
|
+
"name": "Ht",
|
|
302
|
+
"default": "class extends v{render(){return u`<primer-checkout-state type=\"complete\"></primer-checkout-state>`}}"
|
|
293
303
|
},
|
|
294
304
|
{
|
|
295
305
|
"kind": "variable",
|
|
296
|
-
"name": "
|
|
297
|
-
"default": "class extends
|
|
306
|
+
"name": "wt",
|
|
307
|
+
"default": "class extends v{constructor(){super(...arguments);this.sdkState=null}render(){return u`<primer-checkout-state type=\"failure\" description=${this.sdkState?.error?.message||\"\"} ></primer-checkout-state>`}}"
|
|
298
308
|
},
|
|
299
309
|
{
|
|
300
310
|
"kind": "variable",
|
|
301
|
-
"name": "
|
|
302
|
-
"default": "class extends
|
|
311
|
+
"name": "Ze",
|
|
312
|
+
"default": "class extends v{constructor(){super(...arguments);this.showProcessingErrors=!0}get shouldShowError(){return!this.sdkState||this.sdkState.isProcessing?!1:!!(this.sdkState.failure&&this.showProcessingErrors)}render(){return this.sdkState?u`<primer-error-message message=\"${_(this.sdkState.failure?.message??\"\",{id:\"tokenizationError\"})}\" ?visible=\"${this.shouldShowError}\" ></primer-error-message>`:f}}"
|
|
303
313
|
},
|
|
304
314
|
{
|
|
305
315
|
"kind": "variable",
|
|
306
|
-
"name": "
|
|
307
|
-
"default": "class extends
|
|
316
|
+
"name": "Ue",
|
|
317
|
+
"default": "class extends v{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null;this.clientOptions=null}render(){return this.sdkState?.isSuccessful?u`<slot name=\"checkout-complete\"><primer-checkout-complete></primer-checkout-complete></slot>`:u`<slot name=\"payments\" @slotchange=${this.onSlotChange}></slot>${V(this.hasAssignedContent,()=>f,()=>u`<div class=${X({\"primer-is-processing\":!!this.sdkState?.isProcessing})} ><primer-vault-manager></primer-vault-manager><primer-show-other-payments><div slot=\"other-payments\" class=\"primer-main-list\">${this.paymentMethods?.toArray().map(e=>u`<primer-payment-method type=${e.type} ?disabled=${this.clientOptions?.disabledPayments===!0} ></primer-payment-method>`)}</div></primer-show-other-payments><primer-error-message-container></primer-error-message-container></div>`)} `}}"
|
|
308
318
|
},
|
|
309
319
|
{
|
|
310
320
|
"kind": "function",
|
|
311
|
-
"name": "
|
|
321
|
+
"name": "Cw"
|
|
312
322
|
}
|
|
313
323
|
],
|
|
314
324
|
"exports": [
|
|
@@ -336,6 +346,14 @@
|
|
|
336
346
|
"module": "dist/primer-loader.js"
|
|
337
347
|
}
|
|
338
348
|
},
|
|
349
|
+
{
|
|
350
|
+
"kind": "js",
|
|
351
|
+
"name": "ApplePay",
|
|
352
|
+
"declaration": {
|
|
353
|
+
"name": "Re",
|
|
354
|
+
"module": "dist/primer-loader.js"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
339
357
|
{
|
|
340
358
|
"kind": "js",
|
|
341
359
|
"name": "Button",
|
|
@@ -348,7 +366,7 @@
|
|
|
348
366
|
"kind": "js",
|
|
349
367
|
"name": "CardForm",
|
|
350
368
|
"declaration": {
|
|
351
|
-
"name": "
|
|
369
|
+
"name": "te",
|
|
352
370
|
"module": "dist/primer-loader.js"
|
|
353
371
|
}
|
|
354
372
|
},
|
|
@@ -356,7 +374,7 @@
|
|
|
356
374
|
"kind": "js",
|
|
357
375
|
"name": "CardFormCVV",
|
|
358
376
|
"declaration": {
|
|
359
|
-
"name": "
|
|
377
|
+
"name": "We",
|
|
360
378
|
"module": "dist/primer-loader.js"
|
|
361
379
|
}
|
|
362
380
|
},
|
|
@@ -364,7 +382,7 @@
|
|
|
364
382
|
"kind": "js",
|
|
365
383
|
"name": "CardFormCardNetworkSelector",
|
|
366
384
|
"declaration": {
|
|
367
|
-
"name": "
|
|
385
|
+
"name": "ne",
|
|
368
386
|
"module": "dist/primer-loader.js"
|
|
369
387
|
}
|
|
370
388
|
},
|
|
@@ -372,7 +390,7 @@
|
|
|
372
390
|
"kind": "js",
|
|
373
391
|
"name": "CardFormCardNumber",
|
|
374
392
|
"declaration": {
|
|
375
|
-
"name": "
|
|
393
|
+
"name": "Ge",
|
|
376
394
|
"module": "dist/primer-loader.js"
|
|
377
395
|
}
|
|
378
396
|
},
|
|
@@ -380,7 +398,7 @@
|
|
|
380
398
|
"kind": "js",
|
|
381
399
|
"name": "CardFormError",
|
|
382
400
|
"declaration": {
|
|
383
|
-
"name": "
|
|
401
|
+
"name": "ze",
|
|
384
402
|
"module": "dist/primer-loader.js"
|
|
385
403
|
}
|
|
386
404
|
},
|
|
@@ -388,7 +406,7 @@
|
|
|
388
406
|
"kind": "js",
|
|
389
407
|
"name": "CardFormExpiry",
|
|
390
408
|
"declaration": {
|
|
391
|
-
"name": "
|
|
409
|
+
"name": "qe",
|
|
392
410
|
"module": "dist/primer-loader.js"
|
|
393
411
|
}
|
|
394
412
|
},
|
|
@@ -396,7 +414,7 @@
|
|
|
396
414
|
"kind": "js",
|
|
397
415
|
"name": "CardFormName",
|
|
398
416
|
"declaration": {
|
|
399
|
-
"name": "
|
|
417
|
+
"name": "Je",
|
|
400
418
|
"module": "dist/primer-loader.js"
|
|
401
419
|
}
|
|
402
420
|
},
|
|
@@ -404,7 +422,7 @@
|
|
|
404
422
|
"kind": "js",
|
|
405
423
|
"name": "CardFormSubmit",
|
|
406
424
|
"declaration": {
|
|
407
|
-
"name": "
|
|
425
|
+
"name": "G",
|
|
408
426
|
"module": "dist/primer-loader.js"
|
|
409
427
|
}
|
|
410
428
|
},
|
|
@@ -420,7 +438,7 @@
|
|
|
420
438
|
"kind": "js",
|
|
421
439
|
"name": "Dialog",
|
|
422
440
|
"declaration": {
|
|
423
|
-
"name": "
|
|
441
|
+
"name": "Ae",
|
|
424
442
|
"module": "dist/primer-loader.js"
|
|
425
443
|
}
|
|
426
444
|
},
|
|
@@ -436,7 +454,7 @@
|
|
|
436
454
|
"kind": "js",
|
|
437
455
|
"name": "ErrorMessage",
|
|
438
456
|
"declaration": {
|
|
439
|
-
"name": "
|
|
457
|
+
"name": "Le",
|
|
440
458
|
"module": "dist/primer-loader.js"
|
|
441
459
|
}
|
|
442
460
|
},
|
|
@@ -444,7 +462,15 @@
|
|
|
444
462
|
"kind": "js",
|
|
445
463
|
"name": "ErrorMessageContainer",
|
|
446
464
|
"declaration": {
|
|
447
|
-
"name": "
|
|
465
|
+
"name": "Ze",
|
|
466
|
+
"module": "dist/primer-loader.js"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"kind": "js",
|
|
471
|
+
"name": "GooglePay",
|
|
472
|
+
"declaration": {
|
|
473
|
+
"name": "Oe",
|
|
448
474
|
"module": "dist/primer-loader.js"
|
|
449
475
|
}
|
|
450
476
|
},
|
|
@@ -452,7 +478,7 @@
|
|
|
452
478
|
"kind": "js",
|
|
453
479
|
"name": "InitializedPayments",
|
|
454
480
|
"declaration": {
|
|
455
|
-
"name": "
|
|
481
|
+
"name": "Br",
|
|
456
482
|
"module": "dist/primer-loader.js"
|
|
457
483
|
}
|
|
458
484
|
},
|
|
@@ -460,7 +486,7 @@
|
|
|
460
486
|
"kind": "js",
|
|
461
487
|
"name": "Input",
|
|
462
488
|
"declaration": {
|
|
463
|
-
"name": "
|
|
489
|
+
"name": "Y",
|
|
464
490
|
"module": "dist/primer-loader.js"
|
|
465
491
|
}
|
|
466
492
|
},
|
|
@@ -468,7 +494,7 @@
|
|
|
468
494
|
"kind": "js",
|
|
469
495
|
"name": "InputLabel",
|
|
470
496
|
"declaration": {
|
|
471
|
-
"name": "
|
|
497
|
+
"name": "Fe",
|
|
472
498
|
"module": "dist/primer-loader.js"
|
|
473
499
|
}
|
|
474
500
|
},
|
|
@@ -476,15 +502,15 @@
|
|
|
476
502
|
"kind": "js",
|
|
477
503
|
"name": "InputWrapper",
|
|
478
504
|
"declaration": {
|
|
479
|
-
"name": "
|
|
505
|
+
"name": "Ie",
|
|
480
506
|
"module": "dist/primer-loader.js"
|
|
481
507
|
}
|
|
482
508
|
},
|
|
483
509
|
{
|
|
484
510
|
"kind": "js",
|
|
485
|
-
"name": "
|
|
511
|
+
"name": "PayPal",
|
|
486
512
|
"declaration": {
|
|
487
|
-
"name": "
|
|
513
|
+
"name": "De",
|
|
488
514
|
"module": "dist/primer-loader.js"
|
|
489
515
|
}
|
|
490
516
|
},
|
|
@@ -508,7 +534,7 @@
|
|
|
508
534
|
"kind": "js",
|
|
509
535
|
"name": "PaymentMethodContentComponent",
|
|
510
536
|
"declaration": {
|
|
511
|
-
"name": "
|
|
537
|
+
"name": "Ve",
|
|
512
538
|
"module": "dist/primer-loader.js"
|
|
513
539
|
}
|
|
514
540
|
},
|
|
@@ -516,7 +542,7 @@
|
|
|
516
542
|
"kind": "js",
|
|
517
543
|
"name": "Portal",
|
|
518
544
|
"declaration": {
|
|
519
|
-
"name": "
|
|
545
|
+
"name": "dt",
|
|
520
546
|
"module": "dist/primer-loader.js"
|
|
521
547
|
}
|
|
522
548
|
},
|
|
@@ -524,7 +550,7 @@
|
|
|
524
550
|
"kind": "js",
|
|
525
551
|
"name": "PortalDialogComponent",
|
|
526
552
|
"declaration": {
|
|
527
|
-
"name": "
|
|
553
|
+
"name": "oe",
|
|
528
554
|
"module": "dist/primer-loader.js"
|
|
529
555
|
}
|
|
530
556
|
},
|
|
@@ -532,7 +558,7 @@
|
|
|
532
558
|
"kind": "js",
|
|
533
559
|
"name": "PrimerCheckoutComplete",
|
|
534
560
|
"declaration": {
|
|
535
|
-
"name": "
|
|
561
|
+
"name": "Ht",
|
|
536
562
|
"module": "dist/primer-loader.js"
|
|
537
563
|
}
|
|
538
564
|
},
|
|
@@ -548,7 +574,7 @@
|
|
|
548
574
|
"kind": "js",
|
|
549
575
|
"name": "PrimerCheckoutFailure",
|
|
550
576
|
"declaration": {
|
|
551
|
-
"name": "
|
|
577
|
+
"name": "wt",
|
|
552
578
|
"module": "dist/primer-loader.js"
|
|
553
579
|
}
|
|
554
580
|
},
|
|
@@ -556,7 +582,7 @@
|
|
|
556
582
|
"kind": "js",
|
|
557
583
|
"name": "PrimerCheckoutState",
|
|
558
584
|
"declaration": {
|
|
559
|
-
"name": "
|
|
585
|
+
"name": "je",
|
|
560
586
|
"module": "dist/primer-loader.js"
|
|
561
587
|
}
|
|
562
588
|
},
|
|
@@ -564,7 +590,7 @@
|
|
|
564
590
|
"kind": "js",
|
|
565
591
|
"name": "PrimerIcon",
|
|
566
592
|
"declaration": {
|
|
567
|
-
"name": "
|
|
593
|
+
"name": "Ne",
|
|
568
594
|
"module": "dist/primer-loader.js"
|
|
569
595
|
}
|
|
570
596
|
},
|
|
@@ -572,7 +598,7 @@
|
|
|
572
598
|
"kind": "js",
|
|
573
599
|
"name": "PrimerKlarna",
|
|
574
600
|
"declaration": {
|
|
575
|
-
"name": "
|
|
601
|
+
"name": "Q",
|
|
576
602
|
"module": "dist/primer-loader.js"
|
|
577
603
|
}
|
|
578
604
|
},
|
|
@@ -580,7 +606,7 @@
|
|
|
580
606
|
"kind": "js",
|
|
581
607
|
"name": "PrimerMain",
|
|
582
608
|
"declaration": {
|
|
583
|
-
"name": "
|
|
609
|
+
"name": "Ue",
|
|
584
610
|
"module": "dist/primer-loader.js"
|
|
585
611
|
}
|
|
586
612
|
},
|
|
@@ -596,7 +622,7 @@
|
|
|
596
622
|
"kind": "js",
|
|
597
623
|
"name": "ShowOtherPayments",
|
|
598
624
|
"declaration": {
|
|
599
|
-
"name": "
|
|
625
|
+
"name": "ht",
|
|
600
626
|
"module": "dist/primer-loader.js"
|
|
601
627
|
}
|
|
602
628
|
},
|
|
@@ -612,7 +638,7 @@
|
|
|
612
638
|
"kind": "js",
|
|
613
639
|
"name": "VaultCvvInput",
|
|
614
640
|
"declaration": {
|
|
615
|
-
"name": "
|
|
641
|
+
"name": "K",
|
|
616
642
|
"module": "dist/primer-loader.js"
|
|
617
643
|
}
|
|
618
644
|
},
|
|
@@ -628,7 +654,7 @@
|
|
|
628
654
|
"kind": "js",
|
|
629
655
|
"name": "VaultEmptyState",
|
|
630
656
|
"declaration": {
|
|
631
|
-
"name": "
|
|
657
|
+
"name": "Ke",
|
|
632
658
|
"module": "dist/primer-loader.js"
|
|
633
659
|
}
|
|
634
660
|
},
|
|
@@ -636,7 +662,7 @@
|
|
|
636
662
|
"kind": "js",
|
|
637
663
|
"name": "VaultErrorMessage",
|
|
638
664
|
"declaration": {
|
|
639
|
-
"name": "
|
|
665
|
+
"name": "$e",
|
|
640
666
|
"module": "dist/primer-loader.js"
|
|
641
667
|
}
|
|
642
668
|
},
|
|
@@ -644,7 +670,7 @@
|
|
|
644
670
|
"kind": "js",
|
|
645
671
|
"name": "VaultManager",
|
|
646
672
|
"declaration": {
|
|
647
|
-
"name": "
|
|
673
|
+
"name": "ee",
|
|
648
674
|
"module": "dist/primer-loader.js"
|
|
649
675
|
}
|
|
650
676
|
},
|
|
@@ -668,7 +694,7 @@
|
|
|
668
694
|
"kind": "js",
|
|
669
695
|
"name": "VaultPaymentSubmit",
|
|
670
696
|
"declaration": {
|
|
671
|
-
"name": "
|
|
697
|
+
"name": "Z",
|
|
672
698
|
"module": "dist/primer-loader.js"
|
|
673
699
|
}
|
|
674
700
|
},
|
|
@@ -676,7 +702,7 @@
|
|
|
676
702
|
"kind": "js",
|
|
677
703
|
"name": "injectDarkTheme",
|
|
678
704
|
"declaration": {
|
|
679
|
-
"name": "
|
|
705
|
+
"name": "$d",
|
|
680
706
|
"module": "dist/primer-loader.js"
|
|
681
707
|
}
|
|
682
708
|
},
|
|
@@ -684,7 +710,7 @@
|
|
|
684
710
|
"kind": "js",
|
|
685
711
|
"name": "injectLightTheme",
|
|
686
712
|
"declaration": {
|
|
687
|
-
"name": "
|
|
713
|
+
"name": "Dd",
|
|
688
714
|
"module": "dist/primer-loader.js"
|
|
689
715
|
}
|
|
690
716
|
},
|
|
@@ -692,7 +718,7 @@
|
|
|
692
718
|
"kind": "js",
|
|
693
719
|
"name": "injectLoaderStyles",
|
|
694
720
|
"declaration": {
|
|
695
|
-
"name": "
|
|
721
|
+
"name": "yn",
|
|
696
722
|
"module": "dist/primer-loader.js"
|
|
697
723
|
}
|
|
698
724
|
},
|
|
@@ -700,7 +726,7 @@
|
|
|
700
726
|
"kind": "js",
|
|
701
727
|
"name": "injectThemeStyles",
|
|
702
728
|
"declaration": {
|
|
703
|
-
"name": "
|
|
729
|
+
"name": "gn",
|
|
704
730
|
"module": "dist/primer-loader.js"
|
|
705
731
|
}
|
|
706
732
|
},
|
|
@@ -708,7 +734,7 @@
|
|
|
708
734
|
"kind": "js",
|
|
709
735
|
"name": "loadPrimer",
|
|
710
736
|
"declaration": {
|
|
711
|
-
"name": "
|
|
737
|
+
"name": "Cw",
|
|
712
738
|
"module": "dist/primer-loader.js"
|
|
713
739
|
}
|
|
714
740
|
}
|
|
@@ -3420,10 +3446,26 @@
|
|
|
3420
3446
|
},
|
|
3421
3447
|
{
|
|
3422
3448
|
"kind": "js",
|
|
3423
|
-
"name": "
|
|
3449
|
+
"name": "GooglePay",
|
|
3450
|
+
"declaration": {
|
|
3451
|
+
"name": "GooglePay",
|
|
3452
|
+
"module": "./native-payment/components/google-pay/google-pay"
|
|
3453
|
+
}
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
"kind": "js",
|
|
3457
|
+
"name": "ApplePay",
|
|
3458
|
+
"declaration": {
|
|
3459
|
+
"name": "ApplePay",
|
|
3460
|
+
"module": "./native-payment/components/apple-pay/apple-pay"
|
|
3461
|
+
}
|
|
3462
|
+
},
|
|
3463
|
+
{
|
|
3464
|
+
"kind": "js",
|
|
3465
|
+
"name": "PayPal",
|
|
3424
3466
|
"declaration": {
|
|
3425
|
-
"name": "
|
|
3426
|
-
"module": "./native-payment/
|
|
3467
|
+
"name": "PayPal",
|
|
3468
|
+
"module": "./native-payment/components/paypal/paypal"
|
|
3427
3469
|
}
|
|
3428
3470
|
},
|
|
3429
3471
|
{
|
|
@@ -9996,38 +10038,154 @@
|
|
|
9996
10038
|
},
|
|
9997
10039
|
{
|
|
9998
10040
|
"kind": "javascript-module",
|
|
9999
|
-
"path": "src/containers/native-payment/native-payment.
|
|
10041
|
+
"path": "src/containers/native-payment/native-payment.styles.ts",
|
|
10042
|
+
"declarations": [
|
|
10043
|
+
{
|
|
10044
|
+
"kind": "variable",
|
|
10045
|
+
"name": "baseNativePaymentStyles",
|
|
10046
|
+
"default": "css` :host { height: calc( ${unsafeCSS(PAYMENT_METHOD_LINE_HEIGHT)} + calc(2 * var(--primer-space-medium)) ); width: 100%; display: flex; } .native-button-container { width: 100%; height: 100%; flex: 1; position: relative; } /* Disabled state styling - handled via JavaScript overlay for iframe compatibility */ :host([disabled]) { cursor: not-allowed; } `",
|
|
10047
|
+
"description": "Base styles shared across all native payment components.\nComponent-specific styles should import and extend these."
|
|
10048
|
+
}
|
|
10049
|
+
],
|
|
10050
|
+
"exports": [
|
|
10051
|
+
{
|
|
10052
|
+
"kind": "js",
|
|
10053
|
+
"name": "baseNativePaymentStyles",
|
|
10054
|
+
"declaration": {
|
|
10055
|
+
"name": "baseNativePaymentStyles",
|
|
10056
|
+
"module": "src/containers/native-payment/native-payment.styles.ts"
|
|
10057
|
+
}
|
|
10058
|
+
},
|
|
10059
|
+
{
|
|
10060
|
+
"kind": "js",
|
|
10061
|
+
"name": "default",
|
|
10062
|
+
"declaration": {
|
|
10063
|
+
"name": "baseNativePaymentStyles",
|
|
10064
|
+
"module": "src/containers/native-payment/native-payment.styles.ts"
|
|
10065
|
+
}
|
|
10066
|
+
}
|
|
10067
|
+
]
|
|
10068
|
+
},
|
|
10069
|
+
{
|
|
10070
|
+
"kind": "javascript-module",
|
|
10071
|
+
"path": "src/containers/native-payment/native-payment.ts",
|
|
10072
|
+
"declarations": [],
|
|
10073
|
+
"exports": [
|
|
10074
|
+
{
|
|
10075
|
+
"kind": "js",
|
|
10076
|
+
"name": "GooglePay",
|
|
10077
|
+
"declaration": {
|
|
10078
|
+
"name": "GooglePay",
|
|
10079
|
+
"module": "./components/google-pay/google-pay"
|
|
10080
|
+
}
|
|
10081
|
+
},
|
|
10082
|
+
{
|
|
10083
|
+
"kind": "js",
|
|
10084
|
+
"name": "GooglePayComponent",
|
|
10085
|
+
"declaration": {
|
|
10086
|
+
"name": "GooglePayComponent",
|
|
10087
|
+
"module": "./components/google-pay/google-pay"
|
|
10088
|
+
}
|
|
10089
|
+
},
|
|
10090
|
+
{
|
|
10091
|
+
"kind": "js",
|
|
10092
|
+
"name": "ApplePay",
|
|
10093
|
+
"declaration": {
|
|
10094
|
+
"name": "ApplePay",
|
|
10095
|
+
"module": "./components/apple-pay/apple-pay"
|
|
10096
|
+
}
|
|
10097
|
+
},
|
|
10098
|
+
{
|
|
10099
|
+
"kind": "js",
|
|
10100
|
+
"name": "ApplePayComponent",
|
|
10101
|
+
"declaration": {
|
|
10102
|
+
"name": "ApplePayComponent",
|
|
10103
|
+
"module": "./components/apple-pay/apple-pay"
|
|
10104
|
+
}
|
|
10105
|
+
},
|
|
10106
|
+
{
|
|
10107
|
+
"kind": "js",
|
|
10108
|
+
"name": "PayPal",
|
|
10109
|
+
"declaration": {
|
|
10110
|
+
"name": "PayPal",
|
|
10111
|
+
"module": "./components/paypal/paypal"
|
|
10112
|
+
}
|
|
10113
|
+
},
|
|
10114
|
+
{
|
|
10115
|
+
"kind": "js",
|
|
10116
|
+
"name": "PayPalComponent",
|
|
10117
|
+
"declaration": {
|
|
10118
|
+
"name": "PayPalComponent",
|
|
10119
|
+
"module": "./components/paypal/paypal"
|
|
10120
|
+
}
|
|
10121
|
+
},
|
|
10122
|
+
{
|
|
10123
|
+
"kind": "js",
|
|
10124
|
+
"name": "calculateButtonHeight",
|
|
10125
|
+
"declaration": {
|
|
10126
|
+
"name": "calculateButtonHeight",
|
|
10127
|
+
"module": "./utils/button-height"
|
|
10128
|
+
}
|
|
10129
|
+
},
|
|
10130
|
+
{
|
|
10131
|
+
"kind": "js",
|
|
10132
|
+
"name": "getPayPalConstrainedHeight",
|
|
10133
|
+
"declaration": {
|
|
10134
|
+
"name": "getPayPalConstrainedHeight",
|
|
10135
|
+
"module": "./utils/button-height"
|
|
10136
|
+
}
|
|
10137
|
+
},
|
|
10138
|
+
{
|
|
10139
|
+
"kind": "js",
|
|
10140
|
+
"name": "createDisabledOverlay",
|
|
10141
|
+
"declaration": {
|
|
10142
|
+
"name": "createDisabledOverlay",
|
|
10143
|
+
"module": "./utils/disabled-overlay"
|
|
10144
|
+
}
|
|
10145
|
+
},
|
|
10146
|
+
{
|
|
10147
|
+
"kind": "js",
|
|
10148
|
+
"name": "updateOverlayForContainer",
|
|
10149
|
+
"declaration": {
|
|
10150
|
+
"name": "updateOverlayForContainer",
|
|
10151
|
+
"module": "./utils/disabled-overlay"
|
|
10152
|
+
}
|
|
10153
|
+
},
|
|
10154
|
+
{
|
|
10155
|
+
"kind": "js",
|
|
10156
|
+
"name": "updateOverlayForGooglePay",
|
|
10157
|
+
"declaration": {
|
|
10158
|
+
"name": "updateOverlayForGooglePay",
|
|
10159
|
+
"module": "./utils/disabled-overlay"
|
|
10160
|
+
}
|
|
10161
|
+
},
|
|
10162
|
+
{
|
|
10163
|
+
"kind": "js",
|
|
10164
|
+
"name": "baseNativePaymentStyles",
|
|
10165
|
+
"declaration": {
|
|
10166
|
+
"name": "baseNativePaymentStyles",
|
|
10167
|
+
"module": "./native-payment.styles"
|
|
10168
|
+
}
|
|
10169
|
+
}
|
|
10170
|
+
]
|
|
10171
|
+
},
|
|
10172
|
+
{
|
|
10173
|
+
"kind": "javascript-module",
|
|
10174
|
+
"path": "src/containers/payment-method/payment-method.component.ts",
|
|
10000
10175
|
"declarations": [
|
|
10001
10176
|
{
|
|
10002
10177
|
"kind": "class",
|
|
10003
|
-
"description": "
|
|
10004
|
-
"name": "
|
|
10178
|
+
"description": "",
|
|
10179
|
+
"name": "PaymentMethodComponent",
|
|
10005
10180
|
"members": [
|
|
10006
10181
|
{
|
|
10007
10182
|
"kind": "field",
|
|
10008
|
-
"name": "
|
|
10009
|
-
"type": {
|
|
10010
|
-
"text": "InitializedPaymentMethod | undefined"
|
|
10011
|
-
},
|
|
10012
|
-
"attribute": "paymentMethod"
|
|
10013
|
-
},
|
|
10014
|
-
{
|
|
10015
|
-
"kind": "field",
|
|
10016
|
-
"name": "paymentManagers",
|
|
10017
|
-
"type": {
|
|
10018
|
-
"text": "InitializedManagersMap"
|
|
10019
|
-
},
|
|
10020
|
-
"default": "new Map()",
|
|
10021
|
-
"attribute": "paymentManagers"
|
|
10022
|
-
},
|
|
10023
|
-
{
|
|
10024
|
-
"kind": "field",
|
|
10025
|
-
"name": "computedStyles",
|
|
10183
|
+
"name": "type",
|
|
10026
10184
|
"type": {
|
|
10027
|
-
"text": "
|
|
10185
|
+
"text": "PaymentMethodType | undefined"
|
|
10028
10186
|
},
|
|
10029
|
-
"default": "
|
|
10030
|
-
"attribute": "
|
|
10187
|
+
"default": "undefined",
|
|
10188
|
+
"attribute": "type"
|
|
10031
10189
|
},
|
|
10032
10190
|
{
|
|
10033
10191
|
"kind": "field",
|
|
@@ -10040,250 +10198,45 @@
|
|
|
10040
10198
|
},
|
|
10041
10199
|
{
|
|
10042
10200
|
"kind": "field",
|
|
10043
|
-
"name": "
|
|
10044
|
-
"type": {
|
|
10045
|
-
"text": "string"
|
|
10046
|
-
},
|
|
10047
|
-
"privacy": "private",
|
|
10048
|
-
"default": "'button-container'"
|
|
10049
|
-
},
|
|
10050
|
-
{
|
|
10051
|
-
"kind": "field",
|
|
10052
|
-
"name": "loadManagerTask",
|
|
10201
|
+
"name": "paymentMethods",
|
|
10053
10202
|
"type": {
|
|
10054
|
-
"text": "
|
|
10203
|
+
"text": "PaymentMethodsContextType"
|
|
10055
10204
|
},
|
|
10056
|
-
"
|
|
10057
|
-
"
|
|
10205
|
+
"default": "null",
|
|
10206
|
+
"attribute": "paymentMethods"
|
|
10058
10207
|
},
|
|
10059
10208
|
{
|
|
10060
10209
|
"kind": "field",
|
|
10061
|
-
"name": "
|
|
10210
|
+
"name": "analyticsUtils",
|
|
10062
10211
|
"type": {
|
|
10063
|
-
"text": "
|
|
10212
|
+
"text": "AnalyticsContextType"
|
|
10064
10213
|
},
|
|
10065
|
-
"
|
|
10066
|
-
"
|
|
10214
|
+
"default": "null",
|
|
10215
|
+
"description": "Analytics utils for sending analytics events"
|
|
10067
10216
|
},
|
|
10068
10217
|
{
|
|
10069
10218
|
"kind": "method",
|
|
10070
|
-
"name": "
|
|
10219
|
+
"name": "sendPaymentMethodSelectionEvent",
|
|
10071
10220
|
"privacy": "private",
|
|
10072
10221
|
"return": {
|
|
10073
10222
|
"type": {
|
|
10074
|
-
"text": "
|
|
10223
|
+
"text": "void"
|
|
10075
10224
|
}
|
|
10076
10225
|
},
|
|
10077
|
-
"description": "
|
|
10226
|
+
"description": "Sends PAYMENT_METHOD_SELECTION analytics event when user clicks on payment method"
|
|
10078
10227
|
},
|
|
10079
10228
|
{
|
|
10080
|
-
"kind": "
|
|
10081
|
-
"name": "
|
|
10229
|
+
"kind": "field",
|
|
10230
|
+
"name": "handleClick",
|
|
10082
10231
|
"privacy": "private",
|
|
10083
|
-
"
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
"
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
"type": {
|
|
10092
|
-
"text": "number"
|
|
10093
|
-
}
|
|
10094
|
-
}
|
|
10095
|
-
],
|
|
10096
|
-
"description": "Creates render options with appropriate styles based on payment method type"
|
|
10097
|
-
},
|
|
10098
|
-
{
|
|
10099
|
-
"kind": "method",
|
|
10100
|
-
"name": "updateDisabledOverlay",
|
|
10101
|
-
"privacy": "private",
|
|
10102
|
-
"return": {
|
|
10103
|
-
"type": {
|
|
10104
|
-
"text": "void"
|
|
10105
|
-
}
|
|
10106
|
-
},
|
|
10107
|
-
"description": "Updates the disabled overlay based on the current disabled state"
|
|
10108
|
-
},
|
|
10109
|
-
{
|
|
10110
|
-
"kind": "method",
|
|
10111
|
-
"name": "updateGooglePayOverlay",
|
|
10112
|
-
"privacy": "private",
|
|
10113
|
-
"return": {
|
|
10114
|
-
"type": {
|
|
10115
|
-
"text": "void"
|
|
10116
|
-
}
|
|
10117
|
-
}
|
|
10118
|
-
},
|
|
10119
|
-
{
|
|
10120
|
-
"kind": "method",
|
|
10121
|
-
"name": "updateRegularOverlay",
|
|
10122
|
-
"privacy": "private",
|
|
10123
|
-
"return": {
|
|
10124
|
-
"type": {
|
|
10125
|
-
"text": "void"
|
|
10126
|
-
}
|
|
10127
|
-
}
|
|
10128
|
-
}
|
|
10129
|
-
],
|
|
10130
|
-
"attributes": [
|
|
10131
|
-
{
|
|
10132
|
-
"name": "paymentMethod",
|
|
10133
|
-
"type": {
|
|
10134
|
-
"text": "InitializedPaymentMethod | undefined"
|
|
10135
|
-
},
|
|
10136
|
-
"fieldName": "paymentMethod"
|
|
10137
|
-
},
|
|
10138
|
-
{
|
|
10139
|
-
"name": "paymentManagers",
|
|
10140
|
-
"type": {
|
|
10141
|
-
"text": "InitializedManagersMap"
|
|
10142
|
-
},
|
|
10143
|
-
"default": "new Map()",
|
|
10144
|
-
"fieldName": "paymentManagers"
|
|
10145
|
-
},
|
|
10146
|
-
{
|
|
10147
|
-
"name": "computedStyles",
|
|
10148
|
-
"type": {
|
|
10149
|
-
"text": "CSSStyleDeclaration | null"
|
|
10150
|
-
},
|
|
10151
|
-
"default": "null",
|
|
10152
|
-
"fieldName": "computedStyles"
|
|
10153
|
-
},
|
|
10154
|
-
{
|
|
10155
|
-
"name": "disabled",
|
|
10156
|
-
"type": {
|
|
10157
|
-
"text": "boolean"
|
|
10158
|
-
},
|
|
10159
|
-
"default": "false",
|
|
10160
|
-
"fieldName": "disabled"
|
|
10161
|
-
}
|
|
10162
|
-
],
|
|
10163
|
-
"superclass": {
|
|
10164
|
-
"name": "LitElement",
|
|
10165
|
-
"package": "lit"
|
|
10166
|
-
},
|
|
10167
|
-
"tagName": "primer-native-payment",
|
|
10168
|
-
"customElement": true
|
|
10169
|
-
}
|
|
10170
|
-
],
|
|
10171
|
-
"exports": [
|
|
10172
|
-
{
|
|
10173
|
-
"kind": "js",
|
|
10174
|
-
"name": "NativePaymentComponent",
|
|
10175
|
-
"declaration": {
|
|
10176
|
-
"name": "NativePaymentComponent",
|
|
10177
|
-
"module": "src/containers/native-payment/native-payment.component.ts"
|
|
10178
|
-
}
|
|
10179
|
-
},
|
|
10180
|
-
{
|
|
10181
|
-
"kind": "custom-element-definition",
|
|
10182
|
-
"name": "primer-native-payment",
|
|
10183
|
-
"declaration": {
|
|
10184
|
-
"name": "NativePaymentComponent",
|
|
10185
|
-
"module": "src/containers/native-payment/native-payment.component.ts"
|
|
10186
|
-
}
|
|
10187
|
-
}
|
|
10188
|
-
]
|
|
10189
|
-
},
|
|
10190
|
-
{
|
|
10191
|
-
"kind": "javascript-module",
|
|
10192
|
-
"path": "src/containers/native-payment/native-payment.styles.ts",
|
|
10193
|
-
"declarations": [],
|
|
10194
|
-
"exports": [
|
|
10195
|
-
{
|
|
10196
|
-
"kind": "js",
|
|
10197
|
-
"name": "default",
|
|
10198
|
-
"declaration": {
|
|
10199
|
-
"module": "src/containers/native-payment/native-payment.styles.ts"
|
|
10200
|
-
}
|
|
10201
|
-
}
|
|
10202
|
-
]
|
|
10203
|
-
},
|
|
10204
|
-
{
|
|
10205
|
-
"kind": "javascript-module",
|
|
10206
|
-
"path": "src/containers/native-payment/native-payment.ts",
|
|
10207
|
-
"declarations": [],
|
|
10208
|
-
"exports": [
|
|
10209
|
-
{
|
|
10210
|
-
"kind": "js",
|
|
10211
|
-
"name": "NativePayment",
|
|
10212
|
-
"declaration": {
|
|
10213
|
-
"name": "NativePaymentComponent",
|
|
10214
|
-
"module": "src/containers/native-payment/native-payment.ts"
|
|
10215
|
-
}
|
|
10216
|
-
}
|
|
10217
|
-
]
|
|
10218
|
-
},
|
|
10219
|
-
{
|
|
10220
|
-
"kind": "javascript-module",
|
|
10221
|
-
"path": "src/containers/payment-method/payment-method.component.ts",
|
|
10222
|
-
"declarations": [
|
|
10223
|
-
{
|
|
10224
|
-
"kind": "class",
|
|
10225
|
-
"description": "",
|
|
10226
|
-
"name": "PaymentMethodComponent",
|
|
10227
|
-
"members": [
|
|
10228
|
-
{
|
|
10229
|
-
"kind": "field",
|
|
10230
|
-
"name": "type",
|
|
10231
|
-
"type": {
|
|
10232
|
-
"text": "PaymentMethodType | undefined"
|
|
10233
|
-
},
|
|
10234
|
-
"default": "undefined",
|
|
10235
|
-
"attribute": "type"
|
|
10236
|
-
},
|
|
10237
|
-
{
|
|
10238
|
-
"kind": "field",
|
|
10239
|
-
"name": "disabled",
|
|
10240
|
-
"type": {
|
|
10241
|
-
"text": "boolean"
|
|
10242
|
-
},
|
|
10243
|
-
"default": "false",
|
|
10244
|
-
"attribute": "disabled"
|
|
10245
|
-
},
|
|
10246
|
-
{
|
|
10247
|
-
"kind": "field",
|
|
10248
|
-
"name": "paymentMethods",
|
|
10249
|
-
"type": {
|
|
10250
|
-
"text": "PaymentMethodsContextType"
|
|
10251
|
-
},
|
|
10252
|
-
"default": "null",
|
|
10253
|
-
"attribute": "paymentMethods"
|
|
10254
|
-
},
|
|
10255
|
-
{
|
|
10256
|
-
"kind": "field",
|
|
10257
|
-
"name": "analyticsUtils",
|
|
10258
|
-
"type": {
|
|
10259
|
-
"text": "AnalyticsContextType"
|
|
10260
|
-
},
|
|
10261
|
-
"default": "null",
|
|
10262
|
-
"description": "Analytics utils for sending analytics events"
|
|
10263
|
-
},
|
|
10264
|
-
{
|
|
10265
|
-
"kind": "method",
|
|
10266
|
-
"name": "sendPaymentMethodSelectionEvent",
|
|
10267
|
-
"privacy": "private",
|
|
10268
|
-
"return": {
|
|
10269
|
-
"type": {
|
|
10270
|
-
"text": "void"
|
|
10271
|
-
}
|
|
10272
|
-
},
|
|
10273
|
-
"description": "Sends PAYMENT_METHOD_SELECTION analytics event when user clicks on payment method"
|
|
10274
|
-
},
|
|
10275
|
-
{
|
|
10276
|
-
"kind": "field",
|
|
10277
|
-
"name": "handleClick",
|
|
10278
|
-
"privacy": "private",
|
|
10279
|
-
"description": "Handle interaction events on payment method component"
|
|
10280
|
-
}
|
|
10281
|
-
],
|
|
10282
|
-
"attributes": [
|
|
10283
|
-
{
|
|
10284
|
-
"name": "type",
|
|
10285
|
-
"type": {
|
|
10286
|
-
"text": "PaymentMethodType | undefined"
|
|
10232
|
+
"description": "Handle interaction events on payment method component"
|
|
10233
|
+
}
|
|
10234
|
+
],
|
|
10235
|
+
"attributes": [
|
|
10236
|
+
{
|
|
10237
|
+
"name": "type",
|
|
10238
|
+
"type": {
|
|
10239
|
+
"text": "PaymentMethodType | undefined"
|
|
10287
10240
|
},
|
|
10288
10241
|
"default": "undefined",
|
|
10289
10242
|
"fieldName": "type"
|
|
@@ -12834,136 +12787,345 @@
|
|
|
12834
12787
|
},
|
|
12835
12788
|
{
|
|
12836
12789
|
"kind": "javascript-module",
|
|
12837
|
-
"path": "src/containers/
|
|
12790
|
+
"path": "src/containers/native-payment/components/index.ts",
|
|
12838
12791
|
"declarations": [],
|
|
12839
12792
|
"exports": [
|
|
12840
12793
|
{
|
|
12841
12794
|
"kind": "js",
|
|
12842
|
-
"name": "
|
|
12843
|
-
"declaration": {
|
|
12844
|
-
"name": "VaultPaymentMethodItem",
|
|
12845
|
-
"package": "@components/containers/vault-manager/components/vault-payment-method-item/vault-payment-method-item"
|
|
12846
|
-
}
|
|
12847
|
-
},
|
|
12848
|
-
{
|
|
12849
|
-
"kind": "js",
|
|
12850
|
-
"name": "VaultManagerHeader",
|
|
12851
|
-
"declaration": {
|
|
12852
|
-
"name": "VaultManagerHeader",
|
|
12853
|
-
"package": "@components/containers/vault-manager/components/vault-manager-header/vault-manager-header"
|
|
12854
|
-
}
|
|
12855
|
-
},
|
|
12856
|
-
{
|
|
12857
|
-
"kind": "js",
|
|
12858
|
-
"name": "VaultDeleteConfirmation",
|
|
12795
|
+
"name": "GooglePay",
|
|
12859
12796
|
"declaration": {
|
|
12860
|
-
"name": "
|
|
12861
|
-
"
|
|
12797
|
+
"name": "GooglePay",
|
|
12798
|
+
"module": "./google-pay/google-pay"
|
|
12862
12799
|
}
|
|
12863
12800
|
},
|
|
12864
12801
|
{
|
|
12865
12802
|
"kind": "js",
|
|
12866
|
-
"name": "
|
|
12803
|
+
"name": "GooglePayComponent",
|
|
12867
12804
|
"declaration": {
|
|
12868
|
-
"name": "
|
|
12869
|
-
"
|
|
12805
|
+
"name": "GooglePayComponent",
|
|
12806
|
+
"module": "./google-pay/google-pay"
|
|
12870
12807
|
}
|
|
12871
12808
|
},
|
|
12872
12809
|
{
|
|
12873
12810
|
"kind": "js",
|
|
12874
|
-
"name": "
|
|
12811
|
+
"name": "ApplePay",
|
|
12875
12812
|
"declaration": {
|
|
12876
|
-
"name": "
|
|
12877
|
-
"
|
|
12813
|
+
"name": "ApplePay",
|
|
12814
|
+
"module": "./apple-pay/apple-pay"
|
|
12878
12815
|
}
|
|
12879
12816
|
},
|
|
12880
12817
|
{
|
|
12881
12818
|
"kind": "js",
|
|
12882
|
-
"name": "
|
|
12819
|
+
"name": "ApplePayComponent",
|
|
12883
12820
|
"declaration": {
|
|
12884
|
-
"name": "
|
|
12885
|
-
"
|
|
12821
|
+
"name": "ApplePayComponent",
|
|
12822
|
+
"module": "./apple-pay/apple-pay"
|
|
12886
12823
|
}
|
|
12887
12824
|
},
|
|
12888
12825
|
{
|
|
12889
12826
|
"kind": "js",
|
|
12890
|
-
"name": "
|
|
12827
|
+
"name": "PayPal",
|
|
12891
12828
|
"declaration": {
|
|
12892
|
-
"name": "
|
|
12893
|
-
"
|
|
12829
|
+
"name": "PayPal",
|
|
12830
|
+
"module": "./paypal/paypal"
|
|
12894
12831
|
}
|
|
12895
12832
|
},
|
|
12896
12833
|
{
|
|
12897
12834
|
"kind": "js",
|
|
12898
|
-
"name": "
|
|
12835
|
+
"name": "PayPalComponent",
|
|
12899
12836
|
"declaration": {
|
|
12900
|
-
"name": "
|
|
12901
|
-
"
|
|
12837
|
+
"name": "PayPalComponent",
|
|
12838
|
+
"module": "./paypal/paypal"
|
|
12902
12839
|
}
|
|
12903
12840
|
}
|
|
12904
12841
|
]
|
|
12905
12842
|
},
|
|
12906
12843
|
{
|
|
12907
12844
|
"kind": "javascript-module",
|
|
12908
|
-
"path": "src/containers/
|
|
12845
|
+
"path": "src/containers/native-payment/utils/button-height.ts",
|
|
12909
12846
|
"declarations": [
|
|
12910
12847
|
{
|
|
12911
12848
|
"kind": "function",
|
|
12912
|
-
"name": "
|
|
12849
|
+
"name": "calculateButtonHeight",
|
|
12913
12850
|
"return": {
|
|
12914
12851
|
"type": {
|
|
12915
|
-
"text": "
|
|
12852
|
+
"text": "number"
|
|
12916
12853
|
}
|
|
12917
12854
|
},
|
|
12918
12855
|
"parameters": [
|
|
12919
12856
|
{
|
|
12920
|
-
"name": "
|
|
12921
|
-
"type": {
|
|
12922
|
-
"text": "VaultedPaymentMethod | null"
|
|
12923
|
-
}
|
|
12924
|
-
},
|
|
12925
|
-
{
|
|
12926
|
-
"name": "headlessUtils",
|
|
12927
|
-
"type": {
|
|
12928
|
-
"text": "HeadlessUtilsContextType"
|
|
12929
|
-
}
|
|
12930
|
-
},
|
|
12931
|
-
{
|
|
12932
|
-
"name": "vaultManager",
|
|
12857
|
+
"name": "element",
|
|
12933
12858
|
"type": {
|
|
12934
|
-
"text": "
|
|
12859
|
+
"text": "HTMLElement"
|
|
12935
12860
|
}
|
|
12936
12861
|
}
|
|
12937
12862
|
],
|
|
12938
|
-
"description": "
|
|
12863
|
+
"description": "Calculates the button height by reading the computed height from the element.\nThe CSS already calculates the correct height using CSS variables,\nso we just read the browser's computed value (which handles rem/em/% conversions)."
|
|
12939
12864
|
},
|
|
12940
12865
|
{
|
|
12941
12866
|
"kind": "function",
|
|
12942
|
-
"name": "
|
|
12867
|
+
"name": "getPayPalConstrainedHeight",
|
|
12943
12868
|
"return": {
|
|
12944
12869
|
"type": {
|
|
12945
|
-
"text": "
|
|
12870
|
+
"text": "number"
|
|
12946
12871
|
}
|
|
12947
12872
|
},
|
|
12948
12873
|
"parameters": [
|
|
12949
12874
|
{
|
|
12950
|
-
"name": "
|
|
12875
|
+
"name": "height",
|
|
12951
12876
|
"type": {
|
|
12952
|
-
"text": "
|
|
12877
|
+
"text": "number"
|
|
12953
12878
|
}
|
|
12954
12879
|
}
|
|
12955
12880
|
],
|
|
12956
|
-
"description": "
|
|
12881
|
+
"description": "Applies PayPal SDK height constraints (25-55px).\nPayPal SDK has strict minimum and maximum height requirements."
|
|
12882
|
+
}
|
|
12883
|
+
],
|
|
12884
|
+
"exports": [
|
|
12885
|
+
{
|
|
12886
|
+
"kind": "js",
|
|
12887
|
+
"name": "calculateButtonHeight",
|
|
12888
|
+
"declaration": {
|
|
12889
|
+
"name": "calculateButtonHeight",
|
|
12890
|
+
"module": "src/containers/native-payment/utils/button-height.ts"
|
|
12891
|
+
}
|
|
12957
12892
|
},
|
|
12958
12893
|
{
|
|
12959
|
-
"kind": "
|
|
12960
|
-
"name": "
|
|
12961
|
-
"
|
|
12962
|
-
"
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12894
|
+
"kind": "js",
|
|
12895
|
+
"name": "getPayPalConstrainedHeight",
|
|
12896
|
+
"declaration": {
|
|
12897
|
+
"name": "getPayPalConstrainedHeight",
|
|
12898
|
+
"module": "src/containers/native-payment/utils/button-height.ts"
|
|
12899
|
+
}
|
|
12900
|
+
}
|
|
12901
|
+
]
|
|
12902
|
+
},
|
|
12903
|
+
{
|
|
12904
|
+
"kind": "javascript-module",
|
|
12905
|
+
"path": "src/containers/native-payment/utils/disabled-overlay.ts",
|
|
12906
|
+
"declarations": [
|
|
12907
|
+
{
|
|
12908
|
+
"kind": "function",
|
|
12909
|
+
"name": "createDisabledOverlay",
|
|
12910
|
+
"return": {
|
|
12911
|
+
"type": {
|
|
12912
|
+
"text": "HTMLDivElement"
|
|
12913
|
+
}
|
|
12914
|
+
},
|
|
12915
|
+
"description": "Creates a disabled overlay element with standard styling."
|
|
12916
|
+
},
|
|
12917
|
+
{
|
|
12918
|
+
"kind": "function",
|
|
12919
|
+
"name": "updateOverlayForContainer",
|
|
12920
|
+
"return": {
|
|
12921
|
+
"type": {
|
|
12922
|
+
"text": "void"
|
|
12923
|
+
}
|
|
12924
|
+
},
|
|
12925
|
+
"parameters": [
|
|
12926
|
+
{
|
|
12927
|
+
"name": "disabled",
|
|
12928
|
+
"type": {
|
|
12929
|
+
"text": "boolean"
|
|
12930
|
+
}
|
|
12931
|
+
},
|
|
12932
|
+
{
|
|
12933
|
+
"name": "containerRef",
|
|
12934
|
+
"type": {
|
|
12935
|
+
"text": "Ref<HTMLDivElement>"
|
|
12936
|
+
}
|
|
12937
|
+
}
|
|
12938
|
+
],
|
|
12939
|
+
"description": "Updates overlay for standard button container rendering.\nRemoves existing overlay and adds new one if disabled is true."
|
|
12940
|
+
},
|
|
12941
|
+
{
|
|
12942
|
+
"kind": "function",
|
|
12943
|
+
"name": "updateOverlayForGooglePay",
|
|
12944
|
+
"return": {
|
|
12945
|
+
"type": {
|
|
12946
|
+
"text": "void"
|
|
12947
|
+
}
|
|
12948
|
+
},
|
|
12949
|
+
"parameters": [
|
|
12950
|
+
{
|
|
12951
|
+
"name": "disabled",
|
|
12952
|
+
"type": {
|
|
12953
|
+
"text": "boolean"
|
|
12954
|
+
}
|
|
12955
|
+
},
|
|
12956
|
+
{
|
|
12957
|
+
"name": "shadowRoot",
|
|
12958
|
+
"type": {
|
|
12959
|
+
"text": "ShadowRoot"
|
|
12960
|
+
}
|
|
12961
|
+
},
|
|
12962
|
+
{
|
|
12963
|
+
"name": "maxRetries",
|
|
12964
|
+
"default": "5"
|
|
12965
|
+
}
|
|
12966
|
+
],
|
|
12967
|
+
"description": "Updates overlay for Google Pay shadow root rendering (with retry logic).\nGoogle Pay renders asynchronously, so we retry if button is not ready."
|
|
12968
|
+
}
|
|
12969
|
+
],
|
|
12970
|
+
"exports": [
|
|
12971
|
+
{
|
|
12972
|
+
"kind": "js",
|
|
12973
|
+
"name": "createDisabledOverlay",
|
|
12974
|
+
"declaration": {
|
|
12975
|
+
"name": "createDisabledOverlay",
|
|
12976
|
+
"module": "src/containers/native-payment/utils/disabled-overlay.ts"
|
|
12977
|
+
}
|
|
12978
|
+
},
|
|
12979
|
+
{
|
|
12980
|
+
"kind": "js",
|
|
12981
|
+
"name": "updateOverlayForContainer",
|
|
12982
|
+
"declaration": {
|
|
12983
|
+
"name": "updateOverlayForContainer",
|
|
12984
|
+
"module": "src/containers/native-payment/utils/disabled-overlay.ts"
|
|
12985
|
+
}
|
|
12986
|
+
},
|
|
12987
|
+
{
|
|
12988
|
+
"kind": "js",
|
|
12989
|
+
"name": "updateOverlayForGooglePay",
|
|
12990
|
+
"declaration": {
|
|
12991
|
+
"name": "updateOverlayForGooglePay",
|
|
12992
|
+
"module": "src/containers/native-payment/utils/disabled-overlay.ts"
|
|
12993
|
+
}
|
|
12994
|
+
}
|
|
12995
|
+
]
|
|
12996
|
+
},
|
|
12997
|
+
{
|
|
12998
|
+
"kind": "javascript-module",
|
|
12999
|
+
"path": "src/containers/vault-manager/components/index.ts",
|
|
13000
|
+
"declarations": [],
|
|
13001
|
+
"exports": [
|
|
13002
|
+
{
|
|
13003
|
+
"kind": "js",
|
|
13004
|
+
"name": "VaultPaymentMethodItem",
|
|
13005
|
+
"declaration": {
|
|
13006
|
+
"name": "VaultPaymentMethodItem",
|
|
13007
|
+
"package": "@components/containers/vault-manager/components/vault-payment-method-item/vault-payment-method-item"
|
|
13008
|
+
}
|
|
13009
|
+
},
|
|
13010
|
+
{
|
|
13011
|
+
"kind": "js",
|
|
13012
|
+
"name": "VaultManagerHeader",
|
|
13013
|
+
"declaration": {
|
|
13014
|
+
"name": "VaultManagerHeader",
|
|
13015
|
+
"package": "@components/containers/vault-manager/components/vault-manager-header/vault-manager-header"
|
|
13016
|
+
}
|
|
13017
|
+
},
|
|
13018
|
+
{
|
|
13019
|
+
"kind": "js",
|
|
13020
|
+
"name": "VaultDeleteConfirmation",
|
|
13021
|
+
"declaration": {
|
|
13022
|
+
"name": "VaultDeleteConfirmation",
|
|
13023
|
+
"package": "@components/containers/vault-manager/components/vault-delete-confirmation/vault-delete-confirmation"
|
|
13024
|
+
}
|
|
13025
|
+
},
|
|
13026
|
+
{
|
|
13027
|
+
"kind": "js",
|
|
13028
|
+
"name": "VaultEmptyState",
|
|
13029
|
+
"declaration": {
|
|
13030
|
+
"name": "VaultEmptyState",
|
|
13031
|
+
"package": "@components/containers/vault-manager/components/vault-empty-state/vault-empty-state"
|
|
13032
|
+
}
|
|
13033
|
+
},
|
|
13034
|
+
{
|
|
13035
|
+
"kind": "js",
|
|
13036
|
+
"name": "VaultErrorMessage",
|
|
13037
|
+
"declaration": {
|
|
13038
|
+
"name": "VaultErrorMessage",
|
|
13039
|
+
"package": "@components/containers/vault-manager/components/vault-error-message/vault-error-message"
|
|
13040
|
+
}
|
|
13041
|
+
},
|
|
13042
|
+
{
|
|
13043
|
+
"kind": "js",
|
|
13044
|
+
"name": "VaultPaymentSubmit",
|
|
13045
|
+
"declaration": {
|
|
13046
|
+
"name": "VaultPaymentSubmit",
|
|
13047
|
+
"package": "@components/containers/vault-manager/components/vault-payment-submit/vault-payment-submit"
|
|
13048
|
+
}
|
|
13049
|
+
},
|
|
13050
|
+
{
|
|
13051
|
+
"kind": "js",
|
|
13052
|
+
"name": "VaultCvvInput",
|
|
13053
|
+
"declaration": {
|
|
13054
|
+
"name": "VaultCvvInput",
|
|
13055
|
+
"package": "@components/containers/vault-manager/components/vault-cvv-input/vault-cvv-input"
|
|
13056
|
+
}
|
|
13057
|
+
},
|
|
13058
|
+
{
|
|
13059
|
+
"kind": "js",
|
|
13060
|
+
"name": "PaymentMethodContentComponent",
|
|
13061
|
+
"declaration": {
|
|
13062
|
+
"name": "PaymentMethodContentComponent",
|
|
13063
|
+
"package": "@components/containers/vault-manager/components/payment-method-content/payment-method-content"
|
|
13064
|
+
}
|
|
13065
|
+
}
|
|
13066
|
+
]
|
|
13067
|
+
},
|
|
13068
|
+
{
|
|
13069
|
+
"kind": "javascript-module",
|
|
13070
|
+
"path": "src/containers/vault-manager/utils/formatters.ts",
|
|
13071
|
+
"declarations": [
|
|
13072
|
+
{
|
|
13073
|
+
"kind": "function",
|
|
13074
|
+
"name": "getPaymentMethodAssetConfig",
|
|
13075
|
+
"return": {
|
|
13076
|
+
"type": {
|
|
13077
|
+
"text": "Promise<AssetConfig & { shouldShowCVV: boolean }>"
|
|
13078
|
+
}
|
|
13079
|
+
},
|
|
13080
|
+
"parameters": [
|
|
13081
|
+
{
|
|
13082
|
+
"name": "paymentMethod",
|
|
13083
|
+
"type": {
|
|
13084
|
+
"text": "VaultedPaymentMethod | null"
|
|
13085
|
+
}
|
|
13086
|
+
},
|
|
13087
|
+
{
|
|
13088
|
+
"name": "headlessUtils",
|
|
13089
|
+
"type": {
|
|
13090
|
+
"text": "HeadlessUtilsContextType"
|
|
13091
|
+
}
|
|
13092
|
+
},
|
|
13093
|
+
{
|
|
13094
|
+
"name": "vaultManager",
|
|
13095
|
+
"type": {
|
|
13096
|
+
"text": "VaultManagerContextType"
|
|
13097
|
+
}
|
|
13098
|
+
}
|
|
13099
|
+
],
|
|
13100
|
+
"description": "Get payment method asset configuration for a payment method including icon and display data"
|
|
13101
|
+
},
|
|
13102
|
+
{
|
|
13103
|
+
"kind": "function",
|
|
13104
|
+
"name": "toTitleCase",
|
|
13105
|
+
"return": {
|
|
13106
|
+
"type": {
|
|
13107
|
+
"text": "string"
|
|
13108
|
+
}
|
|
13109
|
+
},
|
|
13110
|
+
"parameters": [
|
|
13111
|
+
{
|
|
13112
|
+
"name": "text",
|
|
13113
|
+
"type": {
|
|
13114
|
+
"text": "string"
|
|
13115
|
+
}
|
|
13116
|
+
}
|
|
13117
|
+
],
|
|
13118
|
+
"description": "Format text to title case (first letter uppercase, rest lowercase)"
|
|
13119
|
+
},
|
|
13120
|
+
{
|
|
13121
|
+
"kind": "function",
|
|
13122
|
+
"name": "formatCardNetworkName",
|
|
13123
|
+
"return": {
|
|
13124
|
+
"type": {
|
|
13125
|
+
"text": "string"
|
|
13126
|
+
}
|
|
13127
|
+
},
|
|
13128
|
+
"parameters": [
|
|
12967
13129
|
{
|
|
12968
13130
|
"name": "network",
|
|
12969
13131
|
"optional": true,
|
|
@@ -15237,195 +15399,445 @@
|
|
|
15237
15399
|
},
|
|
15238
15400
|
{
|
|
15239
15401
|
"kind": "javascript-module",
|
|
15240
|
-
"path": "src/containers/
|
|
15402
|
+
"path": "src/containers/native-payment/components/apple-pay/apple-pay.component.ts",
|
|
15241
15403
|
"declarations": [
|
|
15242
15404
|
{
|
|
15243
15405
|
"kind": "class",
|
|
15244
|
-
"description": "
|
|
15245
|
-
"name": "
|
|
15406
|
+
"description": "Apple Pay component with standard button container rendering.\n\nApple Pay uses the standard button container approach:\n- Renders to a button container div (not shadow root)\n- Passes buttonHeight in render options\n- Uses updateOverlayForContainer for disabled state\n- Simpler than Google Pay's shadow root approach",
|
|
15407
|
+
"name": "ApplePayComponent",
|
|
15246
15408
|
"members": [
|
|
15247
15409
|
{
|
|
15248
15410
|
"kind": "field",
|
|
15249
|
-
"name": "
|
|
15411
|
+
"name": "paymentMethod",
|
|
15250
15412
|
"type": {
|
|
15251
|
-
"text": "
|
|
15413
|
+
"text": "InitializedPaymentMethod | undefined"
|
|
15252
15414
|
},
|
|
15253
|
-
"
|
|
15254
|
-
"description": "Form context for checking form dirty state"
|
|
15415
|
+
"attribute": "paymentMethod"
|
|
15255
15416
|
},
|
|
15256
15417
|
{
|
|
15257
15418
|
"kind": "field",
|
|
15258
|
-
"name": "
|
|
15419
|
+
"name": "paymentManagers",
|
|
15259
15420
|
"type": {
|
|
15260
|
-
"text": "
|
|
15421
|
+
"text": "InitializedManagersMap"
|
|
15261
15422
|
},
|
|
15262
|
-
"default": "
|
|
15263
|
-
"
|
|
15423
|
+
"default": "new Map()",
|
|
15424
|
+
"attribute": "paymentManagers"
|
|
15264
15425
|
},
|
|
15265
15426
|
{
|
|
15266
15427
|
"kind": "field",
|
|
15267
|
-
"name": "
|
|
15428
|
+
"name": "disabled",
|
|
15268
15429
|
"type": {
|
|
15269
|
-
"text": "
|
|
15430
|
+
"text": "boolean"
|
|
15270
15431
|
},
|
|
15271
|
-
"default": "
|
|
15272
|
-
"attribute": "
|
|
15432
|
+
"default": "false",
|
|
15433
|
+
"attribute": "disabled"
|
|
15273
15434
|
},
|
|
15274
15435
|
{
|
|
15275
15436
|
"kind": "field",
|
|
15276
|
-
"name": "
|
|
15437
|
+
"name": "buttonContainerRef",
|
|
15277
15438
|
"type": {
|
|
15278
|
-
"text": "
|
|
15439
|
+
"text": "Ref<HTMLDivElement>"
|
|
15279
15440
|
},
|
|
15280
|
-
"
|
|
15281
|
-
"attribute": "paymentMethod"
|
|
15441
|
+
"privacy": "private"
|
|
15282
15442
|
},
|
|
15283
15443
|
{
|
|
15284
15444
|
"kind": "field",
|
|
15285
|
-
"name": "
|
|
15445
|
+
"name": "loadManagerTask",
|
|
15286
15446
|
"type": {
|
|
15287
|
-
"text": "
|
|
15447
|
+
"text": "Task<\n [NativePaymentMethodTypes | undefined],\n INativePaymentMethodManager\n >"
|
|
15288
15448
|
},
|
|
15289
15449
|
"privacy": "private",
|
|
15290
|
-
"default": "
|
|
15450
|
+
"default": "new Task(this, { args: () => [ this.paymentMethod?.type as NativePaymentMethodTypes | undefined, ], task: ([type]) => { if (!type) { return initialState; } const manager = this.paymentManagers.get(type)?.manager; if (!manager) { throw new Error(`No manager found for payment method type ${type}`); } return manager; }, })"
|
|
15291
15451
|
},
|
|
15292
15452
|
{
|
|
15293
15453
|
"kind": "field",
|
|
15294
|
-
"name": "
|
|
15454
|
+
"name": "renderButtonTask",
|
|
15295
15455
|
"type": {
|
|
15296
|
-
"text": "
|
|
15456
|
+
"text": "Task<\n [INativePaymentMethodManager | undefined],\n IHeadlessPaymentMethodButton | undefined\n >"
|
|
15297
15457
|
},
|
|
15298
15458
|
"privacy": "private",
|
|
15299
|
-
"default": "
|
|
15300
|
-
}
|
|
15459
|
+
"default": "new Task(this, { args: () => [this.loadManagerTask.value], task: async ([manager]) => { if (!manager) { return initialState; } // Ensure the component's DOM is updated await this.updateComplete; const buttonContainer = this.buttonContainerRef.value; if (!buttonContainer) { throw new Error('Button container not found'); } const button = manager.createButton(); // Calculate button height from the container const buttonHeight = calculateButtonHeight(buttonContainer); // Render to button container with height await button.render(buttonContainer as Element, { style: { buttonHeight, }, }); // Apply current disabled state to newly created button if (this.disabled) { await button.setDisabled(this.disabled); } // Apply disabled overlay if needed if (this.disabled) { await this.updateComplete; updateOverlayForContainer(this.disabled, this.buttonContainerRef); } return button; }, })"
|
|
15460
|
+
}
|
|
15461
|
+
],
|
|
15462
|
+
"attributes": [
|
|
15301
15463
|
{
|
|
15302
|
-
"
|
|
15303
|
-
"
|
|
15464
|
+
"name": "paymentMethod",
|
|
15465
|
+
"type": {
|
|
15466
|
+
"text": "InitializedPaymentMethod | undefined"
|
|
15467
|
+
},
|
|
15468
|
+
"fieldName": "paymentMethod"
|
|
15469
|
+
},
|
|
15470
|
+
{
|
|
15471
|
+
"name": "paymentManagers",
|
|
15472
|
+
"type": {
|
|
15473
|
+
"text": "InitializedManagersMap"
|
|
15474
|
+
},
|
|
15475
|
+
"default": "new Map()",
|
|
15476
|
+
"fieldName": "paymentManagers"
|
|
15477
|
+
},
|
|
15478
|
+
{
|
|
15479
|
+
"name": "disabled",
|
|
15304
15480
|
"type": {
|
|
15305
15481
|
"text": "boolean"
|
|
15306
15482
|
},
|
|
15307
|
-
"
|
|
15308
|
-
"
|
|
15483
|
+
"default": "false",
|
|
15484
|
+
"fieldName": "disabled"
|
|
15485
|
+
}
|
|
15486
|
+
],
|
|
15487
|
+
"superclass": {
|
|
15488
|
+
"name": "LitElement",
|
|
15489
|
+
"package": "lit"
|
|
15490
|
+
},
|
|
15491
|
+
"tagName": "primer-apple-pay",
|
|
15492
|
+
"customElement": true
|
|
15493
|
+
}
|
|
15494
|
+
],
|
|
15495
|
+
"exports": [
|
|
15496
|
+
{
|
|
15497
|
+
"kind": "js",
|
|
15498
|
+
"name": "ApplePayComponent",
|
|
15499
|
+
"declaration": {
|
|
15500
|
+
"name": "ApplePayComponent",
|
|
15501
|
+
"module": "src/containers/native-payment/components/apple-pay/apple-pay.component.ts"
|
|
15502
|
+
}
|
|
15503
|
+
},
|
|
15504
|
+
{
|
|
15505
|
+
"kind": "custom-element-definition",
|
|
15506
|
+
"name": "primer-apple-pay",
|
|
15507
|
+
"declaration": {
|
|
15508
|
+
"name": "ApplePayComponent",
|
|
15509
|
+
"module": "src/containers/native-payment/components/apple-pay/apple-pay.component.ts"
|
|
15510
|
+
}
|
|
15511
|
+
}
|
|
15512
|
+
]
|
|
15513
|
+
},
|
|
15514
|
+
{
|
|
15515
|
+
"kind": "javascript-module",
|
|
15516
|
+
"path": "src/containers/native-payment/components/apple-pay/apple-pay.styles.ts",
|
|
15517
|
+
"declarations": [],
|
|
15518
|
+
"exports": [
|
|
15519
|
+
{
|
|
15520
|
+
"kind": "js",
|
|
15521
|
+
"name": "default",
|
|
15522
|
+
"declaration": {
|
|
15523
|
+
"module": "src/containers/native-payment/components/apple-pay/apple-pay.styles.ts"
|
|
15524
|
+
}
|
|
15525
|
+
}
|
|
15526
|
+
]
|
|
15527
|
+
},
|
|
15528
|
+
{
|
|
15529
|
+
"kind": "javascript-module",
|
|
15530
|
+
"path": "src/containers/native-payment/components/apple-pay/apple-pay.ts",
|
|
15531
|
+
"declarations": [],
|
|
15532
|
+
"exports": [
|
|
15533
|
+
{
|
|
15534
|
+
"kind": "js",
|
|
15535
|
+
"name": "ApplePayComponent",
|
|
15536
|
+
"declaration": {
|
|
15537
|
+
"name": "ApplePayComponent",
|
|
15538
|
+
"module": "src/containers/native-payment/components/apple-pay/apple-pay.ts"
|
|
15539
|
+
}
|
|
15540
|
+
},
|
|
15541
|
+
{
|
|
15542
|
+
"kind": "js",
|
|
15543
|
+
"name": "ApplePay",
|
|
15544
|
+
"declaration": {
|
|
15545
|
+
"name": "ApplePayComponent",
|
|
15546
|
+
"module": "src/containers/native-payment/components/apple-pay/apple-pay.ts"
|
|
15547
|
+
}
|
|
15548
|
+
}
|
|
15549
|
+
]
|
|
15550
|
+
},
|
|
15551
|
+
{
|
|
15552
|
+
"kind": "javascript-module",
|
|
15553
|
+
"path": "src/containers/native-payment/components/google-pay/google-pay.component.ts",
|
|
15554
|
+
"declarations": [
|
|
15555
|
+
{
|
|
15556
|
+
"kind": "class",
|
|
15557
|
+
"description": "Google Pay component with shadow root rendering for full-width button support.\n\nGoogle Pay requires special rendering logic:\n- Renders directly to shadow root (not button container)\n- Does NOT render .native-button-container div\n- Passes shadowRoot: true in render options\n- Requires retry logic for async button rendering",
|
|
15558
|
+
"name": "GooglePayComponent",
|
|
15559
|
+
"members": [
|
|
15560
|
+
{
|
|
15561
|
+
"kind": "field",
|
|
15562
|
+
"name": "paymentMethod",
|
|
15563
|
+
"type": {
|
|
15564
|
+
"text": "InitializedPaymentMethod | undefined"
|
|
15565
|
+
},
|
|
15566
|
+
"attribute": "paymentMethod"
|
|
15309
15567
|
},
|
|
15310
15568
|
{
|
|
15311
15569
|
"kind": "field",
|
|
15312
|
-
"name": "
|
|
15570
|
+
"name": "paymentManagers",
|
|
15313
15571
|
"type": {
|
|
15314
|
-
"text": "
|
|
15572
|
+
"text": "InitializedManagersMap"
|
|
15315
15573
|
},
|
|
15316
|
-
"
|
|
15317
|
-
"
|
|
15574
|
+
"default": "new Map()",
|
|
15575
|
+
"attribute": "paymentManagers"
|
|
15318
15576
|
},
|
|
15319
15577
|
{
|
|
15320
15578
|
"kind": "field",
|
|
15321
|
-
"name": "
|
|
15579
|
+
"name": "disabled",
|
|
15322
15580
|
"type": {
|
|
15323
15581
|
"text": "boolean"
|
|
15324
15582
|
},
|
|
15325
|
-
"
|
|
15326
|
-
"
|
|
15583
|
+
"default": "false",
|
|
15584
|
+
"attribute": "disabled"
|
|
15327
15585
|
},
|
|
15328
15586
|
{
|
|
15329
15587
|
"kind": "field",
|
|
15330
|
-
"name": "
|
|
15588
|
+
"name": "loadManagerTask",
|
|
15331
15589
|
"type": {
|
|
15332
|
-
"text": "
|
|
15590
|
+
"text": "Task<\n [NativePaymentMethodTypes | undefined],\n INativePaymentMethodManager\n >"
|
|
15333
15591
|
},
|
|
15334
15592
|
"privacy": "private",
|
|
15335
|
-
"
|
|
15336
|
-
"description": "Unique ID for the CVV input container",
|
|
15337
|
-
"default": "`cvv-container-${Math.random().toString(36).substring(2, 9)}`"
|
|
15593
|
+
"default": "new Task(this, { args: () => [ this.paymentMethod?.type as NativePaymentMethodTypes | undefined, ], task: ([type]) => { if (!type) { return initialState; } const manager = this.paymentManagers.get(type)?.manager; if (!manager) { throw new Error(`No manager found for payment method type ${type}`); } return manager; }, })"
|
|
15338
15594
|
},
|
|
15339
15595
|
{
|
|
15340
15596
|
"kind": "field",
|
|
15341
|
-
"name": "
|
|
15597
|
+
"name": "renderButtonTask",
|
|
15598
|
+
"type": {
|
|
15599
|
+
"text": "Task<\n [INativePaymentMethodManager | undefined],\n IHeadlessPaymentMethodButton | undefined\n >"
|
|
15600
|
+
},
|
|
15342
15601
|
"privacy": "private",
|
|
15343
|
-
"default": "new Task(this, {
|
|
15344
|
-
}
|
|
15602
|
+
"default": "new Task(this, { args: () => [this.loadManagerTask.value], task: async ([manager]) => { if (!manager) { return initialState; } // Ensure the component's DOM is updated await this.updateComplete; const button = manager.createButton(); // Render to shadow root for full-width support await button.render(this.shadowRoot?.getRootNode() as Element, { style: { shadowRoot: true, // Google Pay doesn't use buttonHeight }, }); // Apply current disabled state to newly created button if (this.disabled) { await button.setDisabled(this.disabled); } // Apply disabled overlay if needed if (this.disabled && this.shadowRoot) { await this.updateComplete; updateOverlayForGooglePay(this.disabled, this.shadowRoot); } return button; }, })"
|
|
15603
|
+
}
|
|
15604
|
+
],
|
|
15605
|
+
"attributes": [
|
|
15345
15606
|
{
|
|
15346
|
-
"
|
|
15347
|
-
"
|
|
15348
|
-
|
|
15607
|
+
"name": "paymentMethod",
|
|
15608
|
+
"type": {
|
|
15609
|
+
"text": "InitializedPaymentMethod | undefined"
|
|
15610
|
+
},
|
|
15611
|
+
"fieldName": "paymentMethod"
|
|
15349
15612
|
},
|
|
15350
15613
|
{
|
|
15351
|
-
"
|
|
15352
|
-
"
|
|
15614
|
+
"name": "paymentManagers",
|
|
15615
|
+
"type": {
|
|
15616
|
+
"text": "InitializedManagersMap"
|
|
15617
|
+
},
|
|
15618
|
+
"default": "new Map()",
|
|
15619
|
+
"fieldName": "paymentManagers"
|
|
15353
15620
|
},
|
|
15354
15621
|
{
|
|
15355
|
-
"
|
|
15356
|
-
"
|
|
15622
|
+
"name": "disabled",
|
|
15623
|
+
"type": {
|
|
15624
|
+
"text": "boolean"
|
|
15625
|
+
},
|
|
15626
|
+
"default": "false",
|
|
15627
|
+
"fieldName": "disabled"
|
|
15357
15628
|
}
|
|
15358
15629
|
],
|
|
15359
|
-
"
|
|
15630
|
+
"superclass": {
|
|
15631
|
+
"name": "LitElement",
|
|
15632
|
+
"package": "lit"
|
|
15633
|
+
},
|
|
15634
|
+
"tagName": "primer-google-pay",
|
|
15635
|
+
"customElement": true
|
|
15636
|
+
}
|
|
15637
|
+
],
|
|
15638
|
+
"exports": [
|
|
15639
|
+
{
|
|
15640
|
+
"kind": "js",
|
|
15641
|
+
"name": "GooglePayComponent",
|
|
15642
|
+
"declaration": {
|
|
15643
|
+
"name": "GooglePayComponent",
|
|
15644
|
+
"module": "src/containers/native-payment/components/google-pay/google-pay.component.ts"
|
|
15645
|
+
}
|
|
15646
|
+
},
|
|
15647
|
+
{
|
|
15648
|
+
"kind": "custom-element-definition",
|
|
15649
|
+
"name": "primer-google-pay",
|
|
15650
|
+
"declaration": {
|
|
15651
|
+
"name": "GooglePayComponent",
|
|
15652
|
+
"module": "src/containers/native-payment/components/google-pay/google-pay.component.ts"
|
|
15653
|
+
}
|
|
15654
|
+
}
|
|
15655
|
+
]
|
|
15656
|
+
},
|
|
15657
|
+
{
|
|
15658
|
+
"kind": "javascript-module",
|
|
15659
|
+
"path": "src/containers/native-payment/components/google-pay/google-pay.styles.ts",
|
|
15660
|
+
"declarations": [],
|
|
15661
|
+
"exports": [
|
|
15662
|
+
{
|
|
15663
|
+
"kind": "js",
|
|
15664
|
+
"name": "default",
|
|
15665
|
+
"declaration": {
|
|
15666
|
+
"module": "src/containers/native-payment/components/google-pay/google-pay.styles.ts"
|
|
15667
|
+
}
|
|
15668
|
+
}
|
|
15669
|
+
]
|
|
15670
|
+
},
|
|
15671
|
+
{
|
|
15672
|
+
"kind": "javascript-module",
|
|
15673
|
+
"path": "src/containers/native-payment/components/google-pay/google-pay.ts",
|
|
15674
|
+
"declarations": [],
|
|
15675
|
+
"exports": [
|
|
15676
|
+
{
|
|
15677
|
+
"kind": "js",
|
|
15678
|
+
"name": "GooglePayComponent",
|
|
15679
|
+
"declaration": {
|
|
15680
|
+
"name": "GooglePayComponent",
|
|
15681
|
+
"module": "src/containers/native-payment/components/google-pay/google-pay.ts"
|
|
15682
|
+
}
|
|
15683
|
+
},
|
|
15684
|
+
{
|
|
15685
|
+
"kind": "js",
|
|
15686
|
+
"name": "GooglePay",
|
|
15687
|
+
"declaration": {
|
|
15688
|
+
"name": "GooglePayComponent",
|
|
15689
|
+
"module": "src/containers/native-payment/components/google-pay/google-pay.ts"
|
|
15690
|
+
}
|
|
15691
|
+
}
|
|
15692
|
+
]
|
|
15693
|
+
},
|
|
15694
|
+
{
|
|
15695
|
+
"kind": "javascript-module",
|
|
15696
|
+
"path": "src/containers/native-payment/components/paypal/paypal.component.ts",
|
|
15697
|
+
"declarations": [
|
|
15698
|
+
{
|
|
15699
|
+
"kind": "class",
|
|
15700
|
+
"description": "PayPal component with standard button container rendering.\n\nPayPal uses the standard button container approach:\n- Renders to a button container div (not shadow root)\n- Passes buttonHeight in render options with PayPal SDK constraints (25-55px)\n- Uses updateOverlayForContainer for disabled state\n- Warns if height exceeds maximum allowed by PayPal SDK",
|
|
15701
|
+
"name": "PayPalComponent",
|
|
15702
|
+
"members": [
|
|
15360
15703
|
{
|
|
15361
|
-
"
|
|
15704
|
+
"kind": "field",
|
|
15705
|
+
"name": "paymentMethod",
|
|
15362
15706
|
"type": {
|
|
15363
|
-
"text": "
|
|
15707
|
+
"text": "InitializedPaymentMethod | undefined"
|
|
15364
15708
|
},
|
|
15365
|
-
"
|
|
15366
|
-
"fieldName": "computedStyles"
|
|
15709
|
+
"attribute": "paymentMethod"
|
|
15367
15710
|
},
|
|
15711
|
+
{
|
|
15712
|
+
"kind": "field",
|
|
15713
|
+
"name": "paymentManagers",
|
|
15714
|
+
"type": {
|
|
15715
|
+
"text": "InitializedManagersMap"
|
|
15716
|
+
},
|
|
15717
|
+
"default": "new Map()",
|
|
15718
|
+
"attribute": "paymentManagers"
|
|
15719
|
+
},
|
|
15720
|
+
{
|
|
15721
|
+
"kind": "field",
|
|
15722
|
+
"name": "disabled",
|
|
15723
|
+
"type": {
|
|
15724
|
+
"text": "boolean"
|
|
15725
|
+
},
|
|
15726
|
+
"default": "false",
|
|
15727
|
+
"attribute": "disabled"
|
|
15728
|
+
},
|
|
15729
|
+
{
|
|
15730
|
+
"kind": "field",
|
|
15731
|
+
"name": "buttonContainerRef",
|
|
15732
|
+
"type": {
|
|
15733
|
+
"text": "Ref<HTMLDivElement>"
|
|
15734
|
+
},
|
|
15735
|
+
"privacy": "private"
|
|
15736
|
+
},
|
|
15737
|
+
{
|
|
15738
|
+
"kind": "field",
|
|
15739
|
+
"name": "loadManagerTask",
|
|
15740
|
+
"type": {
|
|
15741
|
+
"text": "Task<\n [NativePaymentMethodTypes | undefined],\n INativePaymentMethodManager\n >"
|
|
15742
|
+
},
|
|
15743
|
+
"privacy": "private",
|
|
15744
|
+
"default": "new Task(this, { args: () => [ this.paymentMethod?.type as NativePaymentMethodTypes | undefined, ], task: ([type]) => { if (!type) { return initialState; } const manager = this.paymentManagers.get(type)?.manager; if (!manager) { throw new Error(`No manager found for payment method type ${type}`); } return manager; }, })"
|
|
15745
|
+
},
|
|
15746
|
+
{
|
|
15747
|
+
"kind": "field",
|
|
15748
|
+
"name": "renderButtonTask",
|
|
15749
|
+
"type": {
|
|
15750
|
+
"text": "Task<\n [INativePaymentMethodManager | undefined],\n IHeadlessPaymentMethodButton | undefined\n >"
|
|
15751
|
+
},
|
|
15752
|
+
"privacy": "private",
|
|
15753
|
+
"default": "new Task(this, { args: () => [this.loadManagerTask.value], task: async ([manager]) => { if (!manager) { return initialState; } // Ensure the component's DOM is updated await this.updateComplete; const buttonContainer = this.buttonContainerRef.value; if (!buttonContainer) { throw new Error('Button container not found'); } const button = manager.createButton(); // Calculate button height from the container const buttonHeight = calculateButtonHeight(buttonContainer); // Apply PayPal SDK height constraints (25-55px) const constrainedHeight = getPayPalConstrainedHeight(buttonHeight); // Warn if height exceeds maximum const PAYPAL_MAX_HEIGHT = 55; if (buttonHeight > PAYPAL_MAX_HEIGHT) { PrimerJSLogger.warn( `PayPal button height (${buttonHeight}px) exceeds maximum allowed height of ${PAYPAL_MAX_HEIGHT}px. Button will be capped at ${PAYPAL_MAX_HEIGHT}px. This is a PayPal SDK limitation.`, ); } // Render to button container with constrained height await button.render(buttonContainer as Element, { style: { buttonHeight: constrainedHeight, }, }); // Apply current disabled state to newly created button if (this.disabled) { await button.setDisabled(this.disabled); } // Apply disabled overlay if needed if (this.disabled) { await this.updateComplete; updateOverlayForContainer(this.disabled, this.buttonContainerRef); } return button; }, })"
|
|
15754
|
+
}
|
|
15755
|
+
],
|
|
15756
|
+
"attributes": [
|
|
15368
15757
|
{
|
|
15369
15758
|
"name": "paymentMethod",
|
|
15370
15759
|
"type": {
|
|
15371
|
-
"text": "
|
|
15760
|
+
"text": "InitializedPaymentMethod | undefined"
|
|
15372
15761
|
},
|
|
15373
|
-
"default": "null",
|
|
15374
15762
|
"fieldName": "paymentMethod"
|
|
15763
|
+
},
|
|
15764
|
+
{
|
|
15765
|
+
"name": "paymentManagers",
|
|
15766
|
+
"type": {
|
|
15767
|
+
"text": "InitializedManagersMap"
|
|
15768
|
+
},
|
|
15769
|
+
"default": "new Map()",
|
|
15770
|
+
"fieldName": "paymentManagers"
|
|
15771
|
+
},
|
|
15772
|
+
{
|
|
15773
|
+
"name": "disabled",
|
|
15774
|
+
"type": {
|
|
15775
|
+
"text": "boolean"
|
|
15776
|
+
},
|
|
15777
|
+
"default": "false",
|
|
15778
|
+
"fieldName": "disabled"
|
|
15375
15779
|
}
|
|
15376
15780
|
],
|
|
15377
15781
|
"superclass": {
|
|
15378
15782
|
"name": "LitElement",
|
|
15379
15783
|
"package": "lit"
|
|
15380
15784
|
},
|
|
15381
|
-
"tagName": "primer-
|
|
15785
|
+
"tagName": "primer-paypal",
|
|
15382
15786
|
"customElement": true
|
|
15383
15787
|
}
|
|
15384
15788
|
],
|
|
15385
15789
|
"exports": [
|
|
15386
15790
|
{
|
|
15387
15791
|
"kind": "js",
|
|
15388
|
-
"name": "
|
|
15792
|
+
"name": "PayPalComponent",
|
|
15389
15793
|
"declaration": {
|
|
15390
|
-
"name": "
|
|
15391
|
-
"module": "src/containers/
|
|
15794
|
+
"name": "PayPalComponent",
|
|
15795
|
+
"module": "src/containers/native-payment/components/paypal/paypal.component.ts"
|
|
15392
15796
|
}
|
|
15393
15797
|
},
|
|
15394
15798
|
{
|
|
15395
15799
|
"kind": "custom-element-definition",
|
|
15396
|
-
"name": "primer-
|
|
15800
|
+
"name": "primer-paypal",
|
|
15397
15801
|
"declaration": {
|
|
15398
|
-
"name": "
|
|
15399
|
-
"module": "src/containers/
|
|
15802
|
+
"name": "PayPalComponent",
|
|
15803
|
+
"module": "src/containers/native-payment/components/paypal/paypal.component.ts"
|
|
15400
15804
|
}
|
|
15401
15805
|
}
|
|
15402
15806
|
]
|
|
15403
15807
|
},
|
|
15404
15808
|
{
|
|
15405
15809
|
"kind": "javascript-module",
|
|
15406
|
-
"path": "src/containers/
|
|
15810
|
+
"path": "src/containers/native-payment/components/paypal/paypal.styles.ts",
|
|
15407
15811
|
"declarations": [],
|
|
15408
15812
|
"exports": [
|
|
15409
15813
|
{
|
|
15410
15814
|
"kind": "js",
|
|
15411
15815
|
"name": "default",
|
|
15412
15816
|
"declaration": {
|
|
15413
|
-
"module": "src/containers/
|
|
15817
|
+
"module": "src/containers/native-payment/components/paypal/paypal.styles.ts"
|
|
15414
15818
|
}
|
|
15415
15819
|
}
|
|
15416
15820
|
]
|
|
15417
15821
|
},
|
|
15418
15822
|
{
|
|
15419
15823
|
"kind": "javascript-module",
|
|
15420
|
-
"path": "src/containers/
|
|
15824
|
+
"path": "src/containers/native-payment/components/paypal/paypal.ts",
|
|
15421
15825
|
"declarations": [],
|
|
15422
15826
|
"exports": [
|
|
15423
15827
|
{
|
|
15424
15828
|
"kind": "js",
|
|
15425
|
-
"name": "
|
|
15829
|
+
"name": "PayPalComponent",
|
|
15426
15830
|
"declaration": {
|
|
15427
|
-
"name": "
|
|
15428
|
-
"module": "src/containers/
|
|
15831
|
+
"name": "PayPalComponent",
|
|
15832
|
+
"module": "src/containers/native-payment/components/paypal/paypal.ts"
|
|
15833
|
+
}
|
|
15834
|
+
},
|
|
15835
|
+
{
|
|
15836
|
+
"kind": "js",
|
|
15837
|
+
"name": "PayPal",
|
|
15838
|
+
"declaration": {
|
|
15839
|
+
"name": "PayPalComponent",
|
|
15840
|
+
"module": "src/containers/native-payment/components/paypal/paypal.ts"
|
|
15429
15841
|
}
|
|
15430
15842
|
}
|
|
15431
15843
|
]
|
|
@@ -15505,6 +15917,201 @@
|
|
|
15505
15917
|
}
|
|
15506
15918
|
]
|
|
15507
15919
|
},
|
|
15920
|
+
{
|
|
15921
|
+
"kind": "javascript-module",
|
|
15922
|
+
"path": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.component.ts",
|
|
15923
|
+
"declarations": [
|
|
15924
|
+
{
|
|
15925
|
+
"kind": "class",
|
|
15926
|
+
"description": "CVV Input component for vault payment methods\nRenders a secure iframe for CVV input when required by the selected payment method\nUses dedicated CVV context to minimize re-renders",
|
|
15927
|
+
"name": "VaultCvvInputComponent",
|
|
15928
|
+
"members": [
|
|
15929
|
+
{
|
|
15930
|
+
"kind": "field",
|
|
15931
|
+
"name": "vaultManagerFormContext",
|
|
15932
|
+
"type": {
|
|
15933
|
+
"text": "VaultManagerContextType"
|
|
15934
|
+
},
|
|
15935
|
+
"default": "null",
|
|
15936
|
+
"description": "Form context for checking form dirty state"
|
|
15937
|
+
},
|
|
15938
|
+
{
|
|
15939
|
+
"kind": "field",
|
|
15940
|
+
"name": "vaultManagerCvvContext",
|
|
15941
|
+
"type": {
|
|
15942
|
+
"text": "VaultItemContextType"
|
|
15943
|
+
},
|
|
15944
|
+
"default": "null",
|
|
15945
|
+
"description": "CVV-specific context for dedicated CVV handling\nSeparated to minimize re-renders on frequent CVV input changes"
|
|
15946
|
+
},
|
|
15947
|
+
{
|
|
15948
|
+
"kind": "field",
|
|
15949
|
+
"name": "computedStyles",
|
|
15950
|
+
"type": {
|
|
15951
|
+
"text": "CSSStyleDeclaration | null"
|
|
15952
|
+
},
|
|
15953
|
+
"default": "null",
|
|
15954
|
+
"attribute": "computedStyles"
|
|
15955
|
+
},
|
|
15956
|
+
{
|
|
15957
|
+
"kind": "field",
|
|
15958
|
+
"name": "paymentMethod",
|
|
15959
|
+
"type": {
|
|
15960
|
+
"text": "PaymentCardVaultedMethod | null"
|
|
15961
|
+
},
|
|
15962
|
+
"default": "null",
|
|
15963
|
+
"attribute": "paymentMethod"
|
|
15964
|
+
},
|
|
15965
|
+
{
|
|
15966
|
+
"kind": "field",
|
|
15967
|
+
"name": "cvvError",
|
|
15968
|
+
"type": {
|
|
15969
|
+
"text": "string | null"
|
|
15970
|
+
},
|
|
15971
|
+
"privacy": "private",
|
|
15972
|
+
"default": "null"
|
|
15973
|
+
},
|
|
15974
|
+
{
|
|
15975
|
+
"kind": "field",
|
|
15976
|
+
"name": "cvvInputIsDirty",
|
|
15977
|
+
"type": {
|
|
15978
|
+
"text": "boolean"
|
|
15979
|
+
},
|
|
15980
|
+
"privacy": "private",
|
|
15981
|
+
"default": "false"
|
|
15982
|
+
},
|
|
15983
|
+
{
|
|
15984
|
+
"kind": "field",
|
|
15985
|
+
"name": "cvvInputIsBlurred",
|
|
15986
|
+
"type": {
|
|
15987
|
+
"text": "boolean"
|
|
15988
|
+
},
|
|
15989
|
+
"privacy": "private",
|
|
15990
|
+
"default": "false"
|
|
15991
|
+
},
|
|
15992
|
+
{
|
|
15993
|
+
"kind": "field",
|
|
15994
|
+
"name": "cvvInput",
|
|
15995
|
+
"type": {
|
|
15996
|
+
"text": "CvvInput | null"
|
|
15997
|
+
},
|
|
15998
|
+
"privacy": "private",
|
|
15999
|
+
"default": "null"
|
|
16000
|
+
},
|
|
16001
|
+
{
|
|
16002
|
+
"kind": "field",
|
|
16003
|
+
"name": "isFocused",
|
|
16004
|
+
"type": {
|
|
16005
|
+
"text": "boolean"
|
|
16006
|
+
},
|
|
16007
|
+
"privacy": "private",
|
|
16008
|
+
"default": "false"
|
|
16009
|
+
},
|
|
16010
|
+
{
|
|
16011
|
+
"kind": "field",
|
|
16012
|
+
"name": "cvvContainerId",
|
|
16013
|
+
"type": {
|
|
16014
|
+
"text": "string"
|
|
16015
|
+
},
|
|
16016
|
+
"privacy": "private",
|
|
16017
|
+
"readonly": true,
|
|
16018
|
+
"description": "Unique ID for the CVV input container",
|
|
16019
|
+
"default": "`cvv-container-${Math.random().toString(36).substring(2, 9)}`"
|
|
16020
|
+
},
|
|
16021
|
+
{
|
|
16022
|
+
"kind": "field",
|
|
16023
|
+
"name": "_setupCVVIframe",
|
|
16024
|
+
"privacy": "private",
|
|
16025
|
+
"default": "new Task(this, { task: ([paymentMethod, cvvContext]) => { if ( !paymentMethod || !cvvContext || paymentMethod.paymentMethodType !== 'PAYMENT_CARD' || !paymentMethod.paymentInstrumentData?.network || cvvContext.createCvvInput === null ) { return initialState; } return { network: paymentMethod.paymentInstrumentData.network, createCvvInput: cvvContext.createCvvInput, }; }, args: () => [this.paymentMethod, this.vaultManagerFormContext], })"
|
|
16026
|
+
},
|
|
16027
|
+
{
|
|
16028
|
+
"kind": "method",
|
|
16029
|
+
"name": "onCvvInputChange",
|
|
16030
|
+
"description": "Update CVV metadata in the context when input changes"
|
|
16031
|
+
},
|
|
16032
|
+
{
|
|
16033
|
+
"kind": "method",
|
|
16034
|
+
"name": "onBlur"
|
|
16035
|
+
},
|
|
16036
|
+
{
|
|
16037
|
+
"kind": "method",
|
|
16038
|
+
"name": "onFocus"
|
|
16039
|
+
}
|
|
16040
|
+
],
|
|
16041
|
+
"attributes": [
|
|
16042
|
+
{
|
|
16043
|
+
"name": "computedStyles",
|
|
16044
|
+
"type": {
|
|
16045
|
+
"text": "CSSStyleDeclaration | null"
|
|
16046
|
+
},
|
|
16047
|
+
"default": "null",
|
|
16048
|
+
"fieldName": "computedStyles"
|
|
16049
|
+
},
|
|
16050
|
+
{
|
|
16051
|
+
"name": "paymentMethod",
|
|
16052
|
+
"type": {
|
|
16053
|
+
"text": "PaymentCardVaultedMethod | null"
|
|
16054
|
+
},
|
|
16055
|
+
"default": "null",
|
|
16056
|
+
"fieldName": "paymentMethod"
|
|
16057
|
+
}
|
|
16058
|
+
],
|
|
16059
|
+
"superclass": {
|
|
16060
|
+
"name": "LitElement",
|
|
16061
|
+
"package": "lit"
|
|
16062
|
+
},
|
|
16063
|
+
"tagName": "primer-vault-cvv-input",
|
|
16064
|
+
"customElement": true
|
|
16065
|
+
}
|
|
16066
|
+
],
|
|
16067
|
+
"exports": [
|
|
16068
|
+
{
|
|
16069
|
+
"kind": "js",
|
|
16070
|
+
"name": "VaultCvvInputComponent",
|
|
16071
|
+
"declaration": {
|
|
16072
|
+
"name": "VaultCvvInputComponent",
|
|
16073
|
+
"module": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.component.ts"
|
|
16074
|
+
}
|
|
16075
|
+
},
|
|
16076
|
+
{
|
|
16077
|
+
"kind": "custom-element-definition",
|
|
16078
|
+
"name": "primer-vault-cvv-input",
|
|
16079
|
+
"declaration": {
|
|
16080
|
+
"name": "VaultCvvInputComponent",
|
|
16081
|
+
"module": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.component.ts"
|
|
16082
|
+
}
|
|
16083
|
+
}
|
|
16084
|
+
]
|
|
16085
|
+
},
|
|
16086
|
+
{
|
|
16087
|
+
"kind": "javascript-module",
|
|
16088
|
+
"path": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.styles.ts",
|
|
16089
|
+
"declarations": [],
|
|
16090
|
+
"exports": [
|
|
16091
|
+
{
|
|
16092
|
+
"kind": "js",
|
|
16093
|
+
"name": "default",
|
|
16094
|
+
"declaration": {
|
|
16095
|
+
"module": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.styles.ts"
|
|
16096
|
+
}
|
|
16097
|
+
}
|
|
16098
|
+
]
|
|
16099
|
+
},
|
|
16100
|
+
{
|
|
16101
|
+
"kind": "javascript-module",
|
|
16102
|
+
"path": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.ts",
|
|
16103
|
+
"declarations": [],
|
|
16104
|
+
"exports": [
|
|
16105
|
+
{
|
|
16106
|
+
"kind": "js",
|
|
16107
|
+
"name": "VaultCvvInput",
|
|
16108
|
+
"declaration": {
|
|
16109
|
+
"name": "VaultCvvInputComponent",
|
|
16110
|
+
"module": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.ts"
|
|
16111
|
+
}
|
|
16112
|
+
}
|
|
16113
|
+
]
|
|
16114
|
+
},
|
|
15508
16115
|
{
|
|
15509
16116
|
"kind": "javascript-module",
|
|
15510
16117
|
"path": "src/containers/vault-manager/components/vault-delete-confirmation/vault-delete-confirmation.component.ts",
|