1.3.19 • Published 9 months ago

@commercetools-frontend-extensions/import-resources-modal v1.3.19

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
9 months ago

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

Package for importing resources into Merchant Center Applications.

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/import-resources-modal

// or

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

Description

Import Resources Modal is an internal component used to import resources from csv files, it's using Importer Services to create async import Job.

Usage

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

<ImportResourcesModal
  isOpen={true}
  resourceTypes={["category"]}
  onStartImportSuccess={() => {}}
  onClose={() => {}}
/>

Properties

PropsTypeRequiredDefaultDescription
isOpenbooleanControls whether the import modal is open or closed
resourceTypesstring[]Types of resources, for example: category, product... If multiple types are provided, the user can select from the UI which resource type to upload
onStartImportSuccessfunctionA callback function invoked when the import process successfully starts
onClosefunctionA callback function triggered when the modal is requested to close (either by clicking on the overlay, clicking the close button or pressing ESC). This function is also invoked after an import process, irrespective of whether it was successful or failed

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/import-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)

1.3.19

9 months ago

1.3.10

9 months ago

1.3.13

9 months ago

1.3.14

9 months ago

1.3.11

9 months ago

1.3.12

9 months ago

1.3.17

9 months ago

1.3.18

9 months ago

1.3.15

9 months ago

1.3.16

9 months ago

1.3.9

9 months ago

1.3.8

9 months ago

1.3.7

9 months ago

1.3.6

10 months ago

1.3.5

10 months ago

1.3.4

10 months ago

1.3.3

10 months ago

1.2.0

12 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.2.8

11 months ago

1.2.7

11 months ago

1.2.6

11 months ago

1.2.5

11 months ago

1.0.7

1 year ago

1.2.4

11 months ago

1.0.6

1 year ago

1.2.3

11 months ago

1.0.5

1 year ago

1.2.2

11 months ago

1.0.4

1 year ago

1.2.1

12 months ago

1.0.3

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.3.2

11 months ago

1.3.1

11 months ago

1.3.0

11 months ago

0.0.1

1 year ago