@commercetools-frontend-extensions/delete-resources-modal

中文文档
2.1.25发布于 2026/11/02BSD-3-ClauseESM + CJS近 30 天下载 3685

Shared import modal for deleting resources

原始使用文档
文档目录7 节
  1. Getting started
  2. Description
  3. Usage
  4. Properties
  5. Releasing
  6. Canary releases
  7. i18n

@commercetools-frontend-extensions/delete-resources-modal

A package for deleting resources using CSV in the Merchant Center.

This library takes into account that you are building a Merchant Center Applications which documentation you can find here. The components follow the same principles of the UIKit components.

Getting started

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

// or

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

Description

Delete resources modal is an internal component used to delete resources via CSV files. It uses Importer services to create async jobs.

Usage

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

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

Properties

PropsTypeRequiredDefaultDescription
isOpenboolean✅Controls whether the delete resources modal is open or closed
resourceTypestring✅Type of resources to be deleted (example, "product")
onClosefunctionA callback function triggered when the modal is requested to close (either by clicking on the overlay, clicking the close button or pressing ESC).

Releasing

This package uses changesets in order to do releases to NPM.

In case you want to publish a new version with the latest changes you need to:

  1. Add a changeset with pnpm changeset and select @commercetools-frontend-extensions/delete-resources-modal as the modified package.
  2. Some options would be appear in order to do the release:
    • patch: use this release for fixes or small changes
    • minor: use this release for depenency upgrades or medium changes
    • major: use this release for breaking changes
  3. After selecting the option you will need to add a comment for the release notes. We recommend to use the same format as for the commits.
    • e.g: feat(utils): add utils for dates
  4. Push the changeset to your branch and GitHub actions will detect that the PR contains changes that affect the published library.
  5. After the PR gets merged, another PR will be created called Version Packages which is the one that will be detected, again by GitHub Actions, to do a release to NPM.
  6. Make sure that everything is correct and then merge Version Packages PR.
  7. Wait until the new version is available in NPM and then deploy the custom in CircleCI.

Canary releases

Canary releases are automatically published to the distribution channel via CI following a successful build and merge to the main branch.

i18n

The repo is configured with an integration with Transifex. The process for i18n is the same as the Merchant Center uses.

pnpm i18n:build for adding the new keys to transifex.

Once the PR gets merged to main transifex will receive a notification with new keys that need to be translated (that's why is important that description and defaultMessage are descriptive enough).

Whenever the translators finish translations and mark them as done, the repo will receive a PR (per language) for adding translated messages.

Once we review that translated keys are correct and add a changeset we can merge the PR. (Don't forget to deploy the custom app)

版本与发布记录

@commercetools-frontend-extensions/delete-resources-modal 共发布 180 个版本,首次发布于 2024/12/06;过去 12 个月发布了 129 个版本。

版本发布日期距今
2.1.25latest2026/11/028 天前
2.1.242026/10/2120 天前
2.1.232026/10/1922 天前
2.1.222026/10/021 个月前
2.1.212026/09/301 个月前
2.1.202026/09/291 个月前

其他发布通道:bw-test-preview-deploy → 0.0.0-bw-test-preview-deploy-20250115163227,fec-202-react19 → 0.0.0-fec-202-react19-20250307142208,canary → 0.0.0-canary-20260918105445。

关于 @commercetools-frontend-extensions/delete-resources-modal 的常见问题

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

Shared import modal for deleting resources

如何安装 @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 和提交记录判断。