@equinor/fusion-wc-people

中文文档
2.2.6发布于 2026/10/22ISCTypeScriptESM + CJS构建来源已验证近 30 天下载 4015

Fusion People web components

原始使用文档
文档目录11 节
  1. fusion-wc-people
  2. Description
  3. Components
  4. Installation
  5. Examples
  6. Events
  7. PersonProvider
  8. Key Features
  9. Properties
  10. fwc-people-picker
  11. fwc-people-viewer

fusion-wc-people Published on npm

Description

Comprehensive web component library for selecting and viewing people/users with advanced search functionality and multiple display modes.

Components

<fwc-people-picker>

Interactive person selector with search, keyboard navigation, and multi-select support.

<fwc-people-viewer>

Display selected people in list or table format with customizable columns.

Installation

npm install @equinor/fusion-wc-people

Examples

<!-- Simple picker -->
<fwc-people-picker></fwc-people-picker>

<!-- Viewer with pre-loaded people -->
<fwc-people-viewer 
  resolveIds="azure-id-1,azure-id-2,azure-id-3"
  viewMode="table">
</fwc-people-viewer>

Events

The fwc-people-picker and fwc-people-viewer both share the same events.

<!-- 
  Selection events
  @selection-changed: PersonInfo[]
  @person-added: PersonInfo
  @person-removed: PersonInfo
-->
<fwc-people-picker
  @selection-changed=${handler}
  @person-added=${handler}
  @person-removed=${handler}
></fwc-people-picker>

PersonProvider

Its required to wrap these components with fwc-person-provider components.

The provider is usually delivered by the portal or cli. but you can also create a custom provider.

<!-- Wrap components in person provider -->
<fwc-person-provider>
  <fwc-people-picker></fwc-people-picker>
</fwc-person-provider>

Key Features

  • ⌨️ Keyboard navigation (Arrow keys, Enter, Escape)
  • 🔍 Debounced search (300ms)
  • 👤 Single/multiple selection modes
  • 📊 List and table view modes
  • 🎨 Avatar customization
  • 🔄 Service principal support

Properties

fwc-people-picker

PropertyTypeDescription
peoplePersonInfo[]Array of PersonInfo objects to set as selected people in the picker. Mostly used when using PersonPicker as a controlled component.
resolveIdsstring[]Array of person azureIds to pre-resolve and display as selected people. PS: will only resolve on mount.
placeholderstringPlaceholder text shown in the search input.
multiplebooleanWhether multiple people can be selected. Defaults to true.
showSelectedPeoplebooleanWhether to show selected people below the input. Defaults to true. This must be paired with multiple to be effective.
subtitlekeyof PersonInfoSubtitle text field from PersonInfo displayed in the People Pills.
secondarySubtitlekeyof PersonInfoSecondary subtitle field from PersonInfo displayed in the search result list.
noResultTitlestringTitle to show when suggest task has no results
noResultSubtitlestringSubtitle to show when suggest task has no results

fwc-people-viewer

PropertyTypeDescription
peoplePersonInfo[]Array of PersonInfo objects to display in the viewer.
resolveIdsstring[]Array of person azureIds to pre-resolve and display as selected people. PS: will only resolve on mount.
viewMode'list | table'The view mode to display the people in. Defaults to 'list'.
showViewModebooleanWhether to show the view mode selector. Defaults to true.
tableColumnsstring[]Array of column names to display in the table. Defaults to ['avatar', 'name', 'type', 'email', 'mobilePhone', 'jobTitle', 'department', 'manager', 'remove'].
subtitlekeyof PersonInfoSubtitle text field from PersonInfo displayed in the People Pills.

版本与发布记录

@equinor/fusion-wc-people 共发布 15 个版本,首次发布于 2026/02/24;过去 12 个月发布了 15 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.2.6latest2026/10/2222 天前
2.2.52026/08/123 个月前
2.2.42026/06/254 个月前
2.2.32026/06/234 个月前
2.2.22026/05/116 个月前
2.2.12026/05/116 个月前

关于 @equinor/fusion-wc-people 的常见问题

@equinor/fusion-wc-people 是什么?

Fusion People web components

如何安装 @equinor/fusion-wc-people?

在项目目录运行 npm install @equinor/fusion-wc-people,或使用 pnpm add / yarn add / bun add。

@equinor/fusion-wc-people 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@equinor/fusion-wc-people 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@equinor/fusion-wc-people 可以商用吗?

@equinor/fusion-wc-people 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@equinor/fusion-wc-people 的下载量有多少?

根据 npm 官方下载统计,@equinor/fusion-wc-people 在 2026/10/14 – 2026/11/12 这 30 天内被下载 4,015 次,日均约 134 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@equinor/fusion-wc-people 还在维护吗?

最新版本 2.2.6 发布于 2026/10/22(22 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/02/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。