@commercetools-frontend-extensions/export-resources-modal 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) commercetools GmbH
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @commercetools-frontend-extensions/export-resources-modal
2
+
3
+ Package for exporting resources from Merchant Center Applications.
4
+
5
+ > This library takes into account that you are building a Merchant Center Applications which documentation you can find [here](https://docs.commercetools.com/custom-applications/).
6
+
7
+ > The components follow the same principles of the [UIKit](https://github.com/commercetools/ui-kit) components.
8
+
9
+ ## Getting started
10
+
11
+ ```bash
12
+ $ npm install --save @commercetools-frontend-extensions/export-resources-modal
13
+
14
+ // or
15
+
16
+ $ yarn add @commercetools-frontend-extensions/export-resources-modal
17
+ ```
18
+
19
+ ## Releasing
20
+
21
+ This package uses [`changesets`](https://github.com/atlassian/changesets) in order to do releases to NPM.
22
+
23
+ In case you want to publish a new version with the latest changes you need to:
24
+
25
+ 1. Add a changeset with `yarn changeset` and select `@commercetools-frontend-extensions/export-resources-modal` as the modified package.
26
+ 2. Some options would be appear in order to do the release:
27
+ - `patch`: use this release for fixes or small changes
28
+ - `minor`: use this release for depenency upgrades or medium changes
29
+ - `major`: use this release for breaking changes
30
+ 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.
31
+ - e.g: `feat(utils): add utils for dates`
32
+ 4. Push the `changeset` to your branch and GitHub actions will detect that the PR contains changes that affect the published library.
33
+ 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.
34
+ 6. Make sure that everything is correct and then merge `Version Packages` PR.
35
+ 7. Wait until the new version is available in NPM and then deploy the custom in CircleCI.
36
+
37
+ ## i18n
38
+
39
+ The repo is configured with an integration with Transifex. The process for i18n is the same as the Merchant Center uses.
40
+
41
+ `yarn i18n:build` for adding the new keys to transifex.
42
+
43
+ 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).
44
+
45
+ Whenever the translators finish translations and mark them as done, the repo will receive a PR (per language) for adding translated messages.
46
+
47
+ 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)
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
6
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
+
10
+ var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
11
+
12
+ function ExportResourcesModal(props) {
13
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
14
+ children: [jsxRuntime.jsx("h3", {
15
+ children: "Hello from Export Resources Modal"
16
+ }), "Props:", jsxRuntime.jsx("div", {
17
+ children: _JSON$stringify__default["default"](props)
18
+ })]
19
+ });
20
+ }
21
+
22
+ exports["default"] = ExportResourcesModal;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./commercetools-frontend-extensions-export-resources-modal.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./commercetools-frontend-extensions-export-resources-modal.cjs.dev.js");
7
+ }
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
6
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
+
10
+ var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
11
+
12
+ function ExportResourcesModal(props) {
13
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
14
+ children: [jsxRuntime.jsx("h3", {
15
+ children: "Hello from Export Resources Modal"
16
+ }), "Props:", jsxRuntime.jsx("div", {
17
+ children: _JSON$stringify__default["default"](props)
18
+ })]
19
+ });
20
+ }
21
+
22
+ exports["default"] = ExportResourcesModal;
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@commercetools-frontend-extensions/export-resources-modal",
3
+ "description": "Shared export modal for exporting resources",
4
+ "version": "0.1.0",
5
+ "license": "BSD-3-Clause",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "main": "dist/commercetools-frontend-extensions-export-resources-modal.cjs.js",
10
+ "files": ["dist", "package.json", "LICENSE", "README.md"],
11
+ "scripts": {
12
+ "build": "rimraf dist && preconstruct build",
13
+ "build:bundles": "yarn build",
14
+ "build:watch": "preconstruct watch"
15
+ },
16
+ "dependencies": {
17
+ "@babel/runtime": "7.19.0",
18
+ "@babel/runtime-corejs3": "7.19.1",
19
+ "@emotion/react": "11.10.4",
20
+ "@emotion/styled": "11.10.4",
21
+ "react": "17.0.2"
22
+ },
23
+ "devDependencies": {
24
+ "@commercetools-frontend/application-shell": "21.14.0",
25
+ "@preconstruct/cli": "^2.2.1",
26
+ "rimraf": "3.0.2"
27
+ }
28
+ }