Questions tagged [lwc-oss]

Lightning web components OSS, referred to as Lightning web components Open Source is a framework that allows building custom elements with HTML, JavaScript, and CSS. Lightning Web Components uses standard HTML, modern JavaScript (ES6+), and the best of native Web Components and can be used to build web apps on or off (ex website hosted on Heroku/Netlify or PWA app hosted outside Salesforce) Salesforce platform.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

jsforce logout functionality

In one of my node project, I am using jsforce oauth2 to connect to Salesforce. This is working nicely. Below is the code I am using for logout functionality. This is also working fine without any ...
0
votes
1answer
17 views

LWC Select component to select value based on specific value in JS not HMTL

I have code right now below that selects the value based on the selectedindex of 0 or since I only have two options. What I am trying to figure out is how to set the select value instead of by 0 or 1 ...
1
vote
1answer
27 views

LWC Select component how to default value in JS not HTMl

I am trying to default the value of the select to a specific value based on a condition so I cannot just put selected in the html. I need JS code that will automatically update it. For this though I ...
1
vote
1answer
16 views

lwc-oss lightning-base-components jest tests

I am working on an lwc-oss project and found reference to lightning-base-components npm package in a salesforce blog post. https://developer.salesforce.com/blogs/2020/12/build-connected-apps-anywhere-...
0
votes
0answers
19 views

LWC OSS - Google Recaptcha - Shadow Dom

I'm working on implementing recaptcha into an LWC OSS app hosted in heroku. I've been succesful getting it to work using the following code. I am getting the error to add lwc:dom="manual" ...
0
votes
0answers
35 views

LWC OSS Unit Test cases error

In one of my project, I am using lwc oss with base components. Inside the HTML files I am using lwc component like <lightning-datatable> , <lightning-button-menu> etc... along with lwc oss ...
0
votes
1answer
32 views

How to get value from Case.Account.Primary_Email__c and Case.ContactEmail from case recordID and autopopulated in To field on email page in lwc?

Controller_consumerSendEmail.cls public with sharing class Controller_consumerSendEmail { @AuraEnabled(cacheable=true) public static void sendEmailToController(String toSend, String subject){ ...
0
votes
1answer
57 views

Wrap LWC OSS App for Mobile

Is there a way to make an LWC "OSS" app obviously running on Node.js as a Mobile application? (i.e. Cordova). I see you can create an LWC Hybrid app running your "Salesforce" LWC ...
0
votes
1answer
163 views

Parsing JSON string value returned from APEX in LWC

I am receiving JOSN string in the following format {"data":{"meta":{"resultCode":null,"message":null},"data":[{"code":"$RFG","...
0
votes
2answers
184 views

LWC : onchange Handler not getting fired when @track attribute is changed

I have two lightning input in a simple LWC component having respective onchange handlers and being @tracked with respective attributes. Second onchange handler is getting fired when I update second @...
1
vote
1answer
74 views

LWC Build Files Explaination

I have been trying to research this on my own, but I can't find a simple explanation that tells me the difference between the following 2 files: lwc.config.jsonhttps://developer.salesforce.com/blogs/...
2
votes
1answer
131 views

LWC OSS - Can I use an component I build in LWC OSS within Salesforce?

I am likely not understanding some parts of the potential of LWC OSS but is it possible to built an application/ component in LWC OSS and then utilize it within Salesforce. Or is this only for ...
0
votes
2answers
541 views

How to Show/Hide button based on Profile in Salesforce LWC?

I have develop LWC component which is normally used by normal users. In that lightning web component button is there as below. <lightning-button slot="actions" label="Deactivate"...
0
votes
1answer
84 views

Call API from LWC OSS

I created an LWC OSS app with express server using npx create-lwc-app: Do you want to use the simple setup? Yes Package name for npm demo-app Select the type of app you want to create Standard web ...
1
vote
1answer
106 views

Is it possible to use LWC-related npm modules & webpack to leverage the LWC framework with Cloudflare Workers?

I am hoping to use the LWC framework with Cloudflare Workers in JavaScript, but running into some issues. It seems like Wrangler ignores node_modules so I was hoping to use webpack in order to load ...
2
votes
1answer
42 views

How to Customize Base Components?

I want to use a custom icon with a button. The standard lightning-button could not be used because it does not support custom icons. So I looked into the base-components-recipes repository as the docs ...
0
votes
1answer
61 views

How we can achieve navigation to another page in LWC OSS?

I created my first app using LWC OSS. I want to achieve the navigation from one page to another (url in the browser should change) I have two files created in LWC OSS app first file at src/client/...
1
vote
2answers
85 views

LWC OSS Import External Google API's

I am trying to utilize Google API's in a LWC component. I am able to do a fetch in my component to a hosted API endpoint that utilizes the google API's and returns a list of Google Drive files via ...
2
votes
1answer
179 views

How to configure Socket.io to work with LWC OSS?

I am trying to use socket.io library with LWC OSS and followed the below steps: Created LWC OSS app using the command npx create-lwc-app my-app Installed socket.io library using the command npm ...
2
votes
1answer
53 views

In LWC OSS what is this.allsession while assigning to arrya

I am learning LWC OSS and in the trailhead, I am unable to understand, the use of this.allSessions in the below code while assigning the result to the array variable of "sessions = []" ...
1
vote
1answer
87 views

Unable to use lwc:dynamic directive in LWC component

How do I enable the lwc:dynamic directive or is it tied to certain release of Salesforce?
0
votes
1answer
46 views

LWC OSS Build Command

I'm trying to build an LWC OSS project for production, but I can't figure out where the 'npm run build' command builds the bundled resource. I don't see anything obvious in the configs or on either of ...
5
votes
1answer
622 views

Lightning Open source use of base components

A few days back an npm package for base lightning components was released Base Lightning Components With this I am expecting to use base lightning components like my favorite lightning-datatable in a ...
0
votes
1answer
68 views

Query Selector is not working when I am putting inside renderedCallback Lifecycle hook in Lightning Web Component

I am creating a variable crashride and doing querySelector inside renderedcallback then I am using that variable inside another function. But if I directly say this.crashride inside the function ...
0
votes
0answers
349 views

JSForce GET Request Issue

I am using a LWC Open source app to make a GET request to my Salesforce Org. I want to get the resource at : https://na111.salesforce.com/services/data/v42.0/sobjects/EventLogFile/0AT3h00000PE85uGAD/...
0
votes
0answers
90 views

new XSLTProcessor() fails in lwc

I am playing around a bit with lwc and the open-source version of it. I tried to copy my open source lwc component into my saleforce project but now I am getting an error message that does not really ...
3
votes
2answers
2k views

LWC datatable Header wrapping

I am working on a LWC component where in a lightning datatable I have more than 7-8 columns. When I add the component into detail section of a record page, the headers of the table is getting ...
2
votes
1answer
289 views

LWC OSS cannot find ui-card component

I am looking at the open source LWC recipes and whenever I try to add a template to app.html which references ui-card, I am hitting a compile error. I saw that this issue has come up before from ...
5
votes
1answer
345 views

Inconsistencies between shadow dom and synthetic dom on LWC OSS

We've been working on porting our LWC components from platform into LWC OSS. In order to do this, we have a copy of SLDS classes we have created and we need them to be applied globally. For us will ...
3
votes
1answer
284 views

OSS LWC app on Heroku Css Fails to load

I am trying to run an OSS LWC app on heroku using SLDS via synthetic shadow dom. When I run it locally using heroku local web everything looks great. When it makes all the way to my Heroku site, I ...
4
votes
2answers
985 views

How to @wire an external Rest API call with LWC OSS?

I have created a basic project and simply want to pull a list of greetings from Google Firestore instead of using the default static array of greetings. My greeting.js file looks like this: import { ...
2
votes
0answers
197 views

Adding Service Worker to LWC

How do we add a service worker to an LWC local application? I am trying to add a service worker to an LWC application. I have added the sw.js to the project but it shows an error while registering ...
4
votes
1answer
1k views

Normalizing Boolean values in LWC

Looking at LWC e-bikes sample gallery, I found these comments in code regaring normalizing values. Can someone refer to what they have meant or how to do this normalization using best practices? ...
9
votes
2answers
2k views

lightning-input firing two onclick events in Lightning Web Component

I am receiving two events when I am clicking lightning-input checkbox. This behavior is the same in Salesforce as well as on the LWC playground. Wherever if use html checkbox then I receive event ...
2
votes
1answer
258 views

routing or dynamic creation of LWC Open Source components to avoid multiple IF conditions

we are working on LWC Open Source and to navigate to the new component, currently we are using if:true with a boolean value which is not appropriate for a long run. Is there any other way to achieve ...
5
votes
1answer
657 views

Lightning Web Components - Custom Decorator support

Part 1 - Custom decorators blocked in LWC I'm trying to implement a custom decorator, very simple book example but getting LWC error in both LWC open source and LWC for salesforce, LWC1100: Invalid ...
1
vote
1answer
264 views

How to view new LWC?

I want to play around with the new Lightning Web Component announced earlier today. I have Node.JS downloaded and I'm running a local server, but I'm unable to see anything at the address '0.0.0.0:...