diff --git a/.changeset/blue-beds-deliver.md b/.changeset/blue-beds-deliver.md
deleted file mode 100644
index 627d2b4acc..0000000000
--- a/.changeset/blue-beds-deliver.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-'@talend/react-faceted-search': major
-'@talend/design-system': major
-'@talend/react-flow-designer': major
-'@talend/router-bridge': major
-'@talend/react-storybook-cmf': major
-'@talend/react-bootstrap': major
-'@talend/react-cmf-router': major
-'@talend/react-components': major
-'@talend/react-containers': major
-'@talend/react-cmf-cqrs': major
-'@talend/react-dataviz': major
-'@talend/react-stepper': major
-'@talend/react-forms': major
-'@talend/icons': major
-'@talend/react-sagas': major
-'@talend/react-a11y': major
-'@talend/http': major
-'@talend/react-cmf': major
----
-
-React: Upgrade to react 18 and @types/react 18
diff --git a/.changeset/bright-dodos-deny.md b/.changeset/bright-dodos-deny.md
deleted file mode 100644
index 04b4216a50..0000000000
--- a/.changeset/bright-dodos-deny.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-'@talend/scripts-core': major
-'@talend/scripts-config-jest': major
----
-
-- fix: enforce timer at the end of all tests.
-- feat: mock ally.js has it uses unsupported dom method from jsdom.
-- feat: add jest-axe configuration
-
-
-To support floating-ui/react following issue we have decided to add an afterAll to let floating-ui finish stuff
-https://github.com/floating-ui/floating-ui/issues/1908
-
-
-Breaking changes:
-
-you may have tests where you ask for jest.useFakeTimer without go back to real at some point. This is a side effect and it is not compatible with our change to support floating-ui.
-
-```diff
-jest.useFakeTimers()
-render()
-+jest.useRealTimers()
-```
-
-This will fix an error said your test is still pending after 5000 ms.
-
diff --git a/.changeset/bright-zoos-hug.md b/.changeset/bright-zoos-hug.md
deleted file mode 100644
index ac5a93e247..0000000000
--- a/.changeset/bright-zoos-hug.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-'@talend/scripts-config-storybook-lib': patch
----
-
-fix: add keys on all items in the decorators
-fix: improve build performance copy/pasted from #4931
\ No newline at end of file
diff --git a/.changeset/chatty-apes-speak.md b/.changeset/chatty-apes-speak.md
deleted file mode 100644
index 0808eee6b1..0000000000
--- a/.changeset/chatty-apes-speak.md
+++ /dev/null
@@ -1,98 +0,0 @@
----
-'@talend/design-system': major
----
-
-chore: remove reakit
-
-* Rewrite components without reakit
-* use `@floating-ui/react` for tooltip, popover
-* export all types and components from the root
-
-Breaking changes:
-* HTML structure output may have changed
-* Some passed props from our component to reakit and not documented as a usage as been removed. If you need a different usage let us knwow, now we own the code
-* Tabs props API has been completly changed
-
-Components changed:
-* Accordion (useId)
-* Clickable (rewrite)
-* Combobox (add as primitive)
-* Disclosure (add as primitive)
-* Divider (rewrite)
-* Drawer (rewrite using `react-transition-group`)
-* Dropdown (rewrite using `@floating-ui/react`)
-* Form/Affix/Button (typings)
-* Form/Affix/Select (useId)
-* Form/Field/Datalist (useId)
-* Form/Field/InputFile (useId)
-* Form/Field/InputToggleSwitch (rewrite)
-* Form/Primitives/Checkbox (rewrite)
-* Form/Primitives/Field (useId)
-* Form/Primitives/Radio (useId)
-* Modal (rewrite Dialog as primitive)
-* Popover (rewrite using `@floating-ui/react`)
-* Switch (rewrite)
-* Tabs (rewrite + props changed)
-* Tooltip (rewrite using `@floating-ui/react` + API Change)
-* VisuallyHidden (rewrite)
-
-
-**Migration Guide**
-
-* Checkbox component
-
- Checkbox has two versions now : controlled one and uncontrolled one.
- To use controlled version, import Checkbox component and provide `checked` and `onChange` props.
- To use uncontrolled version, import UncontrolledCheckbox component and optionally provide `defaultChecked` prop.
-
- We also change way to import it to be less verbose.
-
- Old use
- ```
- import { Form } from '@talend/design-system';
- (...)
-
- ```
-
- New use
- ```
- import { Checkbox, UncontrolledCheckbox } from '@talend/design-system';
- (...)
-
-
- ```
-
-* ToggleSwitch component
-
- ToggleSwitch has two versions now : controlled one and uncontrolled one.
- To use controlled version, import ToggleSwitch component and provide `checked` and `onChange` props.
- To use uncontrolled version, import UncontrolledToggleSwitch component and optionally provide `defaultChecked` prop.
-
- We also change way to import it to be less verbose.
-
- Old use
- ```
- import { Form } from '@talend/design-system';
- (...)
-
- ```
-
- New use
- ```
- import { ToggleSwitch, UncontrolledToggleSwitch } from '@talend/design-system';
- (...)
-
-
- ```
-
-* Switch component
-
- `onChange` prop's signature change from
- ```
- (event: React.MouseEvent, value: string) => void
- ```
- to
- ```
- (value: string) => void
- ```
-
diff --git a/.changeset/famous-hotels-retire.md b/.changeset/famous-hotels-retire.md
deleted file mode 100644
index edaa3eca82..0000000000
--- a/.changeset/famous-hotels-retire.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-'@talend/react-components': minor
-'@talend/design-system': minor
----
-
-feat: upgrade react-is
diff --git a/.changeset/funny-rockets-bake.md b/.changeset/funny-rockets-bake.md
deleted file mode 100644
index 886c1aa178..0000000000
--- a/.changeset/funny-rockets-bake.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/scripts-config-jest': minor
----
-
-Fix peer dependencies and adapt code to be compatible with pnpm
diff --git a/.changeset/perfect-mayflies-fly.md b/.changeset/perfect-mayflies-fly.md
deleted file mode 100644
index c93f497171..0000000000
--- a/.changeset/perfect-mayflies-fly.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/design-system': patch
----
-
-fix TypeError: popover.hide is not a function on close Popover
diff --git a/.changeset/rare-needles-battle.md b/.changeset/rare-needles-battle.md
deleted file mode 100644
index 100a90025b..0000000000
--- a/.changeset/rare-needles-battle.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/scripts-config-jest': minor
----
-
-feat: mock revokeURL
diff --git a/.changeset/selfish-hairs-tie.md b/.changeset/selfish-hairs-tie.md
deleted file mode 100644
index 0d4e1dd4fa..0000000000
--- a/.changeset/selfish-hairs-tie.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/design-system': patch
----
-
-fix: some lint errors
diff --git a/.changeset/small-kiwis-end.md b/.changeset/small-kiwis-end.md
deleted file mode 100644
index ac2b4b0c51..0000000000
--- a/.changeset/small-kiwis-end.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/scripts-config-storybook-lib': patch
----
-
-fix: icon url to support prefix
diff --git a/.changeset/strange-coats-poke.md b/.changeset/strange-coats-poke.md
deleted file mode 100644
index be4bd59ba7..0000000000
--- a/.changeset/strange-coats-poke.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-'@talend/scripts-config-jest': minor
----
-
-feat: add api to set a fetch MockResponse
-feat: add jest-axe integration
\ No newline at end of file
diff --git a/.changeset/unlucky-cats-fold.md b/.changeset/unlucky-cats-fold.md
deleted file mode 100644
index d59d8aaa31..0000000000
--- a/.changeset/unlucky-cats-fold.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/scripts-config-storybook-lib': minor
----
-
-feat: use icons from talend/icons and not from unpkg
diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml
index 89bd8521e1..d56e145467 100644
--- a/.github/actions/setup-node/action.yml
+++ b/.github/actions/setup-node/action.yml
@@ -10,7 +10,7 @@ runs:
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1
with:
- node-version: '20'
+ node-version-file: '.tool-versions'
registry-url: 'https://registry.npmjs.org/'
scope: '@talend'
diff --git a/.github/actions/sourceclear/Dockerfile b/.github/actions/sourceclear/Dockerfile
deleted file mode 100644
index e22853a74c..0000000000
--- a/.github/actions/sourceclear/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM node:16
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends curl jq
-COPY entrypoint.sh /entrypoint.sh
-ENTRYPOINT ["/entrypoint.sh"]
diff --git a/.github/actions/sourceclear/action.yml b/.github/actions/sourceclear/action.yml
deleted file mode 100644
index 7a27be95d9..0000000000
--- a/.github/actions/sourceclear/action.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-name: 'SourceClear Scan'
-description: 'Scan a project with the SourceClear agent'
-author: 'SourceClear'
-secrets:
- SRCCLR_API_TOKEN:
- description: 'The API token to use'
-runs:
- using: 'docker'
- image: 'Dockerfile'
diff --git a/.github/actions/sourceclear/entrypoint.sh b/.github/actions/sourceclear/entrypoint.sh
deleted file mode 100755
index 9108988b3b..0000000000
--- a/.github/actions/sourceclear/entrypoint.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh -l
-echo "Download srcclr ci script ..."
-curl -sSL https://download.sourceclear.com/ci.sh --output srcclr.sh
-echo "Script saved to srcclr.sh"
-chmod a+x srcclr.sh
-echo "Script execution rights added"
-
-packages=$(yarn --silent workspaces info | jq '.[].location' | sed 's/\"//g')
-
-# scan each folder
-echo "Starting scan on . (root) ..."
-./srcclr.sh scan .
-echo "Scan completed on . (root)"
-
-for folder in $packages;
-do
- echo "Starting scan on ./$folder ..."
- echo "> ln -s yarn.lock ./$folder/yarn.lock"
- cp yarn.lock ./$folder/yarn.lock
- ls -l ./$folder
- echo "> ./srcclr.sh scan ./$folder"
- ./srcclr.sh scan ./$folder
- echo "Scan completed on ./$folder"
-done
-
-
diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml
index 91147291ee..817d421dc6 100644
--- a/.github/workflows/changeset.yml
+++ b/.github/workflows/changeset.yml
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
@@ -37,7 +37,7 @@ jobs:
- name: Create Release Pull Request or Publish to npm
id: changesets
- uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 #v1.4.5
+ uses: changesets/action@3de3850952bec538fde60aac71731376e57b9b57 #v1.4.8
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml
index be1104fe28..83f2dbb3c3 100644
--- a/.github/workflows/dependencies.yml
+++ b/.github/workflows/dependencies.yml
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -33,10 +33,9 @@ jobs:
git add dependencies-latest.txt
- name: Create Pull Request
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 #v5.0.2
+ uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
- assignees: jmfrancois
- reviewers: jmfrancois
+ reviewers: "@Talend/frontend-admins"
commit-message: "chore: upgrade dependencies"
title: "chore: upgrade dependencies"
body: "Upgrade dependencies using `talend-scripts upgrade:deps`"
diff --git a/.github/workflows/design-system-component-testing.yml b/.github/workflows/design-system-component-testing.yml
index a96c3443a8..aca5af638f 100644
--- a/.github/workflows/design-system-component-testing.yml
+++ b/.github/workflows/design-system-component-testing.yml
@@ -22,12 +22,12 @@ jobs:
browser: ["chrome", "firefox"]
steps:
- name: Checkout repository
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: ./.github/actions/setup-node
- - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
+ - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: ~/.cache/Cypress
key: my-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
@@ -36,27 +36,29 @@ jobs:
run: |
yarn --frozen-lock --ignore-scripts
yarn cypress install
- yarn workspace @talend/assets-api run build:lib
- yarn workspace @talend/utils run build:lib
+ yarn workspace @talend/assets-api run build:lib:esm
+ yarn workspace @talend/utils run build:lib:esm
yarn workspace @talend/icons run build:lib
+ yarn workspace @talend/icons run build:lib:esm
yarn workspace @talend/design-tokens run build:lib
+ yarn workspace @talend/design-tokens run build:lib:esm
- name: Cypress Component Testing
- uses: cypress-io/github-action@59810ebfa5a5ac6fcfdcfdf036d1cd4d083a88f2 #v6.5.0
+ uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e #v6.7.6
with:
install: false
browser: ${{ matrix.browser }}
command: yarn workspace @talend/design-system run test:cy
- name: Cypress screenshots upload
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
+ uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0
if: failure()
with:
name: cypress-component-testing-${{ matrix.browser }}-screenshots
path: packages/design-system/cypress/screenshots/**/*
- name: Cypress videos upload
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
+ uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0
if: failure()
with:
name: cypress-component-testing-${{ matrix.browser }}-videos
diff --git a/.github/workflows/icons.yml b/.github/workflows/icons.yml
index 04d6a4b7b2..25621eb3c1 100644
--- a/.github/workflows/icons.yml
+++ b/.github/workflows/icons.yml
@@ -19,7 +19,7 @@ jobs:
working-directory: ./packages/icons
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
# Required when using a PAT for opening the PR
persist-credentials: false
@@ -52,7 +52,7 @@ jobs:
- name: Create Pull Request
id: cpr
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 #v5.0.2
+ uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
commit-message: "chore(icons): from Figma"
title: "chore(icons): from Figma"
diff --git a/.github/workflows/pr-demo.yml b/.github/workflows/pr-demo.yml
index 0e4b7f020f..1e0c266ae6 100644
--- a/.github/workflows/pr-demo.yml
+++ b/.github/workflows/pr-demo.yml
@@ -25,32 +25,35 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
- with:
- node-version: 18
- registry-url: "https://registry.npmjs.org/"
- scope: "@talend"
- cache: "yarn"
+ uses: ./.github/actions/setup-node
- name: cache for storybook
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: packages/*/node_modules
- key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
+ key: ${{ runner.os }}-storybook-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-storybook-
- name: Install
run: |
+ node --version
yarn install --frozen-lockfile
- yarn global add surge
- echo "$(yarn global bin)" >> $GITHUB_PATH
-
- - name: Build
+ - name: Run test:demo
run: |
+ node --version
yarn test:demo
+
+ - name: Before surge
+ run: |
+ node --version
+ yarn global add surge
+ echo "$(yarn global bin)" >> $GITHUB_PATH
+ node --version
./.github/workflows/before-surge.sh
env:
STORYBOOK_FIGMA_ACCESS_TOKEN: ${{ secrets.STORYBOOK_FIGMA_ACCESS_TOKEN }}
diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml
index 9dcc3c90db..85762b2102 100644
--- a/.github/workflows/pr-lint.yml
+++ b/.github/workflows/pr-lint.yml
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
@@ -42,7 +42,7 @@ jobs:
run: yarn lint-merge-report master ${GITHUB_HEAD_REF}
- name: Annotate Code Linting Results
- uses: ataylorme/eslint-annotate-action@5f4dc2e3af8d3c21b727edb597e5503510b1dc9c #v2.2.0
+ uses: ataylorme/eslint-annotate-action@d57a1193d4c59cbfbf3f86c271f42612f9dbd9e9 #v3.0.0
with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
report-json: ./eslint-report.json
diff --git a/.github/workflows/pr-playground.yml b/.github/workflows/pr-playground.yml
index 374f049c24..bc84c921a6 100644
--- a/.github/workflows/pr-playground.yml
+++ b/.github/workflows/pr-playground.yml
@@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -70,10 +70,17 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
+
+ - name: Use Node.js
+ uses: ./.github/actions/setup-node
+
+ - name: Check node version
+ run: |
+ node --version
- name: Check UMD files size diff
- uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 #v2.5.0
+ uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c #v2.6.0
if: github.ref != 'refs/heads/master'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
index f4a95de179..ba0d202625 100644
--- a/.github/workflows/pr-test.yml
+++ b/.github/workflows/pr-test.yml
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -33,7 +33,7 @@ jobs:
run: yarn test --coverage --coverageReporters json-summary
- name: Jest Coverage Comment
- uses: MishaKav/jest-coverage-comment@41b5ca01d1250de84537448d248b8d18152cb277 #1.0.23
+ uses: MishaKav/jest-coverage-comment@d74238813c33e6ea20530ff91b5ea37953d11c91 #1.0.27
with:
multiple-files: |
assets-api, ./packages/assets-api/coverage/coverage-summary.json
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
deleted file mode 100644
index 67cb34df4d..0000000000
--- a/.github/workflows/security-scan.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Security scan
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 0 * * 0' # https://crontab.guru/every-week "At 00:00 on Sunday."
-
-permissions:
- contents: read
-
-jobs:
- build:
- environment: main
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- - name: Scan
- uses: ./.github/actions/sourceclear
- env:
- SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
- SRCCLR_SCOPE: 'production'
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
deleted file mode 100644
index d39b9aba04..0000000000
--- a/.github/workflows/semgrep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Name of this GitHub Actions workflow.
-name: Semgrep
-
-on:
- workflow_dispatch:
- pull_request:
- push:
- branches:
- - master
- paths:
- - .github/workflows/semgrep.yml
- schedule:
- - cron: '0 0 * * 0'
-
-jobs:
- semgrep:
- environment: pull_request_unsafe
- name: Scan
- runs-on: ubuntu-latest
-
- container:
- # A Docker image with Semgrep installed. Do not change this.
- image: returntocorp/semgrep
-
- # Skip any PR created by dependabot to avoid permission issues:
- if: (github.actor != 'dependabot[bot]')
-
- steps:
- - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- # Run the "semgrep ci" command on the command line of the docker image.
- - run: semgrep ci
- env:
- SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
-
diff --git a/.github/workflows/surge-cleanup.yml b/.github/workflows/surge-cleanup.yml
index 4bc6b29e9d..860648e6bd 100644
--- a/.github/workflows/surge-cleanup.yml
+++ b/.github/workflows/surge-cleanup.yml
@@ -2,7 +2,7 @@ name: Cleanup - Remove surge demo
on:
pull_request:
- types: [closed]
+ types: [ closed ]
permissions: {}
diff --git a/.github/workflows/tests-cron.yml b/.github/workflows/tests-cron.yml
index 1641011e9d..135d956358 100644
--- a/.github/workflows/tests-cron.yml
+++ b/.github/workflows/tests-cron.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -29,7 +29,7 @@ jobs:
- name: Create Issue on Failed workflow
if: ${{ failure() }}
- uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d #v1.2.1
+ uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 #v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: module-to-cdn configuration fails
diff --git a/.github/workflows/visual-testing.yml b/.github/workflows/visual-testing.yml
index 7d2a26b583..74cefbfe47 100644
--- a/.github/workflows/visual-testing.yml
+++ b/.github/workflows/visual-testing.yml
@@ -28,7 +28,7 @@ jobs:
environment: pull_request_unsafe
if: ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'need visual approval') )
steps:
- - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
fetch-depth: 0
@@ -41,7 +41,7 @@ jobs:
- name: Publish PR to DS Chromatic
if: github.ref != 'refs/heads/master'
# https://github.com/chromaui/chromatic-cli/issues/739
- uses: chromaui/action@v1
+ uses: chromaui/action@v11
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
@@ -53,7 +53,7 @@ jobs:
- name: Publish Master to DS Chromatic
if: github.ref == 'refs/heads/master'
# https://github.com/chromaui/chromatic-cli/issues/739
- uses: chromaui/action@v1
+ uses: chromaui/action@v11
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
diff --git a/.github/workflows/yarn-deduplicate.yml b/.github/workflows/yarn-deduplicate.yml
index d9dfb8526d..ae96c07e52 100644
--- a/.github/workflows/yarn-deduplicate.yml
+++ b/.github/workflows/yarn-deduplicate.yml
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
@@ -40,7 +40,7 @@ jobs:
- name: Commit dedupe
if: steps.deduplicate.outputs.diff
- uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #1.4
+ uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 #1.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "chore: yarn-deduplicate"
diff --git a/.gitignore b/.gitignore
index abc39076d1..ed9f9e5794 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,6 +44,7 @@ build/
/packages/*/i18n/
tmp/
lib/
+lib-esm/
storybook-static/
dist/
eslint-report.json
diff --git a/.prettierignore b/.prettierignore
index da1cc32ff3..34f6040084 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -7,3 +7,4 @@ build
dist
node_modules
__fixtures__
+tools/scripts-config-storybook-lib/.storybook-templates/main.js
diff --git a/.tool-versions b/.tool-versions
new file mode 100644
index 0000000000..c2ca3d3d25
--- /dev/null
+++ b/.tool-versions
@@ -0,0 +1 @@
+nodejs 20.9.0
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 8efa996cbf..d0e531c7c6 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,5 @@
{
+ "prettier.prettierPath": "./node_modules/prettier/index.cjs",
"eslint.workingDirectories": [
{
"pattern": "packages/**"
diff --git a/dependencies-latest.txt b/dependencies-latest.txt
index 352bd40c84..e95bee3977 100644
--- a/dependencies-latest.txt
+++ b/dependencies-latest.txt
@@ -1,363 +1,356 @@
-yarn run v1.22.19
+yarn run v1.22.22
$ /home/runner/work/ui/ui/node_modules/.bin/talend-upgrade-deps --latest --dry
-
check versions of /home/runner/work/ui/ui/package.json using latest
-"@types/react": "^17.0.2" => "^18.2.21"
-"@types/react-dom": "^17.0.20" => "^18.2.7"
-"typescript": "^5.0.4" => "^5.2.2"
-"webpack": "^5.73.0" => "^5.88.2"
-"eslint": "^7.32.0" => "^8.49.0"
-"lint-staged": "^13.3.0" => "^14.0.1"
-"prettier": "^2.8.8" => "^3.0.3"
+"@types/react": "^18.2.7" => "^18.3.9"
+"cypress": "^13.6.0" => "^13.14.2"
+"eslint": "^8.57.1" => "^9.11.1"
+"husky": "^8.0.3" => "^9.1.6"
+"rimraf": "^5.0.10" => "^6.0.1"
+"typescript": "^5.0.4" => "^5.6.2"
check versions of packages/a11y/package.json using latest
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"date-fns": "^3.6.0" => "^4.1.0"
check versions of packages/assets-api/package.json using latest
-"read-pkg-up": "^7.0.1" => "^10.1.0"
+"@types/node": "^6.14.13" => "^22.7.0"
+"read-pkg-up": "^7.0.1" => "^11.0.0"
check versions of packages/cmf-cqrs/package.json using latest
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
+"immutable": "^3.8.2" => "^4.3.7"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
check versions of packages/cmf-router/package.json using latest
-"react-redux": "^7.2.9" => "^8.1.2"
-"react-router": "~6.3.0" => "^6.16.0"
-"react-router-dom": "~6.3.0" => "^6.16.0"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
+"path-to-regexp": "^6.3.0" => "^8.1.0"
+"react-redux": "^7.2.9" => "^9.1.2"
+"react-router": "~6.3.0" => "^6.26.2"
+"react-router-dom": "~6.3.0" => "^6.26.2"
check versions of packages/cmf/package.json using latest
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
+"commander": "^6.2.1" => "^12.1.0"
+"immutable": "^3.8.2" => "^4.3.7"
"nested-combine-reducers": "^1.2.2" => "^2.0.0"
-"path-to-regexp": "^2.4.0" => "^6.2.1"
-"react-redux": "^7.2.9" => "^8.1.2"
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"jsdoc": "^3.6.11" => "^4.0.2"
+"path-to-regexp": "^2.4.0" => "^8.1.0"
+"react-redux": "^7.2.9" => "^9.1.2"
+"redux": "^4.2.1" => "^5.0.1"
+"redux-thunk": "^2.4.2" => "^3.1.0"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
"node-fetch": "^2.7.0" => "^3.3.2"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
check versions of packages/components/package.json using latest
-"date-fns": "^1.30.1" => "^2.30.0"
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
+"date-fns": "^3.6.0" => "^4.1.0"
+"dom-helpers": "^3.4.0" => "^5.2.1"
+"immutable": "^3.8.2" => "^4.3.7"
+"rc-slider": "^10.6.2" => "^11.1.6"
"react-autowhatever": "10.2.0" => "^10.2.1"
-"react-is": "^16.13.1" => "^18.2.0"
+"react-is": "^17.0.2" => "^18.3.1"
"react-transition-group": "^2.9.0" => "^4.4.5"
-"simplebar": "^5.3.9" => "^6.2.5"
-"simplebar-react": "^2.4.3" => "^3.2.4"
-"styled-components": "^5.3.11" => "^6.0.8"
-"@storybook/addon-actions": "^6.5.16" => "^7.4.2"
-"@testing-library/jest-dom": "^5.17.0" => "^6.1.3"
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"@testing-library/user-event": "^13.5.0" => "^14.5.1"
-"@types/date-fns": "^0.0.2" => "^2.6.0"
-"@types/react": "^17.0.65" => "^18.2.21"
-"i18next": "^20.6.1" => "^23.5.1"
-"jsdom": "^20.0.3" => "^22.1.0"
-"react": "^17.0.2" => "^18.2.0"
+"simplebar-react": "^2.4.3" => "^3.2.6"
+"styled-components": "^5.3.11" => "^6.1.13"
+"warning": "^3.0.0" => "^4.0.3"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"jsdom": "^20.0.3" => "^25.0.1"
"react-a11y": "^0.3.4" => "^1.1.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-router-dom": "~6.3.0" => "^6.16.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"react-test-renderer": "^17.0.2" => "^18.2.0"
+"react-i18next": "^13.5.0" => "^15.0.2"
+"react-router-dom": "~6.3.0" => "^6.26.2"
check versions of packages/containers/package.json using latest
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
-"reselect": "^2.5.4" => "^4.1.8"
-"@storybook/addon-actions": "^6.5.16" => "^7.4.2"
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"react-test-renderer": "^17.0.2" => "^18.2.0"
+"immutable": "^3.8.2" => "^4.3.7"
+"reselect": "^2.5.4" => "^5.1.1"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"msw": "^1.3.4" => "^2.4.9"
+"react-i18next": "^13.5.0" => "^15.0.2"
check versions of packages/dataviz/package.json using latest
-"@cypress/react": "^7.0.3" => "^8.0.0"
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"@types/react": "^17.0.65" => "^18.2.21"
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
+"date-fns": "^3.6.0" => "^4.1.0"
+"@cypress/react": "^7.0.3" => "^8.0.2"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"@types/node": "^6.14.13" => "^22.7.0"
+"react-i18next": "^13.5.0" => "^15.0.2"
+
+check versions of packages/design-docs/package.json using latest
+"@storybook/blocks": "^7.6.20" => "^8.3.3"
+"@storybook/react": "^7.6.20" => "^8.3.3"
+"algoliasearch": "^4.24.0" => "^5.6.0"
+"figma-js": "^1.16.0" => "^1.16.1-0"
+"pkg-dir": "^7.0.0" => "^8.0.0"
+"@storybook/addon-a11y": "^7.6.20" => "^8.3.3"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-essentials": "^7.6.20" => "^8.3.3"
+"@storybook/addon-interactions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-links": "^7.6.20" => "^8.3.3"
+"@storybook/addons": "^7.6.20" => "^7.6.17"
+"@storybook/core-events": "^7.6.20" => "^8.3.3"
+"@storybook/theming": "^7.6.20" => "^8.3.3"
+"react-router-dom": "~6.3.0" => "^6.26.2"
check versions of packages/design-system/package.json using latest
-"@cypress/react": "^7.0.3" => "^8.0.0"
-"@storybook/addon-a11y": "^6.5.16" => "^7.4.2"
-"@storybook/addon-actions": "^6.5.16" => "^7.4.2"
-"@storybook/addon-essentials": "^6.5.16" => "^7.4.2"
-"@storybook/addon-interactions": "^6.5.16" => "^7.4.2"
-"@storybook/addon-links": "^6.5.16" => "^7.4.2"
-"@storybook/addons": "^6.5.16" => "^7.4.2"
-"@storybook/core-events": "^6.5.16" => "^7.4.2"
-"@storybook/react": "^6.5.16" => "^7.4.2"
-"@storybook/testing-library": "^0.0.13" => "^0.2.1"
-"@storybook/theming": "^6.5.16" => "^7.4.2"
+"@floating-ui/react": "^0.24.8" => "^0.26.24"
+"react-transition-group": "^2.9.0" => "^4.4.5"
+"@cypress/react": "^7.0.3" => "^8.0.2"
+"@storybook/addon-a11y": "^7.6.20" => "^8.3.3"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-essentials": "^7.6.20" => "^8.3.3"
+"@storybook/addon-interactions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-links": "^7.6.20" => "^8.3.3"
+"@storybook/addons": "^7.6.20" => "^7.6.17"
+"@storybook/blocks": "^7.6.20" => "^8.3.3"
+"@storybook/core-events": "^7.6.20" => "^8.3.3"
+"@storybook/react": "^7.6.20" => "^8.3.3"
+"@storybook/theming": "^7.6.20" => "^8.3.3"
"@svgr/webpack": "^5.5.0" => "^8.1.0"
-"@testing-library/cypress": "^9.0.0" => "^10.0.1"
-"@types/react": "^17.0.65" => "^18.2.21"
-"@types/react-dom": "^17.0.20" => "^18.2.7"
-"@types/react-is": "^16.7.2" => "^18.2.1"
-"concurrently": "^7.6.0" => "^8.2.1"
-"cypress": "^12.17.4" => "^13.2.0"
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"react-is": "^16.13.1" => "^18.2.0"
-"react-router-dom": "~6.3.0" => "^6.16.0"
+"@types/react-transition-group": "^2.9.2" => "^4.4.11"
+"browser-sync": "^2.29.3" => "^3.0.3"
+"concurrently": "^8.2.2" => "^9.0.1"
+"jest-axe": "^8.0.0" => "^9.0.0"
+"react-i18next": "^13.5.0" => "^15.0.2"
+"react-is": "^17.0.2" => "^18.3.1"
+"react-router-dom": "~6.3.0" => "^6.26.2"
check versions of packages/design-tokens/package.json using latest
check versions of packages/faceted-search/package.json using latest
-"date-fns": "^1.30.1" => "^2.30.0"
-"@storybook/addon-actions": "^6.5.16" => "^7.4.2"
-"@storybook/testing-library": "^0.0.13" => "^0.2.1"
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
+"date-fns": "^3.6.0" => "^4.1.0"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"react-i18next": "^13.5.0" => "^15.0.2"
check versions of packages/flow-designer/package.json using latest
-"@types/react": "^17.0.65" => "^18.2.21"
-"@types/react-test-renderer": "^17.0.3" => "^18.0.1"
-"i18next": "^20.6.1" => "^23.5.1"
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"react-redux": "^7.2.9" => "^8.1.2"
-"react-test-renderer": "^17.0.2" => "^18.2.0"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"@types/node": "^6.14.13" => "^22.7.0"
+"immutable": "^3.8.2" => "^4.3.7"
+"react-i18next": "^13.5.0" => "^15.0.2"
+"react-redux": "^7.2.9" => "^9.1.2"
+"redux": "^4.2.1" => "^5.0.1"
+"redux-thunk": "^2.4.2" => "^3.1.0"
+"reselect": "^4.1.8" => "^5.1.1"
check versions of packages/forms/package.json using latest
-"ace-builds": "1.10.1" => "^1.26.0"
-"ajv": "^6.12.6" => "^8.12.0"
+"ace-builds": "1.10.1" => "^1.36.2"
+"ajv": "^6.12.6" => "^8.17.1"
"react-autowhatever": "10.2.0" => "^10.2.1"
-"react-hook-form": "^6.15.8" => "^7.46.1"
+"react-ace": "10.1.0" => "^12.0.0"
"react-jsonschema-form": "0.51.0" => "^1.8.1"
-"@storybook/addon-actions": "^6.5.16" => "^7.4.2"
-"@testing-library/jest-dom": "^5.17.0" => "^6.1.3"
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"react-test-renderer": "^17.0.2" => "^18.2.0"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-controls": "^7.6.20" => "^8.3.3"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"react-i18next": "^13.5.0" => "^15.0.2"
check versions of packages/http/package.json using latest
+"fetch-mock": "^9.11.0" => "^11.1.4"
"node-fetch": "^2.7.0" => "^3.3.2"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
check versions of packages/icons/package.json using latest
"@svgr/webpack": "^5.5.0" => "^8.1.0"
-"babel-loader": "^8.3.0" => "^9.1.3"
-"copy-webpack-plugin": "^10.2.4" => "^11.0.0"
-"css-loader": "^4.3.0" => "^6.8.1"
+"copy-webpack-plugin": "^11.0.0" => "^12.0.2"
"mkdirp": "^1.0.4" => "^3.0.1"
-"react": "^17.0.2" => "^18.2.0"
"string-replace-loader": "^2.3.0" => "^3.1.0"
-"style-loader": "^1.3.0" => "^3.3.3"
-"svgo": "^1.3.2" => "^3.0.2"
+"style-loader": "^1.3.0" => "^4.0.0"
+"svgo": "^1.3.2" => "^3.3.2"
"webpack-cli": "^4.10.0" => "^5.1.4"
-check versions of packages/jsfc/package.json using latest
-"objectpath": "^1.2.2" => "^2.0.0"
-"@types/chai": "^3.5.2" => "^4.3.6"
-"@types/node": "^6.14.13" => "^20.6.2"
-"rimraf": "^3.0.2" => "^5.0.1"
-
check versions of packages/local-libs-webpack-plugin/package.json using latest
+check versions of packages/playground-vite/package.json using latest
+"react-i18next": "^13.5.0" => "^15.0.2"
+"body-parser": "1.20.1" => "^1.20.3"
+"copy-webpack-plugin": "^11.0.0" => "^12.0.2"
+"i18next-http-backend": "^1.4.5" => "^2.6.1"
+
check versions of packages/playground/package.json using latest
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"i18next-http-backend": "^1.4.5" => "^2.2.2"
+"react-i18next": "^13.5.0" => "^15.0.2"
+"body-parser": "1.20.1" => "^1.20.3"
+"copy-webpack-plugin": "^11.0.0" => "^12.0.2"
+"i18next-http-backend": "^1.4.5" => "^2.6.1"
check versions of packages/router-bridge/package.json using latest
-"react": "^17.0.2" => "^18.2.0"
-"react-router-dom": "~6.3.0" => "^6.16.0"
+"react-router-dom": "~6.3.0" => "^6.26.2"
check versions of packages/sagas/package.json using latest
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
+"immutable": "^3.8.2" => "^4.3.7"
check versions of packages/stepper/package.json using latest
-"@trivago/prettier-plugin-sort-imports": "^3.4.0" => "^4.2.0"
-"i18next": "^20.6.1" => "^23.5.1"
-"immutable": "^3.8.2" => "^5.0.0-beta.4"
-"jsdom": "^20.0.3" => "^22.1.0"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-i18next": "^11.18.6" => "^13.2.2"
-"react-redux": "^7.2.9" => "^8.1.2"
+"immutable": "^3.8.2" => "^4.3.7"
+"jsdom": "^20.0.3" => "^25.0.1"
+"react-i18next": "^13.5.0" => "^15.0.2"
+"react-redux": "^7.2.9" => "^9.1.2"
"react-transition-group": "^2.9.0" => "^4.4.5"
check versions of packages/storybook-cmf/package.json using latest
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-redux": "^7.2.9" => "^8.1.2"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"react-redux": "^7.2.9" => "^9.1.2"
check versions of packages/storybook-docs/package.json using latest
+"@storybook/blocks": "^7.6.20" => "^8.3.3"
+"@storybook/react": "^7.6.20" => "^8.3.3"
+"algoliasearch": "^4.24.0" => "^5.6.0"
+"figma-js": "^1.16.0" => "^1.16.1-0"
+"@types/node": "^6.14.13" => "^22.7.0"
+"sass-loader": "^14.2.1" => "^16.0.2"
+"webpack-cli": "^4.10.0" => "^5.1.4"
-check versions of packages/storybook/package.json using latest
-"react-hook-form": "^6.15.8" => "^7.46.1"
-"@storybook/addon-a11y": "^6.5.16" => "^7.4.2"
-"@storybook/addon-actions": "^6.5.16" => "^7.4.2"
-"@storybook/addon-essentials": "^6.5.16" => "^7.4.2"
-"@storybook/addon-interactions": "^6.5.16" => "^7.4.2"
-"@storybook/addon-links": "^6.5.16" => "^7.4.2"
-"@storybook/addons": "^6.5.16" => "^7.4.2"
-"@storybook/core-events": "^6.5.16" => "^7.4.2"
-"@storybook/react": "^6.5.16" => "^7.4.2"
-"@storybook/testing-library": "^0.0.13" => "^0.2.1"
-"@storybook/testing-react": "^1.3.0" => "^2.0.1"
-"@storybook/theming": "^6.5.16" => "^7.4.2"
-"@types/react": "^17.0.65" => "^18.2.21"
-"i18next": "^20.6.1" => "^23.5.1"
-"react": "^17.0.2" => "^18.2.0"
-"react-router-dom": "~6.3.0" => "^6.16.0"
+check versions of packages/storybook-one/package.json using latest
+"pkg-dir": "^7.0.0" => "^8.0.0"
+"@storybook/addon-a11y": "^7.6.20" => "^8.3.3"
+"@storybook/addon-actions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-essentials": "^7.6.20" => "^8.3.3"
+"@storybook/addon-interactions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-links": "^7.6.20" => "^8.3.3"
+"@storybook/addons": "^7.6.20" => "^7.6.17"
+"@storybook/core-events": "^7.6.20" => "^8.3.3"
+"@storybook/theming": "^7.6.20" => "^8.3.3"
+"react-router-dom": "~6.3.0" => "^6.26.2"
check versions of packages/theme/package.json using latest
-"copy-webpack-plugin": "^10.2.4" => "^11.0.0"
-"css-minimizer-webpack-plugin": "^4.2.2" => "^5.0.1"
-"postcss-preset-env": "^7.8.3" => "^9.1.3"
-"rimraf": "^3.0.2" => "^5.0.1"
+"copy-webpack-plugin": "^11.0.0" => "^12.0.2"
+"css-minimizer-webpack-plugin": "^5.0.1" => "^7.0.0"
+"postcss-preset-env": "^7.8.3" => "^10.0.5"
+"rimraf": "^5.0.10" => "^6.0.1"
+"sass-loader": "^14.2.1" => "^16.0.2"
+"style-loader": "^3.3.4" => "^4.0.0"
+"webpack-cli": "^4.10.0" => "^5.1.4"
check versions of packages/utils/package.json using latest
-"date-fns": "^1.30.1" => "^2.30.0"
+"date-fns": "^3.6.0" => "^4.1.0"
check versions of tools/babel-plugin-assets-api/package.json using latest
-"read-pkg-up": "^7.0.1" => "^10.1.0"
+"read-pkg-up": "^7.0.1" => "^11.0.0"
"babel-plugin-tester": "^10.1.0" => "^11.0.4"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/babel-plugin-import-d3/package.json using latest
"babel-plugin-tester": "^10.1.0" => "^11.0.4"
check versions of tools/babel-plugin-import-from-index/package.json using latest
"babel-plugin-tester": "^10.1.0" => "^11.0.4"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/babel-plugin-import-from-lib/package.json using latest
"babel-plugin-tester": "^10.1.0" => "^11.0.4"
check versions of tools/cmf-webpack-plugin/package.json using latest
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/cypress-api-mock-plugin/package.json using latest
check versions of tools/eslint-plugin/package.json using latest
-"eslint": "^7.32.0" => "^8.49.0"
-
-check versions of tools/scripts-build-cdn/package.json using latest
-"commander": "^6.2.1" => "^11.0.0"
-"cpx2": "^3.0.2" => "^5.0.0"
-"execa": "^4.1.0" => "^8.0.1"
-"mkdirp": "^1.0.4" => "^3.0.1"
-"queue": "^6.0.2" => "^7.0.0"
-"rimraf": "^3.0.2" => "^5.0.1"
-"webpack-cli": "^4.10.0" => "^5.1.4"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/scripts-cmf/package.json using latest
+"commander": "^6.2.1" => "^12.1.0"
"deepmerge": "^1.5.2" => "^4.3.1"
"mkdirp": "^1.0.4" => "^3.0.1"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/scripts-config-babel/package.json using latest
"babel-core": "^7.0.0-bridge.0" => "^6.26.3"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/scripts-config-cdn/package.json using latest
-"js-yaml": "^3.14.1" => "^4.1.0"
-"read-pkg-up": "^7.0.1" => "^10.1.0"
+"read-pkg-up": "^7.0.1" => "^11.0.0"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/scripts-config-eslint/package.json using latest
-"@typescript-eslint/parser": "^5.62.0" => "^6.7.0"
-"@typescript-eslint/eslint-plugin": "^5.62.0" => "^6.7.0"
-"eslint": "^7.32.0" => "^8.49.0"
-"eslint-config-prettier": "^6.15.0" => "^9.0.0"
-"eslint-plugin-jest-dom": "^4.0.3" => "^5.1.0"
-"eslint-plugin-mdx": "^1.17.1" => "^2.2.0"
-"eslint-plugin-prettier": "^4.2.1" => "^5.0.0"
-"eslint-plugin-react-hooks": "^2.5.1" => "^4.6.0"
-"eslint-plugin-storybook": "^0.5.13" => "^0.6.13"
-"eslint-plugin-testing-library": "^5.11.1" => "^6.0.1"
+"@testing-library/dom": "^9.3.4" => "^10.4.0"
+"@typescript-eslint/parser": "^6.21.0" => "^8.7.0"
+"@typescript-eslint/eslint-plugin": "^6.21.0" => "^8.7.0"
+"eslint": "^8.57.1" => "^9.11.1"
+"eslint-config-airbnb-typescript": "^17.1.0" => "^18.0.0"
+"eslint-plugin-cypress": "^2.15.2" => "^3.5.0"
+"eslint-plugin-mdx": "^2.3.4" => "^3.1.5"
+"eslint-plugin-storybook": "^0.6.15" => "^0.8.0"
check versions of tools/scripts-config-jest/package.json using latest
-"@testing-library/jest-dom": "^5.17.0" => "^6.1.3"
-"regenerator-runtime": "^0.13.11" => "^0.14.0"
+"regenerator-runtime": "^0.13.11" => "^0.14.1"
check versions of tools/scripts-config-prettier/package.json using latest
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/scripts-config-react-webpack/package.json using latest
-"@sentry/webpack-plugin": "^1.20.1" => "^2.7.1"
-"babel-loader": "^8.3.0" => "^9.1.3"
-"copy-webpack-plugin": "^10.2.4" => "^11.0.0"
-"css-loader": "^4.3.0" => "^6.8.1"
-"fork-ts-checker-webpack-plugin": "^7.3.0" => "^8.0.0"
-"regenerator-runtime": "^0.13.11" => "^0.14.0"
-"sass-loader": "^12.6.0" => "^13.3.2"
+"@sentry/webpack-plugin": "^1.21.0" => "^2.22.4"
+"@welldone-software/why-did-you-render": "^7.0.1" => "^8.0.3"
+"copy-webpack-plugin": "^11.0.0" => "^12.0.2"
+"postcss-safe-parser": "^6.0.0" => "^7.0.0"
+"regenerator-runtime": "^0.13.11" => "^0.14.1"
+"sass-loader": "^14.2.1" => "^16.0.2"
+"source-map-loader": "^4.0.2" => "^5.0.0"
+"style-loader": "^3.3.4" => "^4.0.0"
"svg64": "^1.2.0" => "^2.0.0"
"webpack-cli": "^4.10.0" => "^5.1.4"
+"webpack-dev-server": "^4.15.2" => "^5.1.0"
check versions of tools/scripts-config-storybook-lib/package.json using latest
-"@storybook/addon-a11y": "^6.5.16" => "^7.4.2"
-"@storybook/addon-controls": "^6.5.16" => "^7.4.2"
-"@storybook/addon-essentials": "^6.5.16" => "^7.4.2"
-"@storybook/addon-interactions": "^6.5.16" => "^7.4.2"
-"@storybook/addon-links": "^6.5.16" => "^7.4.2"
-"@storybook/builder-webpack5": "^6.5.16" => "^7.4.2"
-"@storybook/jest": "^0.0.10" => "^0.2.2"
-"@storybook/react": "^6.5.16" => "^7.4.2"
-"@storybook/testing-library": "^0.0.13" => "^0.2.1"
-"i18next-http-backend": "^1.4.5" => "^2.2.2"
-"msw": "^0.49.3" => "^1.3.1"
+"@storybook/addon-a11y": "^7.6.20" => "^8.3.3"
+"@storybook/addon-essentials": "^7.6.20" => "^8.3.3"
+"@storybook/addon-interactions": "^7.6.20" => "^8.3.3"
+"@storybook/addon-links": "^7.6.20" => "^8.3.3"
+"@storybook/addon-storysource": "^7.6.20" => "^8.3.3"
+"@storybook/source-loader": "^7.6.20" => "^8.3.3"
+"@storybook/react": "^7.6.20" => "^8.3.3"
+"@storybook/react-webpack5": "^7.6.20" => "^8.3.3"
+"i18next-http-backend": "^1.4.5" => "^2.6.1"
+"msw": "^1.3.4" => "^2.4.9"
+"msw-storybook-addon": "^1.10.0" => "^2.0.3"
+"storybook": "^7.6.20" => "^8.3.3"
check versions of tools/scripts-config-stylelint/package.json using latest
+"stylelint": "^15.11.0" => "^16.9.0"
+"stylelint-config-sass-guidelines": "^10.0.0" => "^12.1.0"
+"stylelint-config-standard": "^34.0.0" => "^36.0.1"
check versions of tools/scripts-config-typescript/package.json using latest
check versions of tools/scripts-core/package.json using latest
-"cpx2": "^3.0.2" => "^5.0.0"
-"fs-extra": "^10.1.0" => "^11.1.1"
-"rimraf": "^3.0.2" => "^5.0.1"
+"stylelint": "^15.11.0" => "^16.9.0"
+"cpx2": "^3.0.2" => "^7.0.1"
+"fs-extra": "^10.1.0" => "^11.2.0"
+"rimraf": "^5.0.10" => "^6.0.1"
+"webpack-merge": "^5.10.0" => "^6.0.1"
"yargs": "^15.4.1" => "^17.7.2"
check versions of tools/scripts-locales/package.json using latest
check versions of tools/scripts-publish-local/package.json using latest
-"rimraf": "^3.0.2" => "^5.0.1"
+"rimraf": "^5.0.10" => "^6.0.1"
check versions of tools/scripts-teorem/package.json using latest
-"@octokit/rest": "^18.12.0" => "^20.0.1"
-"commander": "^6.2.1" => "^11.0.0"
-"dotenv": "^8.6.0" => "^16.3.1"
+"@octokit/rest": "^18.12.0" => "^21.0.2"
+"commander": "^6.2.1" => "^12.1.0"
"mkdirp": "^1.0.4" => "^3.0.1"
"queue": "^6.0.2" => "^7.0.0"
check versions of tools/scripts-utils/package.json using latest
-"fs-extra": "^10.1.0" => "^11.1.1"
-"glob": "^8.1.0" => "^10.3.4"
+"fs-extra": "^10.1.0" => "^11.2.0"
+"glob": "^8.1.0" => "^11.0.0"
"which": "^2.0.2" => "^4.0.0"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of tools/scripts-yarn-workspace/package.json using latest
check versions of tools/upgrade-deps/package.json using latest
check versions of fork/bootstrap-sass/package.json using latest
+"eslint": "^8.57.1" => "^9.11.1"
check versions of fork/dynamic-cdn-webpack-plugin/package.json using latest
-"read-pkg-up": "^7.0.1" => "^10.1.0"
-"rimraf": "^3.0.2" => "^5.0.1"
+"read-pkg-up": "^7.0.1" => "^11.0.0"
+"eslint": "^8.57.1" => "^9.11.1"
+"rimraf": "^5.0.10" => "^6.0.1"
"webpack-cli": "^4.10.0" => "^5.1.4"
+check versions of fork/json-schema-form-core/package.json using latest
+"objectpath": "^1.2.2" => "^2.0.0"
+"@types/chai": "^3.5.2" => "^5.0.0"
+"@types/node": "^6.14.13" => "^22.7.0"
+"rimraf": "^5.0.10" => "^6.0.1"
+
check versions of fork/module-to-cdn/package.json using latest
-"execa": "^4.1.0" => "^8.0.1"
+"execa": "^4.1.0" => "^9.4.0"
"mkdirp": "^1.0.4" => "^3.0.1"
+"eslint": "^8.57.1" => "^9.11.1"
check versions of fork/react-bootstrap/package.json using latest
"dom-helpers": "^3.4.0" => "^5.2.1"
@@ -365,12 +358,8 @@ check versions of fork/react-bootstrap/package.json using latest
"react-transition-group": "^2.9.0" => "^4.4.5"
"uncontrollable": "^7.2.1" => "^8.0.4"
"warning": "^3.0.0" => "^4.0.3"
-"@testing-library/jest-dom": "^5.17.0" => "^6.1.3"
-"@testing-library/react": "^12.1.5" => "^14.0.0"
-"@testing-library/user-event": "^13.5.0" => "^14.5.1"
+"@testing-library/react": "^14.3.1" => "^16.0.1"
+"chai": "^4.5.0" => "^5.1.1"
"chalk": "^2.4.2" => "^5.3.0"
-"react": "^17.0.2" => "^18.2.0"
-"react-dom": "^17.0.2" => "^18.2.0"
-"react-test-renderer": "^17.0.2" => "^18.2.0"
-"sinon": "^11.1.2" => "^16.0.0"
-Done in 252.92s.
+"sinon": "^11.1.2" => "^19.0.2"
+Done in 143.48s.
diff --git a/docs/adr-2024-04-add-support-to-esm.md b/docs/adr-2024-04-add-support-to-esm.md
new file mode 100644
index 0000000000..a714cebbdd
--- /dev/null
+++ b/docs/adr-2024-04-add-support-to-esm.md
@@ -0,0 +1,41 @@
+# ADR: Add support to ECMAScript Modules (ESM)
+
+## Context
+
+Our build and bundling setup currently uses CommonJS modules along with webpack and the dynamic-cdn-webpack-plugin.
+
+To streamline our development workflow and reduce complexity, we are transitioning from yarn to pnpm.
+
+However, it has been identified that pnpm is not compatible with dynamic-cdn-webpack-plugin. This incompatibility, along with the decision to remove the plugin, has resulted in a degradation of the developer experience, primarily through increased build times.
+
+At the same time, the entire frontend world is moving towards ECMAScript Modules (ESM).
+
+Modern browsers that our customers use now support ESM natively.
+
+All existing frameworks are now relying on Vite for the build process, which, under the hood, relies on ESM.
+
+Therefore, having to configure a complex toolchain is becoming obsolete. Given this changing context, we can reevaluate our decisions around the "talend-scripts build\*" toolchain.
+
+## Problem
+
+The transition from yarn to pnpm has uncovered an incompatibility with dynamic-cdn-webpack-plugin, exacerbating the decision to discontinue using this plugin.
+
+This has adversely impacted the developer experience by elongating the build times, a significant concern as it can hinder our overall productivity and agility.
+
+## Decision
+
+Our packages must export ESM to be futur proof and let us use modern tooling like vite or parcel.
+
+## Alternatives Considered
+
+- **Sticking with webpack and dynamic-cdn-webpack-plugin**: This was initially considered to maintain our current setup and avoid the complexities associated with migration. However, given the incompatibility with pnpm and the underlying issues related to complexity and inefficiency in build times, this option was deemed unsuitable.
+
+- **Switching to another build tool without adopting ESM**: Several other build tools could potentially improve build times. However, without addressing the fundamental shift towards ESM in the JavaScript ecosystem, this would be a short-term fix rather than a long-term solution.
+
+- **Migrating to Vite while keeping our packages in CommonJS**: This alternative involves moving to Vite for its development speed advantages but not converting our packages to ESM. While this approach could reduce the immediate workload and avoid potential issues with third-party CommonJS dependencies, it would limit our ability to fully leverage Vite’s capabilities. Vite is optimized for ESM, and using CommonJS may result in suboptimal build performance and hinder live module reloading, affecting developer experience and potentially leading to more complex configurations.
+
+## Consequences
+
+- **Positive**: Moving to ESM and adopting Vite is expected to reduce build times, enhancing developer experience and productivity. It aligns our development practices with the modern JavaScript ecosystem's move towards ESM.
+- **Negative**: The migration from CommonJS to ESM syntax could require significant effort. It might also temporarily disrupt our development workflow and necessitate additional training for developers not yet familiar with ESM or Vite.
+- **Risks**: There is a risk of encountering third-party libraries not yet compatible with ESM, which could complicate the migration process.
diff --git a/fork/bootstrap-sass/CHANGELOG.md b/fork/bootstrap-sass/CHANGELOG.md
index 768f54ad9e..aa7ef491ee 100644
--- a/fork/bootstrap-sass/CHANGELOG.md
+++ b/fork/bootstrap-sass/CHANGELOG.md
@@ -1,5 +1,49 @@
# Changelog
+## 5.3.0
+
+### Minor Changes
+
+- c3750a1: chore: upgrade dependencies
+
+ Major upgrade for all packages that have a peerDependency on react or react-dom. Those packages now ask for react@18 and react-dom@18.
+
+## 5.2.1
+
+### Patch Changes
+
+- 1abc22f: chore: upgrade dependencies
+
+## 5.2.0
+
+### Minor Changes
+
+- 9568363: Use include instead of same-origin in the credentials option of fetch.
+
+## 5.1.0
+
+### Minor Changes
+
+- 18c1d97: `rem` values have been updated to correspond to the new `rem` base (16px) define by the design system
+
+## 5.0.0
+
+### Major Changes
+
+- 3dc3100: chore: remove font-size override (this should not impact the apps as it's done also on the design-system provider)
+
+## 4.0.0
+
+### Major Changes
+
+- 9f9fc07: chore: remove font-size override (this should not impact the apps as it's done also on the design-system provider)
+
+## 3.5.1
+
+### Patch Changes
+
+- f14ebbe23: Add missing deps
+
## 3.5.0
### Minor Changes
diff --git a/fork/bootstrap-sass/assets/stylesheets/bootstrap/_scaffolding.scss b/fork/bootstrap-sass/assets/stylesheets/bootstrap/_scaffolding.scss
index 7fda593848..b303bf4c6d 100644
--- a/fork/bootstrap-sass/assets/stylesheets/bootstrap/_scaffolding.scss
+++ b/fork/bootstrap-sass/assets/stylesheets/bootstrap/_scaffolding.scss
@@ -2,34 +2,31 @@
// Scaffolding
// --------------------------------------------------
-
// Reset the box-sizing
//
// Heads up! This reset may cause conflicts with some third-party widgets.
// For recommendations on resolving such conflicts, see
// https://getbootstrap.com/docs/3.4/getting-started/#third-box-sizing
* {
- @include box-sizing(border-box);
+ @include box-sizing(border-box);
}
*:before,
*:after {
- @include box-sizing(border-box);
+ @include box-sizing(border-box);
}
-
// Body reset
html {
- font-size: 10px;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
- font-family: $font-family-base;
- font-size: $font-size-base;
- line-height: $line-height-base;
- color: $text-color;
- background-color: $body-bg;
+ font-family: $font-family-base;
+ font-size: $font-size-base;
+ line-height: $line-height-base;
+ color: $text-color;
+ background-color: $body-bg;
}
// Reset fonts for relevant elements
@@ -37,100 +34,95 @@ input,
button,
select,
textarea {
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
}
-
// Links
a {
- color: $link-color;
- text-decoration: none;
+ color: $link-color;
+ text-decoration: none;
- &:hover,
- &:focus {
- color: $link-hover-color;
- text-decoration: $link-hover-decoration;
- }
+ &:hover,
+ &:focus {
+ color: $link-hover-color;
+ text-decoration: $link-hover-decoration;
+ }
- &:focus {
- @include tab-focus;
- }
+ &:focus {
+ @include tab-focus;
+ }
}
-
// Figures
//
// We reset this here because previously Normalize had no `figure` margins. This
// ensures we don't break anyone's use of the element.
figure {
- margin: 0;
+ margin: 0;
}
-
// Images
img {
- vertical-align: middle;
+ vertical-align: middle;
}
// Responsive images (ensure images don't scale beyond their parents)
.img-responsive {
- @include img-responsive;
+ @include img-responsive;
}
// Rounded corners
.img-rounded {
- border-radius: $border-radius-large;
+ border-radius: $border-radius-large;
}
// Image thumbnails
//
// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
.img-thumbnail {
- padding: $thumbnail-padding;
- line-height: $line-height-base;
- background-color: $thumbnail-bg;
- border: 1px solid $thumbnail-border;
- border-radius: $thumbnail-border-radius;
- @include transition(all .2s ease-in-out);
+ padding: $thumbnail-padding;
+ line-height: $line-height-base;
+ background-color: $thumbnail-bg;
+ border: 1px solid $thumbnail-border;
+ border-radius: $thumbnail-border-radius;
+ @include transition(all 0.2s ease-in-out);
- // Keep them at most 100% wide
- @include img-responsive(inline-block);
+ // Keep them at most 100% wide
+ @include img-responsive(inline-block);
}
// Perfect circle
.img-circle {
- border-radius: 50%; // set radius in percents
+ border-radius: 50%; // set radius in percents
}
-
// Horizontal rules
hr {
- margin-top: $line-height-computed;
- margin-bottom: $line-height-computed;
- border: 0;
- border-top: 1px solid $hr-border;
+ margin-top: $line-height-computed;
+ margin-bottom: $line-height-computed;
+ border: 0;
+ border-top: 1px solid $hr-border;
}
-
// Only display content to screen readers
//
// See: https://a11yproject.com/posts/how-to-hide-content
.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: -1px;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
}
// Use in conjunction with .sr-only to only display content when it's focused.
@@ -138,24 +130,23 @@ hr {
// Credit: HTML5 Boilerplate
.sr-only-focusable {
- &:active,
- &:focus {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip: auto;
- }
+ &:active,
+ &:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
+ }
}
-
// iOS "clickable elements" fix for role="button"
//
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
// for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
-[role="button"] {
- cursor: pointer;
+[role='button'] {
+ cursor: pointer;
}
diff --git a/fork/bootstrap-sass/package.json b/fork/bootstrap-sass/package.json
index bf65b31c98..72b6568b15 100644
--- a/fork/bootstrap-sass/package.json
+++ b/fork/bootstrap-sass/package.json
@@ -1,6 +1,6 @@
{
"name": "@talend/bootstrap-sass",
- "version": "3.5.0",
+ "version": "5.3.0",
"description": "bootstrap-sass is a Sass-powered version of Bootstrap 3, ready to drop right into your Sass powered applications.",
"main": "assets/javascripts/bootstrap.js",
"style": "assets/stylesheets/_bootstrap.scss",
@@ -38,5 +38,10 @@
},
"publishConfig": {
"access": "public"
+ },
+ "devDependencies": {
+ "@talend/eslint-config": "^13.2.1",
+ "@talend/eslint-plugin": "^1.3.1",
+ "eslint": "^8.57.1"
}
}
diff --git a/fork/dynamic-cdn-webpack-plugin/.eslintrc.json b/fork/dynamic-cdn-webpack-plugin/.eslintrc.json
index 8464e11418..892f6e0fe8 100644
--- a/fork/dynamic-cdn-webpack-plugin/.eslintrc.json
+++ b/fork/dynamic-cdn-webpack-plugin/.eslintrc.json
@@ -1,4 +1,16 @@
{
"root": true,
- "extends": "@talend"
+ "extends": ["eslint:recommended", "plugin:prettier/recommended", "plugin:import/recommended"],
+ "env": {
+ "es6": true,
+ "node": true,
+ "jasmine": true,
+ "jest": true
+ },
+ "parser": "@babel/eslint-parser",
+ "parserOptions": {
+ "ecmaVersion": 6,
+ "sourceType": "module",
+ "requireConfigFile": false
+ }
}
diff --git a/fork/dynamic-cdn-webpack-plugin/.gitignore b/fork/dynamic-cdn-webpack-plugin/.gitignore
index 7e0138d353..a3cc081795 100644
--- a/fork/dynamic-cdn-webpack-plugin/.gitignore
+++ b/fork/dynamic-cdn-webpack-plugin/.gitignore
@@ -4,3 +4,4 @@ test/fixtures/output
yarn.lock
.nyc_output
coverage
+!test/fixtures/app/node_modules
diff --git a/fork/dynamic-cdn-webpack-plugin/CHANGELOG.md b/fork/dynamic-cdn-webpack-plugin/CHANGELOG.md
index bd446c30ee..81a0732d09 100644
--- a/fork/dynamic-cdn-webpack-plugin/CHANGELOG.md
+++ b/fork/dynamic-cdn-webpack-plugin/CHANGELOG.md
@@ -1,5 +1,38 @@
# CHANGELOG
+## 14.0.0
+
+### Major Changes
+
+- c3750a1: chore: upgrade dependencies
+
+ Major upgrade for all packages that have a peerDependency on react or react-dom. Those packages now ask for react@18 and react-dom@18.
+
+### Patch Changes
+
+- Updated dependencies [c3750a1]
+ - @talend/module-to-cdn@9.11.0
+
+## 13.1.2
+
+### Patch Changes
+
+- af0ac2d: Upgrade rimraf to version 5.0.5
+
+## 13.1.1
+
+### Patch Changes
+
+- 1abc22f: chore: upgrade dependencies
+- Updated dependencies [1abc22f]
+ - @talend/module-to-cdn@9.10.1
+
+## 13.1.0
+
+### Minor Changes
+
+- f14ebbe23: Add missing deps, adapt code to keep test working with pnpm and use custom eslint config to not have circular dependency
+
## 13.0.1
### Patch Changes
diff --git a/fork/dynamic-cdn-webpack-plugin/package.json b/fork/dynamic-cdn-webpack-plugin/package.json
index f5e2b58e3d..2a6a6a14f0 100644
--- a/fork/dynamic-cdn-webpack-plugin/package.json
+++ b/fork/dynamic-cdn-webpack-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@talend/dynamic-cdn-webpack-plugin",
- "version": "13.0.1",
+ "version": "14.0.0",
"description": "Dynamically get your dependencies from a cdn rather than bundling them in your app",
"license": "MIT",
"repository": "Talend/dynamic-cdn-webpack-plugin",
@@ -36,21 +36,24 @@
"externals"
],
"dependencies": {
- "@talend/module-to-cdn": "^9.9.1",
+ "@talend/module-to-cdn": "^9.11.1",
"read-pkg-up": "^7.0.1",
+ "semver": "^7.6.3",
"webpack-sources": "^3.2.3"
},
"peerDependencies": {
- "webpack": "^5.88.2"
+ "webpack": "^5.94.0"
},
"devDependencies": {
+ "@babel/eslint-parser": "^7.25.1",
"all-contributors-cli": "^6.26.1",
"codecov": "^3.8.3",
- "html-webpack-plugin": "^5.5.3",
+ "eslint": "^8.57.1",
+ "html-webpack-plugin": "^5.6.0",
"jest": "^29.7.0",
"mz": "^2.7.0",
- "rimraf": "^3.0.2",
- "webpack": "^5.88.2",
+ "rimraf": "^5.0.10",
+ "webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
"webpack-manifest-plugin": "^5.0.0"
},
diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.js b/fork/dynamic-cdn-webpack-plugin/src/find.js
index 2d8cfed60d..856e07e7ed 100644
--- a/fork/dynamic-cdn-webpack-plugin/src/find.js
+++ b/fork/dynamic-cdn-webpack-plugin/src/find.js
@@ -9,6 +9,7 @@ function findPackage(info) {
if (name.startsWith('@')) {
[scope, name] = info.name.split('/');
}
+ // eslint-disable-next-line no-use-before-define
return findPackages(scope, name).find(cwd => {
const {
packageJson: { version },
@@ -34,13 +35,13 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) {
// just add the path to the found list
return accu.concat(subFolderPath);
}
+
// the scope or package name is not the one we look for
// if there is a nested node modules folder, we dive into it for the search
const nestedNodeModulesPath = path.join(subFolderPath, 'node_modules');
if (fs.existsSync(nestedNodeModulesPath)) {
- return accu.concat(
- findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, []),
- );
+ // eslint-disable-next-line no-use-before-define
+ return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, []));
}
return accu;
}, []);
@@ -54,29 +55,21 @@ function findPackagesFromNonScopeFolder(scope, name, nonScopeFolderPath) {
if (subFolder.name === '.bin') {
return accu;
}
- if (subFolder.name.startsWith('@')) {
+ // MAKE IT COMPATIBLE WITH PNPM (especially for test) WHEN deps is @talend/scripts-...
+ let regex = /@talend\/(scripts|babel|eslint)-.*\/node_modules$/;
+ if (subFolder.name.startsWith('@') && !regex.test(subFolder?.path)) {
// for scope folders, we need a special treatment to avoid getting scoped packages when we don't want a scoped one.
// ex: search for `classnames`, we don't want to find `@types/classnames` in the result
return accu.concat(
- findPackagesFromScopeFolder(
- scope,
- name,
- path.join(nonScopeFolderPath, subFolder.name),
- ),
+ findPackagesFromScopeFolder(scope, name, path.join(nonScopeFolderPath, subFolder.name)),
);
} else if (!scope && subFolder.name === name) {
// we want a NON scoped package, we are in a non scoped folder, and the names match
return accu.concat(path.join(nonScopeFolderPath, subFolder.name));
}
- const nestedNodeModulesPath = path.join(
- nonScopeFolderPath,
- subFolder.name,
- 'node_modules',
- );
+ const nestedNodeModulesPath = path.join(nonScopeFolderPath, subFolder.name, 'node_modules');
if (fs.existsSync(nestedNodeModulesPath)) {
- return accu.concat(
- findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath),
- );
+ return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath));
}
return accu;
}, []);
@@ -88,7 +81,14 @@ function findPackages(scope, name, buff = []) {
if (roots === null) {
return buff;
}
- return buff.concat(...roots.map(root => findPackagesFromNonScopeFolder(scope, name, root)));
+ const result = buff.concat(
+ ...roots.map(root => findPackagesFromNonScopeFolder(scope, name, root)),
+ );
+ // Return a new Set to remove duplicate values: case possible with PNPM in GHA, due to pnpm/action-setup
+ // With the action, a folder setup-pnpm is created to manage the store and the script see it and try to scan it, and this generate duplicate entry
+ // Before we returned directly result of buff.concat...
+ // TODO: Manage pnpm installation manually (not reproduce the issue in this case but need to find solution to install global dep like surge)
+ return [...new Set(result)];
}
module.exports = {
diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.test.js b/fork/dynamic-cdn-webpack-plugin/src/find.test.js
index 0d72fb96ba..c2aedba0b9 100644
--- a/fork/dynamic-cdn-webpack-plugin/src/find.test.js
+++ b/fork/dynamic-cdn-webpack-plugin/src/find.test.js
@@ -17,12 +17,9 @@ describe('findPackages', () => {
'/node_modules/react/index.js': 'console.log("react");',
'/node_modules/react/package.json': '{"name": "react", "version": "16.14.0"}',
'/node_modules/@types/classnames/index.js': 'console.log("@types/classnames");',
- '/node_modules/@talend/react-components/index.js':
- 'console.log("@talend/react-components");',
- '/node_modules/@talend/react-components/node_modules/react/index.js':
- 'console.log("react");',
- '/node_modules/@talend/react-containers/index.js':
- 'console.log("@talend/react-containers");',
+ '/node_modules/@talend/react-components/index.js': 'console.log("@talend/react-components");',
+ '/node_modules/@talend/react-components/node_modules/react/index.js': 'console.log("react");',
+ '/node_modules/@talend/react-containers/index.js': 'console.log("@talend/react-containers");',
};
beforeEach(() => {
diff --git a/fork/dynamic-cdn-webpack-plugin/test/core.test.js b/fork/dynamic-cdn-webpack-plugin/test/core.test.js
index 0476a14dc3..b0715c3f9c 100644
--- a/fork/dynamic-cdn-webpack-plugin/test/core.test.js
+++ b/fork/dynamic-cdn-webpack-plugin/test/core.test.js
@@ -55,9 +55,7 @@ describe('core', () => {
expect(output).toContain('module.exports = React');
const manifest = JSON.parse(
fs
- .readFileSync(
- path.resolve(__dirname, './fixtures/output/basic/app.js.dependencies.json'),
- )
+ .readFileSync(path.resolve(__dirname, './fixtures/output/basic/app.js.dependencies.json'))
.toString(),
);
expect(manifest.react.peerDependency).toBe('^15.6.1');
diff --git a/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/.DS_Store b/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/.DS_Store
deleted file mode 100644
index 5f0e6a4f3f..0000000000
Binary files a/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/.DS_Store and /dev/null differ
diff --git a/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/regenerator-runtime/index.js b/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/regenerator-runtime/index.js
new file mode 100644
index 0000000000..e27ca4c042
--- /dev/null
+++ b/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/regenerator-runtime/index.js
@@ -0,0 +1 @@
+console.log('THIS IS regenerator-runtime too!');
diff --git a/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/regenerator-runtime/package.json b/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/regenerator-runtime/package.json
new file mode 100644
index 0000000000..281facc13b
--- /dev/null
+++ b/fork/dynamic-cdn-webpack-plugin/test/fixtures/app/node_modules/regenerator-runtime/package.json
@@ -0,0 +1,6 @@
+{
+ "license": "MIT",
+ "main": "index.js",
+ "name": "regenerator-runtime",
+ "version": "0.13.4"
+}
diff --git a/fork/dynamic-cdn-webpack-plugin/test/helpers/clean-dir.js b/fork/dynamic-cdn-webpack-plugin/test/helpers/clean-dir.js
index 23ae125d63..dfae7778fc 100644
--- a/fork/dynamic-cdn-webpack-plugin/test/helpers/clean-dir.js
+++ b/fork/dynamic-cdn-webpack-plugin/test/helpers/clean-dir.js
@@ -1,14 +1,6 @@
// eslint-disable-next-line import/no-extraneous-dependencies
-const rimraf = require('rimraf');
+const { rimraf } = require('rimraf');
module.exports = function cleanDir(dir) {
- return new Promise((resolve, reject) => {
- rimraf(dir, err => {
- if (err) {
- return reject(err);
- }
-
- return resolve();
- });
- });
+ return rimraf(dir);
};
diff --git a/packages/jsfc/.eslintrc.json b/fork/json-schema-form-core/.eslintrc.json
similarity index 100%
rename from packages/jsfc/.eslintrc.json
rename to fork/json-schema-form-core/.eslintrc.json
diff --git a/packages/jsfc/.gitignore b/fork/json-schema-form-core/.gitignore
similarity index 100%
rename from packages/jsfc/.gitignore
rename to fork/json-schema-form-core/.gitignore
diff --git a/packages/jsfc/.jscsrc b/fork/json-schema-form-core/.jscsrc
similarity index 100%
rename from packages/jsfc/.jscsrc
rename to fork/json-schema-form-core/.jscsrc
diff --git a/packages/jsfc/.mocharc.json b/fork/json-schema-form-core/.mocharc.json
similarity index 100%
rename from packages/jsfc/.mocharc.json
rename to fork/json-schema-form-core/.mocharc.json
diff --git a/packages/jsfc/.travis.yml b/fork/json-schema-form-core/.travis.yml
similarity index 100%
rename from packages/jsfc/.travis.yml
rename to fork/json-schema-form-core/.travis.yml
diff --git a/fork/json-schema-form-core/CHANGELOG.md b/fork/json-schema-form-core/CHANGELOG.md
new file mode 100644
index 0000000000..135d9eb5a9
--- /dev/null
+++ b/fork/json-schema-form-core/CHANGELOG.md
@@ -0,0 +1,120 @@
+# @talend/json-schema-form-core
+
+## 1.4.1
+
+### Patch Changes
+
+- f321a0d: Remove unused tsconfig.esm.json (initially added to use TSC but we stay with babel at the end)
+
+## 1.4.0
+
+### Minor Changes
+
+- c3750a1: chore: upgrade dependencies
+
+ Major upgrade for all packages that have a peerDependency on react or react-dom. Those packages now ask for react@18 and react-dom@18.
+
+## 1.3.0
+
+### Minor Changes
+
+- 3bd16fc: Add support to ESM
+
+## 1.2.7
+
+### Patch Changes
+
+- 568481a: Remove usage of path-browserify as it's not needed
+
+## 1.2.6
+
+### Patch Changes
+
+- f546896: Fix: improve call of use in sass files + fix ts lint
+
+## 1.2.5
+
+### Patch Changes
+
+- 779fc8c: - JSFC is a fork of https://github.com/json-schema-form/json-schema-form-core : its place is in the Fork folder
+ - Remove local copy of json-refs and use package instead
+ - add missing type to fix ts compilation error
+ - add a polyfill for json-refs: path-browserify
+
+## 1.2.4
+
+### Patch Changes
+
+- af0ac2d: Upgrade rimraf to version 5.0.5
+
+## 1.2.3
+
+### Patch Changes
+
+- 1abc22f: chore: upgrade dependencies
+
+## 1.2.2
+
+### Patch Changes
+
+- 5d631f2: TMC-27327 - Fix input number validation to display correct error message
+
+## 1.2.1
+
+### Patch Changes
+
+- c468f2f: chore: upgrade dependencies
+
+## 1.2.0
+
+### Minor Changes
+
+- b9cc5b097: Add missing deps, fix lint issue and fix tsconfig file
+
+## 1.1.1
+
+### Patch Changes
+
+- f77b6a9b7: TDOPS-3372 - validate input value for integer fields
+
+## 1.1.0
+
+### Minor Changes
+
+- 47b758112: feat(ARCH-482): use React 17 internally and extend react peer dep version
+
+## 1.0.5
+
+### Patch Changes
+
+- 86f208189: chore: upgrade dependencies and align @talend scoped packages to latest
+
+## 1.0.4
+
+### Patch Changes
+
+- 039b85775: chore: upgrade dependencies and align @talend scoped packages to latest
+
+## 1.0.3
+
+### Patch Changes
+
+- 667cd0a50: chore: upgrade dependencies and align @talend scoped packages to latest
+
+## 1.0.2
+
+### Patch Changes
+
+- f1f4ec5bc: fix(workspace-run): package run order
+
+## 1.0.1
+
+### Patch Changes
+
+- 3e9121287: chore(build): order packages on pre-release hook
+
+## 1.0.0
+
+### Patch Changes
+
+- fe4af8c5d: fix: rebuild using talend-scripts. Output is now an umd file which embed tv4.
diff --git a/packages/jsfc/LICENSE b/fork/json-schema-form-core/LICENSE
similarity index 100%
rename from packages/jsfc/LICENSE
rename to fork/json-schema-form-core/LICENSE
diff --git a/packages/jsfc/README.md b/fork/json-schema-form-core/README.md
similarity index 82%
rename from packages/jsfc/README.md
rename to fork/json-schema-form-core/README.md
index aa05bda5f7..485213c45b 100644
--- a/packages/jsfc/README.md
+++ b/fork/json-schema-form-core/README.md
@@ -1,4 +1,5 @@
# JSON Schema Form Core
+
[![Gitter](https://img.shields.io/badge/GITTER-JOIN%20CHAT%20%E2%86%92-ff69b4.svg?style=flat-square)](https://gitter.im/json-schema-form/angular-schema-form?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/json-schema-form/json-schema-form-core.svg?branch=development)](https://travis-ci.org/json-schema-form/json-schema-form-core)
@@ -11,11 +12,13 @@ You **DO NOT** use this file in addition to Angular Schema Form, it is embedded
build into any frameworks using it.
## Work-In-Progress!
+
There is [test output](docs/test.md) that forms some super basic documentation
and I intend to expand them much further to the point of almost being
useful before I create a proper API and document that.
## Keeping Track
+
After changing to Webpack 2, this library now includes a detailed version
header which is passed through into `Angular Schema Form` and also the `Bootstrap` decorator bundle
@@ -31,6 +34,7 @@ header which is passed through into `Angular Schema Form` and also the `Bootstra
```
## Contributing / Plans
+
The main contributions we need to the core at the moment are related to both the migration
of `Angular Schema Form` features to the core (like templates/builders) and the addition
of an API for use by ASF (Angular) and RSF (React) libraries.
@@ -40,21 +44,24 @@ Please contact @Anthropic via our [Gitter](https://gitter.im/json-schema-form/an
## Testing it
### With Angular Schema Form
+
There is a branch in angular-schema-form called `feature/webpack-babel` that integrates the core.
To use it roughly follow these steps:
-* Clone angular-schema-form to a **sibling** directory and switch to branch `feature/webpack-babel`
-* `npm install` to install dependencies
-* `npm run build` to build with the core.
-* Use dist/angular-schema-form.js, now with the core from this folder. *No need to also load ObjectPath since it is already included*
+- Clone angular-schema-form to a **sibling** directory and switch to branch `feature/webpack-babel`
+- `npm install` to install dependencies
+- `npm run build` to build with the core.
+- Use dist/angular-schema-form.js, now with the core from this folder. _No need to also load ObjectPath since it is already included_
### With Mocha tests
+
Tests are written in mocha + chai and run trough `npm test`.
When the command `npm run testdoc` is run instead, the tests will also generate a readable
`markdown` file [test.md](docs/test.md) to document elements of the library.
## Notes
-* ObjectPath is bundled with json-schema-form-core
-* angular-schema-form bundles json-schema-form-core so the user doesn't have to include it as an dependency.
-* The code for not using ObjectPath on Angular 1.2 is removed. Could maybe be fixed but I (davidlgj) strongly believe its time to drop Angular 1.2 support since it complicates validation code as well.
+
+- ObjectPath is bundled with json-schema-form-core
+- angular-schema-form bundles json-schema-form-core so the user doesn't have to include it as a dependency.
+- The code for not using ObjectPath on Angular 1.2 is removed. Could maybe be fixed but I (davidlgj) strongly believe its time to drop Angular 1.2 support since it complicates validation code as well.
diff --git a/packages/jsfc/package.json b/fork/json-schema-form-core/package.json
similarity index 67%
rename from packages/jsfc/package.json
rename to fork/json-schema-form-core/package.json
index 31fbbbcb88..691c088cd7 100644
--- a/packages/jsfc/package.json
+++ b/fork/json-schema-form-core/package.json
@@ -1,15 +1,22 @@
{
"name": "@talend/json-schema-form-core",
- "version": "1.1.1",
+ "version": "1.4.1",
"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": {
+ ".": {
+ "import": "./lib-esm/index.js",
+ "require": "./dist/index.js"
+ }
+ },
"scripts": {
"build:lib": "rimraf dist && talend-scripts build --umd",
+ "build:lib:esm": "talend-scripts build --esm",
"watch": "webpack --watch",
"dist-untested": "webpack --config webpack.config.dist.js",
"test:cov": "npm run test",
- "test": "echo need to fix all tests before"
+ "test": "talend-scripts test"
},
"author": "json-schema-form",
"contributors": [
@@ -39,14 +46,20 @@
"json-schema"
],
"devDependencies": {
- "@talend/scripts-core": "^15.0.0",
- "@talend/scripts-config-react-webpack": "^16.0.0",
+ "@talend/babel-plugin-assets-api": "^1.4.0",
+ "@talend/babel-plugin-import-from-index": "^1.8.0",
+ "@talend/eslint-config": "^13.2.1",
+ "@talend/eslint-plugin": "^1.3.1",
+ "@talend/scripts-config-react-webpack": "^16.8.1",
+ "@talend/scripts-config-typescript": "^11.3.0",
+ "@talend/scripts-core": "^16.5.1",
"@types/chai": "^3.5.2",
"@types/node": "^6.14.13",
- "json-refs": "^3.0.15",
- "rimraf": "^3.0.2"
+ "rimraf": "^5.0.10",
+ "webpack": "^5.94.0"
},
"dependencies": {
+ "json-refs": "3.0.15",
"objectpath": "^1.2.2",
"tv4": "^1.3.0"
},
diff --git a/packages/jsfc/src/lib/canonical-title-map.spec.js b/fork/json-schema-form-core/src/canonical-title-map.spec.js
similarity index 99%
rename from packages/jsfc/src/lib/canonical-title-map.spec.js
rename to fork/json-schema-form-core/src/canonical-title-map.spec.js
index 6378a87a16..6c405ee5a6 100644
--- a/packages/jsfc/src/lib/canonical-title-map.spec.js
+++ b/fork/json-schema-form-core/src/canonical-title-map.spec.js
@@ -1,5 +1,6 @@
import chai from 'chai';
import { describe, it } from 'mocha';
+
import canonicalTitleMap from './canonical-title-map';
chai.should();
diff --git a/packages/jsfc/src/lib/canonical-title-map.ts b/fork/json-schema-form-core/src/canonical-title-map.ts
similarity index 80%
rename from packages/jsfc/src/lib/canonical-title-map.ts
rename to fork/json-schema-form-core/src/canonical-title-map.ts
index 9721a7b0d8..392e6c9e48 100644
--- a/packages/jsfc/src/lib/canonical-title-map.ts
+++ b/fork/json-schema-form-core/src/canonical-title-map.ts
@@ -1,8 +1,8 @@
// Takes a titleMap in either object or list format and returns one
// in the list format.
-export default function(titleMap: Array, originalEnum?: any) {
+export default function (titleMap: Array, originalEnum?: any) {
if (!Array.isArray(titleMap)) {
- const canonical = [];
+ const canonical: any = [];
if (originalEnum) {
originalEnum.forEach(value => {
canonical.push({ name: titleMap[value], value });
diff --git a/fork/json-schema-form-core/src/index.js b/fork/json-schema-form-core/src/index.js
new file mode 100644
index 0000000000..aae62c10aa
--- /dev/null
+++ b/fork/json-schema-form-core/src/index.js
@@ -0,0 +1,19 @@
+import tv4index from 'tv4';
+
+// eslint-disable-next-line prettier/prettier
+import * as schemaDefaultsImp from './schema-defaults';
+// eslint-disable-next-line prettier/prettier
+import * as sfPathImp from './sf-path';
+// eslint-disable-next-line prettier/prettier
+import canonicalTitleMapImp from './canonical-title-map';
+
+export { merge } from './merge';
+export { select } from './select';
+export { jsonref } from './resolve';
+export { traverseSchema, traverseForm } from './traverse';
+export { validate } from './validate';
+
+export const sfPath = sfPathImp;
+export const schemaDefaults = schemaDefaultsImp;
+export const canonicalTitleMap = canonicalTitleMapImp;
+export const tv4 = tv4index;
diff --git a/packages/jsfc/src/lib/merge.js b/fork/json-schema-form-core/src/merge.js
similarity index 94%
rename from packages/jsfc/src/lib/merge.js
rename to fork/json-schema-form-core/src/merge.js
index 13c1b578fb..b3468f7dc9 100644
--- a/packages/jsfc/src/lib/merge.js
+++ b/fork/json-schema-form-core/src/merge.js
@@ -1,6 +1,6 @@
-import { stringify, parse } from './sf-path';
-import { defaultForm, createDefaults } from './schema-defaults';
import canonicalTitleMap from './canonical-title-map';
+import { createDefaults, defaultForm } from './schema-defaults';
+import { parse, stringify } from './sf-path';
// export function merge(schema, form, schemaDefaultTypes, ignore, options, readonly, asyncTemplates) {
export function merge(
@@ -40,26 +40,26 @@ export function merge(
//simple case, we have a "...", just put the formItemRest there
if (stdForm.form && idxRest !== -1) {
let formKeys = form
- .map(function(obj) {
+ .map(function (obj) {
if (typeof obj === 'string') {
return obj;
} else if (obj.key) {
return obj.key;
}
})
- .filter(function(element) {
+ .filter(function (element) {
return element !== undefined;
});
formItemRest = formItemRest.concat(
stdForm.form
- .map(function(obj) {
+ .map(function (obj) {
let isInside = formKeys.indexOf(obj.key[0]) !== -1;
if (!isInside) {
return obj;
}
})
- .filter(function(element) {
+ .filter(function (element) {
return element !== undefined;
}),
);
diff --git a/packages/jsfc/src/lib/merge.spec.js b/fork/json-schema-form-core/src/merge.spec.js
similarity index 98%
rename from packages/jsfc/src/lib/merge.spec.js
rename to fork/json-schema-form-core/src/merge.spec.js
index 7df44a583f..e8b114c638 100644
--- a/packages/jsfc/src/lib/merge.spec.js
+++ b/fork/json-schema-form-core/src/merge.spec.js
@@ -1,7 +1,8 @@
import chai from 'chai';
import { describe, it } from 'mocha';
-import { defaultForm, createDefaults } from './schema-defaults';
+
import { merge } from './merge';
+import { createDefaults, defaultForm } from './schema-defaults';
chai.should();
diff --git a/packages/jsfc/src/module.spec.js b/fork/json-schema-form-core/src/module.spec.js
similarity index 99%
rename from packages/jsfc/src/module.spec.js
rename to fork/json-schema-form-core/src/module.spec.js
index 1c3ee688ac..00010d88e4 100644
--- a/packages/jsfc/src/module.spec.js
+++ b/fork/json-schema-form-core/src/module.spec.js
@@ -1,15 +1,16 @@
import chai from 'chai';
import { describe, it } from 'mocha';
+
import {
+ canonicalTitleMap,
+ jsonref,
merge,
+ schemaDefaults,
select,
- traverseSchema,
+ sfPath,
traverseForm,
+ traverseSchema,
validate,
- sfPath,
- schemaDefaults,
- canonicalTitleMap,
- jsonref,
} from '.';
chai.should();
diff --git a/packages/jsfc/src/lib/resolve.js b/fork/json-schema-form-core/src/resolve.js
similarity index 78%
rename from packages/jsfc/src/lib/resolve.js
rename to fork/json-schema-form-core/src/resolve.js
index 478b2fce88..d5245b941a 100644
--- a/packages/jsfc/src/lib/resolve.js
+++ b/fork/json-schema-form-core/src/resolve.js
@@ -1,7 +1,7 @@
-import * as JsonRefs from './../../lib/json-refs-standalone';
+import * as JsonRefs from 'json-refs';
export function jsonref(schema, callBack) {
- let promise = new Promise(function(resolve, reject) {
+ let promise = new Promise(function (resolve, reject) {
JsonRefs.resolveRefs(schema, {
filter: ['relative', 'local', 'remote'],
})
diff --git a/packages/jsfc/src/lib/resolve.spec.js b/fork/json-schema-form-core/src/resolve.spec.js
similarity index 94%
rename from packages/jsfc/src/lib/resolve.spec.js
rename to fork/json-schema-form-core/src/resolve.spec.js
index 989c57e71d..9e36cb947c 100644
--- a/packages/jsfc/src/lib/resolve.spec.js
+++ b/fork/json-schema-form-core/src/resolve.spec.js
@@ -1,5 +1,6 @@
import chai from 'chai';
import { describe, it } from 'mocha';
+
import { jsonref } from './resolve';
chai.should();
@@ -83,8 +84,7 @@ describe('resolve.js', () => {
type: 'object',
properties: {
relative: {
- $ref:
- 'https://raw.githubusercontent.com/json-schema-org/json-schema-org.github.io/master/geo',
+ $ref: 'https://raw.githubusercontent.com/json-schema-org/json-schema-org.github.io/master/geo',
},
},
};
@@ -112,7 +112,7 @@ describe('resolve.js', () => {
});
it('should resolve relative json-ref via callback', done => {
- jsonref(schema, function(error, resolved) {
+ jsonref(schema, function (error, resolved) {
if (error) done(error);
resolved.properties.storage.oneOf[0].properties.should.have.property('device');
done();
@@ -121,7 +121,7 @@ describe('resolve.js', () => {
//I believe this only fails in phantomjs due to https://github.com/ariya/phantomjs/issues/11195
it('should resolve remote json-ref via callback', done => {
- jsonref(remote, function(error, resolved) {
+ jsonref(remote, function (error, resolved) {
if (error) done(error);
//resolved.properties.relative.latitude.type.should.equal('number');
done();
diff --git a/packages/jsfc/src/lib/schema-defaults.spec.js b/fork/json-schema-form-core/src/schema-defaults.test.js
similarity index 78%
rename from packages/jsfc/src/lib/schema-defaults.spec.js
rename to fork/json-schema-form-core/src/schema-defaults.test.js
index dd0a0a5d81..96a9668223 100644
--- a/packages/jsfc/src/lib/schema-defaults.spec.js
+++ b/fork/json-schema-form-core/src/schema-defaults.test.js
@@ -1,9 +1,5 @@
-import chai from 'chai';
-import { describe, it } from 'mocha';
import { select } from './select';
-chai.should();
-
describe('select.js', () => {
const data = {
name: 'Freddy',
@@ -36,28 +32,31 @@ describe('select.js', () => {
};
it('should provide a function for getting and setting an object value', () => {
- select.should.be.an('function');
+ expect(typeof select).toBe('function');
});
describe('select', () => {
it('should get a value from an object', () => {
let value = select('frienemies[1].weapon.boomstick.method[0]', data);
- value.should.eq('boom');
+ expect(value).toBe('boom');
});
it('should set a value on an object', () => {
let value = select('weapon.glove.method[1]', data, 'slice');
- data.weapon.glove.method.should.be.deep.equal(['stab', 'slice']);
+ expect(value).toBe('slice');
+ expect(data.weapon.glove.method[1]).toBe('slice');
+ expect(data.weapon.glove.method).toEqual(['stab', 'slice']);
});
it('should create any undefined objects or arrays in the path when setting a value', () => {
let data = {};
let value = select('property.array[1].value', data, 'something');
- data.should.be.deep.equal({
+ expect(data).toMatchObject({
property: {
array: [, { value: 'something' }],
},
});
+ expect(value).toBe('something');
});
});
});
diff --git a/packages/jsfc/src/lib/schema-defaults.ts b/fork/json-schema-form-core/src/schema-defaults.ts
similarity index 93%
rename from packages/jsfc/src/lib/schema-defaults.ts
rename to fork/json-schema-form-core/src/schema-defaults.ts
index 461534320b..d489aefff8 100644
--- a/packages/jsfc/src/lib/schema-defaults.ts
+++ b/fork/json-schema-form-core/src/schema-defaults.ts
@@ -1,5 +1,5 @@
-import { stringify } from './sf-path';
import canonicalTitleMap from './canonical-title-map';
+import { stringify } from './sf-path';
/* Utils */
const stripNullType = type => {
@@ -16,7 +16,7 @@ const stripNullType = type => {
// Creates an default titleMap list from an enum, i.e. a list of strings.
const enumToTitleMap = enm => {
- const titleMap = []; // canonical titleMap format is a list.
+ const titleMap: any = []; // canonical titleMap format is a list.
enm.forEach(name => {
titleMap.push({ name, value: name });
});
@@ -94,7 +94,7 @@ export function stdFormObj(name, schema, options) {
f.validationMessage = schema.validationMessage;
}
if (schema.enumNames) {
- f.titleMap = canonicalTitleMap(schema.enumNames, schema['enum']);
+ f.titleMap = canonicalTitleMap(schema.enumNames, schema.enum);
}
f.schema = schema;
@@ -107,7 +107,7 @@ export function stdFormObj(name, schema, options) {
/*** Schema types to form type mappings, with defaults ***/
export function text(name, schema, options) {
- if (stripNullType(schema.type) === 'string' && !schema['enum']) {
+ if (stripNullType(schema.type) === 'string' && !schema.enum) {
const f = stdFormObj(name, schema, options);
f.key = options.path;
f.type = 'text';
@@ -149,12 +149,12 @@ export function checkbox(name, schema, options) {
}
export function select(name, schema, options) {
- if (stripNullType(schema.type) === 'string' && schema['enum']) {
+ if (stripNullType(schema.type) === 'string' && schema.enum) {
const f = stdFormObj(name, schema, options);
f.key = options.path;
f.type = 'select';
if (!f.titleMap) {
- f.titleMap = enumToTitleMap(schema['enum']);
+ f.titleMap = enumToTitleMap(schema.enum);
}
options.lookup[stringify(options.path)] = f;
return f;
@@ -162,12 +162,12 @@ export function select(name, schema, options) {
}
export function checkboxes(name, schema, options) {
- if (stripNullType(schema.type) === 'array' && schema.items && schema.items['enum']) {
+ if (stripNullType(schema.type) === 'array' && schema.items && schema.items.enum) {
const f = stdFormObj(name, schema, options);
f.key = options.path;
f.type = 'checkboxes';
if (!f.titleMap) {
- f.titleMap = enumToTitleMap(schema.items['enum']);
+ f.titleMap = enumToTitleMap(schema.items.enum);
}
options.lookup[stringify(options.path)] = f;
return f;
@@ -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/packages/jsfc/src/lib/select.js b/fork/json-schema-form-core/src/select.js
similarity index 100%
rename from packages/jsfc/src/lib/select.js
rename to fork/json-schema-form-core/src/select.js
diff --git a/packages/jsfc/src/lib/select.spec.js b/fork/json-schema-form-core/src/select.test.js
similarity index 93%
rename from packages/jsfc/src/lib/select.spec.js
rename to fork/json-schema-form-core/src/select.test.js
index 280089de3c..2cf317f9e4 100644
--- a/packages/jsfc/src/lib/select.spec.js
+++ b/fork/json-schema-form-core/src/select.test.js
@@ -1,19 +1,15 @@
-import chai from 'chai';
-import { describe, it } from 'mocha';
-import { defaultForm, createDefaults } from './schema-defaults';
-
-chai.should();
+import { createDefaults, defaultForm } from './schema-defaults';
describe('schema-defaults.js', () => {
it('should hold functions for generating a default form schema from defaults it creates', () => {
- defaultForm.should.be.an('function');
- createDefaults.should.be.an('function');
+ expect(typeof defaultForm).toBe('function');
+ expect(typeof createDefaults).toBe('function');
});
describe('createDefaults', () => {
it('should create default rules', () => {
const rules = createDefaults();
- rules.should.be.an('object');
+ expect(typeof rules).toBe('object');
});
});
@@ -55,7 +51,6 @@ describe('schema-defaults.js', () => {
},
},
};
-
const form = [
{
title: 'Name',
@@ -199,9 +194,8 @@ describe('schema-defaults.js', () => {
],
},
];
-
const f = defaultForm(schema, createDefaults());
- f.form.should.be.deep.equal(form);
+ expect(f.form).toMatchObject(form);
});
});
});
diff --git a/fork/json-schema-form-core/src/sf-path.test.js b/fork/json-schema-form-core/src/sf-path.test.js
new file mode 100644
index 0000000000..66e0a73be4
--- /dev/null
+++ b/fork/json-schema-form-core/src/sf-path.test.js
@@ -0,0 +1,10 @@
+import { name, normalize, parse, stringify } from './sf-path';
+
+describe('sf-path.js', () => {
+ it('should hold functions for working with object paths and keys', () => {
+ expect(typeof parse).toBe('function');
+ expect(typeof stringify).toBe('function');
+ expect(typeof normalize).toBe('function');
+ expect(typeof name).toBe('function');
+ });
+});
diff --git a/packages/jsfc/src/lib/sf-path.ts b/fork/json-schema-form-core/src/sf-path.ts
similarity index 94%
rename from packages/jsfc/src/lib/sf-path.ts
rename to fork/json-schema-form-core/src/sf-path.ts
index e68709949e..2ff737d6a1 100644
--- a/packages/jsfc/src/lib/sf-path.ts
+++ b/fork/json-schema-form-core/src/sf-path.ts
@@ -18,7 +18,7 @@ export function name(key: Array, separator?: string, formName = '', omit
let fieldSeparator = separator || '-';
if (omitNumbers) {
- fieldKey = fieldKey.filter(function(currentKey: any) {
+ fieldKey = fieldKey.filter(function (currentKey: any) {
return typeof currentKey !== 'number';
});
}
diff --git a/fork/json-schema-form-core/src/traverse.test.js b/fork/json-schema-form-core/src/traverse.test.js
new file mode 100644
index 0000000000..49607ab421
--- /dev/null
+++ b/fork/json-schema-form-core/src/traverse.test.js
@@ -0,0 +1,8 @@
+import { traverseForm, traverseSchema } from './traverse';
+
+describe('traverse.js', () => {
+ it('should hold functions for applying functions on branches of a json-schema or ui-schema', () => {
+ expect(typeof traverseSchema).toBe('function');
+ expect(typeof traverseForm).toBe('function');
+ });
+});
diff --git a/packages/jsfc/src/lib/traverse.ts b/fork/json-schema-form-core/src/traverse.ts
similarity index 97%
rename from packages/jsfc/src/lib/traverse.ts
rename to fork/json-schema-form-core/src/traverse.ts
index 76c1ce7b32..07cca79ef1 100644
--- a/packages/jsfc/src/lib/traverse.ts
+++ b/fork/json-schema-form-core/src/traverse.ts
@@ -7,7 +7,7 @@ export function traverseSchema(schema, fn, path, ignoreArrays) {
path = path || [];
- const traverse = function(
+ const traverse = function (
schemaObject: any,
processorFunction: Function,
pathArray: Array,
diff --git a/packages/jsfc/src/lib/validate.js b/fork/json-schema-form-core/src/validate.js
similarity index 96%
rename from packages/jsfc/src/lib/validate.js
rename to fork/json-schema-form-core/src/validate.js
index 67ec600cd1..ee8651cf9c 100644
--- a/packages/jsfc/src/lib/validate.js
+++ b/fork/json-schema-form-core/src/validate.js
@@ -5,7 +5,7 @@ function validateTypeSpecificInput(inputType = '', event = {}) {
switch (inputType) {
case 'number':
// If the user types a non-integer value, the value is emptied by browser but still displayed in UI
- if (event.target?.validity && !event.target.validity.valid) {
+ if (event.target?.validity && event.target.validity.badInput) {
return { valid: false, message: 'CUSTOM_ERROR_INVALID_INPUT' };
}
break;
diff --git a/packages/jsfc/src/lib/validate.spec.js b/fork/json-schema-form-core/src/validate.test.js
similarity index 67%
rename from packages/jsfc/src/lib/validate.spec.js
rename to fork/json-schema-form-core/src/validate.test.js
index 59b2239e1f..1773b74840 100644
--- a/packages/jsfc/src/lib/validate.spec.js
+++ b/fork/json-schema-form-core/src/validate.test.js
@@ -1,12 +1,8 @@
-import chai from 'chai';
-import { describe, it } from 'mocha';
import { validate } from './validate';
-let should = chai.should();
-
describe('validate.js', () => {
it('should hold a validation function for testing against tv4 until an option to pass in a validator is created', () => {
- validate.should.be.an('function');
+ expect(typeof validate).toBe('function');
});
describe('validate', () => {
@@ -14,24 +10,23 @@ describe('validate.js', () => {
it('should return a result object {"error":null, "missing":[], "valid":true}, with valid set to true when the data is valid for the schema', () => {
let value = 'Batman';
let result = validate(form, value, {});
- should.not.exist(result.error);
- result.missing.should.be.a('array');
- result.missing.length.should.equal(0);
- result.valid.should.equal(true);
+ expect(result.error).toBe(null);
+ expect(result.missing).toEqual([]);
+ expect(result.valid).toBe(true);
});
it('should return an error object with a message "Invalid type: array (expected string)" when the data is not valid', () => {
let value = [0];
let result = validate(form, value, {});
- result.error.message.should.eq('Invalid type: array (expected string)');
+ expect(result.error.message).toBe('Invalid type: array (expected string)');
});
it('should return an error object with a message "CUSTOM_ERROR_INVALID_INPUT" when the integer value is not valid', () => {
let value = 'stringValue';
const testForm = { type: 'number', key: ['hero'], schema: { type: 'number' } };
- const event = { target: { validity: { valid: false } } };
+ const event = { target: { validity: { badInput: true } } };
let result = validate(testForm, value, event);
- result.error.message.should.eq('CUSTOM_ERROR_INVALID_INPUT');
+ expect(result.error.message).toBe('CUSTOM_ERROR_INVALID_INPUT');
});
});
});
diff --git a/packages/jsfc/talend-scripts.json b/fork/json-schema-form-core/talend-scripts.json
similarity index 100%
rename from packages/jsfc/talend-scripts.json
rename to fork/json-schema-form-core/talend-scripts.json
diff --git a/fork/json-schema-form-core/test.md b/fork/json-schema-form-core/test.md
new file mode 100644
index 0000000000..185599bbb7
--- /dev/null
+++ b/fork/json-schema-form-core/test.md
@@ -0,0 +1,257 @@
+# TOC
+
+- [merge.js](#mergejs)
+ - [merge](#mergejs-merge)
+- [schema-defaults.js](#schema-defaultsjs) - [createDefaults](#schema-defaultsjs-createdefaults) - [defaultForm](#schema-defaultsjs-defaultform)
+
+
+
+
+# merge.js
+
+should contain a function for merging schema and form definitions.
+
+```js
+_merge.merge.should.be.an('function');
+```
+
+
+
+## merge
+
+should combine a schema and form definition, regardless of order.
+
+```js
+(0, _merge.merge)(schema, ['name', 'gender']).should.be.deep.equal(stdForm.form);
+(0, _merge.merge)(schema, ['gender']).should.be.deep.equal([stdForm.form[1]]);
+(0, _merge.merge)(schema, ['gender', 'name']).should.be.deep.equal([
+ stdForm.form[1],
+ stdForm.form[0],
+]);
+```
+
+should handle a wildcard \* in the form definition.
+
+```js
+(0, _merge.merge)(schema, ['*']).should.be.deep.equal(stdForm.form);
+```
+
+should allow items that are not in the schema.
+
+```js
+(0, _merge.merge)(schema, ['*', { type: 'fieldset' }]).should.be.deep.equal(
+ stdForm.form.concat([{ type: 'fieldset' }]),
+);
+```
+
+
+
+# schema-defaults.js
+
+should hold functions for generating a default form schema from defaults it creates.
+
+```js
+_schemaDefaults.defaultForm.should.be.an('function');
+_schemaDefaults.createDefaults.should.be.an('function');
+```
+
+
+
+## createDefaults
+
+should create default rules.
+
+```js
+var rules = (0, _schemaDefaults.createDefaults)();
+rules.should.be.an('object');
+```
+
+
+
+## defaultForm
+
+should generate default form def from a schema.
+
+```js
+var schema = {
+ type: 'object',
+ properties: {
+ name: {
+ title: 'Name',
+ description: 'Gimme yea name lad',
+ type: 'string',
+ },
+ gender: {
+ title: 'Choose',
+ type: 'string',
+ enum: ['undefined', 'null', 'NaN'],
+ },
+ overEighteen: {
+ title: 'Are you over 18 years old?',
+ type: 'boolean',
+ default: false,
+ },
+ attributes: {
+ type: 'object',
+ required: ['eyecolor'],
+ properties: {
+ eyecolor: { type: 'string', title: 'Eye color' },
+ haircolor: { type: 'string', title: 'Hair color' },
+ shoulders: {
+ type: 'object',
+ title: 'Shoulders',
+ properties: {
+ left: { type: 'string' },
+ right: { type: 'string' },
+ },
+ },
+ },
+ },
+ },
+};
+var form = [
+ {
+ title: 'Name',
+ description: 'Gimme yea name lad',
+ schema: {
+ title: 'Name',
+ description: 'Gimme yea name lad',
+ type: 'string',
+ },
+ ngModelOptions: {},
+ key: ['name'],
+ type: 'text',
+ },
+ {
+ title: 'Choose',
+ schema: {
+ title: 'Choose',
+ type: 'string',
+ enum: ['undefined', 'null', 'NaN'],
+ },
+ ngModelOptions: {},
+ key: ['gender'],
+ type: 'select',
+ titleMap: [
+ {
+ name: 'undefined',
+ value: 'undefined',
+ },
+ {
+ name: 'null',
+ value: 'null',
+ },
+ {
+ name: 'NaN',
+ value: 'NaN',
+ },
+ ],
+ },
+ {
+ title: 'Are you over 18 years old?',
+ schema: {
+ title: 'Are you over 18 years old?',
+ type: 'boolean',
+ default: false,
+ },
+ ngModelOptions: {},
+ key: ['overEighteen'],
+ type: 'checkbox',
+ },
+ {
+ title: 'attributes',
+ schema: {
+ type: 'object',
+ required: ['eyecolor'],
+ properties: {
+ eyecolor: {
+ type: 'string',
+ title: 'Eye color',
+ },
+ haircolor: {
+ type: 'string',
+ title: 'Hair color',
+ },
+ shoulders: {
+ type: 'object',
+ title: 'Shoulders',
+ properties: {
+ left: {
+ type: 'string',
+ },
+ right: {
+ type: 'string',
+ },
+ },
+ },
+ },
+ },
+ ngModelOptions: {},
+ key: ['attributes'],
+ type: 'fieldset',
+ items: [
+ {
+ title: 'Eye color',
+ required: true,
+ schema: {
+ type: 'string',
+ title: 'Eye color',
+ },
+ ngModelOptions: {},
+ key: ['attributes', 'eyecolor'],
+ type: 'text',
+ },
+ {
+ title: 'Hair color',
+ schema: {
+ type: 'string',
+ title: 'Hair color',
+ },
+ ngModelOptions: {},
+ key: ['attributes', 'haircolor'],
+ type: 'text',
+ },
+ {
+ title: 'Shoulders',
+ schema: {
+ type: 'object',
+ title: 'Shoulders',
+ properties: {
+ left: {
+ type: 'string',
+ },
+ right: {
+ type: 'string',
+ },
+ },
+ },
+ ngModelOptions: {},
+ key: ['attributes', 'shoulders'],
+ type: 'fieldset',
+ items: [
+ {
+ title: 'left',
+ schema: {
+ type: 'string',
+ },
+ ngModelOptions: {},
+ key: ['attributes', 'shoulders', 'left'],
+ type: 'text',
+ },
+ {
+ title: 'right',
+ schema: {
+ type: 'string',
+ },
+ ngModelOptions: {},
+ key: ['attributes', 'shoulders', 'right'],
+ type: 'text',
+ },
+ ],
+ },
+ ],
+ },
+];
+var f = (0, _schemaDefaults.defaultForm)(schema, (0, _schemaDefaults.createDefaults)());
+f.form.should.be.deep.equal(form);
+```
diff --git a/packages/jsfc/tsconfig.json b/fork/json-schema-form-core/tsconfig.json
similarity index 58%
rename from packages/jsfc/tsconfig.json
rename to fork/json-schema-form-core/tsconfig.json
index 636087290d..0f7c9589bb 100644
--- a/packages/jsfc/tsconfig.json
+++ b/fork/json-schema-form-core/tsconfig.json
@@ -1,7 +1,8 @@
{
- "extends": "../../node_modules/@talend/scripts-config-typescript/tsconfig.json",
+ "extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
+ "noImplicitAny": false,
"declaration": true,
"target": "ES5",
"module": "CommonJs"
diff --git a/packages/jsfc/webpack.config.js b/fork/json-schema-form-core/webpack.config.js
similarity index 54%
rename from packages/jsfc/webpack.config.js
rename to fork/json-schema-form-core/webpack.config.js
index 349b3015ba..91e7b79724 100644
--- a/packages/jsfc/webpack.config.js
+++ b/fork/json-schema-form-core/webpack.config.js
@@ -2,4 +2,9 @@ module.exports = {
output: {
filename: 'index.js',
},
+ resolve: {
+ fallback: {
+ path: false,
+ },
+ },
};
diff --git a/fork/module-to-cdn/.babelrc b/fork/module-to-cdn/.babelrc
deleted file mode 100644
index f9b18b310b..0000000000
--- a/fork/module-to-cdn/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "../../node_modules/@talend/scripts-config-babel/.babelrc.json"
-}
diff --git a/fork/module-to-cdn/.eslintrc.json b/fork/module-to-cdn/.eslintrc.json
index 8464e11418..892f6e0fe8 100644
--- a/fork/module-to-cdn/.eslintrc.json
+++ b/fork/module-to-cdn/.eslintrc.json
@@ -1,4 +1,16 @@
{
"root": true,
- "extends": "@talend"
+ "extends": ["eslint:recommended", "plugin:prettier/recommended", "plugin:import/recommended"],
+ "env": {
+ "es6": true,
+ "node": true,
+ "jasmine": true,
+ "jest": true
+ },
+ "parser": "@babel/eslint-parser",
+ "parserOptions": {
+ "ecmaVersion": 6,
+ "sourceType": "module",
+ "requireConfigFile": false
+ }
}
diff --git a/fork/module-to-cdn/.prettierrc b/fork/module-to-cdn/.prettierrc
deleted file mode 100644
index fef1ff88e7..0000000000
--- a/fork/module-to-cdn/.prettierrc
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "printWidth": 100,
- "singleQuote": true,
- "trailingComma": "none",
- "semi": true,
- "arrowParens": "avoid",
- "bracketSpacing": false
-}
diff --git a/fork/module-to-cdn/.prettierrc.js b/fork/module-to-cdn/.prettierrc.js
new file mode 100644
index 0000000000..54776c82dd
--- /dev/null
+++ b/fork/module-to-cdn/.prettierrc.js
@@ -0,0 +1,8 @@
+module.exports = {
+ printWidth: 100,
+ singleQuote: true,
+ trailingComma: 'none',
+ semi: true,
+ arrowParens: 'avoid',
+ bracketSpacing: false
+};
diff --git a/fork/module-to-cdn/CHANGELOG.md b/fork/module-to-cdn/CHANGELOG.md
index 7996f8f0f1..f451854ce0 100644
--- a/fork/module-to-cdn/CHANGELOG.md
+++ b/fork/module-to-cdn/CHANGELOG.md
@@ -1,5 +1,34 @@
# @talend/module-to-cdn
+## 9.11.1
+
+### Patch Changes
+
+- d9fe636: fix: module to cdn for ag-grid
+
+## 9.11.0
+
+### Minor Changes
+
+- c3750a1: chore: upgrade dependencies
+
+ Major upgrade for all packages that have a peerDependency on react or react-dom. Those packages now ask for react@18 and react-dom@18.
+
+## 9.10.1
+
+### Patch Changes
+
+- 1abc22f: chore: upgrade dependencies
+
+## 9.10.0
+
+### Minor Changes
+
+- 3f9c8a7bb: remove babel config: there is no build task on this package
+ remove link to scripts-core to run lint (circular dependency),
+ remove link to tools/eslint-config and add it's own eslint config (circular dependency: fork/module-to-cdn > tools/eslint-config > tools/scripts-config-cdn > fork/module-to-cdn)
+ add missing deps
+
## 9.9.1
### Patch Changes
diff --git a/fork/module-to-cdn/README.md b/fork/module-to-cdn/README.md
index 617044f873..32d5e511d1 100644
--- a/fork/module-to-cdn/README.md
+++ b/fork/module-to-cdn/README.md
@@ -1,30 +1,14 @@
# @talend/module-to-cdn
-[![Build Status](https://travis-ci.org/toutpt/module-to-cdn.svg?branch=jmfrancois/chore/fork)](https://travis-ci.org/toutpt/module-to-cdn)
-[![NPM][npm-icon] ][npm-url]
-[![dependencies][dependencies-image] ][dependencies-url]
-[![devdependencies][devdependencies-image] ][devdependencies-url]
-
-[npm-icon]: https://img.shields.io/npm/v/@talend/module-to-cdn.svg
-[npm-url]: https://npmjs.org/package/@talend/module-to-cdn
-[travis-ci-image]: https://travis-ci.org/toutpt/module-to-cdn.svg?branch=jmfrancois/chore/fork
-[travis-ci-url]: https://travis-ci.org/toutpt/module-to-cdn
-[dependencies-image]: https://david-dm.org/toutpt/module-to-cdn/status.svg
-[dependencies-url]: https://david-dm.org/toutpt/module-to-cdn
-[devdependencies-image]: https://david-dm.org/toutpt/module-to-cdn/dev-status.svg
-[devdependencies-url]: https://david-dm.org/toutpt/module-to-cdn?type=dev
-
-
> Get cdn config from npm module name
## Fork
This module is fork of module-to-cdn from [Thomas Sileghem](http://mastilver.com).
-Because unpkg is great for free usage [but not for production usage](https://kentcdodds.com/blog/unpkg-an-open-source-cdn-for-npm) we decided to made some changes to go forward.
-
-After the following [big PR]() on the repository and an email to the author we have got no news from the author as all other PRs. So we decided to fork.
+Because unpkg is great for free usage [but not for production usage](https://kentcdodds.com/blog/unpkg-an-open-source-cdn-for-npm) we decided to made some changes to going forward.
+After big PR on the repository and an email to the author we have got no news as all other PRs. So we decided to fork.
## Install
@@ -32,7 +16,6 @@ After the following [big PR]() on the repository and an email to the author we
$ npm install --save @talend/module-to-cdn
```
-
## Usage
```js
@@ -50,6 +33,7 @@ moduleToCdn('react', '15.3.0');
*/
```
+Note if the package comes with css you will have them under `styleUrl` and `stylePath` properties
## API
@@ -79,12 +63,12 @@ Default: `development`
### Result
-* `name`: name of the module
-* `var`: name of the global variable exposing the module
-* `url`: url where the module is available
-* `version`: the version asked for
-* `path`: relative path of the umd file in the distributed package
-* `local`: absolute path on the current system to the file
+- `name`: name of the module
+- `var`: name of the global variable exposing the module
+- `url`: url where the module is available
+- `version`: the version asked for
+- `path`: relative path of the umd file in the distributed package
+- `local`: absolute path on the current system to the file
## Configuration of the resolver
@@ -118,9 +102,9 @@ moduleToCdn.add({
'@talend/my-private-module': {
var: 'TalendMyPrivateModule',
versions: {
- '>= 0.0.0' : {
- 'development': '/dist/build.js',
- 'production': '/dist/build.min.js',
+ '>= 0.0.0': {
+ development: '/dist/build.js',
+ production: '/dist/build.min.js'
}
}
}
@@ -141,17 +125,45 @@ LIMIT=";ag-grid;ag-grid-community;ag-grid-enterprise;" ava -v
## Excluded modules
+- hoist-non-react-statics: the umd build contains JS errors (process.env.NODE and require) on every versions.
+
+## style-versions
-* hoist-non-react-statics: the umd build contains JS errors (process.env.NODE and require) on every versions.
+For the sake of simplicity, range must match between js and styles.
+Here is the line in the code that read it:
+
+```javascript
+const styleConfig = moduleConf['style-versions'] && moduleConf['style-versions'][range];
+```
+
+So take it as a constraint, for example:
+
+```json
+ "@talend/design-tokens": {
+ "var": "TalendDesignTokens",
+ "versions": {
+ "> 2.6.0": {
+ "development": "/dist/TalendDesignTokens.js",
+ "production": "/dist/TalendDesignTokens.min.js"
+ }
+ },
+ "style-versions": {
+ "> 2.6.0": {
+ "development": "/dist/TalendDesignTokens.css",
+ "production": "/dist/TalendDesignTokens.min.css"
+ }
+ }
+ }
+```
## Contribute
To add your modules you have to
-* checkout this package on github
-* install and run the tests (it will load the cache for the tests)
-* add your module in the module.json file
-* ensure everytime the provided umd path exists and is valid.
+- checkout this package on github
+- install and run the tests (it will load the cache for the tests)
+- add your module in the module.json file
+- ensure everytime the provided umd path exists and is valid.
Example of not valid umd: https://unpkg.com/browse/react-popper@1.3.7/dist/index.umd.js
createContext,deepEqual dependencies are always null.
diff --git a/fork/module-to-cdn/jsonschema.json b/fork/module-to-cdn/jsonschema.json
new file mode 100644
index 0000000000..9fe1515003
--- /dev/null
+++ b/fork/module-to-cdn/jsonschema.json
@@ -0,0 +1,34 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://github.com/Talend/ui/modules.schema.json",
+ "title": "cdn modules schema",
+ "description": "Help you edit the file in vscode",
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "object",
+
+ "properties": {
+ "var": {
+ "type": "string"
+ },
+ "versions": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "object",
+ "properties": {
+ "development": {
+ "type": "string"
+ },
+ "production": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/fork/module-to-cdn/modules.json b/fork/module-to-cdn/modules.json
index e143a31c60..0f38e9c82d 100644
--- a/fork/module-to-cdn/modules.json
+++ b/fork/module-to-cdn/modules.json
@@ -206,9 +206,13 @@
"ag-grid-react": {
"var": "AgGridReact",
"versions": {
- ">= 23.1.0": {
+ ">= 23.1.0 < 32.0.0": {
"development": "/bundles/ag-grid-react.min.js",
"production": "/bundles/ag-grid-react.min.js"
+ },
+ ">= 32.0.0": {
+ "development": "/dist/umd/@ag-grid-community/react.js",
+ "production": "/dist/umd/@ag-grid-community/react.min.js"
}
}
},
diff --git a/fork/module-to-cdn/package.json b/fork/module-to-cdn/package.json
index aedb349483..c6c468febf 100644
--- a/fork/module-to-cdn/package.json
+++ b/fork/module-to-cdn/package.json
@@ -1,6 +1,6 @@
{
"name": "@talend/module-to-cdn",
- "version": "9.9.1",
+ "version": "9.11.1",
"description": "Get cdn config from npm module name",
"license": "MIT",
"repository": "https://github.com/Talend/ui",
@@ -20,7 +20,7 @@
"scripts": {
"test": "jest index.test.js",
"test:cron": "jest modules.test.js",
- "lint": "talend-scripts lint ./"
+ "lint": "eslint ./"
},
"files": [
"index.js",
@@ -35,9 +35,11 @@
"dependencies": {
"execa": "^4.1.0",
"mkdirp": "^1.0.4",
- "semver": "^7.5.4"
+ "semver": "^7.6.3"
},
"devDependencies": {
+ "@babel/eslint-parser": "^7.25.1",
+ "eslint": "^8.57.1",
"jest": "^29.7.0"
},
"publishConfig": {
diff --git a/fork/react-bootstrap/.babelrc b/fork/react-bootstrap/.babelrc
index 1d6655372a..abd323e11d 100644
--- a/fork/react-bootstrap/.babelrc
+++ b/fork/react-bootstrap/.babelrc
@@ -1,3 +1,3 @@
{
- "extends": "@talend/scripts-config-babel/.babelrc.json"
+ "extends": "@talend/scripts-config-babel/babel.config.js"
}
diff --git a/fork/react-bootstrap/CHANGELOG.md b/fork/react-bootstrap/CHANGELOG.md
index f983154099..58e3019d5e 100644
--- a/fork/react-bootstrap/CHANGELOG.md
+++ b/fork/react-bootstrap/CHANGELOG.md
@@ -1,5 +1,75 @@
## [v0.32.5]
+## 3.0.2
+
+### Patch Changes
+
+- f321a0d: Remove unused tsconfig.esm.json (initially added to use TSC but we stay with babel at the end)
+
+## 3.0.1
+
+### Patch Changes
+
+- b8f7672: fix module not found error for @talend/react-bootstrap and @talend/icons
+
+## 3.0.0
+
+### Major Changes
+
+- c3750a1: chore: upgrade dependencies
+
+ Major upgrade for all packages that have a peerDependency on react or react-dom. Those packages now ask for react@18 and react-dom@18.
+
+## 2.3.0
+
+### Minor Changes
+
+- 3bd16fc: Add support to ESM
+
+## 2.2.3
+
+### Patch Changes
+
+- d332ab1: Fix imports and typing
+
+## 2.2.2
+
+### Patch Changes
+
+- 1abc22f: chore: upgrade dependencies
+
+## 2.2.1
+
+### Patch Changes
+
+- c468f2f: chore: upgrade dependencies
+- 6c2df2b: Upgrade dependencies using talend-scripts upgrade:deps
+
+## 2.2.0
+
+### Minor Changes
+
+- 24bcb177f: Remove usage of lib keyCode
+
+## 2.1.1
+
+### Patch Changes
+
+- f14ebbe23: Fix lint issue
+
+## 2.1.0
+
+### Minor Changes
+
+- 3f9c8a7bb: update babel config to use babel.config.js instead of .babelrc.json
+ add missing deps
+
+## 2.0.0
+
+### Major Changes
+
+- 96d688489: React: Upgrade to react 18 and @types/react 18
+
## 1.35.2
### Patch Changes
diff --git a/fork/react-bootstrap/package.json b/fork/react-bootstrap/package.json
index 5185d8f481..489f7033af 100644
--- a/fork/react-bootstrap/package.json
+++ b/fork/react-bootstrap/package.json
@@ -1,6 +1,6 @@
{
"name": "@talend/react-bootstrap",
- "version": "1.35.2",
+ "version": "3.0.2",
"description": "Bootstrap 3 components built with React",
"repository": {
"type": "git",
@@ -9,9 +9,17 @@
"homepage": "https://react-bootstrap.github.io/",
"sideEffects": false,
"main": "lib/index.js",
+ "module": "./lib-esm/index.js",
+ "exports": {
+ ".": {
+ "import": "./lib-esm/index.js",
+ "require": "./lib/index.js"
+ }
+ },
"scripts": {
"build:dev": "talend-scripts build --umd --dev",
"build:prod": "talend-scripts build --umd --prod",
+ "build:lib:esm": "talend-scripts build --esm",
"pre-release": "yarn build:dev && yarn build:prod",
"build:lib": "talend-scripts build",
"lint": "talend-scripts lint",
@@ -19,12 +27,10 @@
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
- "prettier": {
- "singleQuote": true
- },
"files": [
"CHANGELOG.md",
"lib",
+ "lib-esm",
"dist",
"es"
],
@@ -37,30 +43,33 @@
"author": "Stephen J. Collings ",
"license": "MIT",
"peerDependencies": {
- "react": ">=16.3.0",
- "react-dom": ">=16.3.0"
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1"
},
"devDependencies": {
- "@talend/scripts-core": "^15.0.0",
- "@talend/scripts-config-react-webpack": "^16.0.0",
- "@testing-library/jest-dom": "^5.17.0",
- "@testing-library/react": "^12.1.5",
- "@testing-library/user-event": "^13.5.0",
- "chai": "^4.3.8",
+ "@talend/eslint-config": "^13.2.1",
+ "@talend/eslint-plugin": "^1.3.1",
+ "@talend/scripts-config-typescript": "^11.3.0",
+ "@talend/scripts-core": "^16.5.1",
+ "@talend/scripts-config-babel": "^13.5.0",
+ "@talend/scripts-config-react-webpack": "^16.8.1",
+ "@testing-library/jest-dom": "^6.5.0",
+ "@testing-library/react": "^14.3.1",
+ "@testing-library/user-event": "^14.5.2",
+ "chai": "^4.5.0",
"chalk": "^2.4.2",
"create-react-class": "^15.7.0",
"cross-env": "^7.0.3",
"lodash": "^4.17.21",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "react-test-renderer": "^18.2.0",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "react-test-renderer": "^18.3.1",
"sinon": "^11.1.2"
},
"dependencies": {
- "classnames": "^2.3.2",
+ "classnames": "^2.5.1",
"dom-helpers": "^3.4.0",
"invariant": "^2.2.4",
- "keycode": "^2.2.1",
"prop-types": "^15.8.1",
"prop-types-extra": "^1.1.1",
"react-overlays": "^0.9.3",
diff --git a/fork/react-bootstrap/server/ModalSpec.js b/fork/react-bootstrap/server/ModalSpec.js
index b6db32f2e4..3d288929f4 100644
--- a/fork/react-bootstrap/server/ModalSpec.js
+++ b/fork/react-bootstrap/server/ModalSpec.js
@@ -1,19 +1,20 @@
+// eslint-disable-next-line import/no-extraneous-dependencies
import { assert } from 'chai';
-import React from 'react';
+
import ReactDOMServer from 'react-dom/server';
-import Modal from '../../src/Modal';
+import Modal from '../src/Modal';
describe('Modal', () => {
it('Should be rendered on the server side', () => {
- let noOp = () => {};
+ const noOp = () => {};
assert.doesNotThrow(() =>
ReactDOMServer.renderToString(
Message
-
- )
+ ,
+ ),
);
});
});
diff --git a/fork/react-bootstrap/src/Alert.test.js b/fork/react-bootstrap/src/Alert.test.js
index 30acd97cc4..33b96a18fa 100644
--- a/fork/react-bootstrap/src/Alert.test.js
+++ b/fork/react-bootstrap/src/Alert.test.js
@@ -1,92 +1,95 @@
-import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Alert from './Alert';
describe('', () => {
- it('Should output a alert with message', () => {
- // when
- render(
-
- Message
-
- );
-
- // then
- expect(screen.getByRole('alert')).toBeInTheDocument();
- expect(screen.getByText('Message')).toBeInTheDocument();
- });
-
- it('Should have bsType by default', () => {
- // when
- render(
-
- Message
-
- );
-
- // then
- expect(screen.getByRole('alert')).toHaveClass('alert-info');
- });
-
- it('Should have dismissable style with onDismiss', () => {
- // when
- render(
-
- Message
-
- );
-
- // then
- expect(screen.getByRole('alert')).toHaveClass('alert-dismissable');
- });
-
- it('Should call onDismiss callback on dismiss click', () => {
- // given
- const onDismiss = jest.fn();
- render(
-
- Message
-
- );
- expect(onDismiss).not.toBeCalled();
-
- // when
- userEvent.click(screen.getByRole('button', { name: 'close' }));
-
- // then
- expect(onDismiss).toBeCalled();
- });
-
- it('Should have a default bsStyle class', () => {
- // when
- render(Message);
-
- // then
- expect(screen.getByRole('alert')).toHaveClass('alert-info');
- });
-
- it('Should have use bsStyle class', () => {
- // when
- render(Message);
-
- // then
- expect(screen.getByRole('alert')).toHaveClass('alert-danger');
- });
-
- describe('Web Accessibility', () => {
- it('Should call onDismiss callback when the sr-only dismiss link is activated', () => {
- // given
- const onDismiss = jest.fn();
- render(Message);
- expect(onDismiss).not.toBeCalled();
-
- // when
- userEvent.click(screen.getByRole('button', { name: 'Close alert' }));
-
- // then
- expect(onDismiss).toBeCalled();
- });
- });
+ it('Should output a alert with message', () => {
+ // when
+ render(
+
+ Message
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('alert')).toBeInTheDocument();
+ expect(screen.getByText('Message')).toBeInTheDocument();
+ });
+
+ it('Should have bsType by default', () => {
+ // when
+ render(
+
+ Message
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('alert')).toHaveClass('alert-info');
+ });
+
+ it('Should have dismissable style with onDismiss', () => {
+ // when
+ render(
+
+ Message
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('alert')).toHaveClass('alert-dismissable');
+ });
+
+ it('Should call onDismiss callback on dismiss click', async () => {
+ const user = userEvent.setup();
+
+ // given
+ const onDismiss = jest.fn();
+ render(
+
+ Message
+ ,
+ );
+ expect(onDismiss).not.toHaveBeenCalled();
+
+ // when
+ await user.click(screen.getByRole('button', { name: 'close' }));
+
+ // then
+ expect(onDismiss).toHaveBeenCalled();
+ });
+
+ it('Should have a default bsStyle class', () => {
+ // when
+ render(Message);
+
+ // then
+ expect(screen.getByRole('alert')).toHaveClass('alert-info');
+ });
+
+ it('Should have use bsStyle class', () => {
+ // when
+ render(Message);
+
+ // then
+ expect(screen.getByRole('alert')).toHaveClass('alert-danger');
+ });
+
+ describe('Web Accessibility', () => {
+ it('Should call onDismiss callback when the sr-only dismiss link is activated', async () => {
+ const user = userEvent.setup();
+
+ // given
+ const onDismiss = jest.fn();
+ render(Message);
+ expect(onDismiss).not.toHaveBeenCalled();
+
+ // when
+ await user.click(screen.getByRole('button', { name: 'Close alert' }));
+
+ // then
+ expect(onDismiss).toHaveBeenCalled();
+ });
+ });
});
diff --git a/fork/react-bootstrap/src/BreadcrumbItem.test.js b/fork/react-bootstrap/src/BreadcrumbItem.test.js
index dd668ba9cc..9766108e9a 100644
--- a/fork/react-bootstrap/src/BreadcrumbItem.test.js
+++ b/fork/react-bootstrap/src/BreadcrumbItem.test.js
@@ -1,144 +1,135 @@
-import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Breadcrumb from './Breadcrumb';
describe('', () => {
- it('Should render `a` as inner element when is not active', () => {
- // when
- render(Crumb);
-
- // then
- const link = screen.getByRole('button');
- expect(link).toBeInTheDocument();
- expect(link.tagName).toBe('A');
- expect(link).not.toHaveClass('active');
- });
-
- it('Should render `span.active` with `active` attribute set.', () => {
- // when
- render(Active Crumb);
-
- // then
- const item = screen.getByRole('listitem');
- expect(item).toBeInTheDocument();
- expect(item).toHaveClass('active');
- });
-
- it('Should render `span.active` when active and has href', () => {
- // when
- render(
-
- Active Crumb
-
- );
-
- // then
- const item = screen.getByRole('listitem');
- expect(item).toBeInTheDocument();
- expect(item).toHaveClass('active');
- expect(screen.queryByRole('button')).not.toBeInTheDocument();
- });
-
- it('Should add custom classes onto `li` wrapper element', () => {
- // when
- render(
-
- Active Crumb
-
- );
-
- // then
- const item = screen.getByRole('listitem');
- expect(item).toHaveClass('custom-one');
- expect(item).toHaveClass('custom-two');
- });
-
- it('Should spread additional props onto inner element', () => {
- // given
- const handleClick = jest.fn();
- render(
-
- Crumb
-
- );
-
- // when
- userEvent.click(screen.getByRole('button'));
-
- // then
- expect(handleClick).toHaveBeenCalled();
- });
-
- it('Should apply id onto the anchor', () => {
- // when
- render(
-
- Crumb
-
- );
-
- // then
- expect(screen.getByRole('button')).toHaveAttribute('id', 'test-link-id');
- });
-
- it('Should apply `href` property onto `a` inner element', () => {
- // when
- render(
-
- Crumb
-
- );
-
- // then
- expect(screen.getByRole('link')).toHaveAttribute(
- 'href',
- 'http://getbootstrap.com/components/#breadcrumbs'
- );
- });
-
- it('Should apply `title` property onto `a` inner element', () => {
- // when
- render(
-
- Crumb
-
- );
-
- // then
- expect(screen.getByRole('link')).toHaveAttribute('title', 'test-title');
- });
-
- it('Should not apply properties for inner `anchor` onto `li` wrapper element', () => {
- // when
- render(
-
- Crumb
-
- );
-
- // then
- const listitem = screen.getByRole('listitem');
- expect(listitem).not.toHaveAttribute('title');
- expect(listitem).not.toHaveAttribute('href');
- });
-
- it('Should set `target` attribute on `anchor`', () => {
- // when
- render(
-
- Crumb
-
- );
-
- // then
- expect(screen.getByRole('link')).toHaveAttribute('target', '_blank');
- });
+ it('Should render `a` as inner element when is not active', () => {
+ // when
+ render(Crumb);
+
+ // then
+ const link = screen.getByRole('button');
+ expect(link).toBeInTheDocument();
+ expect(link.tagName).toBe('A');
+ expect(link).not.toHaveClass('active');
+ });
+
+ it('Should render `span.active` with `active` attribute set.', () => {
+ // when
+ render(Active Crumb);
+
+ // then
+ const item = screen.getByRole('listitem');
+ expect(item).toBeInTheDocument();
+ expect(item).toHaveClass('active');
+ });
+
+ it('Should render `span.active` when active and has href', () => {
+ // when
+ render(
+
+ Active Crumb
+ ,
+ );
+
+ // then
+ const item = screen.getByRole('listitem');
+ expect(item).toBeInTheDocument();
+ expect(item).toHaveClass('active');
+ expect(screen.queryByRole('button')).not.toBeInTheDocument();
+ });
+
+ it('Should add custom classes onto `li` wrapper element', () => {
+ // when
+ render(Active Crumb);
+
+ // then
+ const item = screen.getByRole('listitem');
+ expect(item).toHaveClass('custom-one');
+ expect(item).toHaveClass('custom-two');
+ });
+
+ it('Should spread additional props onto inner element', async () => {
+ const user = userEvent.setup();
+
+ // given
+ const handleClick = jest.fn();
+ render(
+
+ Crumb
+ ,
+ );
+
+ // when
+ await user.click(screen.getByRole('button'));
+
+ // then
+ expect(handleClick).toHaveBeenCalled();
+ });
+
+ it('Should apply id onto the anchor', () => {
+ // when
+ render(
+
+ Crumb
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('button')).toHaveAttribute('id', 'test-link-id');
+ });
+
+ it('Should apply `href` property onto `a` inner element', () => {
+ // when
+ render(
+
+ Crumb
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('link')).toHaveAttribute(
+ 'href',
+ 'http://getbootstrap.com/components/#breadcrumbs',
+ );
+ });
+
+ it('Should apply `title` property onto `a` inner element', () => {
+ // when
+ render(
+
+ Crumb
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('link')).toHaveAttribute('title', 'test-title');
+ });
+
+ it('Should not apply properties for inner `anchor` onto `li` wrapper element', () => {
+ // when
+ render(
+
+ Crumb
+ ,
+ );
+
+ // then
+ const listitem = screen.getByRole('listitem');
+ expect(listitem).not.toHaveAttribute('title');
+ expect(listitem).not.toHaveAttribute('href');
+ });
+
+ it('Should set `target` attribute on `anchor`', () => {
+ // when
+ render(
+
+ Crumb
+ ,
+ );
+
+ // then
+ expect(screen.getByRole('link')).toHaveAttribute('target', '_blank');
+ });
});
diff --git a/fork/react-bootstrap/src/Button.test.js b/fork/react-bootstrap/src/Button.test.js
index b5d6734745..df9107f17d 100644
--- a/fork/react-bootstrap/src/Button.test.js
+++ b/fork/react-bootstrap/src/Button.test.js
@@ -1,119 +1,120 @@
-import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Button from './Button';
describe('