MIT License

项目介绍

svierk/awesome-lwc-collection 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,采用 MIT License 许可证,目前获得 305 个 Star、74 次 Fork。

仓库全名
svierk/awesome-lwc-collection
开源许可证
MIT License
Star 数
305
Fork 数
74

README 摘要

⚡️ Awesome LWC Collection About the project The repository should provide a collection of ready-to-use Lightning Web Components that might help your SFDX project and is intended to grow over time. Additionally, it also includes an initial configuration of Prettier, linting rules, git hooks and unit tests as well as useful VS Code settings. The setup really focuses on LWC development. Components available Each…

完整内容见 GitHub 原始 README 或本页 。

常见问题

awesome-lwc-collection 用什么语言开发?

主要使用 JavaScript 编写,采用 MIT License 许可证,目前有 305 个 Star。

awesome-lwc-collection 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 awesome-lwc-collection 的源码?

可以直接克隆仓库:git clone https://github.com/svierk/awesome-lwc-collection.git,默认分支为 main;安装与运行步骤见仓库 README。

awesome-lwc-collection 最近还在维护吗?

仓库最近一次更新为 5 小时前,当前没有未关闭的 Issue;Star 数为 305,可作为社区活跃度的参考。

关于

⚡️ A collection of ready-to-use Lightning Web Components that might help your SFDX project

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
463
价值分
206
活跃状态
活跃

语言占比

Apex
CSS
HTML
JavaScript

README

⚡️ Awesome LWC Collection

Validation Quality Gate Status codecov FOSSA Status

awesome-lwc-collection

About the project

The repository should provide a collection of ready-to-use Lightning Web Components that might help your SFDX project and is intended to grow over time. Additionally, it also includes an initial configuration of Prettier, linting rules, git hooks and unit tests as well as useful VS Code settings. The setup really focuses on LWC development.

Components available

Each component has a dedicated page - with a screenshot, a full attribute reference and usage examples - in the component catalog, built automatically from the component READMEs and grouped into the same categories used below. Every listed component ships with corresponding unit tests and docs.

Explore the component catalog

Data & Tables

Component Description
Custom Datatable Custom Datatable A basic custom datatable with different configuration options.
GraphQL Datatable GraphQL Datatable A custom datatable powered by the GraphQL wire adapter instead of Apex.
CSV Importer CSV Importer Imports CSV files into Salesforce in steps: the file is read and previewed, then its columns are mapped to the fields of an object.
Multi Select Combobox Multi Select Combobox Combobox with different configuration options that also supports multi select.

Files & Documents

Component Description
Base64 To PDF Base64 To PDF A simple utility for Base64 encoded strings to decode and download them as PDF file.
Content Document Table Content Document Table A generic table to show shared documents from a Salesforce Files library.
Visualforce To PDF Visualforce To PDF A simple utility for displaying Visualforce based PDF documents.

Maps & Charts

Component Description
Custom Map View Custom Map View Configurable map component for displaying locations via Google Maps API.
GraphQL Map View GraphQL Map View Configurable map component for displaying locations via the GraphQL wire adapter.
Org Chart Viewer Org Chart Viewer An interactive organization chart with search, expand/collapse and PNG export, powered by d3-org-chart.
Render 3D Elements Render 3D Elements A simple demo component for rendering 3D elements using Three.js.

Media & Input

Component Description
Signature Pad Signature Pad A canvas-based signature capture component with mouse and touch support.
Take User Profile Picture Take User Profile Picture Lets Salesforce users take a new profile photo with their device's camera.
Camera Capture Camera Capture A live camera view that takes photos, to build into your own components.
QR Code Generator QR Code Generator A basic QR Code Generator with optional logo overlay using the external QRCode.js library.
Custom Carousel Custom Carousel A simple custom carousel with different configuration options.
Drag & Drop Drag & Drop A drag and drop building block based on the HTML Drag and Drop API.

Fundamentals & Integration

Component Description
iFrame iFrame A custom iFrame component with different configuration options.
Open Record Page Flow Action Open Record Page Flow Action Component to forward to a record page from flow.

You can also find many more useful and reusable Lightning Web Components in the official lwc-recipes.

Prerequisites

To use this library and try out the components in one of your orgs or locally, the Node version specified in the package.json and the latest version of the Salesforce CLI should already be installed.

Getting started

Install all dependencies

To get everything up and runnning, you need to open the repository with VS Code, install all the recommended extensions and run the following command to install all required dependencies:

npm install

Authorize an org

You need to authorize an org before you can push the components or use the local development server. Even for trying the components locally this is necessary because all data requests using Lightning Data Service or Apex will get proxied to the Salesforce org and returned in the local components. In VS Code the authorization can be done by pressing Command + Shift + P, enter “sfdx”, and select SFDX: Authorize an Org.

Alternatively you can also run the following command from the command line:

sf org login web

Deploy components to an org

To deploy all components of this project to the currently connected org execute:

sf project deploy start

Local development

Local Dev for Lightning Web Components lets you create and modify components leveraging a real-time browser preview: Preview Components with Local Dev

To preview a single component in isolation against the connected org run:

npm run server:lwc

Quality measures

Git hooks

The project includes client-side pre-commit git hooks using husky and lint-staged. After installing all project dependencies, Prettier, Linter and unit tests are automatically executed before each commit.

Prettier for code formatting

Run Prettier to check all files for formatting issues:

npm run prettier

Code linting with ESLint

Run ESLint to check for linting issues:

npm run lint

Unit tests with Jest

To execute all unit tests only once run:

npm run test:unit

To execute all unit tests in watch mode for development run:

npm run test:unit:watch

To execute all unit tests with generated code coverage run:

npm run test:unit:coverage

Documentation with VitePress

The component documentation site is built with VitePress directly from the individual component READMEs, so it stays in sync automatically and is redeployed to GitHub Pages on every change to main.

The site is also AI-friendly, for agents that read the docs while they work: llms.txt as an index of all components, llms-full.txt with every component page in one file, and a Markdown copy of each page next to its HTML (append .md to the page URL).

For AI coding agents, svierk/salesforce-skills packages Salesforce know-how as agent skills that support everyday development work on Salesforce projects.

To preview the docs site locally with hot reload run:

npm run docs:dev

To build the static site (as it is published) run:

npm run docs:build

Contributing

Contributions are welcome - whether it’s a bug fix, an improvement or a brand-new component. Please read the contributing guide to get started and note the code of conduct. Security issues should be reported privately as described in the security policy.

评论

暂无评论