# @commercetools-frontend-extensions/delete-resources-modal 中文文档

规范地址：https://npmcn.com/package/%40commercetools-frontend-extensions/delete-resources-modal/

版本：2\.1\.25
npm 元数据更新时间：2026-11-02T10:15:04.780Z
中文译文更新时间：2026-11-10T12:12:59.373Z
软件包许可：BSD-3-Clause

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40commercetools-frontend-extensions/delete-resources-modal
原文对照：https://npmcn.com/package/%40commercetools-frontend-extensions/delete-resources-modal/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：417 kB，30 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：未声明
- 运行依赖：17 个
- peer 依赖：react 17\.x \|\| 19\.x，redux 4\.x \|\| 5\.x，react-intl 6\.x \|\| 7\.x，react-redux 7\.x \|\| 9\.x，@commercetools-uikit/icons 19\.x \|\| 20\.x，@commercetools-frontend/sdk 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/i18n 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/sentry 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/ui-kit 19\.x \|\| 20\.x，@commercetools-frontend/constants 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/fullstory 2\.x \|\| 3\.x \|\| 4\.x，@commercetools-uikit/design-system 19\.x \|\| 20\.x，@commercetools-frontend/permissions 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/actions-global 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/application-shell 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/jest-preset-mc-app 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/application-components 24\.x \|\| 25\.x \|\| 27\.x，@commercetools-frontend/application-shell-connectors 24\.x \|\| 25\.x \|\| 27\.x
- 首次发布：2024-12-06T15:15:58.663Z
- 最新版本发布：2026-11-02T10:15:04.552Z
- 近 30 天下载量：3685（2026-10-11 至 2026-11-09，npm 官方下载统计）
- 已发布版本数：180（近 12 个月 129 个）

## 中文简介

删除资源的共享导入模式

## 安装

```sh
npm install @commercetools-frontend-extensions/delete-resources-modal
```

也可以使用：`pnpm add @commercetools-frontend-extensions/delete-resources-modal`、`yarn add @commercetools-frontend-extensions/delete-resources-modal`、`bun add @commercetools-frontend-extensions/delete-resources-modal`

## README

# @ 商业工具- 前端- 延伸/ 删除- 资源- 模式

在Merchant中心使用 CSV 删除资源的软件包 .

> 此库考虑到了您正在构建一个 Merchant Center 应用程序, 您可以找到文件 [这里](https://docs.commercetools.com/custom-applications/)。 。 。 . 这些组成部分遵循《公约》的同样原则 [用户界面Kit](https://github.com/commercetools/ui-kit) 组件.

## 开始

```bash
$ npm install --save @commercetools-frontend-extensions/delete-resources-modal

// or

$ yarn add @commercetools-frontend-extensions/delete-resources-modal
```

## 说明

删除资源模式是用于通过 CSV 文件删除资源的内部组件. 用这个 [进口服务](https://github.com/commercetools/commercetools-importer) 以创建同步工作.

## 使用量

```JSX
import DeleteRecourcesModal from '@commercetools-frontend-extensions/delete-resources-modal';

<DeleteRecourcesModal
  isOpen={true}
  resourceType="product"
  onClose={() => {}}
/>
```

## 属性

| 道具 | 类型 | 需求 | 默认 | 说明 |
| --- | --- | :-: | --- | --- |
| `isOpen` | `boolean` | ✅ |  | 控制删除资源模式是否打开或关闭 |
| `resourceType` | `string` | ✅ |  | 要删除的资源类型( 如 “ 产品 ” ) |
| `onClose` | `function` |  |  | 当请求关闭模式时( 点击覆盖、 点击关闭按钮或按) 触发的调回功能 `ESC`) (中文(简体) ). |

## 释放

此软件包使用 [`changesets`](https://github.com/atlassian/changesets) 向国家预防机制释放人员.

如果您想要发布新版本, 并需要最新修改 :

1.  添加一个更改列表 `pnpm changeset` 选择 `@commercetools-frontend-extensions/delete-resources-modal` 作为已修改的软件包.
2.  为了完成发行工作,将出现一些选项:
    -   `patch`: 使用此释放来修正或小修改
    -   `minor`: 使用此释放用于调试升级或中度更改
    -   `major`: 使用此发布来打破更改
3.  在选择选项后, 您需要为发布注释添加注释 。 我们建议对犯法者采用同样的方式.
    -   例如: `feat(utils): add utils for dates`
4.  推开 `changeset` 到您的分支和 GitHub 动作将检测 PR 包含影响已出版库的更改 .
5.  在公关合并后,将创建另一个公关 `Version Packages` 这也是GitHub Actions将发现的 向国家预防机制释放的人.
6.  确保一切正确,然后合并 `Version Packages` 公关.
7.  等待国家防范机制提供新版本,然后在CircleCI中部署自定义.

### 加那利释放

加那利版本在成功构建后通过CI自动发布到发行渠道并合并到 **主要** 树枝.

## i18n (英语)

Repo被配置为与Transifex的集成. i18n的流程与商贸中心使用的流程相同.

`pnpm i18n:build` 用于将新密钥添加到 transifex.

一旦公关合并到 `main` transifex将收到一份带有需要翻译的新密钥的通知(这就是为什么必须 `description` 财务报告和审定财务报表 `defaultMessage` 说明性足够.

每当翻译者完成翻译并按原样进行标记时,repo会收到一个PR(每个语言)来添加被翻译的信息.

一旦我们审查翻译的密钥正确无误并添加一个 `changeset` 我们可以合并公关 (别忘了部署自定义应用程序)

## 常见问题

### @commercetools-frontend-extensions/delete-resources-modal 是什么？

删除资源的共享导入模式

### 如何安装 @commercetools-frontend-extensions/delete-resources-modal？

在项目目录运行 npm install @commercetools-frontend-extensions/delete-resources-modal，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（17\.x \|\| 19\.x）、redux（4\.x \|\| 5\.x）、react-intl（6\.x \|\| 7\.x）、react-redux（7\.x \|\| 9\.x）、@commercetools-uikit/icons（19\.x \|\| 20\.x）、@commercetools-frontend/sdk（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/i18n（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/sentry（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/ui-kit（19\.x \|\| 20\.x）、@commercetools-frontend/constants（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/fullstory（2\.x \|\| 3\.x \|\| 4\.x）、@commercetools-uikit/design-system（19\.x \|\| 20\.x）、@commercetools-frontend/permissions（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/actions-global（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/application-shell（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/jest-preset-mc-app（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/application-components（24\.x \|\| 25\.x \|\| 27\.x）、@commercetools-frontend/application-shell-connectors（24\.x \|\| 25\.x \|\| 27\.x）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @commercetools-frontend-extensions/delete-resources-modal 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/commercetools-frontend-extensions\_\_delete-resources-modal 是否存在。

### @commercetools-frontend-extensions/delete-resources-modal 支持 ESM 还是 CommonJS？

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

### @commercetools-frontend-extensions/delete-resources-modal 可以商用吗？

@commercetools-frontend-extensions/delete-resources-modal 使用 BSD-3-Clause 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括，不构成法律意见，请以许可原文为准。

### @commercetools-frontend-extensions/delete-resources-modal 的下载量有多少？

根据 npm 官方下载统计，@commercetools-frontend-extensions/delete-resources-modal 在 2026/10/11 – 2026/11/09 这 30 天内被下载 3,685 次，日均约 123 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @commercetools-frontend-extensions/delete-resources-modal 还在维护吗？

最新版本 2\.1\.25 发布于 2026/11/02（8 天前）；至今共发布 180 个版本，其中过去 12 个月发布了 129 个；首次发布于 2024/12/06。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

