Skip to main content

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
0 answers
17 views

Using Lightning record form I want to add divider after each field like salesforce standard page

I want to add divider after each field in lightning record view form. HTML: <lightning-record-view-form object-api-name={object} record-id={recordId} onerror={handleError}> <...
priya's user avatar
  • 1
2 votes
0 answers
80 views

Lightning-base-components deprecated

The NPM package of "lightning-base-components" seems to have been deprecated. Do anybody know why and whether we can expect it to become available again later? We have several project where ...
Rasmus Hummersgaard's user avatar
0 votes
0 answers
37 views

After upgrading the "lightning-base-components": "^1.18.8-ssr", getting error shadowSupportMode static property is not available in this environment

After upgrading the "lightning-base-components" to version "^1.18.8-ssr", getting the below error Uncaught Error: Assert Violation: LightningRadioGroup is an invalid LWC component. ...
Eedanna's user avatar
0 votes
1 answer
249 views

I am trying to add linear gradient color to my svg stroke attribute within lwc but it is not working. Can anyone help with finding the problem?

in html i have this svg code. <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100px" height="100px"> <defs> ...
Sutanu Debnath's user avatar
2 votes
1 answer
745 views

I need to get Lightning page name using lwc

I need to get Lightning page name where I placed my lwc component, Suppose if place my lwc in record page and lightning page name is "accountpage" the page name i have to get in lwc
Abdul's user avatar
  • 31
0 votes
1 answer
155 views

salesforce-ux/design-system lib is not displaying slds icons in lwc oss

I am using LWC oss framework to play with lightning-base-components npm package. I have used 'salesforce-ux/design-system' to use SLDS.I could use base components as lightning web components with SLDS....
Baba Shaik's user avatar
1 vote
0 answers
161 views

Facing issue while installing and running LWR LWC OSS in my windows machine

I have installed LWC OSS from the official site https://lwc.dev/ Here is the steps I followed : Made sure I have node and npm installed Created a lwr project : npm init lwr@latest Installed ...
Akash Musale's user avatar
-1 votes
1 answer
73 views

How can we make the server side API details configurable after build in LWC OSS single page application?

I am trying to build an LWC OSS app. The Sever side logic is written using a express JS, which is currently running in local host. I need to create a build of my LWC oss application and need to make ...
vivekvismayam's user avatar
2 votes
1 answer
546 views

How can I compile a LWC to use it as a standard web component via customElements.define()?

I'm trying to compile a LWC to a standard web component, so that after importing it I could just use it as any standard HTML tag: <html> <script type="module" src="./...
Fabien Taillon's user avatar
0 votes
0 answers
356 views

LWCs that can work offline with JS library?

Is there a way to have LWC components that can work offline on Salesforce mobile? (The components in question will render diagrams etc). So far I have only found this.
Atlas Can's user avatar
  • 1,877
0 votes
2 answers
2k views

lightning-input type=datetime [Unable to set / consider the locale time for the validation as per the Locale of the User]

.html snippet (LWC Component) .js snippet (LWC Component) import { LightningElement, track } from 'lwc'; export default class DateTimePickerLightningInput extends LightningElement { @track today; ...
Salesforce Developer's user avatar
1 vote
1 answer
97 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 ...
Piotr Bokiej's user avatar
0 votes
1 answer
358 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"> ...
sunny roxx's user avatar
1 vote
1 answer
261 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. ...
Fabien Taillon's user avatar
3 votes
1 answer
183 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 ...
Fabien Taillon's user avatar
1 vote
1 answer
284 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 ...
Rahul Gawale's user avatar
  • 12.2k
0 votes
0 answers
580 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 ...
John's user avatar
  • 1
0 votes
1 answer
1k 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 ...
salesforce Developer's user avatar
0 votes
0 answers
233 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, ...
Unknown's user avatar
0 votes
1 answer
626 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 ...
JalilIrfan's user avatar
1 vote
1 answer
787 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) ...
Hot4RST's user avatar
  • 11
1 vote
0 answers
304 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?
Renatho Azevedo's user avatar
3 votes
1 answer
7k 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 ...
itsmebasti's user avatar
  • 6,515
4 votes
2 answers
958 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 ...
Rahul Gawale's user avatar
  • 12.2k
0 votes
1 answer
3k 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 ...
Somya Tiwari's user avatar
1 vote
1 answer
551 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 ...
Somya Tiwari's user avatar
1 vote
2 answers
645 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 ...
Somya Tiwari's user avatar
0 votes
1 answer
369 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 ...
Mack Brooks's user avatar
0 votes
0 answers
104 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"> <...
Prolay Chaudhury's user avatar
0 votes
1 answer
375 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 ...
Prolay Chaudhury's user avatar
0 votes
0 answers
95 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?
Martin Aguilera's user avatar
0 votes
0 answers
466 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 ...
Somnath Paul's user avatar
-1 votes
1 answer
2k 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 ...
James's user avatar
  • 37
0 votes
1 answer
4k 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 ...
James's user avatar
  • 37
1 vote
1 answer
292 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-...
Dave C's user avatar
  • 21
0 votes
1 answer
994 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){ ...
Shweta Mishra's user avatar
0 votes
1 answer
440 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 ...
paul.payne's user avatar
0 votes
1 answer
3k 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","...
Mangoski's user avatar
  • 208
0 votes
2 answers
4k 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 @...
Saksham Mahendru's user avatar
1 vote
1 answer
880 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/...
Bryan Anderson's user avatar
3 votes
1 answer
440 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 ...
user96190's user avatar
0 votes
2 answers
9k 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"...
lochana's user avatar
  • 27
0 votes
1 answer
384 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 ...
Badbaxx's user avatar
  • 385
1 vote
1 answer
750 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 ...
Max Goldfarb's user avatar
2 votes
1 answer
326 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 ...
Eduard's user avatar
  • 5,181
0 votes
1 answer
654 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/...
Navaprasad Reddy Ande's user avatar
1 vote
2 answers
518 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 ...
paul.payne's user avatar
2 votes
1 answer
688 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 ...
javanoob's user avatar
  • 8,917
3 votes
1 answer
130 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 = []" ...
Haroon Khan Mohammed's user avatar
2 votes
1 answer
989 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?
ashwin murugadass's user avatar