@primer-io/primer-js 1.0.8 → 1.0.9
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 +6 -0
- package/dist/custom-elements.json +10 -10
- package/dist/primer-loader.js +9 -9
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
{
|
|
52
52
|
"kind": "variable",
|
|
53
53
|
"name": "Te",
|
|
54
|
-
"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._classObserver=null;this.locale=ir(Oa());this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new Ma(this),this.sdkStateController=new Aa(this),this.primerEventsController=new tr(this),this.styleProcessingController=new Ea(this),this.vaultManagerController=new Ir(this),this.achPaymentEventsController=new qa(this),this.headlessSdkController=new Ja(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}get primerJS(){return this.headlessSdkController?.primerJSInstance??void 0}connectedCallback(){super.connectedCallback(),this.sdkContextController.setEventsController(this.primerEventsController),this._eventListenerController=new AbortController,document.addEventListener(\"primer:card-submit\",this.handleExternalCardSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:vault-submit\",this.handleExternalVaultSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:show-other-payments-toggle\",this.handleExternalShowOtherPaymentsToggle.bind(this),{signal:this._eventListenerController.signal}),this._classObserver=new MutationObserver(()=>{this.requestUpdate()}),this._classObserver.observe(this,{attributes:!0,attributeFilter:[\"class\"]})}attributeChangedCallback(e,r,i){e===th.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,r,i)}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),this._classObserver&&(this._classObserver.disconnect(),this._classObserver=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(In(this.options?.locale)?this.locale=ir(this.options?.locale):P.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to system locale\")),Tn(this.locale))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}handleExternalCardSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:card-submit\",e.detail)}handleExternalVaultSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:vault-submit\",e.detail)}handleExternalShowOtherPaymentsToggle(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:show-other-payments-toggle\",e.detail)}checkLoadingStateChange(){let e=this.sdkStateController?.currentState.isLoading||!1;if(this.previousLoadingState&&!e){this.jsInitialized=!0,ee({eventName:\"CHECKOUT_FLOW_STARTED\"});let r=Ye.getSdkInitStartTime(),i=r?Date.now()-r:void 0;
|
|
54
|
+
"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._classObserver=null;this.locale=ir(Oa());this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new Ma(this),this.sdkStateController=new Aa(this),this.primerEventsController=new tr(this),this.styleProcessingController=new Ea(this),this.vaultManagerController=new Ir(this),this.achPaymentEventsController=new qa(this),this.headlessSdkController=new Ja(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}get primerJS(){return this.headlessSdkController?.primerJSInstance??void 0}connectedCallback(){super.connectedCallback(),this.sdkContextController.setEventsController(this.primerEventsController),this._eventListenerController=new AbortController,document.addEventListener(\"primer:card-submit\",this.handleExternalCardSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:vault-submit\",this.handleExternalVaultSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:show-other-payments-toggle\",this.handleExternalShowOtherPaymentsToggle.bind(this),{signal:this._eventListenerController.signal}),this._classObserver=new MutationObserver(()=>{this.requestUpdate()}),this._classObserver.observe(this,{attributes:!0,attributeFilter:[\"class\"]})}attributeChangedCallback(e,r,i){e===th.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,r,i)}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),this._classObserver&&(this._classObserver.disconnect(),this._classObserver=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(In(this.options?.locale)?this.locale=ir(this.options?.locale):P.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to system locale\")),Tn(this.locale))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}handleExternalCardSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:card-submit\",e.detail)}handleExternalVaultSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:vault-submit\",e.detail)}handleExternalShowOtherPaymentsToggle(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:show-other-payments-toggle\",e.detail)}checkLoadingStateChange(){let e=this.sdkStateController?.currentState.isLoading||!1;if(this.previousLoadingState&&!e){this.jsInitialized=!0,ee({eventName:\"CHECKOUT_FLOW_STARTED\"});let r=Ye.getSdkInitStartTime(),i=r?Date.now()-r:void 0;Cs(i)}this.previousLoadingState=e,e&&!this._loadingTimeoutId?this._loadingTimeoutId=window.setTimeout(()=>{this.sdkStateController?.currentState.isLoading&&(P.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,i=e.primerJsError,n=!r&&!i;return p` ${R(r,()=>y)} ${R(i,()=>p`<primer-checkout-error></primer-checkout-error>`)} ${R(n,()=>p`<slot name=\"main\" @slotchange=${this.onSlotChange}></slot>${R(this.hasAssignedContent,()=>y,()=>p`<primer-main></primer-main>`)} `,()=>y)} `}addEventListener(e,r,i){super.addEventListener(e,r,i)}removeEventListener(e,r,i){super.removeEventListener(e,r,i)}}"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"kind": "function",
|
|
58
|
-
"name": "
|
|
58
|
+
"name": "Cl"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"kind": "function",
|
|
62
|
-
"name": "
|
|
62
|
+
"name": "Al"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"kind": "function",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
{
|
|
153
153
|
"kind": "variable",
|
|
154
154
|
"name": "qe",
|
|
155
|
-
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Yt();this.loadManagerTask=new G(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return D;let r=this.paymentManagers.get(e);if(!r)throw new Error(`No manager found for payment method type ${e}`);if(r.type!==\"PAYPAL\")throw new Error(\"Invalid payment method type for PayPal component\");return r.manager}}),this.renderButtonTask=new G(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return D;await this.updateComplete;let r=this.buttonContainerRef.value;if(!r)throw new Error(\"Button container not found\");let i=e.createButton(),n=
|
|
155
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Yt();this.loadManagerTask=new G(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return D;let r=this.paymentManagers.get(e);if(!r)throw new Error(`No manager found for payment method type ${e}`);if(r.type!==\"PAYPAL\")throw new Error(\"Invalid payment method type for PayPal component\");return r.manager}}),this.renderButtonTask=new G(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return D;await this.updateComplete;let r=this.buttonContainerRef.value;if(!r)throw new Error(\"Button container not found\");let i=e.createButton(),n=Hl(ti(this));return await i.render(r,{style:{buttonHeight:n}}),this.disabled&&await i.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,dr(this.disabled,this.buttonContainerRef)),i}})}attributeChangedCallback(e,r,i){if(super.attributeChangedCallback(e,r,i),e===\"disabled\"&&r!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&dr(this.disabled,this.buttonContainerRef)}render(){return p`<div class=\"native-button-container\" ${Pt(this.buttonContainerRef)} ></div>`}}"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"kind": "variable",
|
|
@@ -182,12 +182,12 @@
|
|
|
182
182
|
{
|
|
183
183
|
"kind": "variable",
|
|
184
184
|
"name": "Ie",
|
|
185
|
-
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.clientOptions=void 0;this._paymentMethodManagerTask=new G(this,{task:([e,r])=>!e||!r?D:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new G(this,{task:([e,r])=>{if(!e||!r)return D;let i=r.getPaymentMethodConfiguration(e);if(!i)return D;let n=
|
|
185
|
+
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.clientOptions=void 0;this._paymentMethodManagerTask=new G(this,{task:([e,r])=>!e||!r?D:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new G(this,{task:([e,r])=>{if(!e||!r)return D;let i=r.getPaymentMethodConfiguration(e);if(!i)return D;let n=ql(e)?this.clientOptions?.giftCard:void 0,o=n?.background??i.displayMetadata.button.backgroundColor.colored??i.displayMetadata.button.backgroundColor.light,s=i.displayMetadata.button.iconPositionRelativeToText||\"START\";return{backgroundColor:o,name:i.name,alt:n?.logoAlt??i.name,displayName:n?.text??this._legacyGetButtonLabel(i.displayMetadata.button.text),iconUrl:n?.logoSrc??i.displayMetadata.button.iconUrl.colored??i.displayMetadata.button.iconUrl.light,iconPosition:s}},args:()=>[this.paymentMethod?.type,this.headlessUtils]});this._setupTasks=new G(this,{task:([e,r])=>!e||!r?D:{paymentMethodManager:e,assetsConfig:r},args:()=>[this._paymentMethodManagerTask.value,this._getAssetsTask.value]})}_legacyGetButtonLabel(e){if(!e)return;let r=e?Yr(e):\"\";return r===\"payWith\"&&(r=\"pay_with\"),S(r,{id:r})}startRedirectPayment(){this.disabled||this._paymentMethodManagerTask.value&&this._paymentMethodManagerTask.value.start()}render(){return this._setupTasks.render({error:()=>y,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};return p`<primer-button @click=\"${()=>this.startRedirectPayment()}\" class=${de(r)} title=\"${S(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" ?disabled=${this.disabled} ><img src=\"${e.iconUrl}\" alt=\"${e.alt}\" />${R(e.displayName,()=>p`<span class=\"button-text\">${e.displayName}</span>`)}</primer-button>`}})}}"
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
"kind": "variable",
|
|
189
189
|
"name": "ue",
|
|
190
|
-
"default": "class extends v{constructor(){super(...arguments);this.configuration=null;this.headlessUtils=null;this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new G(this,{task:async([e,r])=>{if(!e||!r)return D;let i=this.extractFieldConfig(e);return await this.initializeCountryOptions(),i},args:()=>[this.configuration,this.headlessUtils]})}connectedCallback(){super.connectedCallback(),this._initializationTask.value}extractFieldConfig(e){if(e?.checkoutModules){let r=e.checkoutModules.find(i=>i.type===\"BILLING_ADDRESS\");if(r?.options){let i=r.options;return Object.keys(zn).reduce((n,o)=>({...n,[o]:i[o]??!1}),{})}}return this.defaultFieldConfig}async initializeCountryOptions(){try{let e=Yn(\"en\");this.countryOptions=[...e.map(([n,o])=>({value:n,label:o}))],this.requestUpdate(\"countryOptions\");let r=Pn();if(r===\"en\"||r===\"en-GB\"||r.startsWith(\"en-\"))return;if(await
|
|
190
|
+
"default": "class extends v{constructor(){super(...arguments);this.configuration=null;this.headlessUtils=null;this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new G(this,{task:async([e,r])=>{if(!e||!r)return D;let i=this.extractFieldConfig(e);return await this.initializeCountryOptions(),i},args:()=>[this.configuration,this.headlessUtils]})}connectedCallback(){super.connectedCallback(),this._initializationTask.value}extractFieldConfig(e){if(e?.checkoutModules){let r=e.checkoutModules.find(i=>i.type===\"BILLING_ADDRESS\");if(r?.options){let i=r.options;return Object.keys(zn).reduce((n,o)=>({...n,[o]:i[o]??!1}),{})}}return this.defaultFieldConfig}async initializeCountryOptions(){try{let e=Yn(\"en\");this.countryOptions=[...e.map(([n,o])=>({value:n,label:o}))],this.requestUpdate(\"countryOptions\");let r=Pn();if(r===\"en\"||r===\"en-GB\"||r.startsWith(\"en-\"))return;if(await Dd(r)){let n=Yn(r);this.countryOptions=[...n.map(([o,s])=>({value:o,label:s}))],this.requestUpdate(\"countryOptions\")}}catch(e){P.errorWithDatadog(\"Failed to load country locale\",{error:e})}}get fieldConfig(){return this.extractFieldConfig(this.configuration)}get defaultFieldConfig(){return Object.keys(zn).reduce((e,r)=>({...e,[r]:!1}),{})}get shouldShowForm(){return this.fieldConfig.postalCode}handleInput(e,r){this.formData={...this.formData,[e]:r},this.dirtyFields.add(e),(this.submitted||this.dirtyFields.has(e)&&this.touchedFields.has(e))&&this.validateField(e),this.dispatchEvent(new CustomEvent(\"primer-billing-address-change\",{detail:this.formData,bubbles:!0,composed:!0}))}handleFocus(e){this.focusedField=e}handleBlur(e){this.focusedField=null,this.touchedFields.add(e),this.validateField(e)}validateField(e){let r=this.formData[e],i=this.fieldConfig[e];if(!i){delete this.errors[e];return}if(i&&(!r||r.trim()===\"\")){let n=`${e}ErrorRequired`;this.errors={...this.errors,[e]:S(\"This field is required\",{id:n})}}else{let n={...this.errors};delete n[e],this.errors=n}}validateForm(){return Object.keys(zn).forEach(e=>{let r=e;this.fieldConfig[r]&&this.validateField(r)}),Object.keys(this.errors).length===0}async validateForSubmission(){if(!this.shouldShowForm)return!0;this.submitted=!0,Object.keys(this.fieldConfig).forEach(r=>{this.fieldConfig[r]&&this.touchedFields.add(r)});let e=this.validateForm();return this.requestUpdate(),await this.updateComplete,e}async submitToSDK(){if(this.headlessUtils?.setBillingAddress)try{return await this.headlessUtils.setBillingAddress(this.formData),this.dispatchEvent(new CustomEvent(\"primer-billing-address-submit\",{detail:this.formData,bubbles:!0,composed:!0})),!0}catch(e){return P.errorWithDatadog(\"Failed to set billing address\",{error:e}),!1}return!0}shouldShowError(e){let r=!!this.errors[e],i=this.dirtyFields.has(e),n=this.touchedFields.has(e);return r&&(this.submitted||i&&n)}render(){return this._initializationTask.render({pending:()=>y,error:()=>y,complete:()=>this.shouldShowForm?(this.removeAttribute(\"hidden\"),p`<div class=\"billing-address-form\"><div class=\"billing-address-title\">${S(\"Billing address\",{id:\"billingAddressLabel\"})}</div>${R(this.fieldConfig.countryCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"countryCode\"} .hasError=${this.shouldShowError(\"countryCode\")} ><primer-input-label slot=\"label\">${S(\"Country code\",{id:\"countryCodeLabel\"})}</primer-input-label><primer-select slot=\"input\" id=\"countryCode\" name=\"countryCode\" .value=${this.formData.countryCode||\"\"} .options=${this.countryOptions} .hasError=${this.shouldShowError(\"countryCode\")} placeholder=${S(\"Select a country\",{id:\"countrySelectPlaceholder\"})} @input=${e=>this.handleInput(\"countryCode\",e.detail)} @focus=${()=>this.handleFocus(\"countryCode\")} @blur=${()=>this.handleBlur(\"countryCode\")} ></primer-select>${R(this.shouldShowError(\"countryCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.countryCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.firstName||this.fieldConfig.lastName,()=>p`<div class=\"billing-address-row\">${R(this.fieldConfig.firstName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"firstName\"} .hasError=${this.shouldShowError(\"firstName\")} ><primer-input-label slot=\"label\">${S(\"First name\",{id:\"firstNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"firstName\" name=\"firstName\" type=\"text\" .value=${this.formData.firstName||\"\"} placeholder=${S(\"First name\",{id:\"firstNamePlaceholder\"})} @input=${e=>this.handleInput(\"firstName\",e.detail)} @focus=${()=>this.handleFocus(\"firstName\")} @blur=${()=>this.handleBlur(\"firstName\")} ></primer-input>${R(this.shouldShowError(\"firstName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.firstName}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.lastName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"lastName\"} .hasError=${this.shouldShowError(\"lastName\")} ><primer-input-label slot=\"label\">${S(\"Last name\",{id:\"lastNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"lastName\" name=\"lastName\" type=\"text\" .value=${this.formData.lastName||\"\"} placeholder=${S(\"Last name\",{id:\"lastNamePlaceholder\"})} @input=${e=>this.handleInput(\"lastName\",e.detail)} @focus=${()=>this.handleFocus(\"lastName\")} @blur=${()=>this.handleBlur(\"lastName\")} ></primer-input>${R(this.shouldShowError(\"lastName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.lastName}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${R(this.fieldConfig.addressLine1,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine1\"} .hasError=${this.shouldShowError(\"addressLine1\")} ><primer-input-label slot=\"label\">${S(\"Address line 1\",{id:\"addressLine1\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine1\" name=\"addressLine1\" type=\"text\" .value=${this.formData.addressLine1||\"\"} placeholder=${S(\"Address line 1\",{id:\"addressLine1Placeholder\"})} @input=${e=>this.handleInput(\"addressLine1\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine1\")} @blur=${()=>this.handleBlur(\"addressLine1\")} ></primer-input>${R(this.shouldShowError(\"addressLine1\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine1}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.addressLine2,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine2\"} .hasError=${this.shouldShowError(\"addressLine2\")} ><primer-input-label slot=\"label\">${S(\"Address line 2\",{id:\"addressLine2\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine2\" name=\"addressLine2\" type=\"text\" .value=${this.formData.addressLine2||\"\"} placeholder=${S(\"Address line 2\",{id:\"addressLine2Placeholder\"})} @input=${e=>this.handleInput(\"addressLine2\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine2\")} @blur=${()=>this.handleBlur(\"addressLine2\")} ></primer-input>${R(this.shouldShowError(\"addressLine2\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine2}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.postalCode||this.fieldConfig.city,()=>p`<div class=\"billing-address-row\">${R(this.fieldConfig.postalCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"postalCode\"} .hasError=${this.shouldShowError(\"postalCode\")} ><primer-input-label slot=\"label\">${S(\"Postal code\",{id:\"postalCodeLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"postalCode\" name=\"postalCode\" type=\"text\" .value=${this.formData.postalCode||\"\"} placeholder=${S(\"90210\",{id:\"postalCodePlaceholder\"})} @input=${e=>this.handleInput(\"postalCode\",e.detail)} @focus=${()=>this.handleFocus(\"postalCode\")} @blur=${()=>this.handleBlur(\"postalCode\")} ></primer-input>${R(this.shouldShowError(\"postalCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.postalCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.city,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"city\"} .hasError=${this.shouldShowError(\"city\")} ><primer-input-label slot=\"label\">${S(\"City\",{id:\"cityLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"city\" name=\"city\" type=\"text\" .value=${this.formData.city||\"\"} placeholder=${S(\"Cape Town\",{id:\"cityPlaceholder\"})} @input=${e=>this.handleInput(\"city\",e.detail)} @focus=${()=>this.handleFocus(\"city\")} @blur=${()=>this.handleBlur(\"city\")} ></primer-input>${R(this.shouldShowError(\"city\"),()=>p`<primer-input-error slot=\"error\">${this.errors.city}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${R(this.fieldConfig.state,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"state\"} .hasError=${this.shouldShowError(\"state\")} ><primer-input-label slot=\"label\">${S(\"State / Region / County\",{id:\"stateLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"state\" name=\"state\" type=\"text\" .value=${this.formData.state||\"\"} placeholder=${S(\"State / Region / County\",{id:\"statePlaceholder\"})} @input=${e=>this.handleInput(\"state\",e.detail)} @focus=${()=>this.handleFocus(\"state\")} @blur=${()=>this.handleBlur(\"state\")} ></primer-input>${R(this.shouldShowError(\"state\"),()=>p`<primer-input-error slot=\"error\">${this.errors.state}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`):(this.setAttribute(\"hidden\",\"\"),y)})}}"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
"kind": "variable",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
{
|
|
238
238
|
"kind": "variable",
|
|
239
239
|
"name": "se",
|
|
240
|
-
"default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=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:ur,initialValue:null});this.eventsController=new tr(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new G(this,{task:([e])=>{if(!e?.manager)return D;let{manager:r}=e,i=r.createHostedInputs(),{cardNumberInput:n,expiryInput:o,cvvInput:s}=i;return this.cardFormProvider.setValue({cardholderNameInput:i.cardholderNameInput,cardNumberInput:n,expiryInput:o,cvvInput:s,setCardholderName:l=>{r.setCardholderName(l),this.shouldRequireCardholderName&&r.validate?.().then(c=>{let g=c?.validationErrors?.find(M=>M.name===
|
|
240
|
+
"default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=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:ur,initialValue:null});this.eventsController=new tr(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new G(this,{task:([e])=>{if(!e?.manager)return D;let{manager:r}=e,i=r.createHostedInputs(),{cardNumberInput:n,expiryInput:o,cvvInput:s}=i;return this.cardFormProvider.setValue({cardholderNameInput:i.cardholderNameInput,cardNumberInput:n,expiryInput:o,cvvInput:s,setCardholderName:l=>{r.setCardholderName(l),this.shouldRequireCardholderName&&r.validate?.().then(c=>{let g=c?.validationErrors?.find(M=>M.name===nc.cardholderName),h=this.inputControllers.get(\"cardholderName\");h&&h.updateMetaFromValidation({valid:!1,error:g?.message||g?.error||null,errorCode:g?.message||g?.error||null})})},setCardNetwork:l=>{this.selectedCardNetwork=l},validate:()=>r.validate(),submit:l=>r.submit(l),hideLabels:this.hideLabels,disabled:this.disabled,setSubmissionState:l=>{this.inputControllers.forEach(c=>{c.setSubmitted(l)})},propagateValidationErrors:l=>{l&&l.forEach(c=>{let m=c.field||c.name,g=c.message||c.error,h=nc[m];if(h){let M=this.inputControllers.get(h);if(M){let E={valid:!1,error:g,errorCode:g};M.updateMetaFromValidation(E)}}})},registerInputController:(l,c)=>{this.inputControllers.set(l,c)},unregisterInputController:l=>{this.inputControllers.delete(l)},onUserInteraction:()=>{this.sendPaymentMethodSelectionEvent(),this.checkAndSendPaymentDetailsEnteredEvent()}}),!0},args:()=>[this.paymentManagers.get(\"PAYMENT_CARD\")]});this.paymentDetailsEnteredSent=!1;this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitCardPayment())};this.handleDirectSubmit=e=>{e.stopPropagation(),this.submitCardPayment()};this.handleContextCardSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitCardPayment())}finally{this._isHandlingContextEvent=!1}}};this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0};this.handleFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.submitCardPayment()}}updated(e){if(super.updated(e),(e.has(\"hideLabels\")||e.has(\"disabled\"))&&this.cardFormProvider.value&&this.cardFormProvider.setValue({...this.cardFormProvider.value,hideLabels:this.hideLabels,disabled:this.disabled}),e.has(\"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,ee({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:\"PAYMENT_CARD\"}))}checkAndSendPaymentDetailsEnteredEvent(){if(this.paymentDetailsEnteredSent)return;let e=this.inputControllers.get(\"cardNumber\"),r=this.inputControllers.get(\"expire\"),i=this.inputControllers.get(\"cvv\"),n=e?.meta?.dirty===!0,o=r?.meta?.dirty===!0,s=i?.meta?.dirty===!0,l=!0;this.shouldRequireCardholderName&&(l=this.inputControllers.get(\"cardholderName\")?.meta?.dirty===!0),n&&o&&s&&l&&(this.sendPaymentDetailsEnteredEvent(),this.paymentDetailsEnteredSent=!0)}sendPaymentDetailsEnteredEvent(){ee({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(),i=r===\"button\",n=r===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value;if(!e||this.disabled)return;this.formErrorMessage=null,e.setSubmissionState?.(!0);let r=this.querySelector(\"primer-billing-address\")||this.renderRoot.querySelector(\"primer-billing-address\"),i=!0;r&&(i=await r.validateForSubmission());let n=await e.validate?.();if(n?.valid&&i){if(r&&!await r.submitToSDK()){let c=S(\"tokenizationError\",{id:\"tokenizationError\"});this.formErrorMessage=c,this.eventsController.dispatchFormSubmitErrors([{field:\"billingAddress\",name:\"billingAddress\",error:\"BILLING_ADDRESS_SUBMISSION_FAILED\",message:c}]);return}let o={success:!0};this.eventsController.dispatchFormSubmitSuccess(o);let s=this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0;await e.submit?.(s)}else{let o=n?.validationErrors;e.propagateValidationErrors?.(o||[]),this.cardFormProvider.setValue({...e,errors:o}),this.eventsController.dispatchFormSubmitErrors(o)}}render(){return this.setupCardFormTask.status===St.ERROR||this.setupCardFormTask.status===St.INITIAL?y:p`<form @submit=${this.handleFormSubmit}><slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot>${this.setupCardFormTask.render({complete:()=>R(this.hasAssignedContent,()=>y,()=>p`<div class=\"card-form\"><primer-input-card-number></primer-input-card-number><div class=\"card-form-row\"><primer-input-card-expiry></primer-input-card-expiry><primer-input-cvv></primer-input-cvv></div>${R(this.shouldShowCardholderName,()=>p`<primer-input-card-holder-name></primer-input-card-holder-name>`,()=>y)} ${R(this.clientOptions?.sdkCore!==!1,()=>p`<primer-billing-address></primer-billing-address>`,()=>y)}</div><primer-card-form-submit></primer-card-form-submit><primer-error-message message=\"${this.formErrorMessage||\"\"}\" ?visible=\"${!!this.formErrorMessage}\" ></primer-error-message>`)})}</form>`}}"
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"kind": "variable",
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
{
|
|
268
268
|
"kind": "variable",
|
|
269
269
|
"name": "ye",
|
|
270
|
-
"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=Yt();this.dropdownRef=Yt();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}renderDefaultCardIcon(){return p`<div class=\"network-icon\">${Qa[\"payment-card\"]}</div>`}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(i=>i.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 p`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return this.renderDefaultCardIcon();let r=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!r)return this.renderDefaultCardIcon();let i=e.length>1;return i&&!
|
|
270
|
+
"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=Yt();this.dropdownRef=Yt();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}renderDefaultCardIcon(){return p`<div class=\"network-icon\">${Qa[\"payment-card\"]}</div>`}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(i=>i.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 p`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return this.renderDefaultCardIcon();let r=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!r)return this.renderDefaultCardIcon();let i=e.length>1;return i&&!Oc(e.map(o=>o.network))?p`<div class=\"network-selector-inline\">${e.map(o=>p`<div class=\"network-icon-container\"><img class=\"network-icon\" src=${this.getNetworkIconUrl(o)} alt=${o.displayName} /></div>`)}</div>`:p`<button ${Pt(this.buttonRef)} class=\"network-selector\" @click=${this.toggleDropdown} @keydown=${o=>{(o.key===\" \"||o.key===\"Enter\")&&i&&(o.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${i?`Selected card network: ${r.displayName}. Click to change.`:`Card network: ${r.displayName}`} aria-expanded=${i?this.isDropdownOpen:y} aria-haspopup=${i?\"true\":y} aria-controls=${i?\"network-dropdown\":y} ><img class=\"network-icon\" src=${this.getNetworkIconUrl(r)} alt=${r.displayName} />${R(i,()=>p`<primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" size=\"sm\" name=\"chevron-down\" ></primer-icon>`,()=>y)}</button>${R(this.isDropdownOpen,()=>p`<div ${Pt(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" >${e.map((o,s)=>p`<div ${Pt(l=>this.setNetworkOptionRef(l,s))} class=\"network-option ${this.isKeyboardNavigation&&s===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${l=>this.selectNetwork(l,o)} @keydown=${l=>{(l.key===\"Enter\"||l.key===\" \")&&this.selectNetwork(l,o)}} role=\"option\" aria-selected=${o.network===r.network} tabindex=\"${s===this.focusedNetworkIndex?\"0\":\"-1\"}\" ><img class=\"network-option-icon\" src=${this.getNetworkIconUrl(o)} alt=${o.displayName} /><span class=\"network-name\">${o.displayName}</span>${R(o.network===r.network,()=>p`<primer-icon class=\"checkmark\" name=\"checkmark\" size=\"sm\" ></primer-icon>`,()=>y)}</div>`)}</div>`,()=>y)} `}}"
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
"kind": "variable",
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
"kind": "js",
|
|
713
713
|
"name": "injectLoaderStyles",
|
|
714
714
|
"declaration": {
|
|
715
|
-
"name": "
|
|
715
|
+
"name": "Cl",
|
|
716
716
|
"module": "dist/primer-loader.js"
|
|
717
717
|
}
|
|
718
718
|
},
|
|
@@ -720,7 +720,7 @@
|
|
|
720
720
|
"kind": "js",
|
|
721
721
|
"name": "injectThemeStyles",
|
|
722
722
|
"declaration": {
|
|
723
|
-
"name": "
|
|
723
|
+
"name": "Al",
|
|
724
724
|
"module": "dist/primer-loader.js"
|
|
725
725
|
}
|
|
726
726
|
},
|