diff --git a/.eslintrc b/.eslintrc index 582979e4..699ccdb4 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,4 @@ { - "extends": ["@yandex-cloud/eslint-config", "@yandex-cloud/eslint-config/prettier"], + "extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier"], "root": true } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03318ca3..da177d85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,8 +8,8 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: yandex-cloud/ui-release-action@main + - uses: gravity-ui/release-action@v1 with: - github-token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }} - npm-token: ${{ secrets.YC_UI_BOT_NPM_TOKEN }} + github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }} + npm-token: ${{ secrets.GRAVITY_UI_BOT_NPM_TOKEN }} node-version: 14 diff --git a/.prettierrc.js b/.prettierrc.js index 8a43dc10..5da9c2e1 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1 +1 @@ -module.exports = require('@yandex-cloud/prettier-config'); +module.exports = require('@gravity-ui/prettier-config'); diff --git a/.stylelintrc b/.stylelintrc index 8a85407d..5135c9ad 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,3 +1,3 @@ { - "extends": ["@yandex-cloud/stylelint-config"] + "extends": ["@gravity-ui/stylelint-config", "@gravity-ui/stylelint-config/prettier"] } diff --git a/README.md b/README.md index 80061e57..56e40d02 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ -# @yandex-cloud/chartkit · [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) [![npm package](https://img.shields.io/npm/v/@yandex-cloud/chartkit)](https://www.npmjs.com/package/@yandex-cloud/chartkit) +# @gravity-ui/chartkit · [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) [![npm package](https://img.shields.io/npm/v/@gravity-ui/chartkit)](https://www.npmjs.com/package/@gravity-ui/chartkit) React component used to render charts based on any sources you need ## Install ```shell -npm i --save-dev @yandex-cloud/chartkit @gravity-ui/uikit @yandex-cloud/i18n +npm i --save-dev @gravity-ui/chartkit @gravity-ui/uikit @gravity-ui/i18n ``` ## Usage ```typescript import {ThemeProvider} from '@gravity-ui/uikit'; -import ChartKit, {settings} from '@yandex-cloud/chartkit'; -import {YagrPlugin, YagrWidgetData} from '@yandex-cloud/chartkit/build/plugins'; +import ChartKit, {settings} from '@gravity-ui/chartkit'; +import {YagrPlugin, YagrWidgetData} from '@gravity-ui/chartkit/build/plugins'; settings.set({plugins: [YagrPlugin]}); diff --git a/package-lock.json b/package-lock.json index 2c278166..e6a7492e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2528,12 +2528,153 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "@gravity-ui/eslint-config": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@gravity-ui/eslint-config/-/eslint-config-1.0.2.tgz", + "integrity": "sha512-988w7swpqZ8bwhPTNSVNvwJK3hJ4EBKA4dY7Sd0sTgXtjKLZhpff/I7Rncr76c8pgcXsvmHD2++kPnXe5oqx2Q==", + "dev": true, + "requires": { + "@babel/core": "7.16.0", + "@babel/eslint-parser": "7.16.3", + "@babel/preset-react": "7.16.0", + "@typescript-eslint/eslint-plugin": "5.3.1", + "@typescript-eslint/parser": "5.3.1", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "4.0.0", + "eslint-plugin-react": "7.27.0", + "eslint-plugin-react-hooks": "4.3.0", + "eslint-plugin-security": "1.4.0" + }, + "dependencies": { + "@babel/core": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", + "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.0", + "@babel/generator": "^7.16.0", + "@babel/helper-compilation-targets": "^7.16.0", + "@babel/helper-module-transforms": "^7.16.0", + "@babel/helpers": "^7.16.0", + "@babel/parser": "^7.16.0", + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.0", + "@babel/types": "^7.16.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + } + }, + "@babel/preset-react": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.0.tgz", + "integrity": "sha512-d31IFW2bLRB28uL1WoElyro8RH5l6531XfxMtCeCmp6RVAF1uTfxxUA0LH1tXl+psZdwfmIbwoG4U5VwgbhtLw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-react-display-name": "^7.16.0", + "@babel/plugin-transform-react-jsx": "^7.16.0", + "@babel/plugin-transform-react-jsx-development": "^7.16.0", + "@babel/plugin-transform-react-pure-annotations": "^7.16.0" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.1.tgz", + "integrity": "sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "5.3.1", + "@typescript-eslint/scope-manager": "5.3.1", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz", + "integrity": "sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.3.1", + "@typescript-eslint/visitor-keys": "5.3.1" + } + }, + "@typescript-eslint/types": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.1.tgz", + "integrity": "sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz", + "integrity": "sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.3.1", + "eslint-visitor-keys": "^3.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "@gravity-ui/i18n": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gravity-ui/i18n/-/i18n-1.0.0.tgz", "integrity": "sha512-KNYNhQjA9XqLo0RVEwNRqdA7/Lx5LLrNDtqWCvOGzXTwKU0GFNlWJaoSvk7u97apag23nTxgmpk551FlRCfehA==", "dev": true }, + "@gravity-ui/prettier-config": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gravity-ui/prettier-config/-/prettier-config-1.0.1.tgz", + "integrity": "sha512-VpTM+OiUMgXjwc7HBo0ekxBFghzELsnE/RFBYwbkbIqm0NrL4SiEPzne1IyEY/WsfI8om1hpn81t+qjGbicMSw==", + "dev": true + }, + "@gravity-ui/stylelint-config": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gravity-ui/stylelint-config/-/stylelint-config-1.0.1.tgz", + "integrity": "sha512-vm2ST9/5BmSsw3IcuU6inQZ38wbY19dk4ePkPo1UUzcFB39AKW+7JBnHlnWuwzrv0VwYCk8wahDFm7zkwHDurw==", + "dev": true, + "requires": { + "postcss-scss": "4.0.2", + "stylelint-config-prettier": "9.0.3", + "stylelint-order": "5.0.0", + "stylelint-prettier": "2.0.0", + "stylelint-scss": "4.0.0" + } + }, + "@gravity-ui/tsconfig": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gravity-ui/tsconfig/-/tsconfig-1.0.0.tgz", + "integrity": "sha512-C7uWrCTD6g+rvSFYTPaOMMf4YUWyA5eRSXsJ1AsigGc7yQC/lhugGNqeUo5efz+zpmZ80oG/BIJPCx0nIZizDg==", + "dev": true + }, "@gravity-ui/uikit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-3.0.2.tgz", @@ -7885,174 +8026,12 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, - "@yandex-cloud/eslint-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/eslint-config/-/eslint-config-1.1.0.tgz", - "integrity": "sha512-E23OVGdZYXGCRPix6b5kQICbrxxtd+Jf8Xz3Y2KzGomsS9vS2uEklrmywCorEuskk0Vri43HeNBMlKNwXnwHwg==", - "dev": true, - "requires": { - "@babel/core": "7.16.0", - "@babel/eslint-parser": "7.16.3", - "@babel/preset-react": "7.16.0", - "@typescript-eslint/eslint-plugin": "5.3.1", - "@typescript-eslint/parser": "5.3.1", - "eslint-config-prettier": "8.3.0", - "eslint-plugin-prettier": "4.0.0", - "eslint-plugin-react": "7.27.0", - "eslint-plugin-react-hooks": "4.3.0", - "eslint-plugin-security": "1.4.0" - }, - "dependencies": { - "@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - } - }, - "@babel/preset-react": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.0.tgz", - "integrity": "sha512-d31IFW2bLRB28uL1WoElyro8RH5l6531XfxMtCeCmp6RVAF1uTfxxUA0LH1tXl+psZdwfmIbwoG4U5VwgbhtLw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-react-display-name": "^7.16.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-react-jsx-development": "^7.16.0", - "@babel/plugin-transform-react-pure-annotations": "^7.16.0" - } - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.1.tgz", - "integrity": "sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "5.3.1", - "@typescript-eslint/scope-manager": "5.3.1", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz", - "integrity": "sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/visitor-keys": "5.3.1" - } - }, - "@typescript-eslint/types": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.1.tgz", - "integrity": "sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==", - "dev": true - }, - "@typescript-eslint/visitor-keys": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz", - "integrity": "sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.3.1", - "eslint-visitor-keys": "^3.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "@yandex-cloud/i18n": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/@yandex-cloud/i18n/-/i18n-0.5.0.tgz", "integrity": "sha512-Sj3zVgPS2Whw7PdjOZBIeokQlTYjCPC9oQf9sOFpOVz2msGAYdVUFEIvI4YjPCqLSO9K6HCgH+flUpZO8EKPgg==", "dev": true }, - "@yandex-cloud/prettier-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/prettier-config/-/prettier-config-1.0.0.tgz", - "integrity": "sha512-LOZ5aXJOAC2BUM7KjcCu4itjoPcDhQ4au+iQast7lylEO+QWMbDpXWOM8Hx74sPkOqW5STUeABp+Q7x3UoYKaA==", - "dev": true - }, - "@yandex-cloud/stylelint-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/stylelint-config/-/stylelint-config-1.2.0.tgz", - "integrity": "sha512-y3tPXCMdNxqgdj8TnDoulOKpIIOIRyGscm7jaw5LZuRF6lMY2HINm74YfQkQggVNYZ4GqH3vyTbQc3Ng5+AypQ==", - "dev": true, - "requires": { - "postcss-scss": "4.0.2", - "stylelint-config-prettier": "9.0.3", - "stylelint-order": "5.0.0", - "stylelint-prettier": "2.0.0", - "stylelint-scss": "4.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "stylelint-scss": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.0.0.tgz", - "integrity": "sha512-lIRhPqtI6I065EJ6aI4mWKsmQt8Krnu6aF9XSL9s8Nd2f/cDKImST0T9TfjnUul3ReKYWozkG9dlpNTZH2FB9w==", - "dev": true, - "requires": { - "lodash": "^4.17.15", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.0.6", - "postcss-value-parser": "^4.1.0" - } - } - } - }, - "@yandex-cloud/tsconfig": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/tsconfig/-/tsconfig-1.0.0.tgz", - "integrity": "sha512-fBMHxFHypWHa+IRzhLTcpSv9pg8sAyUhMqWkilhp/3M7PQ3pjAufkFGyqp6CSdb7a0u4p8pYL8CqG6ePV5OJRQ==", - "dev": true - }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -25549,6 +25528,19 @@ "prettier-linter-helpers": "^1.0.0" } }, + "stylelint-scss": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.0.0.tgz", + "integrity": "sha512-lIRhPqtI6I065EJ6aI4mWKsmQt8Krnu6aF9XSL9s8Nd2f/cDKImST0T9TfjnUul3ReKYWozkG9dlpNTZH2FB9w==", + "dev": true, + "requires": { + "lodash": "^4.17.15", + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-selector-parser": "^6.0.6", + "postcss-value-parser": "^4.1.0" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/package.json b/package.json index dc386496..d3d102ff 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,10 @@ "yagr": "1.3.7" }, "devDependencies": { + "@gravity-ui/eslint-config": "^1.0.2", + "@gravity-ui/prettier-config": "^1.0.1", + "@gravity-ui/stylelint-config": "^1.0.1", + "@gravity-ui/tsconfig": "^1.0.0", "@gravity-ui/uikit": "^3.0.2", "@storybook/addon-essentials": "^6.5.9", "@storybook/addon-knobs": "^6.4.0", @@ -29,11 +33,7 @@ "@types/react": "^17.0.48", "@types/react-dom": "^17.0.17", "@typescript-eslint/eslint-plugin": "^5.31.0", - "@yandex-cloud/eslint-config": "^1.1.0", "@yandex-cloud/i18n": "^0.5.0", - "@yandex-cloud/prettier-config": "^1.0.0", - "@yandex-cloud/stylelint-config": "^1.2.0", - "@yandex-cloud/tsconfig": "^1.0.0", "eslint": "^8.11.0", "gulp": "^4.0.2", "gulp-cli": "^2.3.0", diff --git a/src/plugins/indicator/renderer/IndicatorWidget.tsx b/src/plugins/indicator/renderer/IndicatorWidget.tsx index fa7de396..b6464ef0 100644 --- a/src/plugins/indicator/renderer/IndicatorWidget.tsx +++ b/src/plugins/indicator/renderer/IndicatorWidget.tsx @@ -23,7 +23,7 @@ const IndicatorWidget = React.forwardRef { - // TODO: swap to onRender after https://github.com/yandex-cloud/chartkit/issues/33 + // TODO: swap to onRender after https://github.com/gravity-ui/chartkit/issues/33 onLoad?.(); }); diff --git a/tsconfig.json b/tsconfig.json index 9492146f..015ada1f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@yandex-cloud/tsconfig/tsconfig", + "extends": "@gravity-ui/tsconfig/tsconfig", "compilerOptions": { "allowJs": true, "outDir": "build/esm",