From fc626699a0d5339abbbf9a59c0ac71ccdb7a35b3 Mon Sep 17 00:00:00 2001 From: Jean-Michel FRANCOIS Date: Tue, 9 Apr 2024 10:55:53 +0200 Subject: [PATCH 01/52] feat(ARCH-737): add ESM support --- packages/assets-api/package.json | 16 +- packages/assets-api/tsconfig.esm.json | 9 + packages/playground/index.html | 13 + packages/playground/package.json | 4 + ...ormSandbox.js => ComponentFormSandbox.jsx} | 0 .../components/{Dataviz.js => Dataviz.jsx} | 11 +- .../{FacetedSearch.js => FacetedSearch.jsx} | 8 +- .../app/components/{Icons.js => Icons.jsx} | 6 +- .../src/app/components/{List.js => List.jsx} | 5 +- packages/playground/src/app/i18n.js | 5 +- .../src/app/{index.js => index.jsx} | 0 packages/playground/vite.config.js | 7 + yarn.lock | 444 +++++++++++++++++- 13 files changed, 504 insertions(+), 24 deletions(-) create mode 100644 packages/assets-api/tsconfig.esm.json create mode 100644 packages/playground/index.html rename packages/playground/src/app/components/{ComponentFormSandbox.js => ComponentFormSandbox.jsx} (100%) rename packages/playground/src/app/components/{Dataviz.js => Dataviz.jsx} (97%) rename packages/playground/src/app/components/{FacetedSearch.js => FacetedSearch.jsx} (100%) rename packages/playground/src/app/components/{Icons.js => Icons.jsx} (100%) rename packages/playground/src/app/components/{List.js => List.jsx} (95%) rename packages/playground/src/app/{index.js => index.jsx} (100%) create mode 100644 packages/playground/vite.config.js diff --git a/packages/assets-api/package.json b/packages/assets-api/package.json index 8d7efc6110..d719ee305c 100644 --- a/packages/assets-api/package.json +++ b/packages/assets-api/package.json @@ -3,11 +3,25 @@ "description": "A set of API designed to access assets using CDN", "types": "lib/index.d.ts", "main": "lib/index.js", - "mainSrc": "src/index.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "pre-release": "talend-scripts build --umd && talend-scripts build --umd --dev", "build:lib": "talend-scripts build", + "build:lib:es": "tsc --project ./tsconfig.esm.json", "start": "echo nothing to start", "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", diff --git a/packages/assets-api/tsconfig.esm.json b/packages/assets-api/tsconfig.esm.json new file mode 100644 index 0000000000..f6997ffa57 --- /dev/null +++ b/packages/assets-api/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "@talend/scripts-config-typescript/tsconfig.json", + "include": ["src/**/*"], + "compilerOptions": { + "declaration": true, + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/playground/index.html b/packages/playground/index.html new file mode 100644 index 0000000000..488fb5304e --- /dev/null +++ b/packages/playground/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + + +
+ + + diff --git a/packages/playground/package.json b/packages/playground/package.json index bdc82ab858..966c7f188c 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -3,12 +3,14 @@ "version": "2.4.4", "description": "Showcase Talend/UI", "private": true, + "type": "module", "main": "app/index.js", "scripts": { "build": "cross-env BASENAME='/playground' talend-scripts build", "test": "echo nothing to test in playground", "test:demo:umd": "cross-env BASENAME='/playground/' INITIATOR_URL='/playground/inject.js' talend-scripts build --prod", "start": "cross-env BASENAME='/' INITIATOR_URL='/inject.js' talend-scripts start --open http://localhost:3000", + "start:vite": "vite dev", "start-dist": "talend-scripts build && node serve-dist", "lint": "talend-scripts lint" }, @@ -29,12 +31,14 @@ "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-stylelint": "^4.1.1", + "@vitejs/plugin-react": "^4.2.1", "body-parser": "1.20.1", "compression": "^1.7.4", "copy-webpack-plugin": "^11.0.0", "cross-env": "^7.0.3", "express": "^4.18.2", "i18next-http-backend": "^1.4.5", + "vite": "^5.2.8", "webpack": "^5.90.3" }, "dependencies": { diff --git a/packages/playground/src/app/components/ComponentFormSandbox.js b/packages/playground/src/app/components/ComponentFormSandbox.jsx similarity index 100% rename from packages/playground/src/app/components/ComponentFormSandbox.js rename to packages/playground/src/app/components/ComponentFormSandbox.jsx diff --git a/packages/playground/src/app/components/Dataviz.js b/packages/playground/src/app/components/Dataviz.jsx similarity index 97% rename from packages/playground/src/app/components/Dataviz.js rename to packages/playground/src/app/components/Dataviz.jsx index 5a757c7efd..147fdeb9c5 100644 --- a/packages/playground/src/app/components/Dataviz.js +++ b/packages/playground/src/app/components/Dataviz.jsx @@ -1,4 +1,9 @@ -import { useState, useEffect } from 'react'; +import { useEffect, useState } from 'react'; + +import { ErrorBoundary } from '@talend/react-cmf'; +import Layout from '@talend/react-components/lib/Layout'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; import { GeoChart, getGeoChartConfig, @@ -7,10 +12,6 @@ import { KeyValueTooltip, ValueType, } from '@talend/react-dataviz'; -import { ErrorBoundary } from '@talend/react-cmf'; -import Layout from '@talend/react-components/lib/Layout'; -import SidePanel from '@talend/react-containers/lib/SidePanel'; -import HeaderBar from '@talend/react-containers/lib/HeaderBar'; const data = [ { diff --git a/packages/playground/src/app/components/FacetedSearch.js b/packages/playground/src/app/components/FacetedSearch.jsx similarity index 100% rename from packages/playground/src/app/components/FacetedSearch.js rename to packages/playground/src/app/components/FacetedSearch.jsx index 5a54179197..13ccb5fe4c 100644 --- a/packages/playground/src/app/components/FacetedSearch.js +++ b/packages/playground/src/app/components/FacetedSearch.jsx @@ -1,9 +1,9 @@ -import FacetedSearch from '@talend/react-faceted-search'; -import Layout from '@talend/react-components/lib/Layout'; -import SidePanel from '@talend/react-containers/lib/SidePanel'; -import HeaderBar from '@talend/react-containers/lib/HeaderBar'; // eslint-disable-next-line @talend/import-depth import * as badges from '@talend/react-faceted-search/stories/badgesDefinitions'; +import Layout from '@talend/react-components/lib/Layout'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; +import FacetedSearch from '@talend/react-faceted-search'; function action(msg) { // eslint-disable-next-line no-console diff --git a/packages/playground/src/app/components/Icons.js b/packages/playground/src/app/components/Icons.jsx similarity index 100% rename from packages/playground/src/app/components/Icons.js rename to packages/playground/src/app/components/Icons.jsx index d036f0d09d..0a66b44309 100644 --- a/packages/playground/src/app/components/Icons.js +++ b/packages/playground/src/app/components/Icons.jsx @@ -1,8 +1,8 @@ -import Layout from '@talend/react-components/lib/Layout'; -import SidePanel from '@talend/react-containers/lib/SidePanel'; -import HeaderBar from '@talend/react-containers/lib/HeaderBar'; // eslint-disable-next-line @talend/import-depth import logo from '@talend/icons/src/svg/products/logo.svg'; +import Layout from '@talend/react-components/lib/Layout'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; export function Icons() { return ( diff --git a/packages/playground/src/app/components/List.js b/packages/playground/src/app/components/List.jsx similarity index 95% rename from packages/playground/src/app/components/List.js rename to packages/playground/src/app/components/List.jsx index ce64b27691..9022201f84 100644 --- a/packages/playground/src/app/components/List.js +++ b/packages/playground/src/app/components/List.jsx @@ -1,7 +1,6 @@ /* eslint-disable no-console */ - -import { List, Layout, SubHeaderBar } from '@talend/react-components'; -import { SidePanel, HeaderBar } from '@talend/react-containers'; +import { Layout, List, SubHeaderBar } from '@talend/react-components'; +import { HeaderBar, SidePanel } from '@talend/react-containers'; const props = { id: 'talend', diff --git a/packages/playground/src/app/i18n.js b/packages/playground/src/app/i18n.js index 235ce260f9..238619f77d 100644 --- a/packages/playground/src/app/i18n.js +++ b/packages/playground/src/app/i18n.js @@ -1,8 +1,11 @@ /* eslint-disable @talend/import-depth */ + /* eslint-disable import/no-extraneous-dependencies */ -import i18next from 'i18next'; import { initReactI18next } from 'react-i18next'; + +import i18next from 'i18next'; import HttpApi from 'i18next-http-backend'; + import assetsApi from '@talend/assets-api'; import { namespaces as tuiComponentsNamespaces } from '@talend/locales-tui-components/namespaces'; import { namespaces as tuiContainersNamespaces } from '@talend/locales-tui-containers/namespaces'; diff --git a/packages/playground/src/app/index.js b/packages/playground/src/app/index.jsx similarity index 100% rename from packages/playground/src/app/index.js rename to packages/playground/src/app/index.jsx diff --git a/packages/playground/vite.config.js b/packages/playground/vite.config.js new file mode 100644 index 0000000000..6acc960f63 --- /dev/null +++ b/packages/playground/vite.config.js @@ -0,0 +1,7 @@ +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}); diff --git a/yarn.lock b/yarn.lock index 5519a8c8b0..ab5f985f5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -193,6 +193,14 @@ "@babel/highlight" "^7.23.4" chalk "^2.4.2" +"@babel/code-frame@^7.24.1", "@babel/code-frame@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" + integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== + dependencies: + "@babel/highlight" "^7.24.2" + picocolors "^1.0.0" + "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" @@ -240,6 +248,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.23.5": + version "7.24.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.4.tgz#1f758428e88e0d8c563874741bc4ffc4f71a4717" + integrity sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.4" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.24.4" + "@babel/parser" "^7.24.4" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.1" + "@babel/types" "^7.24.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/eslint-parser@^7.23.10": version "7.23.10" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.10.tgz#2d4164842d6db798873b40e0c4238827084667a2" @@ -268,6 +297,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.24.1", "@babel/generator@^7.24.4": + version "7.24.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.4.tgz#1fc55532b88adf952025d5d2d1e71f946cb1c498" + integrity sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw== + dependencies: + "@babel/types" "^7.24.0" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" @@ -457,6 +496,15 @@ "@babel/traverse" "^7.24.0" "@babel/types" "^7.24.0" +"@babel/helpers@^7.24.4": + version "7.24.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.4.tgz#dc00907fd0d95da74563c142ef4cd21f2cb856b6" + integrity sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw== + dependencies: + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.1" + "@babel/types" "^7.24.0" + "@babel/highlight@^7.23.4": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" @@ -466,6 +514,16 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" + integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" @@ -476,6 +534,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.0.tgz#26a3d1ff49031c53a97d03b604375f028746a9ac" integrity sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg== +"@babel/parser@^7.24.1", "@babel/parser@^7.24.4": + version "7.24.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.4.tgz#234487a110d89ad5a3ed4a8a566c36b9453e8c88" + integrity sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" @@ -1050,6 +1113,20 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.22.5" +"@babel/plugin-transform-react-jsx-self@^7.23.3": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.1.tgz#a21d866d8167e752c6a7c4555dba8afcdfce6268" + integrity sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + +"@babel/plugin-transform-react-jsx-source@^7.23.3": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.1.tgz#a2dedb12b09532846721b5df99e52ef8dc3351d0" + integrity sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-transform-react-jsx@^7.22.15", "@babel/plugin-transform-react-jsx@^7.22.5": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz#393f99185110cea87184ea47bcb4a7b0c2e39312" @@ -1368,6 +1445,22 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" + integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== + dependencies: + "@babel/code-frame" "^7.24.1" + "@babel/generator" "^7.24.1" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.24.1" + "@babel/types" "^7.24.0" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@7.17.0": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" @@ -1810,116 +1903,231 @@ resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz#08de79f54eb3406f9daaf77c76e35313da963963" integrity sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw== +"@esbuild/aix-ppc64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537" + integrity sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g== + "@esbuild/android-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== +"@esbuild/android-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz#db1c9202a5bc92ea04c7b6840f1bbe09ebf9e6b9" + integrity sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg== + "@esbuild/android-arm@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== +"@esbuild/android-arm@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz#3b488c49aee9d491c2c8f98a909b785870d6e995" + integrity sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w== + "@esbuild/android-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== +"@esbuild/android-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz#3b1628029e5576249d2b2d766696e50768449f98" + integrity sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg== + "@esbuild/darwin-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== +"@esbuild/darwin-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz#6e8517a045ddd86ae30c6608c8475ebc0c4000bb" + integrity sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA== + "@esbuild/darwin-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== +"@esbuild/darwin-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz#90ed098e1f9dd8a9381695b207e1cff45540a0d0" + integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA== + "@esbuild/freebsd-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== +"@esbuild/freebsd-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz#d71502d1ee89a1130327e890364666c760a2a911" + integrity sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw== + "@esbuild/freebsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== +"@esbuild/freebsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz#aa5ea58d9c1dd9af688b8b6f63ef0d3d60cea53c" + integrity sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw== + "@esbuild/linux-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== +"@esbuild/linux-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz#055b63725df678379b0f6db9d0fa85463755b2e5" + integrity sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A== + "@esbuild/linux-arm@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== +"@esbuild/linux-arm@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz#76b3b98cb1f87936fbc37f073efabad49dcd889c" + integrity sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg== + "@esbuild/linux-ia32@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== +"@esbuild/linux-ia32@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz#c0e5e787c285264e5dfc7a79f04b8b4eefdad7fa" + integrity sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig== + "@esbuild/linux-loong64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== +"@esbuild/linux-loong64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz#a6184e62bd7cdc63e0c0448b83801001653219c5" + integrity sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ== + "@esbuild/linux-mips64el@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== +"@esbuild/linux-mips64el@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz#d08e39ce86f45ef8fc88549d29c62b8acf5649aa" + integrity sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA== + "@esbuild/linux-ppc64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== +"@esbuild/linux-ppc64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz#8d252f0b7756ffd6d1cbde5ea67ff8fd20437f20" + integrity sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg== + "@esbuild/linux-riscv64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== +"@esbuild/linux-riscv64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz#19f6dcdb14409dae607f66ca1181dd4e9db81300" + integrity sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg== + "@esbuild/linux-s390x@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== +"@esbuild/linux-s390x@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz#3c830c90f1a5d7dd1473d5595ea4ebb920988685" + integrity sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ== + "@esbuild/linux-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== +"@esbuild/linux-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz#86eca35203afc0d9de0694c64ec0ab0a378f6fff" + integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw== + "@esbuild/netbsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== +"@esbuild/netbsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz#e771c8eb0e0f6e1877ffd4220036b98aed5915e6" + integrity sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ== + "@esbuild/openbsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== +"@esbuild/openbsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz#9a795ae4b4e37e674f0f4d716f3e226dd7c39baf" + integrity sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ== + "@esbuild/sunos-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== +"@esbuild/sunos-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz#7df23b61a497b8ac189def6e25a95673caedb03f" + integrity sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w== + "@esbuild/win32-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== +"@esbuild/win32-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz#f1ae5abf9ca052ae11c1bc806fb4c0f519bacf90" + integrity sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ== + "@esbuild/win32-ia32@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== +"@esbuild/win32-ia32@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz#241fe62c34d8e8461cd708277813e1d0ba55ce23" + integrity sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ== + "@esbuild/win32-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== +"@esbuild/win32-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc" + integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -2271,6 +2479,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -2281,6 +2498,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/source-map@^0.3.3": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" @@ -2302,6 +2524,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@jsdoc/salty@^0.2.1": version "0.2.7" resolved "https://registry.yarnpkg.com/@jsdoc/salty/-/salty-0.2.7.tgz#98ddce519fd95d7bee605a658fabf6e8cbf7556d" @@ -2949,6 +3179,81 @@ resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.2.1.tgz#9403f51c17cae37edf870c6bc0c81c1ece5ccef8" integrity sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA== +"@rollup/rollup-android-arm-eabi@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.0.tgz#57936f50d0335e2e7bfac496d209606fa516add4" + integrity sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w== + +"@rollup/rollup-android-arm64@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.0.tgz#81bba83b37382a2d0e30ceced06c8d3d85138054" + integrity sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q== + +"@rollup/rollup-darwin-arm64@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.0.tgz#a371bd723a5c4c4a33376da72abfc3938066842b" + integrity sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA== + +"@rollup/rollup-darwin-x64@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.0.tgz#8baf2fda277c9729125017c65651296282412886" + integrity sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.0.tgz#822830a8f7388d5b81d04c69415408d3bab1079b" + integrity sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA== + +"@rollup/rollup-linux-arm64-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.0.tgz#e20fbe1bd4414c7119f9e0bba8ad17a6666c8365" + integrity sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A== + +"@rollup/rollup-linux-arm64-musl@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.0.tgz#13f475596a62e1924f13fe1c8cf2c40e09a99b47" + integrity sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.0.tgz#6a431c441420d1c510a205e08c6673355a0a2ea9" + integrity sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA== + +"@rollup/rollup-linux-riscv64-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.0.tgz#53d9448962c3f9ed7a1672269655476ea2d67567" + integrity sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw== + +"@rollup/rollup-linux-s390x-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.0.tgz#95f0c133b324da3e7e5c7d12855e0eb71d21a946" + integrity sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA== + +"@rollup/rollup-linux-x64-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.0.tgz#820ada75c68ead1acc486e41238ca0d8f8531478" + integrity sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg== + +"@rollup/rollup-linux-x64-musl@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.0.tgz#ca74f22e125efbe94c1148d989ef93329b464443" + integrity sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg== + +"@rollup/rollup-win32-arm64-msvc@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.0.tgz#269023332297051d037a9593dcba92c10fef726b" + integrity sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ== + +"@rollup/rollup-win32-ia32-msvc@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.0.tgz#d7701438daf964011fd7ca33e3f13f3ff5129e7b" + integrity sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw== + +"@rollup/rollup-win32-x64-msvc@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.0.tgz#0bb7ac3cd1c3292db1f39afdabfd03ccea3a3d34" + integrity sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag== + "@rooks/use-mutation-observer@4.11.2": version "4.11.2" resolved "https://registry.yarnpkg.com/@rooks/use-mutation-observer/-/use-mutation-observer-4.11.2.tgz#a0466c4338e0a4487ea19253c86bcd427c29f4af" @@ -4123,7 +4428,7 @@ "@types/babel__core" "*" "@types/prettier" "^2.0.0" -"@types/babel__core@*", "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14", "@types/babel__core@^7.18.0": +"@types/babel__core@*", "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14", "@types/babel__core@^7.18.0", "@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== @@ -4508,7 +4813,7 @@ dependencies: "@types/estree" "*" -"@types/estree@*", "@types/estree@^1.0.0", "@types/estree@^1.0.5": +"@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.0", "@types/estree@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== @@ -5220,6 +5525,17 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@vitejs/plugin-react@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz#744d8e4fcb120fc3dbaa471dadd3483f5a304bb9" + integrity sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ== + dependencies: + "@babel/core" "^7.23.5" + "@babel/plugin-transform-react-jsx-self" "^7.23.3" + "@babel/plugin-transform-react-jsx-source" "^7.23.3" + "@types/babel__core" "^7.20.5" + react-refresh "^0.14.0" + "@vue/compiler-core@3.4.21": version "3.4.21" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.21.tgz#868b7085378fc24e58c9aed14c8d62110a62be1a" @@ -9027,6 +9343,35 @@ esbuild@^0.18.0: "@esbuild/win32-ia32" "0.18.20" "@esbuild/win32-x64" "0.18.20" +esbuild@^0.20.1: + version "0.20.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.2.tgz#9d6b2386561766ee6b5a55196c6d766d28c87ea1" + integrity sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g== + optionalDependencies: + "@esbuild/aix-ppc64" "0.20.2" + "@esbuild/android-arm" "0.20.2" + "@esbuild/android-arm64" "0.20.2" + "@esbuild/android-x64" "0.20.2" + "@esbuild/darwin-arm64" "0.20.2" + "@esbuild/darwin-x64" "0.20.2" + "@esbuild/freebsd-arm64" "0.20.2" + "@esbuild/freebsd-x64" "0.20.2" + "@esbuild/linux-arm" "0.20.2" + "@esbuild/linux-arm64" "0.20.2" + "@esbuild/linux-ia32" "0.20.2" + "@esbuild/linux-loong64" "0.20.2" + "@esbuild/linux-mips64el" "0.20.2" + "@esbuild/linux-ppc64" "0.20.2" + "@esbuild/linux-riscv64" "0.20.2" + "@esbuild/linux-s390x" "0.20.2" + "@esbuild/linux-x64" "0.20.2" + "@esbuild/netbsd-x64" "0.20.2" + "@esbuild/openbsd-x64" "0.20.2" + "@esbuild/sunos-x64" "0.20.2" + "@esbuild/win32-arm64" "0.20.2" + "@esbuild/win32-ia32" "0.20.2" + "@esbuild/win32-x64" "0.20.2" + escalade@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" @@ -10144,7 +10489,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.3.2, fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -10722,7 +11067,18 @@ html-tags@^3.1.0, html-tags@^3.3.1: tapable "^1.1.3" util.promisify "1.0.0" -"html-webpack-plugin-5@npm:html-webpack-plugin@^5", html-webpack-plugin@^5.5.0, html-webpack-plugin@^5.6.0: +"html-webpack-plugin-5@npm:html-webpack-plugin@^5": + version "5.6.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" + integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== + dependencies: + "@types/html-minifier-terser" "^6.0.0" + html-minifier-terser "^6.0.2" + lodash "^4.17.21" + pretty-error "^4.0.0" + tapable "^2.0.0" + +html-webpack-plugin@^5.5.0, html-webpack-plugin@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== @@ -15320,6 +15676,15 @@ postcss@^8.2.14, postcss@^8.4.24, postcss@^8.4.28, postcss@^8.4.33, postcss@^8.4 picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.38: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + preact@^10.13.2: version "10.19.6" resolved "https://registry.yarnpkg.com/preact/-/preact-10.19.6.tgz#66007b67aad4d11899f583df1b0116d94a89b8f5" @@ -16701,6 +17066,30 @@ robust-predicates@^3.0.2: resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== +rollup@^4.13.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.14.0.tgz#c3e2cd479f1b2358b65c1f810fa05b51603d7be8" + integrity sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ== + dependencies: + "@types/estree" "1.0.5" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.14.0" + "@rollup/rollup-android-arm64" "4.14.0" + "@rollup/rollup-darwin-arm64" "4.14.0" + "@rollup/rollup-darwin-x64" "4.14.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.14.0" + "@rollup/rollup-linux-arm64-gnu" "4.14.0" + "@rollup/rollup-linux-arm64-musl" "4.14.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.14.0" + "@rollup/rollup-linux-riscv64-gnu" "4.14.0" + "@rollup/rollup-linux-s390x-gnu" "4.14.0" + "@rollup/rollup-linux-x64-gnu" "4.14.0" + "@rollup/rollup-linux-x64-musl" "4.14.0" + "@rollup/rollup-win32-arm64-msvc" "4.14.0" + "@rollup/rollup-win32-ia32-msvc" "4.14.0" + "@rollup/rollup-win32-x64-msvc" "4.14.0" + fsevents "~2.3.2" + rtl-css-js@^1.16.1: version "1.16.1" resolved "https://registry.yarnpkg.com/rtl-css-js/-/rtl-css-js-1.16.1.tgz#4b48b4354b0ff917a30488d95100fbf7219a3e80" @@ -17324,6 +17713,11 @@ source-list-map@^2.0.1: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + source-map-loader@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.2.tgz#1b378721b65adb21e874928a9fb22e8a340d06a5" @@ -17645,7 +18039,16 @@ string-replace-loader@^2.3.0: loader-utils "^1.2.3" schema-utils "^2.6.5" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17741,7 +18144,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17755,6 +18158,13 @@ strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -19275,6 +19685,17 @@ vinyl@^3.0.0: replace-ext "^2.0.0" teex "^1.0.1" +vite@^5.2.8: + version "5.2.8" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.8.tgz#a99e09939f1a502992381395ce93efa40a2844aa" + integrity sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA== + dependencies: + esbuild "^0.20.1" + postcss "^8.4.38" + rollup "^4.13.0" + optionalDependencies: + fsevents "~2.3.3" + void-elements@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" @@ -19692,7 +20113,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -19710,6 +20131,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From af34033cceb4fcb2de522a26f6a2dca3f6fd45db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 9 Apr 2024 09:02:01 +0000 Subject: [PATCH 02/52] chore: yarn-deduplicate --- yarn.lock | 138 +++++------------------------------------------------- 1 file changed, 12 insertions(+), 126 deletions(-) diff --git a/yarn.lock b/yarn.lock index ab5f985f5f..109499bdd9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -185,15 +185,7 @@ "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3" chokidar "^3.4.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" - integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== - dependencies: - "@babel/highlight" "^7.23.4" - chalk "^2.4.2" - -"@babel/code-frame@^7.24.1", "@babel/code-frame@^7.24.2": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.1", "@babel/code-frame@^7.24.2": version "7.24.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== @@ -227,28 +219,7 @@ json5 "^2.1.2" semver "^6.3.0" -"@babel/core@^7.0.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.18.9", "@babel/core@^7.23.0", "@babel/core@^7.23.2", "@babel/core@^7.23.9", "@babel/core@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.0.tgz#56cbda6b185ae9d9bed369816a8f4423c5f2ff1b" - integrity sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.24.0" - "@babel/parser" "^7.24.0" - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.0" - "@babel/types" "^7.24.0" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/core@^7.23.5": +"@babel/core@^7.0.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.18.9", "@babel/core@^7.23.0", "@babel/core@^7.23.2", "@babel/core@^7.23.5", "@babel/core@^7.23.9", "@babel/core@^7.24.0": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.4.tgz#1f758428e88e0d8c563874741bc4ffc4f71a4717" integrity sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg== @@ -287,17 +258,7 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.23.0", "@babel/generator@^7.23.6", "@babel/generator@^7.7.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" - integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== - dependencies: - "@babel/types" "^7.23.6" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/generator@^7.24.1", "@babel/generator@^7.24.4": +"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.23.0", "@babel/generator@^7.23.6", "@babel/generator@^7.24.1", "@babel/generator@^7.24.4", "@babel/generator@^7.7.2": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.4.tgz#1fc55532b88adf952025d5d2d1e71f946cb1c498" integrity sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw== @@ -487,16 +448,7 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.22.19" -"@babel/helpers@^7.17.8", "@babel/helpers@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.0.tgz#a3dd462b41769c95db8091e49cfe019389a9409b" - integrity sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA== - dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.0" - "@babel/types" "^7.24.0" - -"@babel/helpers@^7.24.4": +"@babel/helpers@^7.17.8", "@babel/helpers@^7.24.0", "@babel/helpers@^7.24.4": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.4.tgz#dc00907fd0d95da74563c142ef4cd21f2cb856b6" integrity sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw== @@ -505,16 +457,7 @@ "@babel/traverse" "^7.24.1" "@babel/types" "^7.24.0" -"@babel/highlight@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" - integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" - -"@babel/highlight@^7.24.2": +"@babel/highlight@^7.23.4", "@babel/highlight@^7.24.2": version "7.24.2" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== @@ -529,12 +472,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8", "@babel/parser@^7.20.15", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.0.tgz#26a3d1ff49031c53a97d03b604375f028746a9ac" - integrity sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg== - -"@babel/parser@^7.24.1", "@babel/parser@^7.24.4": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8", "@babel/parser@^7.20.15", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0", "@babel/parser@^7.24.1", "@babel/parser@^7.24.4": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.4.tgz#234487a110d89ad5a3ed4a8a566c36b9453e8c88" integrity sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg== @@ -1429,23 +1367,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.17.3", "@babel/traverse@^7.18.9", "@babel/traverse@^7.23.2", "@babel/traverse@^7.24.0", "@babel/traverse@^7.4.5": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.0.tgz#4a408fbf364ff73135c714a2ab46a5eab2831b1e" - integrity sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.24.0" - "@babel/types" "^7.24.0" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/traverse@^7.24.1": +"@babel/traverse@^7.17.3", "@babel/traverse@^7.18.9", "@babel/traverse@^7.23.2", "@babel/traverse@^7.24.0", "@babel/traverse@^7.24.1", "@babel/traverse@^7.4.5": version "7.24.1" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== @@ -2470,16 +2392,7 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.4.tgz#9b18145d26cf33d08576cf4c7665b28554480ed7" - integrity sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/gen-mapping@^0.3.5": +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== @@ -2493,12 +2406,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/set-array@^1.2.1": +"@jridgewell/set-array@^1.0.1", "@jridgewell/set-array@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== @@ -2516,15 +2424,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.23" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.23.tgz#afc96847f3f07841477f303eed687707a5aacd80" - integrity sha512-9/4foRoUKp8s96tSkh8DlAAc5A0Ty8vLXld+l9gjKKY6ckwI8G15f0hskGmuLZu78ZlGa1vtsfOa+lnB4vG6Jg== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.9": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -15667,16 +15567,7 @@ postcss@^7.0.14, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.14, postcss@^8.4.24, postcss@^8.4.28, postcss@^8.4.33, postcss@^8.4.35: - version "8.4.35" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" - integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== - dependencies: - nanoid "^3.3.7" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^8.4.38: +postcss@^8.2.14, postcss@^8.4.24, postcss@^8.4.28, postcss@^8.4.33, postcss@^8.4.35, postcss@^8.4.38: version "8.4.38" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== @@ -17708,12 +17599,7 @@ source-list-map@^2.0.1: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-js@^1.2.0: +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.0.2, source-map-js@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== From 2c349219489e2bfa0e07dc4419b33dab54ee9fa3 Mon Sep 17 00:00:00 2001 From: smouillour Date: Tue, 9 Apr 2024 16:16:17 +0200 Subject: [PATCH 03/52] Add esm in containers and components --- package.json | 1 + packages/assets-api/package.json | 2 +- packages/assets-api/tsconfig.esm.json | 4 +-- packages/components/package.json | 36 +++++++++++++++++++++++---- packages/components/tsconfig.esm.json | 8 ++++++ packages/components/tsconfig.json | 1 - packages/containers/package.json | 27 +++++++++++++++++++- packages/containers/tsconfig.esm.json | 9 +++++++ packages/playground/package.json | 5 ++-- packages/playground/vite.config.js | 12 +++++++++ 10 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 packages/components/tsconfig.esm.json create mode 100644 packages/containers/tsconfig.esm.json diff --git a/package.json b/package.json index 1cd282d1e7..c8633267ec 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "scripts": { "postinstall": "talend-yarn-workspace run build:lib", + "postinstall:esm": "talend-yarn-workspace run build:lib:esm", "pre-release": "talend-yarn-workspace run pre-release", "start": "yarn workspace @talend/ui-playground run start", "start-storybook": "yarn workspace @talend/ui-storybook-one run start", diff --git a/packages/assets-api/package.json b/packages/assets-api/package.json index d719ee305c..3368a27f03 100644 --- a/packages/assets-api/package.json +++ b/packages/assets-api/package.json @@ -21,7 +21,7 @@ "scripts": { "pre-release": "talend-scripts build --umd && talend-scripts build --umd --dev", "build:lib": "talend-scripts build", - "build:lib:es": "tsc --project ./tsconfig.esm.json", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "start": "echo nothing to start", "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", diff --git a/packages/assets-api/tsconfig.esm.json b/packages/assets-api/tsconfig.esm.json index f6997ffa57..465b53faa3 100644 --- a/packages/assets-api/tsconfig.esm.json +++ b/packages/assets-api/tsconfig.esm.json @@ -1,6 +1,6 @@ { - "extends": "@talend/scripts-config-typescript/tsconfig.json", - "include": ["src/**/*"], + "extends": "./tsconfig.json", + "exclude": ["src/**/*.test.ts"], "compilerOptions": { "declaration": true, "outDir": "lib/esm", diff --git a/packages/components/package.json b/packages/components/package.json index 6dfd8df17b..ff51f79503 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -2,13 +2,37 @@ "name": "@talend/react-components", "description": "Set of react components.", "main": "lib/index.js", - "mainSrc": "src/index.js", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/*": { + "import": { + "types": "./lib/esm/*/index.d.ts", + "default": "./lib/esm/*/index.js" + }, + "require": { + "types": "./lib/*/index.d.ts", + "default": "./lib/*/index.js" + } + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build && yarn run tsc", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose", "watch": "talend-scripts build --watch", "tsc": "tsc --emitDeclarationOnly --project ./tsconfig.json --outDir ./types", "test": "cross-env TZ=UTC talend-scripts test", @@ -78,15 +102,15 @@ "@talend/eslint-plugin": "^1.1.1", "@talend/locales-design-system": "^7.15.1", "@talend/locales-tui-components": "^11.4.5", - "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-react-webpack": "^16.5.1", "@talend/scripts-config-storybook-lib": "^5.3.1", "@talend/scripts-config-typescript": "^11.2.1", + "@talend/scripts-core": "^16.3.5", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.2.1", - "@testing-library/user-event": "^14.5.2", "@testing-library/react-hooks": "^8.0.1", + "@testing-library/user-event": "^14.5.2", "@types/classnames": "^2.3.1", "@types/d3": "^7.4.3", "@types/jest": "^29.5.12", @@ -94,6 +118,7 @@ "@types/prop-types": "^15.7.11", "@types/react": "^18.2.60", "@types/react-dom": "^18.2.19", + "cpx2": "^7.0.1", "cross-env": "^7.0.3", "i18next": "^23.10.0", "jest-in-case": "^1.0.2", @@ -102,9 +127,10 @@ "react": "^18.2.0", "react-a11y": "^0.3.4", "react-dom": "^18.2.0", - "react-router-dom": "~6.3.0", "react-i18next": "^13.5.0", - "react-test-renderer": "^18.2.0" + "react-router-dom": "~6.3.0", + "react-test-renderer": "^18.2.0", + "sass": "^1.74.1" }, "peerDependencies": { "@talend/design-system": "^10.0.0", diff --git a/packages/components/tsconfig.esm.json b/packages/components/tsconfig.esm.json new file mode 100644 index 0000000000..1c3dad8c15 --- /dev/null +++ b/packages/components/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "src/**/*.stories.*", "src/**/*.test.*"], + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index 5b10cd0419..1b32687738 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "@talend/scripts-config-typescript/tsconfig.json", "include": ["custom.d.ts", "src/**/*"], - "exclude": ["node_modules"], "compilerOptions": { "types": ["jest", "@testing-library/jest-dom"], "allowJs": true, diff --git a/packages/containers/package.json b/packages/containers/package.json index 8e69cae970..ab3acb1190 100644 --- a/packages/containers/package.json +++ b/packages/containers/package.json @@ -2,13 +2,38 @@ "name": "@talend/react-containers", "description": "Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.", "main": "lib/index.js", - "mainSrc": "src/index.js", + "types": "lib/index.d.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/*": { + "import": { + "types": "./lib/esm/*/index.d.ts", + "default": "./lib/esm/*/index.js" + }, + "require": { + "types": "./lib/*/index.d.ts", + "default": "./lib/*/index.js" + } + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "start": "talend-scripts start-storybook -p 6007", "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", diff --git a/packages/containers/tsconfig.esm.json b/packages/containers/tsconfig.esm.json new file mode 100644 index 0000000000..f6997ffa57 --- /dev/null +++ b/packages/containers/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "@talend/scripts-config-typescript/tsconfig.json", + "include": ["src/**/*"], + "compilerOptions": { + "declaration": true, + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/playground/package.json b/packages/playground/package.json index 966c7f188c..c318141d0d 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -28,22 +28,23 @@ "@talend/dynamic-cdn-webpack-plugin": "^13.1.1", "@talend/eslint-config": "^13.0.3", "@talend/eslint-plugin": "^1.1.1", - "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-stylelint": "^4.1.1", + "@talend/scripts-core": "^16.3.5", "@vitejs/plugin-react": "^4.2.1", "body-parser": "1.20.1", "compression": "^1.7.4", "copy-webpack-plugin": "^11.0.0", "cross-env": "^7.0.3", + "esbuild-plugin-react-virtualized": "^1.0.4", "express": "^4.18.2", "i18next-http-backend": "^1.4.5", "vite": "^5.2.8", "webpack": "^5.90.3" }, "dependencies": { - "@talend/bootstrap-theme": "^9.1.1", "@talend/assets-api": "^1.3.2", + "@talend/bootstrap-theme": "^9.1.1", "@talend/design-system": "^10.0.0", "@talend/design-tokens": "^3.1.1", "@talend/icons": "^7.7.1", diff --git a/packages/playground/vite.config.js b/packages/playground/vite.config.js index 6acc960f63..d8d487dfc4 100644 --- a/packages/playground/vite.config.js +++ b/packages/playground/vite.config.js @@ -1,7 +1,19 @@ import react from '@vitejs/plugin-react'; +import fixReactVirtualized from 'esbuild-plugin-react-virtualized'; +import path from 'path'; import { defineConfig } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + optimizeDeps: { + esbuildOptions: { + plugins: [fixReactVirtualized], + }, + }, + resolve: { + alias: { + '~': path.resolve(__dirname, 'node_modules'), + }, + }, }); From 028541a51bd51c5cf79351745734fb7f761a60d4 Mon Sep 17 00:00:00 2001 From: smouillour Date: Tue, 9 Apr 2024 16:16:58 +0200 Subject: [PATCH 04/52] lock file --- yarn.lock | 143 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 56 deletions(-) diff --git a/yarn.lock b/yarn.lock index 109499bdd9..47ea212284 100644 --- a/yarn.lock +++ b/yarn.lock @@ -258,7 +258,7 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.23.0", "@babel/generator@^7.23.6", "@babel/generator@^7.24.1", "@babel/generator@^7.24.4", "@babel/generator@^7.7.2": +"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.23.0", "@babel/generator@^7.24.1", "@babel/generator@^7.24.4", "@babel/generator@^7.7.2": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.4.tgz#1fc55532b88adf952025d5d2d1e71f946cb1c498" integrity sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw== @@ -448,7 +448,7 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.22.19" -"@babel/helpers@^7.17.8", "@babel/helpers@^7.24.0", "@babel/helpers@^7.24.4": +"@babel/helpers@^7.17.8", "@babel/helpers@^7.24.4": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.4.tgz#dc00907fd0d95da74563c142ef4cd21f2cb856b6" integrity sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw== @@ -457,7 +457,7 @@ "@babel/traverse" "^7.24.1" "@babel/types" "^7.24.0" -"@babel/highlight@^7.23.4", "@babel/highlight@^7.24.2": +"@babel/highlight@^7.24.2": version "7.24.2" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== @@ -1367,7 +1367,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.17.3", "@babel/traverse@^7.18.9", "@babel/traverse@^7.23.2", "@babel/traverse@^7.24.0", "@babel/traverse@^7.24.1", "@babel/traverse@^7.4.5": +"@babel/traverse@^7.17.3", "@babel/traverse@^7.18.9", "@babel/traverse@^7.23.2", "@babel/traverse@^7.24.1", "@babel/traverse@^7.4.5": version "7.24.1" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== @@ -1391,7 +1391,7 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.6", "@babel/types@^7.17.0", "@babel/types@^7.18.9", "@babel/types@^7.2.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.4", "@babel/types@^7.23.6", "@babel/types@^7.24.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.12.6", "@babel/types@^7.17.0", "@babel/types@^7.18.9", "@babel/types@^7.2.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.4", "@babel/types@^7.24.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.24.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== @@ -2392,7 +2392,7 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== @@ -2406,7 +2406,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/set-array@^1.0.1", "@jridgewell/set-array@^1.2.1": +"@jridgewell/set-array@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== @@ -7649,6 +7649,25 @@ cpx2@^3.0.2: shell-quote "^1.7.1" subarg "^1.0.0" +cpx2@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cpx2/-/cpx2-7.0.1.tgz#429fde3fc344459cca9c1f29cb3e6f660ca10278" + integrity sha512-ZgK/DRvPFM5ATZ5DQ5UzY6ajkBrI/p9Uc7VyLHc7b4OSFeBO4yOQz/GEmccc4Om6capGYlY4K1XX+BtYQiPPIA== + dependencies: + debounce "^2.0.0" + debug "^4.1.1" + duplexer "^0.1.1" + fs-extra "^11.1.0" + glob "^10.3.10" + glob2base "0.0.12" + ignore "^5.2.4" + minimatch "^9.0.0" + p-map "^6.0.0" + resolve "^1.12.0" + safe-buffer "^5.2.0" + shell-quote "^1.8.0" + subarg "^1.0.0" + create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -8344,6 +8363,11 @@ debounce@^1.2.0, debounce@^1.2.1: resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== +debounce@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-2.0.0.tgz#b2f914518a1481466f4edaee0b063e4d473ad549" + integrity sha512-xRetU6gL1VJbs85Mc4FoEGSjQxzpdxRyFhe3lmWFyy2EzydIcD4xzUvRJMD+NPDfMwKNhxa3PvsIOU32luIWeA== + debug@2.6.9, debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -9208,6 +9232,11 @@ esbuild-plugin-alias@^0.2.1: resolved "https://registry.yarnpkg.com/esbuild-plugin-alias/-/esbuild-plugin-alias-0.2.1.tgz#45a86cb941e20e7c2bc68a2bea53562172494fcb" integrity sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ== +esbuild-plugin-react-virtualized@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/esbuild-plugin-react-virtualized/-/esbuild-plugin-react-virtualized-1.0.4.tgz#b8911ce8fae4636daa87cfa898752170f5d45609" + integrity sha512-/Y+82TBduHox0/uhJlTgUqi3ZWN+qZPF0xy9crkHQE2AOOdm76l6VY2F0Mdfvue9hqXz2FOlKHlHUVXNalHLzA== + esbuild-register@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/esbuild-register/-/esbuild-register-3.5.0.tgz#449613fb29ab94325c722f560f800dd946dc8ea8" @@ -10604,6 +10633,17 @@ glob@^10.0.0, glob@^10.2.2, glob@^10.3.7: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@^10.3.10: + version "10.3.12" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" + integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.6" + minimatch "^9.0.1" + minipass "^7.0.4" + path-scurry "^1.10.2" + glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -10967,18 +11007,7 @@ html-tags@^3.1.0, html-tags@^3.3.1: tapable "^1.1.3" util.promisify "1.0.0" -"html-webpack-plugin-5@npm:html-webpack-plugin@^5": - version "5.6.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" - integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== - dependencies: - "@types/html-minifier-terser" "^6.0.0" - html-minifier-terser "^6.0.2" - lodash "^4.17.21" - pretty-error "^4.0.0" - tapable "^2.0.0" - -html-webpack-plugin@^5.5.0, html-webpack-plugin@^5.6.0: +"html-webpack-plugin-5@npm:html-webpack-plugin@^5", html-webpack-plugin@^5.5.0, html-webpack-plugin@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== @@ -11975,7 +12004,7 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jackspeak@^2.3.5: +jackspeak@^2.3.5, jackspeak@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== @@ -13173,6 +13202,11 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" +lru-cache@^10.2.0, "lru-cache@^9.1.1 || ^10.0.0": + version "10.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" + integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== + lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" @@ -13200,11 +13234,6 @@ lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -"lru-cache@^9.1.1 || ^10.0.0": - version "10.2.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" - integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== - lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" @@ -13999,7 +14028,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== @@ -14693,6 +14722,11 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" +p-map@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-6.0.0.tgz#4d9c40d3171632f86c47601b709f4b4acd70fed4" + integrity sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw== + p-retry@^4.5.0: version "4.6.2" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" @@ -14863,6 +14897,14 @@ path-scurry@^1.10.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" + integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -17081,6 +17123,15 @@ sass@^1.71.1: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" +sass@^1.74.1: + version "1.74.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.74.1.tgz#686fc227d3707dd25cb2925e1db8e4562be29319" + integrity sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + sax@^1.2.4: version "1.3.0" resolved "https://registry.yarnpkg.com/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0" @@ -17364,7 +17415,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.7.1, shell-quote@^1.8.1: +shell-quote@^1.7.1, shell-quote@^1.8.0, shell-quote@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== @@ -17925,16 +17976,7 @@ string-replace-loader@^2.3.0: loader-utils "^1.2.3" schema-utils "^2.6.5" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -18030,7 +18072,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -18044,13 +18086,6 @@ strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -18987,7 +19022,12 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@^5.0.4, typescript@^5.3.2, typescript@^5.3.3: +typescript@^5.0.4, typescript@^5.3.2: + version "5.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" + integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw== + +typescript@^5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== @@ -19999,7 +20039,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20017,15 +20057,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From d6d843c4e79acc12148a781c5ec1366b8d117833 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 9 Apr 2024 14:20:24 +0000 Subject: [PATCH 05/52] chore: yarn-deduplicate --- yarn.lock | 41 ++++------------------------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index 47ea212284..6eca7da4f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10622,18 +10622,7 @@ glob2base@0.0.12: dependencies: find-index "^0.1.1" -glob@^10.0.0, glob@^10.2.2, glob@^10.3.7: - version "10.3.10" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" - integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== - dependencies: - foreground-child "^3.1.0" - jackspeak "^2.3.5" - minimatch "^9.0.1" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry "^1.10.1" - -glob@^10.3.10: +glob@^10.0.0, glob@^10.2.2, glob@^10.3.10, glob@^10.3.7: version "10.3.12" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== @@ -14889,15 +14878,7 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" - integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== - dependencies: - lru-cache "^9.1.1 || ^10.0.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - -path-scurry@^1.10.2: +path-scurry@^1.10.1, path-scurry@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== @@ -17114,16 +17095,7 @@ sass-loader@^13.3.3: dependencies: neo-async "^2.6.2" -sass@^1.71.1: - version "1.71.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.71.1.tgz#dfb09c63ce63f89353777bbd4a88c0a38386ee54" - integrity sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg== - dependencies: - chokidar ">=3.0.0 <4.0.0" - immutable "^4.0.0" - source-map-js ">=0.6.2 <2.0.0" - -sass@^1.74.1: +sass@^1.71.1, sass@^1.74.1: version "1.74.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.74.1.tgz#686fc227d3707dd25cb2925e1db8e4562be29319" integrity sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA== @@ -19022,16 +18994,11 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@^5.0.4, typescript@^5.3.2: +typescript@^5.0.4, typescript@^5.3.2, typescript@^5.3.3: version "5.4.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw== -typescript@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== - ua-parser-js@^1.0.33: version "1.0.37" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.37.tgz#b5dc7b163a5c1f0c510b08446aed4da92c46373f" From 8d25e904887077784c1ed1083c4f444375d755c8 Mon Sep 17 00:00:00 2001 From: smouillour Date: Tue, 9 Apr 2024 17:15:23 +0200 Subject: [PATCH 06/52] fix sass + add alias --- packages/components/package.json | 3 +-- packages/containers/package.json | 2 +- packages/playground/package.json | 1 + packages/playground/vite.config.js | 17 ++++++++++++++++- yarn.lock | 8 ++++---- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index ff51f79503..b35204eeba 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -129,8 +129,7 @@ "react-dom": "^18.2.0", "react-i18next": "^13.5.0", "react-router-dom": "~6.3.0", - "react-test-renderer": "^18.2.0", - "sass": "^1.74.1" + "react-test-renderer": "^18.2.0" }, "peerDependencies": { "@talend/design-system": "^10.0.0", diff --git a/packages/containers/package.json b/packages/containers/package.json index ab3acb1190..884a7f6145 100644 --- a/packages/containers/package.json +++ b/packages/containers/package.json @@ -33,7 +33,7 @@ "build:prod": "talend-scripts build --umd --prod", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", - "build:lib:esm": "tsc --project ./tsconfig.esm.json", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose", "start": "talend-scripts start-storybook -p 6007", "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", diff --git a/packages/playground/package.json b/packages/playground/package.json index c318141d0d..8cd793c352 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -39,6 +39,7 @@ "esbuild-plugin-react-virtualized": "^1.0.4", "express": "^4.18.2", "i18next-http-backend": "^1.4.5", + "sass": "^1.71.1", "vite": "^5.2.8", "webpack": "^5.90.3" }, diff --git a/packages/playground/vite.config.js b/packages/playground/vite.config.js index d8d487dfc4..2890701520 100644 --- a/packages/playground/vite.config.js +++ b/packages/playground/vite.config.js @@ -1,6 +1,7 @@ import react from '@vitejs/plugin-react'; import fixReactVirtualized from 'esbuild-plugin-react-virtualized'; import path from 'path'; +import { fileURLToPath } from 'url'; import { defineConfig } from 'vite'; // https://vitejs.dev/config/ @@ -13,7 +14,21 @@ export default defineConfig({ }, resolve: { alias: { - '~': path.resolve(__dirname, 'node_modules'), + '~@talend/bootstrap-theme/src/theme/guidelines': fileURLToPath( + import.meta.resolve('@talend/bootstrap-theme/src/theme/guidelines'), + ), + '~@talend/design-tokens/lib/tokens': fileURLToPath( + import.meta.resolve('@talend/design-tokens/lib/tokens'), + ), + '~@talend/bootstrap-sass/assets/stylesheets/bootstrap/mixins': fileURLToPath( + import.meta.resolve('@talend/bootstrap-sass/assets/stylesheets/bootstrap/mixins'), + ), + '~@talend/bootstrap-theme/src/theme/animation': fileURLToPath( + import.meta.resolve('@talend/bootstrap-theme/src/theme/animation'), + ), + '~@talend/design-tokens/lib/_tokens.scss': fileURLToPath( + import.meta.resolve('@talend/design-tokens/lib/_tokens.scss'), + ), }, }, }); diff --git a/yarn.lock b/yarn.lock index 6eca7da4f5..31edcbfc84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11993,7 +11993,7 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jackspeak@^2.3.5, jackspeak@^2.3.6: +jackspeak@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== @@ -13191,7 +13191,7 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" -lru-cache@^10.2.0, "lru-cache@^9.1.1 || ^10.0.0": +lru-cache@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== @@ -14878,7 +14878,7 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1, path-scurry@^1.10.2: +path-scurry@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== @@ -17095,7 +17095,7 @@ sass-loader@^13.3.3: dependencies: neo-async "^2.6.2" -sass@^1.71.1, sass@^1.74.1: +sass@^1.71.1: version "1.74.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.74.1.tgz#686fc227d3707dd25cb2925e1db8e4562be29319" integrity sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA== From b0e782d31f9a016e6341223ff0dc88cc3c46796e Mon Sep 17 00:00:00 2001 From: smouillour Date: Tue, 9 Apr 2024 18:07:51 +0200 Subject: [PATCH 07/52] design-system, icons and utils --- packages/design-system/package.json | 25 +++++++++++++++++++ .../Primitive/CollapsiblePanelHeader.tsx | 2 +- .../components/Accordion/Primitive/types.ts | 1 + packages/design-system/tsconfig.esm.json | 15 +++++++++++ packages/icons/package.json | 25 +++++++++++++++++++ packages/icons/tsconfig.esm.json | 16 ++++++++++++ packages/utils/package.json | 25 +++++++++++++++++++ packages/utils/tsconfig.esm.json | 8 ++++++ 8 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 packages/design-system/tsconfig.esm.json create mode 100644 packages/icons/tsconfig.esm.json create mode 100644 packages/utils/tsconfig.esm.json diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 39c270c824..cd691174ff 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -4,10 +4,35 @@ "description": "Talend Design System", "main": "lib/index.js", "types": "lib/index.d.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/*": { + "import": { + "types": "./lib/esm/*/index.d.ts", + "default": "./lib/esm/*/index.js" + }, + "require": { + "types": "./lib/*/index.d.ts", + "default": "./lib/*/index.js" + } + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "build:lib": "talend-scripts build", "build:lib:umd": "talend-scripts build --umd --dev", "build:lib:umd:min": "talend-scripts build --umd --prod", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose", "pre-release": "npm run build:lib:umd && npm run build:lib:umd:min", "watch": "talend-scripts build --watch", "test": "talend-scripts test", diff --git a/packages/design-system/src/components/Accordion/Primitive/CollapsiblePanelHeader.tsx b/packages/design-system/src/components/Accordion/Primitive/CollapsiblePanelHeader.tsx index d02a5359b3..9f7752ff5b 100644 --- a/packages/design-system/src/components/Accordion/Primitive/CollapsiblePanelHeader.tsx +++ b/packages/design-system/src/components/Accordion/Primitive/CollapsiblePanelHeader.tsx @@ -117,13 +117,13 @@ const CollapsiblePanelHeader = forwardRef( (actionItem, index) => actionItem && ( {actionItem.tooltip} diff --git a/packages/design-system/src/components/Accordion/Primitive/types.ts b/packages/design-system/src/components/Accordion/Primitive/types.ts index 62929e3b48..2ce5c361c4 100644 --- a/packages/design-system/src/components/Accordion/Primitive/types.ts +++ b/packages/design-system/src/components/Accordion/Primitive/types.ts @@ -3,5 +3,6 @@ import { ButtonIconType } from 'src/components/ButtonIcon/variations/ButtonIcon' export type PanelHeaderAction = ButtonIconType & { icon: string; tooltip: string; + dataFeature: string; callback: () => unknown; }; diff --git a/packages/design-system/tsconfig.esm.json b/packages/design-system/tsconfig.esm.json new file mode 100644 index 0000000000..d9318e73b9 --- /dev/null +++ b/packages/design-system/tsconfig.esm.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "node_modules", + "src/**/*.stories.*", + "src/**/*.test.*", + "src/**/*.cy.*", + "cypress/**/*", + "src/stories/**/*" + ], + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/icons/package.json b/packages/icons/package.json index d6d6a8d22d..c201468c06 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -4,6 +4,30 @@ "main": "dist/TalendIcons.js", "types": "dist/typeUtils.d.ts", "style": "build/octicons.css", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/*": { + "import": { + "types": "./lib/esm/*/index.d.ts", + "default": "./lib/esm/*/index.js" + }, + "require": { + "types": "./lib/*/index.d.ts", + "default": "./lib/*/index.js" + } + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "build-umd": "webpack --config webpack.umd.js && webpack --config webpack.umd.js --env production", @@ -11,6 +35,7 @@ "build-react": "node scripts/react.js", "build-webfont": "webpack", "build:lib": "npm run ts:types && npm run build-ts && npm run build-react && npm run build-webfont && npm run build-umd", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{svg,json}' lib/esm/src --verbose", "ts:types": "node scripts/typescript.js", "test": "echo no test", "test:cov": "echo no test", diff --git a/packages/icons/tsconfig.esm.json b/packages/icons/tsconfig.esm.json new file mode 100644 index 0000000000..8ce47b9232 --- /dev/null +++ b/packages/icons/tsconfig.esm.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.json", + "include": ["src/**/*"], + "exclude": [ + "node_modules", + "src/**/*.stories.*", + "src/**/*.test.*", + "src/**/*.cy.*", + "cypress/**/*", + "src/stories/**/*" + ], + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/utils/package.json b/packages/utils/package.json index 03aba637de..94540b92d3 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -4,6 +4,30 @@ "description": "Various utilities", "main": "lib/index.js", "types": "lib/index.d.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/*": { + "import": { + "types": "./lib/esm/*/index.d.ts", + "default": "./lib/esm/*/index.js" + }, + "require": { + "types": "./lib/*/index.d.ts", + "default": "./lib/*/index.js" + } + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "repository": { "type": "git", "url": "git+https://github.com/Talend/ui.git" @@ -12,6 +36,7 @@ "license": "Apache-2.0", "scripts": { "build:lib": "talend-scripts build --tsc", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "lint": "talend-scripts lint", "test": "cross-env TZ=UTC talend-scripts test", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage --silent", diff --git a/packages/utils/tsconfig.esm.json b/packages/utils/tsconfig.esm.json new file mode 100644 index 0000000000..d3375b4f65 --- /dev/null +++ b/packages/utils/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "src/**/*.test.*"], + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} From c89a3b473585e5775cb868e30644f3ebe6105bfe Mon Sep 17 00:00:00 2001 From: smouillour Date: Wed, 10 Apr 2024 10:40:18 +0200 Subject: [PATCH 08/52] fix icons --- packages/icons/package.json | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/icons/package.json b/packages/icons/package.json index c201468c06..ff13bc2fc4 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -7,14 +7,24 @@ "module": "./lib/esm/index.js", "exports": { "./package.json": "./package.json", - "./lib/*": { + "./src/*": { "import": { - "types": "./lib/esm/*/index.d.ts", - "default": "./lib/esm/*/index.js" + "types": "./lib/esm/src/*", + "default": "./lib/esm/src/*" }, "require": { - "types": "./lib/*/index.d.ts", - "default": "./lib/*/index.js" + "types": "./src/*", + "default": "./src/*" + } + }, + "./dist/typeUtils": { + "import": { + "types": "./lib/esm/typeUtils.d.ts", + "default": "./lib/esm/typeUtils.js" + }, + "require": { + "types": "./dist/typeUtils.d.ts", + "default": "./dist/typeUtils.js" } }, ".": { From 4a8e04dce5916e71f3aabdfebada57ec1a0faa5b Mon Sep 17 00:00:00 2001 From: smouillour Date: Wed, 10 Apr 2024 15:11:59 +0200 Subject: [PATCH 09/52] design-tokens --- packages/design-tokens/package.json | 32 +++++++++++++++++++++++- packages/design-tokens/tsconfig.esm.json | 7 ++++++ packages/playground/vite.config.js | 12 ++++----- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 packages/design-tokens/tsconfig.esm.json diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index 1175974966..f33ef33698 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -4,12 +4,42 @@ "description": "Talend Design Tokens", "main": "lib/index.js", "types": "lib/index.d.ts", - "mainSrc": "src/index.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/tokens": { + "import": "./lib/esm/_tokens.scss", + "require": "./lib/_tokens.scss" + }, + "./lib/_tokens": { + "import": "./lib/esm/_tokens.scss", + "require": "./lib/_tokens.scss" + }, + "./lib/*": { + "import": "./lib/esm/*", + "require": "./lib/*" + }, + "./dist/*": { + "import": "./lib/esm/dist/*", + "require": "./dist/*" + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "pre-release": "echo nothing", "build:umd:dev": "talend-scripts build --umd --dev", "build:umd:prod": "talend-scripts build --umd", "build:lib": "talend-scripts build && yarn build:umd:dev && yarn build:umd:prod && yarn test:umd", + "build:lib:esm": "yarn build:lib && tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose && cpx 'dist/*' lib/esm/dist --verbose", "test": "echo no test for @talend/design-tokens", "test:cov": "echo no test for @talend/design-tokens", "test:umd": "jest scripts/umd.test.js", diff --git a/packages/design-tokens/tsconfig.esm.json b/packages/design-tokens/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/packages/design-tokens/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/playground/vite.config.js b/packages/playground/vite.config.js index 2890701520..711248bda7 100644 --- a/packages/playground/vite.config.js +++ b/packages/playground/vite.config.js @@ -14,18 +14,18 @@ export default defineConfig({ }, resolve: { alias: { - '~@talend/bootstrap-theme/src/theme/guidelines': fileURLToPath( - import.meta.resolve('@talend/bootstrap-theme/src/theme/guidelines'), - ), - '~@talend/design-tokens/lib/tokens': fileURLToPath( - import.meta.resolve('@talend/design-tokens/lib/tokens'), - ), '~@talend/bootstrap-sass/assets/stylesheets/bootstrap/mixins': fileURLToPath( import.meta.resolve('@talend/bootstrap-sass/assets/stylesheets/bootstrap/mixins'), ), + '~@talend/bootstrap-theme/src/theme/guidelines': fileURLToPath( + import.meta.resolve('@talend/bootstrap-theme/src/theme/guidelines'), + ), '~@talend/bootstrap-theme/src/theme/animation': fileURLToPath( import.meta.resolve('@talend/bootstrap-theme/src/theme/animation'), ), + '~@talend/design-tokens/lib/tokens': fileURLToPath( + import.meta.resolve('@talend/design-tokens/lib/tokens'), + ), '~@talend/design-tokens/lib/_tokens.scss': fileURLToPath( import.meta.resolve('@talend/design-tokens/lib/_tokens.scss'), ), From 52cfee9cca006f3693b3b58a7d9d9b245b1eca1a Mon Sep 17 00:00:00 2001 From: smouillour Date: Wed, 10 Apr 2024 17:29:07 +0200 Subject: [PATCH 10/52] react-bootstrap, a11y, cmf, forms --- fork/react-bootstrap/package.json | 16 ++ fork/react-bootstrap/src/index.js | 140 +++++++++--------- fork/react-bootstrap/src/utils/index.js | 4 +- fork/react-bootstrap/tsconfig.esm.json | 7 + fork/react-bootstrap/tsconfig.json | 4 + packages/a11y/package.json | 15 ++ packages/a11y/tsconfig.esm.json | 7 + packages/cmf/package.json | 16 ++ packages/cmf/src/bootstrap.js | 17 ++- packages/cmf/tsconfig.esm.json | 7 + packages/cmf/tsconfig.json | 4 + packages/forms/package.json | 14 ++ .../stories/CustomArrayTemplate.component.tsx | 4 +- packages/forms/tsconfig.esm.json | 8 + 14 files changed, 181 insertions(+), 82 deletions(-) create mode 100644 fork/react-bootstrap/tsconfig.esm.json create mode 100644 fork/react-bootstrap/tsconfig.json create mode 100644 packages/a11y/tsconfig.esm.json create mode 100644 packages/cmf/tsconfig.esm.json create mode 100644 packages/cmf/tsconfig.json create mode 100644 packages/forms/tsconfig.esm.json diff --git a/fork/react-bootstrap/package.json b/fork/react-bootstrap/package.json index c07113aa33..e3bf810154 100644 --- a/fork/react-bootstrap/package.json +++ b/fork/react-bootstrap/package.json @@ -9,9 +9,24 @@ "homepage": "https://react-bootstrap.github.io/", "sideEffects": false, "main": "lib/index.js", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", "lint": "talend-scripts lint", @@ -40,6 +55,7 @@ "devDependencies": { "@talend/eslint-config": "^13.0.3", "@talend/eslint-plugin": "^1.1.1", + "@talend/scripts-config-typescript": "^11.2.1", "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-react-webpack": "^16.5.1", diff --git a/fork/react-bootstrap/src/index.js b/fork/react-bootstrap/src/index.js index 5709ee30b0..90a7961b7d 100644 --- a/fork/react-bootstrap/src/index.js +++ b/fork/react-bootstrap/src/index.js @@ -1,72 +1,72 @@ -export Accordion from './Accordion'; -export Alert from './Alert'; -export Badge from './Badge'; -export Breadcrumb from './Breadcrumb'; -export BreadcrumbItem from './BreadcrumbItem'; -export Button from './Button'; -export ButtonGroup from './ButtonGroup'; -export ButtonToolbar from './ButtonToolbar'; -export Carousel from './Carousel'; -export CarouselItem from './CarouselItem'; -export Checkbox from './Checkbox'; -export Clearfix from './Clearfix'; -export CloseButton from './CloseButton'; -export ControlLabel from './ControlLabel'; -export Col from './Col'; -export Collapse from './Collapse'; -export Dropdown from './Dropdown'; -export DropdownButton from './DropdownButton'; -export Fade from './Fade'; -export Form from './Form'; -export FormControl from './FormControl'; -export FormGroup from './FormGroup'; -export Glyphicon from './Glyphicon'; -export Grid from './Grid'; -export HelpBlock from './HelpBlock'; -export Image from './Image'; -export InputGroup from './InputGroup'; -export Jumbotron from './Jumbotron'; -export Label from './Label'; -export ListGroup from './ListGroup'; -export ListGroupItem from './ListGroupItem'; -export Media from './Media'; -export MenuItem from './MenuItem'; -export Modal from './Modal'; -export ModalBody from './ModalBody'; -export ModalDialog from './ModalDialog'; -export ModalFooter from './ModalFooter'; -export ModalHeader from './ModalHeader'; -export ModalTitle from './ModalTitle'; -export Nav from './Nav'; -export Navbar from './Navbar'; -export NavbarBrand from './NavbarBrand'; -export NavDropdown from './NavDropdown'; -export NavItem from './NavItem'; -export Overlay from './Overlay'; -export OverlayTrigger from './OverlayTrigger'; -export PageHeader from './PageHeader'; -export PageItem from './PageItem'; -export Pager from './Pager'; -export Pagination from './Pagination'; -export Panel from './Panel'; -export PanelGroup from './PanelGroup'; -export Popover from './Popover'; -export ProgressBar from './ProgressBar'; -export Radio from './Radio'; -export ResponsiveEmbed from './ResponsiveEmbed'; -export Row from './Row'; -export SafeAnchor from './SafeAnchor'; -export SplitButton from './SplitButton'; -export Tab from './Tab'; -export TabContainer from './TabContainer'; -export TabContent from './TabContent'; -export Table from './Table'; -export TabPane from './TabPane'; -export Tabs from './Tabs'; -export Thumbnail from './Thumbnail'; -export ToggleButton from './ToggleButton'; -export ToggleButtonGroup from './ToggleButtonGroup'; -export Tooltip from './Tooltip'; -export Well from './Well'; +export { default as Accordion } from './Accordion'; +export { default as Alert } from './Alert'; +export { default as Badge } from './Badge'; +export { default as Breadcrumb } from './Breadcrumb'; +export { default as BreadcrumbItem } from './BreadcrumbItem'; +export { default as Button } from './Button'; +export { default as ButtonGroup } from './ButtonGroup'; +export { default as ButtonToolbar } from './ButtonToolbar'; +export { default as Carousel } from './Carousel'; +export { default as CarouselItem } from './CarouselItem'; +export { default as Checkbox } from './Checkbox'; +export { default as Clearfix } from './Clearfix'; +export { default as CloseButton } from './CloseButton'; +export { default as ControlLabel } from './ControlLabel'; +export { default as Col } from './Col'; +export { default as Collapse } from './Collapse'; +export { default as Dropdown } from './Dropdown'; +export { default as DropdownButton } from './DropdownButton'; +export { default as Fade } from './Fade'; +export { default as Form } from './Form'; +export { default as FormControl } from './FormControl'; +export { default as FormGroup } from './FormGroup'; +export { default as Glyphicon } from './Glyphicon'; +export { default as Grid } from './Grid'; +export { default as HelpBlock } from './HelpBlock'; +export { default as Image } from './Image'; +export { default as InputGroup } from './InputGroup'; +export { default as Jumbotron } from './Jumbotron'; +export { default as Label } from './Label'; +export { default as ListGroup } from './ListGroup'; +export { default as ListGroupItem } from './ListGroupItem'; +export { default as Media } from './Media'; +export { default as MenuItem } from './MenuItem'; +export { default as Modal } from './Modal'; +export { default as ModalBody } from './ModalBody'; +export { default as ModalDialog } from './ModalDialog'; +export { default as ModalFooter } from './ModalFooter'; +export { default as ModalHeader } from './ModalHeader'; +export { default as ModalTitle } from './ModalTitle'; +export { default as Nav } from './Nav'; +export { default as Navbar } from './Navbar'; +export { default as NavbarBrand } from './NavbarBrand'; +export { default as NavDropdown } from './NavDropdown'; +export { default as NavItem } from './NavItem'; +export { default as Overlay } from './Overlay'; +export { default as OverlayTrigger } from './OverlayTrigger'; +export { default as PageHeader } from './PageHeader'; +export { default as PageItem } from './PageItem'; +export { default as Pager } from './Pager'; +export { default as Pagination } from './Pagination'; +export { default as Panel } from './Panel'; +export { default as PanelGroup } from './PanelGroup'; +export { default as Popover } from './Popover'; +export { default as ProgressBar } from './ProgressBar'; +export { default as Radio } from './Radio'; +export { default as ResponsiveEmbed } from './ResponsiveEmbed'; +export { default as Row } from './Row'; +export { default as SafeAnchor } from './SafeAnchor'; +export { default as SplitButton } from './SplitButton'; +export { default as Tab } from './Tab'; +export { default as TabContainer } from './TabContainer'; +export { default as TabContent } from './TabContent'; +export { default as Table } from './Table'; +export { default as TabPane } from './TabPane'; +export { default as Tabs } from './Tabs'; +export { default as Thumbnail } from './Thumbnail'; +export { default as ToggleButton } from './ToggleButton'; +export { default as ToggleButtonGroup } from './ToggleButtonGroup'; +export { default as Tooltip } from './Tooltip'; +export { default as Well } from './Well'; export * as utils from './utils'; diff --git a/fork/react-bootstrap/src/utils/index.js b/fork/react-bootstrap/src/utils/index.js index 0fb3a1ae02..1605c60316 100644 --- a/fork/react-bootstrap/src/utils/index.js +++ b/fork/react-bootstrap/src/utils/index.js @@ -1,3 +1,3 @@ export * as bootstrapUtils from './bootstrapUtils'; -export createChainedFunction from './createChainedFunction'; -export ValidComponentChildren from './ValidComponentChildren'; +export { default as createChainedFunction } from './createChainedFunction'; +export { default as ValidComponentChildren } from './ValidComponentChildren'; diff --git a/fork/react-bootstrap/tsconfig.esm.json b/fork/react-bootstrap/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/fork/react-bootstrap/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/fork/react-bootstrap/tsconfig.json b/fork/react-bootstrap/tsconfig.json new file mode 100644 index 0000000000..3405e576ec --- /dev/null +++ b/fork/react-bootstrap/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@talend/scripts-config-typescript/tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/a11y/package.json b/packages/a11y/package.json index ddaa362317..6dc5b08c14 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -5,8 +5,23 @@ "mainSrc": "src/index.js", "license": "Apache-2.0", "types": "./lib/index.d.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "build:lib": "talend-scripts build", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "test": "talend-scripts test", "lint": "talend-scripts lint" }, diff --git a/packages/a11y/tsconfig.esm.json b/packages/a11y/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/packages/a11y/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/cmf/package.json b/packages/cmf/package.json index a4ad860bf2..367c5ad5dc 100644 --- a/packages/cmf/package.json +++ b/packages/cmf/package.json @@ -4,9 +4,24 @@ "main": "lib/index.js", "mainSrc": "src/index.js", "license": "Apache-2.0", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", "start": "echo nothing to start", @@ -58,6 +73,7 @@ "@redux-saga/testing-utils": "^1.1.5", "@talend/eslint-config": "^13.0.3", "@talend/eslint-plugin": "^1.1.1", + "@talend/scripts-config-typescript": "^11.2.1", "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-jest": "^14.0.2", diff --git a/packages/cmf/src/bootstrap.js b/packages/cmf/src/bootstrap.js index 4b32a171b8..d652a584bb 100644 --- a/packages/cmf/src/bootstrap.js +++ b/packages/cmf/src/bootstrap.js @@ -1,23 +1,24 @@ import ReactDOM from 'react-dom/client'; -import createSagaMiddleware from 'redux-saga'; + +import { compose } from 'redux'; import { batchedSubscribe } from 'redux-batched-subscribe'; +import createSagaMiddleware from 'redux-saga'; import { spawn } from 'redux-saga/effects'; -import compose from 'redux'; -import App from './App'; import actionCreator from './actionCreator'; import actions from './actions'; +import App from './App'; import { assertTypeOf } from './assert'; +import cmfModule from './cmfModule'; import component from './component'; +import { handleSagaComponent } from './components/Saga'; import expression from './expression'; +import interceptors from './httpInterceptors'; import onError from './onError'; -import storeAPI from './store'; +import { registerInternals } from './register'; import registry from './registry'; import sagas from './sagas'; -import { registerInternals } from './register'; -import cmfModule from './cmfModule'; -import interceptors from './httpInterceptors'; -import { handleSagaComponent } from './components/Saga'; +import storeAPI from './store'; export const bactchedSubscribe = batchedSubscribe(notify => { requestAnimationFrame(notify); diff --git a/packages/cmf/tsconfig.esm.json b/packages/cmf/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/packages/cmf/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/cmf/tsconfig.json b/packages/cmf/tsconfig.json new file mode 100644 index 0000000000..3405e576ec --- /dev/null +++ b/packages/cmf/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@talend/scripts-config-typescript/tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/forms/package.json b/packages/forms/package.json index d799dab9fc..a0553a8ca5 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -4,10 +4,24 @@ "main": "lib/index.js", "mainSrc": "src/index.js", "types": "./lib/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose", "build-storybook": "talend-scripts build-storybook", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", diff --git a/packages/forms/stories/CustomArrayTemplate.component.tsx b/packages/forms/stories/CustomArrayTemplate.component.tsx index e11df62024..2f949eaedb 100644 --- a/packages/forms/stories/CustomArrayTemplate.component.tsx +++ b/packages/forms/stories/CustomArrayTemplate.component.tsx @@ -6,7 +6,7 @@ interface CustomArrayTemplateProps { onAdd: () => void; onRemove: (event: MouseEvent, index: number) => void; onReorder: (event: MouseEvent, payload: object) => void; - renderItem: (index: number) => void; + renderItem: (index: number) => any; value: object[]; } @@ -71,7 +71,7 @@ export function CustomArrayTemplate({ return (
  • - {renderItem(index)} + {renderItem(index) ?? null}
  • ); })} diff --git a/packages/forms/tsconfig.esm.json b/packages/forms/tsconfig.esm.json new file mode 100644 index 0000000000..62809c496b --- /dev/null +++ b/packages/forms/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + }, + "exclude": ["node_modules", "stories/**/*", "src/**/*.test.*"] +} From 1e1a39c99a66c63280ff32b4be931455c45f1143 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 11:05:30 +0200 Subject: [PATCH 11/52] cmf-router, dataviz, design-tokens and faceted-search --- packages/cmf-router/package.json | 16 +++++++++++ packages/cmf-router/tsconfig.esm.json | 7 +++++ packages/cmf-router/tsconfig.json | 4 +++ packages/dataviz/package.json | 16 ++++++++++- packages/dataviz/tsconfig.esm.json | 8 ++++++ packages/design-tokens/package.json | 10 ++----- packages/faceted-search/package.json | 27 ++++++++++++++++++- .../QuickSearchInput.component.js | 11 +++++--- packages/faceted-search/tsconfig.esm.json | 7 +++++ packages/faceted-search/tsconfig.json | 4 +++ .../stories/CustomArrayTemplate.component.tsx | 2 +- 11 files changed, 97 insertions(+), 15 deletions(-) create mode 100644 packages/cmf-router/tsconfig.esm.json create mode 100644 packages/cmf-router/tsconfig.json create mode 100644 packages/dataviz/tsconfig.esm.json create mode 100644 packages/faceted-search/tsconfig.esm.json create mode 100644 packages/faceted-search/tsconfig.json diff --git a/packages/cmf-router/package.json b/packages/cmf-router/package.json index e009cf5727..c0c09e6366 100644 --- a/packages/cmf-router/package.json +++ b/packages/cmf-router/package.json @@ -3,11 +3,26 @@ "version": "6.1.2", "description": "", "main": "lib/index.js", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "author": "Talend Frontend (http://www.talend.com)", "license": "Apache-2.0", "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", "start": "echo nothing to start", @@ -39,6 +54,7 @@ "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-react-webpack": "^16.5.1", + "@talend/scripts-config-typescript": "^11.2.1", "react": "^18.2.0", "react-dom": "^18.2.0", "redux-saga-tester": "^1.0.874" diff --git a/packages/cmf-router/tsconfig.esm.json b/packages/cmf-router/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/packages/cmf-router/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/cmf-router/tsconfig.json b/packages/cmf-router/tsconfig.json new file mode 100644 index 0000000000..3405e576ec --- /dev/null +++ b/packages/cmf-router/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@talend/scripts-config-typescript/tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json index a205a9d070..57fef04553 100644 --- a/packages/dataviz/package.json +++ b/packages/dataviz/package.json @@ -3,14 +3,28 @@ "version": "6.1.3", "description": "Talend charts and visualization components", "main": "lib/index.js", - "mainSrc": "src/index.ts", "types": "./lib/index.d.ts", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "pre-release": "yarn build:umd:dev && yarn build:umd:prod", "build:umd:dev": "talend-scripts build --umd --dev", "build:umd:prod": "talend-scripts build --umd", "build:lib": "talend-scripts build", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose", "build-storybook": "talend-scripts build-storybook", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js", "lint": "talend-scripts lint", diff --git a/packages/dataviz/tsconfig.esm.json b/packages/dataviz/tsconfig.esm.json new file mode 100644 index 0000000000..c2a3716108 --- /dev/null +++ b/packages/dataviz/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + }, + "exclude": ["src/**/*.test.*", "src/**/*.stories.*", "src/**/*.cy.*"] +} diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index f33ef33698..336eb582cc 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -7,14 +7,8 @@ "module": "./lib/esm/index.js", "exports": { "./package.json": "./package.json", - "./lib/tokens": { - "import": "./lib/esm/_tokens.scss", - "require": "./lib/_tokens.scss" - }, - "./lib/_tokens": { - "import": "./lib/esm/_tokens.scss", - "require": "./lib/_tokens.scss" - }, + "./lib/tokens": "./lib/esm/_tokens.scss", + "./lib/_tokens": "./lib/esm/_tokens.scss", "./lib/*": { "import": "./lib/esm/*", "require": "./lib/*" diff --git a/packages/faceted-search/package.json b/packages/faceted-search/package.json index 7f18fd0cc2..2d61316c0a 100644 --- a/packages/faceted-search/package.json +++ b/packages/faceted-search/package.json @@ -3,13 +3,37 @@ "version": "19.0.0", "description": "Faceted search", "main": "lib/index.js", - "mainSrc": "src/index.js", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + "./lib/*": { + "import": { + "types": "./lib/esm/*/index.d.ts", + "default": "./lib/esm/*/index.js" + }, + "require": { + "types": "./lib/*/index.d.ts", + "default": "./lib/*/index.js" + } + }, + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "license": "Apache-2.0", "scripts": { "build:dev": "talend-scripts build --umd --dev", "build:prod": "talend-scripts build --umd --prod", "pre-release": "yarn build:dev && yarn build:prod", "build:lib": "talend-scripts build", + "build:lib:esm": "tsc --project ./tsconfig.esm.json && cpx 'src/**/*.{scss,json}' lib/esm --verbose", "test": "cross-env TZ=UTC talend-scripts test", "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", @@ -55,6 +79,7 @@ "@talend/scripts-config-jest": "^14.0.2", "@talend/scripts-config-react-webpack": "^16.5.1", "@talend/scripts-config-storybook-lib": "^5.3.1", + "@talend/scripts-config-typescript": "^11.2.1", "@testing-library/react": "^14.2.1", "@testing-library/user-event": "^14.5.2", "babel-plugin-angularjs-annotate": "^0.10.0", diff --git a/packages/faceted-search/src/components/QuickSearchInput/QuickSearchInput.component.js b/packages/faceted-search/src/components/QuickSearchInput/QuickSearchInput.component.js index 25a20fb056..4078eddf35 100644 --- a/packages/faceted-search/src/components/QuickSearchInput/QuickSearchInput.component.js +++ b/packages/faceted-search/src/components/QuickSearchInput/QuickSearchInput.component.js @@ -1,7 +1,10 @@ -import { useState, useMemo } from 'react'; -import PropTypes from 'prop-types'; +import { useMemo, useState } from 'react'; + import get from 'lodash/get'; -import { Typeahead } from '@talend/react-components/lib/Typeahead'; +import PropTypes from 'prop-types'; + +import Typeahead from '@talend/react-components/lib/Typeahead'; + import { badgesFacetedPropTypes } from '../facetedSearch.propTypes'; export const DEFAULT_QUICKSEARCH_OPERATOR = 'containsIgnoreCase'; @@ -62,7 +65,7 @@ export const QuickSearchInput = ({ }), suggestions: filteredFacets.map(a => get(a, ['properties', 'label'], null)), }, - ] + ] : undefined } value={value} diff --git a/packages/faceted-search/tsconfig.esm.json b/packages/faceted-search/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/packages/faceted-search/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/faceted-search/tsconfig.json b/packages/faceted-search/tsconfig.json new file mode 100644 index 0000000000..3405e576ec --- /dev/null +++ b/packages/faceted-search/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@talend/scripts-config-typescript/tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/forms/stories/CustomArrayTemplate.component.tsx b/packages/forms/stories/CustomArrayTemplate.component.tsx index bbfdd8d6a6..7af1c4d469 100644 --- a/packages/forms/stories/CustomArrayTemplate.component.tsx +++ b/packages/forms/stories/CustomArrayTemplate.component.tsx @@ -71,7 +71,7 @@ export function CustomArrayTemplate({ return (
  • - {renderItem(index) ?? null} + {renderItem(index)}
  • ); })} From bfee81777b4fa8af1c38386875b50ede9e2158fc Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 11:44:39 +0200 Subject: [PATCH 12/52] design-tokens --- packages/design-tokens/package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index 336eb582cc..f33ef33698 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -7,8 +7,14 @@ "module": "./lib/esm/index.js", "exports": { "./package.json": "./package.json", - "./lib/tokens": "./lib/esm/_tokens.scss", - "./lib/_tokens": "./lib/esm/_tokens.scss", + "./lib/tokens": { + "import": "./lib/esm/_tokens.scss", + "require": "./lib/_tokens.scss" + }, + "./lib/_tokens": { + "import": "./lib/esm/_tokens.scss", + "require": "./lib/_tokens.scss" + }, "./lib/*": { "import": "./lib/esm/*", "require": "./lib/*" From afef114ad15da22fb62a55be9df298a08c97a215 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 15:54:20 +0200 Subject: [PATCH 13/52] storybook-docs and theme: upgrade sass-loader and fix use tokens --- packages/storybook-docs/package.json | 2 +- packages/storybook-docs/src/globalStyles.scss | 2 +- packages/storybook-docs/src/managerStyles.scss | 2 +- packages/theme/package.json | 2 +- packages/theme/src/theme/_badges.scss | 2 +- packages/theme/src/theme/_breadcrumbs.scss | 2 +- packages/theme/src/theme/_buttons.scss | 2 +- packages/theme/src/theme/_code.scss | 2 +- packages/theme/src/theme/_dropdowns.scss | 2 +- packages/theme/src/theme/_forms.checkbox.scss | 2 +- packages/theme/src/theme/_forms.input.scss | 2 +- packages/theme/src/theme/_forms.label.scss | 2 +- packages/theme/src/theme/_forms.legend.scss | 2 +- packages/theme/src/theme/_forms.radio.scss | 2 +- packages/theme/src/theme/_forms.scss | 2 +- packages/theme/src/theme/_forms.select.scss | 2 +- packages/theme/src/theme/_forms.switch.scss | 2 +- packages/theme/src/theme/_guidelines.scss | 2 +- packages/theme/src/theme/_helpers.scss | 6 ++++-- packages/theme/src/theme/_input-groups.scss | 2 +- packages/theme/src/theme/_labels.scss | 2 +- packages/theme/src/theme/_list-group.scss | 2 +- packages/theme/src/theme/_modals.scss | 2 +- packages/theme/src/theme/_navbar.scss | 2 +- packages/theme/src/theme/_navs.scss | 2 +- packages/theme/src/theme/_pager.scss | 2 +- packages/theme/src/theme/_pagination.scss | 2 +- packages/theme/src/theme/_panels.scss | 2 +- packages/theme/src/theme/_popovers.scss | 2 +- packages/theme/src/theme/_tables.scss | 2 +- packages/theme/src/theme/_tooltip.scss | 2 +- packages/theme/src/theme/_type.scss | 2 +- packages/theme/src/theme/_variables.scss | 2 +- packages/theme/src/theme/_wells.scss | 2 +- packages/theme/src/theme/alerts.scss | 2 +- 35 files changed, 38 insertions(+), 36 deletions(-) diff --git a/packages/storybook-docs/package.json b/packages/storybook-docs/package.json index c8a63bdd80..19f275bea9 100644 --- a/packages/storybook-docs/package.json +++ b/packages/storybook-docs/package.json @@ -51,7 +51,7 @@ "postcss-loader": "^7.3.4", "resolve-url-loader": "^5.0.0", "sass": "^1.71.1", - "sass-loader": "^13.3.3", + "sass-loader": "^14.2.0", "webpack": "^5.90.3", "webpack-cli": "^4.10.0" } diff --git a/packages/storybook-docs/src/globalStyles.scss b/packages/storybook-docs/src/globalStyles.scss index f187a91127..339f300659 100644 --- a/packages/storybook-docs/src/globalStyles.scss +++ b/packages/storybook-docs/src/globalStyles.scss @@ -1,5 +1,5 @@ /* stylelint-disable declaration-no-important */ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; // stylelint-disable scss/selector-no-redundant-nesting-selector * { diff --git a/packages/storybook-docs/src/managerStyles.scss b/packages/storybook-docs/src/managerStyles.scss index 6091bfc823..6f7bc75896 100644 --- a/packages/storybook-docs/src/managerStyles.scss +++ b/packages/storybook-docs/src/managerStyles.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; #root { div[role='main'] { diff --git a/packages/theme/package.json b/packages/theme/package.json index ff0d1a8811..cb07b0bee0 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -46,7 +46,7 @@ "postcss-preset-env": "^7.8.3", "rimraf": "^5.0.5", "sass": "^1.71.1", - "sass-loader": "^13.3.3", + "sass-loader": "^14.2.0", "style-loader": "^3.3.4", "webpack": "^5.90.3", "webpack-cli": "^4.10.0" diff --git a/packages/theme/src/theme/_badges.scss b/packages/theme/src/theme/_badges.scss index 556b5444d9..9ec6f149a4 100644 --- a/packages/theme/src/theme/_badges.scss +++ b/packages/theme/src/theme/_badges.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .badge { color: tokens.$coral-color-neutral-text; diff --git a/packages/theme/src/theme/_breadcrumbs.scss b/packages/theme/src/theme/_breadcrumbs.scss index 4cbc447f2d..41a5bfb432 100644 --- a/packages/theme/src/theme/_breadcrumbs.scss +++ b/packages/theme/src/theme/_breadcrumbs.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; //// /// Bootstrap breadcrumbs customization /// @group Breadcrumbs diff --git a/packages/theme/src/theme/_buttons.scss b/packages/theme/src/theme/_buttons.scss index 7fd9ab77d3..4863ff1252 100644 --- a/packages/theme/src/theme/_buttons.scss +++ b/packages/theme/src/theme/_buttons.scss @@ -3,7 +3,7 @@ /// @group Buttons //// -@use '@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; :root { --t-button-padding: 0 #{$padding-normal}; diff --git a/packages/theme/src/theme/_code.scss b/packages/theme/src/theme/_code.scss index f53210b719..1d38126211 100644 --- a/packages/theme/src/theme/_code.scss +++ b/packages/theme/src/theme/_code.scss @@ -1,4 +1,4 @@ -@use '@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; code { color: tokens.$coral-color-danger-text-strong; diff --git a/packages/theme/src/theme/_dropdowns.scss b/packages/theme/src/theme/_dropdowns.scss index beec1c5920..f654dbe99e 100644 --- a/packages/theme/src/theme/_dropdowns.scss +++ b/packages/theme/src/theme/_dropdowns.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; //// /// Bootstrap dropdowns customization diff --git a/packages/theme/src/theme/_forms.checkbox.scss b/packages/theme/src/theme/_forms.checkbox.scss index 739ec40783..4f1806c830 100644 --- a/packages/theme/src/theme/_forms.checkbox.scss +++ b/packages/theme/src/theme/_forms.checkbox.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; $tt-checkbox-size: 0.875rem !default; $checkmark-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03LjA1IDEgMyA1LjEuOTUgMy4wNDk1IDAgNGwzIDMgNS01LjA1TDcuMDUgMVoiIGZpbGw9IiNmZmYiLz48bWFzayBpZD0iYSIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMSIgd2lkdGg9IjgiIGhlaWdodD0iNiI+PHBhdGggZD0iTTcuMDUgMSAzIDUuMS45NSAzLjA0OTUgMCA0bDMgMyA1LTUuMDVMNy4wNSAxWiIgZmlsbD0iI2ZmZiIvPjwvbWFzaz48L3N2Zz4='); diff --git a/packages/theme/src/theme/_forms.input.scss b/packages/theme/src/theme/_forms.input.scss index 94f3922d36..d78c943b90 100644 --- a/packages/theme/src/theme/_forms.input.scss +++ b/packages/theme/src/theme/_forms.input.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .radio input[type='radio'], .radio-inline input[type='radio'], diff --git a/packages/theme/src/theme/_forms.label.scss b/packages/theme/src/theme/_forms.label.scss index ba7f489644..76ac35e16d 100644 --- a/packages/theme/src/theme/_forms.label.scss +++ b/packages/theme/src/theme/_forms.label.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; label { font-size: $font-size-small; diff --git a/packages/theme/src/theme/_forms.legend.scss b/packages/theme/src/theme/_forms.legend.scss index 62501aab95..f951ef78f3 100644 --- a/packages/theme/src/theme/_forms.legend.scss +++ b/packages/theme/src/theme/_forms.legend.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; legend { font-size: 1.0625rem; diff --git a/packages/theme/src/theme/_forms.radio.scss b/packages/theme/src/theme/_forms.radio.scss index ae039f7de3..b2091264de 100644 --- a/packages/theme/src/theme/_forms.radio.scss +++ b/packages/theme/src/theme/_forms.radio.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; $tt-radio-size: 0.875rem !default; diff --git a/packages/theme/src/theme/_forms.scss b/packages/theme/src/theme/_forms.scss index b9437070df..244b852d17 100644 --- a/packages/theme/src/theme/_forms.scss +++ b/packages/theme/src/theme/_forms.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; //// /// Bootstrap forms customization diff --git a/packages/theme/src/theme/_forms.select.scss b/packages/theme/src/theme/_forms.select.scss index c0266713b2..95424f897a 100644 --- a/packages/theme/src/theme/_forms.select.scss +++ b/packages/theme/src/theme/_forms.select.scss @@ -1,5 +1,5 @@ /* stylelint-disable selector-no-qualifying-type */ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; select.form-control { border-color: tokens.$coral-color-neutral-border; diff --git a/packages/theme/src/theme/_forms.switch.scss b/packages/theme/src/theme/_forms.switch.scss index 62d8c97f2b..a774fb27d8 100644 --- a/packages/theme/src/theme/_forms.switch.scss +++ b/packages/theme/src/theme/_forms.switch.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; $switch-thumb-shadow: 0 1px 2px 0 rgba(117, 132, 149, 0.5); //$slate-gray; $switch-thumb-shadow-focused: 0 3px 4px 0.5px rgba(0, 0, 0, 0.25); diff --git a/packages/theme/src/theme/_guidelines.scss b/packages/theme/src/theme/_guidelines.scss index c30b44519c..c050e566f6 100644 --- a/packages/theme/src/theme/_guidelines.scss +++ b/packages/theme/src/theme/_guidelines.scss @@ -2,7 +2,7 @@ /// Talend spec from the guidelines /// @group Guidelines //// -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; @import './helpers'; @import './colors'; diff --git a/packages/theme/src/theme/_helpers.scss b/packages/theme/src/theme/_helpers.scss index 6e54d38712..72fda516f9 100644 --- a/packages/theme/src/theme/_helpers.scss +++ b/packages/theme/src/theme/_helpers.scss @@ -5,7 +5,8 @@ /// @return {Color} /// @source https://css-tricks.com/snippets/sass/tint-shade-functions/ @function tint($color, $percentage) { - @return mix(white, $color, $percentage); + $percent: $percentage * 1%; + @return mix(white, $color, 100%); } /// Slightly darken a color @@ -15,5 +16,6 @@ /// @return {Color} /// @source https://css-tricks.com/snippets/sass/tint-shade-functions/ @function shade($color, $percentage) { - @return mix(black, $color, $percentage); + $percent: $percentage * 1%; + @return mix(black, $color, 100%); } diff --git a/packages/theme/src/theme/_input-groups.scss b/packages/theme/src/theme/_input-groups.scss index b5a2ae4d46..37de8c5c67 100644 --- a/packages/theme/src/theme/_input-groups.scss +++ b/packages/theme/src/theme/_input-groups.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; //// /// Bootstrap input groups customization /// @group Input groups diff --git a/packages/theme/src/theme/_labels.scss b/packages/theme/src/theme/_labels.scss index 5a7dac6176..8c882dde41 100644 --- a/packages/theme/src/theme/_labels.scss +++ b/packages/theme/src/theme/_labels.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; // // Labels diff --git a/packages/theme/src/theme/_list-group.scss b/packages/theme/src/theme/_list-group.scss index 2047ed03e6..657baa2701 100644 --- a/packages/theme/src/theme/_list-group.scss +++ b/packages/theme/src/theme/_list-group.scss @@ -1,5 +1,5 @@ /* stylelint-disable selector-no-qualifying-type */ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .list-group-item { background-color: tokens.$coral-color-neutral-background; diff --git a/packages/theme/src/theme/_modals.scss b/packages/theme/src/theme/_modals.scss index 4c06ae433a..15df517f14 100644 --- a/packages/theme/src/theme/_modals.scss +++ b/packages/theme/src/theme/_modals.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .modal-dialog { display: flex; diff --git a/packages/theme/src/theme/_navbar.scss b/packages/theme/src/theme/_navbar.scss index 724b72452e..8788afa6e2 100644 --- a/packages/theme/src/theme/_navbar.scss +++ b/packages/theme/src/theme/_navbar.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .navbar-inverse { color: tokens.$coral-color-neutral-text-inverted; diff --git a/packages/theme/src/theme/_navs.scss b/packages/theme/src/theme/_navs.scss index 8671f9cb64..d28e01111a 100644 --- a/packages/theme/src/theme/_navs.scss +++ b/packages/theme/src/theme/_navs.scss @@ -1,5 +1,5 @@ /* stylelint-disable selector-no-qualifying-type */ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; $tc-tabbar-active-border-size: 0.125rem !default; diff --git a/packages/theme/src/theme/_pager.scss b/packages/theme/src/theme/_pager.scss index e028306107..0a7b527400 100644 --- a/packages/theme/src/theme/_pager.scss +++ b/packages/theme/src/theme/_pager.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .pager li > a, .pager li > span { diff --git a/packages/theme/src/theme/_pagination.scss b/packages/theme/src/theme/_pagination.scss index c138f08284..a2415b2b74 100644 --- a/packages/theme/src/theme/_pagination.scss +++ b/packages/theme/src/theme/_pagination.scss @@ -1,5 +1,5 @@ /* stylelint-disable selector-no-qualifying-type */ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .pagination > li > a, .pagination > li > span { diff --git a/packages/theme/src/theme/_panels.scss b/packages/theme/src/theme/_panels.scss index d2813d4ff6..d76d6282eb 100644 --- a/packages/theme/src/theme/_panels.scss +++ b/packages/theme/src/theme/_panels.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .panel, .panel-default { diff --git a/packages/theme/src/theme/_popovers.scss b/packages/theme/src/theme/_popovers.scss index 0662b77339..4e853dacab 100644 --- a/packages/theme/src/theme/_popovers.scss +++ b/packages/theme/src/theme/_popovers.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .popover { background-color: tokens.$coral-color-neutral-background; diff --git a/packages/theme/src/theme/_tables.scss b/packages/theme/src/theme/_tables.scss index c7f728db5c..0f9ccf1110 100644 --- a/packages/theme/src/theme/_tables.scss +++ b/packages/theme/src/theme/_tables.scss @@ -1,7 +1,7 @@ // escape following rule to ovveride bootstrap table styles /* stylelint-disable selector-no-qualifying-type */ /* stylelint-disable declaration-no-important */ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .table-striped > tbody > tr:nth-of-type(odd) { background-color: tokens.$coral-color-neutral-background; diff --git a/packages/theme/src/theme/_tooltip.scss b/packages/theme/src/theme/_tooltip.scss index 2e36a726c2..e0b0b1b07a 100644 --- a/packages/theme/src/theme/_tooltip.scss +++ b/packages/theme/src/theme/_tooltip.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .tooltip-inner { overflow-wrap: break-word; diff --git a/packages/theme/src/theme/_type.scss b/packages/theme/src/theme/_type.scss index 24701abc21..bb7d7c46ab 100644 --- a/packages/theme/src/theme/_type.scss +++ b/packages/theme/src/theme/_type.scss @@ -1,4 +1,4 @@ -@use '@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; body { color: tokens.$coral-color-neutral-text; diff --git a/packages/theme/src/theme/_variables.scss b/packages/theme/src/theme/_variables.scss index cba61a67e3..61956fb919 100644 --- a/packages/theme/src/theme/_variables.scss +++ b/packages/theme/src/theme/_variables.scss @@ -1,7 +1,7 @@ /* stylelint-disable color-hex-case */ @use "sass:color"; @use "sass:math"; -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; // This is a fork but try to keep it as close to the original as possible $bootstrap-sass-asset-helper: false !default; diff --git a/packages/theme/src/theme/_wells.scss b/packages/theme/src/theme/_wells.scss index 555838004b..911a9c3124 100644 --- a/packages/theme/src/theme/_wells.scss +++ b/packages/theme/src/theme/_wells.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .well, .jumbotron { diff --git a/packages/theme/src/theme/alerts.scss b/packages/theme/src/theme/alerts.scss index 02f02c109f..a3f92b292e 100644 --- a/packages/theme/src/theme/alerts.scss +++ b/packages/theme/src/theme/alerts.scss @@ -1,4 +1,4 @@ -@use '~@talend/design-tokens/lib/tokens'; +@use '../../node_modules/@talend/design-tokens/lib/tokens' as tokens; .alert-warning { color: tokens.$coral-color-neutral-text; From df485692f9a70a7caa8e4ad9f022211d9d78f331 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 15:55:09 +0200 Subject: [PATCH 14/52] scripts-config-react-webpack upgrade sass-loader --- tools/scripts-config-react-webpack/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts-config-react-webpack/package.json b/tools/scripts-config-react-webpack/package.json index d09d7835ae..35ee55471e 100644 --- a/tools/scripts-config-react-webpack/package.json +++ b/tools/scripts-config-react-webpack/package.json @@ -47,7 +47,7 @@ "regenerator-runtime": "^0.13.11", "resolve-url-loader": "^5.0.0", "sass": "^1.71.1", - "sass-loader": "^13.3.3", + "sass-loader": "^14.2.0", "source-map-loader": "^4.0.2", "style-loader": "^3.3.4", "svg64": "^1.2.0", From c0fcb8688f445e800d271ac363cca3724b84de09 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 15:55:37 +0200 Subject: [PATCH 15/52] json-schema-form-core: add esm, ds fix ts issue --- fork/json-schema-form-core/package.json | 16 +++++++++++++++- .../json-schema-form-core/src/schema-defaults.ts | 4 ++-- fork/json-schema-form-core/tsconfig.esm.json | 7 +++++++ .../QualityBar/QualityRatioBar.component.tsx | 2 +- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 fork/json-schema-form-core/tsconfig.esm.json diff --git a/fork/json-schema-form-core/package.json b/fork/json-schema-form-core/package.json index af6d44cb4e..478c095c80 100644 --- a/fork/json-schema-form-core/package.json +++ b/fork/json-schema-form-core/package.json @@ -3,9 +3,23 @@ "version": "1.2.4", "description": "JSON-Schema and JSON-UI-Schema utilities for form generation.", "main": "dist/index.js", - "mainSrc": "src/index.js", + "module": "./lib/esm/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "build:lib": "rimraf dist && talend-scripts build --umd", + "build:lib:esm": "tsc --project ./tsconfig.esm.json", "watch": "webpack --watch", "dist-untested": "webpack --config webpack.config.dist.js", "test:cov": "npm run test", diff --git a/fork/json-schema-form-core/src/schema-defaults.ts b/fork/json-schema-form-core/src/schema-defaults.ts index 032da7dccb..d489aefff8 100644 --- a/fork/json-schema-form-core/src/schema-defaults.ts +++ b/fork/json-schema-form-core/src/schema-defaults.ts @@ -262,7 +262,7 @@ export function defaultForm( ignore?: any, globalOptions?: any, ) { - const form = []; + const form: any[] = []; const lookup = {}; // Map path => form obj for fast lookup in merging ignore = ignore || {}; globalOptions = globalOptions || {}; @@ -272,7 +272,7 @@ export function defaultForm( Object.keys(schema.properties).forEach(key => { if (ignore[key] !== true) { const required = schema.required && schema.required.indexOf(key) !== -1; - const def = defaultFormDefinition(defaultSchemaTypes, key, schema.properties[key], { + const def: any = defaultFormDefinition(defaultSchemaTypes, key, schema.properties[key], { path: [key], // Path to this property in bracket notation. lookup: lookup, // Extra map to register with. Optimization for merger. ignore: ignore, // The ignore list of paths (sans root level name) diff --git a/fork/json-schema-form-core/tsconfig.esm.json b/fork/json-schema-form-core/tsconfig.esm.json new file mode 100644 index 0000000000..0b9ecd6104 --- /dev/null +++ b/fork/json-schema-form-core/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib/esm", + "module": "ESNext" + } +} diff --git a/packages/design-system/src/components/QualityBar/QualityRatioBar.component.tsx b/packages/design-system/src/components/QualityBar/QualityRatioBar.component.tsx index 06a9ff931c..cb453e7c65 100644 --- a/packages/design-system/src/components/QualityBar/QualityRatioBar.component.tsx +++ b/packages/design-system/src/components/QualityBar/QualityRatioBar.component.tsx @@ -22,7 +22,7 @@ type QualityRatioBarProps = SpecificQualityBarProps & { const QualityRatioBar = ({ onClick, type, getDataFeature, ...props }: QualityRatioBarProps) => { const specificProps = { className: classNames(styles['quality-ratio-bar'], styles[`quality-ratio-bar--${type}`]), - onClick: onClick ? (e: MouseEvent) => onClick(e, { type }) : null, + onClick: onClick ? (e: MouseEvent) => onClick(e, { type }) : undefined, dataFeature: getDataFeature ? getDataFeature(type) : null, dataTestId: `quality-bar-${type}`, }; From e0c2e8228462b6dd60f443ca9d8c184beb2c0e71 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 15:57:52 +0200 Subject: [PATCH 16/52] playground: make it works (almost) --- packages/playground/index.html | 12 +++++++++++- packages/playground/package.json | 1 + .../src/app/components/FacetedSearch.jsx | 8 ++++---- packages/playground/vite.config.js | 19 ++++++++++++++++++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/packages/playground/index.html b/packages/playground/index.html index 488fb5304e..b253aff90e 100644 --- a/packages/playground/index.html +++ b/packages/playground/index.html @@ -4,10 +4,20 @@ + + + + + + + Vite + React -
    +
    diff --git a/packages/playground/package.json b/packages/playground/package.json index 8cd793c352..d9017520fb 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -51,6 +51,7 @@ "@talend/icons": "^7.7.1", "@talend/locales-tui-components": "^11.4.5", "@talend/locales-tui-containers": "^9.1.3", + "@talend/locales-tui-faceted-search": "^11.3.0", "@talend/locales-tui-forms": "^10.2.4", "@talend/react-cmf": "^8.4.1", "@talend/react-cmf-router": "^6.1.2", diff --git a/packages/playground/src/app/components/FacetedSearch.jsx b/packages/playground/src/app/components/FacetedSearch.jsx index 13ccb5fe4c..f364796867 100644 --- a/packages/playground/src/app/components/FacetedSearch.jsx +++ b/packages/playground/src/app/components/FacetedSearch.jsx @@ -1,5 +1,5 @@ // eslint-disable-next-line @talend/import-depth -import * as badges from '@talend/react-faceted-search/stories/badgesDefinitions'; +// import * as badges from '@talend/react-faceted-search/stories/badgesDefinitions'; import Layout from '@talend/react-components/lib/Layout'; import HeaderBar from '@talend/react-containers/lib/HeaderBar'; import SidePanel from '@talend/react-containers/lib/SidePanel'; @@ -10,7 +10,7 @@ function action(msg) { return (...args) => console.log(msg, ...args); } -const badgesDefinitions = Object.values(badges); +// const badgesDefinitions = Object.values(badges); const callbacks = { getTags: () => @@ -39,7 +39,7 @@ const callbacks = { export function FacetedSearchPlayground() { return ( } header={}> - + {/* {currentFacetedMode => (currentFacetedMode === FacetedSearch.constants.FACETED_MODE.ADVANCED && ( @@ -52,7 +52,7 @@ export function FacetedSearchPlayground() { /> )) } - + */} ); } diff --git a/packages/playground/vite.config.js b/packages/playground/vite.config.js index 711248bda7..a9cd955665 100644 --- a/packages/playground/vite.config.js +++ b/packages/playground/vite.config.js @@ -6,7 +6,24 @@ import { defineConfig } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [ + react(), + { + name: 'configure-static-files', + configureServer(server) { + server.middlewares.use((req, res, next) => { + if (req.url === '/settings.json') { + const filePath = path.resolve(__dirname, 'src/settings/settings.json'); + const fileContents = fs.readFileSync(filePath, 'utf-8'); + res.end(fileContents); + return; + } + next(); + }); + }, + }, + ], + optimizeDeps: { esbuildOptions: { plugins: [fixReactVirtualized], From 6eeaf7db920492e3f962bc6f7e33c4053dbc87c0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Apr 2024 14:29:05 +0000 Subject: [PATCH 17/52] chore: yarn-deduplicate --- yarn.lock | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 02361ac9e6..3a5b1e46f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10991,7 +10991,18 @@ html-tags@^3.1.0, html-tags@^3.3.1: tapable "^1.1.3" util.promisify "1.0.0" -"html-webpack-plugin-5@npm:html-webpack-plugin@^5", html-webpack-plugin@^5.5.0, html-webpack-plugin@^5.6.0: +"html-webpack-plugin-5@npm:html-webpack-plugin@^5": + version "5.6.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" + integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== + dependencies: + "@types/html-minifier-terser" "^6.0.0" + html-minifier-terser "^6.0.2" + lodash "^4.17.21" + pretty-error "^4.0.0" + tapable "^2.0.0" + +html-webpack-plugin@^5.5.0, html-webpack-plugin@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== @@ -17083,10 +17094,10 @@ safe-regex-test@^1.0.3: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass-loader@^13.3.3: - version "13.3.3" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-13.3.3.tgz#60df5e858788cffb1a3215e5b92e9cba61e7e133" - integrity sha512-mt5YN2F1MOZr3d/wBRcZxeFgwgkH44wVc2zohO2YF6JiOMkiXe4BYRZpSu2sO1g71mo/j16txzUhsKZlqjVGzA== +sass-loader@^14.2.0: + version "14.2.0" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.2.0.tgz#0d4440170fd9c9d93684e274a5ef73dbf55f414b" + integrity sha512-jxmjDXD9OYNDb2bp9JvopdE6QjecQY9beTWik/6sEHrsMxyo90Gyc471A4NUz60NLs4WsAh6yVtIvhLwEZcXeg== dependencies: neo-async "^2.6.2" @@ -17943,7 +17954,16 @@ string-replace-loader@^2.3.0: loader-utils "^1.2.3" schema-utils "^2.6.5" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -18039,7 +18059,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -18053,6 +18073,13 @@ strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -20001,7 +20028,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20019,6 +20046,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From d3ef6795048aa04f6f4d6e0885643287409d0417 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 15 Apr 2024 18:40:04 +0200 Subject: [PATCH 18/52] mockVite playground --- packages/playground/index.html | 48 +++ packages/playground/mockVite/kit.js | 162 +++++++++ .../mock/header-bar/products-list.json | 26 ++ .../playground/mockVite/mock/kit/example.json | 343 ++++++++++++++++++ .../playground/mockVite/mock/kit/index.js | 8 + .../mockVite/mock/kit/validation.json | 118 ++++++ packages/playground/mockVite/server.js | 66 ++++ packages/playground/package.json | 2 + .../app/components/ComponentFormSandbox.jsx | 4 +- packages/playground/vite.config.js | 6 + 10 files changed, 781 insertions(+), 2 deletions(-) create mode 100644 packages/playground/mockVite/kit.js create mode 100644 packages/playground/mockVite/mock/header-bar/products-list.json create mode 100644 packages/playground/mockVite/mock/kit/example.json create mode 100644 packages/playground/mockVite/mock/kit/index.js create mode 100644 packages/playground/mockVite/mock/kit/validation.json create mode 100644 packages/playground/mockVite/server.js diff --git a/packages/playground/index.html b/packages/playground/index.html index b253aff90e..804dac7919 100644 --- a/packages/playground/index.html +++ b/packages/playground/index.html @@ -4,12 +4,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/playground-vite/CHANGELOG.md b/packages/playground-vite/CHANGELOG.md new file mode 100644 index 0000000000..8deb9e322b --- /dev/null +++ b/packages/playground-vite/CHANGELOG.md @@ -0,0 +1,570 @@ +# @talend/ui-playground + +## 2.4.4 + +### Patch Changes + +- Updated dependencies [27a4a5d] + - @talend/react-faceted-search@19.0.0 + +## 2.4.3 + +### Patch Changes + +- Updated dependencies [0629df7] + - @talend/react-forms@14.0.0 + - @talend/react-containers@10.7.3 + +## 2.4.2 + +### Patch Changes + +- Updated dependencies [ce93823] + - @talend/design-system@10.0.0 + - @talend/react-components@16.0.0 + - @talend/react-containers@10.7.2 + - @talend/react-dataviz@6.1.3 + - @talend/react-faceted-search@18.0.0 + - @talend/react-forms@13.2.3 + +## 2.4.1 + +### Patch Changes + +- 1abc22f: chore: upgrade dependencies +- Updated dependencies [1abc22f] +- Updated dependencies [5cedaf1] + - @talend/react-faceted-search@17.2.1 + - @talend/design-system@9.8.1 + - @talend/design-tokens@3.1.1 + - @talend/assets-api@1.3.2 + - @talend/react-cmf-router@6.1.2 + - @talend/react-components@15.3.1 + - @talend/react-containers@10.7.1 + - @talend/react-dataviz@6.1.2 + - @talend/react-forms@13.2.2 + - @talend/icons@7.7.1 + - @talend/bootstrap-theme@9.1.1 + - @talend/react-cmf@8.4.1 + +## 2.4.0 + +### Minor Changes + +- 9568363: Use include instead of same-origin in the credentials option of fetch. + +### Patch Changes + +- Updated dependencies [5770c9f] +- Updated dependencies [9568363] + - @talend/react-faceted-search@17.1.0 + - @talend/design-system@9.2.0 + - @talend/design-tokens@3.1.0 + - @talend/react-components@15.1.0 + - @talend/react-containers@10.7.0 + - @talend/react-dataviz@6.1.0 + - @talend/react-forms@13.1.0 + - @talend/icons@7.7.0 + - @talend/bootstrap-theme@9.1.0 + - @talend/react-cmf@8.4.0 + +## 2.3.4 + +### Patch Changes + +- Updated dependencies [b1c72a1] + - @talend/design-tokens@3.0.0 + - @talend/bootstrap-theme@9.0.0 + - @talend/react-components@15.0.1 + - @talend/react-dataviz@6.0.1 + - @talend/design-system@9.0.1 + - @talend/react-faceted-search@17.0.1 + - @talend/react-forms@13.0.1 + +## 2.3.3 + +### Patch Changes + +- Updated dependencies [18c1d97] +- Updated dependencies [18c1d97] + - @talend/react-faceted-search@17.0.0 + - @talend/react-components@15.0.0 + - @talend/react-dataviz@6.0.0 + - @talend/react-forms@13.0.0 + - @talend/design-system@9.0.0 + - @talend/react-containers@10.6.1 + +## 2.3.2 + +### Patch Changes + +- f675918: fix(DFD-536): Fix click on collapsible toggle +- Updated dependencies [f0770b1] +- Updated dependencies [f675918] +- Updated dependencies [7cc4321] +- Updated dependencies [2065869] + - @talend/design-system@8.11.1 + - @talend/react-forms@12.6.0 + - @talend/react-faceted-search@16.0.0 + +## 2.3.1 + +### Patch Changes + +- Updated dependencies [e095335] +- Updated dependencies [922e3eb] + - @talend/react-components@14.0.0 + - @talend/react-faceted-search@15.0.0 + - @talend/react-dataviz@5.0.0 + - @talend/react-containers@10.5.1 + - @talend/react-forms@12.5.1 + - @talend/react-cmf@8.3.3 + - @talend/design-system@8.8.3 + +## 2.3.0 + +### Minor Changes + +- 7de44f9: Remove dependency on react-bootstrap + +### Patch Changes + +- Updated dependencies [7de44f9] +- Updated dependencies [7de44f9] +- Updated dependencies [7de44f9] +- Updated dependencies [c9e740d] + - @talend/react-components@13.0.0 + - @talend/react-containers@10.4.0 + - @talend/react-forms@12.4.0 + - @talend/react-dataviz@4.2.2 + - @talend/react-faceted-search@14.0.0 + +## 2.2.2 + +### Patch Changes + +- Updated dependencies [b71e4e6] +- Updated dependencies [a7b06bc] +- Updated dependencies [a7b06bc] +- Updated dependencies [424544a] +- Updated dependencies [266df87] + - @talend/design-system@8.7.0 + - @talend/react-faceted-search@13.0.0 + - @talend/react-components@12.4.0 + +## 2.2.1 + +### Patch Changes + +- c468f2f: chore: upgrade dependencies +- Updated dependencies [c468f2f] +- Updated dependencies [6c2df2b] + - @talend/react-faceted-search@12.2.1 + - @talend/design-system@8.6.1 + - @talend/design-tokens@2.10.1 + - @talend/react-bootstrap@2.2.1 + - @talend/assets-api@1.3.1 + - @talend/react-cmf-router@6.1.1 + - @talend/react-components@12.3.1 + - @talend/react-containers@10.3.1 + - @talend/react-dataviz@4.2.1 + - @talend/react-forms@12.3.1 + - @talend/icons@7.3.1 + - @talend/bootstrap-theme@8.3.1 + - @talend/react-cmf@8.3.1 + +## 2.2.0 + +### Minor Changes + +- b9cc5b097: Add missing deps and fix webpack.config file + +### Patch Changes + +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] +- Updated dependencies [b9cc5b097] + - @talend/react-containers@10.2.0 + - @talend/assets-api@1.3.0 + - @talend/design-tokens@2.10.0 + - @talend/react-dataviz@4.2.0 + - @talend/design-system@8.2.0 + - @talend/react-cmf@8.2.0 + - @talend/icons@7.2.0 + - @talend/react-forms@12.1.0 + - @talend/bootstrap-theme@8.3.0 + +## 2.1.1 + +### Patch Changes + +- Updated dependencies [8ec56028a] + - @talend/react-forms@12.0.0 + - @talend/react-containers@10.1.1 + +## 2.1.0 + +### Minor Changes + +- 3f9c8a7bb: update babel config to use babel.config.js instead of .babelrc.json + add missing deps + +### Patch Changes + +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [2177ddfb3] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [77826b091] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [3f9c8a7bb] +- Updated dependencies [3f9c8a7bb] + - @talend/react-cmf@8.1.0 + - @talend/react-containers@10.1.0 + - @talend/icons@7.1.0 + - @talend/react-components@12.1.0 + - @talend/react-forms@11.1.0 + - @talend/react-cmf-router@6.1.0 + - @talend/react-dataviz@4.1.0 + - @talend/react-bootstrap@2.1.0 + - @talend/react-faceted-search@12.1.0 + +## 2.0.0 + +### Major Changes + +- 4044f6198: ARCH-662 - Bump i18next from v20 to v23 and react-i18next from v11 to v13 + +### Patch Changes + +- Updated dependencies [96d688489] +- Updated dependencies [9a0732ec5] +- Updated dependencies [da4cf2971] +- Updated dependencies [4044f6198] + - @talend/react-faceted-search@12.0.0 + - @talend/react-bootstrap@2.0.0 + - @talend/react-cmf-router@6.0.0 + - @talend/react-components@12.0.0 + - @talend/react-containers@10.0.0 + - @talend/react-dataviz@4.0.0 + - @talend/react-forms@11.0.0 + - @talend/icons@7.0.0 + - @talend/react-cmf@8.0.0 + - @talend/bootstrap-theme@8.2.1 + +## 1.1.15 + +### Patch Changes + +- Updated dependencies [bfc02c4fb] +- Updated dependencies [bfc02c4fb] +- Updated dependencies [40e70c055] +- Updated dependencies [bfc02c4fb] +- Updated dependencies [bfc02c4fb] +- Updated dependencies [bfc02c4fb] + - @talend/react-faceted-search@11.0.0 + - @talend/react-dataviz@3.0.0 + - @talend/react-components@11.0.0 + - @talend/react-forms@10.0.0 + - @talend/bootstrap-theme@8.0.0 + - @talend/react-containers@9.1.3 + +## 1.1.14 + +### Patch Changes + +- Updated dependencies [aab0eeb36] + - @talend/react-faceted-search@10.0.0 + +## 1.1.13 + +### Patch Changes + +- 616601fda: chore: clean unnecessary react imports after React v17 + + removed by running script `npx react-codemod update-react-imports` + + see doc https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports + +- Updated dependencies [9db7ef2fe] +- Updated dependencies [9db7ef2fe] +- Updated dependencies [9db7ef2fe] +- Updated dependencies [e7d785a6a] +- Updated dependencies [7a097213f] +- Updated dependencies [9db7ef2fe] +- Updated dependencies [9db7ef2fe] +- Updated dependencies [b0193afbd] +- Updated dependencies [616601fda] +- Updated dependencies [f47e34dd0] +- Updated dependencies [9db7ef2fe] +- Updated dependencies [9db7ef2fe] +- Updated dependencies [7a097213f] + - @talend/icons@6.55.0 + - @talend/react-components@10.2.2 + - @talend/react-faceted-search@9.1.1 + - @talend/react-cmf-router@5.2.6 + - @talend/react-containers@9.0.2 + - @talend/react-dataviz@2.8.7 + - @talend/react-forms@9.0.4 + - @talend/react-cmf@7.2.0 + +## 1.1.12 + +### Patch Changes + +- Updated dependencies [4dfe7b010] + - @talend/react-components@10.0.0 + - @talend/react-containers@9.0.0 + - @talend/react-dataviz@2.8.6 + - @talend/react-faceted-search@9.0.0 + - @talend/react-forms@9.0.2 + +## 1.1.11 + +### Patch Changes + +- Updated dependencies [99398080f] +- Updated dependencies [5e4aad637] + - @talend/react-containers@8.0.2 + - @talend/react-dataviz@2.8.5 + - @talend/react-forms@9.0.0 + +## 1.1.10 + +### Patch Changes + +- Updated dependencies [9c44d724f] +- Updated dependencies [e83d88f83] +- Updated dependencies [14b462534] +- Updated dependencies [1200c70f8] +- Updated dependencies [70677664b] + - @talend/react-components@9.0.0 + - @talend/react-containers@8.0.0 + - @talend/bootstrap-theme@7.0.0 + - @talend/react-datagrid@14.0.0 + - @talend/react-dataviz@2.8.4 + - @talend/react-forms@8.1.7 + +## 1.1.9 + +### Patch Changes + +- Updated dependencies [ef3977697] +- Updated dependencies [2be2c3f47] +- Updated dependencies [2be2c3f47] +- Updated dependencies [105990b24] +- Updated dependencies [c0ed60ee5] + - @talend/react-components@8.0.0 + - @talend/react-dataviz@2.8.3 + - @talend/react-containers@7.3.2 + - @talend/react-datagrid@13.0.3 + - @talend/react-forms@8.1.6 + +## 1.1.8 + +### Patch Changes + +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [25f96d364] +- Updated dependencies [94435b8cd] + - @talend/icons@6.51.0 + - @talend/react-datagrid@13.0.0 + +## 1.1.7 + +### Patch Changes + +- Updated dependencies [d134a19e8] + - @talend/react-faceted-search@8.0.0 + +## 1.1.6 + +### Patch Changes + +- 6f333498f: fix datagrid page +- a3c65c4fe: fix(playground): display playground icons +- Updated dependencies [47dec5cb4] +- Updated dependencies [e6efa126f] + - @talend/react-faceted-search@7.0.2 + - @talend/react-components@7.10.1 + +## 1.1.5 + +### Patch Changes + +- Updated dependencies [e5aa63ef6] + - @talend/react-faceted-search@7.0.0 + +## 1.1.4 + +### Patch Changes + +- de6f9f80c: Handle datagrid breaking changes +- Updated dependencies [2a7278a95] +- Updated dependencies [c02aeb6ae] +- Updated dependencies [1df17ebbc] +- Updated dependencies [a99154a7d] +- Updated dependencies [c815ba11f] +- Updated dependencies [262e60063] + - @talend/react-datagrid@12.0.0 + - @talend/react-forms@8.1.0 + - @talend/react-components@7.5.0 + - @talend/react-containers@7.3.0 + - @talend/react-dataviz@2.4.0 + - @talend/react-faceted-search@6.0.0 + +## 1.1.3 + +### Patch Changes + +- Updated dependencies [8f396f7d5] +- Updated dependencies [3be0e2d22] +- Updated dependencies [a64664410] +- Updated dependencies [f8a5555eb] +- Updated dependencies [6daf0e5dc] + - @talend/react-components@7.3.0 + - @talend/react-cmf-router@5.2.0 + - @talend/react-forms@8.0.0 + - @talend/react-cmf@7.1.3 + - @talend/react-containers@7.2.4 + +## 1.1.2 + +### Patch Changes + +- Updated dependencies [df3460428] +- Updated dependencies [6887f0fcf] +- Updated dependencies [6887f0fcf] + - @talend/react-datagrid@11.0.0 + - @talend/icons@6.44.0 + +## 1.1.1 + +### Patch Changes + +- Updated dependencies [9a581a4bc] +- Updated dependencies [c8fbf0130] +- Updated dependencies [1160ec1f6] + - @talend/react-components@7.0.0 + - @talend/react-forms@7.3.1 + - @talend/react-containers@7.2.2 + - @talend/react-datagrid@10.0.0 + - @talend/react-dataviz@2.2.1 + - @talend/react-faceted-search@5.0.0 + +## 1.1.0 + +### Minor Changes + +- 47b758112: feat(ARCH-482): use React 17 internally and extend react peer dep version + +### Patch Changes + +- Updated dependencies [6562e397f] +- Updated dependencies [47b758112] + - @talend/react-components@6.49.0 + - @talend/react-bootstrap@1.35.0 + - @talend/react-cmf@7.1.0 + - @talend/react-cmf-router@5.1.0 + - @talend/react-containers@7.2.0 + - @talend/react-datagrid@9.3.0 + - @talend/react-dataviz@2.2.0 + - @talend/react-faceted-search@4.2.0 + - @talend/react-forms@7.3.0 + - @talend/icons@6.42.0 + - @talend/bootstrap-theme@6.39.0 + +## 1.0.6 + +### Patch Changes + +- Updated dependencies [df182bbd4] + - @talend/react-cmf-router@5.0.0 + +## 1.0.5 + +### Patch Changes + +- Updated dependencies [9f84c4ad7] +- Updated dependencies [65599e1a5] +- Updated dependencies [20e907887] +- Updated dependencies [e04e3910f] +- Updated dependencies [e04e3910f] + - @talend/react-datagrid@9.0.0 + - @talend/react-dataviz@2.1.1 + - @talend/react-components@6.46.2 + +## 1.0.4 + +### Patch Changes + +- Updated dependencies [d1815c0af] +- Updated dependencies [4605d2ce4] +- Updated dependencies [d1815c0af] +- Updated dependencies [d1815c0af] + - @talend/react-datagrid@8.0.0 + - @talend/react-forms@7.1.0 + - @talend/react-dataviz@2.1.0 + +## 1.0.3 + +### Patch Changes + +- Updated dependencies [9f3cad9bd] + - @talend/react-dataviz@2.0.0 + +## 1.0.2 + +### Patch Changes + +- Updated dependencies [aaba017d2] +- Updated dependencies [5062e05c1] +- Updated dependencies [1c20a3b6b] + - @talend/react-components@6.44.11 + - @talend/react-containers@7.0.5 + - @talend/react-faceted-search@4.0.0 + +## 1.0.1 + +### Patch Changes + +- Updated dependencies [593026b37] + - @talend/react-cmf@7.0.0 + - @talend/react-cmf-router@4.0.0 + - @talend/react-forms@7.0.0 + - @talend/react-containers@7.0.0 diff --git a/packages/playground-vite/README.md b/packages/playground-vite/README.md new file mode 100644 index 0000000000..24ab0aa14e --- /dev/null +++ b/packages/playground-vite/README.md @@ -0,0 +1,17 @@ +# Playground + +This app is aiming to help demonstrate `ui/container` containers in an environement where we can run a `cmf` app and mock a backend. + +It can also be used as a development environment. +It is published to each PR on surge. + +## How to use + +#### Install + +Install is done at the root of the mono repository but because we use the UMD we need to do + +cd Talend/ui +yarn +yarn pre-release +yarn start diff --git a/packages/playground-vite/cmf.json b/packages/playground-vite/cmf.json new file mode 100644 index 0000000000..842a07bc87 --- /dev/null +++ b/packages/playground-vite/cmf.json @@ -0,0 +1,7 @@ +{ + "settings": { + "sources": ["src/settings"], + "sources-dev": ["src/settings"], + "destination": "dist/settings.json" + } +} diff --git a/packages/playground/index.html b/packages/playground-vite/index.html similarity index 100% rename from packages/playground/index.html rename to packages/playground-vite/index.html diff --git a/packages/playground/mockVite/kit.js b/packages/playground-vite/mockVite/kit.js similarity index 100% rename from packages/playground/mockVite/kit.js rename to packages/playground-vite/mockVite/kit.js diff --git a/packages/playground/mockVite/mock/header-bar/products-list.json b/packages/playground-vite/mockVite/mock/header-bar/products-list.json similarity index 100% rename from packages/playground/mockVite/mock/header-bar/products-list.json rename to packages/playground-vite/mockVite/mock/header-bar/products-list.json diff --git a/packages/playground/mockVite/mock/kit/example.json b/packages/playground-vite/mockVite/mock/kit/example.json similarity index 100% rename from packages/playground/mockVite/mock/kit/example.json rename to packages/playground-vite/mockVite/mock/kit/example.json diff --git a/packages/playground/mockVite/mock/kit/index.js b/packages/playground-vite/mockVite/mock/kit/index.js similarity index 100% rename from packages/playground/mockVite/mock/kit/index.js rename to packages/playground-vite/mockVite/mock/kit/index.js diff --git a/packages/playground/mockVite/mock/kit/validation.json b/packages/playground-vite/mockVite/mock/kit/validation.json similarity index 100% rename from packages/playground/mockVite/mock/kit/validation.json rename to packages/playground-vite/mockVite/mock/kit/validation.json diff --git a/packages/playground/mockVite/server.js b/packages/playground-vite/mockVite/server.js similarity index 100% rename from packages/playground/mockVite/server.js rename to packages/playground-vite/mockVite/server.js diff --git a/packages/playground-vite/package.json b/packages/playground-vite/package.json new file mode 100644 index 0000000000..a4cd71f87f --- /dev/null +++ b/packages/playground-vite/package.json @@ -0,0 +1,74 @@ +{ + "name": "@talend/ui-playground-vite", + "version": "2.4.4", + "description": "Showcase Talend/UI", + "private": true, + "type": "module", + "main": "app/index.js", + "scripts": { + "build": "cross-env BASENAME='/playground' talend-scripts build", + "test": "echo nothing to test in playground", + "test:demo:umd": "cross-env BASENAME='/playground/' INITIATOR_URL='/playground/inject.js' talend-scripts build --prod", + "start": "cross-env BASENAME='/' INITIATOR_URL='/inject.js' talend-scripts start --open http://localhost:3000", + "start:vite": "vite dev", + "start-dist": "talend-scripts build && node serve-dist", + "lint": "talend-scripts lint" + }, + "repository": { + "type": "git", + "url": "" + }, + "keywords": [ + "react", + "talend" + ], + "author": "Talend Frontend ", + "license": "Apache-2.0", + "devDependencies": { + "@talend/dynamic-cdn-webpack-plugin": "^13.1.1", + "@talend/eslint-config": "^13.0.3", + "@talend/eslint-plugin": "^1.1.1", + "@talend/scripts-config-babel": "^13.3.1", + "@talend/scripts-config-stylelint": "^4.1.1", + "@talend/scripts-core": "^16.3.5", + "@vitejs/plugin-react": "^4.2.1", + "body-parser": "1.20.1", + "compression": "^1.7.4", + "copy-webpack-plugin": "^11.0.0", + "cross-env": "^7.0.3", + "esbuild-plugin-react-virtualized": "^1.0.4", + "express": "^4.18.2", + "i18next-http-backend": "^1.4.5", + "mockjs": "^1.1.0", + "sass": "^1.75.0", + "vite": "^5.2.8", + "vite-plugin-html": "^3.2.2", + "vite-plugin-mock": "^3.0.1", + "webpack": "^5.90.3" + }, + "dependencies": { + "@talend/assets-api": "^1.3.2", + "@talend/bootstrap-theme": "^9.1.1", + "@talend/design-system": "^10.0.0", + "@talend/design-tokens": "^3.1.1", + "@talend/icons": "^7.7.1", + "@talend/locales-tui-components": "^11.4.5", + "@talend/locales-tui-containers": "^9.1.3", + "@talend/locales-tui-faceted-search": "^11.3.0", + "@talend/locales-tui-forms": "^10.2.4", + "@talend/react-cmf": "^8.4.1", + "@talend/react-cmf-router": "^6.1.2", + "@talend/react-components": "^16.0.0", + "@talend/react-containers": "^10.7.3", + "@talend/react-dataviz": "^6.1.3", + "@talend/react-faceted-search": "^19.0.0", + "@talend/react-forms": "^14.0.0", + "history": "^5.3.0", + "i18next": "^23.10.0", + "prop-types": "^15.8.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-i18next": "^13.5.0", + "redux-logger": "^3.0.6" + } +} diff --git a/packages/playground-vite/serve-dist.js b/packages/playground-vite/serve-dist.js new file mode 100644 index 0000000000..c41cccb9ff --- /dev/null +++ b/packages/playground-vite/serve-dist.js @@ -0,0 +1,17 @@ +const compression = require('compression'); +const express = require('express'); +const backend = require('./mockBackend/server'); + +const options = process.argv.slice(2); +const app = express(); + +if (options.includes('--gzip')) { + app.use(compression()); +} + +app.use(express.static('dist')); +backend(app); + +app.listen(3000, () => { + console.log('ready http://localhost:3000'); +}); diff --git a/packages/playground-vite/src/app/actions/index.js b/packages/playground-vite/src/app/actions/index.js new file mode 100644 index 0000000000..0d8b889742 --- /dev/null +++ b/packages/playground-vite/src/app/actions/index.js @@ -0,0 +1,5 @@ +import redirect from './redirect.js'; + +export default { + redirect, +}; diff --git a/packages/playground-vite/src/app/actions/redirect.js b/packages/playground-vite/src/app/actions/redirect.js new file mode 100644 index 0000000000..7d6ef074fa --- /dev/null +++ b/packages/playground-vite/src/app/actions/redirect.js @@ -0,0 +1,17 @@ +/** + * action creator + * @param {Event} event which trigger this action + * @param {Object} data {model,action} sub objects + * @returns {Object} action + */ +export default function redirect(event, data) { + let path = data.action.path; + path = path.replace('$id', data.model.id); + return { + type: 'foo', + payload: { + method: 'push', + args: [path], + }, + }; +} diff --git a/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx b/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx new file mode 100644 index 0000000000..291152fd6f --- /dev/null +++ b/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx @@ -0,0 +1,131 @@ +import { useState } from 'react'; + +import PropTypes from 'prop-types'; + +import { InlineMessageInformation } from '@talend/design-system'; +import { cmfConnect } from '@talend/react-cmf'; +import Layout from '@talend/react-components/lib/Layout'; +import SubHeaderBar from '@talend/react-components/lib/SubHeaderBar'; +import ComponentForm from '@talend/react-containers/lib/ComponentForm'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; +import UIForm from '@talend/react-forms'; + +import example from '../../../mockBackend/mock/kit/example.json'; + +// test new behavior on non css module files +import './ComponentFormSandbox.scss'; + +const { isComponentFormDirty } = ComponentForm.selectors; +const { setComponentFormDirtyState } = ComponentForm.actions; + +const componentId = 'external'; +const jsonSchema = { + type: 'object', + title: 'config', + properties: { + definitionURL: { + type: 'string', + enum: ['/api/v1/forms/example', '/api/v1/forms/validation'], + }, + uiSpecPath: { + type: 'string', + }, + triggerURL: { + type: 'string', + }, + }, +}; + +const uiSchema = [ + { + key: 'definitionURL', + title: 'definitionURL', + }, + { + key: 'uiSpecPath', + title: 'uiSpecPath', + }, + { + key: 'triggerURL', + title: 'triggerURL', + }, +]; + +function ComponentFormSandBox({ dirty, dispatch }) { + const hasAPI = process.env.NODE_ENV === 'development'; + const [displayConfig, setConfig] = useState(false); + const defaultFormProps = { + definitionURL: '/api/v1/forms/example', + uiSpecPath: 'ui', + triggerURL: '/api/v1/application/action', + definition: hasAPI ? undefined : example.ui, // do not fetch + // data: hasAPI ? uispec : undefined, + }; + const uispec = { + jsonSchema, + uiSchema, + properties: defaultFormProps, + }; + const [formProps, setFormProps] = useState(defaultFormProps); + const right = [ + { + label: `Reset (dirty=${dirty.toString()})`, + onClick: () => dispatch(setComponentFormDirtyState(componentId, false)), + }, + { + label: 'Configure', + icon: 'talend-cog', + onClick: () => setConfig(!displayConfig), + }, + ]; + return ( + } header={}> + { + window.location = '/'; + }} + /> +
    + {!hasAPI && ( + + )} + {displayConfig ? ( + { + // eslint-disable-next-line no-console + console.log(event, data); + setFormProps(data); + setConfig(false); + }} + /> + ) : ( + + )} +
    +
    + ); +} +ComponentFormSandBox.displayName = 'ComponentFormSandBox'; +ComponentFormSandBox.propTypes = { + dirty: PropTypes.bool.isRequired, + dispatch: PropTypes.func, +}; + +function mapStateToProps(state) { + return { dirty: isComponentFormDirty(state, componentId) }; +} + +export default cmfConnect({ mapStateToProps, withDispatch: true })(ComponentFormSandBox); diff --git a/packages/playground-vite/src/app/components/ComponentFormSandbox.scss b/packages/playground-vite/src/app/components/ComponentFormSandbox.scss new file mode 100644 index 0000000000..aca40f912d --- /dev/null +++ b/packages/playground-vite/src/app/components/ComponentFormSandbox.scss @@ -0,0 +1,4 @@ +#example { + margin: 10px; + max-width: 800px; +} diff --git a/packages/playground-vite/src/app/components/Dataviz.jsx b/packages/playground-vite/src/app/components/Dataviz.jsx new file mode 100644 index 0000000000..147fdeb9c5 --- /dev/null +++ b/packages/playground-vite/src/app/components/Dataviz.jsx @@ -0,0 +1,79 @@ +import { useEffect, useState } from 'react'; + +import { ErrorBoundary } from '@talend/react-cmf'; +import Layout from '@talend/react-components/lib/Layout'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; +import { + GeoChart, + getGeoChartConfig, + getHorizontalBarChartTooltip, + HorizontalBarChart, + KeyValueTooltip, + ValueType, +} from '@talend/react-dataviz'; + +const data = [ + { + key: 'Entry fully matching filter', + value: 2145, + filteredValue: 2145, + }, + { + key: 'Entry not matching filter', + value: 1500, + filteredValue: 0, + }, + { + key: 'Entry partially matching filter', + value: 3200, + filteredValue: 2080, + }, +]; + +const geo = [ + { key: 'Asia', value: 10 }, + { key: 'Amérique du Nord', value: 20 }, +]; + +export function Dataviz() { + const [chartsConfig, setConfig] = useState(); + useEffect(() => { + async function load() { + try { + const config = await getGeoChartConfig('CONTINENT'); + setConfig(config); + } catch (error) { + console.error(error); + } + } + load(); + }, []); + + return ( + } header={}> +
    + ( + + )} + /> +
    +
    + + ( + + )} + /> + +
    +
    + ); +} diff --git a/packages/playground-vite/src/app/components/FacetedSearch.jsx b/packages/playground-vite/src/app/components/FacetedSearch.jsx new file mode 100644 index 0000000000..dd04869ad3 --- /dev/null +++ b/packages/playground-vite/src/app/components/FacetedSearch.jsx @@ -0,0 +1,59 @@ +// eslint-disable-next-line @talend/import-depth +import Layout from '@talend/react-components/lib/Layout'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; +import FacetedSearch from '@talend/react-faceted-search'; + +import * as badges from './badgesDefinitions'; + +function action(msg) { + // eslint-disable-next-line no-console + return (...args) => console.log(msg, ...args); +} + +const badgesDefinitions = Object.values(badges); + +const callbacks = { + getTags: () => + new Promise(resolve => + setTimeout(resolve, 2000, [ + 'clean', + 'production', + 'last chunk', + 'salesforce', + 'outdated', + 'extracted', + 'security', + 'in processing', + 'deep learning', + 'sql', + 'cluster', + 'visualization', + 'analytics', + 'users', + 'warehouse', + 'api', + ]), + ), +}; + +export function FacetedSearchPlayground() { + return ( + } header={}> + + {currentFacetedMode => + (currentFacetedMode === FacetedSearch.constants.FACETED_MODE.ADVANCED && ( + + )) || + (currentFacetedMode === FacetedSearch.constants.FACETED_MODE.BASIC && ( + + )) + } + + + ); +} diff --git a/packages/playground-vite/src/app/components/Icons.jsx b/packages/playground-vite/src/app/components/Icons.jsx new file mode 100644 index 0000000000..0a66b44309 --- /dev/null +++ b/packages/playground-vite/src/app/components/Icons.jsx @@ -0,0 +1,23 @@ +// eslint-disable-next-line @talend/import-depth +import logo from '@talend/icons/src/svg/products/logo.svg'; +import Layout from '@talend/react-components/lib/Layout'; +import HeaderBar from '@talend/react-containers/lib/HeaderBar'; +import SidePanel from '@talend/react-containers/lib/SidePanel'; + +export function Icons() { + return ( + } header={}> +
    +

    Use SVG Icons in our apps

    +

    + I can import svg in my app code using the following snippet. You will have the url as + string +

    +
    import logo from '@talend/icons/src/svg/products/logo.svg';
    +

    Current url generated is {logo}

    + Let's use an image to display it: + logo +
    +
    + ); +} diff --git a/packages/playground-vite/src/app/components/List.jsx b/packages/playground-vite/src/app/components/List.jsx new file mode 100644 index 0000000000..9022201f84 --- /dev/null +++ b/packages/playground-vite/src/app/components/List.jsx @@ -0,0 +1,120 @@ +/* eslint-disable no-console */ +import { Layout, List, SubHeaderBar } from '@talend/react-components'; +import { HeaderBar, SidePanel } from '@talend/react-containers'; + +const props = { + id: 'talend', + displayMode: 'table', + list: { + columns: [ + { key: 'id', label: 'Id', order: 1 }, + { key: 'name', label: 'Name', order: 2 }, + { key: 'author', label: 'Author', order: 3 }, + { key: 'created', label: 'Created', order: 6 }, + { + key: 'modified', + label: 'Modified', + order: 4, + header: 'icon', + data: { iconName: 'talend-scheduler' }, + }, + { key: 'icon', label: 'Icon', hidden: true, order: 5 }, + ], + items: [ + { + id: 0, + name: 'Title with actions', + created: '2016-09-22', + modified: '2016-09-22', + author: 'Jean-Pierre DUPONT', + icon: 'talend-file-s3-o', + display: 'text', + className: 'item-0-class', + }, + { + id: 1, + name: 'Title with a lot of actions', + created: '2016-09-22', + modified: '2016-09-22', + author: 'Jean-Pierre DUPONT', + icon: 'talend-file-xls-o', + display: 'text', + className: 'item-1-class', + }, + { + id: 2, + name: 'Title with super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super long title oh yeah', + created: '2016-09-22', + modified: '2016-09-22', + author: 'Jean-Pierre DUPONT', + icon: 'talend-file-xls-o', + display: 'text', + className: 'item-1-class', + }, + { + id: 3, + name: 'Title in input mode', + created: '2016-09-22', + modified: '2016-09-22', + author: 'Jean-Pierre DUPONT', + icon: 'talend-file-json-o', + display: 'input', + className: 'item-2-class', + }, + { + id: 4, + name: 'Super long title to trigger overflow on tile rendering', + created: '2016-09-22', + modified: '2016-09-22', + author: + 'Jean-Pierre DUPONT with super super super super super super super super super super super super super super super super super super super super super super super long name, but there was not enough long text', + className: 'item-3-class', + }, + ], + titleProps: { + key: 'name', + iconKey: 'icon', + displayModeKey: 'display', + onClick: () => console.log('onClick'), + onEditCancel: () => console.log('onEditCancel'), + onEditSubmit: () => console.log('onEditSubmit'), + }, + itemProps: { + classNameKey: 'className', + }, + }, + toolbar: { + actionBar: { + actions: { + left: [], + }, + }, + display: { + onChange: () => console.log('display.onChange'), + }, + sort: { + field: 'name', + onChange: () => console.log('sort.onChange'), + options: [ + { id: 'id', name: 'Id' }, + { id: 'name', name: 'Name With Multiple Words' }, + ], + }, + }, +}; + +export function LeaguesList() { + return ( + } header={}> + { + window.location = '/'; + }} + /> + + + ); +} + +LeaguesList.displayName = 'LeaguesList'; diff --git a/packages/playground-vite/src/app/components/badgesDefinitions.js b/packages/playground-vite/src/app/components/badgesDefinitions.js new file mode 100644 index 0000000000..3313caaaf0 --- /dev/null +++ b/packages/playground-vite/src/app/components/badgesDefinitions.js @@ -0,0 +1,522 @@ +export const badgeName = { + properties: { + attribute: 'name', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Name', + operator: {}, + operators: [], + type: 'text', + placeholder: 'Enter a dataset name', + }, + metadata: { + isAvailableForQuickSearch: true, + isAvailableForFacetList: true, + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'containsIgnoreCase', + 'notContainsIgnoreCase', + 'equals', + 'notEquals', + 'match a regexp', + ], + 'data-feature': 'faceted-badge-name', + }, +}; + +export const badgeConnectionName = { + properties: { + attribute: 'connectionName', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Connection name', + operator: {}, + operators: [], + type: 'text', + placeholder: 'Enter a connection name', + }, + metadata: { + isAvailableForQuickSearch: true, + isAvailableForFacetList: true, + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'containsIgnoreCase', + 'notContainsIgnoreCase', + 'equals', + 'notEquals', + 'match a regexp', + ], + 'data-feature': 'faceted-badge-connection-name', + }, +}; + +export const badgeAuthor = { + properties: { + attribute: 'Author', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Author', + operator: {}, + operators: [], + type: 'text', + placeholder: 'Enter an author name', + }, + metadata: { + isAvailableForQuickSearch: true, + isAvailableForFacetList: true, + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'containsIgnoreCase', + 'notContainsIgnoreCase', + 'equals', + 'notEquals', + 'match a regexp', + ], + 'data-feature': 'faceted-badge-author', + }, +}; + +export const badgeAll = { + properties: { + attribute: 'all', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'All', + operator: {}, + operators: [], + type: 'text', + }, + metadata: { + isAvailableForFacetList: false, + badgePerFacet: '1', + entitiesPerBadge: '1', + operators: ['containsIgnoreCase', 'notContainsIgnoreCase'], + 'data-feature': 'faceted-badge-all', + }, +}; + +export const badgeMenu = { + properties: { + attribute: 'workspaceId', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Workspace', + operator: {}, + operators: [], + type: 'menu', + filterBarPlaceholder: 'Find a workspace', + }, + metadata: { + badgePerFacet: '1', + entitiesPerBadge: 'N', + values: [ + { id: 'personal', label: 'Personal' }, + { id: 'shared', label: 'Shared' }, + { id: 'custom', label: 'Custom' }, + { + id: 'ws1', + label: + "Long long workspace name can't fit in one line. Long long workspace name can't fit in one line. ", + }, + { id: 'ws2', label: 'Workspace 2' }, + { id: 'ws3', label: 'Workspace 3' }, + { id: 'ws4', label: 'Workspace 4' }, + { id: 'ws5', label: 'Workspace 5' }, + { id: 'ws6', label: 'Workspace 6' }, + { id: 'ws7', label: 'Workspace 7' }, + { id: 'ws8', label: 'Workspace 8' }, + { id: 'ws9', label: 'Workspace 9' }, + { id: 'ws10', label: 'Workspace Test' }, + ], + operators: ['equals', 'notEquals'], + 'data-feature': 'faceted-badge-workspace', + }, +}; + +export const badgeConnectionType = { + properties: { + attribute: 'connection.type', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Connection type', + operator: {}, + operators: [], + type: 'checkbox', + filterBarPlaceholder: 'Find a connection type', + }, + metadata: { + badgePerFacet: '1', + entitiesPerBadge: 'N', + values: [ + { id: 'amazon_s3', label: 'Amazon S3' }, + { id: 'hdfs', label: 'HDFS' }, + { id: 'kafka', label: 'Kafka' }, + { id: 'localcon', label: 'Local connection' }, + { id: 'salesforce', label: 'Salesforce' }, + { id: 'aws_kinesis', label: 'AWS kinesis' }, + ], + operators: ['in', 'notIn'], + 'data-feature': 'faceted-badge-connection-type', + }, +}; + +export const badgeConnectionTypeAllSelector = { + properties: { + attribute: 'connection.type', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Connection type', + operator: {}, + operators: [], + type: 'checkbox', + filterBarPlaceholder: 'Find a connection type', + }, + metadata: { + badgePerFacet: '1', + entitiesPerBadge: 'N', + values: [ + { id: 'amazon_s3', label: 'Amazon S3' }, + { id: 'hdfs', label: 'HDFS' }, + { id: 'kafka', label: 'Kafka' }, + { id: 'localcon', label: 'Local connection' }, + { id: 'salesforce', label: 'Salesforce' }, + { id: 'aws_kinesis', label: 'AWS kinesis' }, + ], + operators: ['in', 'notIn'], + allSelector: true, + }, +}; + +export const badgePrice = { + properties: { + attribute: 'price', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Price', + operator: {}, + operators: [], + type: 'number', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'equals', + 'notEquals', + 'greaterThan', + 'greaterThanOrEquals', + 'lessThan', + 'lessThanOrEquals', + ], + 'data-feature': 'faceted-badge-price', + }, +}; + +export const badgeValid = { + properties: { + attribute: 'valid', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Valid', + operator: {}, + operators: [], + type: 'slider', + icon: { + name: 'talend-pie-charts', + class: 'valid', + }, + unit: '%', + defaultValue: 50, + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: ['equals', 'greaterThan', 'lessThan'], + }, +}; + +export const badgeEmpty = { + properties: { + attribute: 'empty', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Empty', + operator: {}, + operators: [], + type: 'slider', + icon: { + name: 'talend-pie-charts', + class: 'empty', + }, + unit: '%', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: ['equals', 'greaterThan', 'lessThan'], + }, +}; + +export const badgeInvalid = { + properties: { + attribute: 'invalid', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Invalid', + operator: {}, + operators: [], + type: 'slider', + icon: { + name: 'talend-pie-charts', + class: 'invalid', + }, + unit: '%', + defaultValue: 50, + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: ['equals', 'greaterThan', 'lessThan'], + }, +}; + +export const badgeTags = { + properties: { + attribute: 'tags', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Tags', + operator: {}, + operators: [], + type: 'checkbox', + }, + metadata: { + badgePerFacet: '1', + entitiesPerBadge: 'N', + operators: ['in', 'notIn'], + 'data-feature': 'faceted-badge-tags', + }, +}; + +export const badgeWithVeryLongName = { + properties: { + attribute: 'price', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'helloverybeautifullworldhowareyouinthislovelydaythesunishiningandtheskyisbright?', + operator: {}, + operators: [], + type: 'number', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'equals', + 'notEquals', + 'greaterThan', + 'greaterThanOrEquals', + 'lessThan', + 'lessThanOrEquals', + ], + }, +}; + +export const badgeEnumWithLotOfValues = { + properties: { + attribute: 'connection.type', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Connection type', + operator: {}, + operators: [], + type: 'checkbox', + filterBarPlaceholder: 'Find a connection type', + }, + metadata: { + badgePerFacet: '1', + entitiesPerBadge: 'N', + values: [ + { id: 'amazon_s3', label: 'Amazon S3' }, + { id: 'hdfs', label: 'HDFS' }, + { id: 'kafka', label: 'Kafka' }, + { id: 'localcon', label: 'Local connection' }, + { id: 'salesforce', label: 'Salesforce' }, + { id: 'aws_kinesis', label: 'AWS kinesis' }, + { id: 'amazon_s3_low', label: 'Amazon S3 Low' }, + { id: 'hdfs_low', label: 'HDFS Low' }, + { id: 'kafka_low', label: 'Kafka Low' }, + { id: 'localcon_low', label: 'Local connection Low' }, + { id: 'salesforce_low', label: 'Salesforce Low' }, + { id: 'aws_kinesis_low', label: 'AWS kinesis Low' }, + { id: 'amazon_s3_high', label: 'Amazon S3 High' }, + { id: 'hdfs_high', label: 'HDFS High' }, + { id: 'kafka_high', label: 'Kafka High' }, + { id: 'localcon_high', label: 'Local connection High' }, + { id: 'salesforce_high', label: 'Salesforce High' }, + { id: 'aws_kinesis_high', label: 'AWS kinesis High' }, + { id: 'amazon_s3_classic', label: 'Amazon S3 Classic' }, + { id: 'hdfs_classic', label: 'HDFS Classic' }, + { id: 'kafka_classic', label: 'Kafka Classic' }, + { id: 'localcon_classic', label: 'Local connection Classic' }, + { id: 'salesforce_classic', label: 'Salesforce Classic' }, + { id: 'aws_kinesis_classic', label: 'AWS kinesis Classic' }, + ], + operators: ['in', 'notIn'], + }, +}; + +export const badgeTextAsCustomAttribute = { + properties: { + attribute: 'target', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Target', + operator: {}, + operators: [], + type: 'text', + placeholder: 'Enter a custom attribute', + }, + metadata: { + category: 'Custom attributes', + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'containsIgnoreCase', + 'notContainsIgnoreCase', + 'equals', + 'notEquals', + 'match a regexp', + ], + }, +}; + +export const badgeEnumsAsCustomAttribute = { + properties: { + attribute: 'visibility', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Visibility', + operator: {}, + operators: [], + type: 'checkbox', + filterBarPlaceholder: 'Find a visibility', + }, + metadata: { + badgePerFacet: '1', + entitiesPerBadge: 'N', + category: 'Custom attributes', + values: [ + { id: 'internal', label: 'Internal' }, + { id: 'public', label: 'Public' }, + ], + operators: ['in', 'notIn'], + }, +}; + +export const badgeTextAsCategory = { + properties: { + attribute: 'owner', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Owner', + operator: {}, + operators: [], + type: 'text', + placeholder: 'Enter a category name', + }, + metadata: { + category: 'Very long long long long long long long category', + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: ['containsIgnoreCase', 'notContainsIgnoreCase', 'equals'], + }, +}; + +export const badgeEmptyLabel = { + properties: { + attribute: 'title', + initialOperatorOpened: true, + initialValueOpened: false, + label: '', + operator: {}, + operators: [], + type: 'text', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: ['containsIgnoreCase', 'notContainsIgnoreCase', 'equals'], + }, +}; + +export const badgePriceAsCustomAttribute = { + properties: { + attribute: 'price', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Price', + operator: {}, + operators: [], + type: 'number', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + category: 'Custom attributes', + operators: [ + 'equals', + 'notEquals', + 'greaterThan', + 'greaterThanOrEquals', + 'lessThan', + 'lessThanOrEquals', + ], + }, +}; + +export const badgeCreationDate = { + properties: { + attribute: 'creationDate', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Creation Date', + operator: {}, + operators: [], + type: 'date', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: [ + 'equals', + 'notEquals', + 'greaterThan', + 'greaterThanOrEquals', + 'lessThan', + 'lessThanOrEquals', + ], + 'data-feature': 'faceted-badge-creation-date', + }, +}; + +export const badgePeriod = { + properties: { + attribute: 'period', + initialOperatorOpened: true, + initialValueOpened: false, + label: 'Period', + operator: {}, + operators: [], + type: 'period', + }, + metadata: { + badgePerFacet: 'N', + entitiesPerBadge: '1', + operators: ['in'], + 'data-feature': 'faceted-badge-period', + }, +}; diff --git a/packages/playground-vite/src/app/foo.html b/packages/playground-vite/src/app/foo.html new file mode 100644 index 0000000000..c609200157 --- /dev/null +++ b/packages/playground-vite/src/app/foo.html @@ -0,0 +1 @@ +

    Hello my name is foo

    diff --git a/packages/playground-vite/src/app/i18n.js b/packages/playground-vite/src/app/i18n.js new file mode 100644 index 0000000000..2364a509cc --- /dev/null +++ b/packages/playground-vite/src/app/i18n.js @@ -0,0 +1,53 @@ +/* eslint-disable @talend/import-depth */ + +/* eslint-disable import/no-extraneous-dependencies */ +import { initReactI18next } from 'react-i18next'; + +import i18next from 'i18next'; +import HttpApi from 'i18next-http-backend'; + +import assetsApi from '@talend/assets-api'; +import { namespaces as tuiComponentsNamespaces } from '@talend/locales-tui-components/namespaces.js'; +import { namespaces as tuiContainersNamespaces } from '@talend/locales-tui-containers/namespaces.js'; +import { namespaces as tuiFormsNamespaces } from '@talend/locales-tui-forms/namespaces.js'; + +const LOCALES_MAP = { + 'tui-components': assetsApi.getURL( + '/locales/{{lng}}/{{ns}}.json', + '@talend/locales-tui-components', + ), + 'tui-containers': assetsApi.getURL( + '/locales/{{lng}}/{{ns}}.json', + '@talend/locales-tui-containers', + ), + 'tui-forms': assetsApi.getURL('/locales/{{lng}}/{{ns}}.json', '@talend/locales-tui-forms'), + 'tui-faceted-search': assetsApi.getURL( + '/locales/{{lng}}/{{ns}}.json', + '@talend/locales-tui-faceted-search', + ), +}; + +function loadPath(languages, namespaces) { + return LOCALES_MAP[namespaces[0]] || '/assets/locales/{{lng}}/{{ns}}.json'; +} + +export function initI18n() { + i18next + .use(initReactI18next) + .use(HttpApi) + .init({ + fallbackLng: 'en', + lng: 'fr', + ns: [...tuiComponentsNamespaces, ...tuiContainersNamespaces, ...tuiFormsNamespaces], + react: { + useSuspense: false, + }, + interpolation: { + escapeValue: false, + }, + backend: { + loadPath, + }, + defaultNS: 'talend-ui-playground', + }); +} diff --git a/packages/playground-vite/src/app/index.jsx b/packages/playground-vite/src/app/index.jsx new file mode 100644 index 0000000000..657378d230 --- /dev/null +++ b/packages/playground-vite/src/app/index.jsx @@ -0,0 +1,71 @@ +/* eslint-disable no-console */ + +/** + * Import theme. + * Being the first import is important, so that it is the default style + * and other style can override it + */ +// eslint-disable-next-line @talend/import-depth +import { initI18n } from './i18n.js'; + +import '@talend/bootstrap-theme/dist/bootstrap.css'; +import cmf from '@talend/react-cmf'; +import getRouter from '@talend/react-cmf-router'; +import { AppLoader, IconsProvider as BaseIconsProvider } from '@talend/react-components'; +import containersModule from '@talend/react-containers'; +import ComponentForm from '@talend/react-containers/lib/ComponentForm'; + +import actions from './actions/index.js'; +import ComponentFormSandbox from './components/ComponentFormSandbox.jsx'; +import { Dataviz } from './components/Dataviz.jsx'; +import { FacetedSearchPlayground } from './components/FacetedSearch.jsx'; +import { Icons } from './components/Icons.jsx'; +import { LeaguesList } from './components/List.jsx'; + +// thanks ui-scripts +let basename = window.basename; +if (basename === '/') { + basename = undefined; +} + +const router = getRouter({ basename }); + +initI18n(); +const allsvg = `${basename || ''}/cdn/@talend/icons/${ + process.env.ICONS_VERSION +}/dist/svg-bundle/all.svg`; + +function IconsProvider() { + return ; +} + +const app = { + components: { + ComponentForm, + ComponentFormSandbox, + FacetedSearch: FacetedSearchPlayground, + LeaguesList, + IconsProvider, + Dataviz, + Icons, + }, + settingsURL: `${basename || ''}/settings.json`, + actionCreators: actions, + middlewares: [], + modules: [router.cmfModule, containersModule], + RootComponent: router.RootComponent, + AppLoader, +}; + +// eslint-disable-next-line no-console +console.log('app bootstrap should happens only once'); +/** + * Initialize CMF + * This will: + * - Register your components in the CMF registry + * - Register your action creators in CMF registry + * - Setup redux store using reducer + * - Fetch the settings + * - render react-dom in the dom 'app' element + */ +cmf.bootstrap(app); diff --git a/packages/playground-vite/src/assets/inject.js b/packages/playground-vite/src/assets/inject.js new file mode 100644 index 0000000000..700b1483df --- /dev/null +++ b/packages/playground-vite/src/assets/inject.js @@ -0,0 +1,42 @@ +// custom inject to UMD from surge and the others from unpkg + +// eslint-disable-next-line func-names +(function () { + const CDN_URL_REGEX = /^(\/?.*\/cdn)\//; + + function removeIntegrity(info) { + if (info.name && info.name.startsWith('@talend')) { + // eslint-disable-next-line no-param-reassign + delete info.integrity; + } + return info; + } + function prepareUrl(url) { + let newUrl; + const m = CDN_URL_REGEX.exec(url); + if (m !== null) { + // return base ? url.slice(1) : url; + if (!url.includes('/cdn/@talend')) { + newUrl = url.replace(m[1], 'https://statics.cloud.talend.com'); + } + } + return newUrl || url; + } + window.Talend.CDN_URL = 'https://statics.cloud.talend.com'; + + // let's override the assets-api's getCDNUrl to serve local package + window.Talend.getCDNUrl = function getCDNUrl(pkg = {}) { + // if local to the repository load from /cdn + if (['@talend/react-dataviz', '@talend/icons'].includes(pkg.name)) { + const baseTag = document.querySelector('base'); + if (baseTag) { + const root = baseTag.getAttribute('href') || '/'; + return `${root === '/' ? '' : root}/cdn/${pkg.name}/${pkg.version}${pkg.path}`; + } + return `/cdn/${pkg.name}/${pkg.version}${pkg.path}`; + } + return `${window.Talend.CDN_URL}/${pkg.name}/${pkg.version}${pkg.path}`; + }; + window.talendAddStyles(window.Talend.cssBuild.map(removeIntegrity), prepareUrl); + window.talendAddScripts(window.Talend.build.map(removeIntegrity), prepareUrl); +})(); diff --git a/packages/playground-vite/src/settings/settings.json b/packages/playground-vite/src/settings/settings.json new file mode 100644 index 0000000000..9f1884a257 --- /dev/null +++ b/packages/playground-vite/src/settings/settings.json @@ -0,0 +1,146 @@ +{ + "actions": { + "menu:ComponentForm": { + "icon": "talend-text", + "label": "ComponentForm", + "onClickDispatch": { + "type": "MENU_COMPONENT_FORM_CLICKED", + "cmf": { + "routerPush": "/ComponentForm" + } + } + }, + "menu:List": { + "icon": "talend-table", + "label": "List", + "onClickDispatch": { + "type": "MENU_LIST_CLICKED", + "cmf": { + "routerPush": "/List" + } + } + }, + "menu:Dataviz": { + "icon": "talend-charts", + "label": "Dataviz", + "onClickDispatch": { + "type": "MENU_LIST_CLICKED", + "cmf": { + "routerPush": "/Dataviz" + } + } + }, + "menu:FacetedSearch": { + "icon": "talend-search", + "label": "Faceted Search", + "onClickDispatch": { + "type": "MENU_LIST_CLICKED", + "cmf": { + "routerPush": "/FacetedSearch" + } + } + }, + "menu:Icons": { + "icon": "talend-datagrid", + "label": "Icons", + "onClickDispatch": { + "type": "MENU_LIST_CLICKED", + "cmf": { + "routerPush": "/Icons" + } + } + } + }, + "props": { + "AppLoader#default": { + "components": { + "before-children": [ + { + "component": "Notification" + }, + { + "component": "IconsProvider" + } + ] + } + }, + "HeaderBar#default": { + "keepComponentState": true, + "logo": { + "id": "header-bar-demo-logo", + "icon": "talend-world", + "isFull": false + }, + "brand": { + "id": "header-bar-demo-brand", + "label": "Choose a product" + }, + "products": { + "id": "header-bar-demo-brands", + "items": [ + { + "icon": "talend-star", + "label": "Static menu entry", + "dispatch": { + "type": "CUSTOM_ACTION_TYPE", + "payload": { + "foo": "bar" + } + } + } + ] + }, + "productsUrl": "/api/mock/header-bar/products-list" + }, + "SidePanel#default": { + "actionIds": [ + "menu:ComponentForm", + "menu:List", + "menu:Dataviz", + "menu:FacetedSearch", + "menu:Icons" + ] + }, + "Layout#default": { + "mode": "TwoColumns", + "header": { "component": "HeaderBar" }, + "one": { "component": "SidePanel" }, + "content": {} + }, + "ComponentForm#default": { + "definitionURL": "/api/v1/forms/example", + "uiSpecPath": "ui", + "triggerURL": "/api/v1/application/action", + "className": "full-form" + } + }, + "routes": { + "path": "/", + "component": "AppLoader", + "indexRoute": { + "component": "LeaguesList" + }, + "childRoutes": [ + { + "path": "List", + "component": "LeaguesList" + }, + { + "path": "ComponentForm", + "component": "ComponentFormSandbox" + }, + { + "path": "Dataviz", + "component": "Dataviz" + }, + { + "path": "FacetedSearch", + "component": "FacetedSearch" + }, + { + "path": "Icons", + "component": "Icons" + } + ] + } +} diff --git a/packages/playground-vite/talend-scripts.json b/packages/playground-vite/talend-scripts.json new file mode 100644 index 0000000000..57ed06df2f --- /dev/null +++ b/packages/playground-vite/talend-scripts.json @@ -0,0 +1,12 @@ +{ + "cmf": true, + "html": {}, + "webpack": { + "monoRepoFixSourceMap": ["../dataviz/src", "../containers/src", "../components/src"], + "config": { + "development": "./webpack.config.dev.cjs", + "production": "./webpack.config.dev.cjs" + } + }, + "dynamic-cdn-webpack-plugin": false +} diff --git a/packages/playground/vite.config.js b/packages/playground-vite/vite.config.js similarity index 100% rename from packages/playground/vite.config.js rename to packages/playground-vite/vite.config.js diff --git a/packages/playground/mockBackend/jsonForward.cjs b/packages/playground/mockBackend/jsonForward.js similarity index 100% rename from packages/playground/mockBackend/jsonForward.cjs rename to packages/playground/mockBackend/jsonForward.js diff --git a/packages/playground/mockBackend/kit.cjs b/packages/playground/mockBackend/kit.js similarity index 98% rename from packages/playground/mockBackend/kit.cjs rename to packages/playground/mockBackend/kit.js index 1762e82425..a61892345e 100644 --- a/packages/playground/mockBackend/kit.cjs +++ b/packages/playground/mockBackend/kit.js @@ -1,6 +1,6 @@ const url = require('url'); const http = require('https'); -const forms = require('./mock/kit/index.cjs'); +const forms = require('./mock/kit'); function getTriggerInfo(req) { return { diff --git a/packages/playground/mockBackend/mock/kit/index.cjs b/packages/playground/mockBackend/mock/kit/index.js similarity index 100% rename from packages/playground/mockBackend/mock/kit/index.cjs rename to packages/playground/mockBackend/mock/kit/index.js diff --git a/packages/playground/mockBackend/server.cjs b/packages/playground/mockBackend/server.js similarity index 72% rename from packages/playground/mockBackend/server.cjs rename to packages/playground/mockBackend/server.js index a71b5f3843..a7812c84b2 100644 --- a/packages/playground/mockBackend/server.cjs +++ b/packages/playground/mockBackend/server.js @@ -1,6 +1,6 @@ const bodyParser = require('body-parser'); -const kit = require('./kit.cjs'); -const jsonForward = require('./jsonForward.cjs'); +const kit = require('./kit'); +const jsonForward = require('./jsonForward'); const server = devServer => { devServer.app.use(bodyParser.json()); // for parsing application/json diff --git a/packages/playground/package.json b/packages/playground/package.json index 717004eac9..bdc82ab858 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -3,14 +3,12 @@ "version": "2.4.4", "description": "Showcase Talend/UI", "private": true, - "type": "module", "main": "app/index.js", "scripts": { "build": "cross-env BASENAME='/playground' talend-scripts build", "test": "echo nothing to test in playground", "test:demo:umd": "cross-env BASENAME='/playground/' INITIATOR_URL='/playground/inject.js' talend-scripts build --prod", "start": "cross-env BASENAME='/' INITIATOR_URL='/inject.js' talend-scripts start --open http://localhost:3000", - "start:vite": "vite dev", "start-dist": "talend-scripts build && node serve-dist", "lint": "talend-scripts lint" }, @@ -28,33 +26,25 @@ "@talend/dynamic-cdn-webpack-plugin": "^13.1.1", "@talend/eslint-config": "^13.0.3", "@talend/eslint-plugin": "^1.1.1", + "@talend/scripts-core": "^16.3.5", "@talend/scripts-config-babel": "^13.3.1", "@talend/scripts-config-stylelint": "^4.1.1", - "@talend/scripts-core": "^16.3.5", - "@vitejs/plugin-react": "^4.2.1", "body-parser": "1.20.1", "compression": "^1.7.4", "copy-webpack-plugin": "^11.0.0", "cross-env": "^7.0.3", - "esbuild-plugin-react-virtualized": "^1.0.4", "express": "^4.18.2", "i18next-http-backend": "^1.4.5", - "mockjs": "^1.1.0", - "sass": "^1.75.0", - "vite": "^5.2.8", - "vite-plugin-html": "^3.2.2", - "vite-plugin-mock": "^3.0.1", "webpack": "^5.90.3" }, "dependencies": { - "@talend/assets-api": "^1.3.2", "@talend/bootstrap-theme": "^9.1.1", + "@talend/assets-api": "^1.3.2", "@talend/design-system": "^10.0.0", "@talend/design-tokens": "^3.1.1", "@talend/icons": "^7.7.1", "@talend/locales-tui-components": "^11.4.5", "@talend/locales-tui-containers": "^9.1.3", - "@talend/locales-tui-faceted-search": "^11.3.0", "@talend/locales-tui-forms": "^10.2.4", "@talend/react-cmf": "^8.4.1", "@talend/react-cmf-router": "^6.1.2", diff --git a/packages/playground/src/app/actions/index.js b/packages/playground/src/app/actions/index.js index 0d8b889742..e294039d49 100644 --- a/packages/playground/src/app/actions/index.js +++ b/packages/playground/src/app/actions/index.js @@ -1,4 +1,4 @@ -import redirect from './redirect.js'; +import redirect from './redirect'; export default { redirect, diff --git a/packages/playground/src/app/components/ComponentFormSandbox.jsx b/packages/playground/src/app/components/ComponentFormSandbox.jsx index 291152fd6f..d524f0e023 100644 --- a/packages/playground/src/app/components/ComponentFormSandbox.jsx +++ b/packages/playground/src/app/components/ComponentFormSandbox.jsx @@ -11,11 +11,11 @@ import HeaderBar from '@talend/react-containers/lib/HeaderBar'; import SidePanel from '@talend/react-containers/lib/SidePanel'; import UIForm from '@talend/react-forms'; -import example from '../../../mockBackend/mock/kit/example.json'; - // test new behavior on non css module files import './ComponentFormSandbox.scss'; +const example = require('../../../mockBackend/mock/kit/example.json'); + const { isComponentFormDirty } = ComponentForm.selectors; const { setComponentFormDirtyState } = ComponentForm.actions; diff --git a/packages/playground/src/app/i18n.js b/packages/playground/src/app/i18n.js index 2364a509cc..238619f77d 100644 --- a/packages/playground/src/app/i18n.js +++ b/packages/playground/src/app/i18n.js @@ -7,9 +7,9 @@ import i18next from 'i18next'; import HttpApi from 'i18next-http-backend'; import assetsApi from '@talend/assets-api'; -import { namespaces as tuiComponentsNamespaces } from '@talend/locales-tui-components/namespaces.js'; -import { namespaces as tuiContainersNamespaces } from '@talend/locales-tui-containers/namespaces.js'; -import { namespaces as tuiFormsNamespaces } from '@talend/locales-tui-forms/namespaces.js'; +import { namespaces as tuiComponentsNamespaces } from '@talend/locales-tui-components/namespaces'; +import { namespaces as tuiContainersNamespaces } from '@talend/locales-tui-containers/namespaces'; +import { namespaces as tuiFormsNamespaces } from '@talend/locales-tui-forms/namespaces'; const LOCALES_MAP = { 'tui-components': assetsApi.getURL( diff --git a/packages/playground/src/app/index.jsx b/packages/playground/src/app/index.jsx index 1cc9f9e9a4..f8bdc5a392 100644 --- a/packages/playground/src/app/index.jsx +++ b/packages/playground/src/app/index.jsx @@ -16,11 +16,11 @@ import containersModule from '@talend/react-containers'; import ComponentForm from '@talend/react-containers/lib/ComponentForm'; import actions from './actions'; -import ComponentFormSandbox from './components/ComponentFormSandbox.jsx'; -import { Dataviz } from './components/Dataviz.jsx'; -import { FacetedSearchPlayground } from './components/FacetedSearch.jsx'; -import { Icons } from './components/Icons.jsx'; -import { LeaguesList } from './components/List.jsx'; +import ComponentFormSandbox from './components/ComponentFormSandbox'; +import { Dataviz } from './components/Dataviz'; +import { FacetedSearchPlayground } from './components/FacetedSearch'; +import { Icons } from './components/Icons'; +import { LeaguesList } from './components/List'; // thanks ui-scripts let basename = window.basename; diff --git a/packages/playground/talend-scripts.json b/packages/playground/talend-scripts.json index 57ed06df2f..23c100bf93 100644 --- a/packages/playground/talend-scripts.json +++ b/packages/playground/talend-scripts.json @@ -4,8 +4,8 @@ "webpack": { "monoRepoFixSourceMap": ["../dataviz/src", "../containers/src", "../components/src"], "config": { - "development": "./webpack.config.dev.cjs", - "production": "./webpack.config.dev.cjs" + "development": "./webpack.config.dev.js", + "production": "./webpack.config.dev.js" } }, "dynamic-cdn-webpack-plugin": false diff --git a/packages/playground/webpack.config.dev.cjs b/packages/playground/webpack.config.dev.js similarity index 95% rename from packages/playground/webpack.config.dev.cjs rename to packages/playground/webpack.config.dev.js index 023e7b18a0..3045a69dba 100644 --- a/packages/playground/webpack.config.dev.cjs +++ b/packages/playground/webpack.config.dev.js @@ -3,7 +3,7 @@ const webpack = require('webpack'); const resolve = require('@talend/dynamic-cdn-webpack-plugin/src/resolve-pkg'); const CopyWebpackPlugin = require('copy-webpack-plugin'); -const mockBackend = require('./mockBackend/server.cjs'); +const mockBackend = require('./mockBackend/server'); /* * because we are in dev mode our webpack config do not detect cdn resources in the yarn.lock. @@ -18,7 +18,6 @@ function getPath(pkg) { return pkgPath .replace('main.js', '') .replace('lib/index.js', '') - .replace('index.js', '') .replace('dist/bootstrap.js', '') .replace('dist/TalendIcons.js', ''); } From 791c6d9babea8e38068d4114b5d0dba22541a17f Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 6 May 2024 17:26:59 +0200 Subject: [PATCH 42/52] some fix --- packages/icons/package.json | 9 +- packages/playground-vite/package.json | 3 +- .../app/components/ComponentFormSandbox.jsx | 2 +- .../src/app/components/example.json | 343 ++++++++++++++++++ 4 files changed, 351 insertions(+), 6 deletions(-) create mode 100644 packages/playground-vite/src/app/components/example.json diff --git a/packages/icons/package.json b/packages/icons/package.json index 0e1fb3a71d..317b122940 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -25,10 +25,13 @@ }, ".": { "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" + "types": "./lib-esm/typeUtils.d.ts", + "default": "./dist/TalendIcons.js" }, - "require": "./index.js" + "require": { + "types": "./dist/typeUtils.d.ts", + "default": "./dist/TalendIcons.js" + } } }, "license": "Apache-2.0", diff --git a/packages/playground-vite/package.json b/packages/playground-vite/package.json index a4cd71f87f..d54d613c9f 100644 --- a/packages/playground-vite/package.json +++ b/packages/playground-vite/package.json @@ -9,8 +9,7 @@ "build": "cross-env BASENAME='/playground' talend-scripts build", "test": "echo nothing to test in playground", "test:demo:umd": "cross-env BASENAME='/playground/' INITIATOR_URL='/playground/inject.js' talend-scripts build --prod", - "start": "cross-env BASENAME='/' INITIATOR_URL='/inject.js' talend-scripts start --open http://localhost:3000", - "start:vite": "vite dev", + "start": "vite dev", "start-dist": "talend-scripts build && node serve-dist", "lint": "talend-scripts lint" }, diff --git a/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx b/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx index 291152fd6f..ba4aeac920 100644 --- a/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx +++ b/packages/playground-vite/src/app/components/ComponentFormSandbox.jsx @@ -11,7 +11,7 @@ import HeaderBar from '@talend/react-containers/lib/HeaderBar'; import SidePanel from '@talend/react-containers/lib/SidePanel'; import UIForm from '@talend/react-forms'; -import example from '../../../mockBackend/mock/kit/example.json'; +import example from './example.json'; // test new behavior on non css module files import './ComponentFormSandbox.scss'; diff --git a/packages/playground-vite/src/app/components/example.json b/packages/playground-vite/src/app/components/example.json new file mode 100644 index 0000000000..cec63cee94 --- /dev/null +++ b/packages/playground-vite/src/app/components/example.json @@ -0,0 +1,343 @@ +{ + "metadata": { + "children": [], + "id": "example", + "label": "Form example", + "name": "example", + "version": 0 + }, + "ui": { + "jsonSchema": { + "properties": { + "array": { + "type": "object", + "properties": { + "strings": { + "type": "array", + "items": { + "type": "string", + "enum": ["red", "green", "blue"] + } + }, + "keyvalue": { + "default": [ + { + "value": "value", + "key": "key" + } + ], + "title": "key value", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "title": "Value", + "type": "string", + "default": "" + }, + "key": { + "title": "Key", + "type": "string", + "default": "" + } + } + } + } + } + }, + "triggers": { + "login": { + "type": "string" + }, + "password": { + "type": "string" + }, + "url": { + "pattern": "^(http://|https://).*", + "title": "URL", + "type": "string" + } + }, + "example": { + "properties": { + "code": { + "type": "string" + }, + "string": { + "type": "string" + }, + "datalist": { + "type": "string" + }, + "datalistRestricted": { + "type": "string" + }, + "multiSelect": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object", + "required": ["url", "login", "password"] + } + }, + "title": "example", + "type": "object" + }, + "properties": { + "example": { + "datalist": "clafoutis", + "$datalist_name": "Clafoutis aux poires et aux fruits", + "tags": ["clafoutis"], + "$tags_name": ["Clafoutis aux poires et aux fruits"], + "multiSelect": ["1"], + "$multiSelect_name": ["accusamus beatae ad facilis cum similique qui sunt"] + }, + "triggers": { + "login": "login", + "password": "login", + "url": "http://www.example.com" + }, + "array": { + "strings": ["red"], + "keyvalue": [{ "value": "value", "key": "key" }] + } + }, + "uiSchema": [ + { + "title": "Example", + "widget": "tabs", + "items": [ + { + "title": "Advanced Widget", + "widget": "fieldset", + "items": [ + { + "key": "example.code", + "title": "Code", + "widget": "code", + "options": { + "language": "python", + "height": "300px" + } + }, + { + "key": "example.datalist", + "title": "Datalist", + "titleMap": [], + "triggers": [ + { + "action": "suggestionForDemo", + "family": "remote", + "type": "suggestions", + "onEvent": "focus", + "parameters": [ + { + "path": "example.datalist", + "key": "id" + } + ] + } + ], + "widget": "datalist" + }, + { + "key": "example.datalistRestricted", + "restricted": true, + "title": "Datalist (restricted)", + "titleMap": [], + "triggers": [ + { + "action": "suggestionForDemo", + "family": "remote", + "type": "suggestions", + "onEvent": "focus", + "parameters": [ + { + "path": "example.datalistRestricted", + "key": "id" + } + ] + } + ], + "widget": "datalist" + }, + { + "key": "example.tags", + "title": "multiSelectTag", + "titleMap": [], + "triggers": [ + { + "action": "suggestionForDemo", + "family": "remote", + "type": "suggestions", + "onEvent": "focus", + "parameters": [ + { + "path": "example.tags", + "key": "id" + } + ] + } + ], + "widget": "multiSelectTag" + }, + { + "key": "example.multiSelect", + "title": "multiSelect", + "titleMap": [], + "triggers": [ + { + "action": "suggestionBig", + "family": "remote", + "type": "suggestions", + "onEvent": "focus", + "parameters": [ + { + "path": "example.multiSelect", + "key": "id" + } + ] + } + ], + "widget": "multiSelect" + } + ] + }, + { + "title": "Triggers", + "widget": "fieldset", + "items": [ + { + "widget": "button", + "key": "example.neededToDisplayTheError", + "type": "button", + "title": "Give me HTTP five", + "triggers": [ + { + "action": "giveMeFive", + "family": "test", + "options": [], + "parameters": [ + { + "key": "type", + "path": "example.type" + } + ], + "type": "error" + } + ] + }, + { + "key": "triggers.url", + "placeholder": "url", + "widget": "text" + }, + { + "key": "triggers.login", + "placeholder": "login", + "widget": "text" + }, + { + "key": "triggers.password", + "placeholder": "password", + "type": "password", + "widget": "text" + }, + { + "key": "my.bad.i.need.a.key", + "title": "Validate auth", + "triggers": [ + { + "action": "basicAuth", + "family": "Example", + "parameters": [ + { + "key": "basicAuth.username", + "path": "example.login" + }, + { + "key": "basicAuth.password", + "path": "example.password" + }, + { + "key": "basicAuth.url", + "path": "example.url" + } + ], + "options": ["triggers.url", "triggers.password", "triggers.login"], + "type": "healthcheck" + } + ], + "widget": "button" + } + ] + }, + { + "title": "Arrays", + "widget": "fieldset", + "items": [ + { + "key": "array.strings", + "title": "Strings", + "widget": "array", + "items": [ + { + "key": "array.strings[]", + "widget": "select", + "titleMap": [ + { "name": "red", "value": "red" }, + { "name": "green", "value": "green" }, + { "name": "blue", "value": "blue" } + ] + } + ] + }, + { + "placeholder": "key value", + "key": "array.keyvalue", + "itemWidget": "collapsibleFieldset", + "itemTitle": "Column", + "itemManaged": true, + "items": [ + { + "key": "array.keyvalue[]", + "items": [ + { + "widget": "columns", + "items": [ + { + "placeholder": "key", + "widget": "text", + "title": "Key", + "key": "array.keyvalue[].key", + "required": true + }, + { + "placeholder": "value", + "widget": "text", + "title": "Value", + "key": "array.keyvalue[].value" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } +} From 9fe6da18cd435ba4dbd301d32fb8f2621c46a16c Mon Sep 17 00:00:00 2001 From: smouillour Date: Thu, 6 Jun 2024 16:15:59 +0200 Subject: [PATCH 43/52] fix review --- fork/json-schema-form-core/package.json | 11 ++--------- fork/react-bootstrap/package.json | 11 ++--------- packages/a11y/package.json | 11 ++--------- packages/assets-api/package.json | 11 ++--------- packages/cmf-router/package.json | 11 ++--------- packages/cmf/package.json | 11 ++--------- packages/components/package.json | 21 ++++----------------- packages/containers/package.json | 21 ++++----------------- packages/dataviz/package.json | 11 ++--------- packages/design-system/package.json | 21 ++++----------------- packages/design-tokens/package.json | 21 ++++----------------- packages/faceted-search/package.json | 21 ++++----------------- packages/forms/package.json | 11 ++--------- packages/icons/package.json | 22 ++++------------------ packages/utils/package.json | 21 ++++----------------- 15 files changed, 44 insertions(+), 192 deletions(-) diff --git a/fork/json-schema-form-core/package.json b/fork/json-schema-form-core/package.json index 4de54b32e5..4dd985d619 100644 --- a/fork/json-schema-form-core/package.json +++ b/fork/json-schema-form-core/package.json @@ -5,16 +5,9 @@ "main": "dist/index.js", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - } + "import": "./lib-esm/index.js", + "require": "./dist/index.js" } }, "scripts": { diff --git a/fork/react-bootstrap/package.json b/fork/react-bootstrap/package.json index 70d167a9eb..e956110595 100644 --- a/fork/react-bootstrap/package.json +++ b/fork/react-bootstrap/package.json @@ -11,16 +11,9 @@ "main": "lib/index.js", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "scripts": { diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 51ff573d1b..920389ecf4 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -7,16 +7,9 @@ "types": "./lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "scripts": { diff --git a/packages/assets-api/package.json b/packages/assets-api/package.json index 3217c358ce..753b1b143a 100644 --- a/packages/assets-api/package.json +++ b/packages/assets-api/package.json @@ -5,16 +5,9 @@ "main": "lib/index.js", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "license": "Apache-2.0", diff --git a/packages/cmf-router/package.json b/packages/cmf-router/package.json index f2bf9f13e0..fc4816dce3 100644 --- a/packages/cmf-router/package.json +++ b/packages/cmf-router/package.json @@ -5,16 +5,9 @@ "main": "lib/index.js", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "author": "Talend Frontend (http://www.talend.com)", diff --git a/packages/cmf/package.json b/packages/cmf/package.json index 0b3a094ec2..33547c40d8 100644 --- a/packages/cmf/package.json +++ b/packages/cmf/package.json @@ -6,16 +6,9 @@ "license": "Apache-2.0", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" }, "./lib/*": { "import": "./lib-esm/*", diff --git a/packages/components/package.json b/packages/components/package.json index 3b4fa1e7a0..4bd2c597ae 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -4,26 +4,13 @@ "main": "lib/index.js", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./lib/*": { - "import": { - "types": "./lib-esm/*/index.d.ts", - "default": "./lib-esm/*/index.js" - }, - "require": { - "types": "./lib/*/index.d.ts", - "default": "./lib/*/index.js" - } + "import": "./lib-esm/*/index.js", + "require": "./lib/*/index.js" }, ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "license": "Apache-2.0", diff --git a/packages/containers/package.json b/packages/containers/package.json index 31909c6000..3099657999 100644 --- a/packages/containers/package.json +++ b/packages/containers/package.json @@ -5,26 +5,13 @@ "types": "lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./lib/*": { - "import": { - "types": "./lib-esm/*/index.d.ts", - "default": "./lib-esm/*/index.js" - }, - "require": { - "types": "./lib/*/index.d.ts", - "default": "./lib/*/index.js" - } + "import": "./lib-esm/*/index.js", + "require": "./lib/*/index.js" }, ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "license": "Apache-2.0", diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json index b9cd406b6a..3373e1c36f 100644 --- a/packages/dataviz/package.json +++ b/packages/dataviz/package.json @@ -6,16 +6,9 @@ "types": "./lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "license": "Apache-2.0", diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 6591bdc815..83acbb80ce 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -6,26 +6,13 @@ "types": "lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./lib/*": { - "import": { - "types": "./lib-esm/*/index.d.ts", - "default": "./lib-esm/*/index.js" - }, - "require": { - "types": "./lib/*/index.d.ts", - "default": "./lib/*/index.js" - } + "import": "./lib-esm/*/index.js", + "require": "./lib/*/index.js" }, ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "scripts": { diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index 16dc3ffd27..3a6bd2caf6 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -6,7 +6,6 @@ "types": "lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./lib/tokens": { "import": "./lib-esm/_tokens.scss", "require": "./lib/_tokens.scss" @@ -16,28 +15,16 @@ "require": "./lib/_tokens.scss" }, "./lib/*": { - "import": { - "types": "./lib-esm/*.d.ts", - "default": "./lib-esm/*.js" - }, - "require": { - "types": "./lib/*.d.ts", - "default": "./lib/*.js" - } + "import": "./lib-esm/*.js", + "require": "./lib/*.js" }, "./dist/*": { "import": "./dist/*", "require": "./dist/*" }, ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "scripts": { diff --git a/packages/faceted-search/package.json b/packages/faceted-search/package.json index ff0417f7c3..6fc96a3f79 100644 --- a/packages/faceted-search/package.json +++ b/packages/faceted-search/package.json @@ -5,26 +5,13 @@ "main": "lib/index.js", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./lib/*": { - "import": { - "types": "./lib-esm/*/index.d.ts", - "default": "./lib-esm/*/index.js" - }, - "require": { - "types": "./lib/*/index.d.ts", - "default": "./lib/*/index.js" - } + "import": "./lib-esm/*/index.js", + "require": "./lib/*/index.js" }, ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "license": "Apache-2.0", diff --git a/packages/forms/package.json b/packages/forms/package.json index ef2c3bbfd8..9d545db8e0 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -5,16 +5,9 @@ "types": "./lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "license": "Apache-2.0", diff --git a/packages/icons/package.json b/packages/icons/package.json index 317b122940..883c6670e7 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -6,32 +6,18 @@ "style": "build/octicons.css", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./.storybook/main.js": "./.storybook/main.js", - "./.storybook/preview.js": "./.storybook/preview.js", "./src/*": { "import": "./src/*", "require": "./src/*" }, "./dist/typeUtils": { - "import": { - "types": "./lib-esm/typeUtils.d.ts", - "default": "./lib-esm/typeUtils.js" - }, - "require": { - "types": "./dist/typeUtils.d.ts", - "default": "./dist/typeUtils.js" - } + "import": "./lib-esm/typeUtils.js", + "require": "./dist/typeUtils.js" }, ".": { - "import": { - "types": "./lib-esm/typeUtils.d.ts", - "default": "./dist/TalendIcons.js" - }, - "require": { - "types": "./dist/typeUtils.d.ts", - "default": "./dist/TalendIcons.js" - } + "import": "./dist/TalendIcons.js", + "require": "./dist/TalendIcons.js" } }, "license": "Apache-2.0", diff --git a/packages/utils/package.json b/packages/utils/package.json index 5ea0dad3dc..ab459a2850 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -6,26 +6,13 @@ "types": "lib/index.d.ts", "module": "./lib-esm/index.js", "exports": { - "./package.json": "./package.json", "./lib/*": { - "import": { - "types": "./lib-esm/*/index.d.ts", - "default": "./lib-esm/*/index.js" - }, - "require": { - "types": "./lib/*/index.d.ts", - "default": "./lib/*/index.js" - } + "import": "./lib-esm/*/index.js", + "require": "./lib/*/index.js" }, ".": { - "import": { - "types": "./lib-esm/index.d.ts", - "default": "./lib-esm/index.js" - }, - "require": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } + "import": "./lib-esm/index.js", + "require": "./lib/index.js" } }, "repository": { From 1061f94e76aeb4f358aa57fc7add447b6aa522c4 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 12:21:31 +0200 Subject: [PATCH 44/52] fix @talend/react-cmf version in playground-vite --- packages/playground-vite/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playground-vite/package.json b/packages/playground-vite/package.json index d54d613c9f..fcfc3fada0 100644 --- a/packages/playground-vite/package.json +++ b/packages/playground-vite/package.json @@ -55,7 +55,7 @@ "@talend/locales-tui-containers": "^9.1.3", "@talend/locales-tui-faceted-search": "^11.3.0", "@talend/locales-tui-forms": "^10.2.4", - "@talend/react-cmf": "^8.4.1", + "@talend/react-cmf": "^9.0.0", "@talend/react-cmf-router": "^6.1.2", "@talend/react-components": "^16.0.0", "@talend/react-containers": "^10.7.3", From dffb53d4384f824d89a6d2c8b752773f184f9adb Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 14:31:58 +0200 Subject: [PATCH 45/52] theme: undo changes made in _helpers.scss --- packages/theme/src/theme/_helpers.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/theme/src/theme/_helpers.scss b/packages/theme/src/theme/_helpers.scss index 72fda516f9..6e54d38712 100644 --- a/packages/theme/src/theme/_helpers.scss +++ b/packages/theme/src/theme/_helpers.scss @@ -5,8 +5,7 @@ /// @return {Color} /// @source https://css-tricks.com/snippets/sass/tint-shade-functions/ @function tint($color, $percentage) { - $percent: $percentage * 1%; - @return mix(white, $color, 100%); + @return mix(white, $color, $percentage); } /// Slightly darken a color @@ -16,6 +15,5 @@ /// @return {Color} /// @source https://css-tricks.com/snippets/sass/tint-shade-functions/ @function shade($color, $percentage) { - $percent: $percentage * 1%; - @return mix(black, $color, 100%); + @return mix(black, $color, $percentage); } From 4ba3b6dc2ed9f064e6088777130946ec20bbc7c2 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 14:36:51 +0200 Subject: [PATCH 46/52] add changeset + init package.json version for playground-vite --- .changeset/smooth-queens-dance.md | 19 +++++++++++++++++++ packages/playground-vite/package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .changeset/smooth-queens-dance.md diff --git a/.changeset/smooth-queens-dance.md b/.changeset/smooth-queens-dance.md new file mode 100644 index 0000000000..5c5c865143 --- /dev/null +++ b/.changeset/smooth-queens-dance.md @@ -0,0 +1,19 @@ +--- +"@talend/json-schema-form-core": minor +"@talend/react-faceted-search": minor +"@talend/design-system": minor +"@talend/design-tokens": minor +"@talend/react-bootstrap": minor +"@talend/assets-api": minor +"@talend/react-cmf-router": minor +"@talend/react-components": minor +"@talend/react-containers": minor +"@talend/react-dataviz": minor +"@talend/react-forms": minor +"@talend/icons": minor +"@talend/utils": minor +"@talend/react-a11y": minor +"@talend/react-cmf": minor +--- + +Add support to ESM diff --git a/packages/playground-vite/package.json b/packages/playground-vite/package.json index fcfc3fada0..48a91824c0 100644 --- a/packages/playground-vite/package.json +++ b/packages/playground-vite/package.json @@ -1,6 +1,6 @@ { "name": "@talend/ui-playground-vite", - "version": "2.4.4", + "version": "0.0.1", "description": "Showcase Talend/UI", "private": true, "type": "module", From 75fff0b677c903c99412f0b2265bad4ff3d2595d Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 15:19:54 +0200 Subject: [PATCH 47/52] add changeset --- .changeset/spotty-trains-hammer.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/spotty-trains-hammer.md diff --git a/.changeset/spotty-trains-hammer.md b/.changeset/spotty-trains-hammer.md new file mode 100644 index 0000000000..0df12320c6 --- /dev/null +++ b/.changeset/spotty-trains-hammer.md @@ -0,0 +1,8 @@ +--- +"@talend/storybook-docs": patch +"@talend/design-docs": patch +"@talend/ui-playground": patch +"@talend/bootstrap-theme": patch +--- + +Make it compatible with ESM From 1a8aecf3196eb65c43bbb29d07dc1554280a219c Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 15:22:03 +0200 Subject: [PATCH 48/52] add changeset --- .changeset/strong-dolls-trade.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/strong-dolls-trade.md diff --git a/.changeset/strong-dolls-trade.md b/.changeset/strong-dolls-trade.md new file mode 100644 index 0000000000..72cf931aa3 --- /dev/null +++ b/.changeset/strong-dolls-trade.md @@ -0,0 +1,5 @@ +--- +"@talend/ui-playground-vite": major +--- + +Init Playground with Vite From 43ad199caaa5f483954a5b0ea431d9a44ff6e0a0 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 15:33:02 +0200 Subject: [PATCH 49/52] update changeset --- .changeset/smooth-queens-dance.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/smooth-queens-dance.md b/.changeset/smooth-queens-dance.md index 5c5c865143..b5e761e5d8 100644 --- a/.changeset/smooth-queens-dance.md +++ b/.changeset/smooth-queens-dance.md @@ -1,4 +1,5 @@ --- +"@talend/scripts-config-react-webpack": minor "@talend/json-schema-form-core": minor "@talend/react-faceted-search": minor "@talend/design-system": minor From 4f610f60f0f2200e223da3f94889459e946d965d Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 16:08:37 +0200 Subject: [PATCH 50/52] update changeset --- .changeset/spotty-trains-hammer.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/spotty-trains-hammer.md b/.changeset/spotty-trains-hammer.md index 0df12320c6..39e68b2983 100644 --- a/.changeset/spotty-trains-hammer.md +++ b/.changeset/spotty-trains-hammer.md @@ -3,6 +3,7 @@ "@talend/design-docs": patch "@talend/ui-playground": patch "@talend/bootstrap-theme": patch +"@talend/scripts-config-storybook-lib": patch --- Make it compatible with ESM From 932c59aedfaf3342e65c28fe92c87ba167e296d2 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 7 Jun 2024 17:32:56 +0200 Subject: [PATCH 51/52] clean --- .changeset/spotty-trains-hammer.md | 1 - .changeset/strong-dolls-trade.md | 5 ----- tools/scripts-config-react-webpack/config/webpack.config.js | 1 - 3 files changed, 7 deletions(-) delete mode 100644 .changeset/strong-dolls-trade.md diff --git a/.changeset/spotty-trains-hammer.md b/.changeset/spotty-trains-hammer.md index 39e68b2983..d84e697494 100644 --- a/.changeset/spotty-trains-hammer.md +++ b/.changeset/spotty-trains-hammer.md @@ -1,7 +1,6 @@ --- "@talend/storybook-docs": patch "@talend/design-docs": patch -"@talend/ui-playground": patch "@talend/bootstrap-theme": patch "@talend/scripts-config-storybook-lib": patch --- diff --git a/.changeset/strong-dolls-trade.md b/.changeset/strong-dolls-trade.md deleted file mode 100644 index 72cf931aa3..0000000000 --- a/.changeset/strong-dolls-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@talend/ui-playground-vite": major ---- - -Init Playground with Vite diff --git a/tools/scripts-config-react-webpack/config/webpack.config.js b/tools/scripts-config-react-webpack/config/webpack.config.js index 486b262f71..a363dbf05a 100644 --- a/tools/scripts-config-react-webpack/config/webpack.config.js +++ b/tools/scripts-config-react-webpack/config/webpack.config.js @@ -315,7 +315,6 @@ module.exports = ({ getUserConfig, mode }) => { { test: /\.scss$/, exclude: /\.module\.scss$/, - use: getSassLoaders(false, sassData, isEnvDevelopmentServe), }, { From 7772215f29c13359307e7e392f02c5a9ce57328d Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 10 Jun 2024 11:54:43 +0200 Subject: [PATCH 52/52] fix review --- packages/components/package.json | 1 - yarn.lock | 33 ++------------------------------ 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index 41772feb2f..f3be7cf38a 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -105,7 +105,6 @@ "@types/prop-types": "^15.7.11", "@types/react": "^18.2.60", "@types/react-dom": "^18.2.19", - "cpx2": "^7.0.1", "cross-env": "^7.0.3", "i18next": "^23.10.0", "jest-in-case": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index e09b2e04ea..14aa5231b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7684,25 +7684,6 @@ cpx2@^3.0.2: shell-quote "^1.7.1" subarg "^1.0.0" -cpx2@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cpx2/-/cpx2-7.0.1.tgz#429fde3fc344459cca9c1f29cb3e6f660ca10278" - integrity sha512-ZgK/DRvPFM5ATZ5DQ5UzY6ajkBrI/p9Uc7VyLHc7b4OSFeBO4yOQz/GEmccc4Om6capGYlY4K1XX+BtYQiPPIA== - dependencies: - debounce "^2.0.0" - debug "^4.1.1" - duplexer "^0.1.1" - fs-extra "^11.1.0" - glob "^10.3.10" - glob2base "0.0.12" - ignore "^5.2.4" - minimatch "^9.0.0" - p-map "^6.0.0" - resolve "^1.12.0" - safe-buffer "^5.2.0" - shell-quote "^1.8.0" - subarg "^1.0.0" - create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -8398,11 +8379,6 @@ debounce@^1.2.0, debounce@^1.2.1: resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== -debounce@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/debounce/-/debounce-2.0.0.tgz#b2f914518a1481466f4edaee0b063e4d473ad549" - integrity sha512-xRetU6gL1VJbs85Mc4FoEGSjQxzpdxRyFhe3lmWFyy2EzydIcD4xzUvRJMD+NPDfMwKNhxa3PvsIOU32luIWeA== - debug@2.6.9, debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -10675,7 +10651,7 @@ glob2base@0.0.12: dependencies: find-index "^0.1.1" -glob@^10.0.0, glob@^10.2.2, glob@^10.3.10, glob@^10.3.7: +glob@^10.0.0, glob@^10.2.2, glob@^10.3.7: version "10.3.12" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== @@ -14759,11 +14735,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-map@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-6.0.0.tgz#4d9c40d3171632f86c47601b709f4b4acd70fed4" - integrity sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw== - p-retry@^4.5.0: version "4.6.2" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" @@ -17385,7 +17356,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.7.1, shell-quote@^1.8.0, shell-quote@^1.8.1: +shell-quote@^1.7.1, shell-quote@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==