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
1 vote
0 answers
34 views

LwcWebpackPlugin with AliasModuleRecord for lwc.dev isn't loading HTML file for component

I use LwcWebpackPlugin to load Lightning Web Components. Everything works fine but because I want to load compoennts from 'lwc' direcotry the namescape won't work. I must get components from /lwc ...
0 votes
1 answer
44 views

Filter search in LWC

HTML <template> <lightning-card> <div class="slds-box slds-theme_default"> <div class = " slds-grid slds-size_12-of-12"> ...
0 votes
1 answer
42 views

Where are Lighting Web Runtime OSS built static files?

When using LWR OSS, I'm running npm run dev as stated in the doc, however I don't see any built files. When I was using create-lwc-app (deprecated), I could see all files generated under dist folder. ...
3 votes
1 answer
133 views

What's the expected label file format for Lightning Web Runtime OSS?

In the Lightning Web Runtime OSS documentation, in the "Use Module Providers" section, I can see "Your application components can now statically import labels sourced from JSON files in ...
0 votes
1 answer
44 views

How to add a proxy middleware in the lwr server?

I have built a simple web app using the LWR OSS(same as lwc-recipes-oss), I want to use the JSForce in this project to connect to Salesforce API. Because of the CORS policy, I am not able to fetch ...
0 votes
0 answers
58 views

LWR and LWC OSS Lightning Icons Not showing Up

I am trying to build a simple lwr site using the new npm init lwr command. I have setup the project and it's working fine except that the lightning icons are not getting loaded. Here is the error I ...
0 votes
0 answers
81 views

Is it right way to check CRUD Permission in LWC?

import { LightningElement, wire } from 'lwc'; import { getObjectInfo } from 'lightning/uiObjectInfoApi'; import ACCOUNT_OBJECT from '@salesforce/schema/Account'; export default class CheckPermission ...
  • 1
0 votes
0 answers
44 views

How can you pass and/or retrieve LWR context within or passing to LWC components?

The LWR template has access to the global context, but not sure how you can access within included LWC. The LWR template renders using {{{body}}} {{{lwr_resources}}}, but context information is not ...
0 votes
1 answer
355 views

web application using open-source LWC and node.js

I'm trying to create web app using open-source LWC and node.js and following the steps mentioned in this blog. My app is working till Step 2. I'm stuck in Step 3 where I need to Create a GET method at ...
0 votes
0 answers
56 views

This is my LWC and I want some flexibility in it

I want flexibility so that in the first row it ends with 105 and in the next row it starts with 201; it means it automatically creates a row start with initials 1,2,3 and it means if it ends with 105, ...
0 votes
1 answer
92 views

How to over come the error :- The `innerHTML` property is available only on elements that use the `lwc:dom="manual"` directive?

On click of a div i am trying clear the content and I am making it editable. so when i try to get the innerHTML it has no issues but when i try to modify the innerHTML , i get a console error as below ...
1 vote
0 answers
278 views

Problem while executing command npm run start on scratch LWR projects

I having an issue while running a LWR project. I am creating a scratch project using the steps shown in https://lwc.dev/ but not able to get proper output (in this case a "Hello World" text) ...
1 vote
0 answers
99 views

How to use an lwc oss web component in a vue project for example?

I would like to import this lwc oss component: https://www.npmjs.com/package/lwc-clock-utils in a vue project. May someone help me pointing how to properly import the package?
2 votes
1 answer
1k views

html select is not working when manipulated from js

I am currently writing an LWC OSS project and am currently confused about some reproducible side-effects on a <select>. The element can be "injected" from outside, by setting the value ...
  • 6,170
4 votes
2 answers
222 views

LWC OSS: How to set properties of components imported dynamically?

I am trying create components dynamically with the help of lwc:dynamic directive in LWC OSS. I am able to create those comments dynamically, but not able to set the properties to them. For each ...
0 votes
1 answer
453 views

this.querySelector || this.getElementsByClassName not working in LWC OSS

I am creating an application on LWC OSS. As Lightning Toasts are not available on LWC OSS, I am trying to create a notification component that can show the notifications. I am just trying to run the ...
0 votes
0 answers
113 views

Not able to find index.js on Heroku [LWC OSS]

Getting the following not found error while deploying a new, non-modified version of LWC OSS. It was just a simple installation of npx create-lwc-app, and some basic steps in the package.json to make ...
1 vote
1 answer
252 views

Not able to deploy LWC OSS app to Heroku

Getting the following error when I am trying to deploy an LWC OSS app to Heroku, I tried to deploy my app which had customizations got the same error, but now this is an LWC OSS fresh installation ...
1 vote
2 answers
186 views

Could Not Find module "lightning/ariaObserver" LWC OSS

I am trying to implement a project with LWC OSS, when trying to import lightning-input I am facing the following error. I tried to import the lightning-button and I was able to import the same ...
0 votes
1 answer
145 views

Edit Lighting Web Component and retrieve code

My org recently had a lighting web component written launched into production. Unfortunately, the team we outsourced this to left off a necessary field. I would like to edit this code to include this ...
0 votes
0 answers
48 views

Unable to create LWC recipe component in the Webcomponents.dev playground

I am trying to create the LWC OSS components in the https://webcomponents.dev/. I created the hello.html with the below code. <template> <ui-card title="Hello"> <...
0 votes
1 answer
184 views

Creating LWC OSS app using Lightning Web Runtime

Salesforce is deprecating create-lwc-app. Instead, Salesforce is suggesting to create an LWC OSS app using Lighting Web Runtime. The command to create the LWC OSS app is npm init lwr I ran npm init ...
0 votes
0 answers
62 views

Lightning Web Component Open Source

When I try to create the project with lwc oss it comes to nothing, stops at the attached image part and does not progress. Do you know why this could be the problem?
0 votes
0 answers
211 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 ...
-1 votes
1 answer
439 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 ...
  • 27
0 votes
1 answer
1k 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 ...
  • 27
1 vote
1 answer
156 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-...
  • 21
0 votes
1 answer
377 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
1 answer
247 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
1 answer
2k 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","...
  • 207
0 votes
2 answers
2k 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
1 answer
438 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
1 answer
344 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
2 answers
4k 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"...
  • 17
0 votes
1 answer
262 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 ...
  • 363
1 vote
1 answer
378 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
1 answer
167 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 ...
  • 4,777
0 votes
1 answer
285 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
2 answers
285 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
1 answer
435 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 ...
  • 8,477
3 votes
1 answer
117 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 = []" ...
2 votes
1 answer
271 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
1 answer
100 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 ...
6 votes
1 answer
1k 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
1 answer
373 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
0 answers
842 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
0 answers
122 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 ...
  • 6,170
6 votes
2 answers
7k 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
1 answer
403 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 ...
6 votes
1 answer
669 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 it will ...