diff --git a/.editorconfig b/.editorconfig index f2b1dca75..941fc60eb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -873,7 +873,7 @@ ij_java_for_statement_wrap = normal ij_java_generate_final_locals = false ij_java_generate_final_parameters = false ij_java_if_brace_force = always -ij_java_imports_layout = java.**,|,javax.**,jakarta.**,org.**,io.**,com.**,|,*,|,$* +ij_java_imports_layout = java.**,javax.**,jakarta.**,|,org.**,io.**,com.**,*,|,$* ij_java_indent_case_from_switch = true ij_java_insert_inner_class_imports = false ij_java_insert_override_annotation = true diff --git a/.github/workflows/apidocs.yml b/.github/workflows/apidocs.yml index c1148491b..ec9414cd5 100644 --- a/.github/workflows/apidocs.yml +++ b/.github/workflows/apidocs.yml @@ -3,6 +3,9 @@ name: Publish API Documentation on: workflow_dispatch: +permissions: + contents: write + jobs: publish-apidocs: name: Publish API Documentation @@ -10,21 +13,31 @@ jobs: env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: ts-graphviz/setup-graphviz@v2 + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-java@v5 with: - java-version: 21 + java-version: 25 distribution: temurin cache: maven + - run: $MVN install + working-directory: bom + - run: $MVN install -Dquickly + - run: $MVN depgraph:aggregate - run: | - $MVN -D quickly clean install - $MVN -P snippets javadoc:aggregate - $MVN -P snippets javadoc:javadoc - $MVN -P snippets org.apache.maven.plugins:maven-antrun-plugin:run@copy-apidocs - - uses: JamesIves/github-pages-deploy-action@v4.6.9 + $MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-doc-files + $MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-sources + $MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-demos + $MVN javadoc:javadoc + working-directory: apidoc + - uses: JamesIves/github-pages-deploy-action@v4.8.0 with: token: ${{ secrets.PUBLISH_CONTENT }} repository-name: patternfly-java/apidocs - branch: main - folder: ./target/reports/apidocs + branch: gh-pages + folder: ./apidoc/target/reports/apidocs clean: true + force: true + single-commit: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89f92bc81..909e28d62 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,33 +5,67 @@ on: tags: - 'v*' +permissions: + contents: write + jobs: - deploy: + deploy-bom: + name: Deploy BOM + runs-on: ubuntu-latest + env: + MVN: ./mvnw --show-version --batch-mode --no-transfer-progress + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 + with: + java-version: 25 + distribution: temurin + cache: maven + - run: $MVN package + working-directory: bom + - uses: actions/setup-java@v5 + with: # running setup-java again overwrites the settings.xml + java-version: 25 + distribution: temurin + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - run: $MVN deploy -P release + working-directory: bom + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + deploy-patternfly: name: Deploy Maven Artifacts runs-on: ubuntu-latest + needs: deploy-bom env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 with: - java-version: 17 + java-version: 25 distribution: temurin cache: maven - run: $MVN package - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: # running setup-java again overwrites the settings.xml - java-version: 17 + java-version: 25 distribution: temurin - server-id: ossrh - server-username: OSSRH_USERNAME - server-password: OSSRH_PASSWORD + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_PASSWORD gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - run: $MVN deploy -P release env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} publish-apidocs: @@ -40,62 +74,77 @@ jobs: env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: ts-graphviz/setup-graphviz@v2 + - uses: actions/checkout@v6 with: - java-version: 21 + persist-credentials: false + - uses: actions/setup-java@v5 + with: + java-version: 25 distribution: temurin cache: maven + - run: $MVN install + working-directory: bom + - run: $MVN install -Dquickly + - run: $MVN depgraph:aggregate - run: | - $MVN -D quickly clean install - $MVN -P snippets javadoc:aggregate - $MVN -P snippets javadoc:javadoc - $MVN -P snippets org.apache.maven.plugins:maven-antrun-plugin:run@copy-apidocs - - uses: JamesIves/github-pages-deploy-action@v4.6.9 + $MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-doc-files + $MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-sources + $MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-demos + $MVN javadoc:javadoc + working-directory: apidoc + - uses: JamesIves/github-pages-deploy-action@v4.8.0 with: token: ${{ secrets.PUBLISH_CONTENT }} repository-name: patternfly-java/apidocs - branch: main - folder: ./target/site/apidocs + branch: gh-pages + folder: ./apidoc/target/reports/apidocs clean: true + force: true + single-commit: true publish-showcase: name: Publish Showcase runs-on: ubuntu-latest + needs: deploy-patternfly env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-java@v5 with: - java-version: 17 + java-version: 25 distribution: temurin cache: maven - - run: $MVN --projects org.patternfly:patternfly-java-showcase-j2cl --also-make -P showcase,prod package - - uses: JamesIves/github-pages-deploy-action@v4.6.9 + - run: $MVN --projects org.patternfly:patternfly-java-showcase --also-make -P showcase,prod package + - uses: JamesIves/github-pages-deploy-action@v4.8.0 with: token: ${{ secrets.PUBLISH_CONTENT }} repository-name: patternfly-java/patternfly-java.github.io - branch: main - folder: ./showcase/j2cl/target/showcase + branch: gh-pages + folder: ./showcase/target/showcase clean: true + force: true + single-commit: true release: name: Create GitHub Release - needs: deploy runs-on: ubuntu-latest + needs: deploy-patternfly steps: - name: Get Version id: get-version uses: battila7/get-version-action@v2.3.0 - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Read Changelog id: read-changelog uses: mindsers/changelog-reader-action@v2 with: path: ./CHANGELOG.md version: ${{ steps.get-version.outputs.version-without-v }} - - uses: softprops/action-gh-release@v2.1.0 + - uses: softprops/action-gh-release@v2.5.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/showcase.yml b/.github/workflows/showcase.yml index ed3f867bd..f6009eba1 100644 --- a/.github/workflows/showcase.yml +++ b/.github/workflows/showcase.yml @@ -3,6 +3,9 @@ name: Publish Showcase on: workflow_dispatch: +permissions: + contents: write + jobs: publish-showcase: name: Publish Showcase @@ -10,17 +13,23 @@ jobs: env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-java@v5 with: - java-version: 17 + java-version: 25 distribution: temurin cache: maven - - run: $MVN --projects org.patternfly:patternfly-java-showcase-j2cl --also-make -P showcase,prod package - - uses: JamesIves/github-pages-deploy-action@v4.6.9 + - run: $MVN install + working-directory: bom + - run: $MVN --projects org.patternfly:patternfly-java-showcase --also-make -P showcase,prod package + - uses: JamesIves/github-pages-deploy-action@v4.8.0 with: token: ${{ secrets.PUBLISH_CONTENT }} repository-name: patternfly-java/patternfly-java.github.io - branch: main - folder: ./showcase/j2cl/target/showcase + branch: gh-pages + folder: ./showcase/target/showcase clean: true + force: true + single-commit: true diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 82b44d89a..ea5a44c99 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -6,22 +6,44 @@ on: types: [completed] jobs: + snapshot-bom: + name: Publish BOM + runs-on: ubuntu-latest + env: + MVN: ./mvnw --show-version --batch-mode --no-transfer-progress + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 + with: + java-version: 25 + distribution: temurin + cache: maven + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_PASSWORD + - run: $MVN deploy -DskipTests + working-directory: bom + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} + snapshot: name: Publish Snapshot runs-on: ubuntu-latest + needs: snapshot-bom env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 with: - java-version: 17 + java-version: 25 distribution: temurin cache: maven - server-id: ossrh - server-username: OSSRH_USERNAME - server-password: OSSRH_PASSWORD + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_PASSWORD - run: $MVN deploy -DskipTests env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index deb5bf88b..a4a3f9edb 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -13,10 +13,12 @@ jobs: env: MVN: ./mvnw --show-version --batch-mode --no-transfer-progress steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 with: - java-version: 17 + java-version: 25 distribution: temurin cache: maven + - run: $MVN install + working-directory: bom - run: $MVN verify diff --git a/.gitignore b/.gitignore index 63668d28b..4f821aaf7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .classpath .DS_Store .idea +.jbang .parcel-cache .project .settings diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 6d3a56651..d58dfb70b 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar +wrapperVersion=3.3.2 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/CHANGELOG.md b/CHANGELOG.md index edef2cd4e..f47004475 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,200 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [0.4.17] - 2026-02-12 + +### Added + +- Add [`Ordered`](https://patternfly-java.github.io/apidocs/org/patternfly/component/Ordered.html) interface. + +## [0.4.16] - 2026-02-05 + +### Added + +- Add `WizardStep.customButtonName(WizardFooterButtons, String)` to define custom button names per step. + +## [0.4.15] - 2026-02-05 + +### Upgrades + +- Bump Elemento to 2.4.8 + +## [0.4.14] - 2026-02-05 + +> [!WARNING] +> Not an official release. Please don't use! + +## [0.4.13] - 2026-02-04 + +### Changed + +- `Wizard` no longer implements `Closeable` +- Add `Wizard.onCancel(ComponentHandler handler)` and `Wizard.onFinish(ComponentHandler handler)` + +### Fixed + +- Keep selection after call to `MenuList.reload()` +- Fix the disabled state of the wizard footer buttons + +## [0.4.12] - 2026-02-03 + +### Added + +- Add pie chart (#113) thanks @mskacelik + +### Fixed + +- Fix `TreeViewItem.reload()` + +### Upgrades + +- Bump Elemento to 2.4.7 + +## [0.4.11] - 2026-01-28 + +### Changed + +- Add an option to create items in single and multi-typeahead components. + +## [0.4.10] - 2026-01-20 + +### Added + +- Select component (#68) + +### Upgrades + +- Bump Elemento to 2.4.6 + +## [0.4.9] - 2026-01-20 + +### Added + +- Number input component (#73) thanks @mskacelik + +### Upgrades + +- Bump Elemento to 2.4.4 + +## [0.4.8] - 2026-01-19 + +> [!WARNING] +> Not an official release. Please don't use! + +## [0.4.7] - 2026-01-19 + > [!WARNING] -> This release upgrades to PatternFly 6 and introduces changes that might break existing code. +> Not an official release. Please don't use! + +## [0.4.6] - 2026-01-13 + +### Fixed + +- Fix API documentation + +## [0.4.5] - 2026-01-12 + +### Fixed + +- Fix drawer body components +- Fix API documentation + +## [0.4.4] - 2026-01-08 + +### Added + +- Wizard (#102) + +## [0.4.3] - 2025-12-17 + +### Added + +- Add `PredefinedIcon.predefinedIcon(String iconName)` + +## [0.4.2] - 2025-12-17 + +### Added + +- Bullet chart (#109) + +## [0.4.1] - 2025-12-15 + +### Fixed + +- Add missing externs for the custom chart element. + +## [0.4.0] - 2025-12-13 + +### Added + +- The first charts are here! πŸŽ‰ + - Donut chart (#110) + - Donut utilization chart (#111) +- Add typeahead support for single select component +- Add support for async item to the menu / menu list component +- Add `HasItems.onAdd(BiConsumer onAdd)` +- Add `HasItems.onRemove(BiConsumer onRemove)` + +### Fixed + +- ARIA attributes in the switch component +- CSS classes in `ToolbarFilterLabelGroup` +- Detached expandable section +- Warning in theme selector + +## [0.3.1] - 2025-11-20 + +### Added + +- Notification drawer (#72) +- Add `org.patternfly.component.ComponentRegistry` to register and lookup singleton-like components such as page, + masthead, or notification drawer by their component type and/or name +- Add `org.patternfly.componentgroup.theme.ThemeSelector` +- Add `org.patternfly.component.HasItems.removeItem(String identifier)` +- Add `SingleSelect.noDefaultSelectHandler()` to disable the default behavior of setting the menu toggle text to the + text of the selected menu item. + +### Fixed + +- Fix `Page.noSidebar()` +- Fix card title text + +### Upgrades + +- Bump Elemento to 2.4.1 +- Bump PatternFly to 6.4.0 +- Bump JUnit to 6.0.1 +- Bump J2CL Maven plugin to 0.23.6 + +## [0.3.0] - 2025-10-28 + +πŸŽ‰ [72% (62/86)](https://github.com/patternfly-java/patternfly-java/issues/125) of the components are now implemented πŸŽ‰ + +> [!IMPORTANT] +> This release upgrades to PatternFly 6 and introduces breaking changes! ### Added +- Notification badge component (#71) (thanks @mskacelik) +- Timestamp component (#95) (thanks @mskacelik) - Add new enum `org.patternfly.token.Token` that contains all [PatternFly token](https://www.patternfly.org/tokens/all-patternfly-tokens) as enum constants. +### Changed + +- PatternFly Java now requires Java 21 +- Migrate existing components to PatternFly 6 +- Refactor [common interfaces](https://github.com/patternfly-java/patternfly-java?tab=readme-ov-file#common-interfaces) +- Wrapped checkbox +- Migrate to publishing via the Maven Central Portal + ### Upgrades -- Bump Elemento to 1.7.0 +- Bump Elemento to 2.3.0 +- Bump PatternFly to 6.4.0 + +### Removed + +- Remove GWT showcase ## [0.2.11] - 2024-11-19 @@ -489,7 +673,28 @@ Stay tuned for more to come... - for dependency upgrades --> -[Unreleased]: https://github.com/patternfly-java/patternfly-java/compare/v0.2.11...HEAD +[Removed]: https://github.com/patternfly-java/patternfly-java/compare/v0.2.11...vRemoved +[Unreleased]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.17...HEAD +[0.4.17]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.16...v0.4.17 +[0.4.16]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.15...v0.4.16 +[0.4.15]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.14...v0.4.15 +[0.4.14]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.13...v0.4.14 +[0.4.13]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.12...v0.4.13 +[0.4.12]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.11...v0.4.12 +[0.4.11]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.10...v0.4.11 +[0.4.10]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.9...v0.4.10 +[0.4.9]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.8...v0.4.9 +[0.4.8]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.7...v0.4.8 +[0.4.7]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.6...v0.4.7 +[0.4.6]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.5...v0.4.6 +[0.4.5]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.4...v0.4.5 +[0.4.4]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.3...v0.4.4 +[0.4.3]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.2...v0.4.3 +[0.4.2]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/patternfly-java/patternfly-java/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/patternfly-java/patternfly-java/compare/v0.3.1...v0.4.0 +[0.3.1]: https://github.com/patternfly-java/patternfly-java/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/patternfly-java/patternfly-java/compare/v0.2.11...v0.3.0 [0.2.11]: https://github.com/patternfly-java/patternfly-java/compare/v0.2.10...v0.2.11 [0.2.10]: https://github.com/patternfly-java/patternfly-java/compare/v0.2.9...v0.2.10 [0.2.9]: https://github.com/patternfly-java/patternfly-java/compare/v0.2.8...v0.2.9 diff --git a/README.md b/README.md index 57b936c2e..f3bd22012 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,35 @@ -[![Verify Codebase](https://github.com/patternfly-java/patternfly-java/actions/workflows/verify.yml/badge.svg)](https://github.com/patternfly-java/patternfly-java/actions/workflows/verify.yml) [![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://patternfly-java.github.io/apidocs/) [![Maven Central](https://img.shields.io/maven-central/v/org.patternfly/patternfly-java-parent)](https://central.sonatype.com/search?q=g%3Aorg.patternfly) ![GWT3/J2CL compatible](https://img.shields.io/badge/GWT3/J2CL-compatible-brightgreen.svg) [![Chat on Gitter](https://badges.gitter.im/patternfly-java/patternfly-java.svg)](https://app.gitter.im/#/room/#pf4-java_core:gitter.im) +[![Verify Codebase](https://github.com/patternfly-java/patternfly-java/actions/workflows/verify.yml/badge.svg)](https://github.com/patternfly-java/patternfly-java/actions/workflows/verify.yml) [![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://patternfly-java.github.io/apidocs/) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/patternfly-java/patternfly-java) [![Maven Central](https://img.shields.io/maven-central/v/org.patternfly/patternfly-java-parent)](https://central.sonatype.com/search?q=g%3Aorg.patternfly) ![GWT3/J2CL compatible](https://img.shields.io/badge/GWT3/J2CL-compatible-brightgreen.svg) [![Chat on Gitter](https://badges.gitter.im/patternfly-java/patternfly-java.svg)](https://app.gitter.im/#/room/#pf4-java_core:gitter.im) -PatternFly Java is a πŸ’― Java implementation of [PatternFly](https://www.patternfly.org/) without any JavaScript dependencies. Its goal is to provide an easy-to-use, elegant, and efficient API to build complex web applications with PatternFly in Java. PatternFly Java integrates with and builds upon Elemento's [builder API](https://github.com/hal/elemento#builder-api). It works with both GWT and J2CL. The following code snippet gives a taste of what PatternFly Java looks like: +PatternFly Java is a πŸ’― Java implementation of [PatternFly](https://www.patternfly.org/) without any JavaScript dependencies (except for the [charts](#charts)). Its goal is to provide an easy-to-use, elegant, and efficient API to build complex web applications with PatternFly in Java. PatternFly Java integrates with and builds upon Elemento's [builder API](https://github.com/hal/elemento#builder-api). It works with both GWT and J2CL. The following code snippet gives a taste of what PatternFly Java looks like: ```java body().add(page() .addSkipToContent(skipToContent("main-id")) .addMasthead(masthead() - .addToggle(mastheadToggle()) - .addBrand(brand("/assets/your-logo.svg"), "/home")) - .addSidebar(sidebar() - .addBody(sidebarBody() + .addMain(mastheadMain() + .addToggle(mastheadToggle()) + .addBrand(mastheadBrand() + .addLogo(mastheadLogo("/")))) + .addContent(mastheadContent() + .addToolbar(toolbar()))) + .addSidebar(pageSidebar() + .addBody(pageSidebarBody() .addNavigation(navigation(flat) .addItem(navigationItem("get-started", "Get started", "/get-started")) .addItem(navigationItem("get-involved", "Get involved", "/get-involved"))))) .addMain(pageMain("main-id") - .addSection(pageMainSection() - .light() - .add(textContent() + .addSection(pageSection() + .add(content() .add(title(1, "PatternFly - Java")) .add(p() .add(a("https://github.com/patternfly-java/patternfly-java", "_blank") - .textContent("PatternFly Java")) + .text("PatternFly Java")) .add(" is a πŸ’― Java implementation of ") .add(a("https://www.patternfly.org/", "_blank") - .textContent("PatternFly")) + .text("PatternFly")) .add(" without any JavaScript dependencies based on GWT/J2CL and ") .add(a("https://github.com/hal/elemento", "_blank") - .textContent("Elemento")) + .text("Elemento")) .add(".")))))); ``` @@ -42,7 +45,7 @@ PatternFly Java is available on [Maven Central](https://central.sonatype.com/sea org.patternfly patternfly-java-bom - 0.2.11 + 0.4.17 pom import @@ -79,33 +82,51 @@ depending on your stack. If you're using GWT, inherit from `org.patternfly.Patte ## Dependencies -PatternFly Java has **no JavaScript** dependencies. Everything necessary is included in the code base for both GWT and J2CL. However, Patternfly Java does **not** come with **stylesheets**. You are expected to include or bundle the necessary stylesheets yourself. Take a look at the PatternFly [getting started guide](https://www.patternfly.org/get-started/develop#htmlcss) for more information. +PatternFly Java has **no JavaScript** dependencies (except for the charts – see below). Everything necessary is included in the code base for both GWT and J2CL. However, PatternFly Java does **not** come with **stylesheets**. You are expected to include or bundle the necessary stylesheets yourself. Take a look at the PatternFly [getting started guide](https://www.patternfly.org/get-started/develop#htmlcss) for more information. -You can also take a look at the code of the [showcase](https://github.com/patternfly-java/patternfly-java/tree/main/showcase#readme) for [GWT](https://github.com/patternfly-java/patternfly-java/tree/main/showcase/gwt) and [J2CL](https://github.com/patternfly-java/patternfly-java/tree/main/showcase/j2cl) to see how to set up and use PatternFly Java. +You can also take a look at the code of the [showcase](https://github.com/patternfly-java/patternfly-java/tree/main/showcase#readme) to see how to set up and use PatternFly Java. + +## Charts + +To use charts, you need to install the [`@patternfly-java/charts`](https://www.npmjs.com/package/@patternfly-java/charts) NPM package. This package wraps the supported PatternFly React Chart components as web components. + +Install the package using npm: + +``` +npm install @patternfly-java/charts +``` + +Import it in your JavaScript file: + +```js +import "@patternfly-java/charts/dist/charts"; +``` # Modules PatternFly Java consists of these Maven modules (a-z): -| Module | Description | -|----------------------------|----------------------------------| -| patternfly-java-bom | Bill of materials | -| patternfly-java-codeeditor | PatternFly codeeditor | -| patternfly-java-components | PatternFly components | -| patternfly-java-core | Core PatternFly Java classes | -| patternfly-java-finder | PatternFly Java Finder extension | -| patternfly-java-gwt | PatternFly Java for GWT | -| patternfly-java-icons | PatternFly Java icons | -| patternfly-java-j2cl | PatternFly Java for J2CL | -| patternfly-java-layouts | PatternFly Java layouts | - -Here’s the dependency graph of these maven modules and its external dependencies: +| Module | Description | +|----------------------------|-----------------------| +| patternfly-java-bom | Bill of materials | +| patternfly-java-charts | Charts | +| patternfly-java-codeeditor | Code editor extension | +| patternfly-java-components | Components | +| patternfly-java-core | Core classes | +| patternfly-java-finder | Finder extension | +| patternfly-java-gwt | GWT support | +| patternfly-java-icons | Icons | +| patternfly-java-j2cl | J2CL support | +| patternfly-java-layouts | Layouts | +| patternfly-java-tokens | Tokens | + +Here’s the dependency graph of these maven modules and their external dependencies: ![Dependency graph](./dependency-graph.png) # API design -PatternFly Java integrates with and builds upon Elemento's [builder API](https://github.com/hal/elemento#builder-api). Static factory methods are used to create the components, and public instances methods add child elements and modify the component. +PatternFly Java integrates with and builds upon Elemento's [builder API](https://github.com/hal/elemento#builder-api). Static factory methods are used to create the components, and public instance methods add child elements and modify the component. In general, the API for a component can be classified into these groups: @@ -128,7 +149,7 @@ Dropdown dropdown = dropdown() .addMenu(menu() .addContent(menuContent() .addList(menuList() - .addItem(actionMenuItem("item-0", "Action")))))) + .addItem(actionMenuItem("item-0", "Action"))))); ``` ## Builder / modifier methods @@ -154,7 +175,7 @@ Navigation navigation = navigation(flat) ## Event handlers -These methods add event handlers for various event to the component. They are usually named `on()`, accept an event handler, and return the component so that the method call can be chained with other methods. PatternFly Java defines some [common event handlers](https://patternfly-java.github.io/apidocs/org/patternfly/handler/package-summary.html) that are reused in all components. In some cases, components also use specific event handlers that only apply to the component. +These methods add event handlers for various events to the component. They are usually named `on()`, accept an event handler, and return the component so that the method call can be chained with other methods. PatternFly Java defines some [common event handlers](https://patternfly-java.github.io/apidocs/org/patternfly/handler/package-summary.html) that are reused in all components. In some cases, components also use specific event handlers that only apply to the component. ```java Drawer drawer = drawer().id("drw") @@ -163,13 +184,27 @@ Drawer drawer = drawer().id("drw") ## Public API / getters -These methods do something with the component or return a value, a property or some other kind of information. They return either `void` or a value/property. +These methods do something with the component or return a value, a property, or some other kind of information. They return either `void` or a value/property. ```java Switch switch_ = switch_("id", "name"); boolean value = switch_.value(); ``` +## Common interfaces + +Common behavior across all components is implemented by base classes and interfaces. All components extend from either [`BaseComponent`](https://patternfly-java.github.io/apidocs/org/patternfly/component/BaseComponent.html) or [`BaseComponentSVG`](https://patternfly-java.github.io/apidocs/org/patternfly/component/BaseComponentSVG.html). These base classes implement [interfaces from Elemento](https://hal-console.gitbook.io/elemento/builder-api#classes-and-interfaces) to manipulate the component element. + +In addition, components implement these interfaces to provide a common API: + +- [`Modifiers.*`](https://patternfly-java.github.io/apidocs/org/patternfly/style/Modifiers.html)
The sub-interfaces defined in this 'umbrella' interface are used to toggle one specific flag of a component. For example, `card().plain()` toggles the `plain` flag of the card component and is defined in the [`Modifiers.Plain`](https://patternfly-java.github.io/apidocs/org/patternfly/style/Modifiers.Plain.html) interface. Other components that also provide a `plain` flag implement the `Modifiers.Plain` interface as well. +- [`Closable`](https://patternfly-java.github.io/apidocs/org/patternfly/component/Closeable.html)
Implemented by components that provide some kind of popup that can be closed. The interface provides methods to register event handlers when the popup is closed. +- [`ComponentContext`](https://patternfly-java.github.io/apidocs/org/patternfly/core/ComponentContext.html), [`HasIdentifier`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasIdentifier.html), and [`HasItems`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasItems.html)
These interfaces are often implemented by components that have a parent-child relationship, like [`DataList`](https://patternfly-java.github.io/apidocs/org/patternfly/component/list/DataList.html) and [`DataLiistItem`](https://patternfly-java.github.io/apidocs/org/patternfly/component/list/DataListItem.html). [`HasItems`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasItems.html) is implemented by the parent component and provides methods to add and remove child items. [`ComponentContext`](https://patternfly-java.github.io/apidocs/org/patternfly/core/ComponentContext.html) and [`HasIdentifier`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasIdentifier.html) are implemented by the child components and provide methods to store and retrieve arbitrary values and get a unique identifier for the child item. +- [`ComponentIcon`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentIcon.html) and [`ComponentIconAndText`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentIconAndText.html)
These interfaces are implemented by components that provide text resp. an icon and a text. +- [`ComponentProgress`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentProgress.html)
Implemented by components that provide some kind of progress. +- [`Expandable`](https://patternfly-java.github.io/apidocs/org/patternfly/component/Expandable.html)
Implemented by components that provide some kind of expandable content. +- [`HasValue`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasValue.html) and [`HasObservableValue`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasObservableValue.html)
These interfaces are implemented by components that provide a value or an observable value. + --- The best way to experience the API is to take a look at the code snippets of the various components and layouts in the [showcase](https://patternfly-java.github.io/). @@ -219,14 +254,53 @@ DescriptionList dl = descriptionList() See also the PatternFly website about [icons](https://www.patternfly.org/design-foundations/icons#all-icons) to get an overview of the available icons. +# Tokens + +PatternFly Java comes with predefined enum constants for all PatternFly design [tokens](https://www.patternfly.org/tokens/about-tokens). They are defined in the enum class [`org.patternfly.token.Token`](https://patternfly-java.github.io/apidocs/org/patternfly/token/Token.html): + +```java +public enum Token { + + // enum constants omitted + ; + + /** The CSS custom property name starting with --pf-t */ + public final String name; + /** The default value for the custom property. */ + public final String value; + /** The property name wrapped in var(). */ + public final String var; + + Token(String name, String value, String var) { + this.name = name; + this.value = value; + this.var = var; + } +} +``` + +Here's an example of how to use the token definitions: + +```java +import elemental2.dom.HTMLElement; + +import static org.patternfly.token.Token.globalFontSizeSm; +import static org.patternfly.token.Token.globalTextColorDisabled; + +HTMLElement container = div() + .style("color", globalTextColorDisabled.var) + .style("font-size", globalFontSizeSm.var) + .element(); +``` + # PatternFly support PatternFly Java aims to provide almost complete support for all components, charts, extensions, and layouts. The following issues show how many components, charts, extensions, and layouts have already been implemented. -- [component progress](https://github.com/patternfly-java/patternfly-java/issues/125) -- [chart progress](https://github.com/patternfly-java/patternfly-java/issues/127) -- [extension progress](https://github.com/patternfly-java/patternfly-java/issues/126) -- [layout progress](https://github.com/patternfly-java/patternfly-java/issues/128) +- [components](https://github.com/patternfly-java/patternfly-java/issues/125) +- [charts](https://github.com/patternfly-java/patternfly-java/issues/127) +- [extensions](https://github.com/patternfly-java/patternfly-java/issues/126) +- [layouts](https://github.com/patternfly-java/patternfly-java/issues/128) # Get involved diff --git a/prod.sh b/apidoc.sh similarity index 69% rename from prod.sh rename to apidoc.sh index 77bf92e2b..b44b33d41 100755 --- a/prod.sh +++ b/apidoc.sh @@ -18,7 +18,9 @@ # -------------------------------------------------- # -# Starts the GWT/J2CL development mode for the showcase +# Generating aggregate javadoc with code snippets is PITA! +# As a workaround this script generates javadoc for each +# module and manually aggregates the documentation # # -------------------------------------------------- @@ -36,16 +38,12 @@ cd "${script_dir}" usage() { cat < + $(basename "${BASH_SOURCE[0]}") [FLAGS] FLAGS: - -c, --clean Adds the 'clean' goal -h, --help Prints help information -v, --version Prints version information --no-color Uses plain text output - -ARGS: - One of 'gwt' or 'j2cl' EOF exit } @@ -80,10 +78,8 @@ version() { } parse_params() { - CLEAN="" while :; do case "${1-}" in - -c | --clean) CLEAN=clean ;; -h | --help) usage ;; -v | --version) version ;; --no-color) NO_COLOR=1 ;; @@ -92,26 +88,20 @@ parse_params() { esac shift done - - ARGS=("$@") - [[ ${#ARGS[@]} -eq 1 ]] || die "Missing mode. Please use one of 'gwt' or 'j2cl'" - MODE=${ARGS[0]} - [[ "${MODE}" =~ ^(gwt|j2cl)$ ]] || die "Wrong mode. Please use one of 'gwt' or 'j2cl'" return 0 } parse_params "$@" setup_colors -if [[ "${MODE}" == "gwt" ]]; then - LABEL=GWT - DIRECTORY=showcase/gwt - ARTIFACT=patternfly-java-showcase-gwt -else - LABEL=J2CL - DIRECTORY=showcase/j2cl - ARTIFACT=patternfly-java-showcase-j2cl -fi -msg "Start ${YELLOW}${LABEL}${NOFORMAT} production mode..." -mvn --projects org.patternfly:${ARTIFACT} --also-make -P prod,showcase ${CLEAN} package -cd ${DIRECTORY} -mvn com.github.eirslett:frontend-maven-plugin:yarn@http-server + +./mvnw depgraph:aggregate +cd apidoc +./mvnw clean +./mvnw org.apache.maven.plugins:maven-antrun-plugin:run@copy-doc-files +./mvnw org.apache.maven.plugins:maven-antrun-plugin:run@copy-sources +./mvnw org.apache.maven.plugins:maven-antrun-plugin:run@copy-demos +./mvnw javadoc:javadoc +cd $script_dir + +msg "" +msg "API documentation generated in ${CYAN}apidoc/target/reports/apidocs${NOFORMAT}" diff --git a/apidoc/.gitignore b/apidoc/.gitignore new file mode 100644 index 000000000..bae9cbed3 --- /dev/null +++ b/apidoc/.gitignore @@ -0,0 +1,3 @@ +src/demo +src/main/java +src/main/javadoc/doc-files \ No newline at end of file diff --git a/apidoc/.mvn/wrapper/maven-wrapper.properties b/apidoc/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..8dea6c227 --- /dev/null +++ b/apidoc/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,3 @@ +wrapperVersion=3.3.4 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip diff --git a/apidoc/mvnw b/apidoc/mvnw new file mode 100755 index 000000000..bd8896bf2 --- /dev/null +++ b/apidoc/mvnw @@ -0,0 +1,295 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.4 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +scriptDir="$(dirname "$0")" +scriptName="$(basename "$0")" + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +actualDistributionDir="" + +# First try the expected directory name (for regular distributions) +if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then + if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then + actualDistributionDir="$distributionUrlNameMain" + fi +fi + +# If not found, search for any directory with the Maven executable (for snapshots) +if [ -z "$actualDistributionDir" ]; then + # enable globbing to iterate over items + set +f + for dir in "$TMP_DOWNLOAD_DIR"/*; do + if [ -d "$dir" ]; then + if [ -f "$dir/bin/$MVN_CMD" ]; then + actualDistributionDir="$(basename "$dir")" + break + fi + fi + done + set -f +fi + +if [ -z "$actualDistributionDir" ]; then + verbose "Contents of $TMP_DOWNLOAD_DIR:" + verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" + die "Could not find Maven distribution directory in extracted archive" +fi + +verbose "Found extracted Maven distribution directory: $actualDistributionDir" +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/apidoc/mvnw.cmd b/apidoc/mvnw.cmd new file mode 100644 index 000000000..92450f932 --- /dev/null +++ b/apidoc/mvnw.cmd @@ -0,0 +1,189 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.4 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' + +$MAVEN_M2_PATH = "$HOME/.m2" +if ($env:MAVEN_USER_HOME) { + $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" +} + +if (-not (Test-Path -Path $MAVEN_M2_PATH)) { + New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null +} + +$MAVEN_WRAPPER_DISTS = $null +if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { + $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" +} else { + $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" +} + +$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" +$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +$actualDistributionDir = "" + +# First try the expected directory name (for regular distributions) +$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" +$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" +if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { + $actualDistributionDir = $distributionUrlNameMain +} + +# If not found, search for any directory with the Maven executable (for snapshots) +if (!$actualDistributionDir) { + Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { + $testPath = Join-Path $_.FullName "bin/$MVN_CMD" + if (Test-Path -Path $testPath -PathType Leaf) { + $actualDistributionDir = $_.Name + } + } +} + +if (!$actualDistributionDir) { + Write-Error "Could not find Maven distribution directory in extracted archive" +} + +Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/apidoc/pom.xml b/apidoc/pom.xml new file mode 100644 index 000000000..5e9939c26 --- /dev/null +++ b/apidoc/pom.xml @@ -0,0 +1,164 @@ + + + + 4.0.0 + + + org.patternfly + patternfly-java-code-parent + 0.4.18-SNAPSHOT + ../code-parent/pom.xml + + + patternfly-java-apidoc + jar + PatternFly Java + Artificial module containing all sources to build the aggregate PatternFly Java API documentation. + + + + + org.jboss.elemento + elemento-core + + + org.jboss.elemento + elemento-svg + + + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + src/demo + src/main/java + + + + + + org.apache.maven.plugins + maven-antrun-plugin + false + + + copy-doc-files + + run + + + + + + + + + + + copy-sources + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + copy-demos + + run + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + --snippet-path=${project.basedir}/src/demo/java + true + true + none + true + false + + https://hal.github.io/elemento/apidocs/ + https://www.gwtproject.org/javadoc/latest/ + https://javadoc.io/doc/org.gwtproject.event/gwt-event/${version.gwt.event}/ + https://javadoc.io/doc/org.gwtproject.safehtml/gwt-safehtml/${version.gwt.safehtml}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-core/${version.elemental2}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-dom/${version.elemental2}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-promise/${version.elemental2}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-webstorage/${version.elemental2}/ + + + public + + **/*Demo.java + + + + + + diff --git a/apidoc/src/main/javadoc/overview.html b/apidoc/src/main/javadoc/overview.html new file mode 100644 index 000000000..485abb9be --- /dev/null +++ b/apidoc/src/main/javadoc/overview.html @@ -0,0 +1,201 @@ + + + + + + PatternFly Java Overview + + +

PatternFly Java

+ +PatternFly Java is a πŸ’― Java implementation of PatternFly +without any JavaScript dependencies (except for charts). + +

PatternFly Java's Its goal is to provide an easy-to-use, elegant, and efficient API to build complex web applications with + PatternFly in Java. PatternFly Java integrates with and builds + upon Elemento's builder API. It + works with both GWT and J2CL. +

+ +

API Design

+ +

+ PatternFly Java integrates with and builds upon Elemento's + builder API. Static factory + methods are used to create the components, and public instance methods add child elements and modify the component. +

+ +

Static Factory Methods

+ +

+ These methods are used to create a component. They are usually named after the component, are overloaded to accept + required and optional arguments, and return an instance of the newly created component: +

+ +
Button button1 = button("Click me!");
+Button button2 = button("PatternFly", "https://www.patternfly.org");
+ +

Add Methods

+ +

+ These methods add subcomponents to a main component. They are usually called add<SubComponent>() + and return the main component so that the method call can be chained with other methods: +

+ +
Dropdown dropdown = dropdown()
+        .addToggle(menuToggle("Dropdown"))
+        .addMenu(menu()
+                .addContent(menuContent()
+                        .addList(menuList()
+                                .addItem(actionMenuItem("item-0", "Action")))));
+ +

Builder / Modifier Methods

+ +

+ These methods modify the current component. They return the current component so that the method call can be chained + with other methods: +

+ +
Card card = card()
+        .flat()
+        .rounded()
+        .large();
+ +

ARIA-Related Methods

+ +

+ These methods set ARIA-related attributes in the component. They're usually named aria<Attribute>() + and return the component so that the method call can be chained with other methods: +

+ +
Navigation navigation = navigation(flat)
+        .ariaScrollBackLabel("οΏ½ back")
+        .ariaScrollForwardLabel("οΏ½ forward");
+ +

Event Handlers

+ +

+ These methods add event handlers for various events to the component. They are usually named + on<Event>(), accept an event handler, and return the component so that the method call can be + chained with other methods. PatternFly Java defines some + {@linkplain org.patternfly.handler common event handlers} that are reused in all components. +

+ +
Drawer drawer = drawer().id("drw")
+        .onToggle((e, c, expanded) -> console.log("Drawer expanded: " + expanded));
+ +

Common Interfaces

+ +

+ Common behavior across all components is implemented by base classes and interfaces. All components extend from + either {@link org.patternfly.component.BaseComponent} or {@link org.patternfly.component.BaseComponentSVG}. These + base classes implement interfaces from Elemento to manipulate the component element. +

+ +

In addition, components implement these interfaces to provide a common API:

+ +
    +
  • + {@link org.patternfly.style.Modifiers} The sub-interfaces defined in this 'umbrella' interface are used to + toggle one specific flag of a component. For example, card().plain() toggles the + plain flag of the card component and is defined in the {@link org.patternfly.style.Modifiers.Plain} + interface. +
  • +
  • + {@link org.patternfly.component.Closeable} Implemented by components that provide some kind of popup that can + be closed. +
  • +
  • + {@link org.patternfly.core.ComponentContext}, {@link org.patternfly.component.HasIdentifier}, and + {@link org.patternfly.component.HasItems} These interfaces are often implemented by components that have a + parent-child relationship. +
  • +
  • + {@link org.patternfly.component.ComponentIcon} and {@link org.patternfly.component.ComponentIconAndText}  + These interfaces are implemented by components that provide text resp. an icon and a text. +
  • +
  • + {@link org.patternfly.component.ComponentProgress} Implemented by components that provide some kind of + progress. +
  • +
  • + {@link org.patternfly.component.Expandable} Implemented by components that provide some kind of expandable + content. +
  • +
  • + {@link org.patternfly.component.HasValue} and {@link org.patternfly.component.HasObservableValue} These + interfaces are implemented by components that provide a value or an observable value. +
  • +
+ +

Modules

+ +

PatternFly Java consists of these Maven modules (a-z):

+ +

PatternFly Java Module Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ModuleDescription
patternfly-java-bomBill of materials
patternfly-java-codeeditorPatternFly codeeditor
patternfly-java-componentsPatternFly components
patternfly-java-coreCore PatternFly Java classes
patternfly-java-finderPatternFly Java Finder extension
patternfly-java-gwtPatternFly Java for GWT
patternfly-java-iconsPatternFly Java icons
patternfly-java-j2clPatternFly Java for J2CL
patternfly-java-layoutsPatternFly Java layouts
+ + diff --git a/bom/.mvn/wrapper/maven-wrapper.properties b/bom/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..d58dfb70b --- /dev/null +++ b/bom/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +wrapperVersion=3.3.2 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/bom/mvnw b/bom/mvnw new file mode 100755 index 000000000..19529ddf8 --- /dev/null +++ b/bom/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/bom/mvnw.cmd b/bom/mvnw.cmd new file mode 100644 index 000000000..249bdf382 --- /dev/null +++ b/bom/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/bom/pom.xml b/bom/pom.xml index a4e1923e6..7e71c8999 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -21,16 +21,64 @@ 4.0.0 - org.patternfly - patternfly-java-parent - 0.2.12-SNAPSHOT - ../pom.xml + org.jboss + jboss-parent + 51 + + org.patternfly patternfly-java-bom + 0.4.18-SNAPSHOT pom PatternFly Java BOM Bill of materials + https://patternfly-java.github.io + 2023 + + + + Apache License 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + Red Hat + https://developers.redhat.com/ + + + + + hpehl + Harald Pehl + hpehl@redhat.com + Red Hat + +1 + + + + + scm:git:git@github.com:${github.org}/${github.name}.git + scm:git:git@github.com:${github.org}/${github.name}.git + https://github.com/${github.org}/${github.name} + HEAD + + + GitHub + https://github.com/${github.org}/${github.name}/issues + + + + central + https://central.sonatype.com/repository/maven-snapshots + + + + + 0.9.0 + @@ -45,6 +93,17 @@ Always declare the source jar too and optionally the test-jar. --> + + ${project.groupId} + patternfly-java-charts + ${project.version} + + + ${project.groupId} + patternfly-java-charts + ${project.version} + sources + ${project.groupId} patternfly-java-codeeditor @@ -145,17 +204,52 @@ - com.mycila - license-maven-plugin - - - -
../build-config/src/main/resources/etc/license.txt
-
-
-
+ org.apache.maven.plugins + maven-shade-plugin + 3.5.0
+ + + + release + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + --pinentry-mode + loopback + + + + + + + org.sonatype.central + central-publishing-maven-plugin + ${version.central.publishing.plugin} + true + + central + true + published + + + + + + diff --git a/build-config/pom.xml b/build-config/pom.xml index e9a7d6d6d..13a32b6f4 100644 --- a/build-config/pom.xml +++ b/build-config/pom.xml @@ -16,13 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../pom.xml diff --git a/charts/npm/.gitignore b/charts/npm/.gitignore new file mode 100644 index 000000000..53c37a166 --- /dev/null +++ b/charts/npm/.gitignore @@ -0,0 +1 @@ +dist \ No newline at end of file diff --git a/charts/npm/.npmignore b/charts/npm/.npmignore new file mode 100644 index 000000000..939b82eaf --- /dev/null +++ b/charts/npm/.npmignore @@ -0,0 +1,3 @@ +.parcel-cache +node_modules + diff --git a/charts/npm/README.md b/charts/npm/README.md new file mode 100644 index 000000000..d50f00ece --- /dev/null +++ b/charts/npm/README.md @@ -0,0 +1,86 @@ +# PatternFly Java Charts + +This package contains a subset of the [PatternFly React Charts](https://www.patternfly.org/charts/about-charts) wrapped as web components. + +The package is a prerequisite if you want to use charts in [PatternFly Java](https://patternfly-java.github.io/), but can also be used independently. + +## Available charts + +The following web components are available: + +- `` β†’ [`ChartDonut`](https://www.patternfly.org/charts/donut-chart) +- `` β†’ [`ChartDonutThreshold`](https://www.patternfly.org/charts/donut-utilization-chart#donut-utilization-threshold-examples) +- `` β†’ [`ChartDonutUtilization`](https://www.patternfly.org/charts/donut-utilization-chart#donut-utilization-examples) +- `` β†’ [`ChartBullet`](https://www.patternfly.org/charts/bullet-chart) +- `` β†’ [`ChartPie`](https://www.patternfly.org/charts/pie-chart) + +## Installation + +Install the package using npm: + +``` +npm install @patternfly-java/charts +``` + +Import it in your JavaScript file: + +```js +import "@patternfly-java/charts/dist/charts"; +``` + +## Usage + +```html + + + + + + + + + +``` + diff --git a/charts/npm/demo.html b/charts/npm/demo.html new file mode 100644 index 000000000..557eba6de --- /dev/null +++ b/charts/npm/demo.html @@ -0,0 +1,144 @@ + + + + + + + PatternFly Charts Web Components Demo + + + + + +
+

PatternFly Charts Web Components

+

Demo of pfj-chart-donut, pfj-chart-donut-utilization, pfj-chart-donut-threshold, + and pfj-chart-bullet.

+
+ +
+

Donut

+ +
+ +
+

Donut Utilization

+ +
+ +
+

Donut Utilization with Threshold (Nested)

+ + + +
+ +
+

Bullet

+ +
+ + + + diff --git a/charts/npm/package-lock.json b/charts/npm/package-lock.json new file mode 100644 index 000000000..1c7e484fd --- /dev/null +++ b/charts/npm/package-lock.json @@ -0,0 +1,4002 @@ +{ + "name": "@patternfly-java/charts", + "version": "0.0.12", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@patternfly-java/charts", + "version": "0.0.12", + "license": "Apache-2.0", + "dependencies": { + "@patternfly/react-charts": "^8.4.1", + "@patternfly/react-styles": "^6.4.0", + "@patternfly/react-tokens": "^6.4.0", + "hoist-non-react-statics": "^3.3.2", + "lit": "^3.3.2", + "lodash": "^4.17.23", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "tslib": "^2.8.1", + "victory-area": "^37.3.6", + "victory-axis": "^37.3.6", + "victory-bar": "^37.3.6", + "victory-box-plot": "^37.3.6", + "victory-chart": "^37.3.6", + "victory-core": "^37.3.6", + "victory-create-container": "^37.3.6", + "victory-cursor-container": "^37.3.6", + "victory-group": "^37.3.6", + "victory-legend": "^37.3.6", + "victory-line": "^37.3.6", + "victory-pie": "^37.3.6", + "victory-scatter": "^37.3.6", + "victory-stack": "^37.3.6", + "victory-tooltip": "^37.3.6", + "victory-voronoi-container": "^37.3.6", + "victory-zoom-container": "^37.3.6" + }, + "devDependencies": { + "parcel": "^2.16.4", + "rimraf": "^6.1.2" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz", + "integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@lezer/common": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.0.tgz", + "integrity": "sha512-PNGcolp9hr4PJdXR4ix7XtixDrClScvtSCYW3rQG106oVMOOI+jFb+0+J3mbeL/53g1Zd6s0kJzaw6Ri68GmAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@lezer/lr": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.8.tgz", + "integrity": "sha512-bPWa0Pgx69ylNlMlPvBPryqeLYQjyJjqPx+Aupm5zydLIF3NE+6MMLT8Yi23Bd9cif9VS00aUebn+6fDIGBcDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.4.0.tgz", + "integrity": "sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw==", + "license": "BSD-3-Clause" + }, + "node_modules/@lit/reactive-element": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.1.1.tgz", + "integrity": "sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg==", + "license": "BSD-3-Clause", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.4.0" + } + }, + "node_modules/@lmdb/lmdb-darwin-arm64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.8.5.tgz", + "integrity": "sha512-KPDeVScZgA1oq0CiPBcOa3kHIqU+pTOwRFDIhxvmf8CTNvqdZQYp5cCKW0bUk69VygB2PuTiINFWbY78aR2pQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lmdb/lmdb-darwin-x64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.8.5.tgz", + "integrity": "sha512-w/sLhN4T7MW1nB3R/U8WK5BgQLz904wh+/SmA2jD8NnF7BLLoUgflCNxOeSPOWp8geP6nP/+VjWzZVip7rZ1ug==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lmdb/lmdb-linux-arm": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.8.5.tgz", + "integrity": "sha512-c0TGMbm2M55pwTDIfkDLB6BpIsgxV4PjYck2HiOX+cy/JWiBXz32lYbarPqejKs9Flm7YVAKSILUducU9g2RVg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-linux-arm64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.8.5.tgz", + "integrity": "sha512-vtbZRHH5UDlL01TT5jB576Zox3+hdyogvpcbvVJlmU5PdL3c5V7cj1EODdh1CHPksRl+cws/58ugEHi8bcj4Ww==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-linux-x64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.8.5.tgz", + "integrity": "sha512-Xkc8IUx9aEhP0zvgeKy7IQ3ReX2N8N1L0WPcQwnZweWmOuKfwpS3GRIYqLtK5za/w3E60zhFfNdS+3pBZPytqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-win32-x64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-2.8.5.tgz", + "integrity": "sha512-4wvrf5BgnR8RpogHhtpCPJMKBmvyZPhhUtEwMJbXh0ni2BucpfF07jlmyM11zRqQ2XIq6PbC2j7W7UCCcm1rRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@mischnic/json-sourcemap": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.1.tgz", + "integrity": "sha512-iA7+tyVqfrATAIsIRWQG+a7ZLLD0VaOCKV2Wd/v4mqIU3J9c4jx9p7S0nw1XH3gJCKNBOOwACOPYYSUu9pgT+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0", + "@lezer/lr": "^1.0.0", + "json5": "^2.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", + "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz", + "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz", + "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz", + "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz", + "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz", + "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@parcel/bundler-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.16.4.tgz", + "integrity": "sha512-Nb8peNvhfm1+660CLwssWh4weY+Mv6vEGS6GPKqzJmTMw50udi0eS1YuWFzvmhSiu1KsYcUD37mqQ1LuIDtWoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/graph": "3.6.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/cache": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.16.4.tgz", + "integrity": "sha512-+uCyeElSga2MBbmbXpIj/WVKH7TByCrKaxtHbelfKKIJpYMgEHVjO4cuc7GUfTrUAmRUS8ZGvnX7Etgq6/jQhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/fs": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/utils": "2.16.4", + "lmdb": "2.8.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/codeframe": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.16.4.tgz", + "integrity": "sha512-s64aMfOJoPrXhKH+Y98ahX0O8aXWvTR+uNlOaX4yFkpr4FFDnviLcGngDe/Yo4Qq2FJZ0P6dNswbJTUH9EGxkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/compressor-raw": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.16.4.tgz", + "integrity": "sha512-IK8IpNhw61B2HKgA1JhGhO9y+ZJFRZNTEmvhN1NdLdPqvgEXm2EunT+m6D9z7xeoeT6XnUKqM0eRckEdD0OXbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/config-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.16.4.tgz", + "integrity": "sha512-kBxuTY/5trEVnvXk92l7LVkYjNuz3SaqWymFhPjEnc8GY4ZVdcWrWdXWTB9hUhpmRYJctFCyGvM0nN05JTiM2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/bundler-default": "2.16.4", + "@parcel/compressor-raw": "2.16.4", + "@parcel/namer-default": "2.16.4", + "@parcel/optimizer-css": "2.16.4", + "@parcel/optimizer-html": "2.16.4", + "@parcel/optimizer-image": "2.16.4", + "@parcel/optimizer-svg": "2.16.4", + "@parcel/optimizer-swc": "2.16.4", + "@parcel/packager-css": "2.16.4", + "@parcel/packager-html": "2.16.4", + "@parcel/packager-js": "2.16.4", + "@parcel/packager-raw": "2.16.4", + "@parcel/packager-svg": "2.16.4", + "@parcel/packager-wasm": "2.16.4", + "@parcel/reporter-dev-server": "2.16.4", + "@parcel/resolver-default": "2.16.4", + "@parcel/runtime-browser-hmr": "2.16.4", + "@parcel/runtime-js": "2.16.4", + "@parcel/runtime-rsc": "2.16.4", + "@parcel/runtime-service-worker": "2.16.4", + "@parcel/transformer-babel": "2.16.4", + "@parcel/transformer-css": "2.16.4", + "@parcel/transformer-html": "2.16.4", + "@parcel/transformer-image": "2.16.4", + "@parcel/transformer-js": "2.16.4", + "@parcel/transformer-json": "2.16.4", + "@parcel/transformer-node": "2.16.4", + "@parcel/transformer-postcss": "2.16.4", + "@parcel/transformer-posthtml": "2.16.4", + "@parcel/transformer-raw": "2.16.4", + "@parcel/transformer-react-refresh-wrap": "2.16.4", + "@parcel/transformer-svg": "2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/core": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.16.4.tgz", + "integrity": "sha512-a0CgrW5A5kwuSu5J1RFRoMQaMs9yagvfH2jJMYVw56+/7NRI4KOtu612SG9Y1ERWfY55ZwzyFxtLWvD6LO+Anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mischnic/json-sourcemap": "^0.1.1", + "@parcel/cache": "2.16.4", + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4", + "@parcel/feature-flags": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/graph": "3.6.4", + "@parcel/logger": "2.16.4", + "@parcel/package-manager": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/profiler": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "base-x": "^3.0.11", + "browserslist": "^4.24.5", + "clone": "^2.1.2", + "dotenv": "^16.5.0", + "dotenv-expand": "^11.0.7", + "json5": "^2.2.3", + "msgpackr": "^1.11.2", + "nullthrows": "^1.1.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/diagnostic": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.16.4.tgz", + "integrity": "sha512-YN5CfX7lFd6yRLxyZT4Sj3sR6t7nnve4TdXSIqapXzQwL7Bw+sj79D95wTq2rCm3mzk5SofGxFAXul2/nG6gcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mischnic/json-sourcemap": "^0.1.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/error-overlay": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/error-overlay/-/error-overlay-2.16.4.tgz", + "integrity": "sha512-e8KYKnMsfmQnqIhsUWBUZAXlDK30wkxsAGle1tZ0gOdoplaIdVq/WjGPatHLf6igLM76c3tRn2vw8jZFput0jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/events": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.16.4.tgz", + "integrity": "sha512-slWQkBRAA7o0cN0BLEd+yCckPmlVRVhBZn5Pn6ktm4EzEtrqoMzMeJOxxH8TXaRzrQDYnTcnYIHFgXWd4kkUfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/feature-flags": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/feature-flags/-/feature-flags-2.16.4.tgz", + "integrity": "sha512-nYdx53siKPLYikHHxfzgjzzgxdrjquK6DMnuSgOTyIdRG4VHdEN0+NqKijRLuVgiUFo/dtxc2h+amwqFENMw8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/fs": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.16.4.tgz", + "integrity": "sha512-maCMOiVn7oJYZlqlfxgLne8n6tSktIT1k0AeyBp4UGWCXyeJUJ+nL7QYShFpKNLtMLeF0cEtgwRAknWzbcDS1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/feature-flags": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/types-internal": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/watcher": "^2.0.7", + "@parcel/workers": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/graph": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-3.6.4.tgz", + "integrity": "sha512-Cj9yV+/k88kFhE+D+gz0YuNRpvNOCVDskO9pFqkcQhGbsGq6kg2XpZ9V7HlYraih31xf8Vb589bZOwjKIiHixQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/feature-flags": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/logger": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.16.4.tgz", + "integrity": "sha512-QR8QLlKo7xAy9JBpPDAh0RvluaixqPCeyY7Fvo2K7hrU3r85vBNNi06pHiPbWoDmB4x1+QoFwMaGnJOHR+/fMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/markdown-ansi": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.16.4.tgz", + "integrity": "sha512-0+oQApAVF3wMcQ6d1ZfZ0JsRzaMUYj9e4U+naj6YEsFsFGOPp+pQYKXBf1bobQeeB7cPKPT3SUHxFqced722Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/namer-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.16.4.tgz", + "integrity": "sha512-CE+0lFg881sJq575EXxj2lKUn81tsS5itpNUUErHxit195m3PExyAhoXM6ed/SXxwi+uv+T5FS/jjDLBNuUFDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/node-resolver-core": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-3.7.4.tgz", + "integrity": "sha512-b3VDG+um6IWW5CTod6M9hQsTX5mdIelKmam7mzxzgqg4j5hnycgTWqPMc9UxhYoUY/Q/PHfWepccNcKtvP5JiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mischnic/json-sourcemap": "^0.1.1", + "@parcel/diagnostic": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-css": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.16.4.tgz", + "integrity": "sha512-aqdXCtmvpcXYgJFGk2DtXF34wuM2TD1fZorKMrJdKB9sSkWVRs1tq6RAXQrbi0ZPDH9wfE/9An3YdkTex7RHuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "browserslist": "^4.24.5", + "lightningcss": "^1.30.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-html": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-html/-/optimizer-html-2.16.4.tgz", + "integrity": "sha512-vg/R2uuSni+NYYUUV8m+5bz8p5zBv8wc/nNleoBnGuCDwn7uaUwTZ8Gt9CjZO8jjG0xCLILoc/TW+e2FF3pfgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-image": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.16.4.tgz", + "integrity": "sha512-2RV54WnvMYr18lxSx7Zlx/DXpJwMzOiPxDnoFyvaUoYutvgHO6chtcgFgh1Bvw/PoI95vYzlTkZ8QfUOk5A0JA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/optimizer-svg": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-svg/-/optimizer-svg-2.16.4.tgz", + "integrity": "sha512-22+BqIffCrVErg8y2XwhasbTaFNn75OKXZ3KTDBIfOSAZKLUKs1iHfDXETzTRN7cVcS+Q36/6EHd7N/RA8i1fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-swc": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-swc/-/optimizer-swc-2.16.4.tgz", + "integrity": "sha512-+URqwnB6u1gqaLbG1O1DDApH+UVj4WCbK9No1fdxLBxQ9a84jyli25o1kK1hYB9Nb/JMyYNnEBfvYUW6RphOxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "@swc/core": "^1.11.24", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/package-manager": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.16.4.tgz", + "integrity": "sha512-obWv9gZgdnkT3Kd+fBkKjhdNEY7zfOP5gVaox5i4nQstVCaVnDlMv5FwLEXwehL+WbwEcGyEGGxOHHkAFKk7Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/node-resolver-core": "3.7.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "@swc/core": "^1.11.24", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/packager-css": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.16.4.tgz", + "integrity": "sha512-rWRtfiX+VVIOZvq64jpeNUKkvWAbnokfHQsk/js1s5jD4ViNQgPcNLiRaiIANjymqL6+dQqWvGUSW2a5FAZYfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "lightningcss": "^1.30.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-html": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.16.4.tgz", + "integrity": "sha512-AWo5f6SSqBsg2uWOsX0gPX8hCx2iE6GYLg2Z4/cDy2mPlwDICN8/bxItEztSZFmObi+ti26eetBKRDxAUivyIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-js": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.16.4.tgz", + "integrity": "sha512-L2o39f/fhta+hxto7w8OTUKdstY+te5BmHZREckbQm0KTBg93BG7jB0bfoxLSZF0d8uuAYIVXjzeHNqha+du1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "globals": "^13.24.0", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-raw": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.16.4.tgz", + "integrity": "sha512-A9j60G9OmbTkEeE4WRMXCiErEprHLs9NkUlC4HXCxmSrPMOVaMaMva2LdejE3A9kujZqYtYfuc8+a+jN+Nro4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-svg": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.16.4.tgz", + "integrity": "sha512-LT9l7eInFrAZJ6w3mYzAUgDq3SIzYbbQyW46Dz26M9lJQbf6uCaATUTac3BEHegW0ikDuw4OOGHK41BVqeeusg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-wasm": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-wasm/-/packager-wasm-2.16.4.tgz", + "integrity": "sha512-AY96Aqu/RpmaSZK2RGkIrZWjAperDw8DAlxLAiaP1D/RPVnikZtl5BmcUt/Wz3PrzG7/q9ZVqqKkWsLmhkjXZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">=16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/plugin": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.16.4.tgz", + "integrity": "sha512-aN2VQoRGC1eB41ZCDbPR/Sp0yKOxe31oemzPx1nJzOuebK2Q6FxSrJ9Bjj9j/YCaLzDtPwelsuLOazzVpXJ6qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/types": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/profiler": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/profiler/-/profiler-2.16.4.tgz", + "integrity": "sha512-R3JhfcnoReTv2sVFHPR2xKZvs3d3IRrBl9sWmAftbIJFwT4rU70/W7IdwfaJVkD/6PzHq9mcgOh1WKL4KAxPdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4", + "@parcel/types-internal": "2.16.4", + "chrome-trace-event": "^1.0.2" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-cli": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.16.4.tgz", + "integrity": "sha512-DQx9TwcTZrDv828+tcwEi//xyW7OHTGzGX1+UEVxPp0mSzuOmDn0zfER8qNIqGr1i4D/FXhb5UJQDhGHV8mOpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "chalk": "^4.1.2", + "term-size": "^2.2.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-dev-server": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.16.4.tgz", + "integrity": "sha512-YWvay25htQDifpDRJ0+yFh6xUxKnbfeJxYkPYyuXdxpEUhq4T0UWW0PbPCN/wFX7StgeUTXq5Poeo/+eys9m3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/codeframe": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-tracer": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-tracer/-/reporter-tracer-2.16.4.tgz", + "integrity": "sha512-JKnlXpPepak0/ZybmZn9JtyjJiDBWYrt7ZUlXQhQb0xzNcd/k+RqfwVkTKIwyFHsWtym0cwibkvsi2bWFzS7tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "chrome-trace-event": "^1.0.3", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/resolver-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.16.4.tgz", + "integrity": "sha512-wJe9XQS0hn/t32pntQpJbls3ZL8mGVVhK9L7s7BTmZT9ufnvP2nif1psJz/nbgnP9LF6mLSk43OdMJKpoStsjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/node-resolver-core": "3.7.4", + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-browser-hmr": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.16.4.tgz", + "integrity": "sha512-asx7p3NjUSfibI3bC7+8+jUIGHWVk2Zuq9SjJGCGDt+auT9A4uSGljnsk1BWWPqqZ0WILubq4czSAqm0+wt4cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-js": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.16.4.tgz", + "integrity": "sha512-gUKmsjg+PULQBu2QbX0QKll9tXSqHPO8NrfxHwWb2lz5xDKDos1oV0I7BoMWbHhUHkoToXZrm654oGViujtVUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-rsc": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-rsc/-/runtime-rsc-2.16.4.tgz", + "integrity": "sha512-CHkotYE/cNiUjJmrc5FD9YhlFp1UF5wMNNJmoWaL40eBzsqcaV0sSn5V3bNapwewn3wrMYgdPgvOTHfaZaG73A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-service-worker": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.16.4.tgz", + "integrity": "sha512-FT0Q58bf5Re+dq5cL2XHbxqHHFZco6qtRijeVpT3TSPMRPlniMArypSytTeZzVNL7h/hxjWsNu7fRuC0yLB5hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust/-/rust-2.16.4.tgz", + "integrity": "sha512-RBMKt9rCdv6jr4vXG6LmHtxzO5TuhQvXo1kSoSIF7fURRZ81D1jzBtLxwLmfxCPsofJNqWwdhy5vIvisX+TLlQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/rust-darwin-arm64": "2.16.4", + "@parcel/rust-darwin-x64": "2.16.4", + "@parcel/rust-linux-arm-gnueabihf": "2.16.4", + "@parcel/rust-linux-arm64-gnu": "2.16.4", + "@parcel/rust-linux-arm64-musl": "2.16.4", + "@parcel/rust-linux-x64-gnu": "2.16.4", + "@parcel/rust-linux-x64-musl": "2.16.4", + "@parcel/rust-win32-x64-msvc": "2.16.4" + }, + "peerDependencies": { + "napi-wasm": "^1.1.2" + }, + "peerDependenciesMeta": { + "napi-wasm": { + "optional": true + } + } + }, + "node_modules/@parcel/rust-darwin-arm64": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-darwin-arm64/-/rust-darwin-arm64-2.16.4.tgz", + "integrity": "sha512-P3Se36H9EO1fOlwXqQNQ+RsVKTGn5ztRSUGbLcT8ba6oOMmU1w7J4R810GgsCbwCuF10TJNUMkuD3Q2Sz15Q3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-darwin-x64": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-darwin-x64/-/rust-darwin-x64-2.16.4.tgz", + "integrity": "sha512-8aNKNyPIx3EthYpmVJevIdHmFsOApXAEYGi3HU69jTxLgSIfyEHDdGE9lEsMvhSrd/SSo4/euAtiV+pqK04wnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-arm-gnueabihf": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm-gnueabihf/-/rust-linux-arm-gnueabihf-2.16.4.tgz", + "integrity": "sha512-QrvqiSHaWRLc0JBHgUHVvDthfWSkA6AFN+ikV1UGENv4j2r/QgvuwJiG0VHrsL6pH5dRqj0vvngHzEgguke9DA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-arm64-gnu": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm64-gnu/-/rust-linux-arm64-gnu-2.16.4.tgz", + "integrity": "sha512-f3gBWQHLHRUajNZi3SMmDQiEx54RoRbXtZYQNuBQy7+NolfFcgb1ik3QhkT7xovuTF/LBmaqP3UFy0PxvR/iwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-arm64-musl": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm64-musl/-/rust-linux-arm64-musl-2.16.4.tgz", + "integrity": "sha512-cwml18RNKsBwHyZnrZg4jpecXkWjaY/mCArocWUxkFXjjB97L56QWQM9W86f2/Y3HcFcnIGJwx1SDDKJrV6OIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-x64-gnu": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-x64-gnu/-/rust-linux-x64-gnu-2.16.4.tgz", + "integrity": "sha512-0xIjQaN8hiG0F9R8coPYidHslDIrbfOS/qFy5GJNbGA3S49h61wZRBMQqa7JFW4+2T8R0J9j0SKHhLXpbLXrIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-x64-musl": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-x64-musl/-/rust-linux-x64-musl-2.16.4.tgz", + "integrity": "sha512-fYn21GIecHK9RoZPKwT9NOwxwl3Gy3RYPR6zvsUi0+hpFo19Ph9EzFXN3lT8Pi5KiwQMCU4rsLb5HoWOBM1FeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-win32-x64-msvc": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-win32-x64-msvc/-/rust-win32-x64-msvc-2.16.4.tgz", + "integrity": "sha512-TcpWC3I1mJpfP2++018lgvM7UX0P8IrzNxceBTHUKEIDMwmAYrUKAQFiaU0j1Ldqk6yP8SPZD3cvphumsYpJOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/source-map": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.1.1.tgz", + "integrity": "sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": "^12.18.3 || >=14" + } + }, + "node_modules/@parcel/transformer-babel": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.16.4.tgz", + "integrity": "sha512-CMDUOQYX7+cmeyHxHSFnoPcwvXNL7rRFE+Q06uVFzsYYiVhbwGF/1J5Bx4cW3Froumqla4YTytTsEteJEybkdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "browserslist": "^4.24.5", + "json5": "^2.2.3", + "nullthrows": "^1.1.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-css": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.16.4.tgz", + "integrity": "sha512-VG/+DbDci2HKe20GFRDs65ZQf5GUFfnmZAa1BhVl/MO+ijT3XC3eoVUy5cExRkq4VLcPY4ytL0g/1T2D6x7lBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "browserslist": "^4.24.5", + "lightningcss": "^1.30.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-html": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.16.4.tgz", + "integrity": "sha512-w6JErYTeNS+KAzUAER18NHFIFFvxiLGd4Fht1UYcb/FDjJdLAMB/FljyEs0Rto/WAhZ2D0MuSL25HQh837R62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-image": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.16.4.tgz", + "integrity": "sha512-ZzIn3KvvRqMfcect4Dy+57C9XoQXZhpVJKBdQWMp9wM1qJEgsVgGDcaSBYCs/UYSKMRMP6Wm20pKCt408RkQzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/transformer-js": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.16.4.tgz", + "integrity": "sha512-FD2fdO6URwAGBPidb3x1dDgLBt972mko0LelcSU05aC/pcKaV9mbCtINbPul1MlStzkxDelhuImcCYIyerheVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "@swc/helpers": "^0.5.0", + "browserslist": "^4.24.5", + "nullthrows": "^1.1.1", + "regenerator-runtime": "^0.14.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/transformer-json": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.16.4.tgz", + "integrity": "sha512-pB3ZNqgokdkBCJ+4G0BrPYcIkyM9K1HVk0GvjzcLEFDKsoAp8BGEM68FzagFM/nVq9anYTshIaoh349GK0M/bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "json5": "^2.2.3" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-node": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-node/-/transformer-node-2.16.4.tgz", + "integrity": "sha512-7t43CPGfMJk1LqFokwxHSsRi+kKC2QvDXaMtqiMShmk50LCwn81WgzuFvNhMwf6lSiBihWupGwF3Fqksg+aisg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-postcss": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.16.4.tgz", + "integrity": "sha512-jfmh9ho03H+qwz9S1b/a/oaOmgfMovtHKYDweIGMjKULKIee3AFRqo8RZIOuUMjDuqHWK8SqQmjery4syFV3Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "clone": "^2.1.2", + "nullthrows": "^1.1.1", + "postcss-value-parser": "^4.2.0", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-posthtml": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.16.4.tgz", + "integrity": "sha512-+GXsmGx1L25KQGQnwclgEuQe1t4QU+IoDkgN+Ikj+EnQCOWG4/ts2VpMBeqP5F18ZT4cCSRafj6317o/2lSGJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-raw": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.16.4.tgz", + "integrity": "sha512-7WDUPq+bW11G9jKxaQIVL+NPGolV99oq/GXhpjYip0SaGaLzRCW7gEk60cftuk0O7MsDaX5jcAJm3G/AX+LJKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-react-refresh-wrap": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.16.4.tgz", + "integrity": "sha512-MiLNZrsGQJTANKKa4lzZyUbGj/en0Hms474mMdQkCBFg6GmjfmXwaMMgtTfPA3ZwSp2+3LeObCyca/f9B2gBZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/error-overlay": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "react-refresh": "^0.16.0" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-svg": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.16.4.tgz", + "integrity": "sha512-0dm4cQr/WpfQP6N0xjFtwdLTxcONDfoLgTOMk4eNUWydHipSgmLtvUk/nOc/FWkwztRScfAObtZXOiPOd3Oy9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/types": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.16.4.tgz", + "integrity": "sha512-ctx4mBskZHXeDVHg4OjMwx18jfYH9BzI/7yqbDQVGvd5lyA+/oVVzYdpele2J2i2sSaJ87cA8nb57GDQ8kHAqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/types-internal": "2.16.4", + "@parcel/workers": "2.16.4" + } + }, + "node_modules/@parcel/types-internal": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/types-internal/-/types-internal-2.16.4.tgz", + "integrity": "sha512-PE6Qmt5cjzBxX+6MPLiF7r+twoC+V9Skt3zyuBQ+H1c0i9o07Bbz2NKX10nvlPukfmW6Fu/1RvTLkzBZR1bU6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/feature-flags": "2.16.4", + "@parcel/source-map": "^2.1.1", + "utility-types": "^3.11.0" + } + }, + "node_modules/@parcel/utils": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.16.4.tgz", + "integrity": "sha512-lkmxQHcHyOWZLbV8t+h2CGZIkPiBurLm/TS5wNT7+tq0qt9KbVwL7FP2K93TbXhLMGTmpI79Bf3qKniPM167Mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/codeframe": "2.16.4", + "@parcel/diagnostic": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/markdown-ansi": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "chalk": "^4.1.2", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", + "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.6", + "@parcel/watcher-darwin-arm64": "2.5.6", + "@parcel/watcher-darwin-x64": "2.5.6", + "@parcel/watcher-freebsd-x64": "2.5.6", + "@parcel/watcher-linux-arm-glibc": "2.5.6", + "@parcel/watcher-linux-arm-musl": "2.5.6", + "@parcel/watcher-linux-arm64-glibc": "2.5.6", + "@parcel/watcher-linux-arm64-musl": "2.5.6", + "@parcel/watcher-linux-x64-glibc": "2.5.6", + "@parcel/watcher-linux-x64-musl": "2.5.6", + "@parcel/watcher-win32-arm64": "2.5.6", + "@parcel/watcher-win32-ia32": "2.5.6", + "@parcel/watcher-win32-x64": "2.5.6" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.6.tgz", + "integrity": "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz", + "integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.6.tgz", + "integrity": "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.6.tgz", + "integrity": "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.6.tgz", + "integrity": "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.6.tgz", + "integrity": "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.6.tgz", + "integrity": "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.6.tgz", + "integrity": "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz", + "integrity": "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.6.tgz", + "integrity": "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.6.tgz", + "integrity": "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.6.tgz", + "integrity": "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.6.tgz", + "integrity": "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/workers": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.16.4.tgz", + "integrity": "sha512-dkBEWqnHXDZnRbTZouNt4uEGIslJT+V0c8OH1MPOfjISp1ucD6/u9ET8k9d/PxS9h1hL53og0SpBuuSEPLDl6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/profiler": "2.16.4", + "@parcel/types-internal": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@patternfly/react-charts": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@patternfly/react-charts/-/react-charts-8.4.1.tgz", + "integrity": "sha512-kqP5TFr9F/SDTp+nXfcX8gMuZIQ6Uxl55qqiWYgR2zflo0UZWnyL/d2s1fI6Bfi5IuycNdlvJJ/i8QdOsLr5mw==", + "license": "MIT", + "dependencies": { + "@patternfly/react-styles": "^6.4.0", + "@patternfly/react-tokens": "^6.4.0", + "hoist-non-react-statics": "^3.3.2", + "lodash": "^4.17.23", + "tslib": "^2.8.1" + }, + "peerDependencies": { + "echarts": "^5.6.0 || ^6.0.0", + "react": "^17 || ^18 || ^19", + "react-dom": "^17 || ^18 || ^19", + "victory-area": "^37.3.6", + "victory-axis": "^37.3.6", + "victory-bar": "^37.3.6", + "victory-box-plot": "^37.3.6", + "victory-chart": "^37.3.6", + "victory-core": "^37.3.6", + "victory-create-container": "^37.3.6", + "victory-cursor-container": "^37.3.6", + "victory-group": "^37.3.6", + "victory-legend": "^37.3.6", + "victory-line": "^37.3.6", + "victory-pie": "^37.3.6", + "victory-scatter": "^37.3.6", + "victory-stack": "^37.3.6", + "victory-tooltip": "^37.3.6", + "victory-voronoi-container": "^37.3.6", + "victory-zoom-container": "^37.3.6" + }, + "peerDependenciesMeta": { + "echarts": { + "optional": true + }, + "victory-area": { + "optional": true + }, + "victory-axis": { + "optional": true + }, + "victory-bar": { + "optional": true + }, + "victory-box-plot": { + "optional": true + }, + "victory-chart": { + "optional": true + }, + "victory-core": { + "optional": true + }, + "victory-create-container": { + "optional": true + }, + "victory-cursor-container": { + "optional": true + }, + "victory-group": { + "optional": true + }, + "victory-legend": { + "optional": true + }, + "victory-line": { + "optional": true + }, + "victory-pie": { + "optional": true + }, + "victory-scatter": { + "optional": true + }, + "victory-stack": { + "optional": true + }, + "victory-tooltip": { + "optional": true + }, + "victory-voronoi-container": { + "optional": true + }, + "victory-zoom-container": { + "optional": true + } + } + }, + "node_modules/@patternfly/react-styles": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-6.4.0.tgz", + "integrity": "sha512-EXmHA67s5sy+Wy/0uxWoUQ52jr9lsH2wV3QcgtvVc5zxpyBX89gShpqv4jfVqaowznHGDoL6fVBBrSe9BYOliQ==", + "license": "MIT" + }, + "node_modules/@patternfly/react-tokens": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.4.0.tgz", + "integrity": "sha512-iZthBoXSGQ/+PfGTdPFJVulaJZI3rwE+7A/whOXPGp3Jyq3k6X52pr1+5nlO6WHasbZ9FyeZGqXf4fazUZNjbw==", + "license": "MIT" + }, + "node_modules/@swc/core": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.11.tgz", + "integrity": "sha512-iLmLTodbYxU39HhMPaMUooPwO/zqJWvsqkrXv1ZI38rMb048p6N7qtAtTp37sw9NzSrvH6oli8EdDygo09IZ/w==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.25" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.15.11", + "@swc/core-darwin-x64": "1.15.11", + "@swc/core-linux-arm-gnueabihf": "1.15.11", + "@swc/core-linux-arm64-gnu": "1.15.11", + "@swc/core-linux-arm64-musl": "1.15.11", + "@swc/core-linux-x64-gnu": "1.15.11", + "@swc/core-linux-x64-musl": "1.15.11", + "@swc/core-win32-arm64-msvc": "1.15.11", + "@swc/core-win32-ia32-msvc": "1.15.11", + "@swc/core-win32-x64-msvc": "1.15.11" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.17" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.11.tgz", + "integrity": "sha512-QoIupRWVH8AF1TgxYyeA5nS18dtqMuxNwchjBIwJo3RdwLEFiJq6onOx9JAxHtuPwUkIVuU2Xbp+jCJ7Vzmgtg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.11.tgz", + "integrity": "sha512-S52Gu1QtPSfBYDiejlcfp9GlN+NjTZBRRNsz8PNwBgSE626/FUf2PcllVUix7jqkoMC+t0rS8t+2/aSWlMuQtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.11.tgz", + "integrity": "sha512-lXJs8oXo6Z4yCpimpQ8vPeCjkgoHu5NoMvmJZ8qxDyU99KVdg6KwU9H79vzrmB+HfH+dCZ7JGMqMF//f8Cfvdg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.11.tgz", + "integrity": "sha512-chRsz1K52/vj8Mfq/QOugVphlKPWlMh10V99qfH41hbGvwAU6xSPd681upO4bKiOr9+mRIZZW+EfJqY42ZzRyA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.11.tgz", + "integrity": "sha512-PYftgsTaGnfDK4m6/dty9ryK1FbLk+LosDJ/RJR2nkXGc8rd+WenXIlvHjWULiBVnS1RsjHHOXmTS4nDhe0v0w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.11.tgz", + "integrity": "sha512-DKtnJKIHiZdARyTKiX7zdRjiDS1KihkQWatQiCHMv+zc2sfwb4Glrodx2VLOX4rsa92NLR0Sw8WLcPEMFY1szQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.11.tgz", + "integrity": "sha512-mUjjntHj4+8WBaiDe5UwRNHuEzLjIWBTSGTw0JT9+C9/Yyuh4KQqlcEQ3ro6GkHmBGXBFpGIj/o5VMyRWfVfWw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.11.tgz", + "integrity": "sha512-ZkNNG5zL49YpaFzfl6fskNOSxtcZ5uOYmWBkY4wVAvgbSAQzLRVBp+xArGWh2oXlY/WgL99zQSGTv7RI5E6nzA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.11.tgz", + "integrity": "sha512-6XnzORkZCQzvTQ6cPrU7iaT9+i145oLwnin8JrfsLG41wl26+5cNQ2XV3zcbrnFEV6esjOceom9YO1w9mGJByw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.11.tgz", + "integrity": "sha512-IQ2n6af7XKLL6P1gIeZACskSxK8jWtoKpJWLZmdXTDj1MGzktUy4i+FvpdtxFmJWNavRWH1VmTr6kAubRDHeKw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.18", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.18.tgz", + "integrity": "sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/types": { + "version": "0.1.25", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz", + "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.7.tgz", + "integrity": "sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT" + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.9.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", + "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/browserslist": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001767", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001767.tgz", + "integrity": "sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/delaunator": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz", + "integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag==", + "license": "ISC" + }, + "node_modules/delaunay-find": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/delaunay-find/-/delaunay-find-0.0.6.tgz", + "integrity": "sha512-1+almjfrnR7ZamBk0q3Nhg6lqSe6Le4vL0WJDSMx4IDbQwTpUTXPjxC00lqLBT8MYsJpPCbI16sIkw9cPsbi7Q==", + "license": "ISC", + "dependencies": { + "delaunator": "^4.0.0" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", + "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dotenv": "^16.4.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.286", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", + "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", + "dev": true, + "license": "ISC" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/glob": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", + "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz", + "integrity": "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.31.1", + "lightningcss-darwin-arm64": "1.31.1", + "lightningcss-darwin-x64": "1.31.1", + "lightningcss-freebsd-x64": "1.31.1", + "lightningcss-linux-arm-gnueabihf": "1.31.1", + "lightningcss-linux-arm64-gnu": "1.31.1", + "lightningcss-linux-arm64-musl": "1.31.1", + "lightningcss-linux-x64-gnu": "1.31.1", + "lightningcss-linux-x64-musl": "1.31.1", + "lightningcss-win32-arm64-msvc": "1.31.1", + "lightningcss-win32-x64-msvc": "1.31.1" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.31.1.tgz", + "integrity": "sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz", + "integrity": "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.31.1.tgz", + "integrity": "sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.31.1.tgz", + "integrity": "sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.31.1.tgz", + "integrity": "sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.31.1.tgz", + "integrity": "sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.31.1.tgz", + "integrity": "sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.31.1.tgz", + "integrity": "sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.31.1.tgz", + "integrity": "sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.31.1.tgz", + "integrity": "sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.31.1.tgz", + "integrity": "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/lit": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.3.2.tgz", + "integrity": "sha512-NF9zbsP79l4ao2SNrH3NkfmFgN/hBYSQo90saIVI1o5GpjAdCPVstVzO1MrLOakHoEhYkrtRjPK6Ob521aoYWQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@lit/reactive-element": "^2.1.0", + "lit-element": "^4.2.0", + "lit-html": "^3.3.0" + } + }, + "node_modules/lit-element": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.2.1.tgz", + "integrity": "sha512-WGAWRGzirAgyphK2urmYOV72tlvnxw7YfyLDgQ+OZnM9vQQBQnumQ7jUJe6unEzwGU3ahFOjuz1iz1jjrpCPuw==", + "license": "BSD-3-Clause", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.4.0", + "@lit/reactive-element": "^2.1.0", + "lit-html": "^3.3.0" + } + }, + "node_modules/lit-html": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.1.tgz", + "integrity": "sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==", + "license": "BSD-3-Clause", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, + "node_modules/lmdb": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.8.5.tgz", + "integrity": "sha512-9bMdFfc80S+vSldBmG3HOuLVHnxRdNTlpzR6QDnzqCQtCzGUEAGTzBKYMeIM+I/sU4oZfgbcbS7X7F65/z/oxQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "msgpackr": "^1.9.5", + "node-addon-api": "^6.1.0", + "node-gyp-build-optional-packages": "5.1.1", + "ordered-binary": "^1.4.1", + "weak-lru-cache": "^1.2.2" + }, + "bin": { + "download-lmdb-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@lmdb/lmdb-darwin-arm64": "2.8.5", + "@lmdb/lmdb-darwin-x64": "2.8.5", + "@lmdb/lmdb-linux-arm": "2.8.5", + "@lmdb/lmdb-linux-arm64": "2.8.5", + "@lmdb/lmdb-linux-x64": "2.8.5", + "@lmdb/lmdb-win32-x64": "2.8.5" + } + }, + "node_modules/lmdb/node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", + "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/msgpackr": { + "version": "1.11.8", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.8.tgz", + "integrity": "sha512-bC4UGzHhVvgDNS7kn9tV8fAucIYUBuGojcaLiz7v+P63Lmtm0Xeji8B/8tYKddALXxJLpwIeBmUN3u64C4YkRA==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz", + "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" + } + }, + "node_modules/msgpackr-extract/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz", + "integrity": "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/node-gyp-build-optional-packages/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nullthrows": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ordered-binary": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.6.1.tgz", + "integrity": "sha512-QkCdPooczexPLiXIrbVOPYkR3VO3T6v2OyKRkR1Xbhpy7/LAVXwahnRCgRp78Oe/Ehf0C/HATAxfSr6eA1oX+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parcel": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.16.4.tgz", + "integrity": "sha512-RQlrqs4ujYNJpTQi+dITqPKNhRWEqpjPd1YBcGp50Wy3FcJHpwu0/iRm7XWz2dKU/Bwp2qCcVYPIeEDYi2uOUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/config-default": "2.16.4", + "@parcel/core": "2.16.4", + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4", + "@parcel/feature-flags": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/package-manager": "2.16.4", + "@parcel/reporter-cli": "2.16.4", + "@parcel/reporter-dev-server": "2.16.4", + "@parcel/reporter-tracer": "2.16.4", + "@parcel/utils": "2.16.4", + "chalk": "^4.1.2", + "commander": "^12.1.0", + "get-port": "^4.2.0" + }, + "bin": { + "parcel": "lib/bin.js" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/react": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.4" + } + }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==", + "license": "MIT" + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/react-refresh": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.16.0.tgz", + "integrity": "sha512-FPvF2XxTSikpJxcr+bHut2H4gJ17+18Uy20D5/F+SKzFap62R3cM5wH6b8WN3LyGSYeQilLEcJcR1fjBSI2S1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, + "node_modules/rimraf": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", + "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^13.0.0", + "package-json-from-dist": "^1.0.1" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/utility-types": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", + "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/victory-area": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-area/-/victory-area-37.3.6.tgz", + "integrity": "sha512-wVC8LKrZJLiSySNuJLRCB449qZTsPiRyzLlNoJwe21y+XA/a2HJbmJSeywmo8P153aX8viKe1H8ygDsTFXQhHw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-axis": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-axis/-/victory-axis-37.3.6.tgz", + "integrity": "sha512-Vi0dZvgmXmnCdoqc49WckeG5cMXnl7FTtqVhXu9JweA9cgCnkZabBd5mRvAjblb3Lo4j0HZCSPKHYWUPW70qZg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-bar": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-bar/-/victory-bar-37.3.6.tgz", + "integrity": "sha512-jdATFRWL1LUW/yEpKWx/aId2BiU2o1pPF9+Kh1TFISBduJoI4ZqvZD90H1QK4f/z50PikqiqiDECaKoKM1jfOQ==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-box-plot": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-box-plot/-/victory-box-plot-37.3.6.tgz", + "integrity": "sha512-GOucnD63h14ScBuISC/nd1GBTEx6gIZfLE+0P0gyeH1poBKq0trTTvpQDvAMuGR8zICfEETG3ltmUMCwRrFyUg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-brush-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-brush-container/-/victory-brush-container-37.3.6.tgz", + "integrity": "sha512-LfZ2CgX1cYAqCtYxcSB68OfZS2v0T2VLXoEArd0lCXfRBY1Gya7GacCUcuo7GoK9XOXeslx7S/U95aVutt1VLg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-chart": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-chart/-/victory-chart-37.3.6.tgz", + "integrity": "sha512-IkPo/W4AJ7bPu902TGER09OseR9ODm+FQAKfOBw4JsdEhZZ7BiG9zgd/25+x0r5EsTLu81CYGQVkBa+ZazcOlA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-axis": "37.3.6", + "victory-core": "37.3.6", + "victory-polar-axis": "37.3.6", + "victory-shared-events": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-core": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-core/-/victory-core-37.3.6.tgz", + "integrity": "sha512-aFgO6KokxPbUCPznZP5UPhOdI22pMuwDXKDt6eoQOnkVim66Ia+K95TQar2nwVKGYV5j26aKVf/n9blwphGJRw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21", + "react-fast-compare": "^3.2.0", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-create-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-create-container/-/victory-create-container-37.3.6.tgz", + "integrity": "sha512-Uf5bFQvqUsXCjqpvBW4LhrdrHkM6dBqxYgub6FCsBb86f84xZQ3vY7jFkg/JfvF0oGKMoWXYYrYLC1sk+fcWVA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-brush-container": "37.3.6", + "victory-core": "37.3.6", + "victory-cursor-container": "37.3.6", + "victory-selection-container": "37.3.6", + "victory-voronoi-container": "37.3.6", + "victory-zoom-container": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-cursor-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-cursor-container/-/victory-cursor-container-37.3.6.tgz", + "integrity": "sha512-+Oiw57d5nE+iq8As8RvepknzmNtKq1Gsc50u1X3IRd4jXtX8zqZrgXGlVZ+BP/tkLsWnGYVjKulwKBf2oaEUuw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-group": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-group/-/victory-group-37.3.6.tgz", + "integrity": "sha512-kgy/Azl5BxwlJAV0KDPGypv35TMrOD1J2ZxnJW2Wyyq+e8i0GGBIv5MoBzou64BRsDlS9V0CYRIjnkHgrBpB5w==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6", + "victory-shared-events": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-legend": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-legend/-/victory-legend-37.3.6.tgz", + "integrity": "sha512-vRRrhj3/ENqKVLdaBMzEmR83N6BOjox1bthYT1eJjN2H5SIK35bxn30IkiV/Pz3y627EqZe4TAWaxc0jiJlCiA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-line": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-line/-/victory-line-37.3.6.tgz", + "integrity": "sha512-Ke817uf/qFbN9jU7Dba7CrcHXYO5wAZuKKnyeHJmLDeQeFST0773xejnIuC+dBgZipjFr4KIbSd+VcUafFNE1g==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-pie": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-pie/-/victory-pie-37.3.6.tgz", + "integrity": "sha512-tvdgAZ/HQWlo3KDDe0XAVbizHuaNMbgkkiF7zfA7Ww+3bHSs+0P9dsDtK2xP365D8gBCOv8pWmuzvKRhzNbqeA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-polar-axis": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-polar-axis/-/victory-polar-axis-37.3.6.tgz", + "integrity": "sha512-RpFsCkzHezJq5P+C/wtVdjEHX25JIFsSgs6qYSnfr/hayaFbWgK5HhRFpriQm5hg61cx47WxAOLyHvzf0nasvw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-scatter": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-scatter/-/victory-scatter-37.3.6.tgz", + "integrity": "sha512-fp95zMTPXgW1cmTowzDXhn+KxePMVDrzU0lotsHQMdBV7eB+ioXdu9hORlx4VHmMYg2ihsGwRTF+VAZ7rGxphA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-selection-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-selection-container/-/victory-selection-container-37.3.6.tgz", + "integrity": "sha512-gd3qODDlBtLEJM7+2jCXk2YcLBUmIpYEEHswytMhwc6zihxXipGBUHRulhLj/I05mKay2gaOAg5ewiJHd4Awgw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-shared-events": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-shared-events/-/victory-shared-events-37.3.6.tgz", + "integrity": "sha512-ygrbOtzLUTbtKebacZKyQRekhSAROnAvMkVI/PKsAGsz0ClY9P7qDEJG7eTUUygjO6ax0tI6WNE6JogQzeD1gw==", + "license": "MIT", + "dependencies": { + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-stack": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-stack/-/victory-stack-37.3.6.tgz", + "integrity": "sha512-ldod04RdqGJGH5p5eWXCofdTkbhZqIp3iwW7NpxSbMDLs8zPQIVvDFVtuJgMwQiC5vnIpbhMmxVeFbr8m64ZKA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6", + "victory-shared-events": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-tooltip": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-tooltip/-/victory-tooltip-37.3.6.tgz", + "integrity": "sha512-vqaJS9noauOqDDBBAV9Ln9duOY/i17h1DCfCPAqhwPFyvFbwKvAub9zPTeYWAm/14VvWX5O/0yekFCVbcC7hjg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-vendor": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz", + "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, + "node_modules/victory-voronoi-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-voronoi-container/-/victory-voronoi-container-37.3.6.tgz", + "integrity": "sha512-qAAG0rMuK7A4EoJ4cyUk5wNdOW+HuCXNKPOko+hYK6wWOYXJvFhiglYyA85a695YyAXECc6JyJS/crm4IOEFag==", + "license": "MIT", + "dependencies": { + "delaunay-find": "0.0.6", + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6", + "victory-tooltip": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-zoom-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-zoom-container/-/victory-zoom-container-37.3.6.tgz", + "integrity": "sha512-AGL+k20mI44OL5b0VgIxlmnNSefIoFmbbim5NraPmIxbtns9qQW/56ivIncJcYomBungIx99gUpsEpcQaMNHgQ==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/weak-lru-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/charts/npm/package.json b/charts/npm/package.json new file mode 100644 index 000000000..82e86f918 --- /dev/null +++ b/charts/npm/package.json @@ -0,0 +1,56 @@ +{ + "name": "@patternfly-java/charts", + "private": false, + "version": "0.0.13", + "description": "Web Components wrapper around PatternFly React Charts", + "homepage": "https://patternfly-java.github.io/", + "repository": { + "type": "git", + "url": "git+https://github.com/patternfly/patternfly-java.git" + }, + "bugs": { + "url": "https://github.com/patternfly/patternfly-java/issues" + }, + "license": "Apache-2.0", + "keywords": ["java", "gwt", "j2cl", "patternfly", "elemento"], + "author": "Harald Pehl ", + "type": "module", + "source": "src/charts.js", + "scripts": { + "dev": "parcel serve demo.html --port 5173 --no-cache", + "build": "parcel build src/charts.js --no-cache", + "clean": "rimraf .parcel-cache dist" + }, + "devDependencies": { + "parcel": "^2.16.4", + "rimraf": "^6.1.2" + }, + "dependencies": { + "lit": "^3.3.2", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "hoist-non-react-statics": "^3.3.2", + "@patternfly/react-charts": "^8.4.1", + "@patternfly/react-styles": "^6.4.0", + "@patternfly/react-tokens": "^6.4.0", + "lodash": "^4.17.23", + "tslib": "^2.8.1", + "victory-area": "^37.3.6", + "victory-axis": "^37.3.6", + "victory-bar": "^37.3.6", + "victory-box-plot": "^37.3.6", + "victory-chart": "^37.3.6", + "victory-core": "^37.3.6", + "victory-create-container": "^37.3.6", + "victory-cursor-container": "^37.3.6", + "victory-group": "^37.3.6", + "victory-legend": "^37.3.6", + "victory-line": "^37.3.6", + "victory-pie": "^37.3.6", + "victory-scatter": "^37.3.6", + "victory-stack": "^37.3.6", + "victory-tooltip": "^37.3.6", + "victory-voronoi-container": "^37.3.6", + "victory-zoom-container": "^37.3.6" + } +} diff --git a/charts/npm/src/charts.js b/charts/npm/src/charts.js new file mode 100644 index 000000000..0e46d8335 --- /dev/null +++ b/charts/npm/src/charts.js @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Base class for the J2CL JsInterop base class org.patternfly.chart.ChartElement +class ChartElement extends HTMLElement { +} +window.ChartElement = ChartElement; + +import './components/pfj-chart-bullet.js'; +import './components/pfj-chart-donut.js'; +import './components/pfj-chart-donut-utilization.js'; +import './components/pfj-chart-donut-threshold.js'; +import './components/pfj-chart-pie.js'; + +export {ChartBulletWebComponent} from './components/pfj-chart-bullet.js'; +export {ChartDonutWebComponent} from './components/pfj-chart-donut.js'; +export {ChartDonutUtilizationWebComponent} from './components/pfj-chart-donut-utilization.js'; +export {ChartDonutThresholdWebComponent} from './components/pfj-chart-donut-threshold.js'; +export {ChartPieWebComponent} from './components/pfj-chart-pie.js'; diff --git a/charts/npm/src/components/pfj-chart-bullet.js b/charts/npm/src/components/pfj-chart-bullet.js new file mode 100644 index 000000000..8079a1515 --- /dev/null +++ b/charts/npm/src/components/pfj-chart-bullet.js @@ -0,0 +1,195 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {parseAttrValue, ReactWrapperElement} from '../react-wrapper.js'; +import {ChartBullet} from '@patternfly/react-charts/victory'; + +export class ChartBulletWebComponent extends ReactWrapperElement { + + constructor() { + super(); + this._comparativeErrorMeasureData = undefined; + this._comparativeErrorMeasureLegendData = undefined; + this._comparativeWarningMeasureData = undefined; + this._comparativeWarningMeasureLegendData = undefined; + this._maxDomain = undefined; + this._primaryDotMeasureData = undefined; + this._primaryDotMeasureLegendData = undefined; + this._primarySegmentedMeasureData = undefined; + this._primarySegmentedMeasureLegendData = undefined; + this._qualitativeRangeData = undefined; + this._qualitativeRangeLegendData = undefined; + } + + getReactComponent() { + const extraProps = {}; + if (this._comparativeErrorMeasureData && typeof this._comparativeErrorMeasureData !== 'string') { + extraProps.comparativeErrorMeasureData = this._comparativeErrorMeasureData; + } else if (this.getAttribute('comparative-error-measure-data')) { + extraProps.comparativeErrorMeasureData = parseAttrValue('comparative-error-measure-data', this.getAttribute('comparative-error-measure-data')); + } + if (this._comparativeErrorMeasureLegendData && typeof this._comparativeErrorMeasureLegendData !== 'string') { + extraProps.comparativeErrorMeasureLegendData = this._comparativeErrorMeasureLegendData; + } else if (this.getAttribute('comparative-error-measure-legend-data')) { + extraProps.comparativeErrorMeasureLegendData = parseAttrValue('comparative-error-measure-legend-data', this.getAttribute('comparative-error-measure-legend-data')); + } + if (this._comparativeWarningMeasureData && typeof this._comparativeWarningMeasureData !== 'string') { + extraProps.comparativeWarningMeasureData = this._comparativeWarningMeasureData; + } else if (this.getAttribute('comparative-warning-measure-data')) { + extraProps.comparativeWarningMeasureData = parseAttrValue('comparative-warning-measure-data', this.getAttribute('comparative-warning-measure-data')); + } + if (this._comparativeWarningMeasureLegendData && typeof this._comparativeWarningMeasureLegendData !== 'string') { + extraProps.comparativeWarningMeasureLegendData = this._comparativeWarningMeasureLegendData; + } else if (this.getAttribute('comparative-warning-measure-legend-data')) { + extraProps.comparativeWarningMeasureLegendData = parseAttrValue('comparative-warning-measure-legend-data', this.getAttribute('comparative-warning-measure-legend-data')); + } + if (this._maxDomain !== undefined) { + extraProps.maxDomain = Number(this._maxDomain); + } + if (this._primaryDotMeasureData && typeof this._primaryDotMeasureData !== 'string') { + extraProps.primaryDotMeasureData = this._primaryDotMeasureData; + } else if (this.getAttribute('primary-dot-measure-data')) { + extraProps.primaryDotMeasureData = parseAttrValue('primary-dot-measure-data', this.getAttribute('primary-dot-measure-data')); + } + if (this._primaryDotMeasureLegendData && typeof this._primaryDotMeasureLegendData !== 'string') { + extraProps.primaryDotMeasureLegendData = this._primaryDotMeasureLegendData; + } else if (this.getAttribute('primary-dot-measure-legend-data')) { + extraProps.primaryDotMeasureLegendData = parseAttrValue('primary-dot-measure-legend-data', this.getAttribute('primary-dot-measure-legend-data')); + } + if (this._primarySegmentedMeasureData && typeof this._primarySegmentedMeasureData !== 'string') { + extraProps.primarySegmentedMeasureData = this._primarySegmentedMeasureData; + } else if (this.getAttribute('primary-segmented-measure-data')) { + extraProps.primarySegmentedMeasureData = parseAttrValue('primary-segmented-measure-data', this.getAttribute('primary-segmented-measure-data')); + } + if (this._primarySegmentedMeasureLegendData && typeof this._primarySegmentedMeasureLegendData !== 'string') { + extraProps.primarySegmentedMeasureLegendData = this._primarySegmentedMeasureLegendData; + } else if (this.getAttribute('primary-segmented-measure-legend-data')) { + extraProps.primarySegmentedMeasureLegendData = parseAttrValue('primary-segmented-measure-legend-data', this.getAttribute('primary-segmented-measure-legend-data')); + } + if (this._qualitativeRangeData && typeof this._qualitativeRangeData !== 'string') { + extraProps.qualitativeRangeData = this._qualitativeRangeData; + } else if (this.getAttribute('qualitative-range-data')) { + extraProps.qualitativeRangeData = parseAttrValue('qualitative-range-data', this.getAttribute('qualitative-range-data')); + } + if (this._qualitativeRangeLegendData && typeof this._qualitativeRangeLegendData !== 'string') { + extraProps.qualitativeRangeLegendData = this._qualitativeRangeLegendData; + } else if (this.getAttribute('qualitative-range-legend-data')) { + extraProps.qualitativeRangeLegendData = parseAttrValue('qualitative-range-legend-data', this.getAttribute('qualitative-range-legend-data')); + } + + return [ChartBullet, extraProps]; + } + + get comparativeErrorMeasureData() { + return this._comparativeErrorMeasureData; + } + + set comparativeErrorMeasureData(value) { + this._comparativeErrorMeasureData = value; + this._notifyChange(); + } + + get comparativeErrorMeasureLegendData() { + return this._comparativeErrorMeasureLegendData; + } + + set comparativeErrorMeasureLegendData(value) { + this._comparativeErrorMeasureLegendData = value; + this._notifyChange(); + } + + get comparativeWarningMeasureData() { + return this._comparativeWarningMeasureData; + } + + set comparativeWarningMeasureData(value) { + this._comparativeWarningMeasureData = value; + this._notifyChange(); + } + + get comparativeWarningMeasureLegendData() { + return this._comparativeWarningMeasureLegendData; + } + + set comparativeWarningMeasureLegendData(value) { + this._comparativeWarningMeasureLegendData = value; + this._notifyChange(); + } + + get maxDomain() { + return this._maxDomain; + } + + set maxDomain(value) { + this._maxDomain = value; + this._notifyChange(); + } + + get primaryDotMeasureData() { + return this._primaryDotMeasureData; + } + + set primaryDotMeasureData(value) { + this._primaryDotMeasureData = value; + this._notifyChange(); + } + + get primaryDotMeasureLegendData() { + return this._primaryDotMeasureLegendData; + } + + set primaryDotMeasureLegendData(value) { + this._primaryDotMeasureLegendData = value; + this._notifyChange(); + } + + get primarySegmentedMeasureData() { + return this._primarySegmentedMeasureData; + } + + set primarySegmentedMeasureData(value) { + this._primarySegmentedMeasureData = value; + this._notifyChange(); + } + + get primarySegmentedMeasureLegendData() { + return this._primarySegmentedMeasureLegendData; + } + + set primarySegmentedMeasureLegendData(value) { + this._primarySegmentedMeasureLegendData = value; + this._notifyChange(); + } + + get qualitativeRangeData() { + return this._qualitativeRangeData; + } + + set qualitativeRangeData(value) { + this._qualitativeRangeData = value; + this._notifyChange(); + } + + get qualitativeRangeLegendData() { + return this._qualitativeRangeLegendData; + } + + set qualitativeRangeLegendData(value) { + this._qualitativeRangeLegendData = value; + this._notifyChange(); + } +} + +customElements.define('pfj-chart-bullet', ChartBulletWebComponent); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Settings.java b/charts/npm/src/components/pfj-chart-donut-threshold.js similarity index 63% rename from showcase/common/src/main/java/org/patternfly/showcase/Settings.java rename to charts/npm/src/components/pfj-chart-donut-threshold.js index 8bb82006b..bc032a198 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/Settings.java +++ b/charts/npm/src/components/pfj-chart-donut-threshold.js @@ -13,19 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.patternfly.showcase; +import {ReactWrapperElement} from '../react-wrapper.js'; +import {ChartDonutThreshold} from '@patternfly/react-charts/victory'; -public interface Settings { +export class ChartDonutThresholdWebComponent extends ReactWrapperElement { - default String base() { - return System.getProperty("settings.base", "/"); - } - - default String mode() { - return System.getProperty("settings.mode", "undefined"); - } - - default String tech() { - return System.getProperty("settings.tech", "undefined"); + getReactComponent() { + return [ChartDonutThreshold, {}]; } } + +customElements.define('pfj-chart-donut-threshold', ChartDonutThresholdWebComponent); diff --git a/charts/npm/src/components/pfj-chart-donut-utilization.js b/charts/npm/src/components/pfj-chart-donut-utilization.js new file mode 100644 index 000000000..be280e113 --- /dev/null +++ b/charts/npm/src/components/pfj-chart-donut-utilization.js @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {parseAttrValue, ReactWrapperElement} from '../react-wrapper.js'; +import {ChartDonutUtilization} from '@patternfly/react-charts/victory'; + +export class ChartDonutUtilizationWebComponent extends ReactWrapperElement { + + constructor() { + super(); + this._thresholds = undefined; + } + + getReactComponent() { + const extraProps = {}; + if (this._thresholds && typeof this._thresholds !== 'string') { + extraProps.thresholds = this._thresholds; + } else if (this.getAttribute('thresholds')) { + extraProps.thresholds = parseAttrValue('thresholds', this.getAttribute('thresholds')); + } + return [ChartDonutUtilization, extraProps]; + } + + get thresholds() { + return this._thresholds; + } + + set thresholds(value) { + this._thresholds = value; + this._notifyChange(); + } +} + +customElements.define('pfj-chart-donut-utilization', ChartDonutUtilizationWebComponent); diff --git a/showcase/j2cl/src/main/java/org/patternfly/showcase/Main.java b/charts/npm/src/components/pfj-chart-donut.js similarity index 66% rename from showcase/j2cl/src/main/java/org/patternfly/showcase/Main.java rename to charts/npm/src/components/pfj-chart-donut.js index caca21d9d..4bf1ad1de 100644 --- a/showcase/j2cl/src/main/java/org/patternfly/showcase/Main.java +++ b/charts/npm/src/components/pfj-chart-donut.js @@ -13,18 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.patternfly.showcase; +import {ReactWrapperElement} from '../react-wrapper.js'; +import {ChartDonut} from '@patternfly/react-charts/victory'; -import org.kie.j2cl.tools.processors.annotations.GWT3EntryPoint; +export class ChartDonutWebComponent extends ReactWrapperElement { -import static org.patternfly.showcase.Environment.env; - -public class Main { - - @GWT3EntryPoint - public void onModuleLoad() { - Showcase.init(env()); - Showcase.start(); - Showcase.log(env()); + getReactComponent() { + return [ChartDonut, {}]; } } + +customElements.define('pfj-chart-donut', ChartDonutWebComponent); diff --git a/charts/npm/src/components/pfj-chart-pie.js b/charts/npm/src/components/pfj-chart-pie.js new file mode 100644 index 000000000..5a077728a --- /dev/null +++ b/charts/npm/src/components/pfj-chart-pie.js @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {parseAttrValue, ReactWrapperElement} from '../react-wrapper.js'; +import { ChartPie } from '@patternfly/react-charts/victory'; + +export class ChartPieWebComponent extends ReactWrapperElement { + + constructor() { + super(); + this._colorScale = undefined; + } + + getReactComponent() { + const extraProps = {}; + if (this._colorScale && typeof this._colorScale !== 'string') { + extraProps.colorScale = this._colorScale; + } else if (this.getAttribute('color-scale')) { + extraProps.colorScale = parseAttrValue('color-scale', this.getAttribute('color-scale')); + } + return [ChartPie, extraProps]; + } + + get colorScale() { + return this._colorScale; + } + + set colorScale(value) { + this._colorScale = value; + this._notifyChange(); + } +} + +customElements.define('pfj-chart-pie', ChartPieWebComponent); \ No newline at end of file diff --git a/charts/npm/src/react-wrapper.js b/charts/npm/src/react-wrapper.js new file mode 100644 index 000000000..6f41bb0d9 --- /dev/null +++ b/charts/npm/src/react-wrapper.js @@ -0,0 +1,393 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {css, html, LitElement} from 'lit'; +import React from 'react'; +import {createRoot} from 'react-dom/client'; + +// ------------------------------------------------------ static helpers + +// Parse attribute values to JS types +export const parseAttrValue = (name, value) => { + if (value === '' || value === undefined || value === null) { + // boolean attribute presence => true + return true; + } + const trimmed = String(value).trim(); + if (trimmed === 'true') return true; + if (trimmed === 'false') return false; + if (/^\d+(?:\.\d+)?$/.test(trimmed)) return Number(trimmed); + // JSON arrays or objects + if ((trimmed.startsWith('{') && trimmed.endsWith('}')) || (trimmed.startsWith('[') && trimmed.endsWith(']'))) { + try { + return JSON.parse(trimmed); + } catch (_) { + // fallthrough + } + } + return value; +}; + +// Build props from attributes of an element +const _buildPropsFromAttributes = (el) => { + const props = {}; + for (const attr of el.attributes) { + const camel = _dashToCamel(attr.name); + // skip standard attributes not relevant to React props + if (camel === 'class' || camel === 'style') continue; + props[camel] = parseAttrValue(camel, attr.value); + } + return props; +}; + +const _dashToCamel = (str) => str.replace(/-([a-z])/g, (_, c) => c.toUpperCase()); + +// Props we currently do not support because they expect React elements +const disallowedProps = new Set([ + 'containerComponent', + 'desc', + 'events', + 'groupComponent', + 'labelComponent', + 'legendComponent', + 'subTitleComponent', + 'titleComponent', +]); + +// ------------------------------------------------------ instance + +export class ReactWrapperElement extends LitElement { + static styles = css` + :host { + display: inline-block; + } + + .container { + width: 100%; + height: 100%; + } + `; + + constructor() { + super(); + this._root = null; + this._container = null; + this._observer = null; + this._component = null; + + // Common properties applicable to all React chart components that are + // a) either complex attributes such as a function or structured (JSON) data or + // b) trigger a re-render when changed. + this._categories = undefined; // string[] + this._data = undefined; // any | any[] + this._height = undefined; // number + this._labels = undefined; // (data: any) => string + this._legendData = undefined; // { name?: string; symbol?: { fill?: string; type?: string; }; }[] + this._legendOrientation = undefined; // string + this._legendPosition = undefined; // string + this._padding = undefined; // { top?: number; bottom?: number; left?: number; right?: number } + this._subTitle = undefined; // string + this._subTitlePosition = undefined; // string + this._themeColor = undefined; // string + this._title = undefined; // string + this._width = undefined; // number + } + + // ------------------------------------------------------ render + + createRenderRoot() { + // Use shadow root to encapsulate but allow React to mount inside + return super.createRenderRoot(); + } + + render() { + return html` +
+ `; + } + + // Must be implemented by subclasses to return [ReactComponent, extraProps] + getReactComponent() { + throw new Error('getReactComponent() must be implemented by subclass'); + } + + // central render method for standalone and slotted elements. + _renderReact() { + if (!this._root) return; + + const rawProps = _buildPropsFromAttributes(this); + const commonProps = this._commonProps(); + const [Component, extraProps = {}] = this.getReactComponent(); + const props = {...rawProps, ...commonProps, ...extraProps}; + for (const key of Object.keys(props)) { + if (disallowedProps.has(key)) delete props[key]; + } + + const children = this._getReactChildren(); + this._root.render(React.createElement(Component, props, ...children)); + } + + _getReactChildren() { + const slot = this.renderRoot.querySelector('slot'); + if (!slot) return []; + + const assignedElements = slot.assignedElements(); + const reactChildren = []; + + for (const el of assignedElements) { + if (el instanceof ReactWrapperElement) { + const childRawProps = _buildPropsFromAttributes(el); + const childCommonProps = el._commonProps(); // Use child's common props, not parent's! + const [ChildComponent, childExtraProps = {}] = el.getReactComponent(); + const childProps = {...childRawProps, ...childCommonProps, ...childExtraProps}; + for (const key of Object.keys(childProps)) { + if (disallowedProps.has(key)) delete childProps[key]; + } + reactChildren.push(React.createElement(ChildComponent, childProps)); + } + } + return reactChildren; + } + + // ------------------------------------------------------ lifecycle + + firstUpdated(_changedProperties) { + this._container = this.renderRoot.querySelector('.container'); + + // Check if this element is slotted into a parent that will handle rendering + const isSlotted = this._isSlottedChild(); + + if (isSlotted) { + // If slotted, DON'T create a React root - parent will handle rendering + this._observer = new MutationObserver(() => { + const parent = this.parentElement; + if (parent && parent instanceof ReactWrapperElement && parent._renderReact) { + parent._renderReact(); + } + }); + this._observer.observe(this, {attributes: true}); + } else { + // If standalone, create React root and render normally + this._root = createRoot(this._container); + this._observer = new MutationObserver(() => this._renderReact()); + this._observer.observe(this, {attributes: true, childList: true, subtree: true}); + + // Listen to slot changes to re-render when children change + const slot = this.renderRoot.querySelector('slot'); + if (slot) { + slot.addEventListener('slotchange', () => this._renderReact()); + } + this._renderReact(); + } + } + + disconnectedCallback() { + if (this._observer) { + this._observer.disconnect(); + this._observer = null; + } + if (this._root) { + this._root.unmount(); + this._root = null; + } + super.disconnectedCallback(); + } + + _isSlottedChild() { + // Check if this element's parent is also a ReactWrapperElement + const parent = this.parentElement; + return parent && parent instanceof ReactWrapperElement; + } + + _notifyChange() { + const parent = this.parentElement; + if (parent && parent instanceof ReactWrapperElement && parent._renderReact) { + // If slotted, notify the parent to re-render + parent._renderReact(); + } else if (this._renderReact) { + // If standalone, render self + this._renderReact(); + } + } + + // ------------------------------------------------------ getters/setters + + get categories() { + return this._categories; + } + + set categories(value) { + this._categories = value; + this._notifyChange(); + } + + get data() { + return this._data; + } + + set data(value) { + this._data = value; + this._notifyChange(); + } + + get height() { + return this._height; + } + + set height(value) { + this._height = value; + this._notifyChange(); + } + + get labels() { + return this._labels; + } + + set labels(value) { + this._labels = value; + this._notifyChange(); + } + + get legendData() { + return this._legendData; + } + + set legendData(value) { + this._legendData = value; + this._notifyChange(); + } + + get legendOrientation() { + return this._legendOrientation; + } + + set legendOrientation(value) { + this._legendOrientation = value; + this._notifyChange(); + } + + get legendPosition() { + return this._legendPosition; + } + + set legendPosition(value) { + this._legendPosition = value; + this._notifyChange(); + } + + get padding() { + return this._padding; + } + + set padding(value) { + this._padding = value; + this._notifyChange(); + } + + get subTitle() { + return this._subTitle; + } + + set subTitle(value) { + this._subTitle = value; + this._notifyChange(); + } + + get subTitlePosition() { + return this._subTitlePosition; + } + + set subTitlePosition(value) { + this._subTitlePosition = value; + this._notifyChange(); + } + + get themeColor() { + return this._themeColor; + } + + set themeColor(value) { + this._themeColor = value; + this._notifyChange(); + } + + get title() { + return this._title; + } + + set title(value) { + this._title = value; + this._notifyChange(); + } + + get width() { + return this._width; + } + + set width(value) { + this._width = value; + this._notifyChange(); + } + + _commonProps() { + const commonProps = {}; + if (this._categories && typeof this._categories !== 'string') { + commonProps.categories = this._categories; + } else if (this.getAttribute('categories')) { + commonProps.categories = parseAttrValue('categories', this.getAttribute('categories')); + } + if (this._data && typeof this._data !== 'string') { + commonProps.data = this._data; + } else if (this.getAttribute('data')) { + commonProps.data = parseAttrValue('data', this.getAttribute('data')); + } + if (this._height !== undefined) { + commonProps.height = Number(this._height); + } + if (this._labels !== undefined) { + commonProps.labels = this._labels; + } + if (this._legendData && typeof this._legendData !== 'string') { + commonProps.legendData = this._legendData; + } else if (this.getAttribute('legend-data')) { + commonProps.legendData = parseAttrValue('legend-data', this.getAttribute('legend-data')); + } + if (this._legendOrientation !== undefined) { + commonProps.legendOrientation = this._legendOrientation; + } + if (this._legendPosition !== undefined) { + commonProps.legendPosition = this._legendPosition; + } + if (this._padding !== undefined) { + commonProps.padding = this._padding; + } + if (this._subTitle !== undefined) { + commonProps.subTitle = this._subTitle; + } + if (this._subTitlePosition !== undefined) { + commonProps.subTitlePosition = this._subTitlePosition; + } + if (this._themeColor !== undefined) { + commonProps.themeColor = this._themeColor; + } + if (this._title !== undefined) { + commonProps.title = this._title; + } + if (this._width !== undefined) { + commonProps.width = Number(this._width); + } + return commonProps; + } +} diff --git a/charts/pom.xml b/charts/pom.xml new file mode 100644 index 000000000..0b90db854 --- /dev/null +++ b/charts/pom.xml @@ -0,0 +1,77 @@ + + + + 4.0.0 + + + org.patternfly + patternfly-java-code-parent + 0.4.18-SNAPSHOT + ../code-parent/pom.xml + + + patternfly-java-charts + gwt-lib + PatternFly Java Charts + PatternFly Java Charts + + + + ${project.groupId} + patternfly-java-core + + + ${project.groupId} + patternfly-java-tokens + + + org.junit.jupiter + junit-jupiter + test + + + + + + + src/main/java + + **/*.js + + + + src/main/resources + + **/*.js + + + + + + + net.ltgt.gwt.maven + gwt-maven-plugin + + org.patternfly.Charts + + + + + diff --git a/charts/src/main/java/org/patternfly/chart/BaseChart.java b/charts/src/main/java/org/patternfly/chart/BaseChart.java new file mode 100644 index 000000000..490d0fdd5 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/BaseChart.java @@ -0,0 +1,170 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import org.jboss.elemento.ElementAttributeMethods; +import org.jboss.elemento.ElementClassListMethods; +import org.jboss.elemento.ElementConsumerMethods; +import org.jboss.elemento.ElementContainerMethods; +import org.jboss.elemento.ElementEventMethods; +import org.jboss.elemento.ElementIdMethods; +import org.jboss.elemento.ElementQueryMethods; +import org.jboss.elemento.HTMLElementAttributeMethods; +import org.jboss.elemento.HTMLElementDataMethods; +import org.jboss.elemento.HTMLElementStyleMethods; +import org.jboss.elemento.HTMLElementVisibilityMethods; +import org.jboss.elemento.TypedBuilder; + +import elemental2.core.JsArray; +import jsinterop.base.Js; + +import static java.util.Objects.requireNonNull; +import static org.patternfly.core.Ouia.ouia; + +public abstract class BaseChart> implements + Chart, + ElementAttributeMethods, + ElementClassListMethods, + ElementConsumerMethods, + ElementContainerMethods, + ElementEventMethods, + ElementIdMethods, + ElementQueryMethods, + HTMLElementAttributeMethods, + HTMLElementDataMethods, + HTMLElementStyleMethods, + HTMLElementVisibilityMethods { + + // ------------------------------------------------------ instance + + private final ChartType chartType; + private final E element; + + protected BaseChart(ChartType chartType, E element) { + this.chartType = requireNonNull(chartType, "chart type required"); + this.element = Js.uncheckedCast(requireNonNull(element, "element required")); + ouia(element, chartType.id, chartType.chartName); + } + + @Override + public ChartType chartType() { + return chartType; + } + + @Override + public E element() { + return element; + } + + // ------------------------------------------------------ builder + + public B height(int height) { + element().height = height; + return that(); + } + + public B legendData(String... legend) { + element().legendData = legendDataArray(legend); + return that(); + } + + public B legendData(LegendData... legend) { + element().legendData = legendDataArray(legend); + return that(); + } + + public B legendOrientation(LegendOrientation orientation) { + element().legendOrientation = orientation.name().toLowerCase(); + return that(); + } + + public B legendPosition(LegendPosition position) { + element().legendPosition = position.name().toLowerCase(); + return that(); + } + + public B padding(Padding padding) { + element().padding = padding; + return that(); + } + + public B subTitle(String subTitle) { + element().subTitle = subTitle; + return that(); + } + + public B subTitlePosition(SubTitlePosition position) { + element().subTitlePosition = position.name().toLowerCase(); + return that(); + } + + public B themeColor(ChartThemeColor themeColor) { + element().themeColor = themeColor.color; + return that(); + } + + public B title(String title) { + element().title = title; + return that(); + } + + public B width(int width) { + element().width = width; + return that(); + } + + // ------------------------------------------------------ aria + + public B ariaTitle(String ariaTitle) { + element().setAttribute("aria-title", ariaTitle); + return that(); + } + + public B ariaDesc(String ariaDesc) { + element().setAttribute("aria-desc", ariaDesc); + return that(); + } + + // ------------------------------------------------------ internal + + protected JsArray dataArray(Data... data) { + JsArray array = new JsArray<>(); + if (data != null) { + array.push(data); + } + return array; + } + + protected JsArray legendDataArray(String... legend) { + JsArray array = new JsArray<>(); + if (legend != null) { + for (String l : legend) { + LegendData ld = new LegendData(); + ld.name = l; + array.push(ld); + } + } + return array; + } + + protected JsArray legendDataArray(LegendData... legend) { + JsArray array = new JsArray<>(); + if (legend != null) { + array.push(legend); + } + return array; + } +} diff --git a/showcase/gwt/src/web/main.js b/charts/src/main/java/org/patternfly/chart/Chart.java similarity index 66% rename from showcase/gwt/src/web/main.js rename to charts/src/main/java/org/patternfly/chart/Chart.java index 51b6e3734..5399eff7c 100644 --- a/showcase/gwt/src/web/main.js +++ b/charts/src/main/java/org/patternfly/chart/Chart.java @@ -13,12 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import "@patternfly/patternfly/patternfly.css"; -import "@patternfly/patternfly/patternfly-addons.css"; +package org.patternfly.chart; -import "showcase-common/pforg/*.css"; -import "showcase-common/showcase.css"; +public interface Chart { -import hljs from "highlight.js/lib/common"; -import "highlight.js/styles/github.css"; -window["hljs"] = hljs; // 'export' for GWT + ChartType chartType(); +} diff --git a/charts/src/main/java/org/patternfly/chart/ChartElement.java b/charts/src/main/java/org/patternfly/chart/ChartElement.java new file mode 100644 index 000000000..ee7a9a00e --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/ChartElement.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import elemental2.core.JsArray; +import elemental2.dom.HTMLElement; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL) +public class ChartElement extends HTMLElement { + + public JsArray categories; + public double height; + public LabelsFn labels; + public JsArray legendData; + public String legendOrientation; + public String legendPosition; + public Padding padding; + public String subTitle; + public String subTitlePosition; + public String themeColor; + public String title; + public double width; +} diff --git a/charts/src/main/java/org/patternfly/chart/ChartThemeColor.java b/charts/src/main/java/org/patternfly/chart/ChartThemeColor.java new file mode 100644 index 000000000..cd8216993 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/ChartThemeColor.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +public enum ChartThemeColor { + + blue("blue"), + teal("teal"), + default_("blue"), + yellow("yellow"), + gray("gray"), + green("green"), + multi("multi"), + multiOrdered("multi-ordered"), + multiUnordered("multi-unordered"), + orange("orange"), + purple("purple"), + skeleton("skeleton"); + + public final String color; + + ChartThemeColor(String color) { + this.color = color; + } +} diff --git a/charts/src/main/java/org/patternfly/chart/ChartType.java b/charts/src/main/java/org/patternfly/chart/ChartType.java new file mode 100644 index 000000000..56f2b96a0 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/ChartType.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +public enum ChartType { + + Bullet("blt", "PF6/Chart/Bullet"), + + Donut("dnt", "PF6/Chart/Donut"), + + DonutUtilization("dntu", "PF6/Chart/DonutUtilization"), + + DonutThreshold("dntt", "PF6/Chart/DonutThreshold"), + + Pie("pie", "PF6/Chart/Pie") + ; + + public final String id; + public final String chartName; + + ChartType(String id, String chartName) { + this.id = id; + this.chartName = chartName; + } +} diff --git a/charts/src/main/java/org/patternfly/chart/Data.java b/charts/src/main/java/org/patternfly/chart/Data.java new file mode 100644 index 000000000..9ad6420be --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/Data.java @@ -0,0 +1,35 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class Data { + + @JsOverlay + public static Data data(String x, double y) { + Data data = new Data(); + data.x = x; + data.y = y; + return data; + } + + public String x; + public double y; +} diff --git a/showcase/j2cl/src/main/java/org/patternfly/showcase/settings.js b/charts/src/main/java/org/patternfly/chart/LabelsFn.java similarity index 69% rename from showcase/j2cl/src/main/java/org/patternfly/showcase/settings.js rename to charts/src/main/java/org/patternfly/chart/LabelsFn.java index 049ff800d..2210b6b20 100644 --- a/showcase/j2cl/src/main/java/org/patternfly/showcase/settings.js +++ b/charts/src/main/java/org/patternfly/chart/LabelsFn.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -goog.provide('settings'); +package org.patternfly.chart; -/** @define {string} */ -settings.base = goog.define('settings.base', '/'); +import jsinterop.annotations.JsFunction; +import jsinterop.base.Any; -/** @define {string} */ -settings.mode = goog.define('settings.mode', 'undefined'); +@JsFunction +@FunctionalInterface +public interface LabelsFn { -/** @define {string} */ -settings.tech = goog.define('settings.tech', 'j2cl'); + String label(Any data); +} diff --git a/charts/src/main/java/org/patternfly/chart/LegendData.java b/charts/src/main/java/org/patternfly/chart/LegendData.java new file mode 100644 index 000000000..6d510ffbd --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/LegendData.java @@ -0,0 +1,26 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class LegendData { + + public String name; + public LegendDataSymbol symbol; +} diff --git a/charts/src/main/java/org/patternfly/chart/LegendDataSymbol.java b/charts/src/main/java/org/patternfly/chart/LegendDataSymbol.java new file mode 100644 index 000000000..5c2da599d --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/LegendDataSymbol.java @@ -0,0 +1,26 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class LegendDataSymbol { + + public String fill; + public String type; +} diff --git a/charts/src/main/java/org/patternfly/chart/LegendOrientation.java b/charts/src/main/java/org/patternfly/chart/LegendOrientation.java new file mode 100644 index 000000000..33a99dad7 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/LegendOrientation.java @@ -0,0 +1,21 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +public enum LegendOrientation { + + horizontal, vertical +} diff --git a/showcase/j2cl/src/main/java/org/patternfly/showcase/Environment.native.js b/charts/src/main/java/org/patternfly/chart/LegendPosition.java similarity index 88% rename from showcase/j2cl/src/main/java/org/patternfly/showcase/Environment.native.js rename to charts/src/main/java/org/patternfly/chart/LegendPosition.java index ccc41cb8a..cee738bfb 100644 --- a/showcase/j2cl/src/main/java/org/patternfly/showcase/Environment.native.js +++ b/charts/src/main/java/org/patternfly/chart/LegendPosition.java @@ -13,4 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const settings = goog.require('settings'); +package org.patternfly.chart; + +public enum LegendPosition { + + bottom, right +} diff --git a/charts/src/main/java/org/patternfly/chart/Padding.java b/charts/src/main/java/org/patternfly/chart/Padding.java new file mode 100644 index 000000000..b88ab6e0a --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/Padding.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class Padding { + + @JsOverlay + public static Padding padding(double top, double right, double bottom, double left) { + Padding padding = new Padding(); + padding.top = top; + padding.right = right; + padding.bottom = bottom; + padding.left = left; + return padding; + } + + public double top; + public double right; + public double bottom; + public double left; +} diff --git a/charts/src/main/java/org/patternfly/chart/SubTitlePosition.java b/charts/src/main/java/org/patternfly/chart/SubTitlePosition.java new file mode 100644 index 000000000..b042e1c96 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/SubTitlePosition.java @@ -0,0 +1,21 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +public enum SubTitlePosition { + + bottom, center, right +} diff --git a/charts/src/main/java/org/patternfly/chart/Threshold.java b/charts/src/main/java/org/patternfly/chart/Threshold.java new file mode 100644 index 000000000..8cc4e3b40 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/Threshold.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart; + +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class Threshold { + + @JsOverlay + public static Threshold threshold(double value) { + Threshold threshold = new Threshold(); + threshold.value = value; + return threshold; + } + + @JsOverlay + public static Threshold threshold(double value, String color) { + Threshold threshold = new Threshold(); + threshold.value = value; + threshold.color = color; + return threshold; + } + + public double value; + public String color; +} diff --git a/charts/src/main/java/org/patternfly/chart/bullet/Bullet.java b/charts/src/main/java/org/patternfly/chart/bullet/Bullet.java new file mode 100644 index 000000000..5adbeb3c9 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/bullet/Bullet.java @@ -0,0 +1,150 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.bullet; + +import java.util.function.Function; + +import org.patternfly.chart.BaseChart; +import org.patternfly.chart.ChartType; +import org.patternfly.chart.LegendData; + +import elemental2.core.JsArray; +import jsinterop.base.Js; + +import static org.jboss.elemento.Elements.createHtmlElement; + +public class Bullet extends BaseChart { + + // ------------------------------------------------------ factory + + public static Bullet bullet() { + return new Bullet(); + } + + // ------------------------------------------------------ instance + + Bullet() { + super(ChartType.Bullet, Js.uncheckedCast(createHtmlElement("pfj-chart-bullet", BulletElement.class))); + } + + // ------------------------------------------------------ builder + + public Bullet comparativeErrorMeasureData(BulletData... data) { + element().comparativeErrorMeasureData = bulletData(data); + return that(); + } + + public Bullet comparativeErrorMeasureLegendData(String... data) { + element().comparativeErrorMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet comparativeErrorMeasureLegendData(LegendData... data) { + element().comparativeErrorMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet comparativeWarningMeasureData(BulletData... data) { + element().comparativeWarningMeasureData = bulletData(data); + return that(); + } + + public Bullet comparativeWarningMeasureLegendData(String... data) { + element().comparativeWarningMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet comparativeWarningMeasureLegendData(LegendData... data) { + element().comparativeWarningMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet primaryDotMeasureData(BulletData... data) { + element().primaryDotMeasureData = bulletData(data); + return that(); + } + + public Bullet primaryDotMeasureLegendData(String... data) { + element().primaryDotMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet primaryDotMeasureLegendData(LegendData... data) { + element().primaryDotMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet primarySegmentedMeasureData(BulletData... data) { + element().primarySegmentedMeasureData = bulletData(data); + return that(); + } + + public Bullet primarySegmentedMeasureLegendData(String... data) { + element().primarySegmentedMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet primarySegmentedMeasureLegendData(LegendData... data) { + element().primarySegmentedMeasureLegendData = legendDataArray(data); + return that(); + } + + public Bullet qualitativeRangeData(BulletData... data) { + element().qualitativeRangeData = bulletData(data); + return that(); + } + + public Bullet qualitativeRangeLegendData(String... data) { + element().qualitativeRangeLegendData = legendDataArray(data); + return that(); + } + + public Bullet qualitativeRangeLegendData(LegendData... data) { + element().qualitativeRangeLegendData = legendDataArray(data); + return that(); + } + + public Bullet labels(Function labels) { + // There's a lot more in 'data', but we just want the 'datum' property + element().labels = (data -> labels.apply(Js.cast(data.asPropertyMap().get("datum")))); + return that(); + } + + public Bullet invert() { + element().setAttribute("invert", true); + return this; + } + + public Bullet maxDomain(double maxDomain) { + element().setAttribute("max-domain", maxDomain); + return this; + } + + @Override + public Bullet that() { + return this; + } + + // ------------------------------------------------------ internal + + private JsArray bulletData(BulletData... data) { + JsArray array = new JsArray<>(); + if (data != null) { + array.push(data); + } + return array; + } +} diff --git a/showcase/j2cl/src/main/java/org/patternfly/showcase/Environment.java b/charts/src/main/java/org/patternfly/chart/bullet/BulletData.java similarity index 55% rename from showcase/j2cl/src/main/java/org/patternfly/showcase/Environment.java rename to charts/src/main/java/org/patternfly/chart/bullet/BulletData.java index 82e0de098..88f3d8061 100644 --- a/showcase/j2cl/src/main/java/org/patternfly/showcase/Environment.java +++ b/charts/src/main/java/org/patternfly/chart/bullet/BulletData.java @@ -13,25 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.patternfly.showcase; +package org.patternfly.chart.bullet; -@SuppressWarnings({"FieldMayBeFinal", "unused"}) -public class Environment implements Settings { +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; - // ------------------------------------------------------ factory +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class BulletData { - public static Environment env() { - return instance; + @JsOverlay + public static BulletData bulletData(String name, double y) { + BulletData data = new BulletData(); + data.name = name; + data.y = y; + return data; } - private static Environment instance; - - static { - instance = new Environment(); - } - - // ------------------------------------------------------ instance - - private Environment() { - } + public String name; + public double y; } diff --git a/charts/src/main/java/org/patternfly/chart/bullet/BulletElement.java b/charts/src/main/java/org/patternfly/chart/bullet/BulletElement.java new file mode 100644 index 000000000..deabbf7bb --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/bullet/BulletElement.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.bullet; + +import org.patternfly.chart.ChartElement; +import org.patternfly.chart.LegendData; + +import elemental2.core.JsArray; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "HTMLElement") +public class BulletElement extends ChartElement { + + public JsArray comparativeErrorMeasureData; + public JsArray comparativeErrorMeasureLegendData; + public JsArray comparativeWarningMeasureData; + public JsArray comparativeWarningMeasureLegendData; + public JsArray primaryDotMeasureData; + public JsArray primaryDotMeasureLegendData; + public JsArray primarySegmentedMeasureData; + public JsArray primarySegmentedMeasureLegendData; + public JsArray qualitativeRangeData; + public JsArray qualitativeRangeLegendData; +} diff --git a/charts/src/main/java/org/patternfly/chart/donut/Donut.java b/charts/src/main/java/org/patternfly/chart/donut/Donut.java new file mode 100644 index 000000000..36ae10f0e --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/donut/Donut.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.donut; + +import java.util.function.Function; + +import org.patternfly.chart.BaseChart; +import org.patternfly.chart.ChartType; +import org.patternfly.chart.Data; + +import elemental2.core.JsArray; +import jsinterop.base.Js; + +import static org.jboss.elemento.Elements.createHtmlElement; + +public class Donut extends BaseChart { + + // ------------------------------------------------------ factory + + public static Donut donut() { + return new Donut(); + } + + // ------------------------------------------------------ instance + + Donut() { + super(ChartType.Donut, Js.uncheckedCast(createHtmlElement("pfj-chart-donut", DonutElement.class))); + } + + // ------------------------------------------------------ builder + + public Donut data(Data... data) { + element().data = dataArray(data); + return that(); + } + + public Donut labels(Function labels) { + // There's a lot more in 'data', but we just want the 'datum' property + element().labels = (data -> labels.apply(Js.cast(data.asPropertyMap().get("datum")))); + return this; + } + + @Override + public Donut that() { + return this; + } + + // ------------------------------------------------------ api + + public JsArray data() { + return element().data; + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Assets.java b/charts/src/main/java/org/patternfly/chart/donut/DonutElement.java similarity index 61% rename from showcase/common/src/main/java/org/patternfly/showcase/Assets.java rename to charts/src/main/java/org/patternfly/chart/donut/DonutElement.java index f6ea77f96..b714b24b2 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/Assets.java +++ b/charts/src/main/java/org/patternfly/chart/donut/DonutElement.java @@ -13,13 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.patternfly.showcase; +package org.patternfly.chart.donut; -public final class Assets { +import org.patternfly.chart.ChartElement; +import org.patternfly.chart.Data; - public static String avatarDark = "data:image/svg+xml;base64," + ResourceBundle.avatarDark; +import elemental2.core.JsArray; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; - public static String avatarLight = "data:image/svg+xml;base64," + ResourceBundle.avatarLight; +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "HTMLElement") +public class DonutElement extends ChartElement { - public static String pfLogo = "data:image/svg+xml;base64," + ResourceBundle.pfLogo; + public JsArray data; } diff --git a/charts/src/main/java/org/patternfly/chart/pie/Pie.java b/charts/src/main/java/org/patternfly/chart/pie/Pie.java new file mode 100644 index 000000000..e96f20225 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/pie/Pie.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.pie; + +import java.util.function.Function; + +import org.patternfly.chart.BaseChart; +import org.patternfly.chart.ChartType; +import org.patternfly.chart.Data; + +import elemental2.core.JsArray; +import jsinterop.base.Js; + +import static org.jboss.elemento.Elements.createHtmlElement; + +public class Pie extends BaseChart { + + // ------------------------------------------------------ factory + + public static Pie pie() { + return new Pie(); + } + + // ------------------------------------------------------ instance + + Pie() { + super(ChartType.Pie, Js.uncheckedCast(createHtmlElement("pfj-chart-pie", PieElement.class))); + } + + // ------------------------------------------------------ builder + + public Pie data(Data... data) { + element().data = dataArray(data); + return that(); + } + + public Pie labels(Function labels) { + // There's a lot more in 'data', but we just want the 'datum' property + element().labels = (data -> labels.apply(Js.cast(data.asPropertyMap().get("datum")))); + return this; + } + + public Pie colorScale(String... colors) { + JsArray array = new JsArray<>(); + if (colors != null) { + array.push(colors); + } + element().colorScale = array; + return this; + } + + @Override + public Pie that() { + return this; + } + + // ------------------------------------------------------ api + + public JsArray data() { + return element().data; + } +} diff --git a/charts/src/main/java/org/patternfly/chart/pie/PieElement.java b/charts/src/main/java/org/patternfly/chart/pie/PieElement.java new file mode 100644 index 000000000..f4e5a70f7 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/pie/PieElement.java @@ -0,0 +1,29 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.pie; + +import org.patternfly.chart.ChartElement; +import org.patternfly.chart.Data; + +import elemental2.core.JsArray; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "HTMLElement") +public class PieElement extends ChartElement { + public JsArray data; + public JsArray colorScale; +} diff --git a/charts/src/main/java/org/patternfly/chart/utilization/DonutThreshold.java b/charts/src/main/java/org/patternfly/chart/utilization/DonutThreshold.java new file mode 100644 index 000000000..c7af619e2 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/utilization/DonutThreshold.java @@ -0,0 +1,81 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.utilization; + +import java.util.function.Function; + +import org.patternfly.chart.BaseChart; +import org.patternfly.chart.ChartType; +import org.patternfly.chart.Data; + +import elemental2.core.JsArray; +import jsinterop.base.Js; + +import static org.jboss.elemento.Elements.createHtmlElement; + +public class DonutThreshold extends BaseChart { + + // ------------------------------------------------------ factory + + public static DonutThreshold donutThreshold() { + return new DonutThreshold(); + } + + // ------------------------------------------------------ instance + + DonutThreshold() { + super(ChartType.Donut, Js.uncheckedCast(createHtmlElement("pfj-chart-donut-threshold", DonutThresholdElement.class))); + } + + // ------------------------------------------------------ add + + public DonutThreshold addUtilization(DonutUtilization utilization) { + return add(utilization); + } + + public DonutThreshold add(DonutUtilization utilization) { + return add(utilization.element()); + } + + // ------------------------------------------------------ builder + + public DonutThreshold data(Data... data) { + element().data = dataArray(data); + return that(); + } + + public DonutThreshold invert() { + element().setAttribute("invert", true); + return this; + } + + public DonutThreshold labels(Function labels) { + // There's a lot more in 'data', but we just want the 'datum' property + element().labels = (data -> labels.apply(Js.cast(data.asPropertyMap().get("datum")))); + return this; + } + + @Override + public DonutThreshold that() { + return this; + } + + // ------------------------------------------------------ api + + public JsArray data() { + return element().data; + } +} diff --git a/charts/src/main/java/org/patternfly/chart/utilization/DonutThresholdElement.java b/charts/src/main/java/org/patternfly/chart/utilization/DonutThresholdElement.java new file mode 100644 index 000000000..8c25c9588 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/utilization/DonutThresholdElement.java @@ -0,0 +1,31 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.utilization; + +import org.patternfly.chart.ChartElement; +import org.patternfly.chart.Data; +import org.patternfly.chart.Threshold; + +import elemental2.core.JsArray; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "HTMLElement") +public class DonutThresholdElement extends ChartElement { + + public JsArray data; + public JsArray thresholds; +} diff --git a/charts/src/main/java/org/patternfly/chart/utilization/DonutUtilization.java b/charts/src/main/java/org/patternfly/chart/utilization/DonutUtilization.java new file mode 100644 index 000000000..9bf92dcc6 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/utilization/DonutUtilization.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.utilization; + +import java.util.function.Function; + +import org.patternfly.chart.BaseChart; +import org.patternfly.chart.ChartType; +import org.patternfly.chart.Data; +import org.patternfly.chart.Threshold; + +import elemental2.core.JsArray; +import jsinterop.base.Js; + +import static org.jboss.elemento.Elements.createHtmlElement; +import static org.patternfly.chart.Threshold.threshold; + +public class DonutUtilization extends BaseChart { + + // ------------------------------------------------------ factory + + public static DonutUtilization donutUtilization() { + return new DonutUtilization(); + } + + // ------------------------------------------------------ instance + + DonutUtilization() { + super(ChartType.DonutUtilization, + Js.uncheckedCast(createHtmlElement("pfj-chart-donut-utilization", DonutUtilizationElement.class))); + } + + // ------------------------------------------------------ builder + + public DonutUtilization data(Data data) { + element().data = data; + return this; + } + + public DonutUtilization labels(Function labels) { + // There's a lot more in 'data', but we just want the 'datum' property + element().labels = (data -> labels.apply(Js.cast(data.asPropertyMap().get("datum")))); + return this; + } + + public DonutUtilization invert() { + element().setAttribute("invert", true); + return this; + } + + public DonutUtilization thresholds(double... threshold) { + if (threshold != null) { + JsArray array = new JsArray<>(); + for (double t : threshold) { + array.push(threshold(t)); + } + element().thresholds = array; + } + return this; + } + + public DonutUtilization thresholds(Threshold... threshold) { + if (threshold != null) { + JsArray array = new JsArray<>(); + array.push(threshold); + element().thresholds = array; + } + return this; + } + + @Override + public DonutUtilization that() { + return this; + } + + // ------------------------------------------------------ api + + public Data data() { + return element().data; + } + + public JsArray thresholds() { + return element().thresholds; + } +} diff --git a/charts/src/main/java/org/patternfly/chart/utilization/DonutUtilizationElement.java b/charts/src/main/java/org/patternfly/chart/utilization/DonutUtilizationElement.java new file mode 100644 index 000000000..2d6178ac9 --- /dev/null +++ b/charts/src/main/java/org/patternfly/chart/utilization/DonutUtilizationElement.java @@ -0,0 +1,31 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.chart.utilization; + +import org.patternfly.chart.ChartElement; +import org.patternfly.chart.Data; +import org.patternfly.chart.Threshold; + +import elemental2.core.JsArray; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "HTMLElement") +public class DonutUtilizationElement extends ChartElement { + + public Data data; + public JsArray thresholds; +} diff --git a/charts/src/main/resources/META-INF/externs/charts.externs.js b/charts/src/main/resources/META-INF/externs/charts.externs.js new file mode 100644 index 000000000..2e4866ed3 --- /dev/null +++ b/charts/src/main/resources/META-INF/externs/charts.externs.js @@ -0,0 +1,204 @@ +// noinspection BadExpressionStatementJS,JSUnusedGlobalSymbols,SpellCheckingInspection,ES6ConvertVarToLetConst + +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Declaration for the custom chart element. + * ChartElement and the referenced types are the connections / glue code + * between J2CL and the React wrapper. We need to preserve their names! + * + * @externs + */ + +// ------------------------------------------------------ elements (a-z) + +/** @constructor */ +function BulletElement() { +} + +/** @type {!Array} */ +BulletElement.prototype.comparativeErrorMeasureData; + +/** @type {!Array} */ +BulletElement.prototype.comparativeErrorMeasureLegendData; + +/** @type {!Array} */ +BulletElement.prototype.comparativeWarningMeasureData; + +/** @type {!Array} */ +BulletElement.prototype.comparativeWarningMeasureLegendData; + +/** @type {!Array} */ +BulletElement.prototype.primaryDotMeasureData; + +/** @type {!Array} */ +BulletElement.prototype.primaryDotMeasureLegendData; + +/** @type {!Array} */ +BulletElement.prototype.primarySegmentedMeasureData; + +/** @type {!Array} */ +BulletElement.prototype.primarySegmentedMeasureLegendData; + +/** @type {!Array} */ +BulletElement.prototype.qualitativeRangeData; + +/** @type {!Array} */ +BulletElement.prototype.qualitativeRangeLegendData; + +/** @constructor */ +function ChartElement() { +} + +/** @type {!Array} */ +ChartElement.prototype.categories; + +/** @type {number} */ +ChartElement.prototype.height; + +/** @type {!LabelsFn} */ +ChartElement.prototype.labels; + +/** @type {!Array} */ +ChartElement.prototype.legendData; + +/** @type {string} */ +ChartElement.prototype.legendOrientation; + +/** @type {string} */ +ChartElement.prototype.legendPosition; + +/** @type {!Padding} */ +ChartElement.prototype.padding; + +/** @type {string} */ +ChartElement.prototype.subTitle; + +/** @type {string} */ +ChartElement.prototype.subTitlePosition; + +/** @type {string} */ +ChartElement.prototype.themeColor; + +/** @type {string} */ +ChartElement.prototype.title; + +/** @type {number} */ +ChartElement.prototype.width; + +/** @constructor */ +function DonutElement() { +} + +/** @type {!Array} */ +DonutElement.prototype.data; + +/** @constructor */ +function DonutThresholdElement() { +} + +/** @type {!Array} */ +DonutThresholdElement.prototype.data; + +/** @type {!Array} */ +DonutThresholdElement.prototype.thresholds; + +/** @constructor */ +function DonutUtilizationElement() { +} + +/** @type {!Data} */ +DonutUtilizationElement.prototype.data; + +/** @type {!Array} */ +DonutUtilizationElement.prototype.thresholds; + + +// ------------------------------------------------------ data classes (a-z) + +/** @constructor */ +function BulletData() { +} + +/** @type {string} */ +BulletData.prototype.name; + +/** @type {number} */ +BulletData.prototype.y; + +/** @constructor */ +function Data() { +} + +/** @type {string} */ +Data.prototype.x; + +/** @type {number} */ +Data.prototype.y; + +/** @constructor */ +function LegendData() { +} + +/** @type {string} */ +LegendData.prototype.name; + +/** @type {!LegendDataSymbol} */ +LegendData.prototype.symbol; + +/** @constructor */ +function LegendDataSymbol() { +} + +/** @type {string} */ +LegendDataSymbol.prototype.fill; + +/** @type {string} */ +LegendDataSymbol.prototype.type; + +/** @constructor */ +function Padding() { +} + +/** @type {number} */ +Padding.prototype.top; + +/** @type {number} */ +Padding.prototype.right; + +/** @type {number} */ +Padding.prototype.bottom; + +/** @type {number} */ +Padding.prototype.left; + +/** @constructor */ +function Threshold() { +} + +/** @type {number} */ +Threshold.prototype.value; + +/** @type {string} */ +Threshold.prototype.color; + +// ------------------------------------------------------ callbacks + +/** + * @typedef {function(*): string} + */ +var LabelsFn; diff --git a/code-parent/pom.xml b/code-parent/pom.xml index e4453dabc..3c6d89b25 100644 --- a/code-parent/pom.xml +++ b/code-parent/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../pom.xml @@ -53,18 +52,6 @@ import
- - - org.gwtproject.event - gwt-event - ${version.gwt.event} - - - org.gwtproject.safehtml - gwt-safehtml - ${version.gwt.safehtml} - - org.junit @@ -73,14 +60,6 @@ pom import - - - - org.jetbrains.kotlin - kotlin-stdlib - ${version.kotlin} - provided -
diff --git a/component-refactoring.txt b/component-refactoring.txt deleted file mode 100644 index ea1085095..000000000 --- a/component-refactoring.txt +++ /dev/null @@ -1,63 +0,0 @@ -==== - Copyright 2023 Red Hat - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -==== - -+ accordion -+ alert -+ avatar -+ backdrop -+ backtotop -+ badge -+ banner -+ brand -+ breadcrumb -+ button -+ card -+ codeblock -+ divider -+ drawer -+ emptystate -+ expandable -form -help -hint -icon -inputgroup -jumplinks -label -list -menu -modal -navigation -page -panel -popover -progress -skeleton -skiptocontent -slider -spinner -switch_ -table -tabs -text -textinputgroup -title -togglegroup -toolbar -tooltip -tree -truncate -wizard diff --git a/components/pom.xml b/components/pom.xml index d50de591e..c025f25c9 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml diff --git a/components/src/demo/java/ExpandableSectionDemo.java b/components/src/demo/java/ExpandableSectionDemo.java new file mode 100644 index 000000000..943dc9f06 --- /dev/null +++ b/components/src/demo/java/ExpandableSectionDemo.java @@ -0,0 +1,40 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import static org.patternfly.component.expandable.ExpandableSection.expandableSection; +import static org.patternfly.component.expandable.ExpandableSectionContent.expandableSectionContent; +import static org.patternfly.component.expandable.ExpandableSectionToggle.expandableSectionToggle; +import static org.patternfly.layout.stack.Stack.stack; +import static org.patternfly.layout.stack.StackItem.stackItem; + +@SuppressWarnings("unused") +public class ExpandableSectionDemo { + + public void detachedDemo() { + // @start region = detached + stack().gutter() + .addItem(stackItem() + .add(expandableSection("detached-expandable-section") + .detached() + .addContent(expandableSectionContent() + .text("This content is visible only when the component is expanded.")))) + .addItem(stackItem() + .add(expandableSection("detached-expandable-section") + .detached() + .addToggle(expandableSectionToggle("Show more", "Show less")))); + // @end region = detached + } +} diff --git a/components/src/demo/java/HasItemsDemo.java b/components/src/demo/java/HasItemsDemo.java new file mode 100644 index 000000000..28f4f58eb --- /dev/null +++ b/components/src/demo/java/HasItemsDemo.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.util.List; + +import org.patternfly.component.list.DataList; +import org.patternfly.component.list.DataListItem; + +import static java.util.Collections.emptyList; +import static org.jboss.elemento.Elements.span; +import static org.patternfly.component.list.DataList.dataList; +import static org.patternfly.component.list.DataListCell.dataListCell; +import static org.patternfly.component.list.DataListItem.dataListItem; +import static org.patternfly.icon.IconSets.fas.user; + +public class HasItemsDemo { + + public void hasItemsDemo() { + // @start region = hasItems + record User(String id, String name, boolean valid) {} + + // construction time + List users = emptyList(); // @replace substring = 'emptyList;' replacement = "findUsers(...)" + DataList dl = dataList() + .addItems(users, user -> dataListItem(user.id()) + .store("user", user) + .addCell(dataListCell().icon(user())) + .addCell(dataListCell() + .add(span() + .id(user.id()) + .text(user.name())))); + + // later, responding to an event or something similar + for (DataListItem item : dl) { + User user = item.get("user"); + item.toggle("invalid-user", !user.valid()); + } + // @end region = hasItems + } +} diff --git a/components/src/demo/java/IconDemo.java b/components/src/demo/java/IconDemo.java index 82b583f9f..95debd82d 100644 --- a/components/src/demo/java/IconDemo.java +++ b/components/src/demo/java/IconDemo.java @@ -1,12 +1,28 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import java.util.Random; import org.patternfly.component.icon.Icon; +import org.patternfly.component.icon.IconSize; import static org.patternfly.component.icon.Icon.icon; import static org.patternfly.icon.IconSets.fas.check; import static org.patternfly.icon.IconSets.fas.exclamationTriangle; import static org.patternfly.icon.IconSets.fas.filter; -import static org.patternfly.style.Size.lg; import static org.patternfly.style.Status.warning; public class IconDemo { @@ -15,7 +31,7 @@ public void iconDemo() { // @start region = icon icon(check()); icon(filter()) - .size(lg); + .size(IconSize.lg); icon(exclamationTriangle()) .inline() .status(warning); diff --git a/components/src/demo/java/MenuDemo.java b/components/src/demo/java/MenuDemo.java index 7edd47d5f..a334a1bf6 100644 --- a/components/src/demo/java/MenuDemo.java +++ b/components/src/demo/java/MenuDemo.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import org.patternfly.component.menu.Menu; import org.patternfly.component.menu.MenuItem; import org.patternfly.component.menu.MenuType; @@ -10,6 +26,7 @@ import static org.patternfly.component.menu.MenuGroup.menuGroup; import static org.patternfly.component.menu.MenuList.menuList; +@SuppressWarnings("unused") public class MenuDemo { public void menuDemo() { diff --git a/components/src/demo/java/NavigationDemo.java b/components/src/demo/java/NavigationDemo.java index 586875363..2a0091f72 100644 --- a/components/src/demo/java/NavigationDemo.java +++ b/components/src/demo/java/NavigationDemo.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import java.util.List; import org.jboss.elemento.Id; diff --git a/components/src/demo/java/PageDemo.java b/components/src/demo/java/PageDemo.java index 3c72cec91..5c964ea5c 100644 --- a/components/src/demo/java/PageDemo.java +++ b/components/src/demo/java/PageDemo.java @@ -1,21 +1,35 @@ -import org.patternfly.component.page.MastheadLogo; +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -import static org.patternfly.component.content.Content.content; import static org.patternfly.component.page.Masthead.masthead; import static org.patternfly.component.page.MastheadBrand.mastheadBrand; import static org.patternfly.component.page.MastheadContent.mastheadContent; +import static org.patternfly.component.page.MastheadLogo.mastheadLogo; import static org.patternfly.component.page.MastheadMain.mastheadMain; import static org.patternfly.component.page.MastheadToggle.mastheadToggle; import static org.patternfly.component.page.Page.page; +import static org.patternfly.component.page.PageBreadcrumb.pageBreadcrumb; +import static org.patternfly.component.page.PageGroup.pageGroup; import static org.patternfly.component.page.PageMain.pageMain; -import static org.patternfly.component.page.PageMainBody.pageMainBody; -import static org.patternfly.component.page.PageMainBreadcrumb.pageMainBreadcrumb; -import static org.patternfly.component.page.PageMainGroup.pageMainGroup; -import static org.patternfly.component.page.PageMainSection.pageMainSection; +import static org.patternfly.component.page.PageSection.pageSection; import static org.patternfly.component.page.PageSidebar.pageSidebar; import static org.patternfly.component.skiptocontent.SkipToContent.skipToContent; import static org.patternfly.component.toolbar.Toolbar.toolbar; +@SuppressWarnings("unused") public class PageDemo { public void pageDemo() { @@ -31,35 +45,19 @@ public void pageDemo() { public void pageMainDemo() { // @start region = pageMain pageMain("main-id") - .addGroup(pageMainGroup() - .addSection(pageMainBreadcrumb()) - .addSection(pageMainSection())) - .addSection(pageMainSection()) - .addSection(pageMainSection()); + .addGroup(pageGroup() + .addSection(pageBreadcrumb()) + .addSection(pageSection())) + .addSection(pageSection()) + .addSection(pageSection()); // @end region = pageMain } - public void pageMainBodyDemo() { - // @start region = pageMainBody - pageMain("main-id") - .addSection(pageMainBreadcrumb() - .limitWidth() - .addBody(pageMainBody() - .add(content()))) - .addSection(pageMainSection() - .add(content())) - .addSection(pageMainSection() - .limitWidth() - .addBody(pageMainBody() - .add(content()))); - // @end region = pageMainBody - } - public void pageMainGroupDemo() { // @start region = pageMainGroup - pageMainGroup() - .addSection(pageMainBreadcrumb()) - .addSection(pageMainSection()); + pageGroup() + .addSection(pageBreadcrumb()) + .addSection(pageSection()); // @end region = pageMainGroup } @@ -69,7 +67,7 @@ public void mastheadDemo() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .addLogo(MastheadLogo.mastheadLogo("/")))) + .addLogo(mastheadLogo("/")))) .addContent(mastheadContent() .addToolbar(toolbar())); // @end region = masthead diff --git a/components/src/demo/java/ToolbarDemo.java b/components/src/demo/java/ToolbarDemo.java index 1a03ffb01..a2188a895 100644 --- a/components/src/demo/java/ToolbarDemo.java +++ b/components/src/demo/java/ToolbarDemo.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + public class ToolbarDemo { public void toolbarDemo() { diff --git a/components/src/main/java/org/patternfly/component/AsyncItems.java b/components/src/main/java/org/patternfly/component/AsyncItems.java new file mode 100644 index 000000000..942d1d11f --- /dev/null +++ b/components/src/main/java/org/patternfly/component/AsyncItems.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.component; + +import java.util.function.Function; + +import elemental2.promise.Promise; + +@FunctionalInterface +public interface AsyncItems extends Function>> { +} diff --git a/components/src/main/java/org/patternfly/component/BaseComponent.java b/components/src/main/java/org/patternfly/component/BaseComponent.java index c7dc40034..608dc5ee2 100644 --- a/components/src/main/java/org/patternfly/component/BaseComponent.java +++ b/components/src/main/java/org/patternfly/component/BaseComponent.java @@ -31,13 +31,15 @@ import elemental2.dom.HTMLElement; import static java.util.Objects.requireNonNull; +import static org.patternfly.component.ComponentRegistry.componentRegistry; +import static org.patternfly.core.Ouia.ouia; public abstract class BaseComponent> implements Component, ElementAttributeMethods, ElementClassListMethods, - ElementContainerMethods, ElementConsumerMethods, + ElementContainerMethods, ElementEventMethods, ElementIdMethods, ElementQueryMethods, @@ -52,7 +54,7 @@ public abstract class BaseComponent> implements Component, @@ -47,6 +48,7 @@ public abstract class BaseComponentSVG> implements Component, @@ -57,7 +58,7 @@ protected ComponentDelegate(ComponentType componentType) { protected void delegateTo(E delegate) { this.delegate = delegate; - Ouia.component(delegate, componentType); + ouia(delegate, componentType.id, componentType.componentName); } @Override diff --git a/components/src/main/java/org/patternfly/component/ComponentRegistry.java b/components/src/main/java/org/patternfly/component/ComponentRegistry.java new file mode 100644 index 000000000..120f250bd --- /dev/null +++ b/components/src/main/java/org/patternfly/component/ComponentRegistry.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.component; + +import java.util.HashMap; +import java.util.Map; + +import org.jboss.elemento.TypedBuilder; + +import elemental2.dom.HTMLElement; + +/** + * The component registry is a singleton that manages the registration and lookup of PatternFly (sub)components per + * {@link ComponentType} and name. Only one (sub)component of each type can be registered. Use this class to get singleton + * instances of PatternFly (sub)components such as {@link org.patternfly.component.page.Page}, + * {@link org.patternfly.component.page.Masthead}, or {@link org.patternfly.component.notification.NotificationDrawerList}. + *

+ * The registration must be done by calling {@link #registerComponent(ComponentType, BaseComponent)} or + * {@link #registerSubComponent(ComponentType, String, SubComponent)}. The lookup is done by calling + * {@link #lookupComponent(ComponentType)} and {@link #lookupSubComponent(ComponentType, String)}. + */ +public class ComponentRegistry { + + // ------------------------------------------------------ factory + + private static ComponentRegistry instance; + + public static ComponentRegistry componentRegistry() { + if (instance == null) { + instance = new ComponentRegistry(); + } + return instance; + } + + // ------------------------------------------------------ instance + + private final Map> components; + private final Map> subComponents; + + ComponentRegistry() { + components = new HashMap<>(); + subComponents = new HashMap<>(); + } + + // ------------------------------------------------------ api + + public void registerComponent(ComponentType type, BaseComponent component) { + components.put(type, component); + } + + public void registerSubComponent(ComponentType type, String name, SubComponent subComponent) { + subComponents.put(subComponentKey(type, name), subComponent); + } + + @SuppressWarnings("unchecked") + public , E extends HTMLElement, B extends TypedBuilder> C lookupComponent( + ComponentType type) { + return (C) components.get(type); + } + + @SuppressWarnings("unchecked") + public , E extends HTMLElement, B extends TypedBuilder> C lookupSubComponent( + ComponentType type, String name) { + return (C) subComponents.get(subComponentKey(type, name)); + } + + // ------------------------------------------------------ internal + + private String subComponentKey(ComponentType componentType, String name) { + return componentType.id + name; + } +} diff --git a/components/src/main/java/org/patternfly/component/ComponentStore.java b/components/src/main/java/org/patternfly/component/ComponentStore.java index d9f23b652..9a7a3e87a 100644 --- a/components/src/main/java/org/patternfly/component/ComponentStore.java +++ b/components/src/main/java/org/patternfly/component/ComponentStore.java @@ -30,11 +30,16 @@ import static org.jboss.elemento.Id.uuid; import static org.jboss.elemento.logger.Level.DEBUG; +/** + * The component store is an internal store for PatternFly (sub)components. It is used to share references between components + * and their subcomponents. (Sub)components can store a reference to themselves using {@link #storeComponent(BaseComponent)} + * resp. {@link #storeSubComponent(SubComponent)} and subcomponents can look up their parent component using + * #lookupComponent(ComponentType, HTMLElement, boolean). + */ final class ComponentStore { private static final Logger logger = Logger.getLogger(ComponentStore.class.getName()); private static final String KEY_PREFIX = "pfcs"; // PatternFly component store - private static final String CATEGORY = "ComponentStore"; private static final Map> components = new HashMap<>(); private static final Map> componentDelegates = new HashMap<>(); private static final Map> subComponents = new HashMap<>(); diff --git a/components/src/main/java/org/patternfly/component/ComponentType.java b/components/src/main/java/org/patternfly/component/ComponentType.java index 3e739d004..de8a25531 100644 --- a/components/src/main/java/org/patternfly/component/ComponentType.java +++ b/components/src/main/java/org/patternfly/component/ComponentType.java @@ -17,147 +17,156 @@ public enum ComponentType { - Accordion("ac", "PF6/Accordion"), + Accordion("ac", "PF6/Component/Accordion"), - ActionList("al", "PF6/ActionList"), + ActionList("al", "PF6/Component/ActionList"), - Alert("at", "PF6/Alert"), + Alert("at", "PF6/Component/Alert"), - AlertGroup("ag", "PF6/AlertGroup"), + AlertGroup("ag", "PF6/Component/AlertGroup"), - Avatar("av", "PF6/Avatar"), + Avatar("av", "PF6/Component/Avatar"), - Backdrop("bd", "PF6/Backdrop"), + Backdrop("bd", "PF6/Component/Backdrop"), - BackToTop("btt", "PF6/BackToTop"), + BackToTop("btt", "PF6/Component/BackToTop"), - Badge("bdg", "PF6/Badge"), + Badge("bdg", "PF6/Component/Badge"), - Banner("bnr", "PF6/Banner"), + Banner("bnr", "PF6/Component/Banner"), - Brand("bnd", "PF6/Brand"), + Brand("bnd", "PF6/Component/Brand"), - Breadcrumb("bc", "PF6/Breadcrumb"), + Breadcrumb("bc", "PF6/Component/Breadcrumb"), - Button("btn", "PF6/Button"), + Button("btn", "PF6/Component/Button"), - Card("crd", "PF6/Card"), + Card("crd", "PF6/Component/Card"), - CardView("cv", null), + Checkbox("chb", "PF6/Component/Checkbox"), - Checkbox("chb", "PF6/Checkbox"), + CodeBlock("cb", "PF6/Component/CodeBlock"), - CodeBlock("cb", "PF6/CodeBlock"), + CodeEditor("ce", "PF6/Component/CodeEditor"), - CodeEditor("ce", "PF6/CodeEditor"), + Content("ct", "PF6/Component/Content"), - Content("ct", "PF6/Content"), + DataList("dl", "PF6/Component/DataList"), - ContextSelector("cs", null), + DescriptionList("dsl", "PF6/Component/DescriptionList"), - DataList("dl", null), + Divider("dvr", "PF6/Component/Divider"), - DataTable("dt", null), + Drawer("dw", "PF6/Component/Drawer"), - DescriptionList("dsl", "PF6/DescriptionList"), + Dropdown("dd", "PF6/Component/Dropdown"), - Divider("dvr", "PF6/Divider"), + EmptyState("es", "PF6/Component/EmptyState"), - Drawer("dw", "PF6/Drawer"), + ExpandableSection("exs", "PF6/Component/ExpandableSection"), - Dropdown("dd", "PF6/Dropdown"), + FilterInput("fi", "PF6/Component/FilterInput"), - EmptyState("es", "PF6/EmptyState"), + Finder("fnd", "PF6/Component/Finder"), - ExpandableSection("exs", "PF6/ExpandableSection"), + Form("frm", "PF6/Component/Form"), - Finder("fnd", "PF6/Finder"), + FormSelect("frs", "PF6/Component/FormSelect"), - Form("frm", "PF6/Form"), + HelperText("ht", "PF6/Component/HelperText"), - FormSelect("frs", "PF6/FormSelect"), + Hint("hnt", "PF6/Component/Hint"), - HelperText("ht", "PF6/HelperText"), + Icon("icn", "PF6/Component/Icon"), - Hint("hnt", "PF6/Hint"), + InputGroup("ig", "PF6/Component/InputGroup"), - Icon("icn", "PF6/Icon"), + JumpLinks("jl", "PF6/Component/JumpLinks"), - InputGroup("ig", "PF6/InputGroup"), + Label("lbl", "PF6/Component/Label"), - JumpLinks("jl", "PF6/JumpLinks"), + LabelGroup("lbg", "PF6/Component/LabelGroup"), - Label("lbl", "PF6/Label"), + List("lst", "PF6/Component/List"), - LabelGroup("lbg", null), + Masthead("mh", "PF6/Component/Masthead"), - List("lst", "PF6/List"), + Menu("mu", "PF6/Component/Menu"), - Masthead("mh", "PF6/Masthead"), + MenuToggle("mt", "PF6/Component/MenuToggle"), - Menu("mu", "PF6/Menu"), + Modal("mo", "PF6/Component/Modal"), - MenuToggle("mt", "PF6/MenuToggle"), + MultiSelect("ms", "PF6/Component/MultiSelect"), - Modal("mo", "PF6/Modal"), + Navigation("nav", "PF6/Component/Nav"), - MultiSelect("ms", "PF6/MultiSelect"), + NotificationBadge("nb", "PF6/Component/NotificationBadge"), - Navigation("nav", "PF6/Nav"), + NotificationDrawer("nd", "PF6/Component/NotificationDrawer"), - NotificationBadge("nb", null), + NumberInput("ni", "PF6/Component/NumberInput"), - OptionsMenu("opt", null), + Page("pg", "PF6/Component/Page"), - Page("pg", "PF6/Page"), + PageHeader("ph", "PF6/Component/PageHeader"), - Pagination("pgn", null), + Panel("pnl", "PF6/Component/Panel"), - Panel("pnl", "PF6/Panel"), + Popover("pvr", "PF6/Component/Popover"), - Popover("pvr", "PF6/Popover"), + Progress("prg", "PF6/Component/Progress"), - Progress("prg", "PF6/Progress"), + ProgressStepper("ps", "PF6/Component/ProgressStepper"), - Radio("rd", "PF6/Radio"), + Radio("rd", "PF6/Component/Radio"), - Sidebar("sb", "PF6/Sidebar"), + SearchInput("si", "PF6/Component/SearchInput"), - SimpleList("sl", "PF6/SimpleList"), + ServiceCard("sc", "PF6/Component/ServiceCard"), - SingleSelect("ss", "PF6/SingleSelect"), + Sidebar("sb", "PF6/Component/Sidebar"), - Skeleton("sk", null), + SimpleList("sl", "PF6/Component/SimpleList"), - SkipToContent("stc", "PF6/SkipToContent"), + SingleSelect("ss", "PF6/Component/SingleSelect"), - Slider("sld", "PF6/Slider"), + Skeleton("sk", "PF6/Component/Skeleton"), - Spinner("sp", "PF6/Spinner"), + SkipToContent("stc", "PF6/Component/SkipToContent"), - Switch("sw", "PF6/Switch"), + Slider("sld", "PF6/Component/Slider"), - Tabs("tbs", "PF6/Tabs"), + Spinner("sp", "PF6/Component/Spinner"), - Table("tbl", "PF6/Table"), + Switch("sw", "PF6/Component/Switch"), - TextInput("ti", "PF6/TextInput"), + Tabs("tbs", "PF6/Component/Tabs"), - TextInputGroup("tig", "PF6/TextInputGroup"), + Table("tbl", "PF6/Component/Table"), - Title("tlt", "PF6/Title"), + TextInput("ti", "PF6/Component/TextInput"), - ToggleGroup("tg", null), + TextInputGroup("tig", "PF6/Component/TextInputGroup"), - Toolbar("tb", "PF6/Toolbar"), + ThemeSelector("ths", "PF6/Component/ThemeSelector"), - Tooltip("tt", "PF6/Tooltip"), + Timestamp("ts", "PF6/Component/Timestamp"), - TreeView("tv", "PF6/TreeView"), + Title("tlt", "PF6/Component/Title"), - Truncate("tr", "PF6/Truncate"), + ToggleGroup("tg", "PF6/Component/ToggleGroup"), - Wizard("wzd", "PF6/Wizard"); + Toolbar("tb", "PF6/Component/Toolbar"), + + Tooltip("tt", "PF6/Component/Tooltip"), + + TreeView("tv", "PF6/Component/TreeView"), + + Truncate("tr", "PF6/Component/Truncate"), + + Wizard("wzd", "PF6/Component/Wizard"), + ; public final String id; public final String componentName; diff --git a/components/src/main/java/org/patternfly/component/ElementContainerDelegate.java b/components/src/main/java/org/patternfly/component/ElementContainerDelegate.java deleted file mode 100644 index b0ebbc6fd..000000000 --- a/components/src/main/java/org/patternfly/component/ElementContainerDelegate.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.patternfly.component; - -import java.util.function.Supplier; - -import org.jboss.elemento.ElementContainerMethods; -import org.jboss.elemento.TypedBuilder; - -import elemental2.dom.Element; -import elemental2.dom.Node; - -/** - * Delegates all methods from {@link ElementContainerMethods} to the element returned by {@link #containerDelegate()}. - *

- * Please note that if you implement this interface in your (sub)component, you must use {@code element().appendChild()} to add - * something to the (sub)component itself! - */ -public interface ElementContainerDelegate> extends - TypedBuilder, - ElementContainerMethods { - - Element containerDelegate(); - - @Override - default B add(String text) { - containerDelegate().appendChild(element().ownerDocument.createTextNode(text)); - return that(); - } - - @Override - default B add(Node node) { - containerDelegate().appendChild(node); - return that(); - } - - @Override - default B add(Supplier supplier) { - containerDelegate().appendChild(supplier.get()); - return that(); - } -} diff --git a/components/src/main/java/org/patternfly/component/ElementTextDelegate.java b/components/src/main/java/org/patternfly/component/ElementTextDelegate.java deleted file mode 100644 index 226580d26..000000000 --- a/components/src/main/java/org/patternfly/component/ElementTextDelegate.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.patternfly.component; - -import org.jboss.elemento.ElementTextMethods; -import org.jboss.elemento.TypedBuilder; - -import elemental2.dom.Element; - -/** - * Delegates all methods from {@link ElementTextMethods} to the element returned by {@link #textDelegate()}. - */ -public interface ElementTextDelegate> extends - TypedBuilder, - ElementTextMethods { - - Element textDelegate(); - - @Override - default B text(String text) { - textDelegate().textContent = text; - return that(); - } - - @Override - default String text() { - return textDelegate().textContent; - } -} diff --git a/components/src/main/java/org/patternfly/component/Expandable.java b/components/src/main/java/org/patternfly/component/Expandable.java index 3810babf7..626732264 100644 --- a/components/src/main/java/org/patternfly/component/Expandable.java +++ b/components/src/main/java/org/patternfly/component/Expandable.java @@ -108,7 +108,7 @@ default void expand() { void expand(boolean fireEvent); /** - * @return {@code true} if the elements class list has the modifier {@link Classes#expanded}, {@code false} otherwise. + * @return {@code true} if the element's class list has the modifier {@link Classes#expanded}, {@code false} otherwise. */ default boolean expanded() { return expanded(element()); diff --git a/components/src/main/java/org/patternfly/component/HasIdentifier.java b/components/src/main/java/org/patternfly/component/HasIdentifier.java index 262b5aea5..3b49a6200 100644 --- a/components/src/main/java/org/patternfly/component/HasIdentifier.java +++ b/components/src/main/java/org/patternfly/component/HasIdentifier.java @@ -21,8 +21,8 @@ import elemental2.dom.Element; /** - * This interface represents a (sub)component that has an identifier. It is normally implemented by subcomponents of components - * implementing {@link HasItems}. + * This interface represents a (sub)component that has an identifier. It is normally implemented by child components of + * components implementing {@link HasItems}. *

* It's up to the implementation what to do with the ID. The recommendation is to set it as data attribute using * {@link org.patternfly.core.Dataset#identifier} and not set it on the root element as {@link Element#id}. This diff --git a/components/src/main/java/org/patternfly/component/HasItems.java b/components/src/main/java/org/patternfly/component/HasItems.java index 94cdd4dde..6520d9eb9 100644 --- a/components/src/main/java/org/patternfly/component/HasItems.java +++ b/components/src/main/java/org/patternfly/component/HasItems.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.function.BiConsumer; import java.util.function.Function; import org.jboss.elemento.IsElement; @@ -25,12 +26,16 @@ import elemental2.dom.Element; /** - * The HasItems interface represents a component that can contain a collection of items. - * It provides methods for adding, removing, and manipulating items within the component. + * The HasItems interface represents a component that can contain a collection of items. It provides methods for adding, + * removing, and manipulating items within the component. + *

+ * Often the child components implement {@link org.patternfly.core.ComponentContext} and {@link HasIdentifier}. * * @param the element type of the main component * @param the builder type of the main component * @param the type of the subcomponent (representing an item) + *

+ * {@snippet class=HasItemsDemo region=hasItems} */ public interface HasItems, S> extends Iterable, TypedBuilder, IsElement { @@ -49,6 +54,8 @@ default B addItem(S item) { B add(S item); + B onAdd(BiConsumer onAdd); + default List items() { List items = new ArrayList<>(); this.forEach(items::add); @@ -63,5 +70,9 @@ default List items() { S item(String identifier); + void removeItem(String identifier); + + B onRemove(BiConsumer onRemove); + void clear(); } diff --git a/components/src/main/java/org/patternfly/component/Ordered.java b/components/src/main/java/org/patternfly/component/Ordered.java new file mode 100644 index 000000000..f777d667c --- /dev/null +++ b/components/src/main/java/org/patternfly/component/Ordered.java @@ -0,0 +1,112 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.component; + +import java.util.Comparator; +import java.util.TreeSet; + +import org.jboss.elemento.ElementContainerMethods; +import org.jboss.elemento.IsElement; +import org.jboss.elemento.TypedBuilder; + +import elemental2.dom.Element; +import elemental2.dom.HTMLElement; + +import static java.util.Comparator.comparing; +import static org.jboss.elemento.Elements.insertBefore; + +/** + * The Ordered interface maintains its elements in a specific order. It extends the {@link HasItems} interface. By default, the + * order is determined by the {@link #defaultOrder()} method which in turn determines the order based on the elements data + * {@value #DATA_ORDER} attribute. The order is maintained as elements are {@linkplain HasItems#add(Object) added} to the + * component. + *

+ * If you want to use this feature, call {@link #ordered()} resp. {@link #ordered(Comparator)} on the builder. It is useful when + * items are added asynchronously, and you want to visually maintain an order of items as they're added. If you know all items + * in advance, it might be more performant if you sort them beforehand. + * + * @param the type of the main element + * @param the type of the builder for chaining methods + * @param the type of components being ordered + */ +public interface Ordered, S extends IsElement> + extends HasItems { + + String DATA_ORDER = "order"; + + /** + * Adds an item to the specified container in a predefined order. If a comparator is provided, the order is determined based + * on the comparator; otherwise, the item is added directly to the container. + * + * @param container the container to which the item should be added + * @param item the item to be added to the container + */ + default void addOrdered(ElementContainerMethods container, S item) { + if (comparator() != null) { + HTMLElement elementBefore = null; + TreeSet orderedItems = new TreeSet<>(comparator()); + orderedItems.addAll(items()); + for (S existing : orderedItems) { + if (comparator().compare(item, existing) < 0) { + elementBefore = existing.element(); + break; + } + } + if (elementBefore != null) { + insertBefore(item.element(), elementBefore); + } else { + container.add(item.element()); + } + } else { + container.add(item.element()); + } + } + + /** + * Provides a default comparator for ordering elements based on their {@value #DATA_ORDER} dataset value. + * + * @return a comparator that compares elements using the {@value #DATA_ORDER} attribute from their dataset + */ + default Comparator defaultOrder() { + return comparing(o -> o.element().dataset.get(DATA_ORDER)); + } + + /** + * Orders the elements contained in the component using the default comparator. The default comparator is based on the + * {@value #DATA_ORDER} dataset attribute of the elements. + * + * @return the builder instance with the elements ordered + */ + default B ordered() { + return ordered(defaultOrder()); + } + + /** + * Orders the elements contained in the component using the specified comparator. The comparator determines the order in + * which the elements are arranged. + * + * @param comparator the comparator used to define the ordering of the elements + * @return the builder instance with the elements ordered + */ + B ordered(Comparator comparator); + + /** + * Retrieves the comparator used for ordering elements in a component. + * + * @return the comparator that determines the order of elements + */ + Comparator comparator(); +} diff --git a/components/src/main/java/org/patternfly/component/ScrollButtons.java b/components/src/main/java/org/patternfly/component/ScrollButtons.java new file mode 100644 index 000000000..15bfeb456 --- /dev/null +++ b/components/src/main/java/org/patternfly/component/ScrollButtons.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.component; + +import org.gwtproject.event.shared.HandlerRegistration; +import org.patternfly.component.button.Button; +import org.patternfly.core.Aria; +import org.patternfly.core.LanguageDirection; +import org.patternfly.core.ObservableValue; + +import elemental2.dom.HTMLElement; +import elemental2.dom.Node; +import elemental2.dom.NodeList; + +import static elemental2.dom.DomGlobal.clearTimeout; +import static elemental2.dom.DomGlobal.setTimeout; +import static elemental2.dom.DomGlobal.window; +import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.isElementInView; +import static org.jboss.elemento.Elements.setVisible; +import static org.jboss.elemento.EventType.bind; +import static org.jboss.elemento.EventType.resize; +import static org.jboss.elemento.EventType.scroll; +import static org.patternfly.component.button.Button.button; +import static org.patternfly.core.Aria.hidden; +import static org.patternfly.core.Aria.label; +import static org.patternfly.core.LanguageDirection.languageDirection; +import static org.patternfly.core.ObservableValue.ov; +import static org.patternfly.icon.IconSets.fas.angleLeft; +import static org.patternfly.icon.IconSets.fas.angleRight; +import static org.patternfly.style.Classes.modifier; +import static org.patternfly.style.Classes.scrollable; + +/** + * Internal class used by components like {@link org.patternfly.component.navigation.Navigation} or + * {@link org.patternfly.component.tabs.Tab} that provide buttons to scroll their items horizontally. + */ +// TODO Use in Tabs.java +public class ScrollButtons { + + public final HTMLElement scrollBackContainer; + public final HTMLElement scrollForwardContainer; + public final Button scrollBack; + public final Button scrollForward; + + private final HTMLElement component; + private final HTMLElement itemsContainer; + private final ObservableValue enableScrollButtons; + private final ObservableValue showScrollButtons; + private final ObservableValue renderScrollButtons; + private final ObservableValue disableBackScrollButton; + private final ObservableValue disableForwardScrollButton; + + private double scrollTimeout; + private HandlerRegistration scrollHandler; + private HandlerRegistration resizeHandler; + private HandlerRegistration transitionEndHandler; + + public ScrollButtons(HTMLElement component, HTMLElement itemsContainer, String css) { + this.component = component; + this.itemsContainer = itemsContainer; + this.enableScrollButtons = ov(false); + this.showScrollButtons = ov(false); + this.renderScrollButtons = ov(false); + this.disableBackScrollButton = ov(false); + this.disableForwardScrollButton = ov(false); + + scrollBackContainer = div().css(css) + .add(scrollBack = button().icon(angleLeft()) + .plain() + .disabled() + .aria(hidden, true) + .aria(label, "Scroll back")) + .element(); + scrollForwardContainer = div().css(css) + .add(scrollForward = button().icon(angleRight()) + .plain() + .disabled() + .aria(hidden, true) + .aria(label, "Scroll forward")) + .element(); + setVisible(scrollBackContainer, false); + setVisible(scrollForwardContainer, false); + } + + public void attach() { + scrollHandler = bind(itemsContainer, scroll, e -> updateScrollState()); + scrollBack.onClick((e, b) -> scrollBack()); + scrollForward.onClick((e, b) -> scrollForward()); + enableScrollButtons.subscribe((current, previous) -> { + if (!previous && current) { + renderScrollButtons.change(true); + setTimeout(__ -> { + transitionEndHandler = bind(scrollBack, "transitionend", e -> hideScrollButtons()); + showScrollButtons.set(true); + }, 100); + } else if (previous && !current) { + showScrollButtons.change(false); + } + }); + showScrollButtons.subscribe((current, __) -> component.classList.toggle(modifier(scrollable), current)); + renderScrollButtons.subscribe((current, __) -> { + setVisible(scrollBackContainer, current); + setVisible(scrollForwardContainer, current); + }); + disableBackScrollButton.subscribe((current, __) -> { + scrollBack.disabled(current); + scrollBack.aria(Aria.disabled, current); + }); + disableForwardScrollButton.subscribe((current, __) -> { + scrollForward.disabled(current); + scrollForward.aria(Aria.disabled, current); + }); + resizeHandler = bind(window, resize.name, e -> updateScrollState()); + updateScrollState(); + } + + public void detach() { + clearTimeout(scrollTimeout); + if (scrollHandler != null) { + scrollHandler.removeHandler(); + } + if (resizeHandler != null) { + resizeHandler.removeHandler(); + } + if (transitionEndHandler != null) { + transitionEndHandler.removeHandler(); + } + } + + public void updateScrollState() { + // debounce scroll event! + scrollTimeout = setTimeout((__) -> { + boolean overflowOnLeft = !isElementInView(itemsContainer, + ((HTMLElement) itemsContainer.firstElementChild), false); + boolean overflowOnRight = !isElementInView(itemsContainer, + ((HTMLElement) itemsContainer.lastElementChild), false); + enableScrollButtons.change(overflowOnLeft || overflowOnRight); + disableBackScrollButton.change(!overflowOnLeft); + disableForwardScrollButton.change(!overflowOnRight); + }, 100); + } + + private void scrollBack() { + HTMLElement firstElementInView = null; + HTMLElement lastElementOutOfView = null; + NodeList children = itemsContainer.childNodes; + for (int i = 0; i < children.length && firstElementInView == null; i++) { + HTMLElement child = (HTMLElement) children.item(i); + if (isElementInView(itemsContainer, child, false)) { + firstElementInView = child; + lastElementOutOfView = (HTMLElement) children.item(i - 1); + } + } + if (lastElementOutOfView != null) { + if (languageDirection(component) == LanguageDirection.ltr) { + itemsContainer.scrollLeft -= lastElementOutOfView.scrollWidth; + } else { + itemsContainer.scrollLeft += lastElementOutOfView.scrollWidth; + } + } + } + + private void scrollForward() { + HTMLElement lastElementInView = null; + HTMLElement firstElementOutOfView = null; + NodeList children = itemsContainer.childNodes; + for (int i = children.length - 1; i >= 0 && lastElementInView == null; i--) { + HTMLElement child = (HTMLElement) children.item(i); + if (isElementInView(itemsContainer, child, false)) { + lastElementInView = child; + firstElementOutOfView = (HTMLElement) children.item(i + 1); + } + } + if (firstElementOutOfView != null) { + if (languageDirection(component) == LanguageDirection.ltr) { + itemsContainer.scrollLeft += firstElementOutOfView.scrollWidth; + } else { + itemsContainer.scrollLeft -= firstElementOutOfView.scrollWidth; + } + } + } + + private void hideScrollButtons() { + if (!enableScrollButtons.get() && !showScrollButtons.get() && renderScrollButtons.get()) { + renderScrollButtons.change(false); + } + } +} diff --git a/components/src/main/java/org/patternfly/component/Severity.java b/components/src/main/java/org/patternfly/component/Severity.java index 8bfd9ae99..f8b16216a 100644 --- a/components/src/main/java/org/patternfly/component/Severity.java +++ b/components/src/main/java/org/patternfly/component/Severity.java @@ -23,23 +23,51 @@ public enum Severity { - custom(IconSets.fas::bell, Status.custom, "custom alert"), + custom(Status.custom, IconSets.fas::bell), - info(IconSets.fas::infoCircle, Status.info, "info alert"), + info(Status.info, IconSets.fas::infoCircle), - success(IconSets.fas::checkCircle, Status.success, "success alert"), + success(Status.success, IconSets.fas::checkCircle), - warning(IconSets.fas::exclamationTriangle, Status.warning, "warning alert"), + warning(Status.warning, IconSets.fas::exclamationTriangle), - danger(IconSets.fas::exclamationCircle, Status.danger, "danger alert"); + danger(Status.danger, IconSets.fas::exclamationCircle); + + public static Severity of(String severity) { + return of(Status.of(severity)); + } + + public static Severity of(Status status) { + return switch (status) { + case custom -> custom; + case info -> info; + case success -> success; + case warning -> warning; + case danger -> danger; + }; + } - public final Supplier icon; public final Status status; - public final String aria; + public final Supplier icon; - Severity(Supplier icon, Status status, String aria) { + Severity(Status status, Supplier icon) { this.icon = icon; this.status = status; - this.aria = aria; + } + + public ValidationStatus asValidationStatus() { + //noinspection EnhancedSwitchMigration + switch (this) { + case custom: + case info: + return ValidationStatus.default_; + case success: + return ValidationStatus.success; + case warning: + return ValidationStatus.warning; + case danger: + return ValidationStatus.error; + } + return ValidationStatus.default_; } } diff --git a/components/src/main/java/org/patternfly/component/SubComponent.java b/components/src/main/java/org/patternfly/component/SubComponent.java index e50c4f197..59c2a2e8d 100644 --- a/components/src/main/java/org/patternfly/component/SubComponent.java +++ b/components/src/main/java/org/patternfly/component/SubComponent.java @@ -32,6 +32,7 @@ import elemental2.dom.HTMLElement; import static java.util.Objects.requireNonNull; +import static org.patternfly.component.ComponentRegistry.componentRegistry; public abstract class SubComponent> implements ElementAttributeMethods, @@ -65,6 +66,11 @@ public E element() { return element; } + public B registerSubComponent() { + componentRegistry().registerSubComponent(componentType, name, this); + return that(); + } + // ------------------------------------------------------ component store protected void storeSubComponent() { diff --git a/components/src/main/java/org/patternfly/component/Validatable.java b/components/src/main/java/org/patternfly/component/Validatable.java new file mode 100644 index 000000000..1c4f3fac0 --- /dev/null +++ b/components/src/main/java/org/patternfly/component/Validatable.java @@ -0,0 +1,27 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.component; + +import org.jboss.elemento.TypedBuilder; + +import elemental2.dom.HTMLElement; + +public interface Validatable> extends TypedBuilder { + + B validated(ValidationStatus status); + + public void resetValidation(); +} diff --git a/components/src/main/java/org/patternfly/component/ValidationStatus.java b/components/src/main/java/org/patternfly/component/ValidationStatus.java index 3f4ac69f6..de29bb8f1 100644 --- a/components/src/main/java/org/patternfly/component/ValidationStatus.java +++ b/components/src/main/java/org/patternfly/component/ValidationStatus.java @@ -20,27 +20,28 @@ import org.patternfly.icon.IconSets; import org.patternfly.icon.PredefinedIcon; import org.patternfly.style.Classes; +import org.patternfly.style.Status; import static org.patternfly.style.Classes.modifier; public enum ValidationStatus { - default_(null, IconSets.fas::minus), + default_(Status.info, null, null), - indeterminate(modifier(Classes.indeterminate), IconSets.fas::minus), + indeterminate(Status.info, modifier(Classes.indeterminate), IconSets.fas::minus), - warning(modifier(Classes.warning), IconSets.fas::exclamationTriangle), + success(Status.success, Status.success.modifier(), IconSets.fas::checkCircle), - success(modifier(Classes.success), IconSets.fas::checkCircle), + warning(Status.warning, Status.warning.modifier(), IconSets.fas::exclamationTriangle), - error(modifier(Classes.error), IconSets.fas::exclamationCircle), - - ; + error(Status.danger, modifier(Classes.error), IconSets.fas::exclamationCircle); + public final Status status; public final String modifier; public final Supplier icon; - ValidationStatus(String modifier, Supplier icon) { + ValidationStatus(Status status, String modifier, Supplier icon) { + this.status = status; this.modifier = modifier; this.icon = icon; } diff --git a/components/src/main/java/org/patternfly/component/accordion/Accordion.java b/components/src/main/java/org/patternfly/component/accordion/Accordion.java index ad7baa913..8b270f8e8 100644 --- a/components/src/main/java/org/patternfly/component/accordion/Accordion.java +++ b/components/src/main/java/org/patternfly/component/accordion/Accordion.java @@ -20,6 +20,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import org.jboss.elemento.Attachable; import org.jboss.elemento.HTMLContainerBuilder; @@ -38,6 +39,7 @@ import static org.jboss.elemento.Elements.div; import static org.jboss.elemento.Elements.dl; +import static org.jboss.elemento.Elements.failSafeRemoveFromParent; import static org.jboss.elemento.Elements.isAttached; import static org.jboss.elemento.Elements.removeChildrenFrom; import static org.patternfly.component.IconPosition.end; @@ -87,6 +89,8 @@ public static Accordion accordion(AccordionType type) { IconPosition iconPosition; private final Map items; private final List> toggleHandler; + private final List> onAdd; + private final List> onRemove; Accordion(HTMLContainerBuilder builder) { super(ComponentType.Accordion, builder.css(component(accordion)).element()); @@ -96,6 +100,8 @@ Accordion(HTMLContainerBuilder builder) { this.iconPosition = end; this.items = new LinkedHashMap<>(); this.toggleHandler = new ArrayList<>(); + this.onAdd = new ArrayList<>(); + this.onRemove = new ArrayList<>(); Attachable.register(this, this); } @@ -114,6 +120,7 @@ public Accordion add(AccordionItem item) { if (isAttached(this)) { item.appendTo(this); } + onAdd.forEach(bc -> bc.accept(this, item)); return this; } @@ -173,6 +180,18 @@ public Accordion that() { // ------------------------------------------------------ events + @Override + public Accordion onAdd(BiConsumer onAdd) { + this.onAdd.add(onAdd); + return this; + } + + @Override + public Accordion onRemove(BiConsumer onRemove) { + this.onRemove.add(onRemove); + return this; + } + public Accordion onToggle(ToggleHandler toggleHandler) { this.toggleHandler.add(toggleHandler); return this; @@ -227,10 +246,24 @@ public AccordionItem item(String identifier) { return items.get(identifier); } + @Override + public void removeItem(String identifier) { + AccordionItem item = items.remove(identifier); + failSafeRemoveFromParent(item); + if (item != null) { + onRemove.forEach(bc -> bc.accept(this, item)); + } + } + @Override public void clear() { removeChildrenFrom(element()); - items.clear(); + Iterator iterator = items.values().iterator(); + while (iterator.hasNext()) { + AccordionItem item = iterator.next(); + iterator.remove(); + onRemove.forEach(bc -> bc.accept(this, item)); + } } // ------------------------------------------------------ internal diff --git a/components/src/main/java/org/patternfly/component/accordion/AccordionItem.java b/components/src/main/java/org/patternfly/component/accordion/AccordionItem.java index 68433d0d9..6513c45a2 100644 --- a/components/src/main/java/org/patternfly/component/accordion/AccordionItem.java +++ b/components/src/main/java/org/patternfly/component/accordion/AccordionItem.java @@ -21,11 +21,11 @@ import java.util.Map; import org.jboss.elemento.ButtonType; +import org.jboss.elemento.ElementContainerDelegate; +import org.jboss.elemento.ElementTextDelegate; import org.jboss.elemento.HTMLContainerBuilder; import org.jboss.elemento.Id; import org.patternfly.component.ComponentType; -import org.patternfly.component.ElementContainerDelegate; -import org.patternfly.component.ElementTextDelegate; import org.patternfly.component.Expandable; import org.patternfly.component.HasIdentifier; import org.patternfly.core.ComponentContext; @@ -81,7 +81,7 @@ public static AccordionItem accordionItem(String identifier, String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "aci"; + public static final String SUB_COMPONENT_NAME = "aci"; private final String identifier; private final Map data; private final HTMLElement textElement; diff --git a/components/src/main/java/org/patternfly/component/accordion/AccordionItemBody.java b/components/src/main/java/org/patternfly/component/accordion/AccordionItemBody.java index f0f881df6..5167a601f 100644 --- a/components/src/main/java/org/patternfly/component/accordion/AccordionItemBody.java +++ b/components/src/main/java/org/patternfly/component/accordion/AccordionItemBody.java @@ -36,7 +36,7 @@ public static AccordionItemBody accordionItemBody() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "acicb"; + public static final String SUB_COMPONENT_NAME = "acicb"; AccordionItemBody() { super(SUB_COMPONENT_NAME, div().css(component(accordion, expandableContent, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/alert/Alert.java b/components/src/main/java/org/patternfly/component/alert/Alert.java index fc06ba005..513a8e444 100644 --- a/components/src/main/java/org/patternfly/component/alert/Alert.java +++ b/components/src/main/java/org/patternfly/component/alert/Alert.java @@ -40,6 +40,7 @@ import org.patternfly.style.Modifiers.Inline; import org.patternfly.style.Modifiers.Plain; +import elemental2.core.JsDate; import elemental2.dom.Element; import elemental2.dom.Event; import elemental2.dom.HTMLDivElement; @@ -116,6 +117,7 @@ public static Alert alert(Severity type, String identifier, String title) { private final String identifier; private final Severity severity; private final String title; + private final double timestamp; private final HTMLElement iconContainer; private final HTMLParagraphElement titleElement; private final Map data; @@ -127,11 +129,12 @@ public static Alert alert(Severity type, String identifier, String title) { Alert(Severity severity, String identifier, String title) { super(ComponentType.Alert, div().css(component(alert), severity.status.modifier()) .data(Dataset.identifier, identifier) - .aria(label, severity.aria) + .aria(label, severity.name() + " alert") .element()); this.identifier = identifier; this.severity = severity; this.title = title; + this.timestamp = JsDate.now(); this.data = new HashMap<>(); this.timeoutHandle = 0; this.timeout = NO_TIMEOUT; @@ -142,7 +145,7 @@ public static Alert alert(Severity type, String identifier, String title) { .add(severity.icon.get().element()) .element()); add(titleElement = p().css(component(alert, Classes.title)) - .add(span().css(screenReader).text(severity.aria + ":")) + .add(span().css(screenReader).text(severity.name() + " alert:")) .add(title) .element()); Attachable.register(this, this); @@ -197,7 +200,7 @@ public Alert closable() { public Alert closable(CloseHandler closeHandler) { insertAfter(div().css(component(alert, Classes.action)) .add(closeButton = button().icon(times().element()).plain() - .aria(label, "Close " + severity.aria + ": " + title) + .aria(label, "Close " + severity.name() + " alert: " + title) .on(click, event -> close(event, true))) .element(), titleElement); return onClose(closeHandler); @@ -226,7 +229,7 @@ public Alert expandable(ToggleHandler toggleHandler) { .add(toggleButton = button().plain() .on(click, e -> toggle()) .aria(expanded, false) - .aria(label, severity.aria + ": " + title + " details") + .aria(label, severity.name() + " alert: " + title + " details") .add(span().css(component(alert, toggle, icon)) .add(angleRight().element()))) .element()); @@ -372,6 +375,10 @@ public void expand(boolean fireEvent) { } } + public double timestamp() { + return timestamp; + } + // ------------------------------------------------------ internal private void startTimeout() { diff --git a/components/src/main/java/org/patternfly/component/alert/AlertActionGroup.java b/components/src/main/java/org/patternfly/component/alert/AlertActionGroup.java index 8dfe2c322..a9704e55c 100644 --- a/components/src/main/java/org/patternfly/component/alert/AlertActionGroup.java +++ b/components/src/main/java/org/patternfly/component/alert/AlertActionGroup.java @@ -37,9 +37,7 @@ public static AlertActionGroup alertActionGroup() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "aag"; - - private Alert alert; + public static final String SUB_COMPONENT_NAME = "aag"; AlertActionGroup() { super(SUB_COMPONENT_NAME, div().css(component(Classes.alert, actionGroup)).element()); diff --git a/components/src/main/java/org/patternfly/component/alert/AlertDescription.java b/components/src/main/java/org/patternfly/component/alert/AlertDescription.java index 7c02a8b50..0fe8de3da 100644 --- a/components/src/main/java/org/patternfly/component/alert/AlertDescription.java +++ b/components/src/main/java/org/patternfly/component/alert/AlertDescription.java @@ -39,7 +39,7 @@ public static AlertDescription alertDescription(String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ad"; + public static final String SUB_COMPONENT_NAME = "ad"; AlertDescription() { super(SUB_COMPONENT_NAME, div().css(component(alert, description)).element()); diff --git a/components/src/main/java/org/patternfly/component/alert/AlertGroup.java b/components/src/main/java/org/patternfly/component/alert/AlertGroup.java index 4a8bc4a48..b1ea41264 100644 --- a/components/src/main/java/org/patternfly/component/alert/AlertGroup.java +++ b/components/src/main/java/org/patternfly/component/alert/AlertGroup.java @@ -15,9 +15,12 @@ */ package org.patternfly.component.alert; +import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import org.patternfly.component.BaseComponent; import org.patternfly.component.ComponentType; @@ -74,7 +77,7 @@ public static AlertGroup alertGroup(AlertGroupType type) { * Creates a new alert group of the given type and timeout. *

* If the type is {@link AlertGroupType#toast} the alert group is added to the body or if it already has been added the - * existing alert group is returned (singleton pattern). + * existing toast alert group is returned (singleton pattern). */ public static AlertGroup alertGroup(AlertGroupType type, int timeout) { if (type == AlertGroupType.toast) { @@ -97,14 +100,18 @@ public static AlertGroup toastAlertGroup() { private final AlertGroupType type; private final Map items; private final int timeout; + private final List> onAdd; + private final List> onRemove; AlertGroup(AlertGroupType type, int timeout) { super(ComponentType.AlertGroup, ul().css(component(alertGroup)) .attr(role, list) .element()); this.type = type; - this.items = new LinkedHashMap<>(); this.timeout = timeout; + this.items = new LinkedHashMap<>(); + this.onAdd = new ArrayList<>(); + this.onRemove = new ArrayList<>(); storeComponent(); if (type == AlertGroupType.dynamic || type == AlertGroupType.toast) { @@ -137,14 +144,31 @@ public AlertGroup add(Alert alert) { } add(li().add(alert)); } + onAdd.forEach(listener -> listener.accept(this, alert)); return this; } + // ------------------------------------------------------ builder + @Override public AlertGroup that() { return this; } + // ------------------------------------------------------ events + + @Override + public AlertGroup onAdd(BiConsumer onAdd) { + this.onAdd.add(onAdd); + return this; + } + + @Override + public AlertGroup onRemove(BiConsumer onRemove) { + this.onRemove.add(onRemove); + return this; + } + // ------------------------------------------------------ api @Override @@ -172,13 +196,26 @@ public Alert item(String identifier) { return items.get(identifier); } + @Override + public void removeItem(String identifier) { + Alert item = items.remove(identifier); + failSafeRemoveFromParent(item); + if (item != null) { + onRemove.forEach(listener -> listener.accept(this, item)); + } + } + @Override public void clear() { removeChildrenFrom(element()); - items.clear(); + Iterator iterator = items.values().iterator(); + while (iterator.hasNext()) { + Alert item = iterator.next(); + iterator.remove(); + onRemove.forEach(bc -> bc.accept(this, item)); + } } - // ------------------------------------------------------ internal void closeAlert(Alert alert) { diff --git a/components/src/main/java/org/patternfly/component/avatar/Avatar.java b/components/src/main/java/org/patternfly/component/avatar/Avatar.java index ffe3b69a8..1297375fd 100644 --- a/components/src/main/java/org/patternfly/component/avatar/Avatar.java +++ b/components/src/main/java/org/patternfly/component/avatar/Avatar.java @@ -17,15 +17,12 @@ import org.patternfly.component.BaseComponent; import org.patternfly.component.ComponentType; -import org.patternfly.style.Brightness; +import org.patternfly.style.Modifiers.Bordered; import org.patternfly.style.Size; import elemental2.dom.HTMLImageElement; import static org.jboss.elemento.Elements.img; -import static org.patternfly.core.Validation.verifyEnum; -import static org.patternfly.style.Brightness.dark; -import static org.patternfly.style.Brightness.light; import static org.patternfly.style.Classes.avatar; import static org.patternfly.style.Classes.component; import static org.patternfly.style.TypedModifier.swap; @@ -35,7 +32,7 @@ * * @see https://www.patternfly.org/components/avatar */ -public class Avatar extends BaseComponent { +public class Avatar extends BaseComponent implements Bordered { // ------------------------------------------------------ factory @@ -68,13 +65,6 @@ public Avatar size(Size size) { return swap(this, element(), size, Size.values()); } - public Avatar border(Brightness border) { - if (verifyEnum(element(), "border", border, light, dark)) { - swap(this, element(), border, Brightness.values()); - } - return this; - } - @Override public Avatar that() { return this; diff --git a/components/src/main/java/org/patternfly/component/badge/Badge.java b/components/src/main/java/org/patternfly/component/badge/Badge.java index bd55a0f95..ff3e00ea6 100644 --- a/components/src/main/java/org/patternfly/component/badge/Badge.java +++ b/components/src/main/java/org/patternfly/component/badge/Badge.java @@ -17,7 +17,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; import java.util.function.Function; import org.patternfly.component.BaseComponent; @@ -32,6 +31,7 @@ import elemental2.dom.HTMLElement; import static org.jboss.elemento.Elements.span; +import static org.patternfly.handler.ChangeHandler.fireIfChanged; import static org.patternfly.style.Classes.badge; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.modifier; @@ -156,9 +156,7 @@ public Badge bind(ObservableValue ov) { this.ov = ov; this.ov.subscribe((current, previous) -> { updateValue(current); - if (!Objects.equals(current, previous)) { - changeHandler.forEach(handler -> handler.onChange(new Event(""), this, current)); - } + fireIfChanged(this, current, previous, changeHandler); }); updateValue(ov.get()); return this; diff --git a/components/src/main/java/org/patternfly/component/banner/Banner.java b/components/src/main/java/org/patternfly/component/banner/Banner.java index b3208702a..d42d01e0e 100644 --- a/components/src/main/java/org/patternfly/component/banner/Banner.java +++ b/components/src/main/java/org/patternfly/component/banner/Banner.java @@ -19,8 +19,8 @@ import org.jboss.elemento.Elements; import org.patternfly.component.BaseComponent; import org.patternfly.component.ComponentType; -import org.patternfly.style.Classes; import org.patternfly.style.Color; +import org.patternfly.style.Modifiers.Static; import org.patternfly.style.Status; import elemental2.dom.HTMLDivElement; @@ -32,7 +32,6 @@ import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.screenReader; import static org.patternfly.style.Color.grey; -import static org.patternfly.style.Modifiers.toggleModifier; import static org.patternfly.style.TypedModifier.swap; /** @@ -42,7 +41,8 @@ * @see https://www.patternfly.org/components/banner */ public class Banner extends BaseComponent implements - ElementTextMethods { + ElementTextMethods, + Static { // ------------------------------------------------------ factory @@ -79,16 +79,6 @@ public Banner status(Status status) { return swap(this, element(), status, Status.values()); } - /** Same as {@linkplain #sticky(boolean) sticky(true)} */ - public Banner sticky() { - return sticky(true); - } - - /** Adds/removes {@linkplain Classes#modifier(String) modifier(sticky)} */ - public Banner sticky(boolean sticky) { - return toggleModifier(that(), element(), Classes.sticky, sticky); - } - public Banner screenReader(String text) { failSafeScreenReaderElement().textContent = text; return this; diff --git a/components/src/main/java/org/patternfly/component/breadcrumb/Breadcrumb.java b/components/src/main/java/org/patternfly/component/breadcrumb/Breadcrumb.java index 3584f3518..0e963f652 100644 --- a/components/src/main/java/org/patternfly/component/breadcrumb/Breadcrumb.java +++ b/components/src/main/java/org/patternfly/component/breadcrumb/Breadcrumb.java @@ -20,6 +20,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import java.util.function.Function; import org.jboss.elemento.HTMLContainerBuilder; @@ -34,6 +35,7 @@ import elemental2.dom.HTMLElement; import elemental2.dom.HTMLOListElement; +import static org.jboss.elemento.Elements.failSafeRemoveFromParent; import static org.jboss.elemento.Elements.nav; import static org.jboss.elemento.Elements.ol; import static org.jboss.elemento.Elements.removeChildrenFrom; @@ -62,12 +64,16 @@ public static Breadcrumb breadcrumb() { private final HTMLContainerBuilder ol; private final Map items; private final List> selectHandler; + private final List> onAdd; + private final List> onRemove; Breadcrumb() { super(ComponentType.Breadcrumb, nav().css(component(breadcrumb)).element()); this.items = new LinkedHashMap<>(); this.ol = ol().css(component(breadcrumb, Classes.list)).attr(role, list); this.selectHandler = new ArrayList<>(); + this.onAdd = new ArrayList<>(); + this.onRemove = new ArrayList<>(); storeComponent(); element().appendChild(ol.element()); } @@ -78,6 +84,7 @@ public static Breadcrumb breadcrumb() { public Breadcrumb add(BreadcrumbItem item) { items.put(item.identifier(), item); ol.add(item); + onAdd.forEach(bc -> bc.accept(this, item)); return this; } @@ -96,6 +103,18 @@ public Breadcrumb ariaLabel(String label) { // ------------------------------------------------------ events + @Override + public Breadcrumb onAdd(BiConsumer onAdd) { + this.onAdd.add(onAdd); + return this; + } + + @Override + public Breadcrumb onRemove(BiConsumer onRemove) { + this.onRemove.add(onRemove); + return this; + } + public Breadcrumb onSelect(SelectHandler selectHandler) { this.selectHandler.add(selectHandler); return this; @@ -133,10 +152,24 @@ public BreadcrumbItem item(String identifier) { return items.get(identifier); } + @Override + public void removeItem(String identifier) { + BreadcrumbItem item = items.remove(identifier); + failSafeRemoveFromParent(item); + if (item != null) { + onRemove.forEach(bc -> bc.accept(this, item)); + } + } + @Override public void clear() { removeChildrenFrom(ol); - items.clear(); + Iterator iterator = items.values().iterator(); + while (iterator.hasNext()) { + BreadcrumbItem item = iterator.next(); + iterator.remove(); + onRemove.forEach(bc -> bc.accept(this, item)); + } } // ------------------------------------------------------ internal diff --git a/components/src/main/java/org/patternfly/component/breadcrumb/BreadcrumbItem.java b/components/src/main/java/org/patternfly/component/breadcrumb/BreadcrumbItem.java index 0c0535375..a8c58eaf2 100644 --- a/components/src/main/java/org/patternfly/component/breadcrumb/BreadcrumbItem.java +++ b/components/src/main/java/org/patternfly/component/breadcrumb/BreadcrumbItem.java @@ -18,7 +18,7 @@ import java.util.HashMap; import java.util.Map; -import org.patternfly.component.ElementTextDelegate; +import org.jboss.elemento.ElementTextDelegate; import org.patternfly.component.HasIdentifier; import org.patternfly.core.Aria; import org.patternfly.core.ComponentContext; @@ -64,7 +64,7 @@ public static BreadcrumbItem breadcrumbItem(String identifier, String text, Stri // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "bci"; + public static final String SUB_COMPONENT_NAME = "bci"; private final String identifier; private final Map data; private final HTMLElement textElement; diff --git a/components/src/main/java/org/patternfly/component/button/Button.java b/components/src/main/java/org/patternfly/component/button/Button.java index 826db0445..b4b0b6350 100644 --- a/components/src/main/java/org/patternfly/component/button/Button.java +++ b/components/src/main/java/org/patternfly/component/button/Button.java @@ -18,6 +18,7 @@ import java.util.function.Consumer; import org.jboss.elemento.By; +import org.jboss.elemento.ElementContainerDelegate; import org.jboss.elemento.ElementTextMethods; import org.jboss.elemento.Elements; import org.jboss.elemento.HTMLContainerBuilder; @@ -27,18 +28,20 @@ import org.patternfly.component.ComponentIconAndText; import org.patternfly.component.ComponentProgress; import org.patternfly.component.ComponentType; -import org.patternfly.component.ElementContainerDelegate; import org.patternfly.component.IconPosition; import org.patternfly.component.badge.Badge; import org.patternfly.component.spinner.Spinner; import org.patternfly.core.Aria; import org.patternfly.handler.ComponentHandler; +import org.patternfly.icon.PredefinedIcon; import org.patternfly.style.Classes; import org.patternfly.style.Modifiers.Disabled; import org.patternfly.style.Modifiers.Inline; import org.patternfly.style.Modifiers.NoPadding; import org.patternfly.style.Modifiers.Plain; +import org.patternfly.style.Modifiers.Primary; import org.patternfly.style.Modifiers.Secondary; +import org.patternfly.style.NotificationStatus; import elemental2.dom.Element; import elemental2.dom.HTMLAnchorElement; @@ -60,9 +63,9 @@ import static org.patternfly.style.Classes.link; import static org.patternfly.style.Classes.modifier; import static org.patternfly.style.Classes.plain; -import static org.patternfly.style.Classes.primary; import static org.patternfly.style.Classes.progress; import static org.patternfly.style.Classes.small; +import static org.patternfly.style.Classes.stateful; import static org.patternfly.style.Classes.tertiary; import static org.patternfly.style.Classes.warning; import static org.patternfly.style.Size.lg; @@ -86,6 +89,7 @@ public class Button extends BaseComponent implements Inline, NoPadding, Plain, + Primary, Secondary { // ------------------------------------------------------ factory @@ -98,6 +102,10 @@ public static Button button(String text) { return button(Elements.button()).text(text); } + public static Button button(PredefinedIcon icon) { + return button(Elements.button()).icon(icon); + } + /** * Creates a button with an {@code } tag. */ @@ -121,7 +129,6 @@ public static Button button(HTMLContainerBuilder buil private static final Logger logger = Logger.getLogger(Button.class.getName()); private final HTMLButtonElement buttonElement; private final HTMLAnchorElement anchorElement; - private Element icon; private HTMLElement textElement; private HTMLElement iconElement; private Spinner spinner; @@ -162,7 +169,6 @@ public Button add(Badge badge) { @Override public Button icon(Element icon) { removeIcon(); - this.icon = icon; failSafeIconElement().appendChild(icon); return this; } @@ -170,7 +176,6 @@ public Button icon(Element icon) { @Override public Button removeIcon() { failSafeRemoveFromParent(iconElement); - this.icon = null; this.iconElement = null; return this; } @@ -178,7 +183,6 @@ public Button removeIcon() { @Override public Button iconAndText(Element icon, String text, IconPosition position) { removeIcon(); - this.icon = icon; switch (position) { case start: failSafeIconElement().classList.add(modifier(Classes.start)); @@ -221,10 +225,6 @@ public Button target(String target) { return this; } - public Button primary() { - return css(modifier(primary)); - } - public Button danger() { return css(modifier(danger)); } @@ -249,6 +249,10 @@ public Button control() { return css(modifier(control)); } + public Button stateful(NotificationStatus status) { + return css(modifier(stateful), status.modifier()); + } + public Button block() { return css(modifier(block)); } @@ -315,6 +319,10 @@ public String text() { return ""; } + public HTMLElement textElement() { + return textElement; + } + // ------------------------------------------------------ internal private HTMLElement failSafeIconElement() { diff --git a/components/src/main/java/org/patternfly/component/card/Card.java b/components/src/main/java/org/patternfly/component/card/Card.java index 2a775298c..9398c226a 100644 --- a/components/src/main/java/org/patternfly/component/card/Card.java +++ b/components/src/main/java/org/patternfly/component/card/Card.java @@ -84,6 +84,7 @@ public static Card card() { private String to; private boolean external; private CardHeader header; + // TODO Turn this into list of handlers private CardExpandableContent expandableContent; private SelectHandler selectHandler; private ComponentHandler clickHandler; diff --git a/components/src/main/java/org/patternfly/component/card/CardActions.java b/components/src/main/java/org/patternfly/component/card/CardActions.java index 7748daffa..21656e1a0 100644 --- a/components/src/main/java/org/patternfly/component/card/CardActions.java +++ b/components/src/main/java/org/patternfly/component/card/CardActions.java @@ -18,15 +18,16 @@ import org.patternfly.component.form.Checkbox; import org.patternfly.component.menu.Dropdown; import org.patternfly.style.Classes; +import org.patternfly.style.Modifiers.NoOffset; import elemental2.dom.HTMLDivElement; import static org.jboss.elemento.Elements.div; import static org.patternfly.style.Classes.actions; import static org.patternfly.style.Classes.component; -import static org.patternfly.style.Modifiers.toggleModifier; -public class CardActions extends CardSubComponent { +public class CardActions extends CardSubComponent + implements NoOffset { // ------------------------------------------------------ factory @@ -36,7 +37,7 @@ public static CardActions cardActions() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ca"; + public static final String SUB_COMPONENT_NAME = "ca"; CardSelectableActions selectableActions; private Card card; @@ -71,16 +72,6 @@ public CardActions add(CardSelectableActions selectableActions) { // ------------------------------------------------------ builder - /** Same as {@linkplain #noOffset(boolean) noOffset(true)} */ - public CardActions noOffset() { - return noOffset(true); - } - - /** Adds/removes {@linkplain Classes#modifier(String) modifier(noOffset)} */ - public CardActions noOffset(boolean noOffset) { - return toggleModifier(this, element(), Classes.noOffset, noOffset); - } - @Override public CardActions that() { return this; diff --git a/components/src/main/java/org/patternfly/component/card/CardBody.java b/components/src/main/java/org/patternfly/component/card/CardBody.java index 76a9dd7f7..b05338e8f 100644 --- a/components/src/main/java/org/patternfly/component/card/CardBody.java +++ b/components/src/main/java/org/patternfly/component/card/CardBody.java @@ -37,7 +37,7 @@ public static CardBody cardBody() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cb"; + public static final String SUB_COMPONENT_NAME = "cb"; CardBody() { super(SUB_COMPONENT_NAME, div().css(component(card, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/card/CardExpandableContent.java b/components/src/main/java/org/patternfly/component/card/CardExpandableContent.java index 9d5625343..3d0d84db0 100644 --- a/components/src/main/java/org/patternfly/component/card/CardExpandableContent.java +++ b/components/src/main/java/org/patternfly/component/card/CardExpandableContent.java @@ -35,7 +35,7 @@ public static CardExpandableContent cardExpandableContent() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cec"; + public static final String SUB_COMPONENT_NAME = "cec"; CardExpandableContent() { super(SUB_COMPONENT_NAME, div().css(component(card, expandableContent)) diff --git a/components/src/main/java/org/patternfly/component/card/CardFooter.java b/components/src/main/java/org/patternfly/component/card/CardFooter.java index f069ecb41..086985470 100644 --- a/components/src/main/java/org/patternfly/component/card/CardFooter.java +++ b/components/src/main/java/org/patternfly/component/card/CardFooter.java @@ -35,7 +35,7 @@ public static CardFooter cardFooter() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cf"; + public static final String SUB_COMPONENT_NAME = "cf"; CardFooter() { super(SUB_COMPONENT_NAME, div().css(component(card, footer)).element()); diff --git a/components/src/main/java/org/patternfly/component/card/CardHeader.java b/components/src/main/java/org/patternfly/component/card/CardHeader.java index 1987e5137..e7a7aa5a7 100644 --- a/components/src/main/java/org/patternfly/component/card/CardHeader.java +++ b/components/src/main/java/org/patternfly/component/card/CardHeader.java @@ -16,9 +16,9 @@ package org.patternfly.component.card; import org.jboss.elemento.Attachable; +import org.jboss.elemento.ElementContainerDelegate; import org.jboss.elemento.Id; import org.patternfly.component.ComponentType; -import org.patternfly.component.ElementContainerDelegate; import org.patternfly.component.button.Button; import org.patternfly.core.Aria; import org.patternfly.style.Classes; @@ -55,12 +55,11 @@ public static CardHeader cardHeader() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ch"; + public static final String SUB_COMPONENT_NAME = "ch"; Button toggleButton; CardActions actions; private final HTMLElement mainElement; - private Card card; private CardTitle title; CardHeader() { diff --git a/components/src/main/java/org/patternfly/component/card/CardSelectableActions.java b/components/src/main/java/org/patternfly/component/card/CardSelectableActions.java index aecb47901..ae0fe71c1 100644 --- a/components/src/main/java/org/patternfly/component/card/CardSelectableActions.java +++ b/components/src/main/java/org/patternfly/component/card/CardSelectableActions.java @@ -50,7 +50,7 @@ public static CardSelectableActions cardSelectableActions() { // ------------------------------------------------------ instance private static final Logger logger = Logger.getLogger(CardSelectableActions.class.getName()); - static final String SUB_COMPONENT_NAME = "csa"; + public static final String SUB_COMPONENT_NAME = "csa"; Checkbox checkbox; Radio radio; diff --git a/components/src/main/java/org/patternfly/component/card/CardTitle.java b/components/src/main/java/org/patternfly/component/card/CardTitle.java index aa7147037..6c4a41fe4 100644 --- a/components/src/main/java/org/patternfly/component/card/CardTitle.java +++ b/components/src/main/java/org/patternfly/component/card/CardTitle.java @@ -15,8 +15,8 @@ */ package org.patternfly.component.card; -import org.patternfly.component.ElementContainerDelegate; -import org.patternfly.component.ElementTextDelegate; +import org.jboss.elemento.ElementContainerDelegate; +import org.jboss.elemento.ElementTextDelegate; import org.patternfly.style.Classes; import elemental2.dom.Element; @@ -53,14 +53,14 @@ public static CardTitle cardTitle(String text, int level) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ct"; + public static final String SUB_COMPONENT_NAME = "ct"; private final HTMLElement titleText; CardTitle(String text, int level) { super(SUB_COMPONENT_NAME, div().css(component(card, title)).element()); if (level > 0) { - element().appendChild(titleText = h(level, text).css(component(card, title, Classes.text)).element()); + element().appendChild(titleText = h(level).css(component(card, title, Classes.text)).element()); } else { element().appendChild(titleText = div().css(component(card, title, Classes.text)).element()); } diff --git a/components/src/main/java/org/patternfly/component/codeblock/CodeBlock.java b/components/src/main/java/org/patternfly/component/codeblock/CodeBlock.java index bd9f071fa..087f82bb6 100644 --- a/components/src/main/java/org/patternfly/component/codeblock/CodeBlock.java +++ b/components/src/main/java/org/patternfly/component/codeblock/CodeBlock.java @@ -172,13 +172,12 @@ private void splitCode() { String moreCode = String.join("\n", copyOfRange(lines(), truncate, lines().length)); if (esCode == null && esTrigger == null) { - String codeId = Id.unique(componentType().id, "es-code"); - String triggerId = Id.unique(componentType().id, "es-trigger"); - esCode = expandableSection(codeId) - .detachedFrom(triggerId) + String esId = Id.unique(componentType().id, "es-code"); + esCode = expandableSection(esId) + .detached() .addContent(expandableSectionContent().text(moreCode)); - esTrigger = expandableSection(triggerId) - .detachedFrom(codeId) + esTrigger = expandableSection(esId) + .detached() .addToggle(expandableSectionToggle("Show more", "Show less")); removeChildrenFrom(codeElement); diff --git a/components/src/main/java/org/patternfly/component/codeblock/CodeBlockAction.java b/components/src/main/java/org/patternfly/component/codeblock/CodeBlockAction.java index 4339c0877..92e5f2c95 100644 --- a/components/src/main/java/org/patternfly/component/codeblock/CodeBlockAction.java +++ b/components/src/main/java/org/patternfly/component/codeblock/CodeBlockAction.java @@ -72,7 +72,7 @@ public static CodeBlockAction codeBlockCopyToClipboardAction(String copyText, St // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cba"; + public static final String SUB_COMPONENT_NAME = "cba"; private final Button button; private ComponentHandler handler; diff --git a/components/src/main/java/org/patternfly/component/codeblock/CodeBlockActions.java b/components/src/main/java/org/patternfly/component/codeblock/CodeBlockActions.java index 688a2a21c..eb5a2946e 100644 --- a/components/src/main/java/org/patternfly/component/codeblock/CodeBlockActions.java +++ b/components/src/main/java/org/patternfly/component/codeblock/CodeBlockActions.java @@ -32,7 +32,7 @@ public static CodeBlockActions codeBlockActions() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cbas"; + public static final String SUB_COMPONENT_NAME = "cbas"; CodeBlockActions() { super(SUB_COMPONENT_NAME, div().css(component(Classes.codeBlock, Classes.actions)).element()); diff --git a/components/src/main/java/org/patternfly/component/codeblock/CodeBlockHeader.java b/components/src/main/java/org/patternfly/component/codeblock/CodeBlockHeader.java index 4514b0764..d39bf6426 100644 --- a/components/src/main/java/org/patternfly/component/codeblock/CodeBlockHeader.java +++ b/components/src/main/java/org/patternfly/component/codeblock/CodeBlockHeader.java @@ -33,7 +33,7 @@ public static CodeBlockHeader codeBlockHeader() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cbh"; + public static final String SUB_COMPONENT_NAME = "cbh"; CodeBlockActions actions; diff --git a/components/src/main/java/org/patternfly/component/drawer/Drawer.java b/components/src/main/java/org/patternfly/component/drawer/Drawer.java index b199693e7..ba0c5272f 100644 --- a/components/src/main/java/org/patternfly/component/drawer/Drawer.java +++ b/components/src/main/java/org/patternfly/component/drawer/Drawer.java @@ -22,8 +22,8 @@ import org.patternfly.component.ComponentType; import org.patternfly.component.Expandable; import org.patternfly.handler.ToggleHandler; -import org.patternfly.style.Classes; import org.patternfly.style.Modifiers.Inline; +import org.patternfly.style.Modifiers.Static; import elemental2.dom.Event; import elemental2.dom.HTMLElement; @@ -34,7 +34,6 @@ import static org.patternfly.style.Classes.expanded; import static org.patternfly.style.Classes.main; import static org.patternfly.style.Classes.modifier; -import static org.patternfly.style.Modifiers.toggleModifier; import static org.patternfly.style.TypedModifier.swap; /** @@ -46,7 +45,8 @@ */ public class Drawer extends BaseComponent implements Expandable, - Inline { + Inline, + Static { // ------------------------------------------------------ factory @@ -106,16 +106,6 @@ public Drawer add(DrawerPanel panel) { // ------------------------------------------------------ builder - /** Same as {@linkplain #static_(boolean) static_(true)} */ - public Drawer static_() { - return static_(true); - } - - /** Adds/removes {@linkplain Classes#modifier(String) modifier(static_)} */ - public Drawer static_(boolean static_) { - return toggleModifier(that(), element(), Classes.static_, static_); - } - public Drawer position(Position position) { return swap(this, element(), position, this.position, () -> this.position = position); } @@ -162,6 +152,14 @@ public void expand(boolean fireEvent) { } } + public DrawerContent content() { + return content; + } + + public DrawerPanel panel() { + return panel; + } + // ------------------------------------------------------ internal private HTMLElement failSafeMainContainer() { diff --git a/components/src/main/java/org/patternfly/component/drawer/DrawerContentBody.java b/components/src/main/java/org/patternfly/component/drawer/DrawerBody.java similarity index 74% rename from components/src/main/java/org/patternfly/component/drawer/DrawerContentBody.java rename to components/src/main/java/org/patternfly/component/drawer/DrawerBody.java index b33b24f36..912ae0efd 100644 --- a/components/src/main/java/org/patternfly/component/drawer/DrawerContentBody.java +++ b/components/src/main/java/org/patternfly/component/drawer/DrawerBody.java @@ -16,6 +16,7 @@ package org.patternfly.component.drawer; import org.jboss.elemento.ElementTextMethods; +import org.patternfly.style.Modifiers.NoPadding; import org.patternfly.style.Modifiers.Padding; import elemental2.dom.HTMLDivElement; @@ -28,28 +29,29 @@ /** * Subcomponent for elements in a {@link DrawerContent}. */ -public class DrawerContentBody extends DrawerSubComponent implements - ElementTextMethods, - Padding { +public class DrawerBody extends DrawerSubComponent implements + ElementTextMethods, + Padding, + NoPadding { // ------------------------------------------------------ factory - public static DrawerContentBody drawerContentBody() { - return new DrawerContentBody(); + public static DrawerBody drawerBody() { + return new DrawerBody(); } // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "dcb"; + public static final String SUB_COMPONENT_NAME = "db"; - DrawerContentBody() { + DrawerBody() { super(SUB_COMPONENT_NAME, div().css(component(drawer, body)).element()); } // ------------------------------------------------------ builder @Override - public DrawerContentBody that() { + public DrawerBody that() { return this; } } diff --git a/components/src/main/java/org/patternfly/component/drawer/DrawerCloseButton.java b/components/src/main/java/org/patternfly/component/drawer/DrawerCloseButton.java index ebcb5a8ae..91fe0fe41 100644 --- a/components/src/main/java/org/patternfly/component/drawer/DrawerCloseButton.java +++ b/components/src/main/java/org/patternfly/component/drawer/DrawerCloseButton.java @@ -37,7 +37,7 @@ public static DrawerCloseButton drawerCloseButton() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "dcbtn"; + public static final String SUB_COMPONENT_NAME = "dcbtn"; DrawerCloseButton() { super(SUB_COMPONENT_NAME, div().css(component(drawer, actions)).element()); diff --git a/components/src/main/java/org/patternfly/component/drawer/DrawerContent.java b/components/src/main/java/org/patternfly/component/drawer/DrawerContent.java index 2fdc9336b..48847bff9 100644 --- a/components/src/main/java/org/patternfly/component/drawer/DrawerContent.java +++ b/components/src/main/java/org/patternfly/component/drawer/DrawerContent.java @@ -24,7 +24,7 @@ /** * The main content in a {@link Drawer} component. Elements should not be added directly to this subcomponent, but instead - * nested inside a {@link DrawerContentBody}. + * nested inside a {@link DrawerBody}. */ public class DrawerContent extends DrawerSubComponent { @@ -36,7 +36,7 @@ public static DrawerContent drawerContent() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "dc"; + public static final String SUB_COMPONENT_NAME = "dc"; DrawerContent() { super(SUB_COMPONENT_NAME, div().css(component(drawer, content)).element()); @@ -44,7 +44,7 @@ public static DrawerContent drawerContent() { // ------------------------------------------------------ add - public DrawerContent addBody(DrawerContentBody body) { + public DrawerContent addBody(DrawerBody body) { return add(body); } diff --git a/components/src/main/java/org/patternfly/component/drawer/DrawerPanel.java b/components/src/main/java/org/patternfly/component/drawer/DrawerPanel.java index 10f2b6709..4c0666182 100644 --- a/components/src/main/java/org/patternfly/component/drawer/DrawerPanel.java +++ b/components/src/main/java/org/patternfly/component/drawer/DrawerPanel.java @@ -32,7 +32,6 @@ import elemental2.dom.AddEventListenerOptions; import elemental2.dom.DOMRect; import elemental2.dom.Event; -import elemental2.dom.EventListener; import elemental2.dom.HTMLDivElement; import elemental2.dom.KeyboardEvent; import elemental2.dom.MouseEvent; @@ -82,7 +81,7 @@ /** * The sliding panel in a {@link Drawer} component. Elements should not be added directly to this subcomponent, but instead - * nested inside a {@link DrawerPanelBody} or {@link DrawerPanelHead}. + * nested inside a {@link DrawerBody} or {@link DrawerPanelHead}. */ public class DrawerPanel extends DrawerSubComponent implements Attachable { @@ -94,7 +93,7 @@ public static DrawerPanel drawerPanel() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "dp"; + public static final String SUB_COMPONENT_NAME = "dp"; private int increment; private boolean resizable; private boolean isResizing; @@ -198,7 +197,7 @@ public DrawerPanel addHead(DrawerPanelHead head) { return add(head); } - public DrawerPanel addBody(DrawerPanelBody body) { + public DrawerPanel addBody(DrawerBody body) { return add(body); } @@ -362,13 +361,10 @@ private void handleMouseDown(MouseEvent event) { private void handleTouchStart(TouchEvent event) { if (resizableDrawer()) { event.stopPropagation(); - // TODO Replace with EventType#bind(EventTarget, EventType, AddEventListenerOptions, EventCallbackFn) - // once a new Elemento version has been released AddEventListenerOptions options = AddEventListenerOptions.create(); + options.setOnce(true); options.setPassive(true); - EventListener listener = evt -> handleTouchMove(((TouchEvent) evt)); - document.addEventListener(touchmove.name, listener, options); - touchMoveHandler = () -> document.removeEventListener(touchmove.name, listener, options); + touchMoveHandler = bind(document, touchmove, options, this::handleTouchMove); touchEndHandler = bind(document, touchend, this::handleTouchEnd); isResizing = true; } @@ -385,8 +381,9 @@ private void handleTouchMove(TouchEvent event) { if (resizableDrawer()) { event.preventDefault(); event.stopImmediatePropagation(); - double touchPos = drawer.position == Position.bottom ? event.touches.item(0).clientY : event.touches.item( - 0).clientX; + double touchPos = drawer.position == Position.bottom + ? event.touches.item(0).clientY + : event.touches.item(0).clientX; handleControlMove(event, touchPos); } } diff --git a/components/src/main/java/org/patternfly/component/drawer/DrawerPanelHead.java b/components/src/main/java/org/patternfly/component/drawer/DrawerPanelHead.java index 4864738fa..adb4b9ca7 100644 --- a/components/src/main/java/org/patternfly/component/drawer/DrawerPanelHead.java +++ b/components/src/main/java/org/patternfly/component/drawer/DrawerPanelHead.java @@ -15,17 +15,11 @@ */ package org.patternfly.component.drawer; -import org.jboss.elemento.Attachable; -import org.patternfly.component.ElementContainerDelegate; import org.patternfly.style.Modifiers.NoPadding; -import elemental2.dom.Element; import elemental2.dom.HTMLDivElement; -import elemental2.dom.HTMLElement; -import elemental2.dom.MutationRecord; import static org.jboss.elemento.Elements.div; -import static org.patternfly.component.drawer.DrawerPanelBody.drawerPanelBody; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.drawer; import static org.patternfly.style.Classes.head; @@ -34,8 +28,6 @@ * Subcomponent for the header inside a {@link DrawerPanel}. */ public class DrawerPanelHead extends DrawerSubComponent implements - Attachable, - ElementContainerDelegate, NoPadding { // ------------------------------------------------------ factory @@ -46,30 +38,10 @@ public static DrawerPanelHead drawerPanelHead() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "dph"; - private final HTMLElement headContainer; - private boolean adjustTabIndex; + public static final String SUB_COMPONENT_NAME = "dph"; DrawerPanelHead() { - super(SUB_COMPONENT_NAME, drawerPanelBody().element()); - element().appendChild(headContainer = div().css(component(drawer, head)).element()); - Attachable.register(this, this); - } - - @Override - public void attach(MutationRecord mutationRecord) { - if (adjustTabIndex) { - Drawer drawer = lookupComponent(); - if (headContainer.firstElementChild instanceof HTMLElement) { - HTMLElement firstElement = ((HTMLElement) headContainer.firstElementChild); - drawer.onToggle((event, drw, expanded) -> firstElement.tabIndex = expanded ? 0 : -1); - } - } - } - - @Override - public Element containerDelegate() { - return headContainer; + super(SUB_COMPONENT_NAME, div().css(component(drawer, head)).element()); } // ------------------------------------------------------ add @@ -80,15 +52,6 @@ public DrawerPanelHead addCloseButton(DrawerCloseButton closeButton) { // ------------------------------------------------------ builder - /** - * By default, the tab index of the first HTML element is set to 0 if the drawer is expanded and to -1 if the drawer is - * collapsed. Use this method to turn this feature off. - */ - public DrawerPanelHead noAutoTabIndex() { - this.adjustTabIndex = false; - return this; - } - @Override public DrawerPanelHead that() { return this; diff --git a/components/src/main/java/org/patternfly/component/drawer/DrawerSection.java b/components/src/main/java/org/patternfly/component/drawer/DrawerSection.java index a83e9d712..9f3d6c5d8 100644 --- a/components/src/main/java/org/patternfly/component/drawer/DrawerSection.java +++ b/components/src/main/java/org/patternfly/component/drawer/DrawerSection.java @@ -38,7 +38,7 @@ public static DrawerSection drawerSection() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ds"; + public static final String SUB_COMPONENT_NAME = "ds"; DrawerSection() { super(SUB_COMPONENT_NAME, div().css(component(drawer, section)).element()); diff --git a/components/src/main/java/org/patternfly/component/emptystate/EmptyState.java b/components/src/main/java/org/patternfly/component/emptystate/EmptyState.java index deacd2924..2e4c34de8 100644 --- a/components/src/main/java/org/patternfly/component/emptystate/EmptyState.java +++ b/components/src/main/java/org/patternfly/component/emptystate/EmptyState.java @@ -15,9 +15,13 @@ */ package org.patternfly.component.emptystate; +import org.jboss.elemento.ElementContainerDelegate; +import org.jboss.elemento.ElementTextDelegate; import org.patternfly.component.BaseComponent; +import org.patternfly.component.ComponentIcon; import org.patternfly.component.ComponentType; -import org.patternfly.component.ElementContainerDelegate; +import org.patternfly.component.Severity; +import org.patternfly.component.spinner.Spinner; import org.patternfly.style.Modifiers.FullHeight; import org.patternfly.style.Size; import org.patternfly.style.Status; @@ -26,10 +30,17 @@ import elemental2.dom.HTMLElement; import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.h; +import static org.jboss.elemento.Elements.removeChildrenFrom; import static org.patternfly.core.Validation.verifyEnum; +import static org.patternfly.core.Validation.verifyRange; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.content; import static org.patternfly.style.Classes.emptyState; +import static org.patternfly.style.Classes.header; +import static org.patternfly.style.Classes.icon; +import static org.patternfly.style.Classes.text; +import static org.patternfly.style.Classes.title; import static org.patternfly.style.Size.lg; import static org.patternfly.style.Size.sm; import static org.patternfly.style.Size.xl; @@ -43,7 +54,9 @@ * @see https://www.patternfly.org/components/empty-state */ public class EmptyState extends BaseComponent implements + ComponentIcon, ElementContainerDelegate, + ElementTextDelegate, FullHeight { // ------------------------------------------------------ factory @@ -55,11 +68,20 @@ public static EmptyState emptyState() { // ------------------------------------------------------ instance private final HTMLElement contentContainer; + private final HTMLElement iconContainer; + private HTMLElement titleTextContainer; + private int level; EmptyState() { super(ComponentType.EmptyState, div().css(component(emptyState)).element()); - element().appendChild(contentContainer = div().css(component(emptyState, content)).element()); - storeComponent(); + level = 4; + contentContainer = div().css(component(emptyState, content)) + .add(div().css(component(emptyState, header)) + .add(iconContainer = div().css(component(emptyState, icon)).element()) + .add(div().css(component(emptyState, title)) + .add(titleTextContainer = h(level).css(component(emptyState, title, text)).element()))) + .element(); + element().appendChild(contentContainer); // don't use add(contentContainer) } @Override @@ -67,17 +89,12 @@ public Element containerDelegate() { return contentContainer; } - // ------------------------------------------------------ add - - public EmptyState addHeader(EmptyStateHeader header) { - return add(header); + @Override + public Element textDelegate() { + return titleTextContainer; } - // override to ensure internal wiring - public EmptyState add(EmptyStateHeader header) { - contentContainer.appendChild(header.element()); - return this; - } + // ------------------------------------------------------ add public EmptyState addBody(EmptyStateBody body) { return add(body); @@ -101,6 +118,41 @@ public EmptyState add(EmptyStateFooter footer) { // ------------------------------------------------------ builder + public EmptyState headingLevel(int level) { + if (this.level != level && verifyRange(element(), "headingLevel", level, 1, 6)) { + HTMLElement element = h(level).css(component(emptyState, title, text)) + .text(titleTextContainer.textContent) + .element(); + titleTextContainer.replaceWith(element); + this.titleTextContainer = element; + this.level = level; + } + return this; + } + + @Override + public EmptyState icon(Element icon) { + removeIcon(); + iconContainer.appendChild(icon); + return this; + } + + @Override + public EmptyState removeIcon() { + removeChildrenFrom(iconContainer); + return this; + } + + public EmptyState spinner() { + return spinner("Loading"); + } + + public EmptyState spinner(String label) { + removeIcon(); + iconContainer.appendChild(Spinner.spinner(label).element()); + return this; + } + /** * Modifies empty state max-width and sizes of icon, title and body. */ @@ -111,20 +163,17 @@ public EmptyState size(Size size) { return this; } - public EmptyState status(Status status) { - return swap(this, element(), status, Status.values()); + public EmptyState status(Severity severity) { + icon(severity.icon.get()); + return swap(this, element(), severity.status, Status.values()); + } + + public EmptyState clearStatus() { + return swap(this, element(), null, Status.values()); } @Override public EmptyState that() { return this; } - - // ------------------------------------------------------ api - - public void clearStatus() { - for (Status status : Status.values()) { - element().classList.remove(status.modifier()); - } - } } diff --git a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateActions.java b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateActions.java index 0c05508b9..f0f21cfcc 100644 --- a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateActions.java +++ b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateActions.java @@ -32,7 +32,7 @@ public static EmptyStateActions emptyStateActions() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "esa"; + public static final String SUB_COMPONENT_NAME = "esa"; EmptyStateActions() { super(SUB_COMPONENT_NAME, div().css(component(emptyState, actions)).element()); diff --git a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateBody.java b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateBody.java index 54f66c9c5..3d06106e2 100644 --- a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateBody.java +++ b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateBody.java @@ -35,7 +35,7 @@ public static EmptyStateBody emptyStateBody() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "esb"; + public static final String SUB_COMPONENT_NAME = "esb"; EmptyStateBody() { super(SUB_COMPONENT_NAME, div().css(component(emptyState, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateFooter.java b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateFooter.java index 026a95db2..9b177923e 100644 --- a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateFooter.java +++ b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateFooter.java @@ -35,7 +35,7 @@ public static EmptyStateFooter emptyStateFooter() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "esb"; + public static final String SUB_COMPONENT_NAME = "esb"; EmptyStateFooter() { super(SUB_COMPONENT_NAME, div().css(component(emptyState, footer)).element()); diff --git a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateHeader.java b/components/src/main/java/org/patternfly/component/emptystate/EmptyStateHeader.java deleted file mode 100644 index 38b1fe99f..000000000 --- a/components/src/main/java/org/patternfly/component/emptystate/EmptyStateHeader.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.patternfly.component.emptystate; - -import org.jboss.elemento.ElementTextMethods; -import org.patternfly.component.ComponentIcon; -import org.patternfly.component.spinner.Spinner; -import org.patternfly.icon.PredefinedIcon; -import org.patternfly.style.Size; -import org.patternfly.style.Status; - -import elemental2.dom.Element; -import elemental2.dom.HTMLDivElement; -import elemental2.dom.HTMLElement; - -import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.failSafeRemoveFromParent; -import static org.jboss.elemento.Elements.h; -import static org.jboss.elemento.Elements.insertFirst; -import static org.patternfly.core.Validation.verifyRange; -import static org.patternfly.style.Classes.component; -import static org.patternfly.style.Classes.emptyState; -import static org.patternfly.style.Classes.header; -import static org.patternfly.style.Classes.icon; -import static org.patternfly.style.Classes.text; -import static org.patternfly.style.Classes.title; -import static org.patternfly.style.TypedModifier.swap; -import static org.patternfly.style.Variable.componentVar; -import static org.patternfly.style.Variables.Color; - -public class EmptyStateHeader extends EmptyStateSubComponent implements - ComponentIcon, - ElementTextMethods { - - // ------------------------------------------------------ factory - - public static EmptyStateHeader emptyStateHeader() { - return new EmptyStateHeader(1); - } - - public static EmptyStateHeader emptyStateHeader(int headingLevel) { - return new EmptyStateHeader(headingLevel); - } - - // ------------------------------------------------------ instance - - static final String SUB_COMPONENT_NAME = "esh"; - private final int headingLevel; - private HTMLElement iconContainer; - private HTMLElement titleElement; - - EmptyStateHeader(int headingLevel) { - super(SUB_COMPONENT_NAME, div().css(component(emptyState, header)).element()); - if (verifyRange(element(), "headingLevel", headingLevel, 1, 6)) { - this.headingLevel = headingLevel; - } else { - this.headingLevel = 1; - } - } - - // ------------------------------------------------------ builder - - public EmptyStateHeader spinner() { - return spinner("Loading"); - } - - public EmptyStateHeader spinner(String label) { - removeIcon(); - failSafeIconContainer().appendChild(Spinner.spinner(Size.xl, label).element()); - return this; - } - - @Override - public EmptyStateHeader icon(Element icon) { - removeIcon(); - failSafeIconContainer().appendChild(icon); - return this; - } - - public EmptyStateHeader icon(PredefinedIcon icon, Status status) { - icon(icon.element()); - EmptyState emptyState = lookupComponent(); - swap(emptyState, emptyState.element(), status, Status.values()); - return this; - } - - public EmptyStateHeader icon(Element icon, Status status) { - icon(icon); - EmptyState emptyState = lookupComponent(); - swap(emptyState, emptyState.element(), status, Status.values()); - return this; - } - - @Override - public EmptyStateHeader removeIcon() { - failSafeRemoveFromParent(failSafeIconContainer()); - iconContainer = null; - return this; - } - - @Override - public EmptyStateHeader text(String text) { - failSafeTitleElement().textContent = text; - return this; - } - - @Override - public EmptyStateHeader that() { - return this; - } - - // ------------------------------------------------------ api - - @Override - public String text() { - if (titleElement != null) { - return titleElement.textContent; - } - return ""; - } - - // ------------------------------------------------------ internal - - private HTMLElement failSafeIconContainer() { - if (iconContainer == null) { - insertFirst(element(), iconContainer = div().css(component(emptyState, icon)).element()); - } - return iconContainer; - } - - private HTMLElement failSafeTitleElement() { - if (titleElement == null) { - add(div().css(component(emptyState, title)) - .add(titleElement = h(headingLevel).css(component(emptyState, title, text)).element()) - .element()); - } - return titleElement; - } - - private void iconColor(String color) { - componentVar(component(emptyState, icon), Color).applyTo(iconContainer).set(color); - } -} diff --git a/components/src/main/java/org/patternfly/component/expandable/ExpandableSection.java b/components/src/main/java/org/patternfly/component/expandable/ExpandableSection.java index e227953c0..2e37a97ea 100644 --- a/components/src/main/java/org/patternfly/component/expandable/ExpandableSection.java +++ b/components/src/main/java/org/patternfly/component/expandable/ExpandableSection.java @@ -21,28 +21,30 @@ import org.jboss.elemento.Attachable; import org.jboss.elemento.By; import org.jboss.elemento.Elements; -import org.jboss.elemento.HTMLElementBuilder; import org.jboss.elemento.Id; +import org.jboss.elemento.logger.Level; +import org.jboss.elemento.logger.Logger; import org.patternfly.component.BaseComponent; import org.patternfly.component.ComponentType; import org.patternfly.component.Expandable; import org.patternfly.handler.ToggleHandler; import org.patternfly.style.Classes; +import elemental2.dom.DomGlobal.SetIntervalCallbackFn; import elemental2.dom.Event; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLElement; import elemental2.dom.MutationRecord; +import elemental2.dom.Node; +import static elemental2.dom.DomGlobal.clearInterval; import static elemental2.dom.DomGlobal.document; +import static elemental2.dom.DomGlobal.setInterval; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.wrapHtmlElement; import static org.patternfly.core.Aria.controls; import static org.patternfly.core.Aria.labelledBy; -import static org.patternfly.core.Dataset.expandableSectionId; -import static org.patternfly.core.Dataset.expandableSectionTarget; import static org.patternfly.style.Classes.component; -import static org.patternfly.style.Classes.detached; +import static org.patternfly.style.Classes.expandTop; import static org.patternfly.style.Classes.expandableSection; import static org.patternfly.style.Classes.expanded; import static org.patternfly.style.Classes.limitWidth; @@ -59,9 +61,8 @@ * @see https://www.patternfly.org/components/expandable-section */ -public class ExpandableSection extends BaseComponent implements - Attachable, - Expandable { +public class ExpandableSection extends BaseComponent + implements Attachable, Expandable { // ------------------------------------------------------ factory @@ -69,25 +70,49 @@ public static ExpandableSection expandableSection() { return new ExpandableSection(Id.unique(ComponentType.ExpandableSection.id)); } + /** + * Creates and returns a new instance of {@link ExpandableSection} with the specified ID. + *

+ * If you want to create a detached expandable section, you must use the same ID for the two expandable sections, one + * containing the {@link ExpandableSectionToggle} and one containing the {@link ExpandableSectionContent}. + *

+ * {@snippet class=ExpandableSectionDemo region=detached} + * + * @param id the unique identifier for the expandable section + * @return a new instance of {@link ExpandableSection} initialized with the provided ID + */ public static ExpandableSection expandableSection(String id) { return new ExpandableSection(id); } // ------------------------------------------------------ instance + private static final int WIRE_ATTEMPTS = 10; + private static final int WIRE_INTERVAL = 100; public static final int DEFAULT_TRUNCATE = 3; + private static final Logger logger = Logger.getLogger(ExpandableSection.class.getName()); - private final String id; - private int truncate = 0; - private String detachedFromId; + private final String contentId; + private final String toggleId; + private final List> toggleHandler; + + private int truncate; + private boolean wired; + private boolean detached; + private boolean directionUp; private ExpandableSectionToggle toggle; private ExpandableSectionContent content; - private HTMLElement detachedContentElement; - private final List> toggleHandler; + private HTMLElement contentEsElement; // parent of contentElement + private HTMLElement contentElement; + private HTMLElement toggleButton; ExpandableSection(String id) { super(ComponentType.ExpandableSection, div().css(component(expandableSection)).element()); - this.id = id; + this.truncate = 0; + this.wired = false; + this.directionUp = false; + this.toggleId = Id.build(id, "toggle"); + this.contentId = Id.build(id, "content"); this.toggleHandler = new ArrayList<>(); storeComponent(); Attachable.register(this, this); @@ -95,36 +120,7 @@ public static ExpandableSection expandableSection(String id) { @Override public void attach(MutationRecord mutationRecord) { - if (toggle != null && content != null) { - toggle.aria(controls, content.id); - content.aria(labelledBy, toggle.id); - } - if (truncate > 0) { - if (toggle != null) { - toggle.truncate(); - } - if (truncate != DEFAULT_TRUNCATE && content != null) { - componentVar(component(expandableSection), "m-truncate__content", LineClamp).applyTo(content).set(truncate); - } - } - if (detachedFromId != null) { - HTMLElement detachedElement = Elements.querySelector(document.body, By.data(expandableSectionId, detachedFromId)); - - if (detachedElement != null) { - HTMLElementBuilder detached = wrapHtmlElement(detachedElement); - HTMLElement detachedToggleElement = detached.querySelector( - By.classname(component(expandableSection, Classes.toggle))); - detachedContentElement = detached.querySelector(By.classname(component(expandableSection, Classes.content))); - - if (toggle != null && detachedContentElement != null && detachedContentElement.id != null) { - toggle.aria(controls, detachedContentElement.id); - wrapHtmlElement(detachedContentElement).aria(labelledBy, toggle.id); - } else if (content != null && detachedToggleElement != null && detachedToggleElement.id != null) { - wrapHtmlElement(detachedToggleElement).aria(controls, content.id); - content.aria(labelledBy, detachedToggleElement.id); - } - } - } + startWire(); } // ------------------------------------------------------ add @@ -153,6 +149,17 @@ public ExpandableSection add(ExpandableSectionContent content) { // ------------------------------------------------------ builder + /** + * Make this expandable section detached from another one. Must be called on both the expandable section containing the + * {@link ExpandableSectionToggle} and the expandable section containing the {@link ExpandableSectionContent}. + *

+ * {@snippet class=ExpandableSectionDemo region=detached} + */ + public ExpandableSection detached() { + this.detached = true; + return this; + } + /** Same as {@linkplain #indented(boolean) indented(true)} */ public ExpandableSection indented() { return indented(true); @@ -197,14 +204,6 @@ public ExpandableSection truncate(int truncate) { return this; } - public ExpandableSection detachedFrom(String detachedFromId) { - this.detachedFromId = detachedFromId; - css(modifier(detached)); - data(expandableSectionId, id); - data(expandableSectionTarget, detachedFromId); - return this; - } - @Override public ExpandableSection that() { return this; @@ -223,12 +222,13 @@ public ExpandableSection onToggle(ToggleHandler toggleHandler public void collapse(boolean fireEvent) { element().classList.remove(modifier(expanded)); if (toggle != null) { - toggle.collapse(); + toggle.collapse(directionUp); } if (content != null) { content.element().hidden = true; - } else if (detachedContentElement != null) { - detachedContentElement.hidden = true; + } else if (detached) { + // Two different expandable sections! The call above is for the one containing the trigger. + contentEsElement.classList.remove(modifier(expanded)); } if (fireEvent) { toggleHandler.forEach(th -> th.onToggle(new Event(""), this, false)); @@ -239,12 +239,13 @@ public void collapse(boolean fireEvent) { public void expand(boolean fireEvent) { element().classList.add(modifier(expanded)); if (toggle != null) { - toggle.expand(); + toggle.expand(directionUp); } if (content != null) { content.element().hidden = false; - } else if (detachedContentElement != null) { - detachedContentElement.hidden = false; + } else if (detached) { + // Two different expandable sections! The call above is for the one containing the trigger. + contentEsElement.classList.add(modifier(expanded)); } if (fireEvent) { toggleHandler.forEach(th -> th.onToggle(new Event(""), this, true)); @@ -254,4 +255,103 @@ public void expand(boolean fireEvent) { public ExpandableSectionContent content() { return content; } + + // ------------------------------------------------------ internal + + private void startWire() { + // Detached expandable sections might live in completely different areas of the DOM tree. + // Wiring in the attach() method is not enough to make sure the toggle and content elements are available. + // Instead, we use an approach that checks for the availability of the toggle and content elements periodically + // and gives up after a certain number of attempts. + final int[] count = {0}; + final double[] handle = {0}; + SetIntervalCallbackFn wireFn = __ -> { + if (!wired && count[0] < WIRE_ATTEMPTS) { + wire(); + count[0]++; + } else { + clearInterval(handle[0]); + if (wired) { + afterWire(); + if (detached && logger.isEnabled(Level.DEBUG)) { + logger.debug("Detached expandable section finished wiring: %o", element()); + logger.debug("Toggle: %o", toggleButton); + logger.debug("Content: %o", contentElement); + logger.debug("Content: %o", contentElement); + } + } else { + logger.error("Expandable section %o failed to wire toggle and content!", element()); + } + } + }; + beforeWire(); + handle[0] = setInterval(wireFn, WIRE_INTERVAL); + } + + private void beforeWire() { + if (detached) { + if (toggle != null) { + // I'm a detached expandable section containing the toggle + toggle.button.id(toggleId); + toggle.button.aria(controls, contentId); + toggleButton = toggle.button.element(); + } else if (content != null) { + // I'm a detached expandable section containing the content + css(modifier(Classes.detached)); + content.id(contentId); + content.aria(labelledBy, toggleId); + contentEsElement = element(); + contentElement = content.element(); + } + } else { + // I'm a normal expandable section containing both the toggle and content + if (toggle != null && content != null) { + toggle.button.id(toggleId); + toggle.button.aria(controls, contentId); + toggleButton = toggle.button.element(); + content.id(contentId); + content.aria(labelledBy, toggleId); + contentEsElement = element(); + contentElement = content.element(); + } else { + logger.error("The expandable section %o must have a toggle and a content element", element()); + } + } + } + + private void wire() { + if (detached) { + if (toggle != null) { + // I'm a detached expandable section containing the toggle + contentElement = Elements.querySelector(document, By.id(contentId)); + contentEsElement = (HTMLElement) contentElement.closest("." + component(expandableSection)); + } else if (content != null) { + // I'm a detached expandable section containing the content + toggleButton = Elements.querySelector(document, By.id(toggleId)); + } + } + wired = toggleButton != null && contentEsElement != null && contentElement != null; + } + + private void afterWire() { + int order = toggleButton.compareDocumentPosition(contentElement); + if (order == Node.DOCUMENT_POSITION_PRECEDING) { + // content before toggle => direction = up + directionUp = true; + } else if (order == Node.DOCUMENT_POSITION_FOLLOWING) { + // content after toggle => direction = down + directionUp = false; + } + if (directionUp) { + contentEsElement.classList.add(modifier(expandTop)); + } + if (truncate > 0) { + if (toggle != null) { + toggle.truncate(); + } + if (truncate != DEFAULT_TRUNCATE && content != null) { + componentVar(component(expandableSection), "m-truncate__content", LineClamp).applyTo(content).set(truncate); + } + } + } } diff --git a/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionContent.java b/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionContent.java index 312c75357..d37ff5953 100644 --- a/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionContent.java +++ b/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionContent.java @@ -16,13 +16,10 @@ package org.patternfly.component.expandable; import org.jboss.elemento.ElementTextMethods; -import org.jboss.elemento.Id; -import org.patternfly.component.ComponentType; import elemental2.dom.HTMLDivElement; import static org.jboss.elemento.Elements.div; -import static org.patternfly.core.Attributes.role; import static org.patternfly.core.Roles.region; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.content; @@ -39,17 +36,13 @@ public static ExpandableSectionContent expandableSectionContent() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "esc"; - - final String id; + public static final String SUB_COMPONENT_NAME = "esc"; ExpandableSectionContent() { super(SUB_COMPONENT_NAME, div().css(component(expandableSection, content)) .apply(e -> e.hidden = true) - .attr(role, region) + .role(region) .element()); - - id(this.id = Id.unique(ComponentType.ExpandableSection.id, "cnt")); } // ------------------------------------------------------ builder diff --git a/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionToggle.java b/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionToggle.java index 2e04800a0..c5f7c8374 100644 --- a/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionToggle.java +++ b/components/src/main/java/org/patternfly/component/expandable/ExpandableSectionToggle.java @@ -15,9 +15,7 @@ */ package org.patternfly.component.expandable; -import org.jboss.elemento.Id; -import org.patternfly.component.ComponentType; -import org.patternfly.component.ElementContainerDelegate; +import org.jboss.elemento.ElementContainerDelegate; import org.patternfly.component.button.Button; import elemental2.dom.Element; @@ -31,6 +29,7 @@ import static org.patternfly.core.Aria.expanded; import static org.patternfly.icon.IconSets.fas.angleRight; import static org.patternfly.style.Classes.component; +import static org.patternfly.style.Classes.expandTop; import static org.patternfly.style.Classes.expandableSection; import static org.patternfly.style.Classes.icon; import static org.patternfly.style.Classes.inline; @@ -56,24 +55,21 @@ public static ExpandableSectionToggle expandableSectionToggle(String moreText, S // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "est"; + public static final String SUB_COMPONENT_NAME = "est"; - final String id; - private final Button button; + final Button button; + final HTMLElement iconContainer; private final String moreText; private final String lessText; - private final HTMLElement iconContainer; ExpandableSectionToggle(String moreText, String lessText) { super(SUB_COMPONENT_NAME, div().css(component(expandableSection, toggle)).element()); - this.id = Id.unique(ComponentType.ExpandableSection.id, "tgl"); this.moreText = moreText; this.lessText = lessText; this.iconContainer = span().css(component(expandableSection, toggle, icon)) .add(angleRight()) .element(); this.button = button().css(component(expandableSection, toggle)) - .id(id) .link() .aria(expanded, false) .iconAndText(iconContainer, moreText, start) @@ -92,12 +88,6 @@ public Element containerDelegate() { // ------------------------------------------------------ builder - /** Changes the toggle icon to point upwards. */ - public ExpandableSectionToggle up() { - iconContainer.classList.add(modifier(expanded)); - return this; - } - @Override public ExpandableSectionToggle that() { return this; @@ -105,15 +95,21 @@ public ExpandableSectionToggle that() { // ------------------------------------------------------ internal - void collapse() { + void collapse(boolean directionUp) { button.aria(expanded, false); + if (directionUp) { + iconContainer.classList.remove(modifier(expandTop)); + } if (moreText != null) { button.text(moreText); } } - void expand() { + void expand(boolean directionUp) { button.aria(expanded, true); + if (directionUp) { + iconContainer.classList.add(modifier(expandTop)); + } if (lessText != null) { button.text(lessText); } diff --git a/components/src/main/java/org/patternfly/component/form/Checkbox.java b/components/src/main/java/org/patternfly/component/form/Checkbox.java index b180398ef..40f112fa9 100644 --- a/components/src/main/java/org/patternfly/component/form/Checkbox.java +++ b/components/src/main/java/org/patternfly/component/form/Checkbox.java @@ -19,6 +19,9 @@ import java.util.List; import java.util.function.Consumer; +import org.jboss.elemento.ElementTextDelegate; +import org.jboss.elemento.Elements; +import org.jboss.elemento.HTMLContainerBuilder; import org.jboss.elemento.HTMLInputElementBuilder; import org.patternfly.component.BaseComponent; import org.patternfly.component.ComponentType; @@ -28,10 +31,9 @@ import org.patternfly.style.Modifiers.Disabled; import org.patternfly.style.Modifiers.Required; -import elemental2.dom.Event; +import elemental2.dom.Element; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; -import elemental2.dom.HTMLLabelElement; import static org.gwtproject.safehtml.shared.SafeHtmlUtils.fromSafeConstant; import static org.jboss.elemento.Elements.div; @@ -44,6 +46,7 @@ import static org.jboss.elemento.EventType.change; import static org.jboss.elemento.InputType.checkbox; import static org.patternfly.core.Aria.hidden; +import static org.patternfly.handler.ChangeHandler.fireIfChanged; import static org.patternfly.style.Classes.check; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.input; @@ -58,52 +61,61 @@ * @see https://www.patternfly.org/components/forms/checkbox */ public class Checkbox extends BaseComponent implements - HasValue, Disabled, + ElementTextDelegate, + HasValue, Required { // ------------------------------------------------------ factory + // TODO Remove the checked parameter; add the wrapped flag public static Checkbox checkbox(String id, String name) { - return new Checkbox(id, name, null, false); + return new Checkbox(div(), id, name); } - public static Checkbox checkbox(String id, String name, boolean checked) { - return new Checkbox(id, name, null, checked); + public static Checkbox checkboxWrapped(String id, String name) { + return new Checkbox(label(), id, name); } public static Checkbox checkbox(String id, String name, String label) { - return new Checkbox(id, name, label, false); + return new Checkbox(div(), id, name).text(label); } - public static Checkbox checkbox(String id, String name, String label, boolean checked) { - return new Checkbox(id, name, label, checked); + public static Checkbox checkboxWrapped(String id, String name, String label) { + return new Checkbox(label(), id, name).text(label); } // ------------------------------------------------------ instance private final HTMLInputElement inputElement; private final List> changeHandlers; - private HTMLLabelElement labelElement; + private final HTMLElement labelElement; private HTMLElement requiredMarker; - Checkbox(String id, String name, String label, boolean checked) { - super(ComponentType.Checkbox, div().css(component(check)) + Checkbox(HTMLContainerBuilder builder, String id, String name) { + super(ComponentType.Checkbox, builder.css(component(check)) .add(input(checkbox).css(component(check, input)) .id(id) - .name(name) - .checked(checked)) + .name(name)) .element()); this.changeHandlers = new ArrayList<>(); + boolean wrapped = "label".equalsIgnoreCase(element().tagName); + if (wrapped) { + element().setAttribute("for", id); + labelElement = span().css(component(check, Classes.label)).element(); + } else { + labelElement = label().css(component(check, Classes.label)) + .apply(l -> l.htmlFor = id) + .element(); + } inputElement = (HTMLInputElement) element().firstElementChild; inputElement.addEventListener(change.name, e -> changeHandlers.forEach(h -> h.onChange(e, this, inputElement.checked))); - add(labelElement = label().css(component(check, Classes.label)) - .apply(l -> l.htmlFor = id) - .element()); - if (label != null) { - labelElement.textContent = label; - } + } + + @Override + public Element textDelegate() { + return labelElement; } // ------------------------------------------------------ add @@ -169,11 +181,18 @@ public Checkbox standalone(boolean removeLabel) { css(modifier(standalone)); if (removeLabel) { failSafeRemoveFromParent(labelElement); - labelElement = null; } return this; } + @Override + public Checkbox text(String text) { + if (!Elements.isAttached(labelElement)) { + add(labelElement); + } + return ElementTextDelegate.super.text(text); + } + /** Same as {@linkplain #value(boolean, boolean) value(checked, false)} */ public Checkbox value(boolean checked) { return value(checked, false); @@ -181,10 +200,9 @@ public Checkbox value(boolean checked) { /** Sets the {@code checked} attribute of the input element. */ public Checkbox value(boolean checked, boolean fireEvent) { - boolean changed = inputElement.checked != checked; inputElement.checked = checked; - if (fireEvent && changed && !changeHandlers.isEmpty()) { - changeHandlers.forEach(h -> h.onChange(new Event(""), this, inputElement.checked)); + if (fireEvent) { + fireIfChanged(this, inputElement.checked, checked, changeHandlers); } return this; } diff --git a/components/src/main/java/org/patternfly/component/form/CheckboxBody.java b/components/src/main/java/org/patternfly/component/form/CheckboxBody.java index 531eb3005..38a5bddd9 100644 --- a/components/src/main/java/org/patternfly/component/form/CheckboxBody.java +++ b/components/src/main/java/org/patternfly/component/form/CheckboxBody.java @@ -15,6 +15,8 @@ */ package org.patternfly.component.form; +import org.jboss.elemento.ElementTextMethods; + import elemental2.dom.HTMLElement; import static org.jboss.elemento.Elements.span; @@ -22,7 +24,8 @@ import static org.patternfly.style.Classes.check; import static org.patternfly.style.Classes.component; -public class CheckboxBody extends CheckboxSubComponent { +public class CheckboxBody extends CheckboxSubComponent + implements ElementTextMethods { // ------------------------------------------------------ factory @@ -36,7 +39,7 @@ public static CheckboxBody checkboxBody(String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cbb"; + public static final String SUB_COMPONENT_NAME = "cbb"; CheckboxBody(String text) { super(SUB_COMPONENT_NAME, span().css(component(check, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/form/CheckboxDescription.java b/components/src/main/java/org/patternfly/component/form/CheckboxDescription.java index f65908a10..3b9f8d2d2 100644 --- a/components/src/main/java/org/patternfly/component/form/CheckboxDescription.java +++ b/components/src/main/java/org/patternfly/component/form/CheckboxDescription.java @@ -15,6 +15,7 @@ */ package org.patternfly.component.form; +import org.jboss.elemento.ElementTextMethods; import org.patternfly.style.Classes; import elemental2.dom.HTMLElement; @@ -23,7 +24,8 @@ import static org.patternfly.style.Classes.check; import static org.patternfly.style.Classes.component; -public class CheckboxDescription extends CheckboxSubComponent { +public class CheckboxDescription extends CheckboxSubComponent + implements ElementTextMethods { // ------------------------------------------------------ factory @@ -37,7 +39,7 @@ public static CheckboxDescription checkboxDescription(String description) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cbd"; + public static final String SUB_COMPONENT_NAME = "cbd"; CheckboxDescription(String description) { super(SUB_COMPONENT_NAME, span().css(component(check, Classes.description)).element()); diff --git a/components/src/main/java/org/patternfly/component/form/Form.java b/components/src/main/java/org/patternfly/component/form/Form.java index 28199c9fb..2eea02da4 100644 --- a/components/src/main/java/org/patternfly/component/form/Form.java +++ b/components/src/main/java/org/patternfly/component/form/Form.java @@ -20,6 +20,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import java.util.function.Function; import org.jboss.elemento.Elements; @@ -38,7 +39,7 @@ import static org.patternfly.style.Classes.modifier; /** - * A form is a group of elements used to collect information from a user in a variety of contexts including in a modal, in a + * A form is a group of elements used to collect information from a user in a variety of contexts, including in a modal, in a * wizard, or on a page. Use cases for forms include tasks reliant on user-inputted information for completion like logging in, * registering, configuring settings, or completing surveys. * @@ -58,11 +59,15 @@ public static Form form() { private final Map items; private final List alerts; + private final List> onAdd; + private final List> onRemove; Form() { super(ComponentType.Form, Elements.form().css(component(form)).apply(f -> f.noValidate = true).element()); this.items = new LinkedHashMap<>(); this.alerts = new ArrayList<>(); + this.onAdd = new ArrayList<>(); + this.onRemove = new ArrayList<>(); storeComponent(); } @@ -87,7 +92,9 @@ public Form addGroup(FormGroup group) { @Override public Form add(FormGroup item) { items.put(item.identifier(), item); - return add(item.element()); + Form result = add(item.element()); + onAdd.forEach(bc -> bc.accept(this, item)); + return result; } public Form addAlert(FormAlert alert) { @@ -123,6 +130,20 @@ public Form that() { return this; } + // ------------------------------------------------------ events + + @Override + public Form onAdd(BiConsumer onAdd) { + this.onAdd.add(onAdd); + return this; + } + + @Override + public Form onRemove(BiConsumer onRemove) { + this.onRemove.add(onRemove); + return this; + } + // ------------------------------------------------------ api @Override @@ -150,12 +171,24 @@ public FormGroup item(String identifier) { return items.get(identifier); } + @Override + public void removeItem(String identifier) { + FormGroup item = items.remove(identifier); + failSafeRemoveFromParent(item); + if (item != null) { + onRemove.forEach(bc -> bc.accept(this, item)); + } + } + @Override public void clear() { - for (FormGroup group : items.values()) { - failSafeRemoveFromParent(group); + Iterator iterator = items.values().iterator(); + while (iterator.hasNext()) { + FormGroup item = iterator.next(); + failSafeRemoveFromParent(item); + iterator.remove(); + onRemove.forEach(bc -> bc.accept(this, item)); } - items.clear(); } public void clearAlerts() { diff --git a/components/src/main/java/org/patternfly/component/form/FormActionGroup.java b/components/src/main/java/org/patternfly/component/form/FormActionGroup.java index 3e60e5650..0fbea75de 100644 --- a/components/src/main/java/org/patternfly/component/form/FormActionGroup.java +++ b/components/src/main/java/org/patternfly/component/form/FormActionGroup.java @@ -36,7 +36,7 @@ public static FormActionGroup formActionGroup() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "fag"; + public static final String SUB_COMPONENT_NAME = "fag"; private final HTMLElement actionsContainer; diff --git a/components/src/main/java/org/patternfly/component/form/FormAlert.java b/components/src/main/java/org/patternfly/component/form/FormAlert.java index 3e9a673a9..35c776fc8 100644 --- a/components/src/main/java/org/patternfly/component/form/FormAlert.java +++ b/components/src/main/java/org/patternfly/component/form/FormAlert.java @@ -34,7 +34,7 @@ public static FormAlert formAlert() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "fa"; + public static final String SUB_COMPONENT_NAME = "fa"; FormAlert() { super(SUB_COMPONENT_NAME, div().css(component(Classes.form, alert)).element()); diff --git a/components/src/main/java/org/patternfly/component/form/FormControl.java b/components/src/main/java/org/patternfly/component/form/FormControl.java index 355be538d..21a9d04ca 100644 --- a/components/src/main/java/org/patternfly/component/form/FormControl.java +++ b/components/src/main/java/org/patternfly/component/form/FormControl.java @@ -18,6 +18,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.component.BaseComponent; import org.patternfly.component.ComponentType; +import org.patternfly.component.Validatable; import org.patternfly.component.ValidationStatus; import org.patternfly.style.Classes; import org.patternfly.style.Modifiers.Disabled; @@ -35,8 +36,8 @@ import static org.patternfly.style.Classes.modifier; import static org.patternfly.style.Classes.utilities; -public abstract class FormControl> - extends BaseComponent implements Disabled, Required { +public abstract class FormControl> extends BaseComponent + implements Disabled, Required, Validatable { // ------------------------------------------------------ factory diff --git a/components/src/main/java/org/patternfly/component/form/FormFieldGroup.java b/components/src/main/java/org/patternfly/component/form/FormFieldGroup.java index 7663506e0..b877f816e 100644 --- a/components/src/main/java/org/patternfly/component/form/FormFieldGroup.java +++ b/components/src/main/java/org/patternfly/component/form/FormFieldGroup.java @@ -66,7 +66,7 @@ public static FormFieldGroup formFieldGroup(boolean expandable) { // ------------------------------------------------------ instance private static final Logger logger = Logger.getLogger(FormFieldGroup.class.getName()); - static final String SUB_COMPONENT_NAME = "ffg"; + public static final String SUB_COMPONENT_NAME = "ffg"; private final String titleId; private boolean expandable; diff --git a/components/src/main/java/org/patternfly/component/form/FormFieldGroupBody.java b/components/src/main/java/org/patternfly/component/form/FormFieldGroupBody.java index 7e8ff4c5f..d36056939 100644 --- a/components/src/main/java/org/patternfly/component/form/FormFieldGroupBody.java +++ b/components/src/main/java/org/patternfly/component/form/FormFieldGroupBody.java @@ -33,7 +33,7 @@ public static FormFieldGroupBody formFieldGroupBody() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ffgb"; + public static final String SUB_COMPONENT_NAME = "ffgb"; FormFieldGroupBody() { super(SUB_COMPONENT_NAME, div().css(component(form, fieldGroup, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/form/FormFieldGroupHeader.java b/components/src/main/java/org/patternfly/component/form/FormFieldGroupHeader.java index 88a2a4b00..10b35dfed 100644 --- a/components/src/main/java/org/patternfly/component/form/FormFieldGroupHeader.java +++ b/components/src/main/java/org/patternfly/component/form/FormFieldGroupHeader.java @@ -42,7 +42,7 @@ public static FormFieldGroupHeader formFieldGroupHeader() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ffgh"; + public static final String SUB_COMPONENT_NAME = "ffgh"; private final HTMLElement mainContainer; private HTMLElement actionContainer; HTMLElement titleElement; diff --git a/components/src/main/java/org/patternfly/component/form/FormGroup.java b/components/src/main/java/org/patternfly/component/form/FormGroup.java index 8b521aac6..aaec91447 100644 --- a/components/src/main/java/org/patternfly/component/form/FormGroup.java +++ b/components/src/main/java/org/patternfly/component/form/FormGroup.java @@ -19,7 +19,6 @@ import java.util.Map; import org.jboss.elemento.Id; -import org.jboss.elemento.logger.Logger; import org.patternfly.component.ComponentType; import org.patternfly.component.HasIdentifier; import org.patternfly.core.Attributes; @@ -49,8 +48,7 @@ public static FormGroup formGroup(String identifier) { // ------------------------------------------------------ instance - private static final Logger logger = Logger.getLogger(FormGroup.class.getName()); - static final String SUB_COMPONENT_NAME = "fg"; + public static final String SUB_COMPONENT_NAME = "fg"; boolean required; FormGroupRole role; diff --git a/components/src/main/java/org/patternfly/component/form/FormGroupControl.java b/components/src/main/java/org/patternfly/component/form/FormGroupControl.java index 2f7c5b404..0b5f551b3 100644 --- a/components/src/main/java/org/patternfly/component/form/FormGroupControl.java +++ b/components/src/main/java/org/patternfly/component/form/FormGroupControl.java @@ -51,7 +51,7 @@ public static FormGroupControl formGroupControl() { // ------------------------------------------------------ instance private static final Logger logger = Logger.getLogger(FormGroupControl.class.getName()); - static final String SUB_COMPONENT_NAME = "fgc"; + public static final String SUB_COMPONENT_NAME = "fgc"; private FormControl control; private final List checkboxes; @@ -69,7 +69,7 @@ public void attach(MutationRecord mutationRecord) { FormGroup formGroup = lookupSubComponent(FormGroup.SUB_COMPONENT_NAME); if (control != null && !formGroup.identifier().equals(control.id)) { - logger.error("The identifier of the form group %o is different from the id of its control %o: '%s' != '%s'", + logger.error("The identifier of the form group %o is different to the id of its control %o: '%s' != '%s'", formGroup.element(), element(), formGroup.identifier(), control.id); } diff --git a/components/src/main/java/org/patternfly/component/form/FormGroupLabel.java b/components/src/main/java/org/patternfly/component/form/FormGroupLabel.java index 7595f5457..727b9a033 100644 --- a/components/src/main/java/org/patternfly/component/form/FormGroupLabel.java +++ b/components/src/main/java/org/patternfly/component/form/FormGroupLabel.java @@ -18,32 +18,43 @@ import java.util.Iterator; import org.jboss.elemento.Attachable; -import org.jboss.elemento.ButtonType; +import org.jboss.elemento.ElementTextDelegate; import org.jboss.elemento.Elements; import org.jboss.elemento.Id; import org.patternfly.component.popover.Popover; import org.patternfly.core.Aria; -import org.patternfly.icon.IconSets; +import org.patternfly.core.Roles; import org.patternfly.style.Classes; -import elemental2.dom.HTMLButtonElement; +import elemental2.dom.Element; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLLabelElement; import elemental2.dom.MutationRecord; import static org.gwtproject.safehtml.shared.SafeHtmlUtils.fromSafeConstant; -import static org.jboss.elemento.Elements.button; import static org.jboss.elemento.Elements.div; import static org.jboss.elemento.Elements.iterator; import static org.jboss.elemento.Elements.span; import static org.patternfly.core.Aria.hidden; +import static org.patternfly.core.Attributes.role; +import static org.patternfly.core.Attributes.tabindex; +import static org.patternfly.core.Attributes.type; +import static org.patternfly.icon.IconSets.fas.questionCircle; +import static org.patternfly.style.Classes.button; import static org.patternfly.style.Classes.component; +import static org.patternfly.style.Classes.form; import static org.patternfly.style.Classes.group; +import static org.patternfly.style.Classes.help; +import static org.patternfly.style.Classes.icon; import static org.patternfly.style.Classes.modifier; +import static org.patternfly.style.Classes.noPadding; import static org.patternfly.style.Classes.noPaddingTop; +import static org.patternfly.style.Classes.plain; import static org.patternfly.style.Classes.text; +import static org.patternfly.style.Classes.util; -public class FormGroupLabel extends FormSubComponent implements Attachable { +public class FormGroupLabel extends FormSubComponent implements Attachable, + ElementTextDelegate { // ------------------------------------------------------ factory @@ -53,15 +64,15 @@ public static FormGroupLabel formGroupLabel(String label) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "fgl"; + public static final String SUB_COMPONENT_NAME = "fgl"; private final HTMLElement textElement; private HTMLElement labelElement; FormGroupLabel(String label) { - super(SUB_COMPONENT_NAME, div().css(component(Classes.form, group, Classes.label)).element()); - add(labelElement = Elements.label().css(component(Classes.form, Classes.label)) - .add(textElement = span().css(component(Classes.form, Classes.label, text)) + super(SUB_COMPONENT_NAME, div().css(component(form, group, Classes.label)).element()); + add(labelElement = Elements.label().css(component(form, Classes.label)) + .add(textElement = span().css(component(form, Classes.label, text)) .text(label) .element()) .element()); @@ -73,7 +84,7 @@ public void attach(MutationRecord mutationRecord) { FormGroup formGroup = lookupSubComponent(FormGroup.SUB_COMPONENT_NAME); if (formGroup.role != null) { - HTMLElement pseudoLabelElement = span().css(component(Classes.form, Classes.label)).element(); + HTMLElement pseudoLabelElement = span().css(component(form, Classes.label)).element(); for (Iterator iterator = iterator(labelElement); iterator.hasNext(); ) { HTMLElement element = iterator.next(); pseudoLabelElement.appendChild(element); @@ -92,32 +103,36 @@ public void attach(MutationRecord mutationRecord) { ((HTMLLabelElement) labelElement).htmlFor = formGroup.identifier(); } if (formGroup.required) { - labelElement.appendChild(span().css(component(Classes.form, Classes.label, Classes.required)) + labelElement.appendChild(span().css(component(form, Classes.label, Classes.required)) .aria(hidden, true) .html(fromSafeConstant("*")) .element()); } } - // ------------------------------------------------------ builder - - public FormGroupLabel label(String label) { - textElement.textContent = label; - return this; + @Override + public Element textDelegate() { + return textElement; } + // ------------------------------------------------------ builder + public FormGroupLabel noPaddingTop() { return css(modifier(noPaddingTop)); } public FormGroupLabel help(String ariaLabel, Popover popover) { - HTMLButtonElement helpButton = button(ButtonType.button) - .css(component(Classes.form, group, Classes.label, Classes.help)) - .aria(Aria.label, ariaLabel) - .add(IconSets.patternfly.help()) + HTMLElement helpContainer = span().css(component(form, group, Classes.label, help), util("ml-xs")) + .add(span().css(component(button), modifier(plain), modifier(noPadding)) + .attr(type, "button") + .attr(role, Roles.button) + .attr(tabindex, 0) + .aria(Aria.label, ariaLabel) + .add(span().css(component(button, icon)) + .add(questionCircle()))) .element(); - add(helpButton); - popover.trigger(helpButton).appendToBody(); + add(helpContainer); + popover.trigger(helpContainer).appendToBody(); return this; } diff --git a/components/src/main/java/org/patternfly/component/form/FormSection.java b/components/src/main/java/org/patternfly/component/form/FormSection.java index d9c2c7ecc..d769e9d95 100644 --- a/components/src/main/java/org/patternfly/component/form/FormSection.java +++ b/components/src/main/java/org/patternfly/component/form/FormSection.java @@ -15,11 +15,14 @@ */ package org.patternfly.component.form; +import org.jboss.elemento.ElementTextDelegate; +import org.jboss.elemento.Elements; import org.jboss.elemento.HTMLContainerBuilder; import org.jboss.elemento.Id; import org.patternfly.component.ComponentType; import org.patternfly.style.Classes; +import elemental2.dom.Element; import elemental2.dom.HTMLElement; import static org.jboss.elemento.Elements.div; @@ -30,43 +33,38 @@ import static org.patternfly.style.Classes.form; import static org.patternfly.style.Classes.section; -public class FormSection extends FormSubComponent { +public class FormSection extends FormSubComponent implements + ElementTextDelegate { // ------------------------------------------------------ factory public static FormSection formSection() { - return new FormSection(null, null); + return new FormSection(null); } public static FormSection formSection(String title) { - return new FormSection(title, div()); + return new FormSection(div()).text(title); } public static FormSection formSection(String title, HTMLContainerBuilder titleElement) { - return new FormSection(title, titleElement); + return new FormSection(titleElement).text(title); } // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "fs"; + public static final String SUB_COMPONENT_NAME = "fs"; + private final HTMLContainerBuilder titleElement; - FormSection(String title, HTMLContainerBuilder titleElement) { + FormSection(HTMLContainerBuilder titleElement) { super(SUB_COMPONENT_NAME, div().css(component(form, section)) .attr(role, group) .element()); - if (title != null) { - String titleId = Id.unique(ComponentType.Form.id, "section", "title"); - aria(labelledBy, titleId); - if (titleElement == null) { - add(div().css(component(form, section, Classes.title)) - .id(titleId) - .text(title)); - } else { - add(titleElement.css(component(form, section, Classes.title)) - .id(titleId) - .text(title)); - } - } + this.titleElement = titleElement == null ? div() : titleElement; + } + + @Override + public Element textDelegate() { + return titleElement.element(); } // ------------------------------------------------------ add @@ -77,8 +75,25 @@ public FormSection addGroup(FormGroup group) { // ------------------------------------------------------ builder + @Override + public FormSection text(String text) { + failSafeTitle(); + return ElementTextDelegate.super.text(text); + } + @Override public FormSection that() { return this; } + + // ------------------------------------------------------ internals + + private void failSafeTitle() { + if (!Elements.isAttached(titleElement)) { + String titleId = Id.unique(ComponentType.Form.id, "section", "title"); + aria(labelledBy, titleId); + add(titleElement.css(component(form, section, Classes.title)) + .id(titleId)); + } + } } diff --git a/components/src/main/java/org/patternfly/component/form/FormSelect.java b/components/src/main/java/org/patternfly/component/form/FormSelect.java index 2a53e90bf..69d36fc78 100644 --- a/components/src/main/java/org/patternfly/component/form/FormSelect.java +++ b/components/src/main/java/org/patternfly/component/form/FormSelect.java @@ -17,12 +17,11 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import org.jboss.elemento.Attachable; -import org.jboss.elemento.HTMLElementBuilder; +import org.jboss.elemento.HTMLSelectElementBuilder; import org.patternfly.component.ComponentType; import org.patternfly.component.HasValue; import org.patternfly.core.Attributes; @@ -30,7 +29,6 @@ import org.patternfly.handler.ChangeHandler; import org.patternfly.style.Classes; -import elemental2.dom.Event; import elemental2.dom.HTMLCollection; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLOptionElement; @@ -39,10 +37,11 @@ import static org.jboss.elemento.Elements.select; import static org.jboss.elemento.Elements.span; -import static org.jboss.elemento.Elements.wrapHtmlElement; +import static org.jboss.elemento.Elements.wrapSelectElement; import static org.jboss.elemento.EventType.change; import static org.jboss.elemento.EventType.input; import static org.patternfly.core.Aria.invalid; +import static org.patternfly.handler.ChangeHandler.fireIfChanged; import static org.patternfly.icon.IconSets.fas.caretDown; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.formControl; @@ -109,6 +108,12 @@ public void attach(MutationRecord mutationRecord) { // ------------------------------------------------------ add + /** Provides access to the underlying select element using a fluent API style */ + public FormSelect applyTo(Consumer> select) { + select.accept(selectElement()); + return this; + } + public FormSelect addGroups(Iterable items, Function display) { for (T item : items) { FormSelectOptionGroup group = display.apply(item); @@ -165,10 +170,9 @@ public FormSelect value(String value) { } public FormSelect value(String value, boolean fireEvent) { - boolean changed = !Objects.equals(selectElement.value, value); selectElement.value = value; - if (fireEvent && changed && !changeHandlers.isEmpty()) { - changeHandlers.forEach(ch -> ch.onChange(new Event(""), this, value)); + if (fireEvent) { + fireIfChanged(this, value, selectElement.value, changeHandlers); } return this; } @@ -187,12 +191,6 @@ public void selectFirstValue(boolean fireEvent) { } } - /** Provides access to the underlying select element using a fluent API style */ - public FormSelect applyTo(Consumer> consumer) { - consumer.accept(selectElement()); - return this; - } - @Override public FormSelect that() { return this; @@ -226,8 +224,8 @@ public boolean containsValue(String value) { } /** Returns the underlying input element */ - public HTMLElementBuilder selectElement() { - return wrapHtmlElement(selectElement); + public HTMLSelectElementBuilder selectElement() { + return wrapSelectElement(selectElement); } // ------------------------------------------------------ internal diff --git a/components/src/main/java/org/patternfly/component/form/FormSelectOption.java b/components/src/main/java/org/patternfly/component/form/FormSelectOption.java index 20dc68148..470f9aa2d 100644 --- a/components/src/main/java/org/patternfly/component/form/FormSelectOption.java +++ b/components/src/main/java/org/patternfly/component/form/FormSelectOption.java @@ -39,7 +39,7 @@ public static FormSelectOption formSelectOption(String label, String value) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "fso"; + public static final String SUB_COMPONENT_NAME = "fso"; public FormSelectOption(String label, String value) { super(SUB_COMPONENT_NAME, option().apply(o -> { diff --git a/components/src/main/java/org/patternfly/component/form/FormSelectOptionGroup.java b/components/src/main/java/org/patternfly/component/form/FormSelectOptionGroup.java index f81dfdde1..1a7b290fc 100644 --- a/components/src/main/java/org/patternfly/component/form/FormSelectOptionGroup.java +++ b/components/src/main/java/org/patternfly/component/form/FormSelectOptionGroup.java @@ -34,7 +34,7 @@ public static FormSelectOptionGroup formSelectOptionGroup(String label) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "fsog"; + public static final String SUB_COMPONENT_NAME = "fsog"; FormSelectOptionGroup(String label) { super(SUB_COMPONENT_NAME, optgroup() diff --git a/components/src/main/java/org/patternfly/component/form/Radio.java b/components/src/main/java/org/patternfly/component/form/Radio.java index aac4d2d5f..635ddc667 100644 --- a/components/src/main/java/org/patternfly/component/form/Radio.java +++ b/components/src/main/java/org/patternfly/component/form/Radio.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.function.Consumer; +import org.jboss.elemento.ElementTextDelegate; import org.jboss.elemento.HTMLInputElementBuilder; import org.jboss.elemento.InputType; import org.patternfly.component.BaseComponent; @@ -29,7 +30,7 @@ import org.patternfly.style.Modifiers.Disabled; import org.patternfly.style.Modifiers.Required; -import elemental2.dom.Event; +import elemental2.dom.Element; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; import elemental2.dom.HTMLLabelElement; @@ -41,6 +42,7 @@ import static org.jboss.elemento.Elements.label; import static org.jboss.elemento.Elements.wrapInputElement; import static org.jboss.elemento.EventType.change; +import static org.patternfly.handler.ChangeHandler.fireIfChanged; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.input; import static org.patternfly.style.Classes.modifier; @@ -53,40 +55,32 @@ * @see https://www.patternfly.org/components/forms/radio */ public class Radio extends BaseComponent implements - HasValue, Disabled, + ElementTextDelegate, + HasValue, Required { // ------------------------------------------------------ factory public static Radio radio(String id, String name) { - return new Radio(id, name, null, false); - } - - public static Radio radio(String id, String name, boolean checked) { - return new Radio(id, name, null, checked); + return new Radio(id, name); } public static Radio radio(String id, String name, String label) { - return new Radio(id, name, label, false); - } - - public static Radio radio(String id, String name, String label, boolean checked) { - return new Radio(id, name, label, checked); + return new Radio(id, name).text(label); } // ------------------------------------------------------ instance private final HTMLInputElement inputElement; private final List> changeHandlers; - private HTMLLabelElement labelElement; + private final HTMLLabelElement labelElement; - Radio(String id, String name, String label, boolean checked) { + Radio(String id, String name) { super(ComponentType.Radio, div().css(component(Classes.radio)) .add(input(InputType.radio).css(component(Classes.radio, input)) .id(id) - .name(name) - .checked(checked)) + .name(name)) .element()); this.changeHandlers = new ArrayList<>(); @@ -96,9 +90,11 @@ public static Radio radio(String id, String name, String label, boolean checked) add(labelElement = label().css(component(Classes.radio, Classes.label)) .apply(l -> l.htmlFor = id) .element()); - if (label != null) { - labelElement.textContent = label; - } + } + + @Override + public Element textDelegate() { + return labelElement; } // ------------------------------------------------------ add @@ -113,6 +109,12 @@ public Radio addDescription(RadioDescription description) { // ------------------------------------------------------ builder + /** Provides access to the underlying radio element using a fluent API style */ + public Radio applyTo(Consumer> consumer) { + consumer.accept(inputElement()); + return this; + } + @Override public Radio disabled(boolean disabled) { inputElement.disabled = disabled; @@ -145,7 +147,6 @@ public Radio standalone(boolean removeLabel) { css(modifier(standalone)); if (removeLabel) { failSafeRemoveFromParent(labelElement); - labelElement = null; } return this; } @@ -156,20 +157,13 @@ public Radio value(boolean checked) { } public Radio value(boolean checked, boolean fireEvent) { - boolean changed = inputElement.checked != checked; inputElement.checked = checked; - if (fireEvent && changed && !changeHandlers.isEmpty()) { - changeHandlers.forEach(ch -> ch.onChange(new Event(""), this, inputElement.checked)); + if (fireEvent) { + fireIfChanged(this, inputElement.checked, checked, changeHandlers); } return this; } - /** Provides access to the underlying radio element using a fluent API style */ - public Radio applyTo(Consumer> consumer) { - consumer.accept(inputElement()); - return this; - } - @Override public Radio that() { return this; diff --git a/components/src/main/java/org/patternfly/component/form/RadioBody.java b/components/src/main/java/org/patternfly/component/form/RadioBody.java index 94346e28a..b0ef8b0cf 100644 --- a/components/src/main/java/org/patternfly/component/form/RadioBody.java +++ b/components/src/main/java/org/patternfly/component/form/RadioBody.java @@ -15,6 +15,8 @@ */ package org.patternfly.component.form; +import org.jboss.elemento.ElementTextMethods; + import elemental2.dom.HTMLElement; import static org.jboss.elemento.Elements.span; @@ -22,7 +24,7 @@ import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.radio; -public class RadioBody extends RadioSubComponent { +public class RadioBody extends RadioSubComponent implements ElementTextMethods { // ------------------------------------------------------ factory @@ -36,7 +38,7 @@ public static RadioBody radioBody(String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "rb"; + public static final String SUB_COMPONENT_NAME = "rb"; RadioBody(String text) { super(SUB_COMPONENT_NAME, span().css(component(radio, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/form/RadioDescription.java b/components/src/main/java/org/patternfly/component/form/RadioDescription.java index df82c0913..e7c6d3006 100644 --- a/components/src/main/java/org/patternfly/component/form/RadioDescription.java +++ b/components/src/main/java/org/patternfly/component/form/RadioDescription.java @@ -15,6 +15,7 @@ */ package org.patternfly.component.form; +import org.jboss.elemento.ElementTextMethods; import org.patternfly.style.Classes; import elemental2.dom.HTMLElement; @@ -23,7 +24,8 @@ import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.radio; -public class RadioDescription extends RadioSubComponent { +public class RadioDescription extends RadioSubComponent + implements ElementTextMethods { // ------------------------------------------------------ factory @@ -37,7 +39,7 @@ public static RadioDescription radioDescription(String description) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "rd"; + public static final String SUB_COMPONENT_NAME = "rd"; RadioDescription(String description) { super(SUB_COMPONENT_NAME, span().css(component(radio, Classes.description)).element()); diff --git a/components/src/main/java/org/patternfly/component/form/TextArea.java b/components/src/main/java/org/patternfly/component/form/TextArea.java index 90b7ed8d4..fb9c94afd 100644 --- a/components/src/main/java/org/patternfly/component/form/TextArea.java +++ b/components/src/main/java/org/patternfly/component/form/TextArea.java @@ -17,20 +17,18 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; +import java.util.function.Consumer; import org.jboss.elemento.Attachable; import org.jboss.elemento.HTMLTextAreaElementBuilder; import org.patternfly.component.ComponentType; import org.patternfly.component.HasValue; -import org.patternfly.component.WithText; import org.patternfly.core.Attributes; import org.patternfly.handler.ChangeHandler; import org.patternfly.style.Modifiers.Plain; import org.patternfly.style.Modifiers.Readonly; import elemental2.dom.CSSStyleDeclaration; -import elemental2.dom.Event; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLTextAreaElement; import elemental2.dom.MutationRecord; @@ -42,6 +40,9 @@ import static org.jboss.elemento.EventType.input; import static org.jboss.elemento.EventType.keyup; import static org.patternfly.core.Aria.invalid; +import static org.patternfly.handler.ChangeHandler.fireIfChanged; +import static org.patternfly.style.Classes.modifier; +import static org.patternfly.style.Classes.textarea; /** * A text area component is used for entering a paragraph of text that is longer than one line. @@ -50,11 +51,10 @@ * "https://www.patternfly.org/components/forms/text-area">https://www.patternfly.org/components/forms/text-area */ public class TextArea extends FormControl implements + Attachable, HasValue, Plain, - Readonly, - WithText, - Attachable { + Readonly { // ------------------------------------------------------ factory @@ -76,6 +76,7 @@ public static TextArea textArea(String id, String value) { TextArea(String id, String value) { super(id, formControlContainer() + .css(modifier(textarea)) .add(textarea() .id(id) .apply(ta -> { @@ -109,6 +110,12 @@ public void attach(MutationRecord mutationRecord) { // ------------------------------------------------------ builder + /** Provides access to the underlying text area element using a fluent API style */ + public TextArea applyTo(Consumer> textArea) { + textArea.accept(textArea()); + return this; + } + public TextArea autoResize() { this.autoResize = true; return this; @@ -152,22 +159,15 @@ public TextArea required(boolean required) { return this; } - /** Same as {@link #value(String)} */ - @Override - public TextArea text(String text) { - return value(text); - } - /** Same as {@linkplain #value(String, boolean) value(value, false)} */ public TextArea value(String value) { return value(value, false); } public TextArea value(String value, boolean fireEvent) { - boolean changed = !Objects.equals(textAreaElement.value, value); textAreaElement.value = value; - if (fireEvent && changed && !valueChangeHandlers.isEmpty()) { - valueChangeHandlers.forEach(ch -> ch.onChange(new Event(""), this, value)); + if (fireEvent) { + fireIfChanged(this, textAreaElement.value, value, valueChangeHandlers); } return this; } @@ -209,11 +209,6 @@ public HTMLTextAreaElementBuilder textArea() { return wrapTextAreaElement(textAreaElement); } - @Override - public String text() { - return value(); - } - // ------------------------------------------------------ internal @Override diff --git a/components/src/main/java/org/patternfly/component/form/TextInput.java b/components/src/main/java/org/patternfly/component/form/TextInput.java index 3fbadc70d..8795fdb0b 100644 --- a/components/src/main/java/org/patternfly/component/form/TextInput.java +++ b/components/src/main/java/org/patternfly/component/form/TextInput.java @@ -19,7 +19,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; +import java.util.function.Consumer; import org.jboss.elemento.Elements; import org.jboss.elemento.HTMLInputElementBuilder; @@ -27,7 +27,6 @@ import org.patternfly.component.ComponentIcon; import org.patternfly.component.ComponentType; import org.patternfly.component.HasValue; -import org.patternfly.component.WithText; import org.patternfly.core.Aria; import org.patternfly.handler.ChangeHandler; import org.patternfly.style.Classes; @@ -35,7 +34,6 @@ import org.patternfly.style.Modifiers.Readonly; import elemental2.dom.Element; -import elemental2.dom.Event; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; @@ -47,6 +45,7 @@ import static org.jboss.elemento.EventType.change; import static org.jboss.elemento.EventType.keyup; import static org.patternfly.core.Aria.invalid; +import static org.patternfly.handler.ChangeHandler.fireIfChanged; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.formControl; import static org.patternfly.style.Classes.icon; @@ -60,11 +59,10 @@ * "https://www.patternfly.org/components/forms/text-input">https://www.patternfly.org/components/forms/text-input */ public class TextInput extends FormControl implements + ComponentIcon, HasValue, Plain, - Readonly, - ComponentIcon, - WithText { + Readonly { // ------------------------------------------------------ factory @@ -128,10 +126,10 @@ public static TextInput textInput(TextInputType type, String id, String value) { // ------------------------------------------------------ builder - @Override - public TextInput readonly(boolean readonly) { - inputElement.readOnly = readonly; - return Readonly.super.readonly(readonly); + /** Provides access to the underlying input element using a fluent API style */ + public TextInput applyTo(Consumer> input) { + input.accept(wrapInputElement(inputElement)); + return this; } /** Same as {@linkplain #expanded(boolean) expanded(true)} */ @@ -145,6 +143,23 @@ public TextInput expanded(boolean expanded) { return toggleModifier(that(), element(), Classes.expanded, expanded); } + @Override + public TextInput icon(Element icon) { + css(modifier(Classes.icon)); + if (iconContainer == null) { + insertFirst(failSafeUtilitiesContainer(), iconContainer = span().css(component(formControl, Classes.icon)) + .element()); + } + removeChildrenFrom(iconContainer); + iconContainer.appendChild(icon); + return this; + } + + public TextInput placeholder(String placeholder) { + inputElement.placeholder = placeholder; + return this; + } + @Override public TextInput plain(boolean plain) { if (plain) { @@ -155,15 +170,25 @@ public TextInput plain(boolean plain) { } @Override - public TextInput required(boolean required) { - inputElement.required = required; + public TextInput readonly(boolean readonly) { + inputElement.readOnly = readonly; + return Readonly.super.readonly(readonly); + } + + @Override + public TextInput removeIcon() { + failSafeRemoveFromParent(iconContainer); + if (utilitiesContainer != null && utilitiesContainer.childElementCount == 0) { + failSafeRemoveFromParent(utilitiesContainer); + } + element().classList.remove(modifier(icon)); return this; } - /** Same as {@link #value(String)} */ @Override - public TextInput text(String text) { - return value(text); + public TextInput required(boolean required) { + inputElement.required = required; + return this; } /** Same as {@linkplain #value(String, boolean) value(value, false)} */ @@ -172,41 +197,13 @@ public TextInput value(String value) { } public TextInput value(String value, boolean fireEvent) { - boolean changed = !Objects.equals(inputElement.value, value); inputElement.value = value; - if (fireEvent && changed && !valueChangeHandlers.isEmpty()) { - valueChangeHandlers.forEach(ch -> ch.onChange(new Event(""), this, value)); + if (fireEvent) { + fireIfChanged(this, inputElement.value, value, valueChangeHandlers); } return this; } - public TextInput placeholder(String placeholder) { - inputElement.placeholder = placeholder; - return this; - } - - @Override - public TextInput icon(Element icon) { - css(modifier(Classes.icon)); - if (iconContainer == null) { - insertFirst(failSafeUtilitiesContainer(), iconContainer = span().css(component(formControl, Classes.icon)) - .element()); - } - removeChildrenFrom(iconContainer); - iconContainer.appendChild(icon); - return this; - } - - @Override - public TextInput removeIcon() { - failSafeRemoveFromParent(iconContainer); - if (utilitiesContainer != null && utilitiesContainer.childElementCount == 0) { - failSafeRemoveFromParent(utilitiesContainer); - } - element().classList.remove(modifier(icon)); - return this; - } - @Override public TextInput that() { return this; @@ -244,11 +241,6 @@ public HTMLInputElementBuilder input() { return wrapInputElement(inputElement); } - @Override - public String text() { - return value(); - } - // ------------------------------------------------------ internal @Override diff --git a/components/src/main/java/org/patternfly/component/help/HelperTextItem.java b/components/src/main/java/org/patternfly/component/help/HelperTextItem.java index db21dcd1a..9739da479 100644 --- a/components/src/main/java/org/patternfly/component/help/HelperTextItem.java +++ b/components/src/main/java/org/patternfly/component/help/HelperTextItem.java @@ -15,6 +15,7 @@ */ package org.patternfly.component.help; +import org.jboss.elemento.ElementTextMethods; import org.jboss.elemento.Elements; import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.component.ComponentIcon; @@ -22,7 +23,6 @@ import org.patternfly.component.HasValue; import org.patternfly.component.IconPosition; import org.patternfly.component.ValidationStatus; -import org.patternfly.component.WithText; import org.patternfly.core.Aria; import org.patternfly.icon.PredefinedIcon; import org.patternfly.style.Classes; @@ -46,56 +46,50 @@ public class HelperTextItem extends HelperTextSubComponent implements ComponentIcon, - WithText, ComponentIconAndText, + ElementTextMethods, HasValue { // ------------------------------------------------------ factory public static HelperTextItem helperTextItem() { - return new HelperTextItem(div(), default_); + return new HelperTextItem(div()).status(default_); } public static HelperTextItem helperTextItem(String text) { - return new HelperTextItem(div(), default_).text(text); + return new HelperTextItem(div()).text(text).status(default_); } public static HelperTextItem helperTextItem(String text, ValidationStatus status) { - return new HelperTextItem(div(), status).text(text); + return new HelperTextItem(div()).text(text).status(status); } public static HelperTextItem helperTextItem(HTMLContainerBuilder builder) { - return new HelperTextItem(builder, default_); + return new HelperTextItem(builder).status(default_); } public static HelperTextItem helperTextItem(HTMLContainerBuilder builder, String text) { - return new HelperTextItem(builder, default_).text(text); + return new HelperTextItem(builder).text(text).status(default_); } public static HelperTextItem helperTextItem(HTMLContainerBuilder builder, String text, ValidationStatus status) { - return new HelperTextItem(builder, status).text(text); + return new HelperTextItem(builder).text(text).status(status); } // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "hti"; + public static final String SUB_COMPONENT_NAME = "hti"; private final HTMLElement textElement; - private boolean defaultIcon; private boolean customScreenReaderText; private ValidationStatus status; private HTMLElement screenReaderElement; private HTMLElement iconContainer; - HelperTextItem(HTMLContainerBuilder builder, ValidationStatus status) { + HelperTextItem(HTMLContainerBuilder builder) { super(SUB_COMPONENT_NAME, builder.css(component(helperText, item)).element()); - this.status = status; - this.defaultIcon = false; this.customScreenReaderText = false; - if (status != default_) { - css(status.modifier); - } element().appendChild(textElement = span().css(component(helperText, item, Classes.text)).element()); } @@ -108,12 +102,6 @@ public HelperTextItem dynamic() { return css(modifier(dynamic)); } - public HelperTextItem defaultIcon() { - defaultIcon = true; - failSafeIconContainer().appendChild(status.icon.get().element()); - return this; - } - @Override public HelperTextItem icon(Element icon) { if (!icon.classList.contains("fa-fw")) { @@ -127,6 +115,7 @@ public HelperTextItem icon(Element icon) { @Override public HelperTextItem removeIcon() { failSafeRemoveFromParent(iconContainer); + iconContainer = null; return this; } @@ -137,7 +126,7 @@ public HelperTextItem iconAndText(Element icon, String text, IconPosition iconPo } public HelperTextItem status(ValidationStatus status) { - return status(status, defaultIcon ? status.icon.get().element() : null); + return status(status, status.icon != null ? status.icon.get().element() : null); } public HelperTextItem status(ValidationStatus status, PredefinedIcon icon) { @@ -145,13 +134,15 @@ public HelperTextItem status(ValidationStatus status, PredefinedIcon icon) { } public HelperTextItem status(ValidationStatus status, Element icon) { - if (this.status != default_) { + if (this.status != null && this.status != default_) { element().classList.remove(this.status.modifier); } this.status = status; css(status.modifier); if (icon != null) { icon(icon); + } else { + removeIcon(); } if (!customScreenReaderText) { defaultScreenReaderText(); diff --git a/components/src/main/java/org/patternfly/component/hint/HintActions.java b/components/src/main/java/org/patternfly/component/hint/HintActions.java index 658f4d387..b70ee33e5 100644 --- a/components/src/main/java/org/patternfly/component/hint/HintActions.java +++ b/components/src/main/java/org/patternfly/component/hint/HintActions.java @@ -15,6 +15,8 @@ */ package org.patternfly.component.hint; +import org.patternfly.style.Modifiers.NoOffset; + import elemental2.dom.HTMLDivElement; import static org.jboss.elemento.Elements.div; @@ -22,7 +24,8 @@ import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.hint; -public class HintActions extends HintSubComponent { +public class HintActions extends HintSubComponent + implements NoOffset { // ------------------------------------------------------ factory @@ -32,7 +35,7 @@ public static HintActions hintActions() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ha"; + public static final String SUB_COMPONENT_NAME = "ha"; HintActions() { super(SUB_COMPONENT_NAME, div().css(component(hint, actions)).element()); diff --git a/components/src/main/java/org/patternfly/component/hint/HintBody.java b/components/src/main/java/org/patternfly/component/hint/HintBody.java index f017e424e..74499920d 100644 --- a/components/src/main/java/org/patternfly/component/hint/HintBody.java +++ b/components/src/main/java/org/patternfly/component/hint/HintBody.java @@ -35,7 +35,7 @@ public static HintBody hintBody() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "hb"; + public static final String SUB_COMPONENT_NAME = "hb"; HintBody() { super(SUB_COMPONENT_NAME, div().css(component(hint, body)).element()); diff --git a/components/src/main/java/org/patternfly/component/hint/HintFooter.java b/components/src/main/java/org/patternfly/component/hint/HintFooter.java index 67cc70850..ad258dc7b 100644 --- a/components/src/main/java/org/patternfly/component/hint/HintFooter.java +++ b/components/src/main/java/org/patternfly/component/hint/HintFooter.java @@ -32,7 +32,7 @@ public static HintFooter hintFooter() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "hf"; + public static final String SUB_COMPONENT_NAME = "hf"; HintFooter() { super(SUB_COMPONENT_NAME, div().css(component(hint, footer)).element()); diff --git a/components/src/main/java/org/patternfly/component/hint/HintTitle.java b/components/src/main/java/org/patternfly/component/hint/HintTitle.java index f32539d54..36cb4c9fc 100644 --- a/components/src/main/java/org/patternfly/component/hint/HintTitle.java +++ b/components/src/main/java/org/patternfly/component/hint/HintTitle.java @@ -35,7 +35,7 @@ public static HintTitle hintTitle() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ht"; + public static final String SUB_COMPONENT_NAME = "ht"; HintTitle() { super(SUB_COMPONENT_NAME, div().css(component(hint, title)).element()); diff --git a/components/src/main/java/org/patternfly/component/icon/Icon.java b/components/src/main/java/org/patternfly/component/icon/Icon.java index 2c7ef5f89..f7c043b14 100644 --- a/components/src/main/java/org/patternfly/component/icon/Icon.java +++ b/components/src/main/java/org/patternfly/component/icon/Icon.java @@ -25,7 +25,6 @@ import org.patternfly.icon.PredefinedIcon; import org.patternfly.style.Classes; import org.patternfly.style.Modifiers.Inline; -import org.patternfly.style.Size; import org.patternfly.style.Status; import elemental2.dom.Element; @@ -45,7 +44,7 @@ * An icon component is a container that allows for icons of varying dimensions, as well as spinners, to seamlessly replace each * other without shifting surrounding content. *

- * {@snippet class = IconDemo region = icon} + * {@snippet class=IconDemo region=icon} * * @see https://www.patternfly.org/components/icon */ @@ -72,8 +71,9 @@ public static Icon icon(Element icon) { // ------------------------------------------------------ instance private final HTMLElement content; - private Size size; - private Size iconSize; + private IconSize size; + private IconSize iconSize; + private IconSize progressIconSize; private Spinner spinner; Icon(Element icon) { @@ -87,16 +87,27 @@ public static Icon icon(Element icon) { // ------------------------------------------------------ builder /** - * Modifies the size of this component. + * Size of the icon component container and icon. */ - public Icon size(Size size) { + public Icon size(IconSize size) { return swap(this, element(), size, this.size, () -> this.size = size); } - public Icon iconSize(Size iconSize) { + /** + * Size of icon. Overrides the icon size set by the size property. + */ + public Icon iconSize(IconSize iconSize) { return swap(this, content, iconSize, this.iconSize, () -> this.iconSize = iconSize); } + /** + * Size of progress icon. Overrides the icon size set by the {@link #size(IconSize)} property. + */ + public Icon progressIconSize(IconSize progressIconSize) { + this.progressIconSize = progressIconSize; + return this; + } + public Icon status(Status status) { return swap(this, content, status, Status.values()); } @@ -108,10 +119,12 @@ public Icon progress(boolean inProgress, String label, Consumer spinner element().classList.add(modifier(Classes.inProgress)); if (spinner == null) { spinner = spinner(label); - if (size != null) { - spinner.size(size); + if (progressIconSize != null) { + spinner.size(progressIconSize.asSize()); } else if (iconSize != null) { - spinner.size(iconSize); + spinner.size(iconSize.asSize()); + } else if (size != null) { + spinner.size(size.asSize()); } else { spinner.size(md); } diff --git a/components/src/main/java/org/patternfly/component/icon/IconSize.java b/components/src/main/java/org/patternfly/component/icon/IconSize.java new file mode 100644 index 000000000..5a38a4fb3 --- /dev/null +++ b/components/src/main/java/org/patternfly/component/icon/IconSize.java @@ -0,0 +1,90 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.component.icon; + +import org.patternfly.style.Classes; +import org.patternfly.style.Size; +import org.patternfly.style.TypedModifier; + +public enum IconSize implements TypedModifier { + + sm("sm"), + + md("md"), + + lg("lg"), + + xl("xl"), + + _2xl("2xl"), + + _3xl("3xl"), + + bodySm("body-sm"), + + bodyDefault("body-default"), + + bodyLg("body-lg"), + + headingSm("heading-sm"), + + headingLg("heading-lg"), + + headingMd("heading-md"), + + headingXl("heading-xl"), + + heading2xl("heading-2xl"), + + heading3xl("heading-3xl"), + + ; + + private final String value; + private final String modifier; + + IconSize(String value) { + this.value = value; + this.modifier = Classes.modifier(value); + } + + @Override + public String value() { + return value; + } + + @Override + public String modifier() { + return modifier; + } + + Size asSize() { + if (this == IconSize.sm || this == IconSize.bodySm || this == IconSize.headingSm) { + return Size.sm; + } else if (this == IconSize.md || this == IconSize.bodyDefault || this == IconSize.headingMd) { + return Size.md; + } else if (this == IconSize.lg || this == IconSize.bodyLg || this == IconSize.headingLg) { + return Size.lg; + } else if (this == IconSize.xl || this == IconSize.headingXl) { + return Size.xl; + } else if (this == IconSize._2xl || this == IconSize.heading2xl) { + return Size._2xl; + } else if (this == IconSize._3xl || this == IconSize.heading3xl) { + return Size._3xl; + } + return Size.sm; + } +} diff --git a/components/src/main/java/org/patternfly/component/inputgroup/InputGroupItem.java b/components/src/main/java/org/patternfly/component/inputgroup/InputGroupItem.java index b97560459..f72418811 100644 --- a/components/src/main/java/org/patternfly/component/inputgroup/InputGroupItem.java +++ b/components/src/main/java/org/patternfly/component/inputgroup/InputGroupItem.java @@ -40,7 +40,7 @@ public static InputGroupItem inputGroupItem() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "igi"; + public static final String SUB_COMPONENT_NAME = "igi"; private Disabled componentImplementingDisabled; private FormControl formControl; private Dropdown dropdown; diff --git a/components/src/main/java/org/patternfly/component/inputgroup/InputGroupText.java b/components/src/main/java/org/patternfly/component/inputgroup/InputGroupText.java index 6ea916ea4..f576b63a8 100644 --- a/components/src/main/java/org/patternfly/component/inputgroup/InputGroupText.java +++ b/components/src/main/java/org/patternfly/component/inputgroup/InputGroupText.java @@ -15,10 +15,9 @@ */ package org.patternfly.component.inputgroup; -import org.jboss.elemento.Elements; +import org.jboss.elemento.ElementContainerDelegate; +import org.jboss.elemento.ElementTextDelegate; import org.patternfly.component.ComponentIcon; -import org.patternfly.component.ElementContainerDelegate; -import org.patternfly.component.WithText; import org.patternfly.style.Classes; import org.patternfly.style.Modifiers.Plain; @@ -35,10 +34,10 @@ import static org.patternfly.style.Classes.modifier; public class InputGroupText extends InputGroupSubComponent implements + ComponentIcon, ElementContainerDelegate, - Plain, - WithText, - ComponentIcon { + ElementTextDelegate, + Plain { // ------------------------------------------------------ factory @@ -52,7 +51,7 @@ public static InputGroupText inputGroupText(String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "igt"; + public static final String SUB_COMPONENT_NAME = "igt"; private final HTMLElement textElement; InputGroupText(String text) { @@ -68,6 +67,11 @@ public Element containerDelegate() { return textElement; } + @Override + public Element textDelegate() { + return textElement; + } + // ------------------------------------------------------ builder @Override @@ -83,21 +87,8 @@ public InputGroupText removeIcon() { return this; } - @Override - public InputGroupText text(String text) { - Elements.textNode(textElement, text); - return this; - } - @Override public InputGroupText that() { return this; } - - // ------------------------------------------------------ api - - @Override - public String text() { - return Elements.textNode(textElement); - } } diff --git a/components/src/main/java/org/patternfly/component/jumplinks/JumpLinks.java b/components/src/main/java/org/patternfly/component/jumplinks/JumpLinks.java index acbde573d..1169e8efc 100644 --- a/components/src/main/java/org/patternfly/component/jumplinks/JumpLinks.java +++ b/components/src/main/java/org/patternfly/component/jumplinks/JumpLinks.java @@ -20,6 +20,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import java.util.function.Supplier; import org.jboss.elemento.Attachable; @@ -50,6 +51,7 @@ import static elemental2.dom.DomGlobal.document; import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.failSafeRemoveFromParent; import static org.jboss.elemento.Elements.nav; import static org.jboss.elemento.Elements.removeChildrenFrom; import static org.jboss.elemento.Elements.span; @@ -103,6 +105,8 @@ public static JumpLinks jumpLinks(String label) { private final Map items; private final List> toggleHandler; private final List> selectHandler; + private final List> onAdd; + private final List> onRemove; private final HTMLContainerBuilder headerElement; private final HTMLContainerBuilder labelElement; private final HTMLContainerBuilder ulElement; @@ -117,6 +121,8 @@ public static JumpLinks jumpLinks(String label) { this.items = new HashMap<>(); this.toggleHandler = new ArrayList<>(); this.selectHandler = new ArrayList<>(); + this.onAdd = new ArrayList<>(); + this.onRemove = new ArrayList<>(); element().appendChild(div().css(component(jumpLinks, main)) .add(headerElement = div().css(component(jumpLinks, header)) @@ -148,6 +154,7 @@ public void attach(MutationRecord mutationRecord) { public JumpLinks add(JumpLinksItem item) { items.put(item.identifier(), item); ulElement.add(item); + onAdd.forEach(bc -> bc.accept(this, item)); return this; } @@ -220,6 +227,18 @@ public JumpLinks ariaToggleLabel(String label) { // ------------------------------------------------------ events + @Override + public JumpLinks onAdd(BiConsumer onAdd) { + this.onAdd.add(onAdd); + return this; + } + + @Override + public JumpLinks onRemove(BiConsumer onRemove) { + this.onRemove.add(onRemove); + return this; + } + public JumpLinks onSelect(SelectHandler selectHandler) { this.selectHandler.add(selectHandler); return this; @@ -303,15 +322,28 @@ public JumpLinksItem item(String identifier) { return items.get(identifier); } + @Override + public void removeItem(String identifier) { + JumpLinksItem item = items.remove(identifier); + failSafeRemoveFromParent(item); + if (item != null) { + item.list.clear(); + onRemove.forEach(bc -> bc.accept(this, item)); + } + } + @Override public void clear() { removeChildrenFrom(ulElement); - for (JumpLinksItem item : items.values()) { + Iterator iterator = items.values().iterator(); + while (iterator.hasNext()) { + JumpLinksItem item = iterator.next(); if (item.list != null) { item.list.clear(); } + iterator.remove(); + onRemove.forEach(bc -> bc.accept(this, item)); } - items.clear(); } // ------------------------------------------------------ internal diff --git a/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksItem.java b/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksItem.java index 7305ced43..3770d8e24 100644 --- a/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksItem.java +++ b/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksItem.java @@ -18,8 +18,8 @@ import java.util.HashMap; import java.util.Map; +import org.jboss.elemento.ElementTextDelegate; import org.jboss.elemento.Elements; -import org.patternfly.component.ElementTextDelegate; import org.patternfly.component.HasIdentifier; import org.patternfly.component.button.Button; import org.patternfly.core.Aria; @@ -65,7 +65,7 @@ public static JumpLinksItem jumpLinksItem(String identifier, String text, String // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "jli"; + public static final String SUB_COMPONENT_NAME = "jli"; private final String identifier; private final Map data; private final Button button; diff --git a/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksList.java b/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksList.java index 5f3b91d39..59b9790b2 100644 --- a/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksList.java +++ b/components/src/main/java/org/patternfly/component/jumplinks/JumpLinksList.java @@ -15,9 +15,12 @@ */ package org.patternfly.component.jumplinks; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import org.patternfly.component.HasItems; import org.patternfly.core.Roles; @@ -25,6 +28,7 @@ import elemental2.dom.HTMLUListElement; +import static org.jboss.elemento.Elements.failSafeRemoveFromParent; import static org.jboss.elemento.Elements.removeChildrenFrom; import static org.jboss.elemento.Elements.ul; import static org.patternfly.core.Attributes.role; @@ -42,14 +46,18 @@ public static JumpLinksList jumpLinksList() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "jll"; + public static final String SUB_COMPONENT_NAME = "jll"; final Map items; + private final List> onAdd; + private final List> onRemove; JumpLinksList() { super(SUB_COMPONENT_NAME, ul().css(component(jumpLinks, Classes.list)) .attr(role, Roles.list) .element()); this.items = new HashMap<>(); + this.onAdd = new ArrayList<>(); + this.onRemove = new ArrayList<>(); } // ------------------------------------------------------ add @@ -57,7 +65,9 @@ public static JumpLinksList jumpLinksList() { @Override public JumpLinksList add(JumpLinksItem item) { items.put(item.identifier(), item); - return add(item.element()); + JumpLinksList result = add(item.element()); + onAdd.forEach(bc -> bc.accept(this, item)); + return result; } // ------------------------------------------------------ builder @@ -67,6 +77,20 @@ public JumpLinksList that() { return this; } + // ------------------------------------------------------ events + + @Override + public JumpLinksList onAdd(BiConsumer onAdd) { + this.onAdd.add(onAdd); + return this; + } + + @Override + public JumpLinksList onRemove(BiConsumer onRemove) { + this.onRemove.add(onRemove); + return this; + } + // ------------------------------------------------------ api @Override @@ -94,9 +118,23 @@ public JumpLinksItem item(String identifier) { return items.get(identifier); } + @Override + public void removeItem(String identifier) { + JumpLinksItem item = items.remove(identifier); + failSafeRemoveFromParent(item); + if (item != null) { + onRemove.forEach(bc -> bc.accept(this, item)); + } + } + @Override public void clear() { removeChildrenFrom(element()); - items.clear(); + Iterator iterator = items.values().iterator(); + while (iterator.hasNext()) { + JumpLinksItem item = iterator.next(); + iterator.remove(); + onRemove.forEach(bc -> bc.accept(this, item)); + } } } diff --git a/components/src/main/java/org/patternfly/component/label/Label.java b/components/src/main/java/org/patternfly/component/label/Label.java index a962ec00c..47fec780a 100644 --- a/components/src/main/java/org/patternfly/component/label/Label.java +++ b/components/src/main/java/org/patternfly/component/label/Label.java @@ -25,6 +25,7 @@ import org.gwtproject.event.shared.HandlerRegistration; import org.jboss.elemento.Attachable; import org.jboss.elemento.ButtonType; +import org.jboss.elemento.ElementTextDelegate; import org.jboss.elemento.Elements; import org.jboss.elemento.EventType; import org.jboss.elemento.HTMLContainerBuilder; @@ -39,9 +40,8 @@ import org.patternfly.component.HasIdentifier; import org.patternfly.component.HasValue; import org.patternfly.component.IconPosition; -import org.patternfly.component.WithText; +import org.patternfly.component.Severity; import org.patternfly.component.button.Button; -import org.patternfly.component.tooltip.Tooltip; import org.patternfly.component.tooltip.TooltipToggle; import org.patternfly.core.Aria; import org.patternfly.core.ComponentContext; @@ -78,6 +78,7 @@ import static org.patternfly.handler.CloseHandler.shouldClose; import static org.patternfly.icon.IconSets.fas.times; import static org.patternfly.style.Classes.actions; +import static org.patternfly.style.Classes.clickable; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.content; import static org.patternfly.style.Classes.editable; @@ -94,16 +95,16 @@ * @see https://www.patternfly.org/components/label */ public class Label extends BaseComponent implements + Attachable, Closeable, Compact, ComponentContext, - Disabled, - HasValue, - WithText, ComponentIcon, ComponentIconAndText, + Disabled, + ElementTextDelegate, HasIdentifier, - Attachable { + HasValue { // ------------------------------------------------------ factory @@ -123,6 +124,10 @@ public static Label label(String identifier, String text, Color color) { return new Label(span(), identifier, text, color); } + public static Label label(HTMLContainerBuilder builder, String identifier, String text, Color color) { + return new Label(builder, identifier, text, color); + } + // ------------------------------------------------------ instance final HTMLElement textElement; @@ -137,7 +142,6 @@ public static Label label(String identifier, String text, Color color) { private HTMLElement actionsElement; private HTMLElement iconContainer; private HTMLInputElement inputElement; - private Tooltip tooltip; private Button closeButton; private HandlerRegistration cancelEditModeOnDocumentClick; @@ -161,6 +165,11 @@ Label(HTMLContainerBuilder builder, String identifier Attachable.register(this, this); } + @Override + public Element textDelegate() { + return textElement; + } + @Override public void attach(MutationRecord mutationRecord) { tooltipToggle.eval(); @@ -198,6 +207,16 @@ public Label disabled(boolean disabled) { return Disabled.super.disabled(disabled); } + /** Same as {@linkplain #filled(boolean) filled(true)} */ + public Label filled() { + return filled(true); + } + + /** Adds/removes {@linkplain Classes#modifier(String) modifier(filled)} */ + public Label filled(boolean filled) { + return toggleModifier(that(), element(), Classes.filled, filled); + } + /** Same as {@linkplain #outline(boolean) outline(true)} */ public Label outline() { return outline(true); @@ -218,6 +237,7 @@ public Label closable(CloseHandler

This is a subtitle for your page header

+ + Go to this link + + + + + + + + + + """; + + // ------------------------------------------------------ factory + + public static PageHeader pageHeader() { + return new PageHeader(); + } + + // ------------------------------------------------------ instance + + PageHeader() { + super(ComponentType.PageHeader, div().element()); + } + + // ------------------------------------------------------ add + + public PageHeader addBreadcrumb(Breadcrumb breadcrumb) { + return add(breadcrumb); + } + + public PageHeader add(Breadcrumb breadcrumb) { + return this; + } + + public PageHeader addLabel(Label label) { + return add(label); + } + + public PageHeader add(Label label) { + return this; + } + + // ------------------------------------------------------ builder + + @Override + public PageHeader icon(Element icon) { + return this; + } + + @Override + public PageHeader removeIcon() { + return this; + } + + public PageHeader title(String title) { + return this; + } + + public PageHeader subTitle(String subTitle) { + return this; + } + + @Override + public PageHeader that() { + return this; + } +} diff --git a/components/src/main/java/org/patternfly/componentgroup/servicecard/ServiceCard.java b/components/src/main/java/org/patternfly/componentgroup/servicecard/ServiceCard.java new file mode 100644 index 000000000..c518d74d0 --- /dev/null +++ b/components/src/main/java/org/patternfly/componentgroup/servicecard/ServiceCard.java @@ -0,0 +1,70 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.componentgroup.servicecard; + +import org.patternfly.component.BaseComponent; +import org.patternfly.component.ComponentIcon; +import org.patternfly.component.ComponentType; + +import elemental2.dom.Element; +import elemental2.dom.HTMLElement; + +import static org.jboss.elemento.Elements.div; + +public class ServiceCard extends BaseComponent implements + ComponentIcon { + + // ------------------------------------------------------ factory + + public ServiceCard serviceCard() { + return new ServiceCard(); + } + + // ------------------------------------------------------ instance + + public ServiceCard() { + super(ComponentType.ServiceCard, div().element()); + } + + // ------------------------------------------------------ builder + + @Override + public ServiceCard icon(Element icon) { + return this; + } + + @Override + public ServiceCard removeIcon() { + return this; + } + + public ServiceCard title(String title) { + return this; + } + + public ServiceCard subTitle(String subTitle) { + return this; + } + + public ServiceCard description(String description) { + return this; + } + + @Override + public ServiceCard that() { + return this; + } +} diff --git a/components/src/main/java/org/patternfly/componentgroup/theme/Color.java b/components/src/main/java/org/patternfly/componentgroup/theme/Color.java new file mode 100644 index 000000000..64203af70 --- /dev/null +++ b/components/src/main/java/org/patternfly/componentgroup/theme/Color.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.componentgroup.theme; + +import org.patternfly.style.Classes; + +import elemental2.dom.Element; + +import static org.jboss.elemento.svg.SVG.path; +import static org.jboss.elemento.svg.SVG.svg; +import static org.patternfly.token.Token.globalIconColorRegular; + +enum Color implements SystemValue { + + SYSTEM("system", "System", "Follow system preference", + "M23.94 16a1 1 0 0 1-.992-.876 6.957 6.957 0 0 0-6.069-6.062 1 1 0 1 1 .242-1.985 8.953 8.953 0 0 1 7.812 7.8A.999.999 0 0 1 23.94 16ZM16 5a1 1 0 0 1-1-1V1a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1Zm0 27a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1ZM4 17H1a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2Zm27 0h-3a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2ZM5.394 27.606a1 1 0 0 1-.707-1.707l2.12-2.12a1 1 0 1 1 1.415 1.413L6.1 27.313a.997.997 0 0 1-.707.293ZM24.485 8.515a1 1 0 0 1-.707-1.707L25.9 4.686a1 1 0 1 1 1.415 1.415l-2.122 2.12a.997.997 0 0 1-.707.294Zm-16.97 0a.997.997 0 0 1-.707-.293L4.686 6.1a1 1 0 1 1 1.415-1.415l2.12 2.122a1 1 0 0 1-.706 1.707Zm19.091 19.091a.997.997 0 0 1-.707-.293l-2.12-2.12a1 1 0 1 1 1.413-1.415l2.122 2.121a1 1 0 0 1-.707 1.707ZM16 24.875c-4.894 0-8.875-3.981-8.875-8.875a8.879 8.879 0 0 1 5.227-8.088.876.876 0 0 1 1.153 1.163 6.945 6.945 0 0 0-.63 2.925A7.133 7.133 0 0 0 20 19.125a6.948 6.948 0 0 0 2.925-.63.876.876 0 0 1 1.163 1.154A8.88 8.88 0 0 1 16 24.875Zm-4.785-14.153A7.135 7.135 0 0 0 8.875 16 7.133 7.133 0 0 0 16 23.125a7.13 7.13 0 0 0 5.278-2.34c-.419.06-.845.09-1.278.09-4.894 0-8.875-3.981-8.875-8.875 0-.433.03-.86.09-1.278Z") { + @Override + public boolean systemValue() { + return true; + } + }, + LIGHT("light", "Light", "Always use light mode", + "M16 25c-4.963 0-9-4.038-9-9s4.037-9 9-9 9 4.038 9 9-4.037 9-9 9Zm0-16c-3.86 0-7 3.14-7 7s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7Zm0-4a1 1 0 0 1-1-1V1a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1Zm0 27a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1ZM4 17H1a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2Zm27 0h-3a1 1 0 1 1 0-2h3a1 1 0 1 1 0 2ZM5.394 27.606a1 1 0 0 1-.707-1.707l2.12-2.12a1 1 0 1 1 1.415 1.413L6.1 27.313a.997.997 0 0 1-.707.293ZM24.485 8.515a1 1 0 0 1-.707-1.707L25.9 4.686a1 1 0 1 1 1.415 1.415l-2.122 2.12a.997.997 0 0 1-.707.294Zm-16.97 0a.997.997 0 0 1-.707-.293L4.686 6.1a1 1 0 1 1 1.415-1.415l2.12 2.122a1 1 0 0 1-.706 1.707Zm19.091 19.091a.997.997 0 0 1-.707-.293l-2.12-2.12a1 1 0 1 1 1.413-1.415l2.122 2.121a1 1 0 0 1-.707 1.707Z"), + DARK("dark", "Dark", "Always use light mode", + "M16.457 30C8.485 30 2 23.515 2 15.543c0-5.93 3.715-11.345 9.243-13.476a.999.999 0 0 1 1.289 1.3 12.185 12.185 0 0 0-.843 4.487c0 6.869 5.588 12.457 12.457 12.457 1.56 0 3.07-.284 4.487-.844a.998.998 0 0 1 1.3 1.29C27.802 26.285 22.387 30 16.456 30ZM9.992 4.904C6.338 7.134 4 11.177 4 15.544 4 22.412 9.588 28 16.457 28c4.367 0 8.41-2.338 10.639-5.992a14.39 14.39 0 0 1-2.95.302c-7.971 0-14.457-6.485-14.457-14.456 0-1.003.102-1.989.303-2.95Z"); + + static Color fromIdentifier(String identifier) { + if (SYSTEM.identifier.equals(identifier)) { + return SYSTEM; + } else if (LIGHT.identifier.equals(identifier)) { + return LIGHT; + } else if (DARK.identifier.equals(identifier)) { + return DARK; + } else { + return SYSTEM; + } + } + + final String identifier; + final String text; + final String description; + // from https://github.com/patternfly/patternfly-org/blob/main/packages/documentation-framework/components/themeSelector/themeSelector.js + final String path; + + Color(String identifier, String text, String description, String path) { + this.identifier = identifier; + this.text = text; + this.description = description; + this.path = path; + } + + String identifier() { + return identifier; + } + + Element icon() { + return svg() + .css(Classes.svg) + .attr("viewBox", "0 0 32 32") + .attr("fill", globalIconColorRegular.var) + .add(path().attr("d", path)) + .element(); + } +} diff --git a/components/src/main/java/org/patternfly/componentgroup/theme/Contrast.java b/components/src/main/java/org/patternfly/componentgroup/theme/Contrast.java new file mode 100644 index 000000000..b476f35c2 --- /dev/null +++ b/components/src/main/java/org/patternfly/componentgroup/theme/Contrast.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.componentgroup.theme; + +enum Contrast implements SystemValue { + + SYSTEM("high-contrast-system", "System") { + @Override + public boolean systemValue() { + return true; + } + }, + ON("high-contrast-on", "On"), + OFF("high-contrast-off", "Off"); + + static Contrast fromIdentifier(String identifier) { + if (SYSTEM.identifier.equals(identifier)) { + return SYSTEM; + } else if (ON.identifier.equals(identifier)) { + return ON; + } else if (OFF.identifier.equals(identifier)) { + return OFF; + } else { + return SYSTEM; + } + } + + final String identifier; + final String text; + + Contrast(String identifier, String text) { + this.identifier = identifier; + this.text = text; + } + + String identifier() { + return identifier; + } +} diff --git a/components/src/main/java/org/patternfly/componentgroup/theme/SystemValue.java b/components/src/main/java/org/patternfly/componentgroup/theme/SystemValue.java new file mode 100644 index 000000000..4a87fdd58 --- /dev/null +++ b/components/src/main/java/org/patternfly/componentgroup/theme/SystemValue.java @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.componentgroup.theme; + +interface SystemValue { + + default boolean systemValue() { + return false; + } +} diff --git a/components/src/main/java/org/patternfly/componentgroup/theme/ThemeManager.java b/components/src/main/java/org/patternfly/componentgroup/theme/ThemeManager.java new file mode 100644 index 000000000..43cd9f4c2 --- /dev/null +++ b/components/src/main/java/org/patternfly/componentgroup/theme/ThemeManager.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.componentgroup.theme; + +import java.util.function.Function; + +import org.gwtproject.event.shared.HandlerRegistration; +import org.jboss.elemento.logger.Logger; + +import elemental2.dom.EventListener; +import elemental2.dom.MediaQueryList; +import elemental2.dom.MediaQueryListEvent; +import elemental2.webstorage.WebStorageWindow; + +import static elemental2.dom.DomGlobal.document; +import static elemental2.dom.DomGlobal.window; +import static org.jboss.elemento.EventType.change; + +class ThemeManager & SystemValue> { + + private static final Logger logger = Logger.getLogger(ThemeManager.class.getName()); + + private final String storageKey; + private final String css; + private final E addClassValue; + private final MediaQueryList mediaQuery; + private final Function save; + private final HandlerRegistration handlerRegistration; + E value; + + ThemeManager(String storageKey, String css, String mediaQuery, E defaultValue, E addClassValue, E mediaQueryValue, + Function load, Function save) { + this.storageKey = storageKey; + this.css = css; + this.addClassValue = addClassValue; + this.save = save; + + // listen for OS/browser changes + this.mediaQuery = window.matchMedia(mediaQuery); + EventListener eventListener = event -> { + if (((MediaQueryListEvent) event).matches) { + apply(mediaQueryValue); + } else { + apply(defaultValue); + } + }; + this.mediaQuery.addEventListener(change.name, eventListener); + this.handlerRegistration = () -> this.mediaQuery.removeEventListener(change.name, eventListener); + + // load from local storage + String item = WebStorageWindow.of(window).localStorage.getItem(storageKey); + if (item != null) { + apply(load.apply(item)); + } else { + apply(defaultValue); + } + } + + void cleanup() { + if (handlerRegistration != null) { + handlerRegistration.removeHandler(); + } + } + + void apply(E value) { + if (value != null && value != this.value) { + this.value = value; + String item = save.apply(this.value); + if (item != null) { + WebStorageWindow.of(window).localStorage.setItem(storageKey, item); + } + if (this.value.systemValue()) { + if (mediaQuery.matches) { + document.querySelector("html").classList.add(css); + } else { + document.querySelector("html").classList.remove(css); + } + } else { + if (this.value == addClassValue) { + document.querySelector("html").classList.add(css); + } else { + document.querySelector("html").classList.remove(css); + } + } + } + } +} diff --git a/components/src/main/java/org/patternfly/componentgroup/theme/ThemeSelector.java b/components/src/main/java/org/patternfly/componentgroup/theme/ThemeSelector.java new file mode 100644 index 000000000..44cfa8e2a --- /dev/null +++ b/components/src/main/java/org/patternfly/componentgroup/theme/ThemeSelector.java @@ -0,0 +1,149 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.componentgroup.theme; + +import org.jboss.elemento.Attachable; +import org.jboss.elemento.Id; +import org.patternfly.component.BaseComponent; +import org.patternfly.component.ComponentType; +import org.patternfly.component.menu.MenuContent; +import org.patternfly.component.menu.MenuToggle; +import org.patternfly.component.menu.SingleSelect; +import org.patternfly.component.togglegroup.ToggleGroup; + +import elemental2.dom.HTMLElement; +import elemental2.dom.MutationRecord; + +import static java.util.Arrays.asList; +import static org.jboss.elemento.Elements.div; +import static org.patternfly.component.SelectionMode.single; +import static org.patternfly.component.menu.MenuContent.menuContent; +import static org.patternfly.component.menu.MenuGroup.menuGroup; +import static org.patternfly.component.menu.MenuItem.menuItem; +import static org.patternfly.component.menu.MenuList.menuList; +import static org.patternfly.component.menu.MenuToggle.menuToggle; +import static org.patternfly.component.menu.SingleSelect.singleSelect; +import static org.patternfly.component.menu.SingleSelectMenu.singleSelectMenu; +import static org.patternfly.component.togglegroup.ToggleGroup.toggleGroup; +import static org.patternfly.component.togglegroup.ToggleGroupItem.toggleGroupItem; +import static org.patternfly.style.Classes.component; +import static org.patternfly.style.Classes.menu; +import static org.patternfly.style.Classes.search; +import static org.patternfly.style.Classes.themeSelector; + +public class ThemeSelector extends BaseComponent implements Attachable { + + // ------------------------------------------------------ factory + + public static ThemeSelector themeSelector() { + return new ThemeSelector(null); + } + + public static ThemeSelector themeSelector(String storagePrefix) { + return new ThemeSelector(storagePrefix); + } + + // ------------------------------------------------------ instance + + private static final String COLOR_KEY = "color"; + private static final String CONTRAST_KEY = "contrast"; + private final ThemeManager colorManager; + private final ThemeManager contrastManager; + private final MenuContent menuContent; + private boolean hasContrast; + + ThemeSelector(String storagePrefix) { + super(ComponentType.ThemeSelector, div().css(component(themeSelector)).element()); + this.hasContrast = false; + + String colorKey = storagePrefix == null + ? "theme-preference" + : Id.build(storagePrefix, "theme-preference"); + String contrastKey = storagePrefix == null + ? "high-contrast-preference" + : Id.build(storagePrefix, "high-contrast-preference"); + colorManager = new ThemeManager<>(colorKey, "pf-v6-theme-dark", "(prefers-color-scheme: dark)", + Color.SYSTEM, Color.DARK, Color.DARK, + Color::fromIdentifier, Color::identifier); + contrastManager = new ThemeManager<>(contrastKey, "pf-v6-theme-high-contrast", "(prefers-contrast: more)", + Contrast.SYSTEM, Contrast.ON, Contrast.ON, + Contrast::fromIdentifier, Contrast::identifier); + + menuContent = menuContent() + .addGroup(menuGroup("Color scheme") + .addList(menuList() + .addItems(asList(Color.values()), color -> + menuItem(color.identifier, color.text) + .icon(color.icon()) + .description(color.description) + .store(COLOR_KEY, color)))); + MenuToggle menuToggle = menuToggle().icon(colorManager.value.icon()); + SingleSelect singleSelect = singleSelect(menuToggle) + .noDefaultSelectHandler() + .addMenu(singleSelectMenu() + .onSingleSelect((e, menuItem, selected) -> { + Color color = menuItem.get(COLOR_KEY); + if (color != colorManager.value) { + colorManager.apply(color); + menuToggle.icon(color.icon()); + } + }) + .addContent(menuContent)); + singleSelect.select(colorManager.value.identifier()); + add(singleSelect); + } + + @Override + public void attach(MutationRecord mutationRecord) { + // noop + } + + @Override + public void detach(MutationRecord mutationRecord) { + colorManager.cleanup(); + contrastManager.cleanup(); + } + + // ------------------------------------------------------ builder + + public ThemeSelector withContrast() { + if (!hasContrast) { + ToggleGroup toggleGroup = toggleGroup(single) + .addItems(asList(Contrast.values()), contrast -> + toggleGroupItem(contrast.identifier(), contrast.text) + .store(CONTRAST_KEY, contrast)) + .onSingleSelect((e, menuItem, selected) -> { + Contrast contrast = menuItem.get(CONTRAST_KEY); + if (contrast != contrastManager.value) { + contrastManager.apply(contrast); + } + }); + menuContent + .addDivider() + .addGroup(menuGroup("High contrast") + .add(div().css(component(menu, search)) // just a fake MenuSearch component + .add(toggleGroup))); + toggleGroup.select(contrastManager.value.identifier()); + hasContrast = true; + } + return this; + } + + @Override + public ThemeSelector that() { + return this; + } +} diff --git a/core/pom.xml b/core/pom.xml index b0774b4ac..73d975792 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml @@ -34,7 +33,7 @@ PatternFly Java core components and layouts - 2.18.1 + 2.21.0 @@ -61,11 +60,6 @@ ${version.jackson} test - - org.jetbrains.kotlin - kotlin-stdlib - provided - @@ -85,33 +79,25 @@ - org.jetbrains.kotlin - kotlin-maven-plugin + dev.jbang + jbang-maven-plugin - version + generate-version generate-sources - script + run - version.kts - ${project.basedir},${project.version},${version.patternfly} + + + ${project.basedir} + ${project.version} + ${version.patternfly} + - - - org.apache.maven - maven-plugin-api - ${maven.min.version} - - - org.apache.maven - maven-core - ${maven.min.version} - - net.ltgt.gwt.maven diff --git a/core/src/demo/java/BreakpointsDemo.java b/core/src/demo/java/BreakpointsDemo.java index 4dda5d9bc..f04dedf53 100644 --- a/core/src/demo/java/BreakpointsDemo.java +++ b/core/src/demo/java/BreakpointsDemo.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import static org.patternfly.style.Breakpoint._2xl; import static org.patternfly.style.Breakpoint.default_; import static org.patternfly.style.Breakpoint.lg; @@ -8,7 +24,7 @@ import static org.patternfly.style.BreakpointCollector.verticalModifiers; import static org.patternfly.style.Breakpoints.breakpoints; -@SuppressWarnings("ResultOfMethodCallIgnored") +@SuppressWarnings({"ResultOfMethodCallIgnored", "unused"}) public class BreakpointsDemo { public void collectorDemo() { diff --git a/core/src/demo/java/FilterDemo.java b/core/src/demo/java/FilterDemo.java index b45a91263..29aeab8a8 100644 --- a/core/src/demo/java/FilterDemo.java +++ b/core/src/demo/java/FilterDemo.java @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import java.util.List; import org.patternfly.filter.Filter; @@ -6,7 +22,7 @@ import static java.util.Arrays.asList; -@SuppressWarnings("Convert2Diamond") +@SuppressWarnings({"Convert2Diamond", "unused"}) public class FilterDemo { public void filterDemo() { diff --git a/core/src/main/java/org/patternfly/core/Aria.java b/core/src/main/java/org/patternfly/core/Aria.java index 5e7449fb9..c5d4ec445 100644 --- a/core/src/main/java/org/patternfly/core/Aria.java +++ b/core/src/main/java/org/patternfly/core/Aria.java @@ -23,6 +23,7 @@ public interface Aria { String describedBy = "aria-describedby"; String disabled = "aria-disabled"; String expanded = "aria-expanded"; + String hasPopup = "aria-haspopup"; String hidden = "aria-hidden"; String invalid = "aria-invalid"; String label = "aria-label"; diff --git a/core/src/main/java/org/patternfly/core/Attributes.java b/core/src/main/java/org/patternfly/core/Attributes.java index cc2e0f3ab..cdcd2dd73 100644 --- a/core/src/main/java/org/patternfly/core/Attributes.java +++ b/core/src/main/java/org/patternfly/core/Attributes.java @@ -21,5 +21,5 @@ public interface Attributes { String tabindex = "tabindex"; String role = "role"; String required = "required"; - String scope = "scope"; + String type = "type"; } diff --git a/core/src/main/java/org/patternfly/core/Dataset.java b/core/src/main/java/org/patternfly/core/Dataset.java index c2827cf44..3a49aa588 100644 --- a/core/src/main/java/org/patternfly/core/Dataset.java +++ b/core/src/main/java/org/patternfly/core/Dataset.java @@ -17,8 +17,6 @@ public interface Dataset { - String expandableSectionId = "expandableSectionId"; - String expandableSectionTarget = "expandableSectionTarget"; String identifier = "identifier"; String label = "label"; String placeholder = "placeholder"; diff --git a/components/src/main/java/org/patternfly/component/Ouia.java b/core/src/main/java/org/patternfly/core/Ouia.java similarity index 58% rename from components/src/main/java/org/patternfly/component/Ouia.java rename to core/src/main/java/org/patternfly/core/Ouia.java index 7add46cc0..122dabdc0 100644 --- a/components/src/main/java/org/patternfly/component/Ouia.java +++ b/core/src/main/java/org/patternfly/core/Ouia.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.patternfly.component; +package org.patternfly.core; -import org.jboss.elemento.Id; +import org.jboss.elemento.svg.SVGElement; import elemental2.dom.HTMLElement; import elemental2.webstorage.Storage; @@ -28,27 +28,23 @@ * * @see https://ouia.readthedocs.io/ * @see https://www.patternfly.org/developer-resources/open-ui-automation + * "https://www.patternfly.org/developer-resources/open-ui-automation">https://www.patternfly.org/developer-resources/open-ui-automation */ public final class Ouia { - public static void component(HTMLElement element, ComponentType componentType) { - if (element != null && componentType.componentName != null && isSupported()) { - component(element, componentType.componentName, Id.unique("ouia", componentType.id)); - } - } - - public static void component(HTMLElement element, String name, String id) { + public static void ouia(HTMLElement element, String id, String name) { if (element != null && name != null && isSupported()) { - element.dataset.set("ouiaComponentType", name); - element.dataset.set("ouiaComponentId", id); - element.dataset.set("ouiaComponentSafe", "true"); + element.dataset.set("ouiaId", id); + element.dataset.set("ouiaType", name); + element.dataset.set("ouiaSafe", "true"); } } - public static void safe(HTMLElement element, boolean safe) { - if (element != null && isSupported()) { - element.dataset.set("ouiaComponentSafe", String.valueOf(safe)); + public static void ouia(SVGElement element, String id, String name) { + if (element != null && name != null && isSupported()) { + element.dataset.set("ouiaId", id); + element.dataset.set("ouiaType", name); + element.dataset.set("ouiaSafe", "true"); } } diff --git a/core/src/main/java/org/patternfly/core/Roles.java b/core/src/main/java/org/patternfly/core/Roles.java index 50a02695a..7dd187699 100644 --- a/core/src/main/java/org/patternfly/core/Roles.java +++ b/core/src/main/java/org/patternfly/core/Roles.java @@ -21,6 +21,7 @@ public interface Roles { String button = "button"; String cell = "cell"; String columnheader = "columnheader"; + String combobox = "combobox"; String dialog = "dialog"; String grid = "grid"; String gridcell = "gridcell"; @@ -42,6 +43,7 @@ public interface Roles { String rowgroup = "rowgroup"; String separator = "separator"; String slider = "slider"; + String switch_ = "switch"; String tab = "tab"; String tablist = "tablist"; String tabpanel = "tabpanel"; diff --git a/core/src/main/java/org/patternfly/core/Version.java b/core/src/main/java/org/patternfly/core/Version.java deleted file mode 100644 index 80957d3b4..000000000 --- a/core/src/main/java/org/patternfly/core/Version.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.patternfly.core; - -import javax.annotation.processing.Generated; - -/* - * WARNING! This class is generated. Do not modify. - */ -@Generated("version.kts") -public interface Version { - - String PATTERN_FLY_JAVA_VERSION = "0.2.12-SNAPSHOT"; - String PATTERN_FLY_VERSION = "6.0.0"; - String PATTERN_FLY_MAJOR_VERSION = "v6"; -} \ No newline at end of file diff --git a/core/src/main/java/org/patternfly/core/package-info.java b/core/src/main/java/org/patternfly/core/package-info.java new file mode 100644 index 000000000..482800381 --- /dev/null +++ b/core/src/main/java/org/patternfly/core/package-info.java @@ -0,0 +1,71 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Core classes and interfaces for PatternFly Java. + * + *

This package provides the foundational building blocks used throughout PatternFly Java components and layouts. It + * includes utilities for ARIA attributes, data attributes, component context management, observable values, and common types. + * + *

Key Classes and Interfaces

+ * + *

ARIA and Data Attributes

+ *
    + *
  • {@link org.patternfly.core.Aria} - Constants for ARIA attribute names (aria-label, aria-expanded, etc.)
  • + *
  • {@link org.patternfly.core.Attributes} - Common HTML attribute constants
  • + *
  • {@link org.patternfly.core.Dataset} - Constants for data-* attribute names used in PatternFly components
  • + *
  • {@link org.patternfly.core.Roles} - Constants for ARIA role attribute values
  • + *
  • {@link org.patternfly.core.Ouia} - Open UI Automation (OUIA) data attribute constants for testing
  • + *
+ * + *

Component Infrastructure

+ *
    + *
  • {@link org.patternfly.core.ComponentContext} - Interface for storing and retrieving arbitrary values within a component
  • + *
  • {@link org.patternfly.core.ObservableValue} - A value wrapper that notifies subscribers when changed, enabling reactive patterns
  • + *
  • {@link org.patternfly.core.AsyncStatus} - Enumeration representing asynchronous operation states
  • + *
+ * + *

Utilities

+ *
    + *
  • {@link org.patternfly.core.Tuple} and {@link org.patternfly.core.Tuples} - Simple key-value pair types
  • + *
  • {@link org.patternfly.core.Numbers} - Numeric utility functions
  • + *
  • {@link org.patternfly.core.Timeouts} - Common timeout constants
  • + *
  • {@link org.patternfly.core.Validation} - Validation helpers for property ranges and enums
  • + *
  • {@link org.patternfly.core.LanguageDirection} - Language direction enumeration (LTR/RTL)
  • + *
  • {@link org.patternfly.core.Version} - Version information for the PatternFly Java library
  • + *
+ * + *

Integration with Elemento

+ * + *

PatternFly Java builds upon Elemento's builder API, providing a fluent, + * type-safe approach to creating web components. The {@link org.patternfly.core.ComponentContext} interface extends Elemento's + * {@code TypedBuilder} to provide consistent builder patterns across all PatternFly components. + * + *

Observable Values

+ * + *

The {@link org.patternfly.core.ObservableValue} class enables reactive programming patterns by allowing components to + * subscribe to value changes. Example usage: + * + * {@snippet : + * ObservableValue value = ObservableValue.ov("initial"); + * value.subscribe((current, previous) -> console.log("Value changed: " + current)); + * value.set("new value"); // Triggers subscriber notification + * } + * + * @see PatternFly Design System + * @see PatternFly Java Documentation + * @see Elemento Builder API + */ +package org.patternfly.core; \ No newline at end of file diff --git a/core/src/main/java/org/patternfly/dataprovider/package-info.java b/core/src/main/java/org/patternfly/dataprovider/package-info.java new file mode 100644 index 000000000..754e7646a --- /dev/null +++ b/core/src/main/java/org/patternfly/dataprovider/package-info.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Data provider API for managing items and state in data-driven components. + * + *

This package provides a unified interface for binding data to PatternFly components like data lists and tables. + * The {@link org.patternfly.dataprovider.DataProvider} class manages items, filtering, sorting, pagination, and selection, + * automatically updating bound displays when state changes. + * + *

Key Classes

+ * + *
    + *
  • {@link org.patternfly.dataprovider.DataProvider} - Central class for managing items with support for filtering, + * sorting, paging, and selection
  • + *
  • {@link org.patternfly.dataprovider.Display} - Interface implemented by components to receive data and state updates
  • + *
  • {@link org.patternfly.dataprovider.PageInfo} - Holds pagination state (page size, current page, total items)
  • + *
  • {@link org.patternfly.dataprovider.SelectionInfo} - Tracks selected items and selection state
  • + *
  • {@link org.patternfly.dataprovider.SortInfo} - Manages sort order and comparator for items
  • + *
  • {@link org.patternfly.dataprovider.ItemDisplay} - Simplified display interface for components showing a single item
  • + *
+ * + *

Usage Pattern

+ * + *

The typical workflow involves creating a {@link org.patternfly.dataprovider.DataProvider}, binding it to one or more + * {@link org.patternfly.dataprovider.Display} components, and then manipulating the data: + * + * {@snippet : + * // Create a data provider with an identifier function + * DataProvider dataProvider = new DataProvider<>(user -> user.id()); + * + * // Bind it to a display component (e.g., DataList) + * DataList dataList = dataList(dataProvider); + * dataProvider.bindDisplay(dataList); + * + * // Update items - this automatically updates all bound displays + * dataProvider.update(users); + * + * // Add filtering + * dataProvider.addFilter("active", user -> user.isActive()); + * + * // Configure sorting + * dataProvider.sort(new SortInfo<>(Comparator.comparing(User::name))); + * + * // Navigate pages + * dataProvider.gotoNextPage(); + * } + * + *

Features

+ * + *

Item Management

+ *

The data provider maintains three collections of items: + *

    + *
  • All items - The complete dataset
  • + *
  • Filtered items - Items matching active filters
  • + *
  • Visible items - Current page of filtered items
  • + *
+ * + *

Filtering

+ *

Multiple filters can be registered by ID and combined using predicates. When filters change, + * the data provider automatically recalculates filtered and visible items. + * + *

Sorting

+ *

Items are sorted using a {@link java.util.Comparator}. Sort changes are immediately reflected in bound displays. + * + *

Pagination

+ *

Automatic pagination with configurable page size. The {@link org.patternfly.dataprovider.PageInfo} class + * tracks current page, total pages, and item counts. + * + *

Selection

+ *

Support for single and multi-selection with selection events. The {@link org.patternfly.dataprovider.SelectionInfo} + * maintains the set of selected items and provides methods to query selection state. + * + * @see org.patternfly.dataprovider.DataProvider + * @see org.patternfly.dataprovider.Display + */ +package org.patternfly.dataprovider; \ No newline at end of file diff --git a/core/src/main/java/org/patternfly/filter/Filter.java b/core/src/main/java/org/patternfly/filter/Filter.java index 6646f8385..de87821bb 100644 --- a/core/src/main/java/org/patternfly/filter/Filter.java +++ b/core/src/main/java/org/patternfly/filter/Filter.java @@ -36,7 +36,7 @@ * The filter class supports change notifications whenever the filter state changes via the * {@link #onChange(FilterChangeHandler)} method and can be persisted using {@link #save()} and {@link #load(String)} methods. *

- * {@snippet class = FilterDemo region = filter} + * {@snippet class=FilterDemo region=filter} * * @param The type of object that this filter will be applied to. */ diff --git a/core/src/main/java/org/patternfly/filter/package-info.java b/core/src/main/java/org/patternfly/filter/package-info.java new file mode 100644 index 000000000..0b2b0a0b2 --- /dev/null +++ b/core/src/main/java/org/patternfly/filter/package-info.java @@ -0,0 +1,121 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Flexible filtering API for objects with support for multiple attributes and operators. + * + *

This package provides a composable filtering system that allows you to define filter attributes, combine them + * with logical operators, and apply them to collections or individual objects. Filters support change notifications, + * persistence, and can be integrated with data providers and UI components. + * + *

Key Classes

+ * + *
    + *
  • {@link org.patternfly.filter.Filter} - Main filter class that holds multiple attributes and evaluates them
  • + *
  • {@link org.patternfly.filter.FilterAttribute} - Represents a single filterable attribute with a name, value, and condition
  • + *
  • {@link org.patternfly.filter.FilterCondition} - Functional interface that defines how to match an object against a value
  • + *
  • {@link org.patternfly.filter.FilterOperator} - Enum for combining attributes (AND/OR)
  • + *
  • {@link org.patternfly.filter.FilterChangeHandler} - Handler for filter state change notifications
  • + *
  • {@link org.patternfly.filter.FilterAttributeModifier} - Function for custom attribute value modification logic
  • + *
+ * + *

Basic Usage

+ * + *

Create a filter with multiple attributes, set values, and apply it to a collection: + * + * {@snippet : + * // Create a filter combining attributes with AND + * Filter filter = new Filter<>(FilterOperator.AND); + * + * // Add filter attributes with conditions + * filter.add(new FilterAttribute<>("name", (user, value) -> user.name().contains(value))); + * filter.add(new FilterAttribute<>("active", (user, value) -> user.isActive() == value)); + * + * // Set filter values + * filter.set("name", "John"); + * filter.set("active", true); + * + * // Apply filter to a list + * List filtered = filter.filter(allUsers); + * + * // Or match a single object + * boolean matches = filter.match(user); + * } + * + *

Features

+ * + *

Logical Operators

+ *

Combine multiple filter attributes using {@link org.patternfly.filter.FilterOperator#AND} or + * {@link org.patternfly.filter.FilterOperator#OR}: + * + * {@snippet : + * // Match users where name contains "John" OR email contains "john" + * Filter filter = new Filter<>(FilterOperator.OR) + * .add(new FilterAttribute<>("name", (u, v) -> u.name().contains(v))) + * .add(new FilterAttribute<>("email", (u, v) -> u.email().contains(v))); + * } + * + *

Change Notifications

+ *

Register handlers to be notified when filter state changes: + * + * {@snippet : + * filter.onChange((f, origin) -> { + * console.log("Filter changed from: " + origin); + * updateUI(f.filter(users)); + * }); + * } + * + *

Persistence

+ *

Save and restore filter state using string serialization: + * + * {@snippet : + * // Mark attributes as persistent + * filter.add(new FilterAttribute<>("name", true, nameCondition)); + * + * // Save filter state + * String state = filter.save(); + * + * // Later, restore filter state + * filter.load(state); + * } + * + *

Custom Attribute Modifiers

+ *

Control how attribute values are updated using {@link org.patternfly.filter.FilterAttributeModifier}: + * + * {@snippet : + * // Toggle boolean values instead of replacing them + * filter.set("flag", true, (oldValue, newValue) -> !oldValue); + * } + * + *

Integration with Data Provider

+ * + *

Filters work seamlessly with {@link org.patternfly.dataprovider.DataProvider}: + * + * {@snippet : + * Filter filter = new Filter<>(FilterOperator.AND) + * .add(new FilterAttribute<>("search", (u, v) -> u.name().contains(v))); + * + * DataProvider dataProvider = new DataProvider<>(User::id); + * + * filter.onChange((f, origin) -> { + * dataProvider.addFilter("user-filter", user -> f.match(user)); + * }); + * } + * + * @see org.patternfly.filter.Filter + * @see org.patternfly.filter.FilterAttribute + * @see org.patternfly.dataprovider.DataProvider + */ +package org.patternfly.filter; \ No newline at end of file diff --git a/core/src/main/java/org/patternfly/handler/ChangeHandler.java b/core/src/main/java/org/patternfly/handler/ChangeHandler.java index 4167a3501..8cb25ac05 100644 --- a/core/src/main/java/org/patternfly/handler/ChangeHandler.java +++ b/core/src/main/java/org/patternfly/handler/ChangeHandler.java @@ -15,6 +15,9 @@ */ package org.patternfly.handler; +import java.util.List; +import java.util.Objects; + import elemental2.dom.Event; /** @@ -26,5 +29,12 @@ @FunctionalInterface public interface ChangeHandler { + static void fireIfChanged(C component, T oldValue, T value, List> changeHandlers) { + boolean changed = !Objects.equals(oldValue, value); + if (changed && !changeHandlers.isEmpty()) { + changeHandlers.forEach(ch -> ch.onChange(new Event(""), component, value)); + } + } + void onChange(Event event, C component, T value); } diff --git a/core/src/main/java/org/patternfly/handler/package-info.java b/core/src/main/java/org/patternfly/handler/package-info.java new file mode 100644 index 000000000..e9b371b75 --- /dev/null +++ b/core/src/main/java/org/patternfly/handler/package-info.java @@ -0,0 +1,106 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Common event handler interfaces used throughout PatternFly Java components. + * + *

This package defines functional interfaces for handling various component events in a type-safe manner. + * All handlers follow a consistent pattern: they accept a DOM event, the component that triggered the event, + * and event-specific data. Components register these handlers using {@code on()} methods. + * + *

Handler Interfaces

+ * + *
    + *
  • {@link org.patternfly.handler.ComponentHandler} - Generic handler accepting a component
  • + *
  • {@link org.patternfly.handler.ChangeHandler} - Handler for value change events with old and new values
  • + *
  • {@link org.patternfly.handler.SelectHandler} - Handler for selection events with selected state
  • + *
  • {@link org.patternfly.handler.MultiSelectHandler} - Handler for multi-selection events with list of selected items
  • + *
  • {@link org.patternfly.handler.ToggleHandler} - Handler for expand/collapse toggle events
  • + *
  • {@link org.patternfly.handler.CloseHandler} - Handler for close/dismiss events
  • + *
  • {@link org.patternfly.handler.ResizeHandler} - Handler for resize events with dimensions
  • + *
+ * + *

Usage Examples

+ * + *

Change Handler

+ *

Handle value changes in form components: + * + * {@snippet : + * TextInput input = textInput("username") + * .onChange((event, component, value) -> { + * console.log("Username changed to: " + value); + * validateUsername(value); + * }); + * } + * + *

Selection Handler

+ *

Respond to selection events in lists and tables: + * + * {@snippet : + * DataList dataList = dataList(dataProvider) + * .onSelect((event, item, selected) -> { + * console.log("User " + item.name() + " selected: " + selected); + * }); + * } + * + *

Toggle Handler

+ *

Handle expand/collapse state in expandable components: + * + * {@snippet : + * Drawer drawer = drawer() + * .onToggle((event, component, expanded) -> { + * console.log("Drawer expanded: " + expanded); + * if (expanded) { + * loadDrawerContent(); + * } + * }); + * } + * + *

Close Handler

+ *

Perform cleanup when components are closed: + * + * {@snippet : + * Alert alert = alert("Success", "Operation completed") + * .onClose((event, component) -> { + * console.log("Alert dismissed"); + * removeFromDOM(component); + * }); + * } + * + *

Handler Registration Pattern

+ * + *

Components follow a consistent pattern for registering handlers. Methods are named {@code on()} and + * return the component to enable method chaining: + * + * {@snippet : + * Switch switch_ = switch_("enable-feature") + * .value(false) + * .onChange((e, c, value) -> console.log("Switch: " + value)) + * .onToggle((e, c, checked) -> updateFeatureState(checked)); + * } + * + *

Functional Interface Benefits

+ * + *

All handler interfaces are marked with {@code @FunctionalInterface}, enabling: + *

    + *
  • Lambda expressions for concise event handling
  • + *
  • Method references for even more compact code
  • + *
  • Type safety with compile-time checking
  • + *
  • Clear IDE support with parameter hints
  • + *
+ * + * @see Handler API Documentation + */ +package org.patternfly.handler; \ No newline at end of file diff --git a/core/src/main/java/org/patternfly/popper/PopperBuilder.java b/core/src/main/java/org/patternfly/popper/PopperBuilder.java index c4c2dc216..cb4814315 100644 --- a/core/src/main/java/org/patternfly/popper/PopperBuilder.java +++ b/core/src/main/java/org/patternfly/popper/PopperBuilder.java @@ -19,10 +19,10 @@ import java.util.List; import java.util.Set; import java.util.function.Consumer; +import java.util.function.Predicate; import org.gwtproject.event.shared.HandlerRegistration; import org.jboss.elemento.EventType; -import org.jboss.elemento.Key; import org.jboss.elemento.logger.Logger; import elemental2.core.JsArray; @@ -40,6 +40,7 @@ import static org.jboss.elemento.Elements.isVisible; import static org.jboss.elemento.Elements.onDetach; import static org.jboss.elemento.EventType.bind; +import static org.jboss.elemento.Key.Escape; import static org.patternfly.popper.Placement.auto; public class PopperBuilder { @@ -50,11 +51,11 @@ public class PopperBuilder { private final HTMLElement triggerElement; private final HTMLElement popperElement; private final JsArray modifiers; + private Predicate stayOpen; private final List handlerRegistrations; private int animationDuration; private int entryDelay; private int exitDelay; - private int zIndex; private Placement placement; public PopperBuilder(String componentName, HTMLElement triggerElement, HTMLElement popperElement) { @@ -66,7 +67,6 @@ public PopperBuilder(String componentName, HTMLElement triggerElement, HTMLEleme this.animationDuration = Popper.UNDEFINED; this.entryDelay = Popper.UNDEFINED; this.exitDelay = Popper.UNDEFINED; - this.zIndex = Popper.UNDEFINED; this.placement = auto; } @@ -90,7 +90,6 @@ public PopperBuilder exitDelay(int exitDelay) { } public PopperBuilder zIndex(int zIndex) { - this.zIndex = zIndex; if (zIndex != Popper.UNDEFINED) { popperElement.style.zIndex = CSSProperties.ZIndexUnionType.of(zIndex); } @@ -128,11 +127,24 @@ public PopperBuilder registerHandler(HTMLElement triggerElement, Set { if (isVisible(popperElement)) { if (triggerActions.contains(TriggerAction.stayOpen)) { - if (!popperElement.contains((Node) e.target)) { - hide.accept(e); + boolean clickedInside = popperElement.contains((Node) e.target); + if (stayOpen != null) { + if (!clickedInside && !stayOpen.test(e)) { + hide.accept(e); + } + } else { + if (!clickedInside) { + hide.accept(e); + } } } else if (triggerActions.contains(TriggerAction.click)) { - hide.accept(e); + if (stayOpen != null) { + if (!stayOpen.test(e)) { + hide.accept(e); + } + } else { + hide.accept(e); + } } } else if (e.target == triggerElement || triggerElement.contains(((Node) e.target))) { show.accept(e); @@ -141,19 +153,10 @@ public PopperBuilder registerHandler(HTMLElement triggerElement, Set { - if (isVisible(popperElement) && Key.Escape.match(e)) { + if (isVisible(popperElement) && Escape.match(e)) { hide.accept(e); } })); - handlerRegistrations.add(bind(popperElement, EventType.keydown, e -> { - if (Key.Enter.match(e)) { - if (isVisible(popperElement)) { - hide.accept(e); - } else { - show.accept(e); - } - } - })); } return this; } @@ -166,6 +169,18 @@ public PopperBuilder removePopperOnTriggerDetach() { return this; } + /** + * Configures the predicate to determine if the popper should stay open in response to specific events. + * + * @param stayOpen a predicate that evaluates an {@link Event} and returns {@code true} if the popper should remain open, or + * {@code false} otherwise. + * @return the {@link PopperBuilder} instance for method chaining. + */ + public PopperBuilder stayOpen(Predicate stayOpen) { + this.stayOpen = stayOpen; + return this; + } + public Popper build() { Any createPopperFn = Js.global().nestedGetAsAny(Popper.POPPER_CREATE); if (createPopperFn == null || isTripleEqual(createPopperFn, undefined())) { diff --git a/core/src/main/java/org/patternfly/popper/package-info.java b/core/src/main/java/org/patternfly/popper/package-info.java new file mode 100644 index 000000000..0e7c5a0b9 --- /dev/null +++ b/core/src/main/java/org/patternfly/popper/package-info.java @@ -0,0 +1,149 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Java wrapper for Popper.js positioning engine used by overlay components. + * + *

This package provides a type-safe Java API for Popper.js, the positioning + * library used by PatternFly components with popups, tooltips, dropdowns, and other floating elements. It handles + * automatic positioning, collision detection, and dynamic updates. + * + *

Key Classes

+ * + *
    + *
  • {@link org.patternfly.popper.Popper} - Main interface for controlling popper instances
  • + *
  • {@link org.patternfly.popper.PopperBuilder} - Builder for configuring and creating popper instances
  • + *
  • {@link org.patternfly.popper.Placement} - Enum of placement options (top, bottom, left, right, etc.)
  • + *
  • {@link org.patternfly.popper.Modifier} - Configuration for Popper.js modifiers
  • + *
  • {@link org.patternfly.popper.TriggerAction} - Enum of trigger events (click, hover, focus, etc.)
  • + *
  • {@link org.patternfly.popper.Options} - Configuration options for popper behavior
  • + *
  • {@link org.patternfly.popper.State} - Current state of the popper including position and styles
  • + *
+ * + *

Basic Usage

+ * + *

Create a popper to position a floating element relative to a trigger element: + * + * {@snippet : + * HTMLElement trigger = button().element(); + * HTMLElement popup = div().element(); + * + * Popper popper = new PopperBuilder("MyComponent", trigger, popup) + * .placement(Placement.bottom) + * .zIndex(1000) + * .registerHandler(Set.of(TriggerAction.click), + * e -> popper.show(() -> console.log("Visible")), + * e -> popper.hide(() -> console.log("Hidden"))) + * .build(); + * } + * + *

Placement Options

+ * + *

Control where the popper appears relative to the trigger element: + * + * {@snippet : + * // Automatic placement (Popper chooses the best position) + * popper = builder.placement(Placement.auto).build(); + * + * // Fixed placement + * popper = builder.placement(Placement.top).build(); + * popper = builder.placement(Placement.bottomStart).build(); + * popper = builder.placement(Placement.rightEnd).build(); + * } + * + *

Trigger Actions

+ * + *

Configure how the popper responds to user interactions: + * + * {@snippet : + * // Show on hover + * builder.registerHandler(Set.of(TriggerAction.mouseenter), show, hide); + * + * // Show on click, hide when clicking outside + * builder.registerHandler(Set.of(TriggerAction.click), show, hide); + * + * // Show on focus (for keyboard navigation) + * builder.registerHandler(Set.of(TriggerAction.focus), show, hide); + * + * // Stay open even when clicking inside (e.g., for menus) + * builder.registerHandler(Set.of(TriggerAction.stayOpen), show, hide); + * + * // Manual control only + * builder.registerHandler(Set.of(TriggerAction.manual), show, hide); + * } + * + *

Animation and Timing

+ * + *

Configure entrance/exit animations and delays: + * + * {@snippet : + * Popper popper = new PopperBuilder(componentName, trigger, popup) + * .animationDuration(300) // Fade in/out over 300ms + * .entryDelay(500) // Wait 500ms before showing + * .exitDelay(200) // Wait 200ms before hiding + * .build(); + * } + * + *

Modifiers

+ * + *

Customize Popper.js behavior with modifiers: + * + * {@snippet : + * // Add offset from trigger element + * Modifier offset = new Modifier(); + * offset.name = "offset"; + * offset.options = new ModifierOptions(); + * offset.options.offset = new int[]{0, 8}; // [skidding, distance] + * + * Popper popper = new PopperBuilder(componentName, trigger, popup) + * .addModifier(offset) + * .build(); + * } + * + *

Controlling Visibility

+ * + *

Programmatically show and hide the popper: + * + * {@snippet : + * // Show with callback + * popper.show(() -> console.log("Popper is now visible")); + * + * // Hide with callback + * popper.hide(() -> console.log("Popper is now hidden")); + * + * // Update position (e.g., after content changes) + * popper.update().then(state -> console.log("Updated to: " + state.placement)); + * + * // Clean up when done + * popper.cleanup(); + * } + * + *

Lifecycle Management

+ * + *

The {@link org.patternfly.popper.PopperBuilder} provides lifecycle management options: + * + * {@snippet : + * builder + * .removePopperOnTriggerDetach() // Auto-cleanup when trigger is removed from DOM + * .stayOpen(event -> { // Custom logic for keeping popper open + * return popup.contains((Node) event.target); + * }); + * } + * + * @see Popper.js Documentation + * @see org.patternfly.popper.Popper + * @see org.patternfly.popper.PopperBuilder + */ +package org.patternfly.popper; \ No newline at end of file diff --git a/core/src/main/java/org/patternfly/style/BreakpointCollector.java b/core/src/main/java/org/patternfly/style/BreakpointCollector.java index 3be96d4c8..c0738dcf6 100644 --- a/core/src/main/java/org/patternfly/style/BreakpointCollector.java +++ b/core/src/main/java/org/patternfly/style/BreakpointCollector.java @@ -39,7 +39,7 @@ *

* *

- * {@snippet class = BreakpointsDemo region = collector} + * {@snippet class=BreakpointsDemo region=collector} *

* * @param the type of the values to be collected diff --git a/core/src/main/java/org/patternfly/style/Breakpoints.java b/core/src/main/java/org/patternfly/style/Breakpoints.java index a69755f71..4f47467e7 100644 --- a/core/src/main/java/org/patternfly/style/Breakpoints.java +++ b/core/src/main/java/org/patternfly/style/Breakpoints.java @@ -64,15 +64,15 @@ * Breakpoints can be created using either factory methods or a fluent API: *

*

- * {@snippet class = BreakpointsDemo region = factoryAndFluent} + * {@snippet class=BreakpointsDemo region=factoryAndFluent} *

* *

* To get the CSS modifiers classes, use the {@code modifiers()} and {@code verticalModifiers()} methods. Depending on the - * signature they return a list of CSS modifier classes, a single CSS modifier class or an empty string. + * signature, they return a list of CSS modifier classes, a single CSS modifier class or an empty string. *

*

- * {@snippet class = BreakpointsDemo region = modifiers} + * {@snippet class=BreakpointsDemo region=modifiers} *

* * @param the type of values associated with each breakpoint diff --git a/core/src/main/java/org/patternfly/style/Classes.java b/core/src/main/java/org/patternfly/style/Classes.java index 652b874fc..748faf7c0 100644 --- a/core/src/main/java/org/patternfly/style/Classes.java +++ b/core/src/main/java/org/patternfly/style/Classes.java @@ -37,8 +37,10 @@ public interface Classes { String alignCenter = "align-center"; String alignRight = "align-right"; String alignTop = "align-top"; + String animateCurrent = "animate-current"; String ariaDisabled = "aria-disabled"; String arrow = "arrow"; + String attention = "attention"; String autoColumnWidths = "auto-column-widths"; String autoFit = "auto-fit"; String avatar = "avatar"; @@ -66,6 +68,7 @@ public interface Classes { String chipContainer = "chip-container"; String chipGroup = "chip-group"; String clickable = "clickable"; + String clicked = "clicked"; String close = "close"; String code = "code"; String codeBlock = "code-block"; @@ -75,6 +78,7 @@ public interface Classes { String compact = "compact"; String container = "container"; String content = "content"; + String contextSelector = "context-selector"; String control = "control"; String controls = "controls"; String count = "count"; @@ -97,7 +101,7 @@ public interface Classes { String emptyState = "empty-state"; String end = "end"; String error = "error"; - String expandable = "expandable"; + String expandable = "expandable"; // TODO Is this still used in PF6? String expandableContent = "expandable-content"; String expandableSection = "expandable-section"; String expanded = "expanded"; @@ -107,7 +111,10 @@ public interface Classes { String favorited = "favorited"; String fieldGroup = "field-group"; String fill = "fill"; + String filled = "filled"; String fillColumns = "fill-columns"; + String filtered = "filtered"; // special PatternFly Java modifier + String finished = "finished"; String fitContent = "fit-content"; String fixed = "fixed"; String flat = "flat"; @@ -121,6 +128,7 @@ public interface Classes { String form = "form"; String formControl = "form-control"; String fullHeight = "full-height"; + String fullWidth = "full-width"; String gallery = "gallery"; String global = "global"; String grid = "grid"; @@ -137,14 +145,16 @@ public interface Classes { String hidden = "hidden"; String hint = "hint"; String horizontal = "horizontal"; - String horizontalSubnav = "horizontal-subnav"; + String hoverable = "hoverable"; String icon = "icon"; String icons = "icons"; String indented = "indented"; String indeterminate = "indeterminate"; String indicator = "indicator"; + String info = "info"; String inline = "inline"; String inlineGrid = "inline-grid"; + String innerWrap = "inner-wrap"; String inProgress = "in-progress"; String input = "input"; String inputGroup = "input-group"; @@ -178,18 +188,25 @@ public interface Classes { String noOffset = "no-offset"; String noPadding = "no-padding"; String noPaddingTop = "no-padding-top"; + String noSidebar = "no-sidebar"; + String notificationDrawer = "notification-drawer"; + String notify = "notify"; + String numberInput = "number-input"; String off = "off"; String on = "on"; String open = "open"; String option = "option"; + String outerWrap = "outer-wrap"; String outline = "outline"; String overflow = "overflow"; + String overflowContainer = "overflow-container"; String overflowScroll = "overflow-scroll"; String padding = "padding"; String page = "page"; String pageInsets = "page-insets"; String panel = "panel"; String path = "path"; + String pending = "pending"; String picture = "picture"; String placeholder = "placeholder"; String plain = "plain"; @@ -198,6 +215,7 @@ public interface Classes { String pre = "pre"; String primary = "primary"; String progress = "progress"; + String progressStepper = "progress-stepper"; String radio = "radio"; String rail = "rail"; String raised = "raised"; @@ -229,6 +247,7 @@ public interface Classes { String shadowBottom = "shadow-bottom"; String shadowTop = "shadow-top"; String shortcuts = "shortcuts"; + String show = "show"; String sidebar = "sidebar"; String simpleList = "simple-list"; String singleline = "singleline"; @@ -244,12 +263,14 @@ public interface Classes { String stack = "stack"; String standalone = "standalone"; String start = "start"; + String stateful = "stateful"; String static_ = "static"; String status = "status"; String step = "step"; String steps = "steps"; String sticky = "sticky"; String subnav = "subnav"; + String subtab = "subtab"; String success = "success"; String svg = "pf-" + Version.PATTERN_FLY_MAJOR_VERSION + "-svg"; String switch_ = "switch"; @@ -262,6 +283,7 @@ public interface Classes { String term = "term"; String tertiary = "tertiary"; String text = "text"; + String textarea = "textarea"; String textAlignLeft = "text-align-left"; String textInput = "text-input"; String textInputGroup = "text-input-group"; @@ -270,6 +292,7 @@ public interface Classes { String thead = "thead"; String thumb = "thumb"; String tick = "tick"; + String timestamp = "timestamp"; String title = "title"; String titleCell = "title-cell"; String toast = "toast"; @@ -277,6 +300,7 @@ public interface Classes { String toggleGroup = "toggle-group"; String toggleRight = "toggle-right"; String toolbar = "toolbar"; + String themeSelector = "theme-selector"; String tooltip = "tooltip"; String top = "top"; String tr = "tr"; @@ -284,6 +308,7 @@ public interface Classes { String treeView = "tree-view"; String truncate = "truncate"; String typeahead = "typeahead"; + String unit = "unit"; String unread = "unread"; String utilities = "utilities"; String value = "value"; diff --git a/core/src/main/java/org/patternfly/style/Modifiers.java b/core/src/main/java/org/patternfly/style/Modifiers.java index bc57f3d53..c4aec913a 100644 --- a/core/src/main/java/org/patternfly/style/Modifiers.java +++ b/core/src/main/java/org/patternfly/style/Modifiers.java @@ -121,6 +121,19 @@ default B fullHeight(boolean fullHeight) { } } + interface FullWidth> extends TypedBuilder, IsElement { + + /** Same as {@linkplain #fullWidth(boolean) fullWidth(true)} */ + default B fullWidth() { + return fullWidth(true); + } + + /** Adds/removes {@linkplain Classes#modifier(String) modifier(fullWidth)} */ + default B fullWidth(boolean fullWidth) { + return toggleModifier(that(), element(), Classes.fullWidth, fullWidth); + } + } + interface Gutter> extends TypedBuilder, IsElement { /** Same as {@linkplain #gutter(boolean) gutter(true)} */ @@ -199,6 +212,19 @@ default B noPadding(boolean noPadding) { } } + interface NoOffset> extends TypedBuilder, IsElement { + + /** Same as {@linkplain #noOffset(boolean) noOffset(true)} */ + default B noOffset() { + return noOffset(true); + } + + /** Adds/removes {@linkplain Classes#modifier(String) modifier(noOffset)} */ + default B noOffset(boolean noOffset) { + return toggleModifier(that(), element(), Classes.noOffset, noOffset); + } + } + interface Padding> extends TypedBuilder, IsElement { /** Same as {@linkplain #padding(boolean) padding(true)} */ @@ -238,6 +264,19 @@ default B plain(boolean plain) { } } + interface Primary> extends TypedBuilder, IsElement { + + /** Same as {@linkplain #primary(boolean) primary(true)} */ + default B primary() { + return primary(true); + } + + /** Adds/removes {@linkplain Classes#modifier(String) modifier(primary)} */ + default B primary(boolean primary) { + return toggleModifier(that(), element(), Classes.primary, primary); + } + } + interface Readonly> extends TypedBuilder, IsElement { /** Same as {@linkplain #readonly(boolean) readonly(true)} */ @@ -290,6 +329,32 @@ default B secondary(boolean secondary) { } } + interface Static> extends TypedBuilder, IsElement { + + /** Same as {@linkplain #static_(boolean) static_(true)} */ + default B static_() { + return static_(true); + } + + /** Adds/removes {@linkplain Classes#modifier(String) modifier(static_)} */ + default B static_(boolean static_) { + return toggleModifier(that(), element(), Classes.static_, static_); + } + } + + interface Sticky> extends TypedBuilder, IsElement { + + /** Same as {@linkplain #sticky(boolean) sticky(true)} */ + default B sticky() { + return sticky(true); + } + + /** Adds/removes {@linkplain Classes#modifier(String) modifier(sticky)} */ + default B sticky(boolean sticky) { + return toggleModifier(that(), element(), Classes.sticky, sticky); + } + } + interface Vertical> extends TypedBuilder, IsElement { /** Same as {@linkplain #vertical(boolean) vertical(true)} */ diff --git a/showcase/gwt/src/main/java/org/patternfly/showcase/Environment.java b/core/src/main/java/org/patternfly/style/NotificationStatus.java similarity index 57% rename from showcase/gwt/src/main/java/org/patternfly/showcase/Environment.java rename to core/src/main/java/org/patternfly/style/NotificationStatus.java index 82e0de098..36990017e 100644 --- a/showcase/gwt/src/main/java/org/patternfly/showcase/Environment.java +++ b/core/src/main/java/org/patternfly/style/NotificationStatus.java @@ -13,25 +13,31 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.patternfly.showcase; +package org.patternfly.style; -@SuppressWarnings({"FieldMayBeFinal", "unused"}) -public class Environment implements Settings { +public enum NotificationStatus implements TypedModifier { - // ------------------------------------------------------ factory + read("read"), - public static Environment env() { - return instance; - } + unread("unread"), + + attention("attention"); - private static Environment instance; + private final String value; + private final String modifier; - static { - instance = new Environment(); + NotificationStatus(String value) { + this.value = value; + this.modifier = Classes.modifier(value); } - // ------------------------------------------------------ instance + @Override + public String value() { + return value; + } - private Environment() { + @Override + public String modifier() { + return modifier; } } diff --git a/core/src/main/java/org/patternfly/style/Status.java b/core/src/main/java/org/patternfly/style/Status.java index fcb3f1c94..f495c814c 100644 --- a/core/src/main/java/org/patternfly/style/Status.java +++ b/core/src/main/java/org/patternfly/style/Status.java @@ -27,6 +27,17 @@ public enum Status implements TypedModifier { custom("custom"); + public static Status of(String status) { + return switch (status) { + case "danger" -> danger; + case "warning" -> warning; + case "success" -> success; + case "info" -> info; + case "custom" -> custom; + default -> throw new IllegalArgumentException("Invalid status: " + status); + }; + } + private final String value; private final String modifier; diff --git a/core/src/main/java/org/patternfly/style/TypedModifier.java b/core/src/main/java/org/patternfly/style/TypedModifier.java index 3780d37e5..c3c25abdd 100644 --- a/core/src/main/java/org/patternfly/style/TypedModifier.java +++ b/core/src/main/java/org/patternfly/style/TypedModifier.java @@ -25,7 +25,7 @@ public interface TypedModifier { * Swaps a typed modifier on an element builder. Swapping is done by removing all modifiers given as {@code values} and then * setting the new modifier given as {@code value}. */ - static > B swap(B builder, E element, + static > B swap(B builder, Element element, T value, T[] values) { if (values != null) { for (T v : values) { @@ -46,7 +46,7 @@ static * Swaps a typed modifier on an element builder. Swapping is done by removing the previous modifier, applying the current * modifier, and optionally performing an assignment. */ - static > B swap(B builder, E element, + static > B swap(B builder, Element element, T current, T previous, Runnable assignment) { if (previous != null && !previous.modifier().isEmpty()) { element.classList.remove(previous.modifier()); diff --git a/core/src/main/java/org/patternfly/style/Variables.java b/core/src/main/java/org/patternfly/style/Variables.java index 0ef9955cf..e1749b237 100644 --- a/core/src/main/java/org/patternfly/style/Variables.java +++ b/core/src/main/java/org/patternfly/style/Variables.java @@ -16,13 +16,12 @@ package org.patternfly.style; public interface Variables { + String Color = "Color"; String FlexBasis = "FlexBasis"; String GridTemplateColumns = "GridTemplateColumns"; String Height = "Height"; - String Left = "Left"; String LineClamp = "LineClamp"; - String MinWidth = "MinWidth"; String MaxWidth = "MaxWidth"; String MaxHeight = "MaxHeight"; String Order = "Order"; diff --git a/core/src/main/java/org/patternfly/style/package-info.java b/core/src/main/java/org/patternfly/style/package-info.java new file mode 100644 index 000000000..cc245cad2 --- /dev/null +++ b/core/src/main/java/org/patternfly/style/package-info.java @@ -0,0 +1,167 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Styling utilities including CSS classes, modifiers, breakpoints, and CSS variables. + * + *

This package provides programmatic access to PatternFly's CSS styling system. It includes utilities for + * applying modifier classes, working with responsive breakpoints, managing CSS variables, and using typed + * modifier interfaces for component styling. + * + *

Key Classes

+ * + *
    + *
  • {@link org.patternfly.style.Classes} - Constants for PatternFly CSS class names
  • + *
  • {@link org.patternfly.style.Modifiers} - Reusable modifier interfaces for common styling flags
  • + *
  • {@link org.patternfly.style.Breakpoint} - Responsive breakpoint definitions (sm, md, lg, xl, 2xl)
  • + *
  • {@link org.patternfly.style.Breakpoints} - Container for breakpoint-specific values
  • + *
  • {@link org.patternfly.style.Variable} - Type-safe CSS variable definitions
  • + *
  • {@link org.patternfly.style.Variables} - CSS variable assignments for components
  • + *
  • {@link org.patternfly.style.Color} - PatternFly color enumeration
  • + *
  • {@link org.patternfly.style.Size} - Size enumeration (default, sm, md, lg, xl, 2xl, 3xl, 4xl)
  • + *
+ * + *

CSS Classes

+ * + *

The {@link org.patternfly.style.Classes} class provides constants for PatternFly CSS classes: + * + * {@snippet : + * import static org.patternfly.style.Classes.*; + * + * // Base classes + * div().css(component("alert")) + * .add(div().css(component("alert", "title"))); + * + * // Modifier classes + * div().css(modifier("bordered"), modifier("compact")); + * } + * + *

Modifiers

+ * + *

The {@link org.patternfly.style.Modifiers} interface defines sub-interfaces for common styling flags. + * Components implement these interfaces to provide type-safe modifier methods: + * + * {@snippet : + * // Components implement modifier interfaces + * Card card = card() + * .bordered() // from Modifiers.Bordered + * .compact() // from Modifiers.Compact + * .fullHeight(); // from Modifiers.FullHeight + * + * // Toggle modifiers conditionally + * Alert alert = alert("Warning") + * .inline(isInlineMode) + * .plain(!hasIcon); + * } + * + *

Available modifier interfaces include: + *

    + *
  • {@code Bordered, Box, Center, Compact, Disabled}
  • + *
  • {@code Fill, FullHeight, FullWidth, Gutter}
  • + *
  • {@code Horizontal, Inline, Invalid}
  • + *
  • {@code NoFill, NoPadding, NoOffset}
  • + *
  • {@code Padding, PageInsets, Plain, Primary}
  • + *
  • {@code Readonly, Required, Secondary, Static, Sticky, Vertical}
  • + *
+ * + *

Responsive Breakpoints

+ * + *

Use {@link org.patternfly.style.Breakpoint} for responsive design: + * + * {@snippet : + * // Determine current breakpoint + * Breakpoint current = Breakpoint.breakpoint(window.innerWidth); + * + * // Apply breakpoint-specific styles + * if (current == Breakpoint.lg || current == Breakpoint.xl) { + * showDesktopLayout(); + * } + * + * // Use Breakpoints container for responsive values + * Breakpoints columns = new Breakpoints() + * .default_(1) + * .sm(2) + * .md(3) + * .lg(4); + * + * int cols = columns.get(current); + * } + * + *

CSS Variables

+ * + *

PatternFly uses CSS custom properties (variables) for theming. The {@link org.patternfly.style.Variable} + * class provides type-safe access: + * + * {@snippet : + * // Create a typed variable + * Variable colorVar = new Variable<>("--pf-v6-global--primary-color--100"); + * + * // Apply variables to elements + * Variables variables = new Variables(); + * variables.set(colorVar, "#0066cc"); + * element.style.cssText = variables.toCss(); + * } + * + *

Colors and Sizes

+ * + *

Use enum constants for consistent colors and sizes: + * + * {@snippet : + * // Colors + * Badge badge = badge("New") + * .color(Color.blue); + * + * Label label = label("Success") + * .color(Color.green); + * + * // Sizes + * Button button = button("Click me") + * .size(Size.lg); + * + * Title title = title(1, "Heading") + * .size(Size._2xl); + * } + * + *

Typed Modifiers

+ * + *

Use {@link org.patternfly.style.TypedModifier} for type-safe modifier application: + * + * {@snippet : + * TypedModifier sizeModifier = new TypedModifier<>( + * "size", + * size -> "pf-m-" + size.value + * ); + * + * // Apply to element + * element.classList.add(sizeModifier.modifier(Size.lg)); + * } + * + *

Additional Enums

+ * + *

The package includes enums for specific styling concerns: + *

    + *
  • {@link org.patternfly.style.Brightness} - Light/dark theme variants
  • + *
  • {@link org.patternfly.style.Status} - Status colors (success, warning, danger, info, custom)
  • + *
  • {@link org.patternfly.style.Orientation} - Horizontal/vertical orientation
  • + *
  • {@link org.patternfly.style.Sticky} - Sticky positioning (top/bottom)
  • + *
  • {@link org.patternfly.style.Visibility} - Element visibility states
  • + *
+ * + * @see org.patternfly.style.Classes + * @see org.patternfly.style.Modifiers + * @see org.patternfly.style.Breakpoint + * @see PatternFly Design Tokens + */ +package org.patternfly.style; \ No newline at end of file diff --git a/core/src/test/java/org/patternfly/filter/User.java b/core/src/test/java/org/patternfly/filter/User.java index 18643379e..bddd1462a 100644 --- a/core/src/test/java/org/patternfly/filter/User.java +++ b/core/src/test/java/org/patternfly/filter/User.java @@ -43,7 +43,7 @@ static List users() { .withGetterVisibility(Visibility.NONE) .withSetterVisibility(Visibility.NONE) .withCreatorVisibility(Visibility.NONE)); - return asList(mapper.readValue(User.class.getResource("users.json"), User[].class)); + return asList(mapper.readValue(User.class.getResourceAsStream("users.json"), User[].class)); } catch (IOException e) { System.err.println("Unable to read users.json: " + e.getMessage()); return emptyList(); diff --git a/core/version.java b/core/version.java new file mode 100755 index 000000000..e243a8940 --- /dev/null +++ b/core/version.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +///usr/bin/env jbang "$0" "$@" ; exit $? +//JAVA 24 +//JAVAC_OPTIONS --enable-preview -source 24 +//JAVA_OPTIONS --enable-preview + +void main(String... args) throws IOException { + if (args.length != 3) { + println("Wrong number of arguments: Provided " + args.length + ", required 3"); + println("Use version.java "); + System.exit(1); + } + + String basedir = args[0]; + String patternFlyJavaVersion = args[1]; + String patternFlyVersion = args[2]; + int dot = patternFlyVersion.indexOf('.'); + String patternFlyMajor = "v" + (dot >= 0 ? patternFlyVersion.substring(0, dot) : patternFlyVersion); + + String packageName = "org.patternfly.core"; + String className = "Version"; + String target = "src/main/java"; + Path targetPath = Path.of(basedir, target, packageName.replace('.', '/')); + Files.createDirectories(targetPath); + Path javaSource = targetPath.resolve(className + ".java"); + Files.deleteIfExists(javaSource); + + String content = String.join("\n", + "package " + packageName + ";", + "", + "import javax.annotation.processing.Generated;", + "", + "/*", + " * WARNING! This class is generated. Do not modify.", + " */", + "@Generated(\"version.java\")", + "public interface " + className + " {", + "", + " String PATTERN_FLY_JAVA_VERSION = \"" + patternFlyJavaVersion + "\";", + " String PATTERN_FLY_VERSION = \"" + patternFlyVersion + "\";", + " String PATTERN_FLY_MAJOR_VERSION = \"" + patternFlyMajor + "\";", + "}", + ""); + + Files.writeString(javaSource, content, StandardCharsets.UTF_8, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); + println("Generated Version.java using " + patternFlyJavaVersion + ", " + patternFlyVersion + ", " + patternFlyMajor); +} diff --git a/core/version.kts b/core/version.kts deleted file mode 100755 index 288981a69..000000000 --- a/core/version.kts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File - -import kotlin.io.path.Path -import kotlin.io.path.createDirectories - -import org.jetbrains.kotlin.maven.ExecuteKotlinScriptMojo - -// ------------------------------------------------------ init - -val mojo = ExecuteKotlinScriptMojo.INSTANCE -require(args.size == 3) { - mojo.getLog().error("Wrong number of arguments: Provided ${args.size}, required 3") - mojo.getLog().error("Use version.kts ") - System.exit(1) -} - -// ------------------------------------------------------ constants - -val packageName = "org.patternfly.core" -val className = "Version" -val target = "src/main/java" -val targetPath = Path(args[0], "$target/${packageName.replace('.', '/')}") -val patternFlyJavaVersion = args[1] -val patternFlyVersion = args[2] -val patternFlyMajor = "v${patternFlyVersion.substringBefore('.')}" - -// ------------------------------------------------------ main - -targetPath.createDirectories() -val javaSource = File(targetPath.toFile(), "$className.java") -if (javaSource.exists()) { - javaSource.delete() -} - -javaSource.appendText(""" - |package $packageName; - | - |import javax.annotation.processing.Generated; - | - |/* - | * WARNING! This class is generated. Do not modify. - | */ - |@Generated("version.kts") - |public interface $className { - | - | String PATTERN_FLY_JAVA_VERSION = "$patternFlyJavaVersion"; - | String PATTERN_FLY_VERSION = "$patternFlyVersion"; - | String PATTERN_FLY_MAJOR_VERSION = "$patternFlyMajor"; - |} - """.trimMargin()) - -mojo.getLog().info("Generated Version.java using $patternFlyJavaVersion, $patternFlyVersion, $patternFlyMajor") diff --git a/dependency-graph.dot b/dependency-graph.dot index 2cfeb9590..0d2df13b2 100644 --- a/dependency-graph.dot +++ b/dependency-graph.dot @@ -10,12 +10,15 @@ digraph "patternfly-java-parent" { "com.google.elemental2:elemental2-dom:compile"[shape="box",style="rounded",color="darkslateblue",fontname="Red Hat Display",fontsize="14",fontcolor="darkslateblue",label=<com.google.elemental2
elemental2-dom>] "com.google.elemental2:elemental2-webstorage:compile"[shape="box",style="rounded",color="darkslateblue",fontname="Red Hat Display",fontsize="14",fontcolor="darkslateblue",label=<com.google.elemental2
elemental2-webstorage>] "org.patternfly:patternfly-java-core:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-core>] + "org.jboss.elemento:elemento-logger:compile"[shape="box",style="rounded",color="darkgreen",fontname="Red Hat Display",fontsize="14",fontcolor="darkgreen",label=<org.jboss.elemento
elemento-logger>] "org.jboss.elemento:elemento-svg:compile"[shape="box",style="rounded",color="darkgreen",fontname="Red Hat Display",fontsize="14",fontcolor="darkgreen",label=<org.jboss.elemento
elemento-svg>] + "org.patternfly:patternfly-java-tokens:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-tokens>] + "org.patternfly:patternfly-java-charts:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-charts>] + "org.patternfly:patternfly-java-layouts:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-layouts>] "org.patternfly:patternfly-java-icons:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-icons>] "org.patternfly:patternfly-java-components:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-components>] "org.patternfly:patternfly-java-codeeditor:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-codeeditor>] "org.patternfly:patternfly-java-finder:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-finder>] - "org.patternfly:patternfly-java-layouts:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-layouts>] "org.patternfly:patternfly-java-gwt:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-gwt>] "org.gwtproject:gwt-user:compile"[shape="box",style="rounded",color="darkred",fontname="Red Hat Display",fontsize="14",fontcolor="darkred",label=<org.gwtproject
gwt-user>] "org.patternfly:patternfly-java-j2cl:compile"[shape="box",style="filled,bold,rounded",fillcolor="#E7F1FA",fontname="Red Hat Display",fontsize="14",label=<org.patternfly
patternfly-java-j2cl>] @@ -26,15 +29,18 @@ digraph "patternfly-java-parent" { "org.jboss.elemento:elemento-core:compile" -> "com.google.elemental2:elemental2-dom:compile" "org.jboss.elemento:elemento-core:compile" -> "com.google.elemental2:elemental2-webstorage:compile" "org.patternfly:patternfly-java-core:compile" -> "org.jboss.elemento:elemento-core:compile" + "org.patternfly:patternfly-java-core:compile" -> "org.jboss.elemento:elemento-logger:compile" "org.patternfly:patternfly-java-core:compile" -> "org.jboss.elemento:elemento-svg:compile" + "org.patternfly:patternfly-java-tokens:compile" -> "org.patternfly:patternfly-java-core:compile" + "org.patternfly:patternfly-java-charts:compile" -> "org.patternfly:patternfly-java-tokens:compile" + "org.patternfly:patternfly-java-layouts:compile" -> "org.patternfly:patternfly-java-core:compile" "org.patternfly:patternfly-java-icons:compile" -> "org.patternfly:patternfly-java-core:compile" + "org.patternfly:patternfly-java-components:compile" -> "org.patternfly:patternfly-java-layouts:compile" "org.patternfly:patternfly-java-components:compile" -> "org.patternfly:patternfly-java-icons:compile" + "org.patternfly:patternfly-java-components:compile" -> "org.patternfly:patternfly-java-tokens:compile" "org.patternfly:patternfly-java-codeeditor:compile" -> "org.patternfly:patternfly-java-components:compile" "org.patternfly:patternfly-java-finder:compile" -> "org.patternfly:patternfly-java-components:compile" - "org.patternfly:patternfly-java-layouts:compile" -> "org.patternfly:patternfly-java-core:compile" "org.patternfly:patternfly-java-gwt:compile" -> "org.patternfly:patternfly-java-components:compile" - "org.patternfly:patternfly-java-gwt:compile" -> "org.patternfly:patternfly-java-layouts:compile" "org.patternfly:patternfly-java-gwt:compile" -> "org.gwtproject:gwt-user:compile" "org.patternfly:patternfly-java-j2cl:compile" -> "org.patternfly:patternfly-java-components:compile" - "org.patternfly:patternfly-java-j2cl:compile" -> "org.patternfly:patternfly-java-layouts:compile" } \ No newline at end of file diff --git a/dependency-graph.png b/dependency-graph.png index 54a7ee6f1..1ddab9663 100644 Binary files a/dependency-graph.png and b/dependency-graph.png differ diff --git a/dev.sh b/dev.sh deleted file mode 100755 index 100328624..000000000 --- a/dev.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2023 Red Hat -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -# -------------------------------------------------- -# -# Starts the GWT/J2CL development mode for the showcase -# -# -------------------------------------------------- - -set -Eeuo pipefail -trap cleanup SIGINT SIGTERM ERR EXIT - -VERSION=0.0.1 - -# Change into the script's directory -# Using relative paths is safe! -script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) -readonly script_dir -cd "${script_dir}" - -usage() { - cat < - -FLAGS: - -c, --clean Adds the 'clean' goal - -h, --help Prints help information - -v, --version Prints version information - --no-color Uses plain text output - -ARGS: - One of 'gwt' or 'j2cl' -EOF - exit -} - -cleanup() { - trap - SIGINT SIGTERM ERR EXIT -} - -setup_colors() { - if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then - NOFORMAT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m' - else - # shellcheck disable=SC2034 - NOFORMAT='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW='' - fi -} - -msg() { - echo >&2 -e "${1-}" -} - -die() { - local msg=$1 - local code=${2-1} # default exit status 1 - msg "$msg" - exit "$code" -} - -version() { - msg "${BASH_SOURCE[0]} $VERSION" - exit 0 -} - -parse_params() { - CLEAN="" - while :; do - case "${1-}" in - -c | --clean) CLEAN=clean ;; - -h | --help) usage ;; - -v | --version) version ;; - --no-color) NO_COLOR=1 ;; - -?*) die "Unknown option: $1" ;; - *) break ;; - esac - shift - done - - ARGS=("$@") - [[ ${#ARGS[@]} -eq 1 ]] || die "Missing mode. Please use one of 'gwt' or 'j2cl'" - MODE=${ARGS[0]} - [[ "${MODE}" =~ ^(gwt|j2cl)$ ]] || die "Wrong mode. Please use one of 'gwt' or 'j2cl'" - return 0 -} - -parse_params "$@" -setup_colors - -if [[ "${MODE}" == "gwt" ]]; then - msg "Prepare ${YELLOW}GWT${NOFORMAT} development mode..." - mvn -D quickly --projects org.patternfly:patternfly-java-showcase-common --also-make -P showcase ${CLEAN} install - cd showcase/gwt - msg "Start ${YELLOW}GWT${NOFORMAT} development mode..." - mvn gwt:devmode -else - msg "Start ${YELLOW}J2CL${NOFORMAT} development mode..." - mvn -D quickly --projects org.patternfly:patternfly-java-showcase-j2cl --also-make -P showcase ${CLEAN} compile j2cl:watch -fi diff --git a/extensions/codeeditor/pom.xml b/extensions/codeeditor/pom.xml index 1887431d5..cbdb7d478 100644 --- a/extensions/codeeditor/pom.xml +++ b/extensions/codeeditor/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../../code-parent/pom.xml diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorAction.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorAction.java index d9dc96bdf..a83a10861 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorAction.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorAction.java @@ -75,7 +75,7 @@ public static CodeEditorAction codeEditorCopyToClipboardAction(String copyText, // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cea"; + public static final String SUB_COMPONENT_NAME = "cea"; private final Button button; private ComponentHandler handler; diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorActions.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorActions.java index bb077c2a4..012e7af83 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorActions.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorActions.java @@ -33,7 +33,7 @@ public static CodeEditorActions codeEditorActions() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ceas"; + public static final String SUB_COMPONENT_NAME = "ceas"; CodeEditorActions() { super(SUB_COMPONENT_NAME, div().css(component(Classes.codeEditor, controls)).element()); diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeader.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeader.java index 9e8296000..3d232b33a 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeader.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeader.java @@ -16,6 +16,7 @@ package org.patternfly.extension.codeeditor; import org.patternfly.style.Classes; +import org.patternfly.style.Modifiers; import elemental2.dom.HTMLDivElement; @@ -23,7 +24,8 @@ import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.header; -public class CodeEditorHeader extends CodeEditorSubComponent { +public class CodeEditorHeader extends CodeEditorSubComponent + implements Modifiers.Plain { // ------------------------------------------------------ factory @@ -33,7 +35,7 @@ public static CodeEditorHeader codeEditorHeader() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ceh"; + public static final String SUB_COMPONENT_NAME = "ceh"; CodeEditorHeader() { super(SUB_COMPONENT_NAME, div().css(component(Classes.codeEditor, header)).element()); diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeaderMain.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeaderMain.java index 89fa67bc8..f8d28d092 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeaderMain.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorHeaderMain.java @@ -15,7 +15,7 @@ */ package org.patternfly.extension.codeeditor; -import org.patternfly.component.WithText; +import org.jboss.elemento.ElementTextMethods; import elemental2.dom.HTMLDivElement; @@ -26,7 +26,8 @@ import static org.patternfly.style.Classes.main; public class CodeEditorHeaderMain extends - CodeEditorSubComponent implements WithText { + CodeEditorSubComponent implements + ElementTextMethods { // ------------------------------------------------------ factory @@ -36,7 +37,7 @@ public static CodeEditorHeaderMain codeEditorHeaderMain() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cehm"; + public static final String SUB_COMPONENT_NAME = "cehm"; CodeEditorHeaderMain() { super(SUB_COMPONENT_NAME, div().css(component(codeEditor, header, main)).element()); diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLink.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLink.java index d86b4ba37..00126fb3c 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLink.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLink.java @@ -43,7 +43,7 @@ public static CodeEditorLink codeEditorViewShortcutsLink() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cel"; + public static final String SUB_COMPONENT_NAME = "cel"; private final HTMLElement buttonElement; diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLinks.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLinks.java index 5706dcec6..bb6ddf684 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLinks.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorLinks.java @@ -34,7 +34,7 @@ public static CodeEditorLinks codeEditorLinks() { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cels"; + public static final String SUB_COMPONENT_NAME = "cels"; CodeEditorLinks() { super(SUB_COMPONENT_NAME, div().css(component(Classes.codeEditor, keyboard, shortcuts)).element()); diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTab.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTab.java index f56f2c2bb..06c6491b1 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTab.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTab.java @@ -49,7 +49,7 @@ public static CodeEditorTab codeEditorTab(Element icon, String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cet"; + public static final String SUB_COMPONENT_NAME = "cet"; CodeEditorTab() { super(SUB_COMPONENT_NAME, div().css(component(codeEditor, tab)).element()); diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabIcon.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabIcon.java index 4b960eacf..df205e391 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabIcon.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabIcon.java @@ -44,7 +44,7 @@ public static CodeEditorTabIcon codeEditorTabIcon(Element icon) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "ceti"; + public static final String SUB_COMPONENT_NAME = "ceti"; CodeEditorTabIcon(Element icon) { super(SUB_COMPONENT_NAME, span().css(component(codeEditor, tab, Classes.icon)).element()); diff --git a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabText.java b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabText.java index 880a3e752..22f604863 100644 --- a/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabText.java +++ b/extensions/codeeditor/src/main/java/org/patternfly/extension/codeeditor/CodeEditorTabText.java @@ -15,7 +15,7 @@ */ package org.patternfly.extension.codeeditor; -import org.patternfly.component.WithText; +import org.jboss.elemento.ElementTextMethods; import org.patternfly.style.Classes; import elemental2.dom.HTMLElement; @@ -26,7 +26,7 @@ import static org.patternfly.style.Classes.tab; public class CodeEditorTabText extends CodeEditorSubComponent - implements WithText { + implements ElementTextMethods { // ------------------------------------------------------ factory @@ -40,7 +40,7 @@ public static CodeEditorTabText codeEditorTabText(String text) { // ------------------------------------------------------ instance - static final String SUB_COMPONENT_NAME = "cett"; + public static final String SUB_COMPONENT_NAME = "cett"; CodeEditorTabText() { super(SUB_COMPONENT_NAME, span().css(component(codeEditor, tab, Classes.text)).element()); diff --git a/extensions/finder/pom.xml b/extensions/finder/pom.xml index 05e4c34f1..52d0470b4 100644 --- a/extensions/finder/pom.xml +++ b/extensions/finder/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../../code-parent/pom.xml diff --git a/format.sh b/format.sh index 1c53cb245..212ea1e1f 100755 --- a/format.sh +++ b/format.sh @@ -95,7 +95,7 @@ parse_params() { parse_params "$@" setup_colors -mvn \ +mvn -P showcase \ com.mycila:license-maven-plugin:format \ org.ec4j.maven:editorconfig-maven-plugin:format \ net.revelc.code:impsort-maven-plugin:sort diff --git a/gwt/pom.xml b/gwt/pom.xml index 9bd5d9a9f..f1dc7b397 100644 --- a/gwt/pom.xml +++ b/gwt/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml diff --git a/gwt/src/main/java/org/patternfly/PatternFly.java b/gwt/src/main/java/org/patternfly/PatternFly.java index 2aba8dd1d..74006ed2f 100644 --- a/gwt/src/main/java/org/patternfly/PatternFly.java +++ b/gwt/src/main/java/org/patternfly/PatternFly.java @@ -20,7 +20,6 @@ public class PatternFly implements EntryPoint { - @SuppressWarnings("SpellCheckingInspection") // Code from https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js // with special GWT export code at the end of the IIFE private static final String POPPER_JS = "/**\n" + diff --git a/icons/package-lock.json b/icons/package-lock.json index 331c8d749..6d5415130 100644 --- a/icons/package-lock.json +++ b/icons/package-lock.json @@ -9,419 +9,10 @@ "@fortawesome/free-brands-svg-icons": "^5", "@fortawesome/free-regular-svg-icons": "^5", "@fortawesome/free-solid-svg-icons": "^5", - "@patternfly/patternfly": "^6.0.0", - "@patternfly/react-icons": "^6.0.0", - "@types/node": "^22.9.3", - "camelcase": "^8.0.0", - "tsx": "^4.19.2" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", - "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", - "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", - "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", - "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", - "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", - "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", - "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", - "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", - "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", - "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", - "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", - "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", - "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", - "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", - "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", - "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", - "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", - "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", - "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", - "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", - "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", - "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", - "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" + "@patternfly/patternfly": "^6.2.3", + "@patternfly/react-icons": "^6.2.2", + "@types/node": "^22.15.3", + "camelcase": "^8.0.0" } }, "node_modules/@fortawesome/fontawesome-common-types": { @@ -470,16 +61,16 @@ } }, "node_modules/@patternfly/patternfly": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.0.0.tgz", - "integrity": "sha512-Mn92Tt/4okSj1COGCJrgUgh390OOaFCWf0tL0WmigDNUecSHNn1D6Vhpd1hxHQBXvre9eWorzxV2b9yhSEl79Q==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.2.3.tgz", + "integrity": "sha512-FR027W7JygcQpvlRU/Iom936Vm0apzfi2o5lvtlcWW6IaeZCCTtTaDxehoYuELHlemzkLziQAgu6LuCJEVayjw==", "dev": true, "license": "MIT" }, "node_modules/@patternfly/react-icons": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-6.0.0.tgz", - "integrity": "sha512-ZFrsBVKrAp0DZrPOss98OA/EVUL4F0frXhR1uBId9+3ZrRArdKTgYgmQUCeSzMbxnSlxpmm3a2L05XQ36VUVbw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-6.2.2.tgz", + "integrity": "sha512-XkBwzuV/uiolX+T6QgB3RIqphM1m+vAZjAe3McYtyY22j1rsOdlWDE4RtRrJ1q7EoIZwyZHj0h8T9vMfUsLn4Q==", "dev": true, "license": "MIT", "peerDependencies": { @@ -488,13 +79,13 @@ } }, "node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", + "version": "22.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", + "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.21.0" } }, "node_modules/camelcase": { @@ -508,78 +99,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esbuild": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/loose-envify": { "version": "1.4.0", @@ -587,7 +112,6 @@ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -624,51 +148,20 @@ "react": "^18.3.1" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" } }, - "node_modules/tsx": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", - "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.23.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" } diff --git a/icons/package.json b/icons/package.json index 58b15b05d..63b447832 100644 --- a/icons/package.json +++ b/icons/package.json @@ -9,10 +9,9 @@ "@fortawesome/free-brands-svg-icons": "^5", "@fortawesome/free-regular-svg-icons": "^5", "@fortawesome/free-solid-svg-icons": "^5", - "@patternfly/patternfly": "^6.0.0", - "@patternfly/react-icons": "^6.0.0", - "@types/node": "^22.9.3", - "camelcase": "^8.0.0", - "tsx": "^4.19.2" + "@patternfly/patternfly": "^6.2.3", + "@patternfly/react-icons": "^6.2.2", + "@types/node": "^22.15.3", + "camelcase": "^8.0.0" } } diff --git a/icons/pom.xml b/icons/pom.xml index 803c4e737..2fb39f228 100644 --- a/icons/pom.xml +++ b/icons/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml diff --git a/icons/src/main/java/org/patternfly/icon/IconSpecs.java b/icons/src/main/java/org/patternfly/icon/IconSpecs.java index 49d96ca1e..7599b4299 100644 --- a/icons/src/main/java/org/patternfly/icon/IconSpecs.java +++ b/icons/src/main/java/org/patternfly/icon/IconSpecs.java @@ -18,7 +18,7 @@ * @see https://www.patternfly.org/design-foundations/icons/ * @see https://fontawesome.com/icons?d=gallery&m=free */ -@Generated("generate.ts") +@Generated("generate.mjs") @SuppressWarnings("SpellCheckingInspection") // WARNING: This class is generated. Do not modify. public interface IconSpecs { diff --git a/icons/src/main/java/org/patternfly/icon/PredefinedIcon.java b/icons/src/main/java/org/patternfly/icon/PredefinedIcon.java index 851248a3e..daf8486de 100644 --- a/icons/src/main/java/org/patternfly/icon/PredefinedIcon.java +++ b/icons/src/main/java/org/patternfly/icon/PredefinedIcon.java @@ -49,6 +49,40 @@ public final class PredefinedIcon implements SVGElementDataMethods, SVGElementStyleMethods { + // ------------------------------------------------------ factory + + /** + * Constructs a predefined SVG icon based on the provided icon name. The method supports multiple icon groups, such as + * "fab", "far", "fas", and "patternfly". If the name contains a group prefix (e.g., "fab.iconName"), the method will use + * that group; otherwise, it defaults to the "fas" group. + *

+ * Normally you should use the static methods from {@link IconSets} to get predefined icons. Only use this method if you + * need to get an icon based on the icon name provided as string. + * + * @param name the name of the icon, optionally prefixed with the group name (e.g., "fab.iconName"). If no group is + * specified, "fas" is used by default. + * @return a {@code PredefinedIcon} instance representing the specified icon. + * @throws IllegalArgumentException if the group or icon name is unknown. + */ + public static PredefinedIcon predefinedIcon(String name) { + String group = "fas"; + String iconName = name; + if (name.contains(".")) { + group = name.substring(0, name.indexOf('.')); + iconName = name.substring(name.indexOf('.') + 1); + } + IconSpec iconSpec = switch (group) { + case "fab" -> IconSpecs.fab.valueOf(iconName).iconSpec; + case "far" -> IconSpecs.far.valueOf(iconName).iconSpec; + case "fas" -> IconSpecs.fas.valueOf(iconName).iconSpec; + case "patternfly" -> IconSpecs.patternfly.valueOf(iconName).iconSpec; + default -> throw new IllegalArgumentException("Unknown icon group/name: '" + name + "'"); + }; + return new PredefinedIcon(iconSpec); + } + + // ------------------------------------------------------ instance + public final IconSpec iconSpec; private final SVGElement element; diff --git a/icons/src/main/java/org/patternfly/icon/package-info.java b/icons/src/main/java/org/patternfly/icon/package-info.java new file mode 100644 index 000000000..3e3c30c1e --- /dev/null +++ b/icons/src/main/java/org/patternfly/icon/package-info.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Provides classes and interfaces for working with predefined SVG icons in PatternFly Java. + *

+ * PatternFly Java comes with predefined icons from multiple icon sets: + *

+ * + *

Usage

+ *

+ * The {@link org.patternfly.icon.IconSets} interface provides static factory methods to easily access these icons. + * Icons are returned as instances of {@link org.patternfly.icon.PredefinedIcon}, which extends SVG builder interfaces + * and allows easy customization of the icon's SVG element. + *

+ *

+ * Components that support icons typically implement the {@code ComponentIcon} or {@code ComponentIconAndText} interfaces + * and use a common API for icon integration. + *

+ * + *

Example

+ *

+ * The following example demonstrates using icons with a description list component: + *

+ * {@snippet : + * import static org.patternfly.component.IconPosition.start; + * import static org.patternfly.icon.IconSets.fas.book; + * import static org.patternfly.icon.IconSets.fas.cube; + * import static org.patternfly.icon.IconSets.fas.flag; + * import static org.patternfly.icon.IconSets.fas.globe; + * import static org.patternfly.icon.IconSets.fas.plusCircle; + * import static org.patternfly.icon.IconSets.patternfly.key; + * + * DescriptionList dl = descriptionList() + * .addGroup(descriptionListGroup() + * .addTerm(descriptionListTerm("Name").icon(cube())) + * .addDescription(descriptionListDescription("Example"))) + * .addGroup(descriptionListGroup() + * .addTerm(descriptionListTerm("Namespace").icon(book())) + * .addDescription(descriptionListDescription() + * .add(a("#").textContent("mary-test")))) + * .addGroup(descriptionListGroup() + * .addTerm(descriptionListTerm("Labels").icon(key())) + * .addDescription(descriptionListDescription("example"))) + * .addGroup(descriptionListGroup() + * .addTerm(descriptionListTerm("Pod selector").icon(globe())) + * .addDescription(descriptionListDescription() + * .add(button().iconAndText(plusCircle(), "app=MyApp", start) + * .inline().link()))) + * .addGroup(descriptionListGroup() + * .addTerm(descriptionListTerm("Annotation").icon(flag())) + * .addDescription(descriptionListDescription("2 annotations"))); + * } + * + *

Dynamic Icon Loading

+ *

+ * If you need to load an icon based on a string name, use {@link org.patternfly.icon.PredefinedIcon#predefinedIcon(String)}. + * The name can optionally include the icon set prefix (e.g., "fab.github" or "patternfly.user"). If no prefix is specified, + * the "fas" (FontAwesome solid) icon set is used by default. + *

+ * + * @see org.patternfly.icon.IconSets + * @see org.patternfly.icon.PredefinedIcon + * @see org.patternfly.icon.IconSpec + * @see PatternFly Icons + */ +package org.patternfly.icon; \ No newline at end of file diff --git a/icons/src/scripts/generate.mjs b/icons/src/scripts/generate.mjs index c2234f252..4cca5aea3 100644 --- a/icons/src/scripts/generate.mjs +++ b/icons/src/scripts/generate.mjs @@ -14,7 +14,7 @@ * limitations under the License. */ import camelCase from "camelcase"; -import {writeFile} from "node:fs/promises"; +import {mkdir, writeFile} from "node:fs/promises"; import {fab, far, fas} from "./faIcons.mjs"; import {patternfly} from "./pfIcons.mjs"; @@ -47,7 +47,7 @@ import javax.annotation.processing.Generated; * @see https://www.patternfly.org/design-foundations/icons/ * @see https://fontawesome.com/icons?d=gallery&m=free */ -@Generated("generate.ts") +@Generated("generate.mjs") @SuppressWarnings("SpellCheckingInspection") // WARNING: This class is generated. Do not modify. public interface IconSpecs { @@ -123,6 +123,7 @@ const iconCount = iconSets .map(iconSet => Object.keys(iconSet.icons).length) .reduce((acc, cur) => acc + cur, 0); const dir = new URL(`${root}/${path}/`, import.meta.url); +await mkdir(dir, { recursive: true }); await writeFile(new URL("./IconSpecs.java", dir), generateIconSpecs(iconSets), "utf8"); await writeFile(new URL("./IconSets.java", dir), generateIconSets(iconSets), "utf8"); console.info(`Generated code for ${iconCount} icons`); diff --git a/j2cl/pom.xml b/j2cl/pom.xml index 3aa00e23b..e38863ae2 100644 --- a/j2cl/pom.xml +++ b/j2cl/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml diff --git a/layouts/pom.xml b/layouts/pom.xml index fa3885f0b..6417cdc1c 100644 --- a/layouts/pom.xml +++ b/layouts/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml diff --git a/layouts/src/main/java/org/patternfly/layout/BaseLayout.java b/layouts/src/main/java/org/patternfly/layout/BaseLayout.java index 9eca9d2c3..9382bb67c 100644 --- a/layouts/src/main/java/org/patternfly/layout/BaseLayout.java +++ b/layouts/src/main/java/org/patternfly/layout/BaseLayout.java @@ -30,8 +30,10 @@ import org.jboss.elemento.TypedBuilder; import elemental2.dom.HTMLElement; +import jsinterop.base.Js; import static java.util.Objects.requireNonNull; +import static org.patternfly.core.Ouia.ouia; public abstract class BaseLayout> implements Layout, @@ -48,14 +50,23 @@ public abstract class BaseLayout, HTMLElementVisibilityMethods { + private final LayoutType layoutType; private final E element; - protected BaseLayout(E element) { - this.element = requireNonNull(element, "element required"); + protected BaseLayout(LayoutType layoutType, E element) { + this.layoutType = requireNonNull(layoutType, "layout type required"); + this.element = Js.uncheckedCast(requireNonNull(element, "element required")); + ouia(element, layoutType.id, layoutType.layoutName); } @Override public E element() { return element; } + + @Override + public LayoutType layoutType() { + return layoutType; + } + } diff --git a/layouts/src/main/java/org/patternfly/layout/Layout.java b/layouts/src/main/java/org/patternfly/layout/Layout.java index 094b503fb..c82c7e6d8 100644 --- a/layouts/src/main/java/org/patternfly/layout/Layout.java +++ b/layouts/src/main/java/org/patternfly/layout/Layout.java @@ -16,4 +16,6 @@ package org.patternfly.layout; public interface Layout { + + LayoutType layoutType(); } diff --git a/layouts/src/main/java/org/patternfly/layout/LayoutType.java b/layouts/src/main/java/org/patternfly/layout/LayoutType.java new file mode 100644 index 000000000..472712330 --- /dev/null +++ b/layouts/src/main/java/org/patternfly/layout/LayoutType.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.layout; + +public enum LayoutType { + + Bullseye("be", "PF6/Layout/Bullseye"), + + Flex("fx", "PF6/Layout/Flex"), + + Gallery("gy", "PF6/Layout/Gallery"), + + Grid("gr", "PF6/Layout/Grid"), + + Level("lv", "PF6/Layout/Level"), + + Split("sp", "PF6/Layout/Split"), + + Stack("st", "PF6/Layout/Stack"), + ; + + public final String id; + public final String layoutName; + + LayoutType(String id, String layoutName) { + this.id = id; + this.layoutName = layoutName; + } +} diff --git a/layouts/src/main/java/org/patternfly/layout/SubLayout.java b/layouts/src/main/java/org/patternfly/layout/SubLayout.java new file mode 100644 index 000000000..22673945c --- /dev/null +++ b/layouts/src/main/java/org/patternfly/layout/SubLayout.java @@ -0,0 +1,69 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.layout; + +import org.jboss.elemento.ElementAttributeMethods; +import org.jboss.elemento.ElementClassListMethods; +import org.jboss.elemento.ElementConsumerMethods; +import org.jboss.elemento.ElementContainerMethods; +import org.jboss.elemento.ElementEventMethods; +import org.jboss.elemento.ElementIdMethods; +import org.jboss.elemento.ElementQueryMethods; +import org.jboss.elemento.ElementTextMethods; +import org.jboss.elemento.HTMLElementAttributeMethods; +import org.jboss.elemento.HTMLElementDataMethods; +import org.jboss.elemento.HTMLElementStyleMethods; +import org.jboss.elemento.HTMLElementVisibilityMethods; +import org.jboss.elemento.Id; +import org.jboss.elemento.TypedBuilder; + +import elemental2.dom.HTMLElement; + +import static java.util.Objects.requireNonNull; + +public abstract class SubLayout> implements + ElementAttributeMethods, + ElementClassListMethods, + ElementContainerMethods, + ElementConsumerMethods, + ElementEventMethods, + ElementIdMethods, + ElementQueryMethods, + ElementTextMethods, + HTMLElementAttributeMethods, + HTMLElementDataMethods, + HTMLElementStyleMethods, + HTMLElementVisibilityMethods { + + final LayoutType layoutType; + final String name; + private final E element; + + protected SubLayout(LayoutType layoutType, String name, E element) { + this.layoutType = requireNonNull(layoutType, "layout type required"); + this.name = requireNonNull(name, "name required"); + this.element = requireNonNull(element, "element required"); + } + + protected String subLayoutId() { + return Id.build(layoutType.id, name); + } + + @Override + public E element() { + return element; + } +} diff --git a/layouts/src/main/java/org/patternfly/layout/bullseye/Bullseye.java b/layouts/src/main/java/org/patternfly/layout/bullseye/Bullseye.java index 3675767f1..626df8b0e 100644 --- a/layouts/src/main/java/org/patternfly/layout/bullseye/Bullseye.java +++ b/layouts/src/main/java/org/patternfly/layout/bullseye/Bullseye.java @@ -17,6 +17,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import elemental2.dom.HTMLElement; @@ -44,7 +45,7 @@ public static Bullseye bullseye(HTMLContainerBuilder // ------------------------------------------------------ instance Bullseye(HTMLContainerBuilder builder) { - super(builder.css(layout(bullseye)).element()); + super(LayoutType.Bullseye, builder.css(layout(bullseye)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/bullseye/BullseyeItem.java b/layouts/src/main/java/org/patternfly/layout/bullseye/BullseyeItem.java index 0fcc9442a..f4d75536d 100644 --- a/layouts/src/main/java/org/patternfly/layout/bullseye/BullseyeItem.java +++ b/layouts/src/main/java/org/patternfly/layout/bullseye/BullseyeItem.java @@ -16,7 +16,8 @@ package org.patternfly.layout.bullseye; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import elemental2.dom.HTMLElement; @@ -25,7 +26,7 @@ import static org.patternfly.style.Classes.item; import static org.patternfly.style.Classes.layout; -public class BullseyeItem extends BaseLayout { +public class BullseyeItem extends SubLayout { // ------------------------------------------------------ factory @@ -39,8 +40,10 @@ public static BullseyeItem bullseyeItem(HTMLContainerBui // ------------------------------------------------------ instance + public static final String SUB_LAYOUT_NAME = "bei"; + BullseyeItem(HTMLContainerBuilder builder) { - super(builder.css(layout(bullseye, item)).element()); + super(LayoutType.Bullseye, SUB_LAYOUT_NAME, builder.css(layout(bullseye, item)).element()); } // ------------------------------------------------------ builder diff --git a/layouts/src/main/java/org/patternfly/layout/flex/Flex.java b/layouts/src/main/java/org/patternfly/layout/flex/Flex.java index c592f1392..ea4e709af 100644 --- a/layouts/src/main/java/org/patternfly/layout/flex/Flex.java +++ b/layouts/src/main/java/org/patternfly/layout/flex/Flex.java @@ -19,6 +19,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import org.patternfly.style.Breakpoint; import org.patternfly.style.BreakpointCollector; import org.patternfly.style.Breakpoints; @@ -57,7 +58,7 @@ public static Flex flex(HTMLContainerBuilder builder) // ------------------------------------------------------ instance Flex(HTMLContainerBuilder builder) { - super(builder.css(layout(flex)).element()); + super(LayoutType.Flex, builder.css(layout(flex)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/flex/FlexItem.java b/layouts/src/main/java/org/patternfly/layout/flex/FlexItem.java index 82ef7239c..ded54d67e 100644 --- a/layouts/src/main/java/org/patternfly/layout/flex/FlexItem.java +++ b/layouts/src/main/java/org/patternfly/layout/flex/FlexItem.java @@ -18,7 +18,8 @@ import java.util.EnumSet; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import org.patternfly.style.Breakpoint; import org.patternfly.style.BreakpointCollector; import org.patternfly.style.Breakpoints; @@ -35,7 +36,7 @@ import static org.patternfly.style.Variable.componentVar; import static org.patternfly.style.Variables.Order; -public class FlexItem extends BaseLayout { +public class FlexItem extends SubLayout { // ------------------------------------------------------ factory @@ -49,8 +50,10 @@ public static FlexItem flexItem(HTMLContainerBuilder // ------------------------------------------------------ instance + public static final String SUB_LAYOUT_NAME = "fxi"; + FlexItem(HTMLContainerBuilder builder) { - super(builder.css(layout(flex, item)).element()); + super(LayoutType.Flex, SUB_LAYOUT_NAME, builder.css(layout(flex, item)).element()); } // ------------------------------------------------------ builder diff --git a/layouts/src/main/java/org/patternfly/layout/gallery/Gallery.java b/layouts/src/main/java/org/patternfly/layout/gallery/Gallery.java index 4037cd9fa..d0ae0786c 100644 --- a/layouts/src/main/java/org/patternfly/layout/gallery/Gallery.java +++ b/layouts/src/main/java/org/patternfly/layout/gallery/Gallery.java @@ -20,6 +20,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.core.Tuple; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import org.patternfly.style.Breakpoint; import org.patternfly.style.Modifiers.Gutter; @@ -53,7 +54,7 @@ public static Gallery gallery(HTMLContainerBuilder bu // ------------------------------------------------------ instance Gallery(HTMLContainerBuilder builder) { - super(builder.css(layout(gallery)).element()); + super(LayoutType.Gallery, builder.css(layout(gallery)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/gallery/GalleryItem.java b/layouts/src/main/java/org/patternfly/layout/gallery/GalleryItem.java index 527f98c0d..763ff54a5 100644 --- a/layouts/src/main/java/org/patternfly/layout/gallery/GalleryItem.java +++ b/layouts/src/main/java/org/patternfly/layout/gallery/GalleryItem.java @@ -16,7 +16,8 @@ package org.patternfly.layout.gallery; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import elemental2.dom.HTMLElement; @@ -25,7 +26,7 @@ import static org.patternfly.style.Classes.item; import static org.patternfly.style.Classes.layout; -public class GalleryItem extends BaseLayout { +public class GalleryItem extends SubLayout { // ------------------------------------------------------ factory @@ -39,8 +40,10 @@ public static GalleryItem galleryItem(HTMLContainerBuild // ------------------------------------------------------ instance + public static final String SUB_LAYOUT_NAME = "gyi"; + GalleryItem(HTMLContainerBuilder builder) { - super(builder.css(layout(gallery, item)).element()); + super(LayoutType.Gallery, SUB_LAYOUT_NAME, builder.css(layout(gallery, item)).element()); } // ------------------------------------------------------ builder diff --git a/layouts/src/main/java/org/patternfly/layout/grid/Grid.java b/layouts/src/main/java/org/patternfly/layout/grid/Grid.java index cb4063216..63bfdd72b 100644 --- a/layouts/src/main/java/org/patternfly/layout/grid/Grid.java +++ b/layouts/src/main/java/org/patternfly/layout/grid/Grid.java @@ -19,6 +19,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import org.patternfly.style.Breakpoints; import org.patternfly.style.Modifiers.Gutter; @@ -56,7 +57,7 @@ public static Grid grid(HTMLContainerBuilder builder) // ------------------------------------------------------ instance Grid(HTMLContainerBuilder builder) { - super(builder.css(layout(grid)).element()); + super(LayoutType.Grid, builder.css(layout(grid)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/grid/GridItem.java b/layouts/src/main/java/org/patternfly/layout/grid/GridItem.java index 90214c3e1..5428ef78c 100644 --- a/layouts/src/main/java/org/patternfly/layout/grid/GridItem.java +++ b/layouts/src/main/java/org/patternfly/layout/grid/GridItem.java @@ -16,7 +16,8 @@ package org.patternfly.layout.grid; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import org.patternfly.style.Breakpoints; import elemental2.dom.HTMLElement; @@ -32,7 +33,7 @@ import static org.patternfly.style.Variable.componentVar; import static org.patternfly.style.Variables.Order; -public class GridItem extends BaseLayout { +public class GridItem extends SubLayout { // ------------------------------------------------------ factory @@ -46,8 +47,10 @@ public static GridItem gridItem(HTMLContainerBuilder // ------------------------------------------------------ instance + public static final String SUB_LAYOUT_NAME = "gri"; + GridItem(HTMLContainerBuilder builder) { - super(builder.css(layout(grid, item)).element()); + super(LayoutType.Grid, SUB_LAYOUT_NAME, builder.css(layout(grid, item)).element()); } // ------------------------------------------------------ builder diff --git a/layouts/src/main/java/org/patternfly/layout/level/Level.java b/layouts/src/main/java/org/patternfly/layout/level/Level.java index a68571a19..a94f9f0a9 100644 --- a/layouts/src/main/java/org/patternfly/layout/level/Level.java +++ b/layouts/src/main/java/org/patternfly/layout/level/Level.java @@ -17,6 +17,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import org.patternfly.style.Modifiers.Gutter; import elemental2.dom.HTMLElement; @@ -45,7 +46,7 @@ public static Level level(HTMLContainerBuilder builde // ------------------------------------------------------ instance Level(HTMLContainerBuilder builder) { - super(builder.css(layout(level)).element()); + super(LayoutType.Level, builder.css(layout(level)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/level/LevelItem.java b/layouts/src/main/java/org/patternfly/layout/level/LevelItem.java index ebeddc666..5966f92f3 100644 --- a/layouts/src/main/java/org/patternfly/layout/level/LevelItem.java +++ b/layouts/src/main/java/org/patternfly/layout/level/LevelItem.java @@ -16,7 +16,8 @@ package org.patternfly.layout.level; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import org.patternfly.style.Modifiers.Fill; import elemental2.dom.HTMLElement; @@ -26,7 +27,7 @@ import static org.patternfly.style.Classes.layout; import static org.patternfly.style.Classes.level; -public class LevelItem extends BaseLayout implements Fill { +public class LevelItem extends SubLayout implements Fill { // ------------------------------------------------------ factory @@ -40,8 +41,10 @@ public static LevelItem levelItem(HTMLContainerBuilder LevelItem(HTMLContainerBuilder builder) { - super(builder.css(layout(level, item)).element()); + super(LayoutType.Level, SUB_LAYOUT_NAME, builder.css(layout(level, item)).element()); } // ------------------------------------------------------ builder diff --git a/layouts/src/main/java/org/patternfly/layout/package-info.java b/layouts/src/main/java/org/patternfly/layout/package-info.java new file mode 100644 index 000000000..865ce4b4a --- /dev/null +++ b/layouts/src/main/java/org/patternfly/layout/package-info.java @@ -0,0 +1,186 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * PatternFly layouts provide structure and positioning for content on a page. They offer flexible, responsive + * solutions for organizing UI elements and are designed to work seamlessly across different screen sizes and + * breakpoints. + * + *

Available Layouts

+ * + * This package provides the following layout types: + * + *
+ *
{@link org.patternfly.layout.bullseye.Bullseye Bullseye}
+ *
Centers content both vertically and horizontally within a container.
+ * + *
{@link org.patternfly.layout.flex.Flex Flex}
+ *
Provides a completely custom layout utilizing the PatternFly spacer and breakpoint systems. Supports + * adjustments to spacing, direction, alignment, justification, wrapping, and width.
+ * + *
{@link org.patternfly.layout.gallery.Gallery Gallery}
+ *
Arranges content in a responsive grid with uniform rows and columns that wrap automatically.
+ * + *
{@link org.patternfly.layout.grid.Grid Grid}
+ *
Places content on a fixed 12-column grid system.
+ * + *
{@link org.patternfly.layout.level.Level Level}
+ *
Distributes content evenly across a horizontal row.
+ * + *
{@link org.patternfly.layout.split.Split Split}
+ *
Distributes content horizontally with support for wrapping and spacing control.
+ * + *
{@link org.patternfly.layout.stack.Stack Stack}
+ *
Positions items vertically, with one or more items filling the available vertical space.
+ *
+ * + *

Common API Pattern

+ * + * All layouts follow a consistent API design: + * + *
    + *
  1. Static factory methods - Create layout instances using static methods named after the layout
  2. + *
  3. Add methods - Add child items using {@code addItem()} or {@code addItems()} methods
  4. + *
  5. Builder methods - Configure layout properties using fluent builder methods
  6. + *
  7. Responsive breakpoints - Many properties support responsive values at different breakpoints
  8. + *
+ * + *

Usage Examples

+ * + *

Bullseye Layout

+ * + * Center content both vertically and horizontally: + * + * {@snippet : + * Bullseye bullseye = bullseye() + * .addItem(bullseyeItem() + * .add(div().textContent("Centered content"))); + * } + * + *

Flex Layout

+ * + * Create a flexible layout with custom spacing and alignment: + * + * {@snippet : + * Flex flex = flex() + * .direction(Direction.column) + * .spaceItems(SpaceItems.md) + * .addItem(flexItem().add(div().textContent("Item 1"))) + * .addItem(flexItem().add(div().textContent("Item 2"))) + * .addItem(flexItem().add(div().textContent("Item 3"))); + * } + * + *

Gallery Layout

+ * + * Create a responsive grid of cards: + * + * {@snippet : + * Gallery gallery = gallery() + * .gutter() + * .addItem(galleryItem().add(card())) + * .addItem(galleryItem().add(card())) + * .addItem(galleryItem().add(card())); + * } + * + *

Grid Layout

+ * + * Position content on a 12-column grid: + * + * {@snippet : + * Grid grid = grid() + * .gutter() + * .addItem(gridItem().span(8).add(div().textContent("Main content"))) + * .addItem(gridItem().span(4).add(div().textContent("Sidebar"))); + * } + * + *

Stack Layout

+ * + * Arrange items vertically: + * + * {@snippet : + * Stack stack = stack() + * .gutter() + * .addItem(stackItem().add(div().textContent("Header"))) + * .addItem(stackItem().fill().add(div().textContent("Main content"))) + * .addItem(stackItem().add(div().textContent("Footer"))); + * } + * + *

Base Classes

+ * + * All layouts extend from {@link org.patternfly.layout.BaseLayout BaseLayout}, which implements common + * interfaces from Elemento for element manipulation: + * + *
    + *
  • {@link org.jboss.elemento.ElementAttributeMethods ElementAttributeMethods}
  • + *
  • {@link org.jboss.elemento.ElementClassListMethods ElementClassListMethods}
  • + *
  • {@link org.jboss.elemento.ElementContainerMethods ElementContainerMethods}
  • + *
  • {@link org.jboss.elemento.HTMLElementStyleMethods HTMLElementStyleMethods}
  • + *
  • And more...
  • + *
+ * + * This provides a rich set of methods to manipulate the layout's underlying DOM element. + * + *

Responsive Design

+ * + * Many layout properties support responsive values at different breakpoints using the + * {@link org.patternfly.style.Breakpoints Breakpoints} API: + * + * {@snippet : + * Flex flex = flex() + * .direction(breakpoints( + * default_, Direction.column, + * md, Direction.row)) + * .spaceItems(breakpoints( + * default_, SpaceItems.sm, + * lg, SpaceItems.lg)); + * } + * + * Available breakpoints: + *
    + *
  • {@link org.patternfly.style.Breakpoint#default_ default_} - Default value
  • + *
  • {@link org.patternfly.style.Breakpoint#sm sm} - Small screens (576px+)
  • + *
  • {@link org.patternfly.style.Breakpoint#md md} - Medium screens (768px+)
  • + *
  • {@link org.patternfly.style.Breakpoint#lg lg} - Large screens (992px+)
  • + *
  • {@link org.patternfly.style.Breakpoint#xl xl} - Extra large screens (1200px+)
  • + *
  • {@link org.patternfly.style.Breakpoint#_2xl _2xl} - 2X large screens (1450px+)
  • + *
+ * + *

Gutter Support

+ * + * Several layouts implement the {@link org.patternfly.style.Modifiers.Gutter Gutter} interface, which provides + * methods to add spacing between child items: + * + * {@snippet : + * Gallery gallery = gallery() + * .gutter() // Enable gutter spacing + * .addItem(galleryItem().add(card())) + * .addItem(galleryItem().add(card())); + * } + * + * Layouts supporting gutters: + *
    + *
  • {@link org.patternfly.layout.gallery.Gallery Gallery}
  • + *
  • {@link org.patternfly.layout.grid.Grid Grid}
  • + *
  • {@link org.patternfly.layout.level.Level Level}
  • + *
  • {@link org.patternfly.layout.split.Split Split}
  • + *
  • {@link org.patternfly.layout.stack.Stack Stack}
  • + *
+ * + * @see PatternFly Layouts Documentation + * @see org.patternfly.layout.BaseLayout + * @see org.patternfly.style.Breakpoints + */ +package org.patternfly.layout; \ No newline at end of file diff --git a/layouts/src/main/java/org/patternfly/layout/split/Split.java b/layouts/src/main/java/org/patternfly/layout/split/Split.java index 39f523a98..bb220b55b 100644 --- a/layouts/src/main/java/org/patternfly/layout/split/Split.java +++ b/layouts/src/main/java/org/patternfly/layout/split/Split.java @@ -17,6 +17,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import org.patternfly.style.Classes; import org.patternfly.style.Modifiers.Gutter; @@ -48,7 +49,7 @@ public static Split split(HTMLContainerBuilder builde // ------------------------------------------------------ instance Split(HTMLContainerBuilder builder) { - super(builder.css(layout(split)).element()); + super(LayoutType.Split, builder.css(layout(split)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/split/SplitItem.java b/layouts/src/main/java/org/patternfly/layout/split/SplitItem.java index ce013dbc4..3cae99df3 100644 --- a/layouts/src/main/java/org/patternfly/layout/split/SplitItem.java +++ b/layouts/src/main/java/org/patternfly/layout/split/SplitItem.java @@ -16,7 +16,8 @@ package org.patternfly.layout.split; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import org.patternfly.style.Modifiers.Fill; import elemental2.dom.HTMLElement; @@ -26,7 +27,7 @@ import static org.patternfly.style.Classes.layout; import static org.patternfly.style.Classes.split; -public class SplitItem extends BaseLayout implements Fill { +public class SplitItem extends SubLayout implements Fill { // ------------------------------------------------------ factory @@ -40,8 +41,10 @@ public static SplitItem splitItem(HTMLContainerBuilder SplitItem(HTMLContainerBuilder builder) { - super(builder.css(layout(split, item)).element()); + super(LayoutType.Split, SUB_LAYOUT_NAME, builder.css(layout(split, item)).element()); } // ------------------------------------------------------ builder diff --git a/layouts/src/main/java/org/patternfly/layout/stack/Stack.java b/layouts/src/main/java/org/patternfly/layout/stack/Stack.java index de90a65c9..892f759f8 100644 --- a/layouts/src/main/java/org/patternfly/layout/stack/Stack.java +++ b/layouts/src/main/java/org/patternfly/layout/stack/Stack.java @@ -17,6 +17,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; import org.patternfly.style.Modifiers.Gutter; import elemental2.dom.HTMLElement; @@ -45,7 +46,7 @@ public static Stack stack(HTMLContainerBuilder builde // ------------------------------------------------------ instance Stack(HTMLContainerBuilder builder) { - super(builder.css(layout(stack)).element()); + super(LayoutType.Split, builder.css(layout(stack)).element()); } // ------------------------------------------------------ add diff --git a/layouts/src/main/java/org/patternfly/layout/stack/StackItem.java b/layouts/src/main/java/org/patternfly/layout/stack/StackItem.java index 56d8468fc..cfae6ddf6 100644 --- a/layouts/src/main/java/org/patternfly/layout/stack/StackItem.java +++ b/layouts/src/main/java/org/patternfly/layout/stack/StackItem.java @@ -16,7 +16,8 @@ package org.patternfly.layout.stack; import org.jboss.elemento.HTMLContainerBuilder; -import org.patternfly.layout.BaseLayout; +import org.patternfly.layout.LayoutType; +import org.patternfly.layout.SubLayout; import org.patternfly.style.Modifiers.Fill; import elemental2.dom.HTMLElement; @@ -26,7 +27,7 @@ import static org.patternfly.style.Classes.layout; import static org.patternfly.style.Classes.stack; -public class StackItem extends BaseLayout implements Fill { +public class StackItem extends SubLayout implements Fill { // ------------------------------------------------------ factory @@ -40,8 +41,10 @@ public static StackItem stackItem(HTMLContainerBuilder StackItem(HTMLContainerBuilder builder) { - super(builder.css(layout(stack, item)).element()); + super(LayoutType.Stack, SUB_LAYOUT_NAME, builder.css(layout(stack, item)).element()); } // ------------------------------------------------------ builder diff --git a/mvnw b/mvnw index 8d937f4c1..19529ddf8 100755 --- a/mvnw +++ b/mvnw @@ -19,290 +19,241 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.2.0 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir +# Apache Maven Wrapper startup batch script, version 3.3.2 # # Optional ENV vars # ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output # ---------------------------------------------------------------------------- -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false +# OS specific support. +native_path() { printf %s\\n "$1"; } case "$(uname)" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; esac -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && - JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then - if $darwin ; then - javaHome="$(dirname "\"$javaExecutable\"")" - javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" - else - javaExecutable="$(readlink -f "\"$javaExecutable\"")" - fi - javaHome="$(dirname "\"$javaExecutable\"")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" else JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi fi else - JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi fi +} - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$(cd "$wdir/.." || exit 1; pwd) - fi - # end of workaround +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" done - printf '%s' "$(cd "$basedir" || exit 1; pwd)" + printf %x\\n $h } -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - # Remove \r in case we run on Windows within Git Bash - # and check out the repository with auto CRLF management - # enabled. Otherwise, we may read lines that are delimited with - # \r\n and produce $'-Xarg\r' rather than -Xarg due to word - # splitting rules. - tr -s '\r\n' ' ' < "$1" - fi +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 } -log() { - if [ "$MVNW_VERBOSE" = true ]; then - printf '%s\n' "$1" - fi +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" } -BASE_DIR=$(find_maven_basedir "$(dirname "$0")") -if [ -z "$BASE_DIR" ]; then - exit 1; +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" fi -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -log "$MAVEN_PROJECTBASEDIR" +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" -if [ -r "$wrapperJarPath" ]; then - log "Found $wrapperJarPath" +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT else - log "Couldn't find $wrapperJarPath, downloading it ..." + die "cannot create temp dir" +fi - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - fi - while IFS="=" read -r key value; do - # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) - safeValue=$(echo "$value" | tr -d '\r') - case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; - esac - done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" - log "Downloading from: $wrapperUrl" +mkdir -p -- "${MAVEN_HOME%/*}" - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - if command -v wget > /dev/null; then - log "Found wget ... using wget" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - log "Found curl ... using curl" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - fi - else - log "Falling back to using Java to download" - javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=$(cygpath --path --windows "$javaSource") - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - log " - Compiling MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - log " - Running MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" - fi - fi - fi +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" fi -########################################################################################## -# End of extension -########################################################################################## -# If specified, validate the SHA-256 sum of the Maven wrapper jar file -wrapperSha256Sum="" -while IFS="=" read -r key value; do - case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; - esac -done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" -if [ -n "$wrapperSha256Sum" ]; then - wrapperSha256Result=false - if command -v sha256sum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then - wrapperSha256Result=true +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true fi - elif command -v shasum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then - wrapperSha256Result=true + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true fi else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." - echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 exit 1 fi - if [ $wrapperSha256Result = false ]; then - echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 - echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 - echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 exit 1 fi fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -# shellcheck disable=SC2086 # safe args -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" +clean || : +exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd index c4586b564..249bdf382 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -1,3 +1,4 @@ +<# : batch portion @REM ---------------------------------------------------------------------------- @REM Licensed to the Apache Software Foundation (ASF) under one @REM or more contributor license agreements. See the NOTICE file @@ -18,188 +19,131 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.2.0 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir +@REM Apache Maven Wrapper startup batch script, version 3.3.2 @REM @REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output @REM ---------------------------------------------------------------------------- -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file -SET WRAPPER_SHA_256_SUM="" -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) ) -IF NOT %WRAPPER_SHA_256_SUM%=="" ( - powershell -Command "&{"^ - "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ - "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ - " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ - " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ - " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ - " exit 1;"^ - "}"^ - "}" - if ERRORLEVEL 1 goto error -) - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/pom.xml b/pom.xml index 11f0addcb..00434612a 100644 --- a/pom.xml +++ b/pom.xml @@ -16,20 +16,19 @@ limitations under the License. --> - + 4.0.0 org.jboss jboss-parent - 47 + 52 org.patternfly patternfly-java-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT pom PatternFly Java Parent Java implementation of PatternFly @@ -71,58 +70,49 @@ - ossrh - ${sonatype.url}/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots - - ossrh - ${sonatype.url}/service/local/staging/deploy/maven2/ - 1.0.8.Final - 1.7.0 - 2.12.1 - 1.0.0-RC1 - 1.0.0-RC1 - 5.11.3 - 2.0.21 - v20.18.0 - 6.0.0 + 2.4.8 + 2.13.0 + 1.3.2 + 1.0.0-RC1 + 1.0.0-RC1 + 6.0.2 + v24.10.0 + 6.4.0 - 3.3.0 + 0.10.0 4.0.3 - 0.1.3 - 3.3.0 - 1.15.1 - 1.1.0 - 0.23.2 - 1.12.0 - 3.11.1 + 0.2.0 + 2.0.0 + 1.2.0 + 0.23.6 + 1.13.0 + 3.12.0 2.1.1 - 4.6 - 1.7.0 + 5.0.0 UTF-8 patternfly-java patternfly-java - 11 - - ${java.version} - ${java.version} - 3.2.5 + 21 + ${java.version} + 3.9.9 ${encoding} ${encoding} - https://s01.oss.sonatype.org - bom build-config + charts code-parent components core @@ -180,6 +170,11 @@ true
+ + dev.jbang + jbang-maven-plugin + 0.0.8 + org.kie.j2cl.tools j2cl-maven-plugin @@ -194,11 +189,6 @@ keepachangelog-maven-plugin ${version.keepachangelog} - - org.jetbrains.kotlin - kotlin-maven-plugin - ${version.kotlin} - com.mycila license-maven-plugin @@ -217,18 +207,18 @@ degraph-style.json dependency-graph.dot - release.main.kts LICENSE README.md + **/.npmignore **/package-lock.json **/*.ftl + **/*.js.map **/*.pem **/*license*.txt **/.parcel-cache/** **/node/** **/node_modules/** **/src/demo/java/** - **/src/main/resources/META-INF/externs/** **/src/main/java/org/patternfly/core/Version.java **/src/main/java/org/patternfly/icon/IconSets.java **/src/main/java/org/patternfly/icon/IconSpecs.java @@ -236,6 +226,7 @@ **/src/main/java/org/patternfly/showcase/Code.java **/src/main/java/org/patternfly/showcase/ResourceBundle.java **/src/main/java/org/patternfly/token/Token.java + **/src/main/resources/META-INF/externs/** @@ -295,21 +286,6 @@ org.apache.maven.plugins maven-javadoc-plugin - ${version.javadoc.plugin} - - ${javadoc.options} - true - none - false - - https://patternfly-java.github.io/apidocs/ - https://hal.github.io/elemento/apidocs/ - https://www.gwtproject.org/javadoc/latest/ - https://javadoc.io/doc/org.gwtproject.event/gwt-event/${version.gwt.event}/ - https://javadoc.io/doc/org.gwtproject.safehtml/gwt-safehtml/${version.gwt.safehtml}/ - - public - @@ -342,20 +318,24 @@ true degraph-style.json - ${project.groupId}:patternfly-java-core - ${project.groupId}:patternfly-java-icons - ${project.groupId}:patternfly-java-components - ${project.groupId}:patternfly-java-layouts + ${project.groupId}:patternfly-java-charts ${project.groupId}:patternfly-java-codeeditor + ${project.groupId}:patternfly-java-components + ${project.groupId}:patternfly-java-core ${project.groupId}:patternfly-java-finder ${project.groupId}:patternfly-java-gwt + ${project.groupId}:patternfly-java-icons ${project.groupId}:patternfly-java-j2cl + ${project.groupId}:patternfly-java-layouts + ${project.groupId}:patternfly-java-tokens org.jboss.elemento:elemento-* com.google.elemental2:* org.gwtproject:gwt-user true + true ${project.basedir} + false true @@ -445,10 +425,42 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + + --snippet-path=${project.basedir}/src/demo/java + true + true + none + + **/*Demo.java + + false + + https://hal.github.io/elemento/apidocs/ + https://www.gwtproject.org/javadoc/latest/ + https://javadoc.io/doc/org.gwtproject.event/gwt-event/${version.gwt.event}/ + https://javadoc.io/doc/org.gwtproject.safehtml/gwt-safehtml/${version.gwt.safehtml}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-core/${version.elemental2}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-dom/${version.elemental2}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-promise/${version.elemental2}/ + https://javadoc.io/doc/com.google.elemental2/elemental2-webstorage/${version.elemental2}/ + + + public + +
+ + apidoc + + apidoc + + quick-build @@ -463,7 +475,6 @@ true true true - true true true @@ -529,14 +540,15 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - ${version.nexus.staging.plugin} + org.sonatype.central + central-publishing-maven-plugin + ${version.central.publishing.plugin} true - ossrh - ${sonatype.url} - true + central + true + 86400 + published @@ -548,85 +560,40 @@ showcase - - snippets - - 19 - --snippet-path ${project.basedir}/src/demo/java - - - - - org.apache.maven.plugins - maven-antrun-plugin - false - - - copy-apidocs - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - oss-snapshots - https://oss.sonatype.org/content/repositories/snapshots - false - true + central-portal-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + false + + + true + - oss-snapshots-01 - https://s01.oss.sonatype.org/content/repositories/snapshots - false - true + jboss-nexus + https://repository.jboss.org/nexus/content/groups/public + + false + + + true + + + + jboss-nexus + https://repository.jboss.org/nexus/repository/releases/ + + true + + + false + + +
\ No newline at end of file diff --git a/release.main.kts b/release.main.kts deleted file mode 100755 index 9c16b3b1c..000000000 --- a/release.main.kts +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env kotlin - -@file:DependsOn("com.github.ajalt.clikt:clikt-jvm:4.3.0") -@file:DependsOn("com.lordcodes.turtle:turtle:0.9.0") -@file:DependsOn("io.arrow-kt:arrow-core:1.2.4") -@file:DependsOn("io.github.z4kn4fein:semver-jvm:2.0.0") -@file:Suppress("MemberVisibilityCanBePrivate") - -import ReleaseError.TagExists -import ReleaseError.UncommittedChanges -import arrow.core.Either.Companion.catch -import arrow.core.Either.Left -import arrow.core.Either.Right -import arrow.core.EitherNel -import arrow.core.NonEmptyList -import arrow.core.raise.either -import arrow.core.raise.ensure -import arrow.core.raise.zipOrAccumulate -import com.github.ajalt.clikt.core.CliktCommand -import com.github.ajalt.clikt.core.terminal -import com.github.ajalt.clikt.parameters.arguments.argument -import com.github.ajalt.clikt.parameters.arguments.convert -import com.github.ajalt.clikt.parameters.arguments.help -import com.github.ajalt.clikt.parameters.arguments.validate -import com.github.ajalt.clikt.parameters.options.flag -import com.github.ajalt.clikt.parameters.options.help -import com.github.ajalt.clikt.parameters.options.option -import com.github.ajalt.mordant.rendering.TextColors.* -import com.github.ajalt.mordant.terminal.YesNoPrompt -import com.lordcodes.turtle.shellRun -import io.github.z4kn4fein.semver.Version -import io.github.z4kn4fein.semver.toVersionOrNull -import java.lang.Thread.sleep -import kotlin.random.Random -import kotlin.system.exitProcess - -/* - * This is an alternative version of 'release.sh' written in Kotlin - * It was primarily an experiment to replace the bash script crap with something more readable. - * There are slightly more lines of code, but hopefully, the script reads much better. - */ - -// ------------------------------------------------------ error & success types - -sealed class ReleaseError(val message: String) { - data object UncommittedChanges : ReleaseError("You have uncommitted changes.") - data class TagExists(val tag: String) : ReleaseError("The tag '$tag' already exists.") -} - -data class Release(val releaseVersion: Version, val nextVersion: Version) { - val tag = "v$releaseVersion" - val snapshot = "$nextVersion-SNAPSHOT" -} - -// ------------------------------------------------------ release command - -class ReleaseCommand : CliktCommand(name = "release") { - - val dryRun: Boolean by option() - .flag(default = false) - .help("Does not release, but only prints the steps") - - val releaseVersion: Version by argument("release-version") - .help("The release version (as semver)") - .convert { - it.toVersionOrNull(strict = false) ?: fail("$it is not a valid semantic version") - } - - val nextVersion: Version by argument("next-version") - .help("The next snapshot version (as semver)") - .convert { - it.toVersionOrNull(strict = false) ?: fail("$it is not a valid semantic version") - }.validate { - require(nextVersion > releaseVersion) { - "Next version must be greater than release version" - } - } - - override fun run() { - when (val validate = validate(Release(releaseVersion, nextVersion))) { - is Left -> die(validate.value) - is Right -> if (really(validate.value)) { - release(validate.value) - } else { - terminal.warning("\nAborted") - } - } - } - - // ------------------------------------------------------ validation - - fun validate(release: Release): EitherNel = either { - zipOrAccumulate( - { - // If there are no uncommitted changes, 'git diff-index' will return 0 and 'isRight()' is true. - // Otherwise, the command will return 1 and shellRun() will throw an exception - ensure(catch { - shellRun("git", listOf("diff-index", "--quiet", "HEAD")) - }.isRight()) { UncommittedChanges } - }, - { - // if the output of 'git -l ' is not empty, the tag already exists - ensure(shellRun("git", listOf("tag", "-l", release.tag)).isEmpty()) { TagExists(release.tag) } - } - ) { _, _ -> release } - } - - fun die(errors: NonEmptyList) { - errors.forEach { terminal.println("${terminal.theme.danger("Error:")} ${it.message}", stderr = true) } - exitProcess(1) - } - - // ------------------------------------------------------ release - - fun really(release: Release) = YesNoPrompt(""" - |Codebase is ready to be released. - | - |If you decide to continue, this script will - | - | 1. Bump the version to ${cyan(release.releaseVersion.toString())} - | 2. Update the ${cyan("changelog")} (there should already be entries in the ${cyan("Unreleased")} section!) - | 3. Create a tag for ${cyan(release.tag)} - | 4. ${cyan("Commit")} and ${cyan("push")} to origin (which will trigger the ${cyan("release workflow")} at GitHub) - | 5. Bump the version to ${cyan(release.snapshot)} - | 6. ${cyan("Commit")} and ${cyan("push")} to origin - | - |Do you wish to continue - """.trimMargin(), terminal).ask() ?: false - - fun step(message: String, code: () -> Unit) { - echo("${yellow("…")} $message", trailingNewline = false) - if (dryRun) { - sleep(Random.nextLong(1111, 4444)) - } else { - code.invoke() - } - echo("\r${green("βœ“")}") - } - - fun release(release: Release) { - echo() - step("Update to version ${release.releaseVersion}") { - shellRun { - command("mvn", listOf("-DnewVersion=${release.releaseVersion}", "versions:set")) - command("mvn", listOf("--projects", "org.patternfly:patternfly-java-core", "--also-make", "generate-sources")) - } - } - - step("Update README & changelog") { - shellRun { - command("sed", listOf( - "-i", - "''", - "-E", - """s/[0-9]+\.[0-9]+\.[0-9]+(.*)<\/version>/${release.releaseVersion}\1<\/version>/""", - "README.md" - )) - command("mvn", listOf("-DskipModules", "keepachangelog:release")) - } - } - - step("Push changes") { - shellRun { - git.commitAllChanges("Release ${release.releaseVersion}") - git.push(remote = "origin", branch = "main") - } - } - - step("Push tag") { - shellRun { - command("git", listOf("tag", release.tag)) - command("git", listOf("push", "--tags", "origin", "main")) - } - } - - step("Update to version ${release.snapshot}") { - shellRun("mvn", listOf("-DnewVersion=${release.snapshot}", "versions:set")) - } - - step("Push changes") { - shellRun { - git.commitAllChanges("Next is ${release.snapshot}") - git.push(remote = "origin", branch = "main") - } - } - - echo("\n${green("All done")}. Watch the release workflow at https://github.com/patternfly-java/patternfly-java/actions/workflows/release.yml") - } -} - -ReleaseCommand().main(args) diff --git a/showcase/common/.gitignore b/showcase/.gitignore similarity index 64% rename from showcase/common/.gitignore rename to showcase/.gitignore index dd4223c6d..05e37662b 100644 --- a/showcase/common/.gitignore +++ b/showcase/.gitignore @@ -1,3 +1,3 @@ +key.pem src/main/java/org/patternfly/showcase/Code.java src/main/java/org/patternfly/showcase/Documentation.java -src/main/java/org/patternfly/showcase/ResourceBundle.java diff --git a/showcase/gwt/.parcelrc b/showcase/.parcelrc similarity index 100% rename from showcase/gwt/.parcelrc rename to showcase/.parcelrc diff --git a/showcase/README.md b/showcase/README.md index dfcfe17b8..1442f6471 100644 --- a/showcase/README.md +++ b/showcase/README.md @@ -1,70 +1,42 @@ # PatternFly Java Showcase -The [showcase](https://patternfly-java.github.io/) for PatternFly Java is inspired by the [PatternFly](https://www.patternfly.org/) website. It provides pages for all supported components, layouts and extensions. The J2CL variant of the showcase is published to https://patternfly-java.github.io/. - -The bulk of the showcase code is in the [`common`](https://github.com/patternfly-java/patternfly-java/blob/main/showcase/common/src/main/java/org/patternfly/showcase/Showcase.java#L52) module. The [`gwt`](https://github.com/patternfly-java/patternfly-java/blob/main/showcase/gwt/src/main/java/org/patternfly/showcase/Main.java#L22) and [`j2cl`](https://github.com/patternfly-java/patternfly-java/blob/main/showcase/j2cl/src/main/java/org/patternfly/showcase/Main.java#L22) modules are just thin wrappers, contain just bootstrapping code and depend on the `common` module. - -# Build - -To build the showcase, you can use the `dev.sh` and `prod.sh` scripts: +The [showcase](https://patternfly-java.github.io/) for PatternFly Java is inspired by the [PatternFly](https://www.patternfly.org/) website. It provides pages for all supported charts, components, layouts and extensions. The showcase is published to https://patternfly-java.github.io/. ## Development -```java -USAGE: - dev.sh [FLAGS] +In the development mode, the Java code is transpiled to JavaScript using J2CL. The HTML and CSS are transpiled to JavaScript +using Parcel. Changes to HTML and CSS will be detected by Parcel, and the browser reloads the page automatically. +Changes to the Java code will be detected by the J2CL Maven plugin, but you need to reload the browser manually. -FLAGS: - -c, --clean Adds the 'clean' goal - -h, --help Prints help information - -v, --version Prints version information - --no-color Uses plain text output +To start the showcase in development mode, run the following command in the root directory: -ARGS: - One of 'gwt' or 'j2cl' +```shell +mvn j2cl:watch -P showcase ``` -### GWT - -Run `./dev.sh gwt`, then open http://localhost:8888/showcase - -> [!WARNING] -> GWT development mode currently only supports hot code reloading for the `org.patternfly:patternfly-java-showcase-common` module. - -### J2CL - -Run `./dev.sh j2cl`, wait until you see +and wait until you see the message ``` [INFO] ----- Build Complete: ready for browser refresh ----- ``` -then open another shell in `showcase/j2cl` and run +In another shell run ```shell +cd showcase npm run watch ``` -This will open https://localhost:1234/. +This will open a browser at http://localhost:1234. ## Production -```java -USAGE: - prod.sh [FLAGS] +To build the showcase for production, run the following command in the root directory: -FLAGS: - -c, --clean Adds the 'clean' goal - -h, --help Prints help information - -v, --version Prints version information - --no-color Uses plain text output +```shell +mvn clean package -P showcase,prod +cd showcase +mvn com.github.eirslett:frontend-maven-plugin:npm@http-server -ARGS: - One of 'gwt' or 'j2cl' ``` - -After a successful build, the script will open https://localhost:8080 - -# Feedback - -Please let us know if you have trouble building the showcase. File an [issue](https://github.com/patternfly-java/patternfly-java/issues/new) or join the [chat](https://app.gitter.im/#/room/#pf4-java_core:gitter.im). +After a successful build, open https://localhost:8080 diff --git a/showcase/gwt/cert.pem b/showcase/cert.pem similarity index 100% rename from showcase/gwt/cert.pem rename to showcase/cert.pem diff --git a/showcase/code.java b/showcase/code.java new file mode 100755 index 000000000..32b3f350b --- /dev/null +++ b/showcase/code.java @@ -0,0 +1,190 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/// usr/bin/env jbang "$0" "$@" ; exit $? +//JAVA 24 +//JAVAC_OPTIONS --enable-preview -source 24 +//JAVA_OPTIONS --enable-preview + +static class SourceSpec { + + final String globSuffix; + final Path relativeDir; + + SourceSpec(String globSuffix, Path relativeDir) { + this.globSuffix = globSuffix; + this.relativeDir = relativeDir; + } +} + +static final String PACKAGE_NAME = "org.patternfly.showcase"; +static final String CLASS_NAME = "Code"; +static final String TARGET = "src/main/java"; +static final String START_COMMENT = "// @code-start:"; +static final String END_COMMENT = "// @code-end:"; + +static final List SOURCES = Arrays.asList( + new SourceSpec("*Component.java", Paths.get("src/main/java/org/patternfly/showcase/component")), + new SourceSpec("*Layout.java", Paths.get("src/main/java/org/patternfly/showcase/layout")), + new SourceSpec("*Chart.java", Paths.get("src/main/java/org/patternfly/showcase/chart")) +); + +void main(String... args) throws IOException { + if (args.length == 0 || args[0] == null || args[0].isEmpty()) { + System.err.println("Missing base directory!"); + System.exit(1); + } + Path base = Paths.get(args[0]).toAbsolutePath().normalize(); + + Path targetPath = base.resolve(TARGET).resolve(PACKAGE_NAME.replace('.', '/')); + Files.createDirectories(targetPath); + File javaSource = targetPath.resolve(CLASS_NAME + ".java").toFile(); + if (javaSource.exists() && !javaSource.delete()) { + throw new IOException("Unable to delete existing file: " + javaSource); + } + + StringBuilder out = new StringBuilder(); + startClass(out); + int counter = processSnippets(base, out); + endClass(out); + Files.write(javaSource.toPath(), out.toString().getBytes(StandardCharsets.UTF_8)); + + println("Processed " + counter + " code snippets"); +} + +void startClass(StringBuilder out) { + out.append("package ").append(PACKAGE_NAME).append(";\n\n") + .append("import java.util.Map;\n") + .append("import java.util.HashMap;\n\n") + .append("import javax.annotation.processing.Generated;\n\n") + .append("/*\n") + .append(" * WARNING! This class is generated. Do not modify.\n") + .append(" */\n") + .append("@Generated(\"code.java\")\n") + .append("public final class ").append(CLASS_NAME).append(" {\n\n") + .append(" private static final Map snippets = new HashMap<>();\n\n") + .append(" static {"); +} + +int processSnippets(Path base, StringBuilder out) throws IOException { + int counter = 0; + for (SourceSpec spec : SOURCES) { + Path dir = base.resolve(spec.relativeDir); + if (!Files.isDirectory(dir)) { + continue; + } + final Predicate nameMatches = globPredicate(spec.globSuffix); + List files = new ArrayList<>(); + try (Stream stream = Files.list(dir)) { + stream.filter(p -> Files.isRegularFile(p) && nameMatches.test(p.getFileName().toString())) + .forEach(files::add); + } + files.sort(java.util.Comparator.naturalOrder()); + for (Path p : files) { + counter += extractFromFile(p, out); + } + } + return counter; +} + +int extractFromFile(Path file, StringBuilder out) throws IOException { + String name = ""; + boolean collectCode = false; + int leadingWhitespace = 0; + List code = new ArrayList<>(); + int counter = 0; + + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(new FileInputStream(file.toFile()), StandardCharsets.UTF_8))) { + String line; + while ((line = reader.readLine()) != null) { + if (line.contains(START_COMMENT)) { + leadingWhitespace = line.indexOf(START_COMMENT); + name = line.substring(line.indexOf(START_COMMENT) + START_COMMENT.length()); + collectCode = true; + } else if (collectCode) { + if (line.contains(END_COMMENT + name)) { + addSnippet(out, name, code); + counter++; + // reset + name = ""; + collectCode = false; + leadingWhitespace = 0; + code.clear(); + } else { + if (line.length() < leadingWhitespace) { + code.add(line); + } else { + code.add(line.substring(leadingWhitespace)); + } + } + } + } + } + return counter; +} + +void addSnippet(StringBuilder out, String name, List code) { + out.append("\n snippets.put(\"") + .append(escapeJava(name)) + .append("\", \"") + .append(escapeJava(String.join("\n", code))) + .append("\");"); +} + +void endClass(StringBuilder out) { + out.append("\n }\n\n") + .append(" public static String code(String name) {\n") + .append(" return snippets.getOrDefault(name, \"n/a\");\n") + .append(" }\n") + .append("}\n"); +} + +String escapeJava(String in) { + if (in == null) {return "";} + StringBuilder sb = new StringBuilder(in.length()); + for (int i = 0; i < in.length(); i++) { + char c = in.charAt(i); + switch (c) { + case '"': + sb.append("\\\""); + break; + case '\\': + sb.append("\\\\"); + break; + case '\r': + sb.append("\\r"); + break; + case '\n': + sb.append("\\n"); + break; + case '\t': + sb.append("\\t"); + break; + default: + sb.append(c); + } + } + return sb.toString(); +} + +Predicate globPredicate(String globSuffix) { + // globSuffix like "*Component.java" -> endsWith("Component.java") + if (globSuffix.startsWith("*")) { + String suffix = globSuffix.substring(1); + return name -> name.endsWith(suffix); + } + return name -> name.equals(globSuffix); +} diff --git a/showcase/common/bundle.kts b/showcase/common/bundle.kts deleted file mode 100755 index c1d72905c..000000000 --- a/showcase/common/bundle.kts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File -import java.util.Base64 - -import kotlin.io.path.Path -import kotlin.io.path.createDirectories - -import org.jetbrains.kotlin.maven.ExecuteKotlinScriptMojo - -// ------------------------------------------------------ init - -val mojo = ExecuteKotlinScriptMojo.INSTANCE -require(args.isNotEmpty()) { - mojo.getLog().error("Missing base directory!") - System.exit(1) -} - -// ------------------------------------------------------ constants - -val packageName = "org.patternfly.showcase" -val className = "ResourceBundle" -val target = "src/main/java" -val resources = listOf( - Resource("avatarDark", File(args[0], "src/bundle/avatar-dark.svg"), true), - Resource("avatarLight", File(args[0], "src/bundle/avatar-light.svg"), true), - Resource("pfLogo", File(args[0], "src/bundle/pf-logo.svg"), false), - Resource("components", File(args[0], "src/bundle/components.json"), false), - Resource("layouts", File(args[0], "src/bundle/layouts.json"), false), - Resource("rhcp", File(args[0], "src/bundle/rhcp.json"), false), - Resource("servers", File(args[0], "src/bundle/servers.json"), false), - // TODO String too long! -// Resource("users", File(args[0], "src/bundle/users.json")), -) -val targetPath = Path(args[0], "$target/${packageName.replace('.', '/')}") - -// ------------------------------------------------------ main - -targetPath.createDirectories() -val javaSource = File(targetPath.toFile(), "$className.java") -if (javaSource.exists()) { - javaSource.delete() -} - -startClass() -processResources() -endClass() - -mojo.getLog().info("Processed ${resources.size} resources") - -// ------------------------------------------------------ functions and classes - -fun startClass() { - javaSource.appendText(""" - |package $packageName; - | - |import javax.annotation.processing.Generated; - | - |/* - | * WARNING! This class is generated. Do not modify. - | */ - |@Generated("bundle.kts") - |public final class $className { - | - """.trimMargin()) -} - -fun processResources() { - resources.forEach { - javaSource.appendText(""" - | ${it.code()} - | - """.trimMargin()) - mojo.getLog().info("Processed ${it.name}") - } -} - -fun endClass() { - javaSource.appendText("\n}") -} - -data class Resource(val name: String, val file: File, val encode: Boolean) - -fun Resource.code() = buildString { - append("public static final String $name = \"") - if (encode) { - append(Base64.getEncoder().encodeToString(file.readText().toByteArray())) - } else { - append(file.readLines().joinToString("\\n").escapeJava()) - } - append("\";") -} - -fun String.escapeJava() = this.replace("\"", "\\\"") diff --git a/showcase/common/code.kts b/showcase/common/code.kts deleted file mode 100755 index a1739a9a8..000000000 --- a/showcase/common/code.kts +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File - -import kotlin.io.path.* - -import org.jetbrains.kotlin.maven.ExecuteKotlinScriptMojo - -// ------------------------------------------------------ init - -val mojo = ExecuteKotlinScriptMojo.INSTANCE -require(args.isNotEmpty()) { - mojo.getLog().error("Missing base directory!") - System.exit(1) -} - -// ------------------------------------------------------ constants - -val packageName = "org.patternfly.showcase" -val className = "Code" -val target = "src/main/java" -val startComment = "// @code-start:" -val endComment = "// @code-end:" -val sourcePaths = mapOf( - "*Component.java" to Path(args[0], "src/main/java/org/patternfly/showcase/component"), - "*Layout.java" to Path(args[0], "src/main/java/org/patternfly/showcase/layout") -) -val targetPath = Path(args[0], "$target/${packageName.replace('.', '/')}") - -// ------------------------------------------------------ main - -var name = "" -var collectCode = false -var leadingWhitespace = 0 -val code = mutableListOf() -var counter = 0 - -targetPath.createDirectories() -val javaSource = File(targetPath.toFile(), "$className.java") -if (javaSource.exists()) { - javaSource.delete() -} - -startClass() -processSnippets() -endClass() - -mojo.getLog().info("Processed $counter code snippets") - -// ------------------------------------------------------ functions and classes - -fun startClass() { - javaSource.appendText(""" - |package $packageName; - | - |import java.util.Map; - |import java.util.HashMap; - | - |import javax.annotation.processing.Generated; - | - |/* - | * WARNING! This class is generated. Do not modify. - | */ - |@Generated("code.kts") - |public final class $className { - | - | private static final Map snippets = new HashMap<>(); - | - | static { - """.trimMargin()) -} - -fun processSnippets() { - for ((suffix, sourcePath) in sourcePaths) { - sourcePath.forEachDirectoryEntry(suffix) { file -> - if (!file.isDirectory() && file.isReadable()) { - file.forEachLine { line -> - if (line.contains(startComment)) { - leadingWhitespace = line.indexOf(startComment) - name = line.substringAfter(startComment) - collectCode = true - } else { - if (collectCode) { - if (line.contains(endComment + name)) { - CodeBlock(name, code).addSnippet() - counter++ - reset() - } else { - code.add(if (line.length < leadingWhitespace) line else line.substring(leadingWhitespace)) - } - } - } - } - } - } - } -} - -fun reset() { - name = "" - collectCode = false - leadingWhitespace = 0 - code.clear() -} - -fun endClass() { - javaSource.appendText(""" - | - | } - | - | public static String code(String name) { - | return snippets.getOrDefault(name, "n/a"); - | } - |} - """.trimMargin()) -} - -data class CodeBlock(val name: String, val code: List) - -fun CodeBlock.addSnippet() { - javaSource.appendText(""" - | - | snippets.put("$name", "${code.joinToString("\\n").escapeJava()}"); - """.trimMargin()) -} - -fun String.escapeJava() = this.replace("\"", "\\\"") diff --git a/showcase/common/doc.kts b/showcase/common/doc.kts deleted file mode 100755 index 08f5d2de6..000000000 --- a/showcase/common/doc.kts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File -import java.util.Base64 - -import kotlin.io.path.* - -import org.apache.commons.text.StringEscapeUtils -import org.intellij.markdown.flavours.gfm.GFMFlavourDescriptor -import org.intellij.markdown.html.HtmlGenerator -import org.intellij.markdown.parser.MarkdownParser -import org.jetbrains.kotlin.maven.ExecuteKotlinScriptMojo - -// ------------------------------------------------------ init - -val mojo = ExecuteKotlinScriptMojo.INSTANCE -require(args.isNotEmpty()) { - mojo.getLog().error("Missing base directory!") - System.exit(1) -} - -// ------------------------------------------------------ constants - -val packageName = "org.patternfly.showcase" -val className = "Documentation" -val target = "src/main/java" -val targetPath = Path(args[0], "$target/${packageName.replace('.', '/')}") -val docPath = Path(args[0], "src/doc") -val flavour = GFMFlavourDescriptor() -val parser = MarkdownParser(flavour) -var documents = 0 - -// ------------------------------------------------------ main - -targetPath.createDirectories() -val javaSource = File(targetPath.toFile(), "$className.java") -if (javaSource.exists()) { - javaSource.delete() -} - -startClass() -processDocuments() -endClass() - -mojo.getLog().info("Processed $documents documents") - -// ------------------------------------------------------ functions and classes - -fun startClass() { - javaSource.appendText(""" - |package $packageName; - | - |import java.util.Map; - |import java.util.HashMap; - | - |import javax.annotation.processing.Generated; - | - |/* - | * WARNING! This class is generated. Do not modify. - | */ - |@Generated("doc.kts") - |public final class $className { - | - | private static final Map documents = new HashMap<>(); - | - | static { - """.trimMargin()) -} - -fun processDocuments() { - docPath.forEachDirectoryEntry("*.md") { file -> - if (!file.isDirectory() && file.isReadable()) { - val doc = file.readText() - val parsedTree = parser.buildMarkdownTreeFromString(doc) - val html = HtmlGenerator(doc, parsedTree, flavour).generateHtml() - javaSource.appendText(""" - | - | documents.put("${file.nameWithoutExtension}", "${html.escapeJava().stripBody()}"); - """.trimMargin()) - } - mojo.getLog().info("Processed ${file.name}") - documents++ - } -} - -fun endClass() { - javaSource.appendText(""" - | - | } - | - | public static String doc(String name) { - | return documents.getOrDefault(name, "n/a"); - | } - |} - """.trimMargin()) -} - -fun String.escapeJava() = StringEscapeUtils.escapeJava(this) - -fun String.stripBody() = this.removePrefix("").removeSuffix("") diff --git a/showcase/common/local_modules/showcase-common/package-lock.json b/showcase/common/local_modules/showcase-common/package-lock.json deleted file mode 100644 index e6a553c51..000000000 --- a/showcase/common/local_modules/showcase-common/package-lock.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "showcase-common", - "version": "3", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "showcase-common", - "version": "3" - } - } -} diff --git a/showcase/common/local_modules/showcase-common/package.json b/showcase/common/local_modules/showcase-common/package.json deleted file mode 100644 index 7503dcf29..000000000 --- a/showcase/common/local_modules/showcase-common/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "showcase-common", - "version": "3", - "description": "Common showcase resources", - "private": true -} diff --git a/showcase/common/pom.xml b/showcase/common/pom.xml deleted file mode 100644 index cccd5ef9f..000000000 --- a/showcase/common/pom.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - 4.0.0 - - - org.patternfly - patternfly-java-showcase - 0.2.12-SNAPSHOT - ../pom.xml - - - patternfly-java-showcase-common - gwt-lib - PatternFly Java Showcase Common - - - - ${project.groupId} - patternfly-java-components - - - ${project.groupId} - patternfly-java-layouts - - - ${project.groupId} - patternfly-java-codeeditor - - - org.jboss.elemento - elemento-router - - - org.jboss.elemento - elemento-router-processor - provided - - - org.jetbrains.kotlin - kotlin-stdlib - provided - - - - - - - org.apache.maven.plugins - maven-clean-plugin - - - - src/main/java - - org/patternfly/showcase/Code.java - org/patternfly/showcase/Documentation.java - org/patternfly/showcase/ResourceBundle.java - - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - - - bundle - generate-sources - - script - - - bundle.kts - ${project.basedir} - - - - code - generate-sources - - script - - - code.kts - ${project.basedir} - - - - documentation - generate-sources - - script - - - doc.kts - ${project.basedir} - - - - - - org.apache.maven - maven-plugin-api - ${maven.min.version} - - - org.apache.maven - maven-core - ${maven.min.version} - - - org.apache.commons - commons-text - ${version.commons.text} - - - org.jetbrains - markdown-jvm - ${version.intellij.markdown} - - - - - org.apache.maven.plugins - maven-resources-plugin - - - add-generated-sources - prepare-package - - copy-resources - - - ${project.build.outputDirectory} - - - ${project.build.directory}/generated-sources/annotations - - - - - - - - net.ltgt.gwt.maven - gwt-maven-plugin - - org.patternfly.showcase.Common - - - - - diff --git a/showcase/common/src/bundle/avatar-dark.svg b/showcase/common/src/bundle/avatar-dark.svg deleted file mode 100644 index d26cca800..000000000 --- a/showcase/common/src/bundle/avatar-dark.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/showcase/common/src/doc/api-design.md b/showcase/common/src/doc/api-design.md deleted file mode 100644 index 743fa1be4..000000000 --- a/showcase/common/src/doc/api-design.md +++ /dev/null @@ -1,70 +0,0 @@ -# API design - -PatternFly Java integrates with and builds upon Elemento's [builder API](https://hal-console.gitbook.io/elemento/builder-api). Static factory methods are used to create the components, and public instances methods add child elements and modify the component. - -In general, the API for a component can be classified into these groups: - -## Static factory methods - -These methods are used to create a component. They are usually named after the component, are overloaded to accept required and optional arguments, and return an instance of the newly created component: - -```java -Button button1 = button("Click me!"); -Button button2 = button("PatternFly", "https://www.patternfly.org"); -``` - -## Add methods - -These methods add subcomponents to a main component. They are usually called `add()` and return the main component so that the method call can be chained with other methods. - -```java -Dropdown dropdown = dropdown() - .addToggle(menuToggle("Dropdown")) - .addMenu(menu() - .addContent(menuContent() - .addList(menuList() - .addItem(actionMenuItem("item-0", "Action")))))) -``` - -## Builder / modifier methods - -These methods modify the current component. They return the current component so that the method call can be chained with other methods. - -```java -Card card = card() - .flat() - .rounded() - .large(); -``` - -## ARIA-related methods - -These methods set ARIA-related attributes in the component. They're usually named `aria()` and return the component so that the method call can be chained with other methods. - -```java -Navigation navigation = navigation(flat) - .ariaScrollBackLabel("← back") - .ariaScrollForwardLabel("β†’ forward"); -``` - -## Event handlers - -These methods add event handlers for various event to the component. They are usually named `on()`, accept an event handler, and return the component so that the method call can be chained with other methods. PatternFly Java defines some [common event handlers](https://patternfly-java.github.io/apidocs/org/patternfly/handler/package-summary.html) that are reused in all components. In some cases, components also use specific event handlers that only apply to the component. - -```java -Drawer drawer = drawer().id("drw") - .onToggle((e, c, expanded) -> console.log("Drawer expanded: " + expanded)); -``` - -## Public API / getters - -These methods do something with the component or return a value, a property, or some other kind of information. They return either `void` or a value/property. - -```java -Switch switch_ = switch_("id", "name"); -boolean value = switch_.value(); -``` - -## Common interfaces - -The best way to experience the API is to browse the code snippets of the [components](components/all-components) and [layouts](layouts/about-layouts) in this showcase. diff --git a/showcase/common/src/doc/home.md b/showcase/common/src/doc/home.md deleted file mode 100644 index bda52acdd..000000000 --- a/showcase/common/src/doc/home.md +++ /dev/null @@ -1,33 +0,0 @@ -# PatternFly Java - -PatternFly Java is a πŸ’― Java implementation of [PatternFly](https://www.patternfly.org/) without any JavaScript dependencies. Its goal is to provide an easy-to-use, elegant, and efficient API to build complex web applications with PatternFly in Java. PatternFly Java integrates with and builds upon Elemento's [builder API](https://hal-console.gitbook.io/elemento/builder-api). It works with both GWT and J2CL. The following code snippet gives a taste of what PatternFly Java looks like: - -```java -body().add(page() - .addSkipToContent(skipToContent("main-id")) - .addMasthead(masthead() - .addToggle(mastheadToggle()) - .addBrand(brand("/assets/your-logo.svg"), "/home")) - .addSidebar(sidebar() - .addBody(sidebarBody() - .addNavigation(navigation(flat) - .addItem(navigationItem("get-started", "Get started", "/get-started")) - .addItem(navigationItem("get-involved", "Get involved", "/get-involved"))))) - .addMain(pageMain("main-id") - .addSection(pageMainSection() - .light() - .add(textContent() - .add(title(1, "PatternFly - Java")) - .add(p() - .add(a("https://github.com/patternfly-java/patternfly-java", "_blank") - .textContent("PatternFly Java")) - .add(" is a πŸ’― Java implementation of ") - .add(a("https://www.patternfly.org/", "_blank") - .textContent("PatternFly")) - .add(" without any JavaScript dependencies based on GWT/J2CL and ") - .add(a("https://github.com/hal/elemento", "_blank") - .textContent("Elemento")) - .add(".")))))); -``` - -PatternFly Java aims to provide almost complete support for all components, charts, extensions, and layouts. This showcase demonstrates all currently supported components and layouts. To get all the details about using PatternFly Java, look at the [API documentation](https://patternfly-java.github.io/apidocs/). diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/SelectComponent.java b/showcase/common/src/main/java/org/patternfly/showcase/component/SelectComponent.java deleted file mode 100644 index 053d87d3b..000000000 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/SelectComponent.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.patternfly.showcase.component; - -import org.jboss.elemento.router.Route; -import org.patternfly.component.menu.MultiSelect; -import org.patternfly.component.menu.MultiSelectMenu; -import org.patternfly.component.menu.SingleSelect; -import org.patternfly.component.menu.SingleSelectMenu; -import org.patternfly.showcase.Snippet; -import org.patternfly.showcase.SnippetPage; - -import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.p; -import static org.jboss.elemento.router.Link.link; -import static org.patternfly.component.menu.MenuContent.menuContent; -import static org.patternfly.component.menu.MenuGroup.menuGroup; -import static org.patternfly.component.menu.MenuItem.checkboxMenuItem; -import static org.patternfly.component.menu.MenuItem.linkMenuItem; -import static org.patternfly.component.menu.MenuItem.menuItem; -import static org.patternfly.component.menu.MenuList.menuList; -import static org.patternfly.component.menu.MenuToggle.menuToggle; -import static org.patternfly.component.menu.MultiSelect.multiSelect; -import static org.patternfly.component.menu.MultiSelectMenu.multiSelectCheckboxMenu; -import static org.patternfly.component.menu.MultiSelectMenu.multiSelectGroupMenu; -import static org.patternfly.component.menu.SingleSelect.singleSelect; -import static org.patternfly.component.menu.SingleSelectMenu.singleSelectMenu; -import static org.patternfly.icon.IconSets.fas.bell; -import static org.patternfly.showcase.ApiDoc.Type.component; -import static org.patternfly.showcase.Code.code; -import static org.patternfly.showcase.Data.components; -import static org.patternfly.showcase.Showcase.placeManager; - -@Route(value = "/components/menus/select", title = "Select") -public class SelectComponent extends SnippetPage { - - public SelectComponent() { - super(components.get("select")); - - startExamples(p() - .add("Select builds off of the menu component suite to adapt commonly used properties and functions to create a select menu. See the ") - .add(link(placeManager(), "/components/menus/menu").text("menu documentation")) - .add(" for a full list of properties that may be used to further customize a select menu.")); - addSnippet(new Snippet("single-select", "Single select", - code("single-select"), () -> - // @code-start:single-select - div() - .add(singleSelect("Select a value") - .style("width", "200px") - .addMenu(singleSelectMenu() - .addContent(menuContent() - .addList(menuList() - .addItem(menuItem("option-0", "Option 1")) - .addItem(menuItem("option-1", "Option 2")) - .addItem(menuItem("option-2", "Option 3")))))) - .element() - // @code-end:single-select - )); - - addSnippet(new Snippet("select-option-variants", "Select option variants", - code("select-option-variants"), () -> - // @code-start:select-option-variants - div() - .add(singleSelect("Select a value") - .style("width", "200px") - .addMenu(singleSelectMenu() - .addContent(menuContent() - .addList(menuList() - .addItem(menuItem("option-0", "Basic option")) - .addItem(menuItem("option-1", "Option with description") - .description("This is a description")) - .addItem(linkMenuItem("option-3", "Option with link", - placeManager().href("/components/menus/select")) - .external()) - .addItem(menuItem("option-4", "Option with icon") - .icon(bell())) - .addItem(menuItem("option-5", "Disabled options") - .disabled()) - .addItem(menuItem("option-6", - "See menu for additional variants")))))) - .element() - // @code-end:select-option-variants - )); - - addSnippet(new Snippet("multi-select", "Multi select", - code("multi-select"), () -> - // @code-start:multi-select - div() - .add(multiSelect("Filter by status") - .addMenu(multiSelectCheckboxMenu() - .addContent(menuContent() - .addList(menuList() - .addItem(checkboxMenuItem("debug", "Debug")) - .addItem(checkboxMenuItem("info", "Info")) - .addItem(checkboxMenuItem("warn", "Warn")) - .addItem(checkboxMenuItem("error", "Error") - .disabled()))))) - .element() - // @code-end:multi-select - )); - - addSnippet(new Snippet("groups", "Groups", - code("groups"), () -> - // @code-start:groups - div() - .add(multiSelect(menuToggle("Configuration")) - .addMenu(multiSelectGroupMenu() - .addContent(menuContent() - .addGroup(menuGroup("CPU") - .addList(menuList() - .addItem(menuItem("cpu-m3", "M3")) - .addItem(menuItem("cpu-m3-pro", "M3 Pro")) - .addItem(menuItem("cpu-m3-max", "M3 Max")))) - .addGroup(menuGroup("Memory") - .addList(menuList() - .addItem(menuItem("memory-32", "32 GB")) - .addItem(menuItem("memory-64", "64 GB")) - .addItem(menuItem("memory-128", "128 GB")))) - .addGroup(menuGroup("Storage") - .addList(menuList() - .addItem(menuItem("storage-512", "512 GB")) - .addItem(menuItem("storage-1024", "1 TB"))))))) - .element() - // @code-end:multi-select - )); - - startApiDocs(MultiSelect.class); - addApiDoc(MultiSelect.class, component); - addApiDoc(MultiSelectMenu.class, component); - addApiDoc(SingleSelect.class, component); - addApiDoc(SingleSelectMenu.class, component); - } -} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TextInputGroupComponent.java b/showcase/common/src/main/java/org/patternfly/showcase/component/TextInputGroupComponent.java deleted file mode 100644 index 63f6ddf1e..000000000 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TextInputGroupComponent.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2023 Red Hat - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.patternfly.showcase.component; - -import org.jboss.elemento.router.Route; -import org.patternfly.component.textinputgroup.TextInputGroup; -import org.patternfly.component.textinputgroup.TextInputGroupMain; -import org.patternfly.component.textinputgroup.TextInputGroupUtilities; -import org.patternfly.showcase.Snippet; -import org.patternfly.showcase.SnippetPage; - -import static org.jboss.elemento.Elements.div; -import static org.patternfly.component.textinputgroup.TextInputGroup.filterInputGroup; -import static org.patternfly.component.textinputgroup.TextInputGroup.searchInputGroup; -import static org.patternfly.component.textinputgroup.TextInputGroup.textInputGroup; -import static org.patternfly.component.textinputgroup.TextInputGroupMain.textInputGroupMain; -import static org.patternfly.showcase.ApiDoc.Type.component; -import static org.patternfly.showcase.ApiDoc.Type.subcomponent; -import static org.patternfly.showcase.Code.code; -import static org.patternfly.showcase.Data.components; - -@Route(value = "/components/text-input-group", title = "Text input group") -public class TextInputGroupComponent extends SnippetPage { - - public TextInputGroupComponent() { - super(components.get("text-input-group")); - - startExamples(); - addSnippet(new Snippet("tig-basic", "Basic", - code("tig-basic"), () -> - // @code-start:tig-basic - div() - .add(textInputGroup() - .addMain(textInputGroupMain("basic-text-input-group-0"))) - .element() - // @code-end:tig-basic - )); - - addSnippet(new Snippet("tig-disabled", "Disabled", - code("tig-disabled"), () -> - // @code-start:tig-disabled - div() - .add(textInputGroup() - .addMain(textInputGroupMain("disabled-text-input-group-0") - .value("Disabled")) - .disabled()) - .element() - // @code-end:tig-disabled - )); - - addSnippet(new Snippet("tig-utilities-and-icon", "Utilities and icon", - code("tig-utilities-and-icon"), () -> - // @code-start:tig-utilities-and-icon - div() - .add(searchInputGroup("Placeholder")) - .element() - // @code-end:tig-utilities-and-icon - )); - - addSnippet(new Snippet("tig-filters", "Filters", - code("tig-filters"), () -> - // @code-start:tig-filters - div() - .add(filterInputGroup("Placeholder")) - .element() - // @code-end:tig-filters - )); - - startApiDocs(TextInputGroup.class); - addApiDoc(TextInputGroup.class, component); - addApiDoc(TextInputGroupMain.class, subcomponent); - addApiDoc(TextInputGroupUtilities.class, subcomponent); - } -} diff --git a/showcase/common/src/main/module.gwt.xml b/showcase/common/src/main/module.gwt.xml deleted file mode 100644 index 50b75afa6..000000000 --- a/showcase/common/src/main/module.gwt.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/showcase/doc.java b/showcase/doc.java new file mode 100644 index 000000000..f14f163ee --- /dev/null +++ b/showcase/doc.java @@ -0,0 +1,172 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/// usr/bin/env jbang "$0" "$@" ; exit $? +//JAVA 24 +//JAVAC_OPTIONS --enable-preview -source 24 +//JAVA_OPTIONS --enable-preview +//DEPS com.vladsch.flexmark:flexmark-all:0.64.8 + +import com.vladsch.flexmark.html.HtmlRenderer; +import com.vladsch.flexmark.parser.Parser; +import com.vladsch.flexmark.util.ast.Node; +import com.vladsch.flexmark.util.data.MutableDataSet; + +static final String PACKAGE_NAME = "org.patternfly.showcase"; +static final String CLASS_NAME = "Documentation"; +static final String TARGET = "src/main/java"; + +void main(String... args) throws IOException { + if (args.length == 0 || args[0] == null || args[0].isEmpty()) { + System.err.println("Missing base directory!"); + System.exit(1); + } + Path base = Paths.get(args[0]).toAbsolutePath().normalize(); + + Path targetPath = base.resolve(TARGET).resolve(PACKAGE_NAME.replace('.', '/')); + Files.createDirectories(targetPath); + File javaSource = targetPath.resolve(CLASS_NAME + ".java").toFile(); + if (javaSource.exists() && !javaSource.delete()) { + throw new IOException("Unable to delete existing file: " + javaSource); + } + + StringBuilder out = new StringBuilder(); + startClass(out); + int counter = processDocuments(base, out); + endClass(out); + Files.write(javaSource.toPath(), out.toString().getBytes(StandardCharsets.UTF_8)); + + println("Processed " + counter + " documents"); +} + +void startClass(StringBuilder out) { + out.append("package ").append(PACKAGE_NAME).append(";\n\n") + .append("import java.util.Map;\n") + .append("import java.util.HashMap;\n\n") + .append("import javax.annotation.processing.Generated;\n\n") + .append("/*\n") + .append(" * WARNING! This class is generated. Do not modify.\n") + .append(" */\n") + .append("@Generated(\"doc.java\")\n") + .append("public final class ").append(CLASS_NAME).append(" {\n\n") + .append(" private static final Map documents = new HashMap<>();\n\n") + .append(" static {"); +} + +int processDocuments(Path base, StringBuilder out) throws IOException { + int counter = 0; + Path docDir = base.resolve("src/doc"); + if (!Files.isDirectory(docDir)) { + return 0; + } + List files = new ArrayList<>(); + try (Stream stream = Files.list(docDir)) { + stream.filter(p -> Files.isRegularFile(p) && p.getFileName().toString().endsWith(".md")).forEach(files::add); + } + files.sort(java.util.Comparator.naturalOrder()); + for (Path file : files) { + String name = file.getFileName().toString(); + String nameNoExt = name.endsWith(".md") ? name.substring(0, name.length() - 3) : name; + String markdown = Files.readString(file, StandardCharsets.UTF_8); + String html = markdownToHtm(markdown); + out.append("\n documents.put(\"") + .append(escapeJava(nameNoExt)) + .append("\", \"") + .append(escapeJava(stripBody(html))) + .append("\");"); + println("Processed " + name); + counter++; + } + return counter; +} + +void endClass(StringBuilder out) { + out.append("\n }\n\n") + .append(" public static String doc(String name) {\n") + .append(" return documents.getOrDefault(name, \"n/a\");\n") + .append(" }\n") + .append("}\n"); +} + +String markdownToHtm(String markdown) { + if (markdown == null) { + return ""; + } + MutableDataSet options = new MutableDataSet(); + Parser parser = Parser.builder(options).build(); + HtmlRenderer renderer = HtmlRenderer.builder(options).build(); + Node document = parser.parse(markdown); + String html = renderer.render(document); + return html; +} + +String inlineCode(String s) { + StringBuilder out = new StringBuilder(); + boolean code = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (c == '`') { + out.append(code ? "" : ""); + code = !code; + } else { + out.append(c); + } + } + if (code) { // unbalanced backtick + out.append(""); + } + return out.toString(); +} + +String stripBody(String html) { + if (html == null) {return "";} + // If the produced HTML happens to include ..., remove it. Our minimal converter doesn't add it, but keep behavior. + String lower = html.toLowerCase(Locale.ROOT); + int start = lower.indexOf(""); + int end = lower.lastIndexOf(""); + if (start >= 0 && end >= 0 && end >= start + 6) { + return html.substring(start + 6, end); + } + return html; +} + +String escapeJava(String in) { + if (in == null) {return "";} + StringBuilder sb = new StringBuilder(in.length()); + for (int i = 0; i < in.length(); i++) { + char c = in.charAt(i); + switch (c) { + case '"': + sb.append("\\\""); + break; + case '\\': + sb.append("\\\\"); + break; + case '\r': + sb.append("\\r"); + break; + case '\n': + sb.append("\\n"); + break; + case '\t': + sb.append("\\t"); + break; + default: + sb.append(c); + } + } + return sb.toString(); +} + diff --git a/showcase/gwt/.gitignore b/showcase/gwt/.gitignore deleted file mode 100644 index 9ba3d1b8c..000000000 --- a/showcase/gwt/.gitignore +++ /dev/null @@ -1 +0,0 @@ -key.pem \ No newline at end of file diff --git a/showcase/gwt/package-lock.json b/showcase/gwt/package-lock.json deleted file mode 100644 index a9b52d637..000000000 --- a/showcase/gwt/package-lock.json +++ /dev/null @@ -1,3380 +0,0 @@ -{ - "name": "patternfly-java-showcase-gwt", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "patternfly-java-showcase-gwt", - "dependencies": { - "@github/relative-time-element": "^4.4.3", - "@patternfly/patternfly": "^6.0.0", - "highlight.js": "^11.10.0", - "showcase-common": "file:../common/local_modules/showcase-common" - }, - "devDependencies": { - "@parcel/core": "^2.13.0", - "@parcel/reporter-cli": "^2.13.0", - "@parcel/resolver-glob": "^2.13.0", - "http-server": "^14.1.1", - "parcel": "^2.13.0", - "parcel-resolver-ignore": "^2.2.0" - } - }, - "../common/local_modules/showcase-common": { - "version": "3" - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@github/relative-time-element": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@github/relative-time-element/-/relative-time-element-4.4.3.tgz", - "integrity": "sha512-EVKokqx9/DdUAZ2l9WVyY51EtRCO2gQWWMvsRIn7r4glJ91q9CXcnILVHZVCpfD52ucXUhUvtYsAjNJ4qP4uIg==", - "license": "MIT" - }, - "node_modules/@lezer/common": { - "version": "1.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@lezer/lr": { - "version": "1.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@lmdb/lmdb-darwin-arm64": { - "version": "2.8.5", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@mischnic/json-sourcemap": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0", - "@lezer/lr": "^1.0.0", - "json5": "^2.2.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { - "version": "3.0.3", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@parcel/bundler-default": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.13.1.tgz", - "integrity": "sha512-PlTZFq2tygv3NcrpAopM8bO9BZU6NaZ/8AaNBVJo7HtLgfMUTamzLaYzpjusP3O/wyf1CglLoDhAnNH2exIz4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/graph": "3.3.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/codeframe": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.13.1.tgz", - "integrity": "sha512-CTtHH6Q7+B3goMTcPqopDHXOYkhdZNpRAlzAs1GUaWEDfUYzu3TgXScd4FAz61pOp2HZeDYeRbgvAUPsH1/9Ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/compressor-raw": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.13.1.tgz", - "integrity": "sha512-+EiS5Y0cbMvAGY4f4EPyJpOV9JvRIUbV5uZBXomeqXDg01oP26W68B5lQcsahURNeCewz2aNdIroHtYZNP/JIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/config-default": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.13.1.tgz", - "integrity": "sha512-XdPPayQB9SU56ubc5CAJdTGJ/UaoEOKoBmJiaRL0DfUVD4a6WVS5Ah+VDEerb1kd95XvEPX7gfPu84Pk9WOoPw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/bundler-default": "2.13.1", - "@parcel/compressor-raw": "2.13.1", - "@parcel/namer-default": "2.13.1", - "@parcel/optimizer-css": "2.13.1", - "@parcel/optimizer-htmlnano": "2.13.1", - "@parcel/optimizer-image": "2.13.1", - "@parcel/optimizer-svgo": "2.13.1", - "@parcel/optimizer-swc": "2.13.1", - "@parcel/packager-css": "2.13.1", - "@parcel/packager-html": "2.13.1", - "@parcel/packager-js": "2.13.1", - "@parcel/packager-raw": "2.13.1", - "@parcel/packager-svg": "2.13.1", - "@parcel/packager-wasm": "2.13.1", - "@parcel/reporter-dev-server": "2.13.1", - "@parcel/resolver-default": "2.13.1", - "@parcel/runtime-browser-hmr": "2.13.1", - "@parcel/runtime-js": "2.13.1", - "@parcel/runtime-react-refresh": "2.13.1", - "@parcel/runtime-service-worker": "2.13.1", - "@parcel/transformer-babel": "2.13.1", - "@parcel/transformer-css": "2.13.1", - "@parcel/transformer-html": "2.13.1", - "@parcel/transformer-image": "2.13.1", - "@parcel/transformer-js": "2.13.1", - "@parcel/transformer-json": "2.13.1", - "@parcel/transformer-postcss": "2.13.1", - "@parcel/transformer-posthtml": "2.13.1", - "@parcel/transformer-raw": "2.13.1", - "@parcel/transformer-react-refresh-wrap": "2.13.1", - "@parcel/transformer-svg": "2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/core": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.13.1.tgz", - "integrity": "sha512-RnGpyEbnuvry3nucCtMlNBkBAa3UQR/GnU836YrP2LtVmn0xRxhd3tjkbsG6iZgnheFrcUXpORTSSMhCrVnYDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mischnic/json-sourcemap": "^0.1.0", - "@parcel/cache": "2.13.1", - "@parcel/diagnostic": "2.13.1", - "@parcel/events": "2.13.1", - "@parcel/feature-flags": "2.13.1", - "@parcel/fs": "2.13.1", - "@parcel/graph": "3.3.1", - "@parcel/logger": "2.13.1", - "@parcel/package-manager": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/profiler": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/types": "2.13.1", - "@parcel/utils": "2.13.1", - "@parcel/workers": "2.13.1", - "base-x": "^3.0.8", - "browserslist": "^4.6.6", - "clone": "^2.1.1", - "dotenv": "^16.4.5", - "dotenv-expand": "^11.0.6", - "json5": "^2.2.0", - "msgpackr": "^1.9.9", - "nullthrows": "^1.1.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/core/node_modules/@parcel/cache": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.13.1.tgz", - "integrity": "sha512-jboNHpRjYpODEyDpIBZrOdeJrATKyRgM7C/dRWhnZHufNFaTdUVMWQLqgTrMY9GmdC9z+YfMh8AmzGTxV/6b9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/fs": "2.13.1", - "@parcel/logger": "2.13.1", - "@parcel/utils": "2.13.1", - "lmdb": "2.8.5" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/diagnostic": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.13.1.tgz", - "integrity": "sha512-1uwmipR59yPdx3jDF48IbhYruXO37Evcb3vM7bRCaPK6e3JjALjnLTeQaBI3iYaNPUzw8wYrtlC8vS3Iq+eahg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mischnic/json-sourcemap": "^0.1.0", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/events": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.13.1.tgz", - "integrity": "sha512-welKWzNOWEuILgs6w67zB1+aX6UB/6wIHnc37fCNXpBo1JQGsmyrndJMLcmiZSenB7IbqlYxdfQ2w7vvl/KOrw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/feature-flags": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/feature-flags/-/feature-flags-2.13.1.tgz", - "integrity": "sha512-7+/aI/7MP8aWX2Zm4eL+izYG2v8piIDgdTtZn5q7fHzot6rzdYrVsMg+RpaskWnB8YWEoITwt3ma8cp66o54lA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/fs": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.13.1.tgz", - "integrity": "sha512-CW6kPvkFi9xrRFe3X6BcHJ8wMnYVM13+8TbBVOlNE+jCIzR+WIYdEmu8Nald3QZiE2nC4hPfBxvejwr34dmHSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/feature-flags": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/types-internal": "2.13.1", - "@parcel/utils": "2.13.1", - "@parcel/watcher": "^2.0.7", - "@parcel/workers": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/graph": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-3.3.1.tgz", - "integrity": "sha512-OMEgJ0Cgnl2UdbQEhDap+ZLuNNqMl1hGjdDsCRMPNoeZsOYpmt5c82Kq/Tho9Wjmgkn3hilCTXqzeg0gGhcoCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/feature-flags": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/logger": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.13.1.tgz", - "integrity": "sha512-0Nh3iXMvBpNrPdDz8KbTPIdd2thaVUz76dRtvxwAO20jCKEWInxRvcRYWqcYEfq2Iq3GeaXJAXhuLOkeI56iVA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/events": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/markdown-ansi": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.13.1.tgz", - "integrity": "sha512-1nsgyQg1n2nUxXS1bvUkA5wzEfqb/qLwgwCGMwzSlJZPrG23YWKvXHLyB2wRFV1RTZ7uKHaCfbG45pY+LE0UIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/namer-default": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.13.1.tgz", - "integrity": "sha512-pNM1cqmi/8LPd77yQnuBwHVPMPcQEPRgG0FNqk+tC3OR2lsuj+MEnbEm/WQ6FsQ0LB/Xksa7jHtYygLqtxgO2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/node-resolver-core": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-3.4.1.tgz", - "integrity": "sha512-GGuLD/iFi7vnzL0b1cEt6oHNHtO8revWVOHlaDMNXnQkyBthVtgmYf3kX0q8TSvz7OfTdU4V2POHCfnlHqO8Nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mischnic/json-sourcemap": "^0.1.0", - "@parcel/diagnostic": "2.13.1", - "@parcel/fs": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-css": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.13.1.tgz", - "integrity": "sha512-RMcwaKPPB6OQ9xcqzj2ZeC6LdbqFVOwOaLOHlmj6wpkeH2CApKU5iTeUcu5JLrRE55fVVFuUgZVCUIicRokMXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.1", - "browserslist": "^4.6.6", - "lightningcss": "^1.22.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-htmlnano": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.13.1.tgz", - "integrity": "sha512-XwLs64knPT04tFO1bsLwHbUWfL1R8aDiXvSzU9/ini8vwyfVJcn+QmZXfxfGMzvMuOhQljNQYSrXro+RKpWtHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "htmlnano": "^2.0.0", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-image": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.13.1.tgz", - "integrity": "sha512-b1oD5lW0Up7WOYVYnzPG0aOl9rdS1+Sp9aulJXpVswU8l0UbRA1fBWs+UU9dEa12u4sx6pK3mrTpps7GPbIKyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/utils": "2.13.1", - "@parcel/workers": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/optimizer-svgo": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-svgo/-/optimizer-svgo-2.13.1.tgz", - "integrity": "sha512-iuK9/Fw5GARjIgYdZMoumQ1wbRtNgvR++/OdjJJQxYDigoYRi9MD4t/X0ZJbAhvXoKbEjU7Rjm1Mreo7rGb7+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-swc": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-swc/-/optimizer-swc-2.13.1.tgz", - "integrity": "sha512-5reTNnFqmXZji0cpVCirRsB8jJCXhdfQwa7yRUDsA420PXcJOwr4PZ5azW3KJQVfF/qSN/Tu1Fm5fPHj/HTHKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.1", - "@swc/core": "^1.7.26", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/package-manager": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.13.1.tgz", - "integrity": "sha512-Mg5G6v6K1xA6ZkgVWCRN4cjErshFhms+QLENLNRAVIs6y3oNXNth9jGtD/DV5kWnxUO9RMC7HMP90UNy9iPdkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/fs": "2.13.1", - "@parcel/logger": "2.13.1", - "@parcel/node-resolver-core": "3.4.1", - "@parcel/types": "2.13.1", - "@parcel/utils": "2.13.1", - "@parcel/workers": "2.13.1", - "@swc/core": "^1.7.26", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/packager-css": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.13.1.tgz", - "integrity": "sha512-jGYvQKIP8vIAQNJEULBgGaaUo2rSF8Gl6fkkIAjo4QUxWSKtxkK+ciVPg1UK809IGmAIrKmi+XLSEO3mTRFobg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.1", - "lightningcss": "^1.22.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-html": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.13.1.tgz", - "integrity": "sha512-PZvmf8aD8Wh7cJQiAzDT1fKACZfINvXtV45715uFsh38ehgQENr10CYuZ6mo8q/62K+h9XLVZDZs4/sEMSLZWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/types": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-js": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.13.1.tgz", - "integrity": "sha512-c41p7U6WnZ3AIYXOzCJBx2djpZZIL7t5vnf4UWxRHLA6scEPR2K8I0CtVlM2EHuxm8Ls1MTv0kn7jRJ5ddXqFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/types": "2.13.1", - "@parcel/utils": "2.13.1", - "globals": "^13.2.0", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-raw": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.13.1.tgz", - "integrity": "sha512-jEmI1spGgTmg1c1ouNmlglnVBovzpH5TfMgn7ha8tPq9yRQL+Lqq2tdf2SW+ulV3j/gSZ8ExrSKRVIvz1aFWIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-svg": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.13.1.tgz", - "integrity": "sha512-I3SiO4uU6RIqmMXREYD5pSExpsATDZ0EI7ggABREYo5uZmJOhlH/h0x9rIAagq94LHW6juposY4n40E1fH/k4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/types": "2.13.1", - "@parcel/utils": "2.13.1", - "posthtml": "^0.16.4" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-wasm": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/packager-wasm/-/packager-wasm-2.13.1.tgz", - "integrity": "sha512-/hORMiiw4X6OXdyTepKiKGr0puZ6IKT7iy6xfega/nkQF04sGQS00HJLqQeC5PlqHPbeouq8G8kuS6EQdWJEPA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1" - }, - "engines": { - "node": ">=16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/plugin": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.13.1.tgz", - "integrity": "sha512-bagkxPnZlLDsWjPICdfurZixaWD9bAfta2jbSSkK0ng+qXc+p+tq2d8SIgtFbv5tURHBiWDCTNDmM1KhYAKZGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/types": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/profiler": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/profiler/-/profiler-2.13.1.tgz", - "integrity": "sha512-6K6N9RGIg/d4t+htiTqNV0DMWr/UgdDQ10ilc/ZsgclqPj/FBYJ5xhxyHDpeJYRdgJ3ob6pyGS60KuiqIWxi3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/events": "2.13.1", - "@parcel/types-internal": "2.13.1", - "chrome-trace-event": "^1.0.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/reporter-cli": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.13.1.tgz", - "integrity": "sha512-hwENFwzpSGv1Tvm3am28oiPZtZVdETHmN+KBhtZzQXNhYfLc8anaoiU2l6I/zR57Nt+WYaY6Bn3JhDWuwPfuOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/types": "2.13.1", - "@parcel/utils": "2.13.1", - "chalk": "^4.1.2", - "term-size": "^2.2.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/reporter-dev-server": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.13.1.tgz", - "integrity": "sha512-x5nLZINfej6qgTr5VEf48jIAvjP43LcDu1i7NuP+9Dgv+UrDcw2WrUXlq1Q3j+LBU76Bubxx8QfYAmK+0qLlkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/reporter-tracer": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/reporter-tracer/-/reporter-tracer-2.13.1.tgz", - "integrity": "sha512-psIefk9AXe8EXFL5qumsrOkZPsZ81uj21d0GyPq64o69x0bRqOq+67EJnOnLKUPDZqAHzf5HSHC2+GfUpigN1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "chrome-trace-event": "^1.0.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/resolver-default": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.13.1.tgz", - "integrity": "sha512-cn4yLH0ILYMhT6bB7Zbm2CKkOPdxoj0p+bk67iLAcw9yXpVZkE610fJeOop1+L2ZVU0mQCZ8c8zkqGBwcJbp6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/node-resolver-core": "3.4.1", - "@parcel/plugin": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/resolver-glob": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/resolver-glob/-/resolver-glob-2.13.1.tgz", - "integrity": "sha512-N9TLbpYgynnnSUBqb2dw+wazVXTrsK9OHJd7ep4BN51tqTMf0v8PFrZSVSKM/3ZqcZXI4LLykCdk/0TeaVa6jA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/node-resolver-core": "3.4.1", - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-browser-hmr": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.13.1.tgz", - "integrity": "sha512-VFVsf4XzZ18d/OD7Fnts1lFD8TxNWC40BkxmgUMpLoN5UeAwgmgGdD10ODXCA0mJew+JjoJOhsSm0xCk/DF5Nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-js": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.13.1.tgz", - "integrity": "sha512-dX7HbpCw/PI8iel3Wm9+YOSpmShiAAZYZlA3QTmeHsgBYl9t6M8mQpC8/cbHuPrJRM7Ot1SU1+/FtvJdw6VsKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-react-refresh": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.13.1.tgz", - "integrity": "sha512-Bi21IHrf0GIhv83eGF218u1m3e4T1OYWy9bwGWndpVcZhMNFMk5rOtM4sq66tF2vY0XUuEokxFUQ4M/UwQKVYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "react-error-overlay": "6.0.9", - "react-refresh": ">=0.9 <=0.14" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-service-worker": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.13.1.tgz", - "integrity": "sha512-3BXvi9csUAVsziaIOCr1cXdqRSrCMJ6y7Vx9axRYcjasNWC8rHYFnNvMniHZJ99j+Jqibp+ZQTZ7UA1XiqG3dQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/rust": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/rust/-/rust-2.13.1.tgz", - "integrity": "sha512-32YgI6vLaKMD5Z8Y2aWIBIDc6qfbsUl1bQzk5/xu0CMvYsCp4FKCD0NLOFhkqF4dN5kQ/cN0tNQEJjYyJ8LDiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/source-map": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3" - }, - "engines": { - "node": "^12.18.3 || >=14" - } - }, - "node_modules/@parcel/transformer-babel": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.13.1.tgz", - "integrity": "sha512-ZpwN7wLqnDnCTMquPH2yqxuGoalOfCWUWkzCJ+Air0M0+lMZ84zg7tNvJZDd8vEWSCpDFh6HS0GcJ83txcliWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.1", - "browserslist": "^4.6.6", - "json5": "^2.2.0", - "nullthrows": "^1.1.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-css": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.13.1.tgz", - "integrity": "sha512-o1HBtkJBz1tnqZJbRNKcxXtDnXERNOxKsr8yL0WNydeJDK4ionV7sJ5nGJsAFaLU4GaSy/+XTNqXhVHHjZldxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.1", - "browserslist": "^4.6.6", - "lightningcss": "^1.22.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-html": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.13.1.tgz", - "integrity": "sha512-Q6/13iLC8gZTncsFvDlbZQaBhKFyjXmZCmxxpFhmLeQ+P1HcArAPQbNKUdtR2bhtpQVpw3XK3E3WT5kn0s6fJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5", - "posthtml-parser": "^0.12.1", - "posthtml-render": "^3.0.0", - "semver": "^7.5.2", - "srcset": "4" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-html/node_modules/srcset": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-4.0.0.tgz", - "integrity": "sha512-wvLeHgcVHKO8Sc/H/5lkGreJQVeYMm9rlmt8PuR1xE31rIuXhuzznUUqAt8MqLhB3MqJdFzlNAfpcWnxiFUcPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@parcel/transformer-image": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.13.1.tgz", - "integrity": "sha512-NhnpgUB/v7n9MrBnppoHJK/byP0zpcCGepplPRUDUAQVA7Aj5D2V6AJkdvIkoFABF07rbMGdbF6/amZ8tr1aNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "@parcel/workers": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/transformer-js": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.13.1.tgz", - "integrity": "sha512-/KHp3Em1KAxVxDJtcD4JiS3lMley+mrnpOLSYdzwxEcAZZEJ0rz1B/SEWB4fL+vJONUVTfmniB71YNr27XMCEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.1", - "@parcel/workers": "2.13.1", - "@swc/helpers": "^0.5.0", - "browserslist": "^4.6.6", - "nullthrows": "^1.1.1", - "regenerator-runtime": "^0.14.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@parcel/transformer-json": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.13.1.tgz", - "integrity": "sha512-LQSCwPwh+BE8OYntq1t/2XsgEIjcfGmO6QI50CSoDTAF0o5rVMks6v1nPwd3FnHvLDmlz7KvO9VUrwxcETJvYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "json5": "^2.2.0" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-postcss": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.13.1.tgz", - "integrity": "sha512-Coc7u0HZmSMN0IyPR1DD//WwWbe8QKMep40zl3zDoGsIOxDfzVt/rjp5FMQYPc2Pdm8koezP5qaWpwT7eJgutQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/utils": "2.13.1", - "clone": "^2.1.1", - "nullthrows": "^1.1.1", - "postcss-value-parser": "^4.2.0", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-posthtml": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.13.1.tgz", - "integrity": "sha512-piWJ3iGBsxVnSP1BchBagIGydAO+kws1s4kPv33O9FdnqePfAgjYB8nkEGxnbTR1VtwhvPsexrCevX1Us8FpNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5", - "posthtml-parser": "^0.12.1", - "posthtml-render": "^3.0.0", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-raw": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.13.1.tgz", - "integrity": "sha512-x/osS3E6qJVjppyXUKuaK8PSj0rz+FJ4MwtVtj4Q8W2tqlp6ilaeJBbkppW2dAlCm6jy1bGEvZsCk1QwrewRXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-react-refresh-wrap": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.13.1.tgz", - "integrity": "sha512-dyDQG0GZOdsm+/6Hv+jgL3mt/Oa8bBGQOc/DM/hBAqDXahtJGxn2f52R+s5luwDfj2qUiu8PWIIN5yVu8Kqe+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.1", - "@parcel/utils": "2.13.1", - "react-refresh": ">=0.9 <=0.14" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-svg": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.13.1.tgz", - "integrity": "sha512-wOqghpTzVqtwOWUHYfRaBfp1ZEnFpaknzhhOvUwspRC2djL5FaKqwNUrY4mkZdxtax6g0FL3bt6M0wC7xyGRFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/plugin": "2.13.1", - "@parcel/rust": "2.13.1", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5", - "posthtml-parser": "^0.12.1", - "posthtml-render": "^3.0.0", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/types": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.13.1.tgz", - "integrity": "sha512-ISSKEPW+JngnPJkR0Qvx8Bi59zNT4B6uFBPvtNTOu3Tapjljv0oI+fSSV3tN3xfPs62rxCoXTu+b3nzREyBNLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/types-internal": "2.13.1", - "@parcel/workers": "2.13.1" - } - }, - "node_modules/@parcel/types-internal": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/types-internal/-/types-internal-2.13.1.tgz", - "integrity": "sha512-uY5lPDsinnyuk4qbvi04sQx2Zx0oBzjFZzhbWFcH2jWAWasHukK0w0wgLVXfGfP9hvgc/TIBgugCkvLbVJR1Iw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/feature-flags": "2.13.1", - "@parcel/source-map": "^2.1.1", - "utility-types": "^3.10.0" - } - }, - "node_modules/@parcel/utils": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.13.1.tgz", - "integrity": "sha512-GX/iV5owV92AfYvCCWbQURVWCDla5ExH2vPcNRqI4PG1d9SXbXJetbe0uqmeVz1MtA/F9+HBck/GP1TEa8WWcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/codeframe": "2.13.1", - "@parcel/diagnostic": "2.13.1", - "@parcel/logger": "2.13.1", - "@parcel/markdown-ansi": "2.13.1", - "@parcel/rust": "2.13.1", - "@parcel/source-map": "^2.1.1", - "chalk": "^4.1.2", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.4.1", - "@parcel/watcher-darwin-arm64": "2.4.1", - "@parcel/watcher-darwin-x64": "2.4.1", - "@parcel/watcher-freebsd-x64": "2.4.1", - "@parcel/watcher-linux-arm-glibc": "2.4.1", - "@parcel/watcher-linux-arm64-glibc": "2.4.1", - "@parcel/watcher-linux-arm64-musl": "2.4.1", - "@parcel/watcher-linux-x64-glibc": "2.4.1", - "@parcel/watcher-linux-x64-musl": "2.4.1", - "@parcel/watcher-win32-arm64": "2.4.1", - "@parcel/watcher-win32-ia32": "2.4.1", - "@parcel/watcher-win32-x64": "2.4.1" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.4.1", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher/node_modules/node-addon-api": { - "version": "7.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@parcel/workers": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.13.1.tgz", - "integrity": "sha512-uNIksZaiU46qZMXqN9jYTvsPx9rjO4kNwkjLind29tj7mCYXm40I2YR9TV6IY5kvtN4WLMC1dz4Hot2vwc8JBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.1", - "@parcel/logger": "2.13.1", - "@parcel/profiler": "2.13.1", - "@parcel/types-internal": "2.13.1", - "@parcel/utils": "2.13.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.1" - } - }, - "node_modules/@patternfly/patternfly": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.0.0.tgz", - "integrity": "sha512-Mn92Tt/4okSj1COGCJrgUgh390OOaFCWf0tL0WmigDNUecSHNn1D6Vhpd1hxHQBXvre9eWorzxV2b9yhSEl79Q==", - "license": "MIT" - }, - "node_modules/@swc/core": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.9.3.tgz", - "integrity": "sha512-oRj0AFePUhtatX+BscVhnzaAmWjpfAeySpM1TCbxA1rtBDeH/JDhi5yYzAKneDYtVtBvA7ApfeuzhMC9ye4xSg==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.17" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.9.3", - "@swc/core-darwin-x64": "1.9.3", - "@swc/core-linux-arm-gnueabihf": "1.9.3", - "@swc/core-linux-arm64-gnu": "1.9.3", - "@swc/core-linux-arm64-musl": "1.9.3", - "@swc/core-linux-x64-gnu": "1.9.3", - "@swc/core-linux-x64-musl": "1.9.3", - "@swc/core-win32-arm64-msvc": "1.9.3", - "@swc/core-win32-ia32-msvc": "1.9.3", - "@swc/core-win32-x64-msvc": "1.9.3" - }, - "peerDependencies": { - "@swc/helpers": "*" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.9.3.tgz", - "integrity": "sha512-hGfl/KTic/QY4tB9DkTbNuxy5cV4IeejpPD4zo+Lzt4iLlDWIeANL4Fkg67FiVceNJboqg48CUX+APhDHO5G1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.9.3.tgz", - "integrity": "sha512-IaRq05ZLdtgF5h9CzlcgaNHyg4VXuiStnOFpfNEMuI5fm5afP2S0FHq8WdakUz5WppsbddTdplL+vpeApt/WCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.9.3.tgz", - "integrity": "sha512-Pbwe7xYprj/nEnZrNBvZfjnTxlBIcfApAGdz2EROhjpPj+FBqBa3wOogqbsuGGBdCphf8S+KPprL1z+oDWkmSQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.9.3.tgz", - "integrity": "sha512-AQ5JZiwNGVV/2K2TVulg0mw/3LYfqpjZO6jDPtR2evNbk9Yt57YsVzS+3vHSlUBQDRV9/jqMuZYVU3P13xrk+g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.9.3.tgz", - "integrity": "sha512-tzVH480RY6RbMl/QRgh5HK3zn1ZTFsThuxDGo6Iuk1MdwIbdFYUY034heWUTI4u3Db97ArKh0hNL0xhO3+PZdg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.9.3.tgz", - "integrity": "sha512-ivXXBRDXDc9k4cdv10R21ccBmGebVOwKXT/UdH1PhxUn9m/h8erAWjz5pcELwjiMf27WokqPgaWVfaclDbgE+w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.9.3.tgz", - "integrity": "sha512-ILsGMgfnOz1HwdDz+ZgEuomIwkP1PHT6maigZxaCIuC6OPEhKE8uYna22uU63XvYcLQvZYDzpR3ms47WQPuNEg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.9.3.tgz", - "integrity": "sha512-e+XmltDVIHieUnNJHtspn6B+PCcFOMYXNJB1GqoCcyinkEIQNwC8KtWgMqUucUbEWJkPc35NHy9k8aCXRmw9Kg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.9.3.tgz", - "integrity": "sha512-rqpzNfpAooSL4UfQnHhkW8aL+oyjqJniDP0qwZfGnjDoJSbtPysHg2LpcOBEdSnEH+uIZq6J96qf0ZFD8AGfXA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.9.3.tgz", - "integrity": "sha512-3YJJLQ5suIEHEKc1GHtqVq475guiyqisKSoUnoaRtxkDaW5g1yvPt9IoSLOe2mRs7+FFhGGU693RsBUSwOXSdQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@swc/helpers": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", - "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.8.0" - } - }, - "node_modules/@swc/types": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", - "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/async": { - "version": "2.6.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/base-x": { - "version": "3.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/base-x/node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.2", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001644", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/corser": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dotenv-expand": { - "version": "11.0.7", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", - "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dotenv": "^16.4.5" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.3", - "dev": true, - "license": "ISC" - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-port": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/highlight.js": { - "version": "11.10.0", - "license": "BSD-3-Clause", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/htmlnano": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-2.1.1.tgz", - "integrity": "sha512-kAERyg/LuNZYmdqgCdYvugyLWNFAm8MWXpQMz1pLpetmCbFwoMxvkSoaAMlFrOC4OKTWI4KlZGT/RsNxg4ghOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cosmiconfig": "^9.0.0", - "posthtml": "^0.16.5", - "timsort": "^0.3.0" - }, - "peerDependencies": { - "cssnano": "^7.0.0", - "postcss": "^8.3.11", - "purgecss": "^6.0.0", - "relateurl": "^0.2.7", - "srcset": "5.0.1", - "svgo": "^3.0.2", - "terser": "^5.10.0", - "uncss": "^0.17.3" - }, - "peerDependenciesMeta": { - "cssnano": { - "optional": true - }, - "postcss": { - "optional": true - }, - "purgecss": { - "optional": true - }, - "relateurl": { - "optional": true - }, - "srcset": { - "optional": true - }, - "svgo": { - "optional": true - }, - "terser": { - "optional": true - }, - "uncss": { - "optional": true - } - } - }, - "node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "dev": true, - "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-server": { - "version": "14.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "basic-auth": "^2.0.1", - "chalk": "^4.1.2", - "corser": "^2.0.1", - "he": "^1.2.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy": "^1.18.1", - "mime": "^1.6.0", - "minimist": "^1.2.6", - "opener": "^1.5.1", - "portfinder": "^1.0.28", - "secure-compare": "3.0.1", - "union": "~0.5.0", - "url-join": "^4.0.1" - }, - "bin": { - "http-server": "bin/http-server" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-json": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", - "integrity": "sha512-6BEnpVn1rcf3ngfmViLM6vjUjGErbdrL4rwlv+u1NO1XO8kqT4YGL8+19Q+Z/bas8tY90BTWMk2+fW1g6hQjbA==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lightningcss": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.2.tgz", - "integrity": "sha512-ePLRrbt3fgjXI5VFZOLbvkLD5ZRuxGKm+wJ3ujCqBtL3NanDHPo/5zicR5uEKAPiIjBYF99BM4K4okvMznjkVA==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^1.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-darwin-arm64": "1.28.2", - "lightningcss-darwin-x64": "1.28.2", - "lightningcss-freebsd-x64": "1.28.2", - "lightningcss-linux-arm-gnueabihf": "1.28.2", - "lightningcss-linux-arm64-gnu": "1.28.2", - "lightningcss-linux-arm64-musl": "1.28.2", - "lightningcss-linux-x64-gnu": "1.28.2", - "lightningcss-linux-x64-musl": "1.28.2", - "lightningcss-win32-arm64-msvc": "1.28.2", - "lightningcss-win32-x64-msvc": "1.28.2" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.28.2.tgz", - "integrity": "sha512-/8cPSqZiusHSS+WQz0W4NuaqFjquys1x+NsdN/XOHb+idGHJSoJ7SoQTVl3DZuAgtPZwFZgRfb/vd1oi8uX6+g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.28.2.tgz", - "integrity": "sha512-R7sFrXlgKjvoEG8umpVt/yutjxOL0z8KWf0bfPT3cYMOW4470xu5qSHpFdIOpRWwl3FKNMUdbKtMUjYt0h2j4g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.28.2.tgz", - "integrity": "sha512-l2qrCT+x7crAY+lMIxtgvV10R8VurzHAoUZJaVFSlHrN8kRLTvEg9ObojIDIexqWJQvJcVVV3vfzsEynpiuvgA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.28.2.tgz", - "integrity": "sha512-DKMzpICBEKnL53X14rF7hFDu8KKALUJtcKdFUCW5YOlGSiwRSgVoRjM97wUm/E0NMPkzrTi/rxfvt7ruNK8meg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.28.2.tgz", - "integrity": "sha512-nhfjYkfymWZSxdtTNMWyhFk2ImUm0X7NAgJWFwnsYPOfmtWQEapzG/DXZTfEfMjSzERNUNJoQjPAbdqgB+sjiw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.28.2.tgz", - "integrity": "sha512-1SPG1ZTNnphWvAv8RVOymlZ8BDtAg69Hbo7n4QxARvkFVCJAt0cgjAw1Fox0WEhf4PwnyoOBaVH0Z5YNgzt4dA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.28.2.tgz", - "integrity": "sha512-ZhQy0FcO//INWUdo/iEdbefntTdpPVQ0XJwwtdbBuMQe+uxqZoytm9M+iqR9O5noWFaxK+nbS2iR/I80Q2Ofpg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.28.2.tgz", - "integrity": "sha512-alb/j1NMrgQmSFyzTbN1/pvMPM+gdDw7YBuQ5VSgcFDypN3Ah0BzC2dTZbzwzaMdUVDszX6zH5MzjfVN1oGuww==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.28.2.tgz", - "integrity": "sha512-WnwcjcBeAt0jGdjlgbT9ANf30pF0C/QMb1XnLnH272DQU8QXh+kmpi24R55wmWBwaTtNAETZ+m35ohyeMiNt+g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.28.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.28.2.tgz", - "integrity": "sha512-3piBifyT3avz22o6mDKywQC/OisH2yDK+caHWkiMsF82i3m5wDBadyCjlCQ5VNgzYkxrWZgiaxHDdd5uxsi0/A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lmdb": { - "version": "2.8.5", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "msgpackr": "^1.9.5", - "node-addon-api": "^6.1.0", - "node-gyp-build-optional-packages": "5.1.1", - "ordered-binary": "^1.4.1", - "weak-lru-cache": "^1.2.2" - }, - "bin": { - "download-lmdb-prebuilds": "bin/download-prebuilds.js" - }, - "optionalDependencies": { - "@lmdb/lmdb-darwin-arm64": "2.8.5", - "@lmdb/lmdb-darwin-x64": "2.8.5", - "@lmdb/lmdb-linux-arm": "2.8.5", - "@lmdb/lmdb-linux-arm64": "2.8.5", - "@lmdb/lmdb-linux-x64": "2.8.5", - "@lmdb/lmdb-win32-x64": "2.8.5" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/msgpackr": { - "version": "1.11.0", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "msgpackr-extract": "^3.0.2" - } - }, - "node_modules/msgpackr-extract": { - "version": "3.0.3", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "node-gyp-build-optional-packages": "5.2.2" - }, - "bin": { - "download-msgpackr-prebuilds": "bin/download-prebuilds.js" - }, - "optionalDependencies": { - "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", - "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" - } - }, - "node_modules/msgpackr-extract/node_modules/detect-libc": { - "version": "2.0.3", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^2.0.1" - }, - "bin": { - "node-gyp-build-optional-packages": "bin.js", - "node-gyp-build-optional-packages-optional": "optional.js", - "node-gyp-build-optional-packages-test": "build-test.js" - } - }, - "node_modules/node-addon-api": { - "version": "6.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-gyp-build-optional-packages": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.1" - }, - "bin": { - "node-gyp-build-optional-packages": "bin.js", - "node-gyp-build-optional-packages-optional": "optional.js", - "node-gyp-build-optional-packages-test": "build-test.js" - } - }, - "node_modules/node-gyp-build-optional-packages/node_modules/detect-libc": { - "version": "2.0.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.18", - "dev": true, - "license": "MIT" - }, - "node_modules/nullthrows": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "dev": true, - "license": "(WTFPL OR MIT)", - "bin": { - "opener": "bin/opener-bin.js" - } - }, - "node_modules/ordered-binary": { - "version": "1.5.1", - "dev": true, - "license": "MIT" - }, - "node_modules/parcel": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.13.1.tgz", - "integrity": "sha512-SkBcKtBPWVdLHd2a38ApiHuiMzHBcg46srogVz/QaoOf7v3wP8zs7Db2GXXAUBkd19dRMIOQYSW6EegJrpoHQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/config-default": "2.13.1", - "@parcel/core": "2.13.1", - "@parcel/diagnostic": "2.13.1", - "@parcel/events": "2.13.1", - "@parcel/feature-flags": "2.13.1", - "@parcel/fs": "2.13.1", - "@parcel/logger": "2.13.1", - "@parcel/package-manager": "2.13.1", - "@parcel/reporter-cli": "2.13.1", - "@parcel/reporter-dev-server": "2.13.1", - "@parcel/reporter-tracer": "2.13.1", - "@parcel/utils": "2.13.1", - "chalk": "^4.1.2", - "commander": "^12.1.0", - "get-port": "^4.2.0" - }, - "bin": { - "parcel": "lib/bin.js" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/parcel-resolver-ignore": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "^2.10.3" - }, - "engines": { - "parcel": ">=2.9.0" - }, - "funding": { - "url": "https://ko-fi.com/vladimirmikulic" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/picocolors": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/portfinder": { - "version": "1.0.32", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/posthtml": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.6.tgz", - "integrity": "sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "posthtml-parser": "^0.11.0", - "posthtml-render": "^3.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/posthtml-parser": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.12.1.tgz", - "integrity": "sha512-rYFmsDLfYm+4Ts2Oh4DCDSZPtdC1BLnRXAobypVzX9alj28KGl65dIFtgDY9zB57D0TC4Qxqrawuq/2et1P0GA==", - "dev": true, - "license": "MIT", - "dependencies": { - "htmlparser2": "^9.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/posthtml-render": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", - "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-json": "^2.0.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/posthtml/node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "license": "BSD-2-Clause", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" - } - }, - "node_modules/posthtml/node_modules/posthtml-parser": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.11.0.tgz", - "integrity": "sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "htmlparser2": "^7.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/qs": { - "version": "6.12.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/react-error-overlay": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", - "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==", - "dev": true, - "license": "MIT" - }, - "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, - "license": "MIT" - }, - "node_modules/requires-port": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/secure-compare": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/showcase-common": { - "resolved": "../common/local_modules/showcase-common", - "link": true - }, - "node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/srcset": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-5.0.1.tgz", - "integrity": "sha512-/P1UYbGfJVlxZag7aABNRrulEXAwCSDo7fklafOQrantuPTDmYgijJMks2zusPCVzgW9+4P69mq7w6pYuZpgxw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/term-size": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==", - "dev": true, - "license": "MIT" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/union": { - "version": "0.5.0", - "dev": true, - "dependencies": { - "qs": "^6.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.0", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/url-join": { - "version": "4.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/utility-types": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", - "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/weak-lru-cache": { - "version": "1.2.2", - "dev": true, - "license": "MIT" - }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - } - } -} diff --git a/showcase/gwt/package.json b/showcase/gwt/package.json deleted file mode 100644 index dcb4c48f5..000000000 --- a/showcase/gwt/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "patternfly-java-showcase-gwt", - "private": true, - "parcelIgnore": [ - "showcase.nocache.js" - ], - "source": "src/web/index.html", - "scripts": { - "dev": "parcel build --dist-dir target/gwt/devmode/war/showcase --no-optimize --public-url /showcase", - "prod": "parcel build --dist-dir target/showcase", - "http-server": "http-server target/showcase --ssl --cert cert.pem -o" - }, - "devDependencies": { - "@parcel/core": "^2.13.0", - "@parcel/reporter-cli": "^2.13.0", - "@parcel/resolver-glob": "^2.13.0", - "http-server": "^14.1.1", - "parcel": "^2.13.0", - "parcel-resolver-ignore": "^2.2.0" - }, - "dependencies": { - "@github/relative-time-element": "^4.4.3", - "@patternfly/patternfly": "^6.0.0", - "highlight.js": "^11.10.0", - "showcase-common": "file:../common/local_modules/showcase-common" - } -} diff --git a/showcase/gwt/pom.xml b/showcase/gwt/pom.xml deleted file mode 100644 index 7b239bf09..000000000 --- a/showcase/gwt/pom.xml +++ /dev/null @@ -1,232 +0,0 @@ - - - - 4.0.0 - - - org.patternfly - patternfly-java-showcase - 0.2.12-SNAPSHOT - ../pom.xml - - - patternfly-java-showcase-gwt - gwt-app - PatternFly Java Showcase GWT - - - /showcase - gwt - - - - - - ${project.groupId} - patternfly-java-codeeditor - ${project.version} - sources - - - ${project.groupId} - patternfly-java-components - ${project.version} - sources - - - ${project.groupId} - patternfly-java-core - ${project.version} - sources - - - ${project.groupId} - patternfly-java-icons - ${project.version} - sources - - - ${project.groupId} - patternfly-java-layouts - ${project.version} - sources - - - - - ${project.groupId} - patternfly-java-gwt - - - ${project.groupId} - patternfly-java-gwt - sources - - - ${project.groupId} - patternfly-java-showcase-common - - - ${project.groupId} - patternfly-java-showcase-common - sources - - - - com.google.elemental2 - elemental2-dom - 1.2.3 - - - org.gwtproject - gwt-user - - - org.gwtproject - gwt-dev - - - - - - - org.apache.maven.plugins - maven-clean-plugin - - - - .parcel-cache - - - - - - com.github.eirslett - frontend-maven-plugin - - - install-node-and-npm - generate-resources - - install-node-and-npm - - - ${version.node} - - - - npm-install - generate-resources - - npm - - - install - - - - npm-parcel - generate-resources - - npm - - - run ${npm.script} - - - - http-server - - npm - - none - - run http-server - - - - - - net.ltgt.gwt.maven - gwt-maven-plugin - - - -startupUrl - showcase/index.html - -setProperty - settings.base=${settings.base} - -setProperty - settings.mode=${settings.mode} - -setProperty - settings.tech=${settings.tech} - -generateJsInteropExports - - - -setProperty - settings.base=${settings.base} - -setProperty - settings.mode=${settings.mode} - -setProperty - settings.tech=${settings.tech} - -generateJsInteropExports - - ${gwt.draftCompile} - org.patternfly.Showcase - showcase - ${java.version} - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-compiled-gwt-artifacts - - run - - prepare-package - - - - - - - - - - - - - - - - prod - - / - - - - diff --git a/showcase/gwt/src/main/module.gwt.xml b/showcase/gwt/src/main/module.gwt.xml deleted file mode 100644 index da870c2ae..000000000 --- a/showcase/gwt/src/main/module.gwt.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/showcase/gwt/src/web/index.html b/showcase/gwt/src/web/index.html deleted file mode 100644 index a42f63fe1..000000000 --- a/showcase/gwt/src/web/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - PatternFly Java - - - - - - - - - - diff --git a/showcase/images.js b/showcase/images.js new file mode 100644 index 000000000..9428bba36 --- /dev/null +++ b/showcase/images.js @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as fs from 'fs'; +import * as path from 'path'; +import { fileURLToPath } from 'url'; +import https from 'https'; +import puppeteer from 'puppeteer'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const url = 'https://www.patternfly.org/components/all-components'; +const selector = '.pf-v6-l-gallery .pf-v6-c-card__body img'; +const imageDir = path.join(__dirname, 'src', 'web', 'images'); + +if (!fs.existsSync(imageDir)) { + fs.mkdirSync(imageDir, { recursive: true }); +} + +(async () => { + const browser = await puppeteer.launch(); + const page = await browser.newPage(); + + console.log(`Loading ${url}`); + await page.goto(url, { waitUntil: 'networkidle0' }); + + console.log('Extracting images'); + const imageUrls = await page.$$eval(selector, imgs => + imgs.map(img => img.src) + ); + await browser.close(); + console.log(`Found ${imageUrls.length} images`); + + let downloaded = 0; + imageUrls.forEach((imgUrl) => { + let fileName = path.basename(imgUrl.split('?')[0]); + fileName = fileName.replace(/\.[a-f0-9]+(\.\w+)$/, '$1'); + const filePath = path.join(imageDir, fileName); + + https.get(imgUrl, (imgRes) => { + const fileStream = fs.createWriteStream(filePath); + imgRes.pipe(fileStream); + fileStream.on('finish', () => { + fileStream.close(); + downloaded++; + console.log(`Downloaded: ${fileName} (${downloaded}/${imageUrls.length})`); + }); + }).on('error', (err) => { + console.error(`Error downloading ${imgUrl}:`, err.message); + }); + }); +})(); diff --git a/showcase/j2cl/.gitignore b/showcase/j2cl/.gitignore deleted file mode 100644 index 9ba3d1b8c..000000000 --- a/showcase/j2cl/.gitignore +++ /dev/null @@ -1 +0,0 @@ -key.pem \ No newline at end of file diff --git a/showcase/j2cl/.parcelrc b/showcase/j2cl/.parcelrc deleted file mode 100644 index 3871f7fb5..000000000 --- a/showcase/j2cl/.parcelrc +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2023 Red Hat -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -{ - "extends": "@parcel/config-default", - "resolvers": ["@parcel/resolver-glob", "parcel-resolver-ignore", "..."] -} diff --git a/showcase/j2cl/cert.pem b/showcase/j2cl/cert.pem deleted file mode 100644 index 8977708bc..000000000 --- a/showcase/j2cl/cert.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDkzCCAnugAwIBAgIUMIO1XL3+4/DVVrEt37blvbm1fEowDQYJKoZIhvcNAQEL -BQAwWTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDESMBAGA1UEAwwJMTI3LjAuMC4xMB4X -DTI0MDQxNDA3NTE0MloXDTM0MDQxMjA3NTE0MlowWTELMAkGA1UEBhMCQVUxEzAR -BgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5 -IEx0ZDESMBAGA1UEAwwJMTI3LjAuMC4xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEA3jhMCNKfyDwvESreSZAivtx+AvjlPswGD4d6MwZwf+KL+L0YDA/+ -ThPf/6PVkaluzfEgyiwniiQNTaacAFnMuSQOan9TFcJLiLTWW4Mx4z/2yYJXmtrs -aTgnp8UaNSR9WE5vBRhefHaGp1XAKFaQmgSnV6/tB6X3Ue67l0flMWiLocVXe+S9 -mCOLKjnoRO9dEEX8Rvkrgbxj1LL66IXgU8Z6d7psyCO/g5tURGMYebUVS/ZlvYXk -145q5Yy7b1InOHU/Eg7Mn8Fu/LvueTzg3xQeK+VJSkoH4irNq7T3wlYHbiqBG2SL -2r95zn4pJib3YgPzDkgV6ZZG3tFwNbuqBQIDAQABo1MwUTAdBgNVHQ4EFgQUC5qr -fsuyqamzaL4PXLef6rm6Wq8wHwYDVR0jBBgwFoAUC5qrfsuyqamzaL4PXLef6rm6 -Wq8wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAHnL+E24NrZ+4 -qFnfV9Ok1R6+jTFVD3PKTHwf2RKOSyAeEWxTocZzpLtlndzCaLgBu1IZlKnq+/LW -GYDAkfmv87kpGuMr7MTUm9FPZlTws6ASUnaLv9w0Qh3OS8ztOELmPHpZYG7V/UFZ -f6+mQKAj4mbsNUQB5+3MfCnSiVeaw3KH1Hm3fL+bWB3spZXH8MqAwBM9q/i9EZqJ -ysIL+ZdDe9eH6HPeUj7n0Tw3ljBAmB3LRCg+6nZ/HXSaYL3TIoDFFBS3184xd33c -I7Xwy9GBzO4WfUQ5WACvhmVSOoGrCWewBgWa5Y+ESPLnhxEMRjMUdJZ4EC4wOzQe -0g4+NEXJnQ== ------END CERTIFICATE----- diff --git a/showcase/j2cl/package-lock.json b/showcase/j2cl/package-lock.json deleted file mode 100644 index b099a7d6a..000000000 --- a/showcase/j2cl/package-lock.json +++ /dev/null @@ -1,3822 +0,0 @@ -{ - "name": "patternfly-java-showcase-j2cl", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "patternfly-java-showcase-j2cl", - "dependencies": { - "@github/relative-time-element": "^4.4.4", - "@patternfly/patternfly": "^6.1.0", - "highlight.js": "^11.11.1", - "showcase-common": "file:../common/local_modules/showcase-common" - }, - "devDependencies": { - "@parcel/core": "^2.13.3", - "@parcel/reporter-cli": "^2.13.3", - "@parcel/resolver-glob": "^2.13.3", - "http-server": "^14.1.1", - "parcel": "^2.13.3", - "parcel-resolver-ignore": "^2.2.0" - } - }, - "../common/local_modules/showcase-common": { - "version": "3" - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@github/relative-time-element": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/@github/relative-time-element/-/relative-time-element-4.4.4.tgz", - "integrity": "sha512-Oi8uOL8O+ZWLD7dHRWCkm2cudcTYtB3VyOYf9BtzCgDGm+OKomyOREtItNMtWl1dxvec62BTKErq36uy+RYxQg==", - "license": "MIT" - }, - "node_modules/@lezer/common": { - "version": "1.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@lezer/lr": { - "version": "1.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@lmdb/lmdb-darwin-arm64": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.8.5.tgz", - "integrity": "sha512-KPDeVScZgA1oq0CiPBcOa3kHIqU+pTOwRFDIhxvmf8CTNvqdZQYp5cCKW0bUk69VygB2PuTiINFWbY78aR2pQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@lmdb/lmdb-darwin-x64": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.8.5.tgz", - "integrity": "sha512-w/sLhN4T7MW1nB3R/U8WK5BgQLz904wh+/SmA2jD8NnF7BLLoUgflCNxOeSPOWp8geP6nP/+VjWzZVip7rZ1ug==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@lmdb/lmdb-linux-arm": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.8.5.tgz", - "integrity": "sha512-c0TGMbm2M55pwTDIfkDLB6BpIsgxV4PjYck2HiOX+cy/JWiBXz32lYbarPqejKs9Flm7YVAKSILUducU9g2RVg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lmdb/lmdb-linux-arm64": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.8.5.tgz", - "integrity": "sha512-vtbZRHH5UDlL01TT5jB576Zox3+hdyogvpcbvVJlmU5PdL3c5V7cj1EODdh1CHPksRl+cws/58ugEHi8bcj4Ww==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lmdb/lmdb-linux-x64": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.8.5.tgz", - "integrity": "sha512-Xkc8IUx9aEhP0zvgeKy7IQ3ReX2N8N1L0WPcQwnZweWmOuKfwpS3GRIYqLtK5za/w3E60zhFfNdS+3pBZPytqQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lmdb/lmdb-win32-x64": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-2.8.5.tgz", - "integrity": "sha512-4wvrf5BgnR8RpogHhtpCPJMKBmvyZPhhUtEwMJbXh0ni2BucpfF07jlmyM11zRqQ2XIq6PbC2j7W7UCCcm1rRQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@mischnic/json-sourcemap": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0", - "@lezer/lr": "^1.0.0", - "json5": "^2.2.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", - "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz", - "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz", - "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz", - "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz", - "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz", - "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@parcel/bundler-default": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.13.3.tgz", - "integrity": "sha512-mOuWeth0bZzRv1b9Lrvydis/hAzJyePy0gwa0tix3/zyYBvw0JY+xkXVR4qKyD/blc1Ra2qOlfI2uD3ucnsdXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/graph": "3.3.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/cache": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.13.3.tgz", - "integrity": "sha512-Vz5+K5uCt9mcuQAMDo0JdbPYDmVdB8Nvu/A2vTEK2rqZPxvoOTczKeMBA4JqzKqGURHPRLaJCvuR8nDG+jhK9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/fs": "2.13.3", - "@parcel/logger": "2.13.3", - "@parcel/utils": "2.13.3", - "lmdb": "2.8.5" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/codeframe": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.13.3.tgz", - "integrity": "sha512-L/PQf+PT0xM8k9nc0B+PxxOYO2phQYnbuifu9o4pFRiqVmCtHztP+XMIvRJ2gOEXy3pgAImSPFVJ3xGxMFky4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/compressor-raw": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.13.3.tgz", - "integrity": "sha512-C6vjDlgTLjYc358i7LA/dqcL0XDQZ1IHXFw6hBaHHOfxPKW2T4bzUI6RURyToEK9Q1X7+ggDKqgdLxwp4veCFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/config-default": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.13.3.tgz", - "integrity": "sha512-WUsx83ic8DgLwwnL1Bua4lRgQqYjxiTT+DBxESGk1paNm1juWzyfPXEQDLXwiCTcWMQGiXQFQ8OuSISauVQ8dQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/bundler-default": "2.13.3", - "@parcel/compressor-raw": "2.13.3", - "@parcel/namer-default": "2.13.3", - "@parcel/optimizer-css": "2.13.3", - "@parcel/optimizer-htmlnano": "2.13.3", - "@parcel/optimizer-image": "2.13.3", - "@parcel/optimizer-svgo": "2.13.3", - "@parcel/optimizer-swc": "2.13.3", - "@parcel/packager-css": "2.13.3", - "@parcel/packager-html": "2.13.3", - "@parcel/packager-js": "2.13.3", - "@parcel/packager-raw": "2.13.3", - "@parcel/packager-svg": "2.13.3", - "@parcel/packager-wasm": "2.13.3", - "@parcel/reporter-dev-server": "2.13.3", - "@parcel/resolver-default": "2.13.3", - "@parcel/runtime-browser-hmr": "2.13.3", - "@parcel/runtime-js": "2.13.3", - "@parcel/runtime-react-refresh": "2.13.3", - "@parcel/runtime-service-worker": "2.13.3", - "@parcel/transformer-babel": "2.13.3", - "@parcel/transformer-css": "2.13.3", - "@parcel/transformer-html": "2.13.3", - "@parcel/transformer-image": "2.13.3", - "@parcel/transformer-js": "2.13.3", - "@parcel/transformer-json": "2.13.3", - "@parcel/transformer-postcss": "2.13.3", - "@parcel/transformer-posthtml": "2.13.3", - "@parcel/transformer-raw": "2.13.3", - "@parcel/transformer-react-refresh-wrap": "2.13.3", - "@parcel/transformer-svg": "2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/core": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.13.3.tgz", - "integrity": "sha512-SRZFtqGiaKHlZ2YAvf+NHvBFWS3GnkBvJMfOJM7kxJRK3M1bhbwJa/GgSdzqro5UVf9Bfj6E+pkdrRQIOZ7jMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mischnic/json-sourcemap": "^0.1.0", - "@parcel/cache": "2.13.3", - "@parcel/diagnostic": "2.13.3", - "@parcel/events": "2.13.3", - "@parcel/feature-flags": "2.13.3", - "@parcel/fs": "2.13.3", - "@parcel/graph": "3.3.3", - "@parcel/logger": "2.13.3", - "@parcel/package-manager": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/profiler": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/types": "2.13.3", - "@parcel/utils": "2.13.3", - "@parcel/workers": "2.13.3", - "base-x": "^3.0.8", - "browserslist": "^4.6.6", - "clone": "^2.1.1", - "dotenv": "^16.4.5", - "dotenv-expand": "^11.0.6", - "json5": "^2.2.0", - "msgpackr": "^1.9.9", - "nullthrows": "^1.1.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/diagnostic": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.13.3.tgz", - "integrity": "sha512-C70KXLBaXLJvr7XCEVu8m6TqNdw1gQLxqg5BQ8roR62R4vWWDnOq8PEksxDi4Y8Z/FF4i3Sapv6tRx9iBNxDEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mischnic/json-sourcemap": "^0.1.0", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/events": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.13.3.tgz", - "integrity": "sha512-ZkSHTTbD/E+53AjUzhAWTnMLnxLEU5yRw0H614CaruGh+GjgOIKyukGeToF5Gf/lvZ159VrJCGE0Z5EpgHVkuQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/feature-flags": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/feature-flags/-/feature-flags-2.13.3.tgz", - "integrity": "sha512-UZm14QpamDFoUut9YtCZSpG1HxPs07lUwUCpsAYL0PpxASD3oWJQxIJGfDZPa2272DarXDG9adTKrNXvkHZblw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/fs": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.13.3.tgz", - "integrity": "sha512-+MPWAt0zr+TCDSlj1LvkORTjfB/BSffsE99A9AvScKytDSYYpY2s0t4vtV9unSh0FHMS2aBCZNJ4t7KL+DcPIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/feature-flags": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/types-internal": "2.13.3", - "@parcel/utils": "2.13.3", - "@parcel/watcher": "^2.0.7", - "@parcel/workers": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/graph": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-3.3.3.tgz", - "integrity": "sha512-pxs4GauEdvCN8nRd6wG3st6LvpHske3GfqGwUSR0P0X0pBPI1/NicvXz6xzp3rgb9gPWfbKXeI/2IOTfIxxVfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/feature-flags": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/logger": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.13.3.tgz", - "integrity": "sha512-8YF/ZhsQgd7ohQ2vEqcMD1Ag9JlJULROWRPGgGYLGD+twuxAiSdiFBpN3f+j4gQN4PYaLaIS/SwUFx11J243fQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/events": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/markdown-ansi": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.13.3.tgz", - "integrity": "sha512-B4rUdlNUulJs2xOQuDbN7Hq5a9roq8IZUcJ1vQ8PAv+zMGb7KCfqIIr/BSCDYGhayfAGBVWW8x55Kvrl1zrDYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/namer-default": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.13.3.tgz", - "integrity": "sha512-A2a5A5fuyNcjSGOS0hPcdQmOE2kszZnLIXof7UMGNkNkeC62KAG8WcFZH5RNOY3LT5H773hq51zmc2Y2gE5Rnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/node-resolver-core": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-3.4.3.tgz", - "integrity": "sha512-IEnMks49egEic1ITBp59VQyHzkSQUXqpU9hOHwqN3KoSTdZ6rEgrXcS3pa6tdXay4NYGlcZ88kFCE8i/xYoVCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mischnic/json-sourcemap": "^0.1.0", - "@parcel/diagnostic": "2.13.3", - "@parcel/fs": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-css": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.13.3.tgz", - "integrity": "sha512-A8o9IVCv919vhv69SkLmyW2WjJR5WZgcMqV6L1uiGF8i8z18myrMhrp2JuSHx29PRT9uNyzNC4Xrd4StYjIhJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.3", - "browserslist": "^4.6.6", - "lightningcss": "^1.22.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-htmlnano": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.13.3.tgz", - "integrity": "sha512-K4Uvg0Sy2pECP7pdvvbud++F0pfcbNkq+IxTrgqBX5HJnLEmRZwgdvZEKF43oMEolclMnURMQRGjRplRaPdbXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "htmlnano": "^2.0.0", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-image": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.13.3.tgz", - "integrity": "sha512-wlDUICA29J4UnqkKrWiyt68g1e85qfYhp4zJFcFJL0LX1qqh1QwsLUz3YJ+KlruoqPxJSFEC8ncBEKiVCsqhEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/utils": "2.13.3", - "@parcel/workers": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/optimizer-svgo": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-svgo/-/optimizer-svgo-2.13.3.tgz", - "integrity": "sha512-piIKxQKzhZK54dJR6yqIcq+urZmpsfgUpLCZT3cnWlX4ux5+S2iN66qqZBs0zVn+a58LcWcoP4Z9ieiJmpiu2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/optimizer-swc": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/optimizer-swc/-/optimizer-swc-2.13.3.tgz", - "integrity": "sha512-zNSq6oWqLlW8ksPIDjM0VgrK6ZAJbPQCDvs1V+p0oX3CzEe85lT5VkRpnfrN1+/vvEJNGL8e60efHKpI+rXGTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.3", - "@swc/core": "^1.7.26", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/package-manager": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.13.3.tgz", - "integrity": "sha512-FLNI5OrZxymGf/Yln0E/kjnGn5sdkQAxW7pQVdtuM+5VeN75yibJRjsSGv88PvJ+KvpD2ANgiIJo1RufmoPcww==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/fs": "2.13.3", - "@parcel/logger": "2.13.3", - "@parcel/node-resolver-core": "3.4.3", - "@parcel/types": "2.13.3", - "@parcel/utils": "2.13.3", - "@parcel/workers": "2.13.3", - "@swc/core": "^1.7.26", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/packager-css": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.13.3.tgz", - "integrity": "sha512-ghDqRMtrUwaDERzFm9le0uz2PTeqqsjsW0ihQSZPSAptElRl9o5BR+XtMPv3r7Ui0evo+w35gD55oQCJ28vCig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.3", - "lightningcss": "^1.22.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-html": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.13.3.tgz", - "integrity": "sha512-jDLnKSA/EzVEZ3/aegXO3QJ/Ij732AgBBkIQfeC8tUoxwVz5b3HiPBAjVjcUSfZs7mdBSHO+ELWC3UD+HbsIrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/types": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-js": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.13.3.tgz", - "integrity": "sha512-0pMHHf2zOn7EOJe88QJw5h/wcV1bFfj6cXVcE55Wa8GX3V+SdCgolnlvNuBcRQ1Tlx0Xkpo+9hMFVIQbNQY6zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/types": "2.13.3", - "@parcel/utils": "2.13.3", - "globals": "^13.2.0", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-raw": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.13.3.tgz", - "integrity": "sha512-AWu4UB+akBdskzvT3KGVHIdacU9f7cI678DQQ1jKQuc9yZz5D0VFt3ocFBOmvDfEQDF0uH3jjtJR7fnuvX7Biw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-svg": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.13.3.tgz", - "integrity": "sha512-tKGRiFq/4jh5u2xpTstNQ7gu+RuZWzlWqpw5NaFmcKe6VQe5CMcS499xTFoREAGnRvevSeIgC38X1a+VOo+/AA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/types": "2.13.3", - "@parcel/utils": "2.13.3", - "posthtml": "^0.16.4" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/packager-wasm": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/packager-wasm/-/packager-wasm-2.13.3.tgz", - "integrity": "sha512-SZB56/b230vFrSehVXaUAWjJmWYc89gzb8OTLkBm7uvtFtov2J1R8Ig9TTJwinyXE3h84MCFP/YpQElSfoLkJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3" - }, - "engines": { - "node": ">=16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/plugin": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.13.3.tgz", - "integrity": "sha512-cterKHHcwg6q11Gpif/aqvHo056TR+yDVJ3fSdiG2xr5KD1VZ2B3hmofWERNNwjMcnR1h9Xq40B7jCKUhOyNFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/types": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/profiler": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/profiler/-/profiler-2.13.3.tgz", - "integrity": "sha512-ok6BwWSLvyHe5TuSXjSacYnDStFgP5Y30tA9mbtWSm0INDsYf+m5DqzpYPx8U54OaywWMK8w3MXUClosJX3aPA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/events": "2.13.3", - "@parcel/types-internal": "2.13.3", - "chrome-trace-event": "^1.0.2" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/reporter-cli": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.13.3.tgz", - "integrity": "sha512-EA5tKt/6bXYNMEavSs35qHlFdx6cZmRazlZxPBgxPePQYoouNAPMNLUOEQozaPhz9f5fvNDN7EHOFaAWcdO2LA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/types": "2.13.3", - "@parcel/utils": "2.13.3", - "chalk": "^4.1.2", - "term-size": "^2.2.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/reporter-dev-server": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.13.3.tgz", - "integrity": "sha512-ZNeFp6AOIQFv7mZIv2P5O188dnZHNg0ymeDVcakfZomwhpSva2dFNS3AnvWo4eyWBlUxkmQO8BtaxeWTs7jAuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/reporter-tracer": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/reporter-tracer/-/reporter-tracer-2.13.3.tgz", - "integrity": "sha512-aBsVPI8jLZTDkFYrI69GxnsdvZKEYerkPsu935LcX9rfUYssOnmmUP+3oI+8fbg+qNjJuk9BgoQ4hCp9FOphMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "chrome-trace-event": "^1.0.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/resolver-default": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.13.3.tgz", - "integrity": "sha512-urBZuRALWT9pFMeWQ8JirchLmsQEyI9lrJptiwLbJWrwvmlwSUGkcstmPwoNRf/aAQjICB7ser/247Vny0pFxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/node-resolver-core": "3.4.3", - "@parcel/plugin": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/resolver-glob": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/resolver-glob/-/resolver-glob-2.13.3.tgz", - "integrity": "sha512-aAtwlEGwuagJPLMaRqwmtXZXMQCwgBEwdfRk85znxaqVlyy349JkZfg11m1jDI4t2al04vlIL6bYthj4AHEstw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/node-resolver-core": "3.4.3", - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-browser-hmr": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.13.3.tgz", - "integrity": "sha512-EAcPojQFUNUGUrDk66cu3ySPO0NXRVS5CKPd4QrxPCVVbGzde4koKu8krC/TaGsoyUqhie8HMnS70qBP0GFfcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-js": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.13.3.tgz", - "integrity": "sha512-62OucNAnxb2Q0uyTFWW/0Hvv2DJ4b5H6neh/YFu2/wmxaZ37xTpEuEcG2do7KW54xE5DeLP+RliHLwi4NvR3ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-react-refresh": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.13.3.tgz", - "integrity": "sha512-PYZ1klpJVwqE3WuifILjtF1dugtesHEuJcXYZI85T6UoRSD5ctS1nAIpZzT14Ga1lRt/jd+eAmhWL1l3m/Vk1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "react-error-overlay": "6.0.9", - "react-refresh": ">=0.9 <=0.14" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/runtime-service-worker": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.13.3.tgz", - "integrity": "sha512-BjMhPuT7Us1+YIo31exPRwomPiL+jrZZS5UUAwlEW2XGHDceEotzRM94LwxeFliCScT4IOokGoxixm19qRuzWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/rust": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/rust/-/rust-2.13.3.tgz", - "integrity": "sha512-dLq85xDAtzr3P5200cvxk+8WXSWauYbxuev9LCPdwfhlaWo/JEj6cu9seVdWlkagjGwkoV1kXC+GGntgUXOLAQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/source-map": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3" - }, - "engines": { - "node": "^12.18.3 || >=14" - } - }, - "node_modules/@parcel/transformer-babel": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.13.3.tgz", - "integrity": "sha512-ikzK9f5WTFrdQsPitQgjCPH6HmVU8AQPRemIJ2BndYhtodn5PQut5cnSvTrqax8RjYvheEKCQk/Zb/uR7qgS3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.3", - "browserslist": "^4.6.6", - "json5": "^2.2.0", - "nullthrows": "^1.1.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-css": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.13.3.tgz", - "integrity": "sha512-zbrNURGph6JeVADbGydyZ7lcu/izj41kDxQ9xw4RPRW/3rofQiTU0OTREi+uBWiMENQySXVivEdzHA9cA+aLAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.3", - "browserslist": "^4.6.6", - "lightningcss": "^1.22.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-html": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.13.3.tgz", - "integrity": "sha512-Yf74FkL9RCCB4+hxQRVMNQThH9+fZ5w0NLiQPpWUOcgDEEyxTi4FWPQgEBsKl/XK2ehdydbQB9fBgPQLuQxwPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5", - "posthtml-parser": "^0.12.1", - "posthtml-render": "^3.0.0", - "semver": "^7.5.2", - "srcset": "4" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-html/node_modules/srcset": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-4.0.0.tgz", - "integrity": "sha512-wvLeHgcVHKO8Sc/H/5lkGreJQVeYMm9rlmt8PuR1xE31rIuXhuzznUUqAt8MqLhB3MqJdFzlNAfpcWnxiFUcPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@parcel/transformer-image": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.13.3.tgz", - "integrity": "sha512-wL1CXyeFAqbp2wcEq/JD3a/tbAyVIDMTC6laQxlIwnVV7dsENhK1qRuJZuoBdixESeUpFQSmmQvDIhcfT/cUUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "@parcel/workers": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/transformer-js": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.13.3.tgz", - "integrity": "sha512-KqfNGn1IHzDoN2aPqt4nDksgb50Xzcny777C7A7hjlQ3cmkjyJrixYjzzsPaPSGJ+kJpknh3KE8unkQ9mhFvRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/source-map": "^2.1.1", - "@parcel/utils": "2.13.3", - "@parcel/workers": "2.13.3", - "@swc/helpers": "^0.5.0", - "browserslist": "^4.6.6", - "nullthrows": "^1.1.1", - "regenerator-runtime": "^0.14.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@parcel/transformer-json": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.13.3.tgz", - "integrity": "sha512-rrq0ab6J0w9ePtsxi0kAvpCmrUYXXAx1Z5PATZakv89rSYbHBKEdXxyCoKFui/UPVCUEGVs5r0iOFepdHpIyeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "json5": "^2.2.0" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-postcss": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.13.3.tgz", - "integrity": "sha512-AIiWpU0QSFBrPcYIqAnhqB8RGE6yHFznnxztfg1t2zMSOnK3xoU6xqYKv8H/MduShGGrC3qVOeDfM8MUwzL3cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/utils": "2.13.3", - "clone": "^2.1.1", - "nullthrows": "^1.1.1", - "postcss-value-parser": "^4.2.0", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-posthtml": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.13.3.tgz", - "integrity": "sha512-5GSLyccpHASwFAu3uJ83gDIBSvfsGdVmhJvy0Vxe+K1Fklk2ibhvvtUHMhB7mg6SPHC+R9jsNc3ZqY04ZLeGjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5", - "posthtml-parser": "^0.12.1", - "posthtml-render": "^3.0.0", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-raw": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.13.3.tgz", - "integrity": "sha512-BFsAbdQF0l8/Pdb7dSLJeYcd8jgwvAUbHgMink2MNXJuRUvDl19Gns8jVokU+uraFHulJMBj40+K/RTd33in4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-react-refresh-wrap": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.13.3.tgz", - "integrity": "sha512-mOof4cRyxsZRdg8kkWaFtaX98mHpxUhcGPU+nF9RQVa9q737ItxrorsPNR9hpZAyE2TtFNflNW7RoYsgvlLw8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "2.13.3", - "@parcel/utils": "2.13.3", - "react-refresh": ">=0.9 <=0.14" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/transformer-svg": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.13.3.tgz", - "integrity": "sha512-9jm7ZF4KHIrGLWlw/SFUz5KKJ20nxHvjFAmzde34R9Wu+F1BOjLZxae7w4ZRwvIc+UVOUcBBQFmhSVwVDZg6Dw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/plugin": "2.13.3", - "@parcel/rust": "2.13.3", - "nullthrows": "^1.1.1", - "posthtml": "^0.16.5", - "posthtml-parser": "^0.12.1", - "posthtml-render": "^3.0.0", - "semver": "^7.5.2" - }, - "engines": { - "node": ">= 16.0.0", - "parcel": "^2.13.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/types": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.13.3.tgz", - "integrity": "sha512-+RpFHxx8fy8/dpuehHUw/ja9PRExC3wJoIlIIF42E7SLu2SvlTHtKm6EfICZzxCXNEBzjoDbamCRcN0nmTPlhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/types-internal": "2.13.3", - "@parcel/workers": "2.13.3" - } - }, - "node_modules/@parcel/types-internal": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/types-internal/-/types-internal-2.13.3.tgz", - "integrity": "sha512-Lhx0n+9RCp+Ipktf/I+CLm3zE9Iq9NtDd8b2Vr5lVWyoT8AbzBKIHIpTbhLS4kjZ80L3I6o93OYjqAaIjsqoZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/feature-flags": "2.13.3", - "@parcel/source-map": "^2.1.1", - "utility-types": "^3.10.0" - } - }, - "node_modules/@parcel/utils": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.13.3.tgz", - "integrity": "sha512-yxY9xw2wOUlJaScOXYZmMGoZ4Ck4Kqj+p6Koe5kLkkWM1j98Q0Dj2tf/mNvZi4yrdnlm+dclCwNRnuE8Q9D+pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/codeframe": "2.13.3", - "@parcel/diagnostic": "2.13.3", - "@parcel/logger": "2.13.3", - "@parcel/markdown-ansi": "2.13.3", - "@parcel/rust": "2.13.3", - "@parcel/source-map": "^2.1.1", - "chalk": "^4.1.2", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz", - "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.0", - "@parcel/watcher-darwin-arm64": "2.5.0", - "@parcel/watcher-darwin-x64": "2.5.0", - "@parcel/watcher-freebsd-x64": "2.5.0", - "@parcel/watcher-linux-arm-glibc": "2.5.0", - "@parcel/watcher-linux-arm-musl": "2.5.0", - "@parcel/watcher-linux-arm64-glibc": "2.5.0", - "@parcel/watcher-linux-arm64-musl": "2.5.0", - "@parcel/watcher-linux-x64-glibc": "2.5.0", - "@parcel/watcher-linux-x64-musl": "2.5.0", - "@parcel/watcher-win32-arm64": "2.5.0", - "@parcel/watcher-win32-ia32": "2.5.0", - "@parcel/watcher-win32-x64": "2.5.0" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz", - "integrity": "sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz", - "integrity": "sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.0.tgz", - "integrity": "sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.0.tgz", - "integrity": "sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.0.tgz", - "integrity": "sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.0.tgz", - "integrity": "sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.0.tgz", - "integrity": "sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.0.tgz", - "integrity": "sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz", - "integrity": "sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz", - "integrity": "sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.0.tgz", - "integrity": "sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.0.tgz", - "integrity": "sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.0.tgz", - "integrity": "sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/workers": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.13.3.tgz", - "integrity": "sha512-oAHmdniWTRwwwsKbcF4t3VjOtKN+/W17Wj5laiYB+HLkfsjGTfIQPj3sdXmrlBAGpI4omIcvR70PHHXnfdTfwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/diagnostic": "2.13.3", - "@parcel/logger": "2.13.3", - "@parcel/profiler": "2.13.3", - "@parcel/types-internal": "2.13.3", - "@parcel/utils": "2.13.3", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "peerDependencies": { - "@parcel/core": "^2.13.3" - } - }, - "node_modules/@patternfly/patternfly": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.1.0.tgz", - "integrity": "sha512-w+QazL8NHKkg5j01eotblsswKxQQSYB0CN3yBXQL9ScpHdp/fK8M6TqWbKZNRpf+NqhMxcH/om8eR0N/fDCJqw==", - "license": "MIT" - }, - "node_modules/@swc/core": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.7.tgz", - "integrity": "sha512-py91kjI1jV5D5W/Q+PurBdGsdU5TFbrzamP7zSCqLdMcHkKi3rQEM5jkQcZr0MXXSJTaayLxS3MWYTBIkzPDrg==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.17" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.10.7", - "@swc/core-darwin-x64": "1.10.7", - "@swc/core-linux-arm-gnueabihf": "1.10.7", - "@swc/core-linux-arm64-gnu": "1.10.7", - "@swc/core-linux-arm64-musl": "1.10.7", - "@swc/core-linux-x64-gnu": "1.10.7", - "@swc/core-linux-x64-musl": "1.10.7", - "@swc/core-win32-arm64-msvc": "1.10.7", - "@swc/core-win32-ia32-msvc": "1.10.7", - "@swc/core-win32-x64-msvc": "1.10.7" - }, - "peerDependencies": { - "@swc/helpers": "*" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.7.tgz", - "integrity": "sha512-SI0OFg987P6hcyT0Dbng3YRISPS9uhLX1dzW4qRrfqQdb0i75lPJ2YWe9CN47HBazrIA5COuTzrD2Dc0TcVsSQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.10.7.tgz", - "integrity": "sha512-RFIAmWVicD/l3RzxgHW0R/G1ya/6nyMspE2cAeDcTbjHi0I5qgdhBWd6ieXOaqwEwiCd0Mot1g2VZrLGoBLsjQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.10.7.tgz", - "integrity": "sha512-QP8vz7yELWfop5mM5foN6KkLylVO7ZUgWSF2cA0owwIaziactB2hCPZY5QU690coJouk9KmdFsPWDnaCFUP8tg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.10.7.tgz", - "integrity": "sha512-NgUDBGQcOeLNR+EOpmUvSDIP/F7i/OVOKxst4wOvT5FTxhnkWrW+StJGKj+DcUVSK5eWOYboSXr1y+Hlywwokw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.10.7.tgz", - "integrity": "sha512-gp5Un3EbeSThBIh6oac5ZArV/CsSmTKj5jNuuUAuEsML3VF9vqPO+25VuxCvsRf/z3py+xOWRaN2HY/rjMeZog==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.10.7.tgz", - "integrity": "sha512-k/OxLLMl/edYqbZyUNg6/bqEHTXJT15l9WGqsl/2QaIGwWGvles8YjruQYQ9d4h/thSXLT9gd8bExU2D0N+bUA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.10.7.tgz", - "integrity": "sha512-XeDoURdWt/ybYmXLCEE8aSiTOzEn0o3Dx5l9hgt0IZEmTts7HgHHVeRgzGXbR4yDo0MfRuX5nE1dYpTmCz0uyA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.10.7.tgz", - "integrity": "sha512-nYAbi/uLS+CU0wFtBx8TquJw2uIMKBnl04LBmiVoFrsIhqSl+0MklaA9FVMGA35NcxSJfcm92Prl2W2LfSnTqQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.10.7.tgz", - "integrity": "sha512-+aGAbsDsIxeLxw0IzyQLtvtAcI1ctlXVvVcXZMNXIXtTURM876yNrufRo4ngoXB3jnb1MLjIIjgXfFs/eZTUSw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.10.7.tgz", - "integrity": "sha512-TBf4clpDBjF/UUnkKrT0/th76/zwvudk5wwobiTFqDywMApHip5O0VpBgZ+4raY2TM8k5+ujoy7bfHb22zu17Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@swc/helpers": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", - "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.8.0" - } - }, - "node_modules/@swc/types": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", - "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/async": { - "version": "2.6.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/base-x": { - "version": "3.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/base-x/node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.2", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001644", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/corser": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dotenv-expand": { - "version": "11.0.7", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", - "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dotenv": "^16.4.5" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.3", - "dev": true, - "license": "ISC" - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-port": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/highlight.js": { - "version": "11.11.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", - "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/htmlnano": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-2.1.1.tgz", - "integrity": "sha512-kAERyg/LuNZYmdqgCdYvugyLWNFAm8MWXpQMz1pLpetmCbFwoMxvkSoaAMlFrOC4OKTWI4KlZGT/RsNxg4ghOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cosmiconfig": "^9.0.0", - "posthtml": "^0.16.5", - "timsort": "^0.3.0" - }, - "peerDependencies": { - "cssnano": "^7.0.0", - "postcss": "^8.3.11", - "purgecss": "^6.0.0", - "relateurl": "^0.2.7", - "srcset": "5.0.1", - "svgo": "^3.0.2", - "terser": "^5.10.0", - "uncss": "^0.17.3" - }, - "peerDependenciesMeta": { - "cssnano": { - "optional": true - }, - "postcss": { - "optional": true - }, - "purgecss": { - "optional": true - }, - "relateurl": { - "optional": true - }, - "srcset": { - "optional": true - }, - "svgo": { - "optional": true - }, - "terser": { - "optional": true - }, - "uncss": { - "optional": true - } - } - }, - "node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "dev": true, - "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-server": { - "version": "14.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "basic-auth": "^2.0.1", - "chalk": "^4.1.2", - "corser": "^2.0.1", - "he": "^1.2.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy": "^1.18.1", - "mime": "^1.6.0", - "minimist": "^1.2.6", - "opener": "^1.5.1", - "portfinder": "^1.0.28", - "secure-compare": "3.0.1", - "union": "~0.5.0", - "url-join": "^4.0.1" - }, - "bin": { - "http-server": "bin/http-server" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-json": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", - "integrity": "sha512-6BEnpVn1rcf3ngfmViLM6vjUjGErbdrL4rwlv+u1NO1XO8kqT4YGL8+19Q+Z/bas8tY90BTWMk2+fW1g6hQjbA==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lightningcss": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.1.tgz", - "integrity": "sha512-FmGoeD4S05ewj+AkhTY+D+myDvXI6eL27FjHIjoyUkO/uw7WZD1fBVs0QxeYWa7E17CUHJaYX/RUGISCtcrG4Q==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^1.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-darwin-arm64": "1.29.1", - "lightningcss-darwin-x64": "1.29.1", - "lightningcss-freebsd-x64": "1.29.1", - "lightningcss-linux-arm-gnueabihf": "1.29.1", - "lightningcss-linux-arm64-gnu": "1.29.1", - "lightningcss-linux-arm64-musl": "1.29.1", - "lightningcss-linux-x64-gnu": "1.29.1", - "lightningcss-linux-x64-musl": "1.29.1", - "lightningcss-win32-arm64-msvc": "1.29.1", - "lightningcss-win32-x64-msvc": "1.29.1" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.29.1.tgz", - "integrity": "sha512-HtR5XJ5A0lvCqYAoSv2QdZZyoHNttBpa5EP9aNuzBQeKGfbyH5+UipLWvVzpP4Uml5ej4BYs5I9Lco9u1fECqw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.29.1.tgz", - "integrity": "sha512-k33G9IzKUpHy/J/3+9MCO4e+PzaFblsgBjSGlpAaFikeBFm8B/CkO3cKU9oI4g+fjS2KlkLM/Bza9K/aw8wsNA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.29.1.tgz", - "integrity": "sha512-0SUW22fv/8kln2LnIdOCmSuXnxgxVC276W5KLTwoehiO0hxkacBxjHOL5EtHD8BAXg2BvuhsJPmVMasvby3LiQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.29.1.tgz", - "integrity": "sha512-sD32pFvlR0kDlqsOZmYqH/68SqUMPNj+0pucGxToXZi4XZgZmqeX/NkxNKCPsswAXU3UeYgDSpGhu05eAufjDg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.29.1.tgz", - "integrity": "sha512-0+vClRIZ6mmJl/dxGuRsE197o1HDEeeRk6nzycSy2GofC2JsY4ifCRnvUWf/CUBQmlrvMzt6SMQNMSEu22csWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.29.1.tgz", - "integrity": "sha512-UKMFrG4rL/uHNgelBsDwJcBqVpzNJbzsKkbI3Ja5fg00sgQnHw/VrzUTEc4jhZ+AN2BvQYz/tkHu4vt1kLuJyw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.1.tgz", - "integrity": "sha512-u1S+xdODy/eEtjADqirA774y3jLcm8RPtYztwReEXoZKdzgsHYPl0s5V52Tst+GKzqjebkULT86XMSxejzfISw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.1.tgz", - "integrity": "sha512-L0Tx0DtaNUTzXv0lbGCLB/c/qEADanHbu4QdcNOXLIe1i8i22rZRpbT3gpWYsCh9aSL9zFujY/WmEXIatWvXbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.29.1.tgz", - "integrity": "sha512-QoOVnkIEFfbW4xPi+dpdft/zAKmgLgsRHfJalEPYuJDOWf7cLQzYg0DEh8/sn737FaeMJxHZRc1oBreiwZCjog==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.29.1.tgz", - "integrity": "sha512-NygcbThNBe4JElP+olyTI/doBNGJvLs3bFCRPdvuCcxZCcCZ71B858IHpdm7L1btZex0FvCmM17FK98Y9MRy1Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lmdb": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.8.5.tgz", - "integrity": "sha512-9bMdFfc80S+vSldBmG3HOuLVHnxRdNTlpzR6QDnzqCQtCzGUEAGTzBKYMeIM+I/sU4oZfgbcbS7X7F65/z/oxQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "msgpackr": "^1.9.5", - "node-addon-api": "^6.1.0", - "node-gyp-build-optional-packages": "5.1.1", - "ordered-binary": "^1.4.1", - "weak-lru-cache": "^1.2.2" - }, - "bin": { - "download-lmdb-prebuilds": "bin/download-prebuilds.js" - }, - "optionalDependencies": { - "@lmdb/lmdb-darwin-arm64": "2.8.5", - "@lmdb/lmdb-darwin-x64": "2.8.5", - "@lmdb/lmdb-linux-arm": "2.8.5", - "@lmdb/lmdb-linux-arm64": "2.8.5", - "@lmdb/lmdb-linux-x64": "2.8.5", - "@lmdb/lmdb-win32-x64": "2.8.5" - } - }, - "node_modules/lmdb/node_modules/node-addon-api": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", - "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/msgpackr": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.2.tgz", - "integrity": "sha512-F9UngXRlPyWCDEASDpTf6c9uNhGPTqnTeLVt7bN+bU1eajoR/8V9ys2BRaV5C/e5ihE6sJ9uPIKaYt6bFuO32g==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "msgpackr-extract": "^3.0.2" - } - }, - "node_modules/msgpackr-extract": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz", - "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "node-gyp-build-optional-packages": "5.2.2" - }, - "bin": { - "download-msgpackr-prebuilds": "bin/download-prebuilds.js" - }, - "optionalDependencies": { - "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", - "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", - "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" - } - }, - "node_modules/msgpackr-extract/node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", - "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^2.0.1" - }, - "bin": { - "node-gyp-build-optional-packages": "bin.js", - "node-gyp-build-optional-packages-optional": "optional.js", - "node-gyp-build-optional-packages-test": "build-test.js" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-gyp-build-optional-packages": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz", - "integrity": "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.1" - }, - "bin": { - "node-gyp-build-optional-packages": "bin.js", - "node-gyp-build-optional-packages-optional": "optional.js", - "node-gyp-build-optional-packages-test": "build-test.js" - } - }, - "node_modules/node-gyp-build-optional-packages/node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.18", - "dev": true, - "license": "MIT" - }, - "node_modules/nullthrows": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "dev": true, - "license": "(WTFPL OR MIT)", - "bin": { - "opener": "bin/opener-bin.js" - } - }, - "node_modules/ordered-binary": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.5.3.tgz", - "integrity": "sha512-oGFr3T+pYdTGJ+YFEILMpS3es+GiIbs9h/XQrclBXUtd44ey7XwfsMzM31f64I1SQOawDoDr/D823kNCADI8TA==", - "dev": true, - "license": "MIT" - }, - "node_modules/parcel": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.13.3.tgz", - "integrity": "sha512-8GrC8C7J8mwRpAlk7EJ7lwdFTbCN+dcXH2gy5AsEs9pLfzo9wvxOTx6W0fzSlvCOvZOita+8GdfYlGfEt0tRgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/config-default": "2.13.3", - "@parcel/core": "2.13.3", - "@parcel/diagnostic": "2.13.3", - "@parcel/events": "2.13.3", - "@parcel/feature-flags": "2.13.3", - "@parcel/fs": "2.13.3", - "@parcel/logger": "2.13.3", - "@parcel/package-manager": "2.13.3", - "@parcel/reporter-cli": "2.13.3", - "@parcel/reporter-dev-server": "2.13.3", - "@parcel/reporter-tracer": "2.13.3", - "@parcel/utils": "2.13.3", - "chalk": "^4.1.2", - "commander": "^12.1.0", - "get-port": "^4.2.0" - }, - "bin": { - "parcel": "lib/bin.js" - }, - "engines": { - "node": ">= 16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/parcel-resolver-ignore": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@parcel/plugin": "^2.10.3" - }, - "engines": { - "parcel": ">=2.9.0" - }, - "funding": { - "url": "https://ko-fi.com/vladimirmikulic" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/picocolors": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/portfinder": { - "version": "1.0.32", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/posthtml": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.6.tgz", - "integrity": "sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "posthtml-parser": "^0.11.0", - "posthtml-render": "^3.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/posthtml-parser": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.12.1.tgz", - "integrity": "sha512-rYFmsDLfYm+4Ts2Oh4DCDSZPtdC1BLnRXAobypVzX9alj28KGl65dIFtgDY9zB57D0TC4Qxqrawuq/2et1P0GA==", - "dev": true, - "license": "MIT", - "dependencies": { - "htmlparser2": "^9.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/posthtml-render": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", - "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-json": "^2.0.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/posthtml/node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "license": "BSD-2-Clause", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/posthtml/node_modules/htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" - } - }, - "node_modules/posthtml/node_modules/posthtml-parser": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.11.0.tgz", - "integrity": "sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "htmlparser2": "^7.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/qs": { - "version": "6.12.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/react-error-overlay": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", - "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==", - "dev": true, - "license": "MIT" - }, - "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, - "license": "MIT" - }, - "node_modules/requires-port": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/secure-compare": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/showcase-common": { - "resolved": "../common/local_modules/showcase-common", - "link": true - }, - "node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/srcset": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-5.0.1.tgz", - "integrity": "sha512-/P1UYbGfJVlxZag7aABNRrulEXAwCSDo7fklafOQrantuPTDmYgijJMks2zusPCVzgW9+4P69mq7w6pYuZpgxw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/term-size": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==", - "dev": true, - "license": "MIT" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/union": { - "version": "0.5.0", - "dev": true, - "dependencies": { - "qs": "^6.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.0", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/url-join": { - "version": "4.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/utility-types": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", - "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/weak-lru-cache": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", - "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - } - } -} diff --git a/showcase/j2cl/package.json b/showcase/j2cl/package.json deleted file mode 100644 index 259c72d20..000000000 --- a/showcase/j2cl/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "patternfly-java-showcase-j2cl", - "private": true, - "parcelIgnore": [ - "showcase.js" - ], - "source": [ - "src/web/dev.html", - "src/web/index.html" - ], - "scripts": { - "watch": "parcel serve src/web/dev.html --dist-dir target/showcase --open", - "dev": "parcel build src/web/dev.html --dist-dir target/showcase --no-optimize", - "prod": "parcel build src/web/index.html --dist-dir target/showcase", - "http-server": "http-server target/showcase --ssl --cert cert.pem -o" - }, - "devDependencies": { - "@parcel/core": "^2.13.3", - "@parcel/reporter-cli": "^2.13.3", - "@parcel/resolver-glob": "^2.13.3", - "http-server": "^14.1.1", - "parcel": "^2.13.3", - "parcel-resolver-ignore": "^2.2.0" - }, - "dependencies": { - "@github/relative-time-element": "^4.4.4", - "@patternfly/patternfly": "^6.1.0", - "highlight.js": "^11.11.1", - "showcase-common": "file:../common/local_modules/showcase-common" - } -} diff --git a/showcase/j2cl/pom.xml b/showcase/j2cl/pom.xml deleted file mode 100644 index b6cbdd12e..000000000 --- a/showcase/j2cl/pom.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - 4.0.0 - - - org.patternfly - patternfly-java-showcase - 0.2.12-SNAPSHOT - ../pom.xml - - - patternfly-java-showcase-j2cl - jar - PatternFly Java Showcase J2CL - - - j2cl - - - - - ${project.groupId} - patternfly-java-j2cl - - - ${project.groupId} - patternfly-java-showcase-common - - - org.kie.j2cl.tools.processors - annotations - - - org.kie.j2cl.tools.processors - processors - provided - - - - - - - org.apache.maven.plugins - maven-clean-plugin - - - - .parcel-cache - - - - - - com.github.eirslett - frontend-maven-plugin - - - install-node-and-npm - prepare-package - - install-node-and-npm - - - ${version.node} - - - - yarn-install - prepare-package - - npm - - - install - - - - yarn-parcel - prepare-package - - npm - - - run ${npm.script} - - - - http-server - - npm - - none - - run http-server - - - - - - org.kie.j2cl.tools - j2cl-maven-plugin - - ${j2cl.incremental} - ${j2cl.compilationLevel} - ${j2cl.sourcemaps} - showcase.js - - ${settings.base} - ${settings.mode} - ${settings.tech} - - ${project.build.directory}/showcase - - - - - build - - - - - - - diff --git a/showcase/j2cl/src/web/favicon.png b/showcase/j2cl/src/web/favicon.png deleted file mode 100644 index cb279989e..000000000 Binary files a/showcase/j2cl/src/web/favicon.png and /dev/null differ diff --git a/showcase/package-lock.json b/showcase/package-lock.json new file mode 100644 index 000000000..1d98be923 --- /dev/null +++ b/showcase/package-lock.json @@ -0,0 +1,6753 @@ +{ + "name": "patternfly-java-showcase", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "patternfly-java-showcase", + "dependencies": { + "@github/relative-time-element": "^5.0.0", + "@patternfly-java/charts": "^0.0.13", + "@patternfly/patternfly": "^6.4.0", + "highlight.js": "^11.11.1" + }, + "devDependencies": { + "@parcel/core": "^2.16.4", + "@parcel/reporter-cli": "^2.16.4", + "@parcel/resolver-glob": "^2.16.4", + "concurrently": "^9.2.1", + "express": "^5.2.1", + "http-proxy-middleware": "^3.0.5", + "http-server": "^14.1.1", + "open": "^11.0.0", + "parcel": "^2.16.4", + "parcel-resolver-ignore": "^2.2.1", + "puppeteer": "^24.37.2", + "wait-on": "^9.0.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@github/relative-time-element": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@github/relative-time-element/-/relative-time-element-5.0.0.tgz", + "integrity": "sha512-L/2r0DNR/rMbmHWcsdmhtOiy2gESoGOhItNFD4zJ3nZfHl79Dx3N18Vfx/pYr2lruMOdk1cJZb4wEumm+Dxm1w==", + "license": "MIT" + }, + "node_modules/@hapi/address": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-5.1.1.tgz", + "integrity": "sha512-A+po2d/dVoY7cYajycYI43ZbYMXukuopIsqCjh5QzsBCipDtdofHntljDlpccMjIfTy6UOkg+5KPriwYch2bXA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^11.0.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@hapi/formula": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-3.0.2.tgz", + "integrity": "sha512-hY5YPNXzw1He7s0iqkRQi+uMGh383CGdyyIGYtB+W5N3KHPXoqychklvHhKCC9M3Xtv0OCs/IHw+r4dcHtBYWw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/hoek": { + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.7.tgz", + "integrity": "sha512-HV5undWkKzcB4RZUusqOpcgxOaq6VOAH7zhhIr2g3G8NF/MlFO75SjOr2NfuSx0Mh40+1FqCkagKLJRykUWoFQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/pinpoint": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.1.tgz", + "integrity": "sha512-EKQmr16tM8s16vTT3cA5L0kZZcTMU5DUOZTuvpnY738m+jyP3JIUj+Mm1xc1rsLkGBQ/gVnfKYPwOmPg1tUR4Q==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/tlds": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@hapi/tlds/-/tlds-1.1.3.tgz", + "integrity": "sha512-QIvUMB5VZ8HMLZF9A2oWr3AFM430QC8oGd0L35y2jHpuW6bIIca6x/xL7zUf4J7L9WJ3qjz+iJII8ncaeMbpSg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@lezer/common": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.3.0.tgz", + "integrity": "sha512-L9X8uHCYU310o99L3/MpJKYxPzXPOS7S0NmBaM7UO/x2Kb2WbmMLSkfvdr1KxRIFYOpbY0Jhn7CfLSUDzL8arQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@lezer/lr": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.5.1.tgz", + "integrity": "sha512-Aou5UdlSpr5whQe8AA/bZG0jMj96CoJIWbGfZ91qieWu5AWUMKw8VR/pAkQkJYvBNhmCcWnZlyyk5oze8JIqYA==", + "license": "BSD-3-Clause" + }, + "node_modules/@lit/reactive-element": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.1.2.tgz", + "integrity": "sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==", + "license": "BSD-3-Clause", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.5.0" + } + }, + "node_modules/@lmdb/lmdb-darwin-arm64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.8.5.tgz", + "integrity": "sha512-KPDeVScZgA1oq0CiPBcOa3kHIqU+pTOwRFDIhxvmf8CTNvqdZQYp5cCKW0bUk69VygB2PuTiINFWbY78aR2pQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lmdb/lmdb-darwin-x64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.8.5.tgz", + "integrity": "sha512-w/sLhN4T7MW1nB3R/U8WK5BgQLz904wh+/SmA2jD8NnF7BLLoUgflCNxOeSPOWp8geP6nP/+VjWzZVip7rZ1ug==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lmdb/lmdb-linux-arm": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.8.5.tgz", + "integrity": "sha512-c0TGMbm2M55pwTDIfkDLB6BpIsgxV4PjYck2HiOX+cy/JWiBXz32lYbarPqejKs9Flm7YVAKSILUducU9g2RVg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-linux-arm64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.8.5.tgz", + "integrity": "sha512-vtbZRHH5UDlL01TT5jB576Zox3+hdyogvpcbvVJlmU5PdL3c5V7cj1EODdh1CHPksRl+cws/58ugEHi8bcj4Ww==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-linux-x64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.8.5.tgz", + "integrity": "sha512-Xkc8IUx9aEhP0zvgeKy7IQ3ReX2N8N1L0WPcQwnZweWmOuKfwpS3GRIYqLtK5za/w3E60zhFfNdS+3pBZPytqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-win32-x64": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-2.8.5.tgz", + "integrity": "sha512-4wvrf5BgnR8RpogHhtpCPJMKBmvyZPhhUtEwMJbXh0ni2BucpfF07jlmyM11zRqQ2XIq6PbC2j7W7UCCcm1rRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@mischnic/json-sourcemap": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.1.tgz", + "integrity": "sha512-iA7+tyVqfrATAIsIRWQG+a7ZLLD0VaOCKV2Wd/v4mqIU3J9c4jx9p7S0nw1XH3gJCKNBOOwACOPYYSUu9pgT+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0", + "@lezer/lr": "^1.0.0", + "json5": "^2.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", + "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz", + "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz", + "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz", + "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz", + "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz", + "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@parcel/bundler-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.16.4.tgz", + "integrity": "sha512-Nb8peNvhfm1+660CLwssWh4weY+Mv6vEGS6GPKqzJmTMw50udi0eS1YuWFzvmhSiu1KsYcUD37mqQ1LuIDtWoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/graph": "3.6.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/cache": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.16.4.tgz", + "integrity": "sha512-+uCyeElSga2MBbmbXpIj/WVKH7TByCrKaxtHbelfKKIJpYMgEHVjO4cuc7GUfTrUAmRUS8ZGvnX7Etgq6/jQhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/fs": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/utils": "2.16.4", + "lmdb": "2.8.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/codeframe": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.16.4.tgz", + "integrity": "sha512-s64aMfOJoPrXhKH+Y98ahX0O8aXWvTR+uNlOaX4yFkpr4FFDnviLcGngDe/Yo4Qq2FJZ0P6dNswbJTUH9EGxkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/compressor-raw": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.16.4.tgz", + "integrity": "sha512-IK8IpNhw61B2HKgA1JhGhO9y+ZJFRZNTEmvhN1NdLdPqvgEXm2EunT+m6D9z7xeoeT6XnUKqM0eRckEdD0OXbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/config-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.16.4.tgz", + "integrity": "sha512-kBxuTY/5trEVnvXk92l7LVkYjNuz3SaqWymFhPjEnc8GY4ZVdcWrWdXWTB9hUhpmRYJctFCyGvM0nN05JTiM2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/bundler-default": "2.16.4", + "@parcel/compressor-raw": "2.16.4", + "@parcel/namer-default": "2.16.4", + "@parcel/optimizer-css": "2.16.4", + "@parcel/optimizer-html": "2.16.4", + "@parcel/optimizer-image": "2.16.4", + "@parcel/optimizer-svg": "2.16.4", + "@parcel/optimizer-swc": "2.16.4", + "@parcel/packager-css": "2.16.4", + "@parcel/packager-html": "2.16.4", + "@parcel/packager-js": "2.16.4", + "@parcel/packager-raw": "2.16.4", + "@parcel/packager-svg": "2.16.4", + "@parcel/packager-wasm": "2.16.4", + "@parcel/reporter-dev-server": "2.16.4", + "@parcel/resolver-default": "2.16.4", + "@parcel/runtime-browser-hmr": "2.16.4", + "@parcel/runtime-js": "2.16.4", + "@parcel/runtime-rsc": "2.16.4", + "@parcel/runtime-service-worker": "2.16.4", + "@parcel/transformer-babel": "2.16.4", + "@parcel/transformer-css": "2.16.4", + "@parcel/transformer-html": "2.16.4", + "@parcel/transformer-image": "2.16.4", + "@parcel/transformer-js": "2.16.4", + "@parcel/transformer-json": "2.16.4", + "@parcel/transformer-node": "2.16.4", + "@parcel/transformer-postcss": "2.16.4", + "@parcel/transformer-posthtml": "2.16.4", + "@parcel/transformer-raw": "2.16.4", + "@parcel/transformer-react-refresh-wrap": "2.16.4", + "@parcel/transformer-svg": "2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/core": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.16.4.tgz", + "integrity": "sha512-a0CgrW5A5kwuSu5J1RFRoMQaMs9yagvfH2jJMYVw56+/7NRI4KOtu612SG9Y1ERWfY55ZwzyFxtLWvD6LO+Anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mischnic/json-sourcemap": "^0.1.1", + "@parcel/cache": "2.16.4", + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4", + "@parcel/feature-flags": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/graph": "3.6.4", + "@parcel/logger": "2.16.4", + "@parcel/package-manager": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/profiler": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "base-x": "^3.0.11", + "browserslist": "^4.24.5", + "clone": "^2.1.2", + "dotenv": "^16.5.0", + "dotenv-expand": "^11.0.7", + "json5": "^2.2.3", + "msgpackr": "^1.11.2", + "nullthrows": "^1.1.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/diagnostic": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.16.4.tgz", + "integrity": "sha512-YN5CfX7lFd6yRLxyZT4Sj3sR6t7nnve4TdXSIqapXzQwL7Bw+sj79D95wTq2rCm3mzk5SofGxFAXul2/nG6gcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mischnic/json-sourcemap": "^0.1.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/error-overlay": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/error-overlay/-/error-overlay-2.16.4.tgz", + "integrity": "sha512-e8KYKnMsfmQnqIhsUWBUZAXlDK30wkxsAGle1tZ0gOdoplaIdVq/WjGPatHLf6igLM76c3tRn2vw8jZFput0jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/events": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.16.4.tgz", + "integrity": "sha512-slWQkBRAA7o0cN0BLEd+yCckPmlVRVhBZn5Pn6ktm4EzEtrqoMzMeJOxxH8TXaRzrQDYnTcnYIHFgXWd4kkUfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/feature-flags": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/feature-flags/-/feature-flags-2.16.4.tgz", + "integrity": "sha512-nYdx53siKPLYikHHxfzgjzzgxdrjquK6DMnuSgOTyIdRG4VHdEN0+NqKijRLuVgiUFo/dtxc2h+amwqFENMw8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/fs": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.16.4.tgz", + "integrity": "sha512-maCMOiVn7oJYZlqlfxgLne8n6tSktIT1k0AeyBp4UGWCXyeJUJ+nL7QYShFpKNLtMLeF0cEtgwRAknWzbcDS1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/feature-flags": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/types-internal": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/watcher": "^2.0.7", + "@parcel/workers": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/graph": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-3.6.4.tgz", + "integrity": "sha512-Cj9yV+/k88kFhE+D+gz0YuNRpvNOCVDskO9pFqkcQhGbsGq6kg2XpZ9V7HlYraih31xf8Vb589bZOwjKIiHixQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/feature-flags": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/logger": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.16.4.tgz", + "integrity": "sha512-QR8QLlKo7xAy9JBpPDAh0RvluaixqPCeyY7Fvo2K7hrU3r85vBNNi06pHiPbWoDmB4x1+QoFwMaGnJOHR+/fMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/markdown-ansi": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.16.4.tgz", + "integrity": "sha512-0+oQApAVF3wMcQ6d1ZfZ0JsRzaMUYj9e4U+naj6YEsFsFGOPp+pQYKXBf1bobQeeB7cPKPT3SUHxFqced722Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/namer-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.16.4.tgz", + "integrity": "sha512-CE+0lFg881sJq575EXxj2lKUn81tsS5itpNUUErHxit195m3PExyAhoXM6ed/SXxwi+uv+T5FS/jjDLBNuUFDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/node-resolver-core": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-3.7.4.tgz", + "integrity": "sha512-b3VDG+um6IWW5CTod6M9hQsTX5mdIelKmam7mzxzgqg4j5hnycgTWqPMc9UxhYoUY/Q/PHfWepccNcKtvP5JiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mischnic/json-sourcemap": "^0.1.1", + "@parcel/diagnostic": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-css": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.16.4.tgz", + "integrity": "sha512-aqdXCtmvpcXYgJFGk2DtXF34wuM2TD1fZorKMrJdKB9sSkWVRs1tq6RAXQrbi0ZPDH9wfE/9An3YdkTex7RHuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "browserslist": "^4.24.5", + "lightningcss": "^1.30.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-html": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-html/-/optimizer-html-2.16.4.tgz", + "integrity": "sha512-vg/R2uuSni+NYYUUV8m+5bz8p5zBv8wc/nNleoBnGuCDwn7uaUwTZ8Gt9CjZO8jjG0xCLILoc/TW+e2FF3pfgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-image": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.16.4.tgz", + "integrity": "sha512-2RV54WnvMYr18lxSx7Zlx/DXpJwMzOiPxDnoFyvaUoYutvgHO6chtcgFgh1Bvw/PoI95vYzlTkZ8QfUOk5A0JA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/optimizer-svg": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-svg/-/optimizer-svg-2.16.4.tgz", + "integrity": "sha512-22+BqIffCrVErg8y2XwhasbTaFNn75OKXZ3KTDBIfOSAZKLUKs1iHfDXETzTRN7cVcS+Q36/6EHd7N/RA8i1fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/optimizer-swc": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/optimizer-swc/-/optimizer-swc-2.16.4.tgz", + "integrity": "sha512-+URqwnB6u1gqaLbG1O1DDApH+UVj4WCbK9No1fdxLBxQ9a84jyli25o1kK1hYB9Nb/JMyYNnEBfvYUW6RphOxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "@swc/core": "^1.11.24", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/package-manager": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.16.4.tgz", + "integrity": "sha512-obWv9gZgdnkT3Kd+fBkKjhdNEY7zfOP5gVaox5i4nQstVCaVnDlMv5FwLEXwehL+WbwEcGyEGGxOHHkAFKk7Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/node-resolver-core": "3.7.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "@swc/core": "^1.11.24", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/packager-css": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.16.4.tgz", + "integrity": "sha512-rWRtfiX+VVIOZvq64jpeNUKkvWAbnokfHQsk/js1s5jD4ViNQgPcNLiRaiIANjymqL6+dQqWvGUSW2a5FAZYfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "lightningcss": "^1.30.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-html": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.16.4.tgz", + "integrity": "sha512-AWo5f6SSqBsg2uWOsX0gPX8hCx2iE6GYLg2Z4/cDy2mPlwDICN8/bxItEztSZFmObi+ti26eetBKRDxAUivyIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-js": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.16.4.tgz", + "integrity": "sha512-L2o39f/fhta+hxto7w8OTUKdstY+te5BmHZREckbQm0KTBg93BG7jB0bfoxLSZF0d8uuAYIVXjzeHNqha+du1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "globals": "^13.24.0", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-raw": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.16.4.tgz", + "integrity": "sha512-A9j60G9OmbTkEeE4WRMXCiErEprHLs9NkUlC4HXCxmSrPMOVaMaMva2LdejE3A9kujZqYtYfuc8+a+jN+Nro4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-svg": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.16.4.tgz", + "integrity": "sha512-LT9l7eInFrAZJ6w3mYzAUgDq3SIzYbbQyW46Dz26M9lJQbf6uCaATUTac3BEHegW0ikDuw4OOGHK41BVqeeusg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/packager-wasm": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/packager-wasm/-/packager-wasm-2.16.4.tgz", + "integrity": "sha512-AY96Aqu/RpmaSZK2RGkIrZWjAperDw8DAlxLAiaP1D/RPVnikZtl5BmcUt/Wz3PrzG7/q9ZVqqKkWsLmhkjXZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">=16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/plugin": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.16.4.tgz", + "integrity": "sha512-aN2VQoRGC1eB41ZCDbPR/Sp0yKOxe31oemzPx1nJzOuebK2Q6FxSrJ9Bjj9j/YCaLzDtPwelsuLOazzVpXJ6qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/types": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/profiler": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/profiler/-/profiler-2.16.4.tgz", + "integrity": "sha512-R3JhfcnoReTv2sVFHPR2xKZvs3d3IRrBl9sWmAftbIJFwT4rU70/W7IdwfaJVkD/6PzHq9mcgOh1WKL4KAxPdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4", + "@parcel/types-internal": "2.16.4", + "chrome-trace-event": "^1.0.2" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-cli": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.16.4.tgz", + "integrity": "sha512-DQx9TwcTZrDv828+tcwEi//xyW7OHTGzGX1+UEVxPp0mSzuOmDn0zfER8qNIqGr1i4D/FXhb5UJQDhGHV8mOpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/types": "2.16.4", + "@parcel/utils": "2.16.4", + "chalk": "^4.1.2", + "term-size": "^2.2.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-dev-server": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.16.4.tgz", + "integrity": "sha512-YWvay25htQDifpDRJ0+yFh6xUxKnbfeJxYkPYyuXdxpEUhq4T0UWW0PbPCN/wFX7StgeUTXq5Poeo/+eys9m3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/codeframe": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/reporter-tracer": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-tracer/-/reporter-tracer-2.16.4.tgz", + "integrity": "sha512-JKnlXpPepak0/ZybmZn9JtyjJiDBWYrt7ZUlXQhQb0xzNcd/k+RqfwVkTKIwyFHsWtym0cwibkvsi2bWFzS7tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "chrome-trace-event": "^1.0.3", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/resolver-default": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.16.4.tgz", + "integrity": "sha512-wJe9XQS0hn/t32pntQpJbls3ZL8mGVVhK9L7s7BTmZT9ufnvP2nif1psJz/nbgnP9LF6mLSk43OdMJKpoStsjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/node-resolver-core": "3.7.4", + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/resolver-glob": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/resolver-glob/-/resolver-glob-2.16.4.tgz", + "integrity": "sha512-D5nKA3MfVilDvbMS8RkJfa0Y6+jIgdbdykVcjkRktmao3nNEzaJ3SLQRRdTkNkw/SdXWtTZyJRbfL2f5b8y0gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/node-resolver-core": "3.7.4", + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-browser-hmr": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.16.4.tgz", + "integrity": "sha512-asx7p3NjUSfibI3bC7+8+jUIGHWVk2Zuq9SjJGCGDt+auT9A4uSGljnsk1BWWPqqZ0WILubq4czSAqm0+wt4cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-js": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.16.4.tgz", + "integrity": "sha512-gUKmsjg+PULQBu2QbX0QKll9tXSqHPO8NrfxHwWb2lz5xDKDos1oV0I7BoMWbHhUHkoToXZrm654oGViujtVUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-rsc": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-rsc/-/runtime-rsc-2.16.4.tgz", + "integrity": "sha512-CHkotYE/cNiUjJmrc5FD9YhlFp1UF5wMNNJmoWaL40eBzsqcaV0sSn5V3bNapwewn3wrMYgdPgvOTHfaZaG73A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/runtime-service-worker": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.16.4.tgz", + "integrity": "sha512-FT0Q58bf5Re+dq5cL2XHbxqHHFZco6qtRijeVpT3TSPMRPlniMArypSytTeZzVNL7h/hxjWsNu7fRuC0yLB5hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust/-/rust-2.16.4.tgz", + "integrity": "sha512-RBMKt9rCdv6jr4vXG6LmHtxzO5TuhQvXo1kSoSIF7fURRZ81D1jzBtLxwLmfxCPsofJNqWwdhy5vIvisX+TLlQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/rust-darwin-arm64": "2.16.4", + "@parcel/rust-darwin-x64": "2.16.4", + "@parcel/rust-linux-arm-gnueabihf": "2.16.4", + "@parcel/rust-linux-arm64-gnu": "2.16.4", + "@parcel/rust-linux-arm64-musl": "2.16.4", + "@parcel/rust-linux-x64-gnu": "2.16.4", + "@parcel/rust-linux-x64-musl": "2.16.4", + "@parcel/rust-win32-x64-msvc": "2.16.4" + }, + "peerDependencies": { + "napi-wasm": "^1.1.2" + }, + "peerDependenciesMeta": { + "napi-wasm": { + "optional": true + } + } + }, + "node_modules/@parcel/rust-darwin-arm64": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-darwin-arm64/-/rust-darwin-arm64-2.16.4.tgz", + "integrity": "sha512-P3Se36H9EO1fOlwXqQNQ+RsVKTGn5ztRSUGbLcT8ba6oOMmU1w7J4R810GgsCbwCuF10TJNUMkuD3Q2Sz15Q3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-darwin-x64": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-darwin-x64/-/rust-darwin-x64-2.16.4.tgz", + "integrity": "sha512-8aNKNyPIx3EthYpmVJevIdHmFsOApXAEYGi3HU69jTxLgSIfyEHDdGE9lEsMvhSrd/SSo4/euAtiV+pqK04wnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-arm-gnueabihf": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm-gnueabihf/-/rust-linux-arm-gnueabihf-2.16.4.tgz", + "integrity": "sha512-QrvqiSHaWRLc0JBHgUHVvDthfWSkA6AFN+ikV1UGENv4j2r/QgvuwJiG0VHrsL6pH5dRqj0vvngHzEgguke9DA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-arm64-gnu": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm64-gnu/-/rust-linux-arm64-gnu-2.16.4.tgz", + "integrity": "sha512-f3gBWQHLHRUajNZi3SMmDQiEx54RoRbXtZYQNuBQy7+NolfFcgb1ik3QhkT7xovuTF/LBmaqP3UFy0PxvR/iwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-arm64-musl": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm64-musl/-/rust-linux-arm64-musl-2.16.4.tgz", + "integrity": "sha512-cwml18RNKsBwHyZnrZg4jpecXkWjaY/mCArocWUxkFXjjB97L56QWQM9W86f2/Y3HcFcnIGJwx1SDDKJrV6OIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-x64-gnu": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-x64-gnu/-/rust-linux-x64-gnu-2.16.4.tgz", + "integrity": "sha512-0xIjQaN8hiG0F9R8coPYidHslDIrbfOS/qFy5GJNbGA3S49h61wZRBMQqa7JFW4+2T8R0J9j0SKHhLXpbLXrIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-linux-x64-musl": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-linux-x64-musl/-/rust-linux-x64-musl-2.16.4.tgz", + "integrity": "sha512-fYn21GIecHK9RoZPKwT9NOwxwl3Gy3RYPR6zvsUi0+hpFo19Ph9EzFXN3lT8Pi5KiwQMCU4rsLb5HoWOBM1FeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/rust-win32-x64-msvc": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/rust-win32-x64-msvc/-/rust-win32-x64-msvc-2.16.4.tgz", + "integrity": "sha512-TcpWC3I1mJpfP2++018lgvM7UX0P8IrzNxceBTHUKEIDMwmAYrUKAQFiaU0j1Ldqk6yP8SPZD3cvphumsYpJOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/source-map": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.1.1.tgz", + "integrity": "sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": "^12.18.3 || >=14" + } + }, + "node_modules/@parcel/transformer-babel": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.16.4.tgz", + "integrity": "sha512-CMDUOQYX7+cmeyHxHSFnoPcwvXNL7rRFE+Q06uVFzsYYiVhbwGF/1J5Bx4cW3Froumqla4YTytTsEteJEybkdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "browserslist": "^4.24.5", + "json5": "^2.2.3", + "nullthrows": "^1.1.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-css": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.16.4.tgz", + "integrity": "sha512-VG/+DbDci2HKe20GFRDs65ZQf5GUFfnmZAa1BhVl/MO+ijT3XC3eoVUy5cExRkq4VLcPY4ytL0g/1T2D6x7lBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "browserslist": "^4.24.5", + "lightningcss": "^1.30.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-html": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.16.4.tgz", + "integrity": "sha512-w6JErYTeNS+KAzUAER18NHFIFFvxiLGd4Fht1UYcb/FDjJdLAMB/FljyEs0Rto/WAhZ2D0MuSL25HQh837R62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-image": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.16.4.tgz", + "integrity": "sha512-ZzIn3KvvRqMfcect4Dy+57C9XoQXZhpVJKBdQWMp9wM1qJEgsVgGDcaSBYCs/UYSKMRMP6Wm20pKCt408RkQzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/transformer-js": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.16.4.tgz", + "integrity": "sha512-FD2fdO6URwAGBPidb3x1dDgLBt972mko0LelcSU05aC/pcKaV9mbCtINbPul1MlStzkxDelhuImcCYIyerheVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "@parcel/utils": "2.16.4", + "@parcel/workers": "2.16.4", + "@swc/helpers": "^0.5.0", + "browserslist": "^4.24.5", + "nullthrows": "^1.1.1", + "regenerator-runtime": "^0.14.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@parcel/transformer-json": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.16.4.tgz", + "integrity": "sha512-pB3ZNqgokdkBCJ+4G0BrPYcIkyM9K1HVk0GvjzcLEFDKsoAp8BGEM68FzagFM/nVq9anYTshIaoh349GK0M/bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "json5": "^2.2.3" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-node": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-node/-/transformer-node-2.16.4.tgz", + "integrity": "sha512-7t43CPGfMJk1LqFokwxHSsRi+kKC2QvDXaMtqiMShmk50LCwn81WgzuFvNhMwf6lSiBihWupGwF3Fqksg+aisg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-postcss": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.16.4.tgz", + "integrity": "sha512-jfmh9ho03H+qwz9S1b/a/oaOmgfMovtHKYDweIGMjKULKIee3AFRqo8RZIOuUMjDuqHWK8SqQmjery4syFV3Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/utils": "2.16.4", + "clone": "^2.1.2", + "nullthrows": "^1.1.1", + "postcss-value-parser": "^4.2.0", + "semver": "^7.7.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-posthtml": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.16.4.tgz", + "integrity": "sha512-+GXsmGx1L25KQGQnwclgEuQe1t4QU+IoDkgN+Ikj+EnQCOWG4/ts2VpMBeqP5F18ZT4cCSRafj6317o/2lSGJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-raw": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.16.4.tgz", + "integrity": "sha512-7WDUPq+bW11G9jKxaQIVL+NPGolV99oq/GXhpjYip0SaGaLzRCW7gEk60cftuk0O7MsDaX5jcAJm3G/AX+LJKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-react-refresh-wrap": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.16.4.tgz", + "integrity": "sha512-MiLNZrsGQJTANKKa4lzZyUbGj/en0Hms474mMdQkCBFg6GmjfmXwaMMgtTfPA3ZwSp2+3LeObCyca/f9B2gBZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/error-overlay": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/utils": "2.16.4", + "react-refresh": "^0.16.0" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/transformer-svg": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.16.4.tgz", + "integrity": "sha512-0dm4cQr/WpfQP6N0xjFtwdLTxcONDfoLgTOMk4eNUWydHipSgmLtvUk/nOc/FWkwztRScfAObtZXOiPOd3Oy9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/plugin": "2.16.4", + "@parcel/rust": "2.16.4" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.16.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/types": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.16.4.tgz", + "integrity": "sha512-ctx4mBskZHXeDVHg4OjMwx18jfYH9BzI/7yqbDQVGvd5lyA+/oVVzYdpele2J2i2sSaJ87cA8nb57GDQ8kHAqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/types-internal": "2.16.4", + "@parcel/workers": "2.16.4" + } + }, + "node_modules/@parcel/types-internal": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/types-internal/-/types-internal-2.16.4.tgz", + "integrity": "sha512-PE6Qmt5cjzBxX+6MPLiF7r+twoC+V9Skt3zyuBQ+H1c0i9o07Bbz2NKX10nvlPukfmW6Fu/1RvTLkzBZR1bU6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/feature-flags": "2.16.4", + "@parcel/source-map": "^2.1.1", + "utility-types": "^3.11.0" + } + }, + "node_modules/@parcel/utils": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.16.4.tgz", + "integrity": "sha512-lkmxQHcHyOWZLbV8t+h2CGZIkPiBurLm/TS5wNT7+tq0qt9KbVwL7FP2K93TbXhLMGTmpI79Bf3qKniPM167Mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/codeframe": "2.16.4", + "@parcel/diagnostic": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/markdown-ansi": "2.16.4", + "@parcel/rust": "2.16.4", + "@parcel/source-map": "^2.1.1", + "chalk": "^4.1.2", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", + "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.6", + "@parcel/watcher-darwin-arm64": "2.5.6", + "@parcel/watcher-darwin-x64": "2.5.6", + "@parcel/watcher-freebsd-x64": "2.5.6", + "@parcel/watcher-linux-arm-glibc": "2.5.6", + "@parcel/watcher-linux-arm-musl": "2.5.6", + "@parcel/watcher-linux-arm64-glibc": "2.5.6", + "@parcel/watcher-linux-arm64-musl": "2.5.6", + "@parcel/watcher-linux-x64-glibc": "2.5.6", + "@parcel/watcher-linux-x64-musl": "2.5.6", + "@parcel/watcher-win32-arm64": "2.5.6", + "@parcel/watcher-win32-ia32": "2.5.6", + "@parcel/watcher-win32-x64": "2.5.6" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.6.tgz", + "integrity": "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz", + "integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.6.tgz", + "integrity": "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.6.tgz", + "integrity": "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.6.tgz", + "integrity": "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.6.tgz", + "integrity": "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.6.tgz", + "integrity": "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.6.tgz", + "integrity": "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz", + "integrity": "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.6.tgz", + "integrity": "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.6.tgz", + "integrity": "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.6.tgz", + "integrity": "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.6.tgz", + "integrity": "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@parcel/watcher/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@parcel/workers": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.16.4.tgz", + "integrity": "sha512-dkBEWqnHXDZnRbTZouNt4uEGIslJT+V0c8OH1MPOfjISp1ucD6/u9ET8k9d/PxS9h1hL53og0SpBuuSEPLDl6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/diagnostic": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/profiler": "2.16.4", + "@parcel/types-internal": "2.16.4", + "@parcel/utils": "2.16.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "peerDependencies": { + "@parcel/core": "^2.16.4" + } + }, + "node_modules/@patternfly-java/charts": { + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@patternfly-java/charts/-/charts-0.0.13.tgz", + "integrity": "sha512-mSAHj6J59AnhJkQmwiQETn3HGT2rAPGwYd4zfNMfbY+VLDiFlVgNE/BFvh+z0F82CRFphmWp1wqKuQ7d5GQX6A==", + "license": "Apache-2.0", + "dependencies": { + "@patternfly/react-charts": "^8.4.1", + "@patternfly/react-styles": "^6.4.0", + "@patternfly/react-tokens": "^6.4.0", + "hoist-non-react-statics": "^3.3.2", + "lit": "^3.3.2", + "lodash": "^4.17.23", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "tslib": "^2.8.1", + "victory-area": "^37.3.6", + "victory-axis": "^37.3.6", + "victory-bar": "^37.3.6", + "victory-box-plot": "^37.3.6", + "victory-chart": "^37.3.6", + "victory-core": "^37.3.6", + "victory-create-container": "^37.3.6", + "victory-cursor-container": "^37.3.6", + "victory-group": "^37.3.6", + "victory-legend": "^37.3.6", + "victory-line": "^37.3.6", + "victory-pie": "^37.3.6", + "victory-scatter": "^37.3.6", + "victory-stack": "^37.3.6", + "victory-tooltip": "^37.3.6", + "victory-voronoi-container": "^37.3.6", + "victory-zoom-container": "^37.3.6" + } + }, + "node_modules/@patternfly/patternfly": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.4.0.tgz", + "integrity": "sha512-4drFhg74sEc/fftark5wZevODIog17qR4pwLCdB3j5iK3Uu5oMA2SdLhsEeEQggalfnFzve/Km87MdVR0ghhvQ==", + "license": "MIT" + }, + "node_modules/@patternfly/react-charts": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@patternfly/react-charts/-/react-charts-8.4.1.tgz", + "integrity": "sha512-kqP5TFr9F/SDTp+nXfcX8gMuZIQ6Uxl55qqiWYgR2zflo0UZWnyL/d2s1fI6Bfi5IuycNdlvJJ/i8QdOsLr5mw==", + "license": "MIT", + "dependencies": { + "@patternfly/react-styles": "^6.4.0", + "@patternfly/react-tokens": "^6.4.0", + "hoist-non-react-statics": "^3.3.2", + "lodash": "^4.17.23", + "tslib": "^2.8.1" + }, + "peerDependencies": { + "echarts": "^5.6.0 || ^6.0.0", + "react": "^17 || ^18 || ^19", + "react-dom": "^17 || ^18 || ^19", + "victory-area": "^37.3.6", + "victory-axis": "^37.3.6", + "victory-bar": "^37.3.6", + "victory-box-plot": "^37.3.6", + "victory-chart": "^37.3.6", + "victory-core": "^37.3.6", + "victory-create-container": "^37.3.6", + "victory-cursor-container": "^37.3.6", + "victory-group": "^37.3.6", + "victory-legend": "^37.3.6", + "victory-line": "^37.3.6", + "victory-pie": "^37.3.6", + "victory-scatter": "^37.3.6", + "victory-stack": "^37.3.6", + "victory-tooltip": "^37.3.6", + "victory-voronoi-container": "^37.3.6", + "victory-zoom-container": "^37.3.6" + }, + "peerDependenciesMeta": { + "echarts": { + "optional": true + }, + "victory-area": { + "optional": true + }, + "victory-axis": { + "optional": true + }, + "victory-bar": { + "optional": true + }, + "victory-box-plot": { + "optional": true + }, + "victory-chart": { + "optional": true + }, + "victory-core": { + "optional": true + }, + "victory-create-container": { + "optional": true + }, + "victory-cursor-container": { + "optional": true + }, + "victory-group": { + "optional": true + }, + "victory-legend": { + "optional": true + }, + "victory-line": { + "optional": true + }, + "victory-pie": { + "optional": true + }, + "victory-scatter": { + "optional": true + }, + "victory-stack": { + "optional": true + }, + "victory-tooltip": { + "optional": true + }, + "victory-voronoi-container": { + "optional": true + }, + "victory-zoom-container": { + "optional": true + } + } + }, + "node_modules/@patternfly/react-styles": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-6.4.0.tgz", + "integrity": "sha512-EXmHA67s5sy+Wy/0uxWoUQ52jr9lsH2wV3QcgtvVc5zxpyBX89gShpqv4jfVqaowznHGDoL6fVBBrSe9BYOliQ==", + "license": "MIT" + }, + "node_modules/@patternfly/react-tokens": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.4.0.tgz", + "integrity": "sha512-iZthBoXSGQ/+PfGTdPFJVulaJZI3rwE+7A/whOXPGp3Jyq3k6X52pr1+5nlO6WHasbZ9FyeZGqXf4fazUZNjbw==", + "license": "MIT" + }, + "node_modules/@puppeteer/browsers": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.12.0.tgz", + "integrity": "sha512-Xuq42yxcQJ54ti8ZHNzF5snFvtpgXzNToJ1bXUGQRaiO8t+B6UM8sTUJfvV+AJnqtkJU/7hdy6nbKyA12aHtRw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.4.3", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.5.0", + "semver": "^7.7.3", + "tar-fs": "^3.1.1", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", + "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@swc/core": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.11.tgz", + "integrity": "sha512-iLmLTodbYxU39HhMPaMUooPwO/zqJWvsqkrXv1ZI38rMb048p6N7qtAtTp37sw9NzSrvH6oli8EdDygo09IZ/w==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.25" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.15.11", + "@swc/core-darwin-x64": "1.15.11", + "@swc/core-linux-arm-gnueabihf": "1.15.11", + "@swc/core-linux-arm64-gnu": "1.15.11", + "@swc/core-linux-arm64-musl": "1.15.11", + "@swc/core-linux-x64-gnu": "1.15.11", + "@swc/core-linux-x64-musl": "1.15.11", + "@swc/core-win32-arm64-msvc": "1.15.11", + "@swc/core-win32-ia32-msvc": "1.15.11", + "@swc/core-win32-x64-msvc": "1.15.11" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.17" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.11.tgz", + "integrity": "sha512-QoIupRWVH8AF1TgxYyeA5nS18dtqMuxNwchjBIwJo3RdwLEFiJq6onOx9JAxHtuPwUkIVuU2Xbp+jCJ7Vzmgtg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.11.tgz", + "integrity": "sha512-S52Gu1QtPSfBYDiejlcfp9GlN+NjTZBRRNsz8PNwBgSE626/FUf2PcllVUix7jqkoMC+t0rS8t+2/aSWlMuQtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.11.tgz", + "integrity": "sha512-lXJs8oXo6Z4yCpimpQ8vPeCjkgoHu5NoMvmJZ8qxDyU99KVdg6KwU9H79vzrmB+HfH+dCZ7JGMqMF//f8Cfvdg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.11.tgz", + "integrity": "sha512-chRsz1K52/vj8Mfq/QOugVphlKPWlMh10V99qfH41hbGvwAU6xSPd681upO4bKiOr9+mRIZZW+EfJqY42ZzRyA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.11.tgz", + "integrity": "sha512-PYftgsTaGnfDK4m6/dty9ryK1FbLk+LosDJ/RJR2nkXGc8rd+WenXIlvHjWULiBVnS1RsjHHOXmTS4nDhe0v0w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.11.tgz", + "integrity": "sha512-DKtnJKIHiZdARyTKiX7zdRjiDS1KihkQWatQiCHMv+zc2sfwb4Glrodx2VLOX4rsa92NLR0Sw8WLcPEMFY1szQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.11.tgz", + "integrity": "sha512-mUjjntHj4+8WBaiDe5UwRNHuEzLjIWBTSGTw0JT9+C9/Yyuh4KQqlcEQ3ro6GkHmBGXBFpGIj/o5VMyRWfVfWw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.11.tgz", + "integrity": "sha512-ZkNNG5zL49YpaFzfl6fskNOSxtcZ5uOYmWBkY4wVAvgbSAQzLRVBp+xArGWh2oXlY/WgL99zQSGTv7RI5E6nzA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.11.tgz", + "integrity": "sha512-6XnzORkZCQzvTQ6cPrU7iaT9+i145oLwnin8JrfsLG41wl26+5cNQ2XV3zcbrnFEV6esjOceom9YO1w9mGJByw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.11.tgz", + "integrity": "sha512-IQ2n6af7XKLL6P1gIeZACskSxK8jWtoKpJWLZmdXTDj1MGzktUy4i+FvpdtxFmJWNavRWH1VmTr6kAubRDHeKw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.18", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.18.tgz", + "integrity": "sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/types": { + "version": "0.1.25", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz", + "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/http-proxy": { + "version": "1.17.16", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", + "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "24.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.1.tgz", + "integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT" + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.4.tgz", + "integrity": "sha512-1wVkUaAO6WyaYtCkcYCOx12ZgpGf9Zif+qXa4n+oYzK558YryKqiL6UWwd5DqiH3VRW0GYhTZQ/vlgJrCoNQlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/b4a": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", + "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, + "node_modules/bare-events": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz", + "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "bare-abort-controller": "*" + }, + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + } + } + }, + "node_modules/bare-fs": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.5.3.tgz", + "integrity": "sha512-9+kwVx8QYvt3hPWnmb19tPnh38c6Nihz8Lx3t0g9+4GoIf3/fTgYwM4Z6NxgI+B9elLQA7mLE9PpqcWtOMRDiQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.5.4", + "bare-path": "^3.0.0", + "bare-stream": "^2.6.4", + "bare-url": "^2.2.2", + "fast-fifo": "^1.3.2" + }, + "engines": { + "bare": ">=1.16.0" + }, + "peerDependencies": { + "bare-buffer": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + } + } + }, + "node_modules/bare-os": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.2.tgz", + "integrity": "sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "engines": { + "bare": ">=1.14.0" + } + }, + "node_modules/bare-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz", + "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^3.0.1" + } + }, + "node_modules/bare-stream": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.7.0.tgz", + "integrity": "sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "streamx": "^2.21.0" + }, + "peerDependencies": { + "bare-buffer": "*", + "bare-events": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + }, + "bare-events": { + "optional": true + } + } + }, + "node_modules/bare-url": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.3.2.tgz", + "integrity": "sha512-ZMq4gd9ngV5aTMa5p9+UfY0b3skwhHELaDkhEHetMdX0LRkW9kzaym4oo/Eh+Ghm0CCDuMTsRIGM/ytUc1ZYmw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-path": "^3.0.0" + } + }, + "node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.19.tgz", + "integrity": "sha512-zoKGUdu6vb2jd3YOq0nnhEDQVbPcHhco3UImJrv5dSkvxTc2pl2WjOPsjZXDwPDSl5eghIMuY3R6J9NDKF3KcQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/basic-ftp": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.1.0.tgz", + "integrity": "sha512-RkaJzeJKDbaDWTIPiJwubyljaEPwpVWkm9Rt5h9Nd6h7tEXTJ3VB4qxdZBioV7JO5yLUaOKwz7vDOzlncUsegw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/body-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", + "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/body-parser/node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", + "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.8.19", + "caniuse-lite": "^1.0.30001751", + "electron-to-chromium": "^1.5.238", + "node-releases": "^2.0.26", + "update-browserslist-db": "^1.1.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001751", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", + "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/chromium-bidi": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-13.1.1.tgz", + "integrity": "sha512-zB9MpoPd7VJwjowQqiW3FKOvQwffFMjQ8Iejp5ZW+sJaKLRhZX1sTxzl3Zt22TDB4zP0OOqs8lRoY7eAW5geyQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^3.24.1" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/concurrently": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", + "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.3", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/content-disposition": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/default-browser": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", + "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/delaunator": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz", + "integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag==", + "license": "ISC" + }, + "node_modules/delaunay-find": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/delaunay-find/-/delaunay-find-0.0.6.tgz", + "integrity": "sha512-1+almjfrnR7ZamBk0q3Nhg6lqSe6Le4vL0WJDSMx4IDbQwTpUTXPjxC00lqLBT8MYsJpPCbI16sIkw9cPsbi7Q==", + "license": "ISC", + "dependencies": { + "delaunator": "^4.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1566079", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1566079.tgz", + "integrity": "sha512-MJfAEA1UfVhSs7fbSQOG4czavUp1ajfg6prlAN0+cmfa2zNjaIbvq8VneP7do1WAQQIvgNJWSMeP6UyI90gIlQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", + "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dotenv": "^16.4.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.238", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.238.tgz", + "integrity": "sha512-khBdc+w/Gv+cS8e/Pbnaw/FXcBUeKrRVik9IxfXtgREOWyJhR4tj43n3amkVogJ/yeQUqzkrZcFhtIxIdqmmcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true, + "license": "MIT" + }, + "node_modules/events-universal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz", + "integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bare-events": "^2.7.0" + } + }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/form-data/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-uri": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", + "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/highlight.js": { + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-middleware": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.5.tgz", + "integrity": "sha512-GLZZm1X38BPY4lkXA01jhwxvDoOkkXqjgVyUzVxiEK4iuRu03PZoYHhHRwxnfhQMDuaxi3vVri0YgSro/1oWqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-proxy": "^1.17.15", + "debug": "^4.3.6", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.3", + "is-plain-object": "^5.0.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/http-server": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz", + "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-auth": "^2.0.1", + "chalk": "^4.1.2", + "corser": "^2.0.1", + "he": "^1.2.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy": "^1.18.1", + "mime": "^1.6.0", + "minimist": "^1.2.6", + "opener": "^1.5.1", + "portfinder": "^1.0.28", + "secure-compare": "3.0.1", + "union": "~0.5.0", + "url-join": "^4.0.1" + }, + "bin": { + "http-server": "bin/http-server" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/joi": { + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-18.0.1.tgz", + "integrity": "sha512-IiQpRyypSnLisQf3PwuN2eIHAsAIGZIrLZkd4zdvIar2bDyhM91ubRjy8a3eYablXsh9BeI/c7dmPYHca5qtoA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/address": "^5.1.1", + "@hapi/formula": "^3.0.2", + "@hapi/hoek": "^11.0.7", + "@hapi/pinpoint": "^2.0.1", + "@hapi/tlds": "^1.1.1", + "@hapi/topo": "^6.0.2", + "@standard-schema/spec": "^1.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz", + "integrity": "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.31.1", + "lightningcss-darwin-arm64": "1.31.1", + "lightningcss-darwin-x64": "1.31.1", + "lightningcss-freebsd-x64": "1.31.1", + "lightningcss-linux-arm-gnueabihf": "1.31.1", + "lightningcss-linux-arm64-gnu": "1.31.1", + "lightningcss-linux-arm64-musl": "1.31.1", + "lightningcss-linux-x64-gnu": "1.31.1", + "lightningcss-linux-x64-musl": "1.31.1", + "lightningcss-win32-arm64-msvc": "1.31.1", + "lightningcss-win32-x64-msvc": "1.31.1" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.31.1.tgz", + "integrity": "sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz", + "integrity": "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.31.1.tgz", + "integrity": "sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.31.1.tgz", + "integrity": "sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.31.1.tgz", + "integrity": "sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.31.1.tgz", + "integrity": "sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.31.1.tgz", + "integrity": "sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.31.1.tgz", + "integrity": "sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.31.1.tgz", + "integrity": "sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.31.1.tgz", + "integrity": "sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.31.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.31.1.tgz", + "integrity": "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lit": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.3.2.tgz", + "integrity": "sha512-NF9zbsP79l4ao2SNrH3NkfmFgN/hBYSQo90saIVI1o5GpjAdCPVstVzO1MrLOakHoEhYkrtRjPK6Ob521aoYWQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@lit/reactive-element": "^2.1.0", + "lit-element": "^4.2.0", + "lit-html": "^3.3.0" + } + }, + "node_modules/lit-element": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.2.2.tgz", + "integrity": "sha512-aFKhNToWxoyhkNDmWZwEva2SlQia+jfG0fjIWV//YeTaWrVnOxD89dPKfigCUspXFmjzOEUQpOkejH5Ly6sG0w==", + "license": "BSD-3-Clause", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.5.0", + "@lit/reactive-element": "^2.1.0", + "lit-html": "^3.3.0" + } + }, + "node_modules/lit-html": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.2.tgz", + "integrity": "sha512-Qy9hU88zcmaxBXcc10ZpdK7cOLXvXpRoBxERdtqV9QOrfpMZZ6pSYP91LhpPtap3sFMUiL7Tw2RImbe0Al2/kw==", + "license": "BSD-3-Clause", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, + "node_modules/lmdb": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.8.5.tgz", + "integrity": "sha512-9bMdFfc80S+vSldBmG3HOuLVHnxRdNTlpzR6QDnzqCQtCzGUEAGTzBKYMeIM+I/sU4oZfgbcbS7X7F65/z/oxQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "msgpackr": "^1.9.5", + "node-addon-api": "^6.1.0", + "node-gyp-build-optional-packages": "5.1.1", + "ordered-binary": "^1.4.1", + "weak-lru-cache": "^1.2.2" + }, + "bin": { + "download-lmdb-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@lmdb/lmdb-darwin-arm64": "2.8.5", + "@lmdb/lmdb-darwin-x64": "2.8.5", + "@lmdb/lmdb-linux-arm": "2.8.5", + "@lmdb/lmdb-linux-arm64": "2.8.5", + "@lmdb/lmdb-linux-x64": "2.8.5", + "@lmdb/lmdb-win32-x64": "2.8.5" + } + }, + "node_modules/lmdb/node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/msgpackr": { + "version": "1.11.8", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.8.tgz", + "integrity": "sha512-bC4UGzHhVvgDNS7kn9tV8fAucIYUBuGojcaLiz7v+P63Lmtm0Xeji8B/8tYKddALXxJLpwIeBmUN3u64C4YkRA==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz", + "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" + } + }, + "node_modules/msgpackr-extract/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz", + "integrity": "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/node-gyp-build-optional-packages/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.26.tgz", + "integrity": "sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nullthrows": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/open/-/open-11.0.0.tgz", + "integrity": "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.4.0", + "define-lazy-prop": "^3.0.0", + "is-in-ssh": "^1.0.0", + "is-inside-container": "^1.0.0", + "powershell-utils": "^0.1.0", + "wsl-utils": "^0.3.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "license": "(WTFPL OR MIT)", + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/ordered-binary": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.6.1.tgz", + "integrity": "sha512-QkCdPooczexPLiXIrbVOPYkR3VO3T6v2OyKRkR1Xbhpy7/LAVXwahnRCgRp78Oe/Ehf0C/HATAxfSr6eA1oX+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pac-proxy-agent": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.6", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/parcel": { + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.16.4.tgz", + "integrity": "sha512-RQlrqs4ujYNJpTQi+dITqPKNhRWEqpjPd1YBcGp50Wy3FcJHpwu0/iRm7XWz2dKU/Bwp2qCcVYPIeEDYi2uOUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/config-default": "2.16.4", + "@parcel/core": "2.16.4", + "@parcel/diagnostic": "2.16.4", + "@parcel/events": "2.16.4", + "@parcel/feature-flags": "2.16.4", + "@parcel/fs": "2.16.4", + "@parcel/logger": "2.16.4", + "@parcel/package-manager": "2.16.4", + "@parcel/reporter-cli": "2.16.4", + "@parcel/reporter-dev-server": "2.16.4", + "@parcel/reporter-tracer": "2.16.4", + "@parcel/utils": "2.16.4", + "chalk": "^4.1.2", + "commander": "^12.1.0", + "get-port": "^4.2.0" + }, + "bin": { + "parcel": "lib/bin.js" + }, + "engines": { + "node": ">= 16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/parcel-resolver-ignore": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/parcel-resolver-ignore/-/parcel-resolver-ignore-2.2.1.tgz", + "integrity": "sha512-1U2+BCisOb1ZVdi/2w3UKXPHxgCL/9jUz1lcUU4i/gRAMBCTXToUNPFmCE1FzNnao7Xp92Dp3CR2Ogedj/BlQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/plugin": "^2.16.0" + }, + "engines": { + "parcel": ">=2.9.0" + }, + "funding": { + "url": "https://ko-fi.com/vladimirmikulic" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/portfinder": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.38.tgz", + "integrity": "sha512-rEwq/ZHlJIKw++XtLAO8PPuOQA/zaPJOZJ37BVuN97nLpMJeuDVLVGRwbFoBgLudgdTMP2hdRJP++H+8QOA3vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "async": "^3.2.6", + "debug": "^4.3.6" + }, + "engines": { + "node": ">= 10.12" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/powershell-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz", + "integrity": "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-agent": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.6", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.1.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer": { + "version": "24.37.2", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.37.2.tgz", + "integrity": "sha512-FV1W/919ve0y0oiS/3Rp5XY4MUNUokpZOH/5M4MMDfrrvh6T9VbdKvAHrAFHBuCxvluDxhjra20W7Iz6HJUcIQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.12.0", + "chromium-bidi": "13.1.1", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1566079", + "puppeteer-core": "24.37.2", + "typed-query-selector": "^2.12.0" + }, + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core": { + "version": "24.37.2", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.37.2.tgz", + "integrity": "sha512-nN8qwE3TGF2vA/+xemPxbesntTuqD9vCGOiZL2uh8HES3pPzLX20MyQjB42dH2rhQ3W3TljZ4ZaKZ0yX/abQuw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.12.0", + "chromium-bidi": "13.1.1", + "debug": "^4.4.3", + "devtools-protocol": "0.0.1566079", + "typed-query-selector": "^2.12.0", + "webdriver-bidi-protocol": "0.4.0", + "ws": "^8.19.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/react": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.4" + } + }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==", + "license": "MIT" + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/react-refresh": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.16.0.tgz", + "integrity": "sha512-FPvF2XxTSikpJxcr+bHut2H4gJ17+18Uy20D5/F+SKzFap62R3cM5wH6b8WN3LyGSYeQilLEcJcR1fjBSI2S1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/secure-compare": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", + "integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/shell-quote": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", + "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamx": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz", + "integrity": "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "events-universal": "^1.0.0", + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar-fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", + "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^4.0.1", + "bare-path": "^3.0.0" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/text-decoder": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, + "node_modules/union": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", + "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", + "dev": true, + "dependencies": { + "qs": "^6.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/url-join": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", + "dev": true, + "license": "MIT" + }, + "node_modules/utility-types": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", + "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/victory-area": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-area/-/victory-area-37.3.6.tgz", + "integrity": "sha512-wVC8LKrZJLiSySNuJLRCB449qZTsPiRyzLlNoJwe21y+XA/a2HJbmJSeywmo8P153aX8viKe1H8ygDsTFXQhHw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-axis": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-axis/-/victory-axis-37.3.6.tgz", + "integrity": "sha512-Vi0dZvgmXmnCdoqc49WckeG5cMXnl7FTtqVhXu9JweA9cgCnkZabBd5mRvAjblb3Lo4j0HZCSPKHYWUPW70qZg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-bar": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-bar/-/victory-bar-37.3.6.tgz", + "integrity": "sha512-jdATFRWL1LUW/yEpKWx/aId2BiU2o1pPF9+Kh1TFISBduJoI4ZqvZD90H1QK4f/z50PikqiqiDECaKoKM1jfOQ==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-box-plot": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-box-plot/-/victory-box-plot-37.3.6.tgz", + "integrity": "sha512-GOucnD63h14ScBuISC/nd1GBTEx6gIZfLE+0P0gyeH1poBKq0trTTvpQDvAMuGR8zICfEETG3ltmUMCwRrFyUg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-brush-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-brush-container/-/victory-brush-container-37.3.6.tgz", + "integrity": "sha512-LfZ2CgX1cYAqCtYxcSB68OfZS2v0T2VLXoEArd0lCXfRBY1Gya7GacCUcuo7GoK9XOXeslx7S/U95aVutt1VLg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-chart": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-chart/-/victory-chart-37.3.6.tgz", + "integrity": "sha512-IkPo/W4AJ7bPu902TGER09OseR9ODm+FQAKfOBw4JsdEhZZ7BiG9zgd/25+x0r5EsTLu81CYGQVkBa+ZazcOlA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-axis": "37.3.6", + "victory-core": "37.3.6", + "victory-polar-axis": "37.3.6", + "victory-shared-events": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-core": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-core/-/victory-core-37.3.6.tgz", + "integrity": "sha512-aFgO6KokxPbUCPznZP5UPhOdI22pMuwDXKDt6eoQOnkVim66Ia+K95TQar2nwVKGYV5j26aKVf/n9blwphGJRw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21", + "react-fast-compare": "^3.2.0", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-create-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-create-container/-/victory-create-container-37.3.6.tgz", + "integrity": "sha512-Uf5bFQvqUsXCjqpvBW4LhrdrHkM6dBqxYgub6FCsBb86f84xZQ3vY7jFkg/JfvF0oGKMoWXYYrYLC1sk+fcWVA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-brush-container": "37.3.6", + "victory-core": "37.3.6", + "victory-cursor-container": "37.3.6", + "victory-selection-container": "37.3.6", + "victory-voronoi-container": "37.3.6", + "victory-zoom-container": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-cursor-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-cursor-container/-/victory-cursor-container-37.3.6.tgz", + "integrity": "sha512-+Oiw57d5nE+iq8As8RvepknzmNtKq1Gsc50u1X3IRd4jXtX8zqZrgXGlVZ+BP/tkLsWnGYVjKulwKBf2oaEUuw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-group": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-group/-/victory-group-37.3.6.tgz", + "integrity": "sha512-kgy/Azl5BxwlJAV0KDPGypv35TMrOD1J2ZxnJW2Wyyq+e8i0GGBIv5MoBzou64BRsDlS9V0CYRIjnkHgrBpB5w==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6", + "victory-shared-events": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-legend": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-legend/-/victory-legend-37.3.6.tgz", + "integrity": "sha512-vRRrhj3/ENqKVLdaBMzEmR83N6BOjox1bthYT1eJjN2H5SIK35bxn30IkiV/Pz3y627EqZe4TAWaxc0jiJlCiA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-line": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-line/-/victory-line-37.3.6.tgz", + "integrity": "sha512-Ke817uf/qFbN9jU7Dba7CrcHXYO5wAZuKKnyeHJmLDeQeFST0773xejnIuC+dBgZipjFr4KIbSd+VcUafFNE1g==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-pie": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-pie/-/victory-pie-37.3.6.tgz", + "integrity": "sha512-tvdgAZ/HQWlo3KDDe0XAVbizHuaNMbgkkiF7zfA7Ww+3bHSs+0P9dsDtK2xP365D8gBCOv8pWmuzvKRhzNbqeA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6", + "victory-vendor": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-polar-axis": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-polar-axis/-/victory-polar-axis-37.3.6.tgz", + "integrity": "sha512-RpFsCkzHezJq5P+C/wtVdjEHX25JIFsSgs6qYSnfr/hayaFbWgK5HhRFpriQm5hg61cx47WxAOLyHvzf0nasvw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-scatter": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-scatter/-/victory-scatter-37.3.6.tgz", + "integrity": "sha512-fp95zMTPXgW1cmTowzDXhn+KxePMVDrzU0lotsHQMdBV7eB+ioXdu9hORlx4VHmMYg2ihsGwRTF+VAZ7rGxphA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-selection-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-selection-container/-/victory-selection-container-37.3.6.tgz", + "integrity": "sha512-gd3qODDlBtLEJM7+2jCXk2YcLBUmIpYEEHswytMhwc6zihxXipGBUHRulhLj/I05mKay2gaOAg5ewiJHd4Awgw==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-shared-events": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-shared-events/-/victory-shared-events-37.3.6.tgz", + "integrity": "sha512-ygrbOtzLUTbtKebacZKyQRekhSAROnAvMkVI/PKsAGsz0ClY9P7qDEJG7eTUUygjO6ax0tI6WNE6JogQzeD1gw==", + "license": "MIT", + "dependencies": { + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-stack": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-stack/-/victory-stack-37.3.6.tgz", + "integrity": "sha512-ldod04RdqGJGH5p5eWXCofdTkbhZqIp3iwW7NpxSbMDLs8zPQIVvDFVtuJgMwQiC5vnIpbhMmxVeFbr8m64ZKA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6", + "victory-shared-events": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-tooltip": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-tooltip/-/victory-tooltip-37.3.6.tgz", + "integrity": "sha512-vqaJS9noauOqDDBBAV9Ln9duOY/i17h1DCfCPAqhwPFyvFbwKvAub9zPTeYWAm/14VvWX5O/0yekFCVbcC7hjg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-vendor": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz", + "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, + "node_modules/victory-voronoi-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-voronoi-container/-/victory-voronoi-container-37.3.6.tgz", + "integrity": "sha512-qAAG0rMuK7A4EoJ4cyUk5wNdOW+HuCXNKPOko+hYK6wWOYXJvFhiglYyA85a695YyAXECc6JyJS/crm4IOEFag==", + "license": "MIT", + "dependencies": { + "delaunay-find": "0.0.6", + "lodash": "^4.17.19", + "react-fast-compare": "^3.2.0", + "victory-core": "37.3.6", + "victory-tooltip": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/victory-zoom-container": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-zoom-container/-/victory-zoom-container-37.3.6.tgz", + "integrity": "sha512-AGL+k20mI44OL5b0VgIxlmnNSefIoFmbbim5NraPmIxbtns9qQW/56ivIncJcYomBungIx99gUpsEpcQaMNHgQ==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.19", + "victory-core": "37.3.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, + "node_modules/wait-on": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-9.0.3.tgz", + "integrity": "sha512-13zBnyYvFDW1rBvWiJ6Av3ymAaq8EDQuvxZnPIw3g04UqGi4TyoIJABmfJ6zrvKo9yeFQExNkOk7idQbDJcuKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "axios": "^1.13.2", + "joi": "^18.0.1", + "lodash": "^4.17.21", + "minimist": "^1.2.8", + "rxjs": "^7.8.2" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/weak-lru-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/webdriver-bidi-protocol": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.0.tgz", + "integrity": "sha512-U9VIlNRrq94d1xxR9JrCEAx5Gv/2W7ERSv8oWRoNe/QYbfccS0V3h/H6qeNeCRJxXGMhhnkqvwNrvPAYeuP9VA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/wsl-utils": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz", + "integrity": "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0", + "powershell-utils": "^0.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/showcase/package.json b/showcase/package.json new file mode 100644 index 000000000..25929c18f --- /dev/null +++ b/showcase/package.json @@ -0,0 +1,41 @@ +{ + "name": "patternfly-java-showcase", + "private": true, + "parcelIgnore": [ + "showcase.js" + ], + "source": [ + "src/web/dev.html", + "src/web/index.html" + ], + "scripts": { + "start:parcel": "parcel watch src/web/dev.html --dist-dir target/showcase --port 1235", + "start:server": "node server.js 1234 1235", + "open:browser": "wait-on http://localhost:1234 && open http://localhost:1234", + "watch": "concurrently \"npm run start:parcel\" \"npm run start:server\" \"npm run open:browser\"", + "prod": "parcel build src/web/index.html --dist-dir target/showcase", + "http-server": "http-server target/showcase --ssl --cert cert.pem", + "images:clean": "rm -rf src/web/images/*", + "images:download": "node images.js" + }, + "dependencies": { + "@github/relative-time-element": "^5.0.0", + "@patternfly/patternfly": "^6.4.0", + "@patternfly-java/charts": "^0.0.13", + "highlight.js": "^11.11.1" + }, + "devDependencies": { + "@parcel/core": "^2.16.4", + "@parcel/reporter-cli": "^2.16.4", + "@parcel/resolver-glob": "^2.16.4", + "concurrently": "^9.2.1", + "express": "^5.2.1", + "http-proxy-middleware": "^3.0.5", + "http-server": "^14.1.1", + "open": "^11.0.0", + "parcel": "^2.16.4", + "parcel-resolver-ignore": "^2.2.1", + "puppeteer": "^24.37.2", + "wait-on": "^9.0.3" + } +} diff --git a/showcase/pom.xml b/showcase/pom.xml index 0be9a5d78..5bac396e1 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -23,53 +23,27 @@ org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml patternfly-java-showcase - 0.2.12-SNAPSHOT - pom + jar PatternFly Java Showcase - 1.12.0 - 2.12.1 - 0.7.3 - 0.2 + 0.5 + v24.10.0 - true - DETAILED BUNDLE_JAR true true - dev - / - development - - - common - gwt - j2cl - - - - ${project.groupId} - patternfly-java-showcase-common - ${project.version} - - - ${project.groupId} - patternfly-java-showcase-common - ${project.version} - sources - org.kie.j2cl.tools bom @@ -77,28 +51,202 @@ pom import - - org.gwtproject - gwt - ${version.gwt} - pom - import - + + + ${project.groupId} + patternfly-java-components + + + ${project.groupId} + patternfly-java-layouts + + + ${project.groupId} + patternfly-java-charts + + + ${project.groupId} + patternfly-java-codeeditor + + + ${project.groupId} + patternfly-java-j2cl + + + org.jboss.elemento + elemento-intl + + + org.jboss.elemento + elemento-router + + + org.jboss.elemento + elemento-router-processor + provided + + + org.kie.j2cl.tools.processors + annotations + + + org.kie.j2cl.tools.processors + common + + + org.kie.j2cl.tools.processors + processors + provided + + + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + .parcel-cache + + + src/main/java + + org/patternfly/showcase/Code.java + org/patternfly/showcase/Documentation.java + + + + + + + dev.jbang + jbang-maven-plugin + + + generate-code + generate-sources + + run + + + + + ${project.basedir} + + + + + generate-doc + generate-sources + + run + + + + + ${project.basedir} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + full + + + + com.github.eirslett + frontend-maven-plugin + + + install-node-and-npm + prepare-package + + install-node-and-npm + + + ${version.node} + + + + npm-install + prepare-package + + npm + + + install + + + + http-server + + npm + + none + + run http-server + + + + + + org.kie.j2cl.tools + j2cl-maven-plugin + + ${j2cl.compilationLevel} + ${j2cl.sourcemaps} + ${j2cl.incremental} + showcase.js + ${project.build.directory}/showcase + + + + + build + + + + + + + prod - false - OBFUSCATED ADVANCED_OPTIMIZATIONS false - false - prod - production + true + + + + com.github.eirslett + frontend-maven-plugin + + + npm-parcel + prepare-package + + npm + + + run prod + + + + + +
diff --git a/showcase/server.js b/showcase/server.js new file mode 100644 index 000000000..0e028ebd8 --- /dev/null +++ b/showcase/server.js @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const express = require('express'); +const {createProxyMiddleware} = require('http-proxy-middleware'); +const path = require('path'); + +const app = express(); +const port = process.argv[2] || 1234; +const parcelPort = process.argv[3] || 1235; + +// 1. Proxy Parcel's dev server +app.use( + '/parcel-assets', + createProxyMiddleware({ + target: 'http://localhost:$(parcelPort)', + changeOrigin: true, + ws: true, // Enable WebSocket proxying if you use it + pathRewrite: { + '^/parcel-assets': '', + }, + logLevel: 'debug', + }) +); + +// 2. Serve static files +app.use(express.static(path.join(__dirname, 'target', 'showcase'))); + + +// 3. J2CL routes +app.get(/.*showcase\.js$/, (req, res) => { + res.sendFile(path.resolve(__dirname, 'target', 'showcase', 'showcase.js')); +}); +app.get(/.*bundle\.js$/, (req, res) => { + const filename = path.basename(req.url); + res.sendFile(path.resolve(__dirname, 'target', 'showcase', filename)); +}); +app.get('/{*pre}/sources/{*post}', (req, res) => { + const source = req.url.substring(req.url.indexOf('sources/')); + res.sendFile(path.resolve(__dirname, 'target', 'showcase', source)); +}); + +// 4. SPA fallback +app.get('/{*any}', (req, res) => { + res.sendFile(path.resolve(__dirname, 'target', 'showcase', 'dev.html')); +}); + +app.listen(port, () => { + console.log(`Development server running on http://localhost:${port}`); + console.log(`Proxying Parcel on http://localhost:${parcelPort}`); +}); diff --git a/showcase/src/doc/api-design.md b/showcase/src/doc/api-design.md new file mode 100644 index 000000000..3f2748f6f --- /dev/null +++ b/showcase/src/doc/api-design.md @@ -0,0 +1,84 @@ +# API design + +PatternFly Java integrates with and builds upon Elemento's [builder API](https://hal-console.gitbook.io/elemento/builder-api). Static factory methods are used to create the components, and public instances methods add child elements and modify the component. + +In general, the API for a component can be classified into these groups: + +## Static factory methods + +These methods are used to create a component. They are usually named after the component, are overloaded to accept required and optional arguments, and return an instance of the newly created component: + +```java +Button button1 = button("Click me!"); +Button button2 = button("PatternFly", "https://www.patternfly.org"); +``` + +## Add methods + +These methods add subcomponents to a main component. They are usually called `add()` and return the main component so that the method call can be chained with other methods. + +```java +Dropdown dropdown = dropdown() + .addToggle(menuToggle("Dropdown")) + .addMenu(menu() + .addContent(menuContent() + .addList(menuList() + .addItem(actionMenuItem("item-0", "Action"))))); +``` + +## Builder / modifier methods + +These methods modify the current component. They return the current component so that the method call can be chained with other methods. + +```java +Card card = card() + .flat() + .rounded() + .large(); +``` + +## ARIA-related methods + +These methods set ARIA-related attributes in the component. They're usually named `aria()` and return the component so that the method call can be chained with other methods. + +```java +Navigation navigation = navigation(flat) + .ariaScrollBackLabel("← back") + .ariaScrollForwardLabel("β†’ forward"); +``` + +## Event handlers + +These methods add event handlers for various event to the component. They are usually named `on()`, accept an event handler, and return the component so that the method call can be chained with other methods. PatternFly Java defines some [common event handlers](https://patternfly-java.github.io/apidocs/org/patternfly/handler/package-summary.html) that are reused in all components. In some cases, components also use specific event handlers that only apply to the component. + +```java +Drawer drawer = drawer().id("drw") + .onToggle((e, c, expanded) -> console.log("Drawer expanded: " + expanded)); +``` + +## Public API / getters + +These methods do something with the component or return a value, a property, or some other kind of information. They return either `void` or a value/property. + +```java +Switch switch_ = switch_("id", "name"); +boolean value = switch_.value(); +``` + +## Common interfaces + +Common behavior across all components is implemented by base classes and interfaces. All components extend from either [`BaseComponent`](https://patternfly-java.github.io/apidocs/org/patternfly/component/BaseComponent.html) or [`BaseComponentSVG`](https://patternfly-java.github.io/apidocs/org/patternfly/component/BaseComponentSVG.html). These base classes implement [interfaces from Elemento](https://hal-console.gitbook.io/elemento/builder-api#classes-and-interfaces) to manipulate the component element. + +In addition, components implement these interfaces to provide a common API: + +- [`Modifiers.*`](https://patternfly-java.github.io/apidocs/org/patternfly/style/Modifiers.html)
The sub-interfaces defined in this 'umbrella' interface are used to toggle one specific flag of a component. For example, `card().plain()` toggles the `plain` flag of the card component and is defined in the [`Modifiers.Plain`](https://patternfly-java.github.io/apidocs/org/patternfly/style/Modifiers.Plain.html) interface. Other components that also provide a `plain` flag implement the `Modifiers.Plain` interface as well. +- [`Closable`](https://patternfly-java.github.io/apidocs/org/patternfly/component/Closeable.html)
Implemented by components that provide some kind of popup that can be closed. The interface provides methods to register event handlers when the popup is closed. +- [`ComponentContext`](https://patternfly-java.github.io/apidocs/org/patternfly/core/ComponentContext.html), [`HasIdentifier`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasIdentifier.html), and [`HasItems`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasItems.html)
These interfaces are often implemented by components that have a parent-child relationship, like [`DataList`](https://patternfly-java.github.io/apidocs/org/patternfly/component/list/DataList.html) and [`DataLiistItem`](https://patternfly-java.github.io/apidocs/org/patternfly/component/list/DataListItem.html). [`HasItems`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasItems.html) is implemented by the parent component and provides methods to add and remove child items. [`ComponentContext`](https://patternfly-java.github.io/apidocs/org/patternfly/core/ComponentContext.html) and [`HasIdentifier`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasIdentifier.html) are implemented by the child components and provide methods to store and retrieve arbitrary values and get a unique identifier for the child item. +- [`ComponentIcon`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentIcon.html) and [`ComponentIconAndText`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentIconAndText.html)
These interfaces are implemented by components that provide text resp. an icon and a text. +- [`ComponentProgress`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentProgress.html)
Implemented by components that provide some kind of progress. +- [`Expandable`](https://patternfly-java.github.io/apidocs/org/patternfly/component/Expandable.html)
Implemented by components that provide some kind of expandable content. +- [`HasValue`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasValue.html) and [`HasObservableValue`](https://patternfly-java.github.io/apidocs/org/patternfly/component/HasObservableValue.html)
These interfaces are implemented by components that provide a value or an observable value. + +--- + +The best way to experience the API is to take a look at the code snippets of the various components and layouts in the [showcase](https://patternfly-java.github.io/). diff --git a/showcase/common/src/doc/get-involved.md b/showcase/src/doc/get-involved.md similarity index 100% rename from showcase/common/src/doc/get-involved.md rename to showcase/src/doc/get-involved.md diff --git a/showcase/common/src/doc/get-started.md b/showcase/src/doc/get-started.md similarity index 100% rename from showcase/common/src/doc/get-started.md rename to showcase/src/doc/get-started.md diff --git a/showcase/src/doc/home.md b/showcase/src/doc/home.md new file mode 100644 index 000000000..ae4a27f9b --- /dev/null +++ b/showcase/src/doc/home.md @@ -0,0 +1,52 @@ +# PatternFly Java + +PatternFly Java is a πŸ’― Java implementation of [PatternFly](https://www.patternfly.org/) without any JavaScript dependencies (except for the charts – see below). Its goal is to provide an easy-to-use, elegant, and efficient API to build complex web applications with PatternFly in Java. PatternFly Java integrates with and builds upon Elemento's [builder API](https://hal-console.gitbook.io/elemento/builder-api). It works with both GWT and J2CL. The following code snippet gives a taste of what PatternFly Java looks like: + +```java +body().add(page() + .addSkipToContent(skipToContent("main-id")) + .addMasthead(masthead() + .addMain(mastheadMain() + .addToggle(mastheadToggle()) + .addBrand(mastheadBrand() + .addLogo(mastheadLogo("/")))) + .addContent(mastheadContent() + .addToolbar(toolbar()))) + .addSidebar(pageSidebar() + .addBody(pageSidebarBody() + .addNavigation(navigation(flat) + .addItem(navigationItem("get-started", "Get started", "/get-started")) + .addItem(navigationItem("get-involved", "Get involved", "/get-involved"))))) + .addMain(pageMain("main-id") + .addSection(pageSection() + .add(content() + .add(title(1, "PatternFly - Java")) + .add(p() + .add(a("https://github.com/patternfly-java/patternfly-java", "_blank") + .text("PatternFly Java")) + .add(" is a πŸ’― Java implementation of ") + .add(a("https://www.patternfly.org/", "_blank") + .text("PatternFly")) + .add(" without any JavaScript dependencies based on GWT/J2CL and ") + .add(a("https://github.com/hal/elemento", "_blank") + .text("Elemento")) + .add(".")))))); +``` + +PatternFly Java aims to provide almost complete support for all components, charts, extensions, and layouts. This showcase demonstrates all currently supported components and layouts. To get all the details about using PatternFly Java, look at the [API documentation](https://patternfly-java.github.io/apidocs/). + +## Charts + +To use charts, you need to install the [`@patternfly-java/charts`](https://www.npmjs.com/package/@patternfly-java/charts) NPM package. This package wraps the supported PatternFly React Chart components as web components. + +Install the package using npm: + +``` +npm install @patternfly-java/charts +``` + +Import it in your JavaScript file: + +```js +import "@patternfly-java/charts/dist/charts"; +``` diff --git a/showcase/common/src/doc/icons.md b/showcase/src/doc/icons.md similarity index 91% rename from showcase/common/src/doc/icons.md rename to showcase/src/doc/icons.md index c1256f167..49267c23e 100644 --- a/showcase/common/src/doc/icons.md +++ b/showcase/src/doc/icons.md @@ -9,7 +9,7 @@ PatternFly Java comes with predefined icons for There are static factory methods in [`IconsSets`](https://patternfly-java.github.io/apidocs/org/patternfly/icon/IconSets.html) to easily use these icons. The icons are returned as instances of the [`PredefinedIcon`](https://patternfly-java.github.io/apidocs/org/patternfly/icon/PredefinedIcon.html) class, which is essentially an instance of an SVG builder and allows easy customization of the returned icon. -Components that support icons usually implement the interface [`WithIcon`](https://patternfly-java.github.io/apidocs/org/patternfly/component/WithIcon.html) or [`WithIconAndText`](https://patternfly-java.github.io/apidocs/org/patternfly/component/WithIconAndText.html) and thus use a common API. +Components that support icons usually implement the interface [`ComponentIcon`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentIcon.html) or [`ComponentIconAndText`](https://patternfly-java.github.io/apidocs/org/patternfly/component/ComponentIconAndText.html) and thus use a common API. ```java import static org.patternfly.component.IconPosition.start; diff --git a/showcase/src/doc/tokens.md b/showcase/src/doc/tokens.md new file mode 100644 index 000000000..c912e0473 --- /dev/null +++ b/showcase/src/doc/tokens.md @@ -0,0 +1,38 @@ +# Tokens + +PatternFly Java comes with predefined enum constants for all PatternFly design [tokens](https://www.patternfly.org/tokens/about-tokens). They are defined in the enum class [`org.patternfly.token.Token`](https://patternfly-java.github.io/apidocs/org/patternfly/token/Token.html): + +```java +public enum Token { + + // enum constants omitted + ; + + /** The CSS custom property name starting with --pf-t */ + public final String name; + /** The default value for the custom property. */ + public final String value; + /** The property name wrapped in var(). */ + public final String var; + + Token(String name, String value, String var) { + this.name = name; + this.value = value; + this.var = var; + } +} +``` + +Here's an example of how to use the token definitions: + +```java +import elemental2.dom.HTMLElement; + +import static org.patternfly.token.Token.globalFontSizeSm; +import static org.patternfly.token.Token.globalTextColorDisabled; + +HTMLElement container = div() + .style("color", globalTextColorDisabled.var) + .style("font-size", globalFontSizeSm.var) + .element(); +``` diff --git a/showcase/common/src/main/java/org/patternfly/showcase/ApiDesignPage.java b/showcase/src/main/java/org/patternfly/showcase/ApiDesignPage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/ApiDesignPage.java rename to showcase/src/main/java/org/patternfly/showcase/ApiDesignPage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/ApiDoc.java b/showcase/src/main/java/org/patternfly/showcase/ApiDoc.java similarity index 94% rename from showcase/common/src/main/java/org/patternfly/showcase/ApiDoc.java rename to showcase/src/main/java/org/patternfly/showcase/ApiDoc.java index 8f0ea06ad..7489c531d 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/ApiDoc.java +++ b/showcase/src/main/java/org/patternfly/showcase/ApiDoc.java @@ -18,6 +18,7 @@ import org.patternfly.style.Color; import static org.patternfly.style.Color.blue; +import static org.patternfly.style.Color.green; import static org.patternfly.style.Color.grey; import static org.patternfly.style.Color.orange; import static org.patternfly.style.Color.purple; @@ -31,6 +32,8 @@ public interface ApiDoc { enum Type { + chart("Chart", green), + component("Component", blue), subcomponent("Subcomponent", teal), diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Data.java b/showcase/src/main/java/org/patternfly/showcase/Data.java similarity index 79% rename from showcase/common/src/main/java/org/patternfly/showcase/Data.java rename to showcase/src/main/java/org/patternfly/showcase/Data.java index 664754083..1d7bfd433 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/Data.java +++ b/showcase/src/main/java/org/patternfly/showcase/Data.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.List; +import org.patternfly.showcase.chart.Chart; import org.patternfly.showcase.component.Component; import org.patternfly.showcase.layout.Layout; @@ -30,10 +31,12 @@ public final class Data { public static JsPropertyMap components; public static JsPropertyMap layouts; + public static JsPropertyMap charts; static { - components = Js.cast(JSON.parse(ResourceBundle.components)); - layouts = Js.cast(JSON.parse(ResourceBundle.layouts)); + components = Js.cast(JSON.parse(ResourcesImpl.INSTANCE.components().getText())); + layouts = Js.cast(JSON.parse(ResourcesImpl.INSTANCE.layouts().getText())); + charts = Js.cast(JSON.parse(ResourcesImpl.INSTANCE.charts().getText())); } public static List components() { @@ -79,4 +82,15 @@ public static List layouts() { }); return result; } + + public static List charts() { + List result = new ArrayList<>(); + charts.forEach(key -> { + Chart chart = charts.get(key); + if (chart.implemented()) { + result.add(chart); + } + }); + return result; + } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/DocumentationPage.java b/showcase/src/main/java/org/patternfly/showcase/DocumentationPage.java similarity index 93% rename from showcase/common/src/main/java/org/patternfly/showcase/DocumentationPage.java rename to showcase/src/main/java/org/patternfly/showcase/DocumentationPage.java index ca3f16d1a..4b33c5ff1 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/DocumentationPage.java +++ b/showcase/src/main/java/org/patternfly/showcase/DocumentationPage.java @@ -31,11 +31,10 @@ import static org.jboss.elemento.By.AttributeOperator.STARTS_WITH; import static org.jboss.elemento.Elements.querySelectorAll; import static org.patternfly.component.content.Content.content; -import static org.patternfly.component.page.PageMainSection.pageMainSection; +import static org.patternfly.component.page.PageSection.pageSection; import static org.patternfly.showcase.ApiDoc.API_DOC_BASE; import static org.patternfly.showcase.ApiDoc.API_DOC_TARGET; import static org.patternfly.showcase.Documentation.doc; -import static org.patternfly.style.Brightness.light; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.title; import static org.patternfly.style.Size._2xl; @@ -47,8 +46,7 @@ public abstract class DocumentationPage implements Page, IsElement, private final HTMLElement root; DocumentationPage(String doc) { - this.root = pageMainSection().css("markdown") - .background(light) + this.root = pageSection().css("markdown") .add(content().html(new SafeHtmlBuilder().appendHtmlConstant(doc(doc)).toSafeHtml())) .element(); Attachable.register(this, this); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/GetInvolvedPage.java b/showcase/src/main/java/org/patternfly/showcase/GetInvolvedPage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/GetInvolvedPage.java rename to showcase/src/main/java/org/patternfly/showcase/GetInvolvedPage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/GetStartedPage.java b/showcase/src/main/java/org/patternfly/showcase/GetStartedPage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/GetStartedPage.java rename to showcase/src/main/java/org/patternfly/showcase/GetStartedPage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Highlight.java b/showcase/src/main/java/org/patternfly/showcase/Highlight.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/Highlight.java rename to showcase/src/main/java/org/patternfly/showcase/Highlight.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/HomePage.java b/showcase/src/main/java/org/patternfly/showcase/HomePage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/HomePage.java rename to showcase/src/main/java/org/patternfly/showcase/HomePage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/IconsPage.java b/showcase/src/main/java/org/patternfly/showcase/IconsPage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/IconsPage.java rename to showcase/src/main/java/org/patternfly/showcase/IconsPage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Ids.java b/showcase/src/main/java/org/patternfly/showcase/Ids.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/Ids.java rename to showcase/src/main/java/org/patternfly/showcase/Ids.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/LinkIcon.java b/showcase/src/main/java/org/patternfly/showcase/LinkIcon.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/LinkIcon.java rename to showcase/src/main/java/org/patternfly/showcase/LinkIcon.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/LoremIpsum.java b/showcase/src/main/java/org/patternfly/showcase/LoremIpsum.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/LoremIpsum.java rename to showcase/src/main/java/org/patternfly/showcase/LoremIpsum.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/NotFound.java b/showcase/src/main/java/org/patternfly/showcase/NotFound.java similarity index 81% rename from showcase/common/src/main/java/org/patternfly/showcase/NotFound.java rename to showcase/src/main/java/org/patternfly/showcase/NotFound.java index bfbb66f41..6f850f950 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/NotFound.java +++ b/showcase/src/main/java/org/patternfly/showcase/NotFound.java @@ -25,19 +25,23 @@ import static java.util.Collections.singletonList; import static org.jboss.elemento.Elements.p; import static org.patternfly.component.content.Content.content; -import static org.patternfly.component.page.PageMainSection.pageMainSection; +import static org.patternfly.component.page.PageSection.pageSection; import static org.patternfly.component.title.Title.title; -import static org.patternfly.style.Brightness.light; class NotFound implements Page { + final Place notFound; + + NotFound(Place notFound) { + this.notFound = notFound; + } + @Override public Iterable elements(Place place, Parameter parameter, LoadedData data) { - return singletonList(pageMainSection() - .background(light) + return singletonList(pageSection() .add(content() .add(title(1, "Not Found")) - .add(p().text("Page " + place.route + " not found"))) + .add(p().text("Page " + notFound.route + " not found"))) .element()); } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/OverviewPage.java b/showcase/src/main/java/org/patternfly/showcase/OverviewPage.java similarity index 58% rename from showcase/common/src/main/java/org/patternfly/showcase/OverviewPage.java rename to showcase/src/main/java/org/patternfly/showcase/OverviewPage.java index 6ea83c9db..314febff6 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/OverviewPage.java +++ b/showcase/src/main/java/org/patternfly/showcase/OverviewPage.java @@ -28,9 +28,8 @@ import static java.util.Collections.singletonList; import static org.jboss.elemento.Elements.div; import static org.patternfly.component.content.Content.content; -import static org.patternfly.component.page.PageMainBody.pageMainBody; -import static org.patternfly.component.page.PageMainGroup.pageMainGroup; -import static org.patternfly.component.page.PageMainSection.pageMainSection; +import static org.patternfly.component.page.PageGroup.pageGroup; +import static org.patternfly.component.page.PageSection.pageSection; import static org.patternfly.component.title.Title.title; import static org.patternfly.component.toolbar.Toolbar.toolbar; import static org.patternfly.component.toolbar.ToolbarContent.toolbarContent; @@ -38,11 +37,8 @@ import static org.patternfly.layout.flex.AlignItems.center; import static org.patternfly.layout.flex.Flex.flex; import static org.patternfly.layout.stack.Stack.stack; -import static org.patternfly.style.Brightness.light; -import static org.patternfly.style.Brightness.light100; import static org.patternfly.style.Classes.hidden; import static org.patternfly.style.Classes.modifier; -import static org.patternfly.style.Classes.sticky; import static org.patternfly.style.Size._4xl; public abstract class OverviewPage implements Page { @@ -55,24 +51,22 @@ protected OverviewPage(String title) { @Override public Iterable elements(Place place, Parameter parameter, LoadedData data) { - return singletonList(pageMainGroup() - .add(pageMainSection().limitWidth().background(light) - .addBody(pageMainBody() - .add(content() - .add(flex().alignItems(center) - .add(title(1, _4xl, title)))))) - .add(pageMainSection().fill().background(light100) - .addBody(pageMainBody() - .add(stack().gutter() - .run(this::landingPages) - .add(div().css("ws-section-gallery") - // TODO Implement sticky toolbar once implemented - .add(toolbar().css(modifier(sticky)) - .addContent(toolbarContent() - .addItem(toolbarItem() - .add("Toolbar not yet implemented"))) - .addContent(toolbarContent().css(modifier(hidden)))) - .add(createGallery()))))) + return singletonList(pageGroup() + .add(pageSection().limitWidth() + .add(content() + .add(flex().alignItems(center) + .add(title(1, _4xl, title))))) + .add(pageSection().fill() + .add(stack().gutter() + .run(this::landingPages) + .add(div().css("ws-section-gallery") + // TODO Implement sticky toolbar once implemented + .add(toolbar().sticky() + .addContent(toolbarContent() + .addItem(toolbarItem() + .add("Toolbar not yet implemented"))) + .addContent(toolbarContent().css(modifier(hidden)))) + .add(createGallery())))) .element()); } diff --git a/showcase/src/main/java/org/patternfly/showcase/Resources.java b/showcase/src/main/java/org/patternfly/showcase/Resources.java new file mode 100644 index 000000000..e4e412b23 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/Resources.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase; + +import org.kie.j2cl.tools.processors.annotations.GWT3Resource; +import org.kie.j2cl.tools.processors.common.resources.ClientBundle; +import org.kie.j2cl.tools.processors.common.resources.TextResource; + +import static elemental2.dom.DomGlobal.btoa; + +@GWT3Resource +public interface Resources extends ClientBundle { + + static String avatarData() { + return "data:image/svg+xml;base64," + btoa(ResourcesImpl.INSTANCE.avatar().getText()); + } + + @Source("avatar.svg") + TextResource avatar(); + + @Source("charts.json") + TextResource charts(); + + @Source("components.json") + TextResource components(); + + @Source("layouts.json") + TextResource layouts(); + + @Source("pf-logo.svg") + TextResource pfLogo(); + + @Source("rhcp.json") + TextResource rhcp(); + + @Source("servers.json") + TextResource servers(); + + @Source("users.json") + TextResource users(); +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Showcase.java b/showcase/src/main/java/org/patternfly/showcase/Showcase.java similarity index 76% rename from showcase/common/src/main/java/org/patternfly/showcase/Showcase.java rename to showcase/src/main/java/org/patternfly/showcase/Showcase.java index 40c63524b..72bb4c033 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/Showcase.java +++ b/showcase/src/main/java/org/patternfly/showcase/Showcase.java @@ -15,19 +15,19 @@ */ package org.patternfly.showcase; -import org.gwtproject.safehtml.shared.SafeHtmlUtils; import org.jboss.elemento.By; import org.jboss.elemento.logger.Logger; import org.jboss.elemento.router.AnnotatedPlaces; import org.jboss.elemento.router.Place; import org.jboss.elemento.router.PlaceManager; +import org.kie.j2cl.tools.processors.annotations.GWT3EntryPoint; import org.patternfly.component.navigation.Navigation; import org.patternfly.component.navigation.NavigationItem; -import org.patternfly.component.page.Page; import org.patternfly.core.Version; import org.patternfly.style.Classes; import static elemental2.dom.DomGlobal.location; +import static org.gwtproject.safehtml.shared.SafeHtmlUtils.fromSafeConstant; import static org.jboss.elemento.Elements.body; import static org.patternfly.component.backtotop.BackToTop.backToTop; import static org.patternfly.component.navigation.ExpandableNavigationGroup.expandableNavigationGroup; @@ -45,34 +45,38 @@ import static org.patternfly.component.page.PageSidebar.pageSidebar; import static org.patternfly.component.page.PageSidebarBody.pageSidebarBody; import static org.patternfly.component.skiptocontent.SkipToContent.skipToContent; +import static org.patternfly.component.toolbar.Toolbar.toolbar; +import static org.patternfly.component.toolbar.ToolbarContent.toolbarContent; +import static org.patternfly.component.toolbar.ToolbarGroup.toolbarGroup; +import static org.patternfly.component.toolbar.ToolbarItem.toolbarItem; +import static org.patternfly.componentgroup.theme.ThemeSelector.themeSelector; +import static org.patternfly.showcase.Data.charts; import static org.patternfly.showcase.Data.groupComponents; import static org.patternfly.showcase.Data.layouts; import static org.patternfly.showcase.Data.topLevelComponents; import static org.patternfly.style.Classes.component; +import static org.patternfly.style.Classes.fullHeight; +import static org.patternfly.style.Classes.modifier; +import static org.patternfly.style.Classes.static_; import static org.patternfly.style.Variable.componentVar; import static org.patternfly.style.Variables.Height; public final class Showcase { - static final String MAIN_ID = "pfj-main-id"; + private static final String MAIN_ID = "pfj-main-id"; private static final Logger logger = Logger.getLogger(Showcase.class.getName()); - - private static Navigation navigation; private static PlaceManager placeManager; - private static Page page; - // ------------------------------------------------------ init + public static PlaceManager placeManager() { + return placeManager; + } - public static void init(Settings settings) { - // log level + @GWT3EntryPoint + public void onModuleLoad() { Logger.initFrom(location); - // navigation #1 - navigation = navigation(expandable); - - // place manager + Navigation navigation = navigation(expandable); placeManager = new PlaceManager() - .base(settings.base()) .root(By.id(MAIN_ID)) .linkSelector(By.attribute("target", ApiDoc.API_DOC_TARGET), true) .title(title -> "PatternFly Java β€’ " + title) @@ -80,7 +84,6 @@ public static void init(Settings settings) { .register(new AnnotatedPlaces()) .afterPlace((pm, place) -> navigation.select(place.route)); - // navigation #2 navigation .addItem(ni(placeManager.place("/get-started"))) .addGroup(expandableNavigationGroup("components", "Components") @@ -95,15 +98,19 @@ public static void init(Settings settings) { .addItems(groupComponents("menus"), sc -> navigationItem(sc.route, sc.title, sc.route)), "/components/masthead")) + .addGroup(expandableNavigationGroup("charts", "Charts") + .addItem(ni(placeManager.place("/charts/about-charts"), "About charts")) + .addItems(charts(), chart -> + navigationItem(chart.route, chart.title, chart.route))) .addGroup(expandableNavigationGroup("layouts", "Layouts") .addItem(ni(placeManager.place("/layouts/about-layouts"), "About layouts")) .addItems(layouts(), layout -> navigationItem(layout.route, layout.title, layout.route))) .addItem(ni(placeManager.place("/api-design"))) .addItem(ni(placeManager.place("/icons"))) + .addItem(ni(placeManager.place("/tokens"))) .addItem(ni(placeManager.place("/get-involved"))); - // body and page body().add(page() .addSkipToContent(skipToContent(MAIN_ID)) .addMasthead(masthead() @@ -112,33 +119,24 @@ public static void init(Settings settings) { .toggleSidebar()) .addBrand(mastheadBrand() .addLogo(mastheadLogo("/") - .style(componentVar(component(Classes.brand), Height).name, "36px") - .apply(e -> e.innerHTML = SafeHtmlUtils.fromSafeConstant( - ResourceBundle.pfLogo).asString())))) - .addContent(mastheadContent())) + .html(fromSafeConstant(ResourcesImpl.INSTANCE.pfLogo().getText())) + .style(componentVar(component(Classes.brand), Height).name, "36px")))) + .addContent(mastheadContent() + .addToolbar(toolbar().css(modifier(fullHeight), modifier(static_)) + .addContent(toolbarContent() + .addGroup(toolbarGroup().css(modifier("align-end")) + .addItem(toolbarItem().add(themeSelector("pfj") + .withContrast()))))))) .addSidebar(pageSidebar() .addBody(pageSidebarBody() .addNavigation(navigation))) .addMain(pageMain(MAIN_ID)) .add(backToTop().css("ws-back-to-top") .scrollableSelector(By.id(MAIN_ID)))); - } - public static void start() { placeManager.start(); - } - - // ------------------------------------------------------ api - - public static void log(Settings settings) { logger.info("PatternFly version: %s", Version.PATTERN_FLY_VERSION); logger.info("PatternFly Java version: %s", Version.PATTERN_FLY_JAVA_VERSION); - logger.info("Execution mode: %s", settings.mode()); - logger.info("Technology stack: %s", settings.tech()); - } - - public static PlaceManager placeManager() { - return placeManager; } // ------------------------------------------------------ internal diff --git a/showcase/common/src/main/java/org/patternfly/showcase/Snippet.java b/showcase/src/main/java/org/patternfly/showcase/Snippet.java similarity index 90% rename from showcase/common/src/main/java/org/patternfly/showcase/Snippet.java rename to showcase/src/main/java/org/patternfly/showcase/Snippet.java index 66a0da017..a4cb802b0 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/Snippet.java +++ b/showcase/src/main/java/org/patternfly/showcase/Snippet.java @@ -18,25 +18,24 @@ import java.util.function.Supplier; import org.jboss.elemento.By; -import org.jboss.elemento.HTMLContainerBuilder; import org.jboss.elemento.Id; import org.jboss.elemento.IsElement; +import org.patternfly.component.content.Content; import org.patternfly.extension.codeeditor.CodeEditor; import org.patternfly.icon.IconSets; import org.patternfly.style.Classes; import elemental2.dom.HTMLElement; -import elemental2.dom.HTMLParagraphElement; import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.isVisible; -import static org.jboss.elemento.Elements.p; import static org.jboss.elemento.Elements.removeChildrenFrom; import static org.jboss.elemento.Elements.setVisible; import static org.jboss.elemento.Elements.wrapHtmlElement; import static org.patternfly.component.button.Button.button; import static org.patternfly.component.content.Content.content; import static org.patternfly.component.content.ContentType.h3; +import static org.patternfly.component.content.ContentType.p; import static org.patternfly.component.tooltip.Tooltip.tooltip; import static org.patternfly.core.Aria.hidden; import static org.patternfly.core.Attributes.tabindex; @@ -63,14 +62,14 @@ public class Snippet implements IsElement { private final HTMLElement preview; public Snippet(String id, String title, String code, Supplier demo) { - this(id, title, (HTMLContainerBuilder) null, code, demo); + this(id, title, (Content) null, code, demo); } public Snippet(String id, String title, String description, String code, Supplier demo) { - this(id, title, description == null ? null : p().text(description), code, demo); + this(id, title, description == null ? null : content(p).editorial().text(description), code, demo); } - public Snippet(String id, String title, HTMLContainerBuilder description, String code, + public Snippet(String id, String title, Content description, String code, Supplier demo) { this.id = id; this.title = title; @@ -91,13 +90,18 @@ public Snippet(String id, String title, HTMLContainerBuilder { + if (description != null) { + stackItem.add(content(p).css("ws-p")).add(description); + } + })) .add(preview = stackItem() .add(demo.get()) .element()) .addItem(stackItem() .add(codeEditor = codeEditor().css("ws-code-editor") - .addHeader(codeEditorHeader() + .addHeader(codeEditorHeader().plain() .addActions(codeEditorActions() .addAction(codeEditorAction(button() .id(codeId) diff --git a/showcase/common/src/main/java/org/patternfly/showcase/SnippetPage.java b/showcase/src/main/java/org/patternfly/showcase/SnippetPage.java similarity index 73% rename from showcase/common/src/main/java/org/patternfly/showcase/SnippetPage.java rename to showcase/src/main/java/org/patternfly/showcase/SnippetPage.java index 8369c8410..0a27baa4a 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/SnippetPage.java +++ b/showcase/src/main/java/org/patternfly/showcase/SnippetPage.java @@ -22,19 +22,19 @@ import org.gwtproject.safehtml.shared.SafeHtml; import org.jboss.elemento.By; -import org.jboss.elemento.HTMLContainerBuilder; import org.jboss.elemento.Id; import org.jboss.elemento.router.LoadedData; import org.jboss.elemento.router.Page; import org.jboss.elemento.router.Parameter; import org.jboss.elemento.router.Place; +import org.patternfly.component.content.Content; import org.patternfly.component.jumplinks.JumpLinks; import org.patternfly.component.table.Tbody; +import org.patternfly.showcase.chart.Chart; import org.patternfly.showcase.component.Component; import org.patternfly.showcase.layout.Layout; import elemental2.dom.HTMLElement; -import elemental2.dom.HTMLParagraphElement; import static java.util.Collections.singletonList; import static org.jboss.elemento.Elements.a; @@ -44,13 +44,13 @@ import static org.patternfly.component.button.Button.button; import static org.patternfly.component.content.Content.content; import static org.patternfly.component.content.ContentType.h2; +import static org.patternfly.component.content.ContentType.p; import static org.patternfly.component.jumplinks.JumpLinks.jumpLinks; import static org.patternfly.component.jumplinks.JumpLinksItem.jumpLinksItem; import static org.patternfly.component.jumplinks.JumpLinksList.jumpLinksList; import static org.patternfly.component.label.Label.label; -import static org.patternfly.component.page.PageMainBody.pageMainBody; -import static org.patternfly.component.page.PageMainGroup.pageMainGroup; -import static org.patternfly.component.page.PageMainSection.pageMainSection; +import static org.patternfly.component.page.PageGroup.pageGroup; +import static org.patternfly.component.page.PageSection.pageSection; import static org.patternfly.component.table.Table.table; import static org.patternfly.component.table.Tbody.tbody; import static org.patternfly.component.table.Td.td; @@ -75,7 +75,6 @@ import static org.patternfly.style.Breakpoint._2xl; import static org.patternfly.style.Breakpoint.default_; import static org.patternfly.style.Breakpoints.breakpoints; -import static org.patternfly.style.Brightness.light; import static org.patternfly.style.Classes.floatInlineEnd; import static org.patternfly.style.Classes.modifier; import static org.patternfly.style.Classes.util; @@ -105,54 +104,53 @@ public SnippetPage(Layout layout) { this(layout.title, layout.summary(), layout.apiDoc(), layout.designGuidelines()); } + public SnippetPage(Chart chart) { + this(chart.title, chart.summary(), chart.apiDoc(), chart.designGuidelines()); + } + SnippetPage(String title, SafeHtml summary, String apiDoc, String designGuidelines) { tocReady = false; tocs = new LinkedHashMap<>(); elements = singletonList( - pageMainGroup() - .addSection(pageMainSection() - .background(light) + pageGroup() + .addSection(pageSection() .limitWidth() - .addBody(pageMainBody() - .add(div().css(util(floatInlineEnd)) - .add(button(a()) - .id("design-guidelines") - .plain() - .href(designGuidelines) - .target("patternfly") - .icon(swatchbook())) - .add(tooltip(By.id("design-guidelines"), "Design guidelines") - .placement(auto))) - .add(div().css(util(floatInlineEnd)) - .add(button(a()) - .id("api-doc") - .plain() - .href(apiDoc) - .target(ApiDoc.API_DOC_TARGET) - .icon(catalog())) - .add(tooltip(By.id("api-doc"), "API documentation") - .placement(auto))) - .add(content().editorial() - .add(flex().alignItems(center).add(title(1, _4xl, title))) - .add(p().html(summary))))) - .addSection(pageMainSection().css(modifier("light-100")) + .add(div().css(util(floatInlineEnd)) + .add(button(a()) + .id("design-guidelines") + .plain() + .href(designGuidelines) + .target("patternfly") + .icon(swatchbook())) + .add(tooltip(By.id("design-guidelines"), "Design guidelines") + .placement(auto))) + .add(div().css(util(floatInlineEnd)) + .add(button(a()) + .id("api-doc") + .plain() + .href(apiDoc) + .target(ApiDoc.API_DOC_TARGET) + .icon(catalog())) + .add(tooltip(By.id("api-doc"), "API documentation") + .placement(auto))) + .add(content().editorial() + .add(flex().alignItems(center).add(title(1, _4xl, title))) + .add(p().html(summary)))) + .addSection(pageSection().css(modifier("light-100")) .fill() - .addBody(pageMainBody() - .add(div().css(util("h-100")) - .add(flex() - .add(jumpLinks = jumpLinks("Table of contents") - .css("ws-toc") - .style("top", "45px") - .vertical() - .scrollableSelector(By.id(MAIN_ID)) - .expandable(breakpoints( - default_, expandable, - _2xl, nonExpandable)) - .ariaLabel("Table of contents")) - .add(contentContainer = stack().gutter() - .style("max-width", "825px") - .style("flex-grow", 1) - .element()))))) + .add(div().css(util("h-100")) + .add(flex().css(modifier("nowrap-on-2xl")) + .add(jumpLinks = jumpLinks("Table of contents") + .css("ws-toc") + .style("top", "0") + .vertical() + .scrollableSelector(By.id(MAIN_ID)) + .expandable(breakpoints( + default_, expandable, + _2xl, nonExpandable)) + .ariaLabel("Table of contents")) + .add(contentContainer = stack().gutter().css("ws-example-page-wrapper") + .element())))) .element()); } @@ -186,7 +184,7 @@ public void startExamples(String description) { addHeader(Toc.EXAMPLES, "Examples", description); } - public void startExamples(HTMLContainerBuilder description) { + public void startExamples(Content description) { addHeader(Toc.EXAMPLES, "Examples", description); } @@ -204,7 +202,7 @@ public void addSnippet(String headerId, Snippet snippet) { // ------------------------------------------------------ api doc public void startApiDocs(Class component) { - addHeader(Toc.API_DOCS, "API documentation", p() + addHeader(Toc.API_DOCS, "API documentation", content(p).editorial() .add("All classes for this component are in the package ") .add(a(packageDocLink(component), ApiDoc.API_DOC_TARGET).text(package_(component))) .add(".")); @@ -234,18 +232,18 @@ public void addApiDoc(Class clazz, ApiDoc.Type type) { // ------------------------------------------------------ header public void addHeader(String id, String title) { - addHeader(id, title, (HTMLContainerBuilder) null); + addHeader(id, title, (Content) null); } public void addHeader(String id, String title, String description) { if (description == null) { - addHeader(id, title, (HTMLContainerBuilder) null); + addHeader(id, title, (Content) null); } else { - addHeader(id, title, p().text(description)); + addHeader(id, title, content(p).editorial().text(description)); } } - public void addHeader(String id, String title, HTMLContainerBuilder description) { + public void addHeader(String id, String title, Content description) { storeToc(id, title); contentContainer.appendChild(flex().spaceItems(sm).alignItems(center) .add(content(h2).editorial().css("ws-heading", "ws-title", "ws-h2") diff --git a/showcase/gwt/src/main/java/org/patternfly/showcase/Main.java b/showcase/src/main/java/org/patternfly/showcase/TokensPage.java similarity index 70% rename from showcase/gwt/src/main/java/org/patternfly/showcase/Main.java rename to showcase/src/main/java/org/patternfly/showcase/TokensPage.java index 192150f56..f8931016f 100644 --- a/showcase/gwt/src/main/java/org/patternfly/showcase/Main.java +++ b/showcase/src/main/java/org/patternfly/showcase/TokensPage.java @@ -15,16 +15,12 @@ */ package org.patternfly.showcase; -import com.google.gwt.core.client.EntryPoint; +import org.jboss.elemento.router.Route; -import static org.patternfly.showcase.Environment.env; +@Route(value = "/tokens", title = "Tokens") +public class TokensPage extends DocumentationPage { -public class Main implements EntryPoint { - - @Override - public void onModuleLoad() { - Showcase.init(env()); - Showcase.start(); - Showcase.log(env()); + public TokensPage() { + super("tokens"); } } diff --git a/showcase/src/main/java/org/patternfly/showcase/chart/BulletChart.java b/showcase/src/main/java/org/patternfly/showcase/chart/BulletChart.java new file mode 100644 index 000000000..5ad12ffba --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/chart/BulletChart.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.chart; + +import org.jboss.elemento.router.Route; +import org.patternfly.chart.bullet.Bullet; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.jboss.elemento.Elements.div; +import static org.patternfly.chart.bullet.Bullet.bullet; +import static org.patternfly.chart.bullet.BulletData.bulletData; +import static org.patternfly.showcase.ApiDoc.Type.chart; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.charts; + +@Route(value = "/charts/bullet", title = "Bullet") +public class BulletChart extends SnippetPage { + + public BulletChart() { + super(charts.get("bullet")); + + startExamples(); + addSnippet(new Snippet("bullet-basic", "Basic", + code("bullet-basic"), () -> + // @code-start:bullet-basic + div().style("height: 150px; width: 600px;") + .add(bullet() + .ariaTitle("Bullet chart example") + .ariaDesc("Storage capacity") + .comparativeWarningMeasureData(bulletData("Warning", 88)) + .primarySegmentedMeasureData(bulletData("Measure", 60)) + .qualitativeRangeData(bulletData("Range", 50), bulletData("Range", 75)) + .labels(data -> data.name + ": " + data.y) + .maxDomain(100) + .height(150) + .width(600)) + .element() + // @code-end:bullet-basic + )); + + addSnippet(new Snippet("bullet-spm", "Segmented primary measure", + code("bullet-spm"), () -> + // @code-start:bullet-spm + div().style("height: 200px; width: 600px;") + .add(bullet() + .ariaTitle("Bullet chart example") + .ariaDesc("Storage capacity") + .comparativeWarningMeasureData(bulletData("Warning", 88)) + .comparativeWarningMeasureLegendData("Warning") + .primarySegmentedMeasureData(bulletData("Measure", 25), bulletData("Measure", 60)) + .primarySegmentedMeasureLegendData("Measure 1", "Measure 2") + .qualitativeRangeData(bulletData("Range", 50), bulletData("Range", 75)) + .qualitativeRangeLegendData("Range 1", "Range 2") + .labels(data -> data.name + ": " + data.y) + .maxDomain(100) + .height(200) + .width(600)) + .element() + // @code-end:bullet-spm + )); + + startApiDocs(Bullet.class); + addApiDoc(Bullet.class, chart); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/chart/Chart.java b/showcase/src/main/java/org/patternfly/showcase/chart/Chart.java new file mode 100644 index 000000000..e4284c5a8 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/chart/Chart.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.chart; + +import org.gwtproject.safehtml.shared.SafeHtml; +import org.gwtproject.safehtml.shared.SafeHtmlUtils; + +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +import static org.patternfly.showcase.ApiDoc.API_DOC_BASE; + +@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") +public class Chart { + + public String name; + public String title; + public String summary; + public String route; + public String clazz; + + @JsOverlay + public final boolean implemented() { + return clazz != null && route != null; + } + + @JsOverlay + public final SafeHtml summary() { + return SafeHtmlUtils.fromTrustedString(summary); + } + + @JsOverlay + public final String apiDoc() { + return API_DOC_BASE + clazz.replace('.', '/') + ".html"; + } + + @JsOverlay + public final String designGuidelines() { + return "https://www.patternfly.org/charts/" + name + "-chart/design-guidelines"; + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/chart/ChartsPage.java b/showcase/src/main/java/org/patternfly/showcase/chart/ChartsPage.java new file mode 100644 index 000000000..5e5c01440 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/chart/ChartsPage.java @@ -0,0 +1,73 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.chart; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.card.Card; +import org.patternfly.layout.gallery.Gallery; +import org.patternfly.layout.stack.Stack; +import org.patternfly.showcase.OverviewPage; + +import static org.jboss.elemento.Elements.a; +import static org.patternfly.component.card.Card.card; +import static org.patternfly.component.card.CardBody.cardBody; +import static org.patternfly.component.card.CardTitle.cardTitle; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.h1; +import static org.patternfly.component.content.ContentType.p; +import static org.patternfly.layout.flex.AlignItems.center; +import static org.patternfly.layout.flex.Flex.flex; +import static org.patternfly.layout.flex.SpaceItems.none; +import static org.patternfly.layout.gallery.Gallery.gallery; +import static org.patternfly.layout.gallery.GalleryItem.galleryItem; +import static org.patternfly.showcase.Data.charts; + +@Route(value = "/charts/about-charts", title = "Charts") +public class ChartsPage extends OverviewPage { + + public ChartsPage() { + super("Charts"); + } + + @Override + protected void landingPages(Stack stack) { + stack.add(flex().spaceItems(none) + .alignItems(center) + .add(content(h1) + .editorial() + .css("ws-heading ws-title ws-h1") + .text("About"))); + stack.add(content(p) + .editorial() + .css("ws-p") + .text("A chart visualizes data in an application. The type of chart you use will depend on your use case and the type of data you need to display.")); + } + + protected Gallery createGallery() { + return gallery().gutter().addItems(charts(), chart -> galleryItem() + .add(a(chart.route).css("ws-section-gallery-item") + .add(createCard(chart)))); + } + + protected Card createCard(Chart chart) { + return card() + .addTitle(cardTitle(chart.title)) + .addBody(cardBody() + .add(content() + .editorial() + .add(content(p).html(chart.summary())))); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/chart/DonutChart.java b/showcase/src/main/java/org/patternfly/showcase/chart/DonutChart.java new file mode 100644 index 000000000..54bca833b --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/chart/DonutChart.java @@ -0,0 +1,203 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.chart; + +import org.jboss.elemento.router.Route; +import org.patternfly.chart.SubTitlePosition; +import org.patternfly.chart.donut.Donut; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.jboss.elemento.Elements.div; +import static org.patternfly.chart.ChartThemeColor.multiOrdered; +import static org.patternfly.chart.Data.data; +import static org.patternfly.chart.LegendOrientation.vertical; +import static org.patternfly.chart.LegendPosition.bottom; +import static org.patternfly.chart.LegendPosition.right; +import static org.patternfly.chart.Padding.padding; +import static org.patternfly.chart.donut.Donut.donut; +import static org.patternfly.showcase.ApiDoc.Type.chart; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.charts; + +@Route(value = "/charts/donut", title = "Donut") +public class DonutChart extends SnippetPage { + + public DonutChart() { + super(charts.get("donut")); + + startExamples(); + addSnippet(new Snippet("donut-basic", "Basic", + code("donut-basic"), () -> + // @code-start:donut-basic + div().style("height: 230px; width: 230px;") + .add(donut() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%")) + .element() + // @code-end:donut-basic + )); + + addSnippet(new Snippet("donut-ral", "Right aligned legend", + code("donut-ral"), () -> + // @code-start:donut-ral + div().style("height: 230px; width: 350px;") + .add(donut() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendOrientation(vertical) + .legendPosition(right) + .padding(padding(20, 140, 20, 20)) + .width(350)) + .element() + // @code-end:donut-ral + )); + + addSnippet(new Snippet("donut-mc", "Multi-color (ordered) with right aligned legend", + code("donut-mc"), () -> + // @code-start:donut-mc + div().style("height: 230px; width: 350px;") + .add(donut() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendOrientation(vertical) + .legendPosition(right) + .padding(padding(20, 140, 20, 20)) + .themeColor(multiOrdered) + .width(350)) + .element() + // @code-end:donut-mc + )); + + addSnippet(new Snippet("donut-bal", "Bottom aligned legend", + code("donut-bal"), () -> + // @code-start:donut-bal + div().style("height: 275px; width: 300px;") + .add(donut() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendPosition(bottom) + .padding(padding(20, 20, 65, 20)) + .height(275) + .width(300)) + .element() + // @code-end:donut-bal + )); + + addSnippet(new Snippet("donut-small", "Small", + code("donut-small"), () -> + // @code-start:donut-small + div().style("height: 150px; width: 150px;") + .add(donut() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .height(150) + .width(150)) + .element() + // @code-end:donut-small + )); + + addSnippet(new Snippet("donut-small-ral", "Small with right aligned legend", + code("donut-small-ral"), () -> + // @code-start:donut-small-ral + div().style("height: 150px; width: 275px;") + .add(donut() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendOrientation(vertical) + .legendPosition(right) + .padding(padding(20, 145, 20, 20)) + .height(150) + .width(275)) + .element() + // @code-end:donut-small-ral + )); + + addSnippet(new Snippet("donut-small-bast", "Small with bottom aligned subtitle", + code("donut-small-bast"), () -> + // @code-start:donut-small-bast + div().style("height: 165px; width: 275px;") + .add(donut() + .title("100") + .subTitle("Pets") + .subTitlePosition(SubTitlePosition.bottom) + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendOrientation(vertical) + .legendPosition(right) + .padding(padding(20, 145, 25, 20)) + .height(165) + .width(275)) + .element() + // @code-end:donut-small-bast + )); + + addSnippet(new Snippet("donut-small-rast", "Small with right aligned subtitle", + code("donut-small-rast"), () -> + // @code-start:donut-small-rast + div().style("height: 200px; width: 300px;") + .add(donut() + .title("100") + .subTitle("Pets") + .subTitlePosition(SubTitlePosition.right) + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendPosition(bottom) + .padding(padding(20, 50, 70, 20)) + .height(200) + .width(300)) + .element() + // @code-end:donut-small-rast + )); + + startApiDocs(Donut.class); + addApiDoc(Donut.class, chart); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/chart/DonutUtilizationChart.java b/showcase/src/main/java/org/patternfly/showcase/chart/DonutUtilizationChart.java new file mode 100644 index 000000000..453ca53d3 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/chart/DonutUtilizationChart.java @@ -0,0 +1,532 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.chart; + +import org.jboss.elemento.router.Route; +import org.patternfly.chart.SubTitlePosition; +import org.patternfly.chart.utilization.DonutThreshold; +import org.patternfly.chart.utilization.DonutUtilization; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static elemental2.dom.DomGlobal.setInterval; +import static org.jboss.elemento.Elements.div; +import static org.patternfly.chart.ChartThemeColor.green; +import static org.patternfly.chart.Data.data; +import static org.patternfly.chart.LegendOrientation.vertical; +import static org.patternfly.chart.LegendPosition.bottom; +import static org.patternfly.chart.Padding.padding; +import static org.patternfly.chart.utilization.DonutThreshold.donutThreshold; +import static org.patternfly.chart.utilization.DonutUtilization.donutUtilization; +import static org.patternfly.showcase.ApiDoc.Type.chart; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.charts; + +@Route(value = "/charts/donut-utilization", title = "Donut utilization") +public class DonutUtilizationChart extends SnippetPage { + + public DonutUtilizationChart() { + super(charts.get("donut-utilization")); + + // ------------------------------------------------------ donut utilization + + addHeader("donut-utilization", "Donut utilization examples"); + addSnippet("donut-utilization", new Snippet("du-basic", "Basic", + code("du-basic"), () -> + // @code-start:du-basic + div().style("height: 230px; width: 230px;") + .add(donutUtilization() + .title("75%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 75)) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null)) + .element() + // @code-end:du-basic + )); + + addSnippet("donut-utilization", new Snippet("du-ral", "Right aligned legend", + code("du-ral"), () -> { + // @code-start:du-ral + DonutUtilization du = donutUtilization() + .title("0%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 0)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "unused") + .legendOrientation(vertical) + .padding(padding(20, 225, 20, 20)) + .width(435); + + setInterval(__ -> { + double previous = du.data().y; + double current = (previous + 10) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "unused"); + }, 1000); + + return div().style("height: 230px; width: 435px;") + .add(du) + .element(); + // @code-end:du-ral + })); + + addSnippet("donut-utilization", new Snippet("du-inv-ral", "Inverted with right aligned legend", + code("du-inv-ral"), () -> { + // @code-start:du-inv-ral + DonutUtilization du = donutUtilization() + .title("0%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 0)) + .thresholds(60, 20) + .invert() + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "unused") + .legendOrientation(vertical) + .padding(padding(20, 225, 20, 20)) + .width(435); + + setInterval(__ -> { + double previous = du.data().y; + double current = (((previous - 10) % 100) + 100) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "unused"); + }, 1000); + + return div().style("height: 230px; width: 435px;") + .add(du) + .element(); + // @code-end:du-inv-ral + })); + + addSnippet("donut-utilization", new Snippet("du-bavl", "Bottom aligned vertical legend", + code("du-bavl"), () -> { + // @code-start:du-bavl + DonutUtilization du = donutUtilization() + .title("0%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 0)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "unused") + .legendOrientation(vertical) + .legendPosition(bottom) + .padding(padding(20, 20, 75, 20)) + .themeColor(green) + .height(300) + .width(230); + + setInterval(__ -> { + double previous = du.data().y; + double current = (previous + 10) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "unused"); + }, 1000); + + return div().style("height: 300px; width: 230px;") + .add(du) + .element(); + // @code-end:du-bavl + })); + + addSnippet("donut-utilization", new Snippet("du-bal", "Bottom aligned legend", + code("du-bal"), () -> + // @code-start:du-bal + div().style("height: 275px; width: 300px;") + .add(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 45)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 45%", "unused") + .legendPosition(bottom) + .padding(padding(20, 20, 65, 20)) + .height(275) + .width(300)) + .element() + // @code-end:du-bal + )); + + addSnippet("donut-utilization", new Snippet("du-small", "Small", + code("du-small"), () -> + // @code-start:du-small + div().style("height: 175px; width: 175px;") + .add(donutUtilization() + .title("75%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 75)) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .height(175) + .width(175)) + .element() + // @code-end:du-small + )); + + addSnippet("donut-utilization", new Snippet("du-small-ral", "Small with right aligned legend", + code("du-small-ral"), () -> { + // @code-start:du-small-ral + DonutUtilization du = donutUtilization() + .title("0%") + .subTitle("of 100 GBps") + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 0)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "unused") + .legendOrientation(vertical) + .padding(padding(20, 195, 20, 20)) + .width(350) + .height(175); + + setInterval(__ -> { + double previous = du.data().y; + double current = (previous + 10) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "unused"); + }, 1000); + + return div().style("height: 175px; width: 350px;") + .add(du) + .element(); + // @code-end:du-small-ral + })); + + addSnippet("donut-utilization", new Snippet("du-small-bas", "Small with bottom aligned subtitle", + code("du-small-bas"), () -> + // @code-start:du-small-bas + div().style("height: 185px; width: 350px;") + .add(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .subTitlePosition(SubTitlePosition.bottom) + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 45)) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 45%", "unused") + .legendOrientation(vertical) + .padding(padding(20, 195, 20, 20)) + .height(185) + .width(350)) + .element() + // @code-end:du-small-bas + )); + + addSnippet("donut-utilization", new Snippet("du-small-ras", "Small with right aligned subtitle", + code("du-small-ras"), () -> + // @code-start:du-small-ras + div().style("height: 200px; width: 350px;") + .add(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .subTitlePosition(SubTitlePosition.right) + .ariaTitle("Donut utilization chart example") + .ariaDesc("Storage capacity") + .data(data("Storage capacity", 45)) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 45%", "unused") + .legendPosition(bottom) + .padding(padding(20, 20, 45, 20)) + .height(200) + .width(350)) + .element() + // @code-end:du-small-ras + )); + + // ------------------------------------------------------ donut threshold + + addHeader("donut-threshold", "Donut threshold examples"); + addSnippet("donut-threshold", new Snippet("dt-static", "Static thresholds", + code("dt-static"), () -> + // @code-start:dt-static + div().style("height: 230px; width: 230px;") + .add(donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .addUtilization(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 45)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null))) + .element() + // @code-end:dt-static + )); + + addSnippet("donut-threshold", new Snippet("dt-ral", "Static thresholds with right aligned legend", + code("dt-ral"), () -> { + // @code-start:dt-ral + DonutUtilization du = donutUtilization(); + DonutThreshold dt = donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 290, 20, 20)) + .width(500) + .addUtilization(du + .title("0%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 0)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "Warning threshold at 60%", "Danger threshold at 90%") + .legendOrientation(vertical)); + + setInterval(__ -> { + double previous = du.data().y; + double current = (previous + 10) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "Warning threshold at 60%", "Danger threshold at 90%"); + }, 1000); + + return div().style("height: 230px; width: 500px;") + .add(dt) + .element(); + // @code-end:dt-ral + })); + + addSnippet("donut-threshold", new Snippet("dt-inv-ral", "Inverted static thresholds with right aligned legend", + code("dt-inv-ral"), () -> { + // @code-start:dt-inv-ral + DonutUtilization du = donutUtilization(); + DonutThreshold dt = donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 20%", 20)) + .invert() + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 290, 20, 20)) + .width(500) + .addUtilization(du + .title("0%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 0)) + .thresholds(60, 20) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "Warning threshold at 60%", "Danger threshold at 20%") + .legendOrientation(vertical)); + + setInterval(__ -> { + double previous = du.data().y; + double current = (((previous - 10) % 100) + 100) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "Warning threshold at 60%", "Danger threshold at 20%"); + }, 1000); + + return div().style("height: 230px; width: 500px;") + .add(dt) + .element(); + // @code-end:dt-inv-ral + })); + + addSnippet("donut-threshold", new Snippet("dt-ral", "Static thresholds with custom legend", + code("dt-ral"), () -> { + // @code-start:dt-ral + DonutUtilization du = donutUtilization(); + DonutThreshold dt = donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 20, 125, 20)) + .height(350) + .width(230) + .addUtilization(du + .title("0%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 0)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "Warning threshold at 60%", "Danger threshold at 90%") + .legendOrientation(vertical) + .legendPosition(bottom) + .themeColor(green)); + + setInterval(__ -> { + double previous = du.data().y; + double current = (previous + 10) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "Warning threshold at 60%", "Danger threshold at 90%"); + }, 1000); + + return div().style("height: 350px; width: 230px;") + .add(dt) + .element(); + // @code-end:dt-ral + })); + + addSnippet("donut-threshold", new Snippet("dt-bal", "Static thresholds with bottom aligned legend", + code("dt-bal"), () -> + // @code-start:dt-bal + div().style("height: 275px; width: 675px;") + .add(donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 20, 65, 20)) + .height(275) + .width(675) + .addUtilization(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 45)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "Warning threshold at 60%", + "Danger threshold at 90%") + .legendPosition(bottom))) + .element() + // @code-end:dt-bal + )); + + addSnippet("donut-threshold", new Snippet("dt-small-static", "Small with static thresholds", + code("dt-small-static"), () -> + // @code-start:dt-small-static + div().style("height: 185px; width: 185px;") + .add(donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .height(185) + .width(185) + .addUtilization(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 45)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null))) + .element() + // @code-end:dt-small-static + )); + + addSnippet("donut-threshold", new Snippet("dt-small-ral", "Small with static thresholds and right aligned legend", + code("dt-small-ral"), () -> { + // @code-start:dt-small-ral + DonutUtilization du = donutUtilization(); + DonutThreshold dt = donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 260, 20, 20)) + .height(185) + .width(425) + .addUtilization(du + .title("0%") + .subTitle("of 100 GBps") + .data(data("Storage capacity", 0)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 0%", "Warning threshold at 60%", "Danger threshold at 90%") + .legendOrientation(vertical)); + + setInterval(__ -> { + double previous = du.data().y; + double current = (previous + 10) % 100; + du.data(data("Storage capacity", current)); + du.title(current + "%"); + du.legendData("Storage capacity: " + current + "%", "Warning threshold at 60%", "Danger threshold at 90%"); + }, 1000); + + return div().style("height: 185px; width: 425px;") + .add(dt) + .element(); + // @code-end:dt-small-ral + })); + + addSnippet("donut-threshold", new Snippet("dt-small-subtitle", "Small with subtitle", + code("dt-small-subtitle"), () -> + // @code-start:dt-small-subtitle + div().style("height: 200px; width: 425px;") + .add(donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 260, 20, 20)) + .height(200) + .width(425) + .addUtilization(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .subTitlePosition(SubTitlePosition.bottom) + .data(data("Storage capacity", 45)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 45%", "Warning threshold at 60%", + "Danger threshold at 90%") + .legendOrientation(vertical))) + .element() + // @code-end:dt-small-subtitle + )); + + addSnippet("donut-threshold", new Snippet("dt-small-subtitle-right", "Small with thresholds and right aligned subtitle", + code("dt-small-subtitle-right"), () -> + // @code-start:dt-small-subtitle-right + div().style("height: 225px; width: 675px;") + .add(donutThreshold() + .ariaTitle("Donut utilization chart with static threshold example") + .ariaDesc("Storage capacity") + .data(data("Warning at 60%", 60), data("Danger at 90%", 90)) + .labels(data -> data.x != null ? data.x : null) + .padding(padding(20, 20, 60, 20)) + .height(225) + .width(675) + .addUtilization(donutUtilization() + .title("45%") + .subTitle("of 100 GBps") + .subTitlePosition(SubTitlePosition.right) + .data(data("Storage capacity", 45)) + .thresholds(60, 90) + .labels(data -> data.x != null ? data.x + ": " + data.y + "%" : null) + .legendData("Storage capacity: 45%", "Warning threshold at 60%", + "Danger threshold at 90%") + .legendPosition(bottom))) + .element() + // @code-end:dt-small-subtitle-right + )); + + startApiDocs(DonutUtilization.class); + addApiDoc(DonutUtilization.class, chart); + addApiDoc(DonutThreshold.class, chart); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/chart/PieChart.java b/showcase/src/main/java/org/patternfly/showcase/chart/PieChart.java new file mode 100644 index 000000000..a684e4bc2 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/chart/PieChart.java @@ -0,0 +1,117 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.chart; + +import org.jboss.elemento.router.Route; +import org.patternfly.chart.pie.Pie; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.jboss.elemento.Elements.div; +import static org.patternfly.chart.ChartThemeColor.multiOrdered; +import static org.patternfly.chart.ChartThemeColor.orange; +import static org.patternfly.chart.Data.data; +import static org.patternfly.chart.LegendOrientation.vertical; +import static org.patternfly.chart.LegendPosition.bottom; +import static org.patternfly.chart.LegendPosition.right; +import static org.patternfly.chart.Padding.padding; +import static org.patternfly.chart.pie.Pie.pie; +import static org.patternfly.showcase.ApiDoc.Type.chart; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.charts; +import static org.patternfly.token.Token.chartThemeColorscalesBlueColorscale100; +import static org.patternfly.token.Token.chartThemeColorscalesOrangeColorscale300; +import static org.patternfly.token.Token.chartThemeColorscalesYellowColorscale100; + +@Route(value = "/charts/pie", title = "Pie") +public class PieChart extends SnippetPage { + + public PieChart() { + super(charts.get("pie")); + + startExamples(); + addSnippet(new Snippet("pie-basic", "Basic with right aligned legend", + code("pie-basic"), () -> + // @code-start:pie-basic + div().style("height: 230px; width: 350px;") + .add(pie() + .title("100") + .subTitle("Pets") + .ariaTitle("Donut chart example") + .ariaDesc("Average number of pets") + .data(data("Cats", 35), data("Dogs", 55), + data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendPosition(right) + .legendOrientation(vertical) + .padding(padding(20, 140, 20, 20)) + .width(350) + .height(230)) + .element() + // @code-end:pie-basic + )); + + addSnippet(new Snippet("pie-mc", "Multi-color (ordered) with bottom aligned legend", + code("pie-mc"), () -> + // @code-start:pie-mc + div().style("height: 275px; width: 300px;") + .add(pie() + .ariaTitle("Pie chart example") + .ariaDesc("Pie chart with multi-color theme and bottom legend") + .data(data("Cats", 35), data("Dogs", 55), + data("Birds", 10)) + .labels(data -> data.x + ": " + data.y + "%") + .legendData("Cats: 35", "Dogs: 55", "Birds: 10") + .legendPosition(bottom) + .padding(padding(20, 20, 80, 20)) + .themeColor(multiOrdered) + .width(300) + .height(275)) + .element() + // @code-end:pie-mc + )); + + addSnippet(new Snippet("pie-custom-cs", "Custom color scale with right aligned legend", + code("pie-custom-cs"), () -> + // @code-start:pie-custom-cs + div().style("height: 230px; width: 450px;") + .add(pie() + .ariaTitle("Pie chart example") + .ariaDesc("Average number of pets") + .data(data("Sky", 38), data("Shady side of pyramid", 7), + data("Sunny side of pyramid", 17), data("Sky", 38)) + .labels(data -> data.x) + .legendData("Sky", "Shady side of pyramid", "Sunny side of pyramid") + .legendOrientation(vertical) + .legendPosition(right) + .padding(padding(20, 240, 20, 20)) + .themeColor(orange) + .width(450) + .height(230) + .colorScale( + chartThemeColorscalesBlueColorscale100.var, + chartThemeColorscalesOrangeColorscale300.var, + chartThemeColorscalesYellowColorscale100.var, + chartThemeColorscalesBlueColorscale100.var)) + .element() + // @code-end:pie-custom-cs + )); + + startApiDocs(Pie.class); + addApiDoc(Pie.class, chart); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/AccordionComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/AccordionComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/AccordionComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/AccordionComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ActionListComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ActionListComponent.java similarity index 68% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ActionListComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ActionListComponent.java index 974067009..a2a4a71df 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/ActionListComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ActionListComponent.java @@ -69,7 +69,7 @@ public ActionListComponent() { .addItem(linkMenuItem("item-5", "Separated link", "#item-5"))))); return div() .add(actionList() - .addGroup(actionListGroup() + .addItem(actionListGroup() .addItem(actionListItem() .add(button("Next").primary())) .addItem(actionListItem() @@ -77,7 +77,7 @@ public ActionListComponent() { .add(br()) .add("With kebab") .add(actionList() - .addGroup(actionListGroup() + .addItem(actionListGroup() .addItem(actionListItem() .add(button("Next").primary())) .addItem(actionListItem() @@ -93,10 +93,24 @@ public ActionListComponent() { // @code-start:action-list-icons div() .add(actionList().icons() - .addItem(actionListItem() - .add(button().icon(times()).plain())) - .addItem(actionListItem() - .add(button().icon(check()).plain()))) + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button().icon(times()).plain())) + .addItem(actionListItem() + .add(button().icon(check()).plain())))) + .add(br()) + .add("With group icons wrapper") + .add(actionList() + .addItem(actionListGroup().icons() + .addItem(actionListItem() + .add(button().icon(times()).plain())) + .addItem(actionListItem() + .add(button().icon(check()).plain()))) + .addItem(actionListGroup().icons() + .addItem(actionListItem() + .add(button().icon(times()).plain())) + .addItem(actionListItem() + .add(button().icon(check()).plain())))) .element() // @code-end:action-list-icons )); @@ -104,26 +118,45 @@ public ActionListComponent() { addSnippet(new Snippet("action-list-multiple-groups", "Action list multiple groups", code("action-list-multiple-groups"), () -> // @code-start:action-list-multiple-groups + div() + .add(actionList() + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Next").primary())) + .addItem(actionListItem() + .add(button("Back").secondary()))) + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Submit").primary())) + .addItem(actionListItem() + .add(button("Cancel").link())))) + .element() + // @code-end:action-list-multiple-groups + )); + + addSnippet(new Snippet("action-list-cancel-button", "Action list with cancel button", + code("action-list-cancel-button"), () -> + // @code-start:action-list-cancel-button div() .add("In modals, forms, data lists") .add(actionList() - .addItem(actionListItem() - .add(button("Save").primary())) - .addItem(actionListItem() - .add(button("Cancel").link()))) + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Save").primary())) + .addItem(actionListItem() + .add(button("Cancel").link())))) .add(br()) .add("In wizards") .add(actionList() - .addGroup(actionListGroup() + .addItem(actionListGroup() .addItem(actionListItem() .add(button("Next").primary())) .addItem(actionListItem() - .add(button("Back").secondary()))) - .addGroup(actionListGroup() + .add(button("Back").secondary())) .addItem(actionListItem() .add(button("Cancel").link())))) .element() - // @code-end:action-list-multiple-groups + // @code-end:action-list-cancel-button )); startApiDocs(ActionList.class); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/AlertComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/AlertComponent.java similarity index 84% rename from showcase/common/src/main/java/org/patternfly/showcase/component/AlertComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/AlertComponent.java index a21528f50..d084b1714 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/AlertComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/AlertComponent.java @@ -52,6 +52,7 @@ import static org.patternfly.component.alert.AlertGroupType.toast; import static org.patternfly.component.button.Button.button; import static org.patternfly.component.list.ActionList.actionList; +import static org.patternfly.component.list.ActionListGroup.actionListGroup; import static org.patternfly.component.list.ActionListItem.actionListItem; import static org.patternfly.core.Aria.atomic; import static org.patternfly.core.Aria.live; @@ -144,19 +145,21 @@ public AlertComponent() { .element(); return div() .add(actionList() - .addItem(actionListItem() - .add(button("Add alert").secondary() - .onClick((event, button) -> alerts.appendChild(li() - .add(alert(custom, "Default timeout Alert") - .timeout() - .addDescription("This alert will dismiss after 8 seconds") - .addActionGroup(alertActionGroup() - .addAction("View details") - .addAction("Ignore"))) - .element())))) - .addItem(actionListItem() - .add(button("Remove all alerts").secondary() - .onClick((event, button) -> removeChildrenFrom(alerts))))) + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Add alert").secondary() + .onClick((event, button) -> alerts.appendChild(li() + .add(alert(custom, "Default timeout Alert") + .timeout() + .addDescription( + "This alert will dismiss after 8 seconds") + .addActionGroup(alertActionGroup() + .addAction("View details") + .addAction("Ignore"))) + .element())))) + .addItem(actionListItem() + .add(button("Remove all alerts").secondary() + .onClick((event, button) -> removeChildrenFrom(alerts)))))) .add(alerts) .element(); // @code-end:alert-timeout @@ -170,10 +173,7 @@ public AlertComponent() { .expandable() .closable((e, a) -> DomGlobal.alert("Clicked the close button")) .addDescription( - "Success alert description. This should tell the user more information about the alert.") - .addActionGroup(alertActionGroup() - .addAction("View details", (e, a) -> DomGlobal.alert("Clicked on View details")) - .addAction("Ignore", (e, a) -> DomGlobal.alert("Clicked on Ignore")))) + "Success alert description. This should tell the user more information about the alert.")) .add(br()) .add(alert(success, "Success alert title").inline() .expandable() @@ -349,18 +349,19 @@ public AlertComponent() { // @code-start:alert-group-toast div() .add(actionList() - .addItem(actionListItem() - .add(button("Add toast success alert").secondary() - .onClick((e, b) -> alertGroup(toast) - .addItem(alert(success, "Toast success alert"))))) - .addItem(actionListItem() - .add(button("Add toast danger alert").secondary() - .onClick((e, b) -> alertGroup(toast) - .addItem(alert(danger, "Toast danger alert"))))) - .addItem(actionListItem() - .add(button("Add toast info alert").secondary() - .onClick((e, b) -> alertGroup(toast) - .addItem(alert(info, "Toast info alert")))))) + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Add toast success alert").secondary() + .onClick((e, b) -> alertGroup(toast) + .addItem(alert(success, "Toast success alert"))))) + .addItem(actionListItem() + .add(button("Add toast danger alert").secondary() + .onClick((e, b) -> alertGroup(toast) + .addItem(alert(danger, "Toast danger alert"))))) + .addItem(actionListItem() + .add(button("Add toast info alert").secondary() + .onClick((e, b) -> alertGroup(toast) + .addItem(alert(info, "Toast info alert"))))))) .element() // @code-end:alert-group-toast )); @@ -373,20 +374,22 @@ public AlertComponent() { final double[] intervalHandle = {0}; return div() .add(actionList() - .addItem(actionListItem() - .add(button("Start async alerts").secondary() - .onClick((e, b) -> intervalHandle[0] = setInterval(__ -> { - counter[0] = counter[0] + 1; - alertGroup(toast) - .addItem(alert(danger, "Async notification " + counter[0] - + " was added to the queue.")); - }, 1_000)))) - .addItem(actionListItem() - .add(button("Stop async alerts").secondary() - .onClick((e, b) -> { - counter[0] = 0; - clearInterval(intervalHandle[0]); - })))) + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Start async alerts").secondary() + .onClick((e, b) -> intervalHandle[0] = setInterval(__ -> { + counter[0] = counter[0] + 1; + alertGroup(toast) + .addItem( + alert(danger, "Async notification " + counter[0] + + " was added to the queue.")); + }, 1_000)))) + .addItem(actionListItem() + .add(button("Stop async alerts").secondary() + .onClick((e, b) -> { + counter[0] = 0; + clearInterval(intervalHandle[0]); + }))))) .element(); // @code-end:alert-group-asynchronous })); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/AvatarComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/AvatarComponent.java similarity index 66% rename from showcase/common/src/main/java/org/patternfly/showcase/component/AvatarComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/AvatarComponent.java index c949caa92..eaad12bed 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/AvatarComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/AvatarComponent.java @@ -24,12 +24,9 @@ import static org.jboss.elemento.Elements.div; import static org.patternfly.component.avatar.Avatar.avatar; import static org.patternfly.showcase.ApiDoc.Type.component; -import static org.patternfly.showcase.Assets.avatarDark; -import static org.patternfly.showcase.Assets.avatarLight; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; -import static org.patternfly.style.Brightness.dark; -import static org.patternfly.style.Brightness.light; +import static org.patternfly.showcase.Resources.avatarData; import static org.patternfly.style.Size.lg; import static org.patternfly.style.Size.md; import static org.patternfly.style.Size.sm; @@ -46,7 +43,7 @@ public AvatarComponent() { code("avatar-basic"), () -> // @code-start:avatar-basic div() - .add(avatar(avatarLight, "avatar")) + .add(avatar(avatarData(), "avatar")) .element() // @code-end:avatar-basic )); @@ -56,38 +53,29 @@ public AvatarComponent() { // @code-start:avatar-size div() .add("Small").add(br()) - .add(avatar(avatarLight, "avatar").size(sm)) + .add(avatar(avatarData(), "avatar").size(sm)) .add(br()).add(br()) .add("Medium").add(br()) - .add(avatar(avatarLight, "avatar").size(md)) + .add(avatar(avatarData(), "avatar").size(md)) .add(br()).add(br()) .add("Large").add(br()) - .add(avatar(avatarLight, "avatar").size(lg)) + .add(avatar(avatarData(), "avatar").size(lg)) .add(br()).add(br()) .add("Extra large").add(br()) - .add(avatar(avatarLight, "avatar").size(xl)) + .add(avatar(avatarData(), "avatar").size(xl)) .element() // @code-end:avatar-size )); - addSnippet(new Snippet("avatar-bordered-light", "Bordered - light", - code("avatar-bordered-light"), () -> - // @code-start:avatar-bordered-light + addSnippet(new Snippet("avatar-bordered", "Bordered", + code("avatar-bordered"), () -> + // @code-start:avatar-bordered div() - .add(avatar(avatarLight, "avatar").border(light)) + .add(avatar(avatarData(), "avatar").bordered()) .element() - // @code-end:avatar-bordered-light + // @code-end:avatar-bordered )); - addSnippet(new Snippet("avatar-bordered-dark", "Bordered - dark", - code("avatar-bordered-dark"), () -> - // @code-start:avatar-bordered-dark - div() - .add(avatar(avatarDark, "avatar").border(dark)) - .element() - // @code-end:avatar-bordered-dark - ).style("background: var(--pf-v5-global--BackgroundColor--dark-100)")); - startApiDocs(Avatar.class); addApiDoc(Avatar.class, component); } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/BackToTopComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/BackToTopComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/BackToTopComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/BackToTopComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/BadgeComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/BadgeComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/BadgeComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/BadgeComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/BannerComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/BannerComponent.java similarity index 95% rename from showcase/common/src/main/java/org/patternfly/showcase/component/BannerComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/BannerComponent.java index a9160c1cb..2e8f61209 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/BannerComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/BannerComponent.java @@ -68,19 +68,19 @@ public BannerComponent() { .add(br()) .add(banner("Red banner", red)) .add(br()) - .add(banner("Red banner", orangered)) + .add(banner("Orangered banner", orangered)) .add(br()) - .add(banner("Red banner", orange)) + .add(banner("Orange banner", orange)) .add(br()) - .add(banner("Red banner", yellow)) + .add(banner("Yellow banner", yellow)) .add(br()) - .add(banner("Blue banner", green)) + .add(banner("Green banner", green)) .add(br()) - .add(banner("Blue banner", teal)) + .add(banner("Teal banner", teal)) .add(br()) .add(banner("Blue banner", blue)) .add(br()) - .add(banner("Gold banner", purple)) + .add(banner("Purple banner", purple)) .element() // @code-end:banner-basic )); @@ -149,7 +149,7 @@ public BannerComponent() { .add(banner().status(custom.status).screenReader("Custom banner") .add(flex().spaceItems(breakpoints(default_, sm)) .addItem(flexItem().add(custom.icon.get())) - .addItem(flexItem().text("Info banner")))) + .addItem(flexItem().text("Custom banner")))) .element() // @code-end:banner-status )); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/BrandComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/BrandComponent.java similarity index 71% rename from showcase/common/src/main/java/org/patternfly/showcase/component/BrandComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/BrandComponent.java index 5b9fcf163..edb215565 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/BrandComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/BrandComponent.java @@ -42,7 +42,7 @@ public BrandComponent() { code("brand-basic"), () -> // @code-start:brand-basic div() - .add(brand("https://www.patternfly.org/assets/images/pf_logo.svg", "PatternFly logo")) + .add(brand("https://raw.githubusercontent.com/patternfly/patternfly/refs/heads/main/static/assets/images/PF-HorizontalLogo-Color.svg", "PatternFly logo")) .element() // @code-end:brand-basic )); @@ -53,16 +53,16 @@ public BrandComponent() { div() .add(brand() .widths(breakpoints(default_, "40px", sm, "60px", md, "220px")) - .addSource("https://www.patternfly.org/assets/images/pf-c-brand__logo-on-xl.svg", + .addSource("https://raw.githubusercontent.com/patternfly/patternfly/refs/heads/main/static/assets/images/PF-HorizontalLogo-Color.svg", "(min-width: 1200px)") - .addSource("https://www.patternfly.org/assets/images/pf-c-brand__logo-on-lg.svg", + .addSource("https://raw.githubusercontent.com/patternfly/patternfly/refs/heads/main/static/assets/images/PF-HorizontalLogo-Color.svg", "(min-width: 992px)") - .addSource("https://www.patternfly.org/assets/images/pf-c-brand__logo-on-md.svg", + .addSource("https://raw.githubusercontent.com/patternfly/patternfly/refs/heads/main/static/assets/images/PF-HorizontalLogo-Color.svg", "(min-width: 768px)") - .addSource("https://www.patternfly.org/assets/images/pf-c-brand__logo-on-sm.svg", + .addSource("https://raw.githubusercontent.com/patternfly/patternfly/refs/heads/main/static/assets/images/PF-IconLogo-color.svg", "(min-width: 576px)") - .addSource("https://www.patternfly.org/assets/images/pf-c-brand__logo.svg") - .addImg(img("https://www.patternfly.org/assets/images/pf-c-brand__logo-base.jpg") + .addSource("https://www.patternfly.org/assets/images/pf-c-brand__logo.svg", "(min-width: 320px)") + .addImg(img("https://raw.githubusercontent.com/patternfly/patternfly/refs/heads/main/static/assets/images/PF-HorizontalLogo-Color.svg") .apply(i -> i.alt = "PatternFly fallback logo"))) .element() // @code-end:brand-responsive diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/BreadcrumbComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/BreadcrumbComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/BreadcrumbComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/BreadcrumbComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ButtonComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ButtonComponent.java similarity index 66% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ButtonComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ButtonComponent.java index f5d6936a8..1827d65db 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/ButtonComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ButtonComponent.java @@ -20,22 +20,28 @@ import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; +import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.p; import static org.patternfly.component.IconPosition.end; import static org.patternfly.component.IconPosition.start; import static org.patternfly.component.badge.Badge.badge; import static org.patternfly.component.button.Button.button; import static org.patternfly.icon.IconSets.fas.arrowRight; +import static org.patternfly.icon.IconSets.fas.bell; import static org.patternfly.icon.IconSets.fas.copy; import static org.patternfly.icon.IconSets.fas.externalLinkSquareAlt; import static org.patternfly.icon.IconSets.fas.plusCircle; import static org.patternfly.icon.IconSets.fas.times; import static org.patternfly.icon.IconSets.fas.upload; +import static org.patternfly.layout.flex.Flex.flex; +import static org.patternfly.layout.flex.Gap.sm; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; import static org.patternfly.style.Classes.util; +import static org.patternfly.style.NotificationStatus.attention; +import static org.patternfly.style.NotificationStatus.read; +import static org.patternfly.style.NotificationStatus.unread; @Route(value = "/components/button", title = "Button") public class ButtonComponent extends SnippetPage { @@ -49,34 +55,27 @@ public ButtonComponent() { code("button-variant-examples"), () -> // @code-start:button-variant-examples div() - .add(div() + .add(flex().columnGap(sm) .add(button("Primary").primary()) - .add(" ") .add(button().primary().iconAndText(externalLinkSquareAlt(), "Primary with icon", start)) - .add(" ") .add(button("Secondary").secondary()) - .add(" ") .add(button("Danger secondary").secondary().danger()) - .add(" ") .add(button("Tertiary").tertiary()) - .add(" ") .add(button("Danger").danger()) - .add(" ") .add(button("Warning").warning())) - .add(div().css(util("mt-lg")) + .add(flex().columnGap(sm).css(util("mt-lg")) .add(button().iconAndText(plusCircle(), "Link").link()) - .add(" ") .add(button().iconAndText(externalLinkSquareAlt(), "Link", end).link()) - .add(" ") .add(button("Inline link").inline().link()) - .add(" ") - .add(button("Danger link").link().danger())) - .add(div().css(util("mt-lg")) + .add(button("Danger link").link().danger()) .add(button().icon(times()).plain())) - .add(div().css(util("mt-lg")) + .add(flex().columnGap(sm).css(util("mt-lg")) .add(button("Control").control()) - .add(" ") .add(button().icon(copy()).control())) + .add(flex().columnGap(sm).css(util("mt-lg")) + .add(button().stateful(read).iconAndText(bell(), "Stateful read", start)) + .add(button().stateful(unread).iconAndText(bell(), "Stateful unread", start)) + .add(button().stateful(attention).iconAndText(bell(), "Stateful attention", start))) .element() // @code-end:button-variant-examples )); @@ -85,29 +84,20 @@ public ButtonComponent() { code("button-disabled"), () -> // @code-start:button-disabled div() - .add(div() + .add(flex().columnGap(sm) .add(button("Primary disabled").primary().disabled()) - .add(" ") .add(button("Secondary disabled").secondary().disabled()) - .add(" ") .add(button("Danger secondary disabled").secondary().danger().disabled()) - .add(" ") .add(button("Tertiary disabled").tertiary().disabled()) - .add(" ") .add(button("Danger disabled").danger().disabled()) - .add(" ") .add(button("Warning disabled").warning().disabled())) - .add(div().css(util("mt-lg")) + .add(flex().columnGap(sm).css(util("mt-lg")) .add(button().iconAndText(plusCircle(), "Link disabled").link().disabled()) - .add(" ") .add(button("Inline link disabled").inline().link().disabled()) - .add(" ") - .add(button("Danger link disabled").link().danger().disabled())) - .add(div().css(util("mt-lg")) + .add(button("Danger link disabled").link().danger().disabled()) .add(button().icon(times()).plain().disabled())) - .add(div().css(util("mt-lg")) + .add(flex().columnGap(sm).css(util("mt-lg")) .add(button("Control disabled").control().disabled()) - .add(" ") .add(button().icon(copy()).control().disabled())) .element() // @code-end:button-disabled @@ -116,17 +106,12 @@ public ButtonComponent() { addSnippet(new Snippet("button-small", "Small buttons", code("button-small"), // @code-start:button-small - () -> div() + () -> flex().columnGap(sm) .add(button("Primary").primary().small()) - .add(" ") .add(button("Secondary").secondary().small()) - .add(" ") .add(button("Danger secondary").secondary().danger().small()) - .add(" ") .add(button("Tertiary").tertiary().small()) - .add(" ") .add(button("Danger").danger().small()) - .add(" ") .add(button("Warning").warning().small()) .element() // @code-end:button-small @@ -135,13 +120,10 @@ public ButtonComponent() { addSnippet(new Snippet("button-cta", "Call to action (CTA) buttons", code("button-cta"), () -> // @code-start:button-cta - div() + flex().columnGap(sm) .add(button("Call to action").primary().callToAction()) - .add(" ") .add(button("Call to action").secondary().callToAction()) - .add(" ") .add(button("Call to action").tertiary().callToAction()) - .add(" ") .add(button().iconAndText(arrowRight(), "Call to action", end).link().callToAction()) .element() // @code-end:button-cta @@ -160,7 +142,7 @@ public ButtonComponent() { code("button-progress"), () -> // @code-start:button-progress div() - .add(div() + .add(flex().columnGap(sm) .add(button("Click to stop loading").primary().progress(true) .onClick((event, button) -> { button.toggleProgress(); @@ -170,7 +152,6 @@ public ButtonComponent() { button.text("Click to start loading"); } })) - .add(" ") .add(button("Click to stop loading").secondary().progress(true) .onClick((event, button) -> { button.toggleProgress(); @@ -180,10 +161,10 @@ public ButtonComponent() { button.text("Click to start loading"); } }))) - .add(div().css(util("mt-lg")) + .add(flex().columnGap(sm).css(util("mt-lg")) .add(button().icon(upload()).plain() .onClick((event, button) -> button.toggleProgress()))) - .add(div().css(util("mt-lg")) + .add(flex().columnGap(sm).css(util("mt-lg")) .add(button("Pause loading logs").link().inline().progress(true) .onClick((event, button) -> { button.toggleProgress(); @@ -200,14 +181,11 @@ public ButtonComponent() { addSnippet(new Snippet("button-block-links", "Links as buttons", code("button-block-links"), () -> // @code-start:button-block-links - div() + flex().columnGap(sm) .add(button("Link to docs", "https://www.patternfly.org/", "_blank").primary()) - .add(" ") .add(button("Secondary link to docs", "https://www.patternfly.org/", "_blank").secondary()) - .add(" ") .add(button("Tertiary link to docs", "https://www.patternfly.org/", "_blank").tertiary() .disabled()) - .add(" ") .add(button("Jump to lifecycle in developer contributions", "https://www.patternfly.org/get-started/contribute/developer-contributions#lifecycle").link()) .element() @@ -218,50 +196,34 @@ public ButtonComponent() { code("button-count"), () -> // @code-start:button-count div() - .add(div() - .add(p().text("Unread")) - .add(button("View issues").primary().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").secondary().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").tertiary().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").control().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").link().addBadge(badge(7).unread()))) - .add(div().css(util("mt-sm")) - .add(p().text("Unread disabled")) - .add(button("View issues").primary().disabled().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").secondary().disabled().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").tertiary().disabled().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").control().disabled().addBadge(badge(7).unread())) - .add(" ") - .add(button("View issues").link().disabled().addBadge(badge(7).unread()))) - .add(div().css(util("mt-sm")) - .add(p().text("Read")) - .add(button("View issues").primary().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").secondary().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").tertiary().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").control().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").link().addBadge(badge(10).read()))) - .add(div().css(util("mt-sm")) - .add(p().text("Read disabled")) - .add(button("View issues").primary().disabled().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").secondary().disabled().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").tertiary().disabled().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").control().disabled().addBadge(badge(10).read())) - .add(" ") - .add(button("View issues").link().disabled().addBadge(badge(10).read()))) + .add("Unread").add(br()) + .add(flex().columnGap(sm).css(util("mb-sm")) + .add(button("Issues").primary().addBadge(badge(7).unread())) + .add(button("Issues").secondary().addBadge(badge(7).unread())) + .add(button("Issues").tertiary().addBadge(badge(7).unread())) + .add(button("Issues").control().addBadge(badge(7).unread())) + .add(button("Issues").link().addBadge(badge(7).unread()))) + .add("Unread disabled").add(br()) + .add(flex().columnGap(sm).css(util("mb-sm")) + .add(button("Issues").primary().disabled().addBadge(badge(7).unread())) + .add(button("Issues").secondary().disabled().addBadge(badge(7).unread())) + .add(button("Issues").tertiary().disabled().addBadge(badge(7).unread())) + .add(button("Issues").control().disabled().addBadge(badge(7).unread())) + .add(button("Issues").link().disabled().addBadge(badge(7).unread()))) + .add("Read").add(br()) + .add(flex().columnGap(sm).css(util("mb-sm")) + .add(button("Issues").primary().addBadge(badge(10).read())) + .add(button("Issues").secondary().addBadge(badge(10).read())) + .add(button("Issues").tertiary().addBadge(badge(10).read())) + .add(button("Issues").control().addBadge(badge(10).read())) + .add(button("Issues").link().addBadge(badge(10).read()))) + .add("Read disabled").add(br()) + .add(flex().columnGap(sm) + .add(button("Issues").primary().disabled().addBadge(badge(10).read())) + .add(button("Issues").secondary().disabled().addBadge(badge(10).read())) + .add(button("Issues").tertiary().disabled().addBadge(badge(10).read())) + .add(button("Issues").control().disabled().addBadge(badge(10).read())) + .add(button("Issues").link().disabled().addBadge(badge(10).read()))) .element() // @code-end:button-count )); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/CardComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/CardComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/CardComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/CardComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/CheckboxComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/CheckboxComponent.java similarity index 59% rename from showcase/common/src/main/java/org/patternfly/showcase/component/CheckboxComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/CheckboxComponent.java index 5829e5838..eba29c8f8 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/CheckboxComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/CheckboxComponent.java @@ -19,18 +19,23 @@ import org.patternfly.component.form.Checkbox; import org.patternfly.component.form.CheckboxBody; import org.patternfly.component.form.CheckboxDescription; +import org.patternfly.showcase.Code; import org.patternfly.showcase.LoremIpsum; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; +import static org.jboss.elemento.Elements.br; +import static org.jboss.elemento.Elements.code; import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.p; import static org.patternfly.component.form.Checkbox.checkbox; +import static org.patternfly.component.form.Checkbox.checkboxWrapped; import static org.patternfly.component.form.CheckboxBody.checkboxBody; import static org.patternfly.component.form.CheckboxDescription.checkboxDescription; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.ApiDoc.Type.subcomponent; -import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; +import static org.patternfly.style.Classes.util; @Route(value = "/components/forms/checkbox", title = "Checkbox") public class CheckboxComponent extends SnippetPage { @@ -40,31 +45,58 @@ public CheckboxComponent() { startExamples(); addSnippet(new Snippet("checkbox-basic", "Basic", - code("checkbox-basic"), () -> + Code.code("checkbox-basic"), () -> // @code-start:checkbox-basic div() - .add(checkbox("basic-checkbox-0", "basic-checkbox", "Checkbox 1") + .add(checkbox("checkbox-basic-0", "checkbox-basic", "Checkbox 1") .value(true)) - .add(checkbox("basic-checkbox-1", "basic-checkbox", "Checkbox 2")) + .add(checkbox("checkbox-basic-1", "checkbox-basic", "Checkbox 2")) .element() // @code-end:checkbox-basic )); + addSnippet(new Snippet("checkbox-required", "Required", + Code.code("checkbox-required"), () -> + // @code-start:checkbox-required + div() + .add(checkbox("checkbox-required-0", "checkbox-required", "Required checkbox 1") + .required() + .value(true)) + .add(checkbox("checkbox-required-1", "checkbox-required", "Required checkbox 2") + .required()) + .element() + // @code-end:checkbox-required + )); + addSnippet(new Snippet("checkbox-disabled", "Disabled", - code("checkbox-disabled"), () -> + Code.code("checkbox-disabled"), () -> // @code-start:checkbox-disabled div() - .add(checkbox("disabled-checkbox-0", "disabled-checkbox", "Disabled checkbox 1") - .value(true) - .disabled()) - .add(checkbox("disabled-checkbox-1", "disabled-checkbox", "Disabled checkbox 2") + .add(checkbox("checkbox-disabled-0", "checkbox-disabled", "Disabled checkbox 1") + .disabled() + .value(true)) + .add(checkbox("checkbox-disabled-1", "checkbox-disabled", "Disabled checkbox 2") .disabled()) .element() // @code-end:checkbox-disabled )); + addSnippet(new Snippet("checkbox-standalone", "Standalone input", + Code.code("checkbox-standalone"), () -> + // @code-start:checkbox-standalone + div() + .add(checkbox("checkbox-standalone-0", "checkbox-standalone") + .standalone()) + .add(br()) + .add(checkbox("checkbox-standalone-1", "checkbox-standalone") + .standalone() + .value(true)) + .element() + // @code-end:checkbox-standalone + )); + addSnippet(new Snippet("checkbox-description", "Checkbox with description", - code("checkbox-description"), () -> + Code.code("checkbox-description"), () -> // @code-start:checkbox-description div() .add(checkbox("cwd-0", "cwd", "Checkbox with description") @@ -74,7 +106,7 @@ public CheckboxComponent() { )); addSnippet(new Snippet("checkbox-body", "Checkbox with body", - code("checkbox-body"), () -> + Code.code("checkbox-body"), () -> // @code-start:checkbox-body div() .add(checkbox("cwb-0", "cwb", "Checkbox with body") @@ -84,7 +116,7 @@ public CheckboxComponent() { )); addSnippet(new Snippet("checkbox-description-body", "Checkbox with description and body", - code("checkbox-description-body"), () -> + Code.code("checkbox-description-body"), () -> // @code-start:checkbox-description-body div() .add(checkbox("cdb-0", "cdb", "Checkbox with description and body") @@ -94,24 +126,19 @@ public CheckboxComponent() { // @code-end:checkbox-description-body )); - addSnippet(new Snippet("checkbox-standalone", "Standalone input", - code("checkbox-standalone"), () -> - // @code-start:checkbox-standalone - div() - .add(checkbox("standalone-checkbox-0", "standalone-checkbox") - .standalone()) - .element() - // @code-end:checkbox-standalone - )); - - addSnippet(new Snippet("checkbox-required", "Required input", - code("checkbox-required"), () -> - // @code-start:checkbox-required + addSnippet(new Snippet("checkbox-wrapped", "Wrapped checkbox", + Code.code("checkbox-wrapped"), () -> + // @code-start:checkbox-wrapped div() - .add(checkbox("required-checkbox-0", "required-checkbox", "Required checkbox") - .required()) + .add(p().css(util("mb-sm")).add( + "You can expand the clickable area of a checkbox so that it spans wider than the checkbox label by using ") + .add(code().css("ws-code").text("checkboxWrapped()")) + .add(". This allows users to select a checkbox by clicking the checkbox itself, the label, the body, the description, and the area between these elements.")) + .add(checkboxWrapped("checkbox-wrapped-0", "checkbox-wrapped", "Wrapped checkbox") + .addDescription(checkboxDescription(LoremIpsum.words(50))) + .addBody(checkboxBody("This is where custom content goes."))) .element() - // @code-end:checkbox-required + // @code-end:checkbox-wrapped )); startApiDocs(Checkbox.class); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/CodeBlockComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/CodeBlockComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/CodeBlockComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/CodeBlockComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/CodeEditorComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/CodeEditorComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/CodeEditorComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/CodeEditorComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/Component.java b/showcase/src/main/java/org/patternfly/showcase/component/Component.java similarity index 90% rename from showcase/common/src/main/java/org/patternfly/showcase/component/Component.java rename to showcase/src/main/java/org/patternfly/showcase/component/Component.java index 08a37c12a..5c2270313 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/Component.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/Component.java @@ -56,6 +56,6 @@ public final String designGuidelines() { @JsOverlay public final String illustration() { - return "https://raw.githubusercontent.com/patternfly/patternfly-org/main/packages/documentation-site/patternfly-docs/images/component-illustrations/" + illustration; + return "https://raw.githubusercontent.com/patternfly-java/patternfly-java/refs/heads/main/showcase/src/web/images/" + illustration; } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ComponentsPage.java b/showcase/src/main/java/org/patternfly/showcase/component/ComponentsPage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ComponentsPage.java rename to showcase/src/main/java/org/patternfly/showcase/component/ComponentsPage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TextContentComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ContentComponent.java similarity index 61% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TextContentComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ContentComponent.java index 10b28132f..ba44b9e93 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TextContentComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ContentComponent.java @@ -23,6 +23,7 @@ import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.blockquote; +import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.dd; import static org.jboss.elemento.Elements.div; import static org.jboss.elemento.Elements.dl; @@ -34,37 +35,56 @@ import static org.jboss.elemento.Elements.small; import static org.jboss.elemento.Elements.ul; import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.h1; +import static org.patternfly.component.content.ContentType.h2; +import static org.patternfly.component.content.ContentType.h3; +import static org.patternfly.component.content.ContentType.h4; +import static org.patternfly.component.content.ContentType.h5; +import static org.patternfly.component.content.ContentType.h6; +import static org.patternfly.component.content.ContentType.p; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; import static org.patternfly.style.Classes.modifier; import static org.patternfly.style.Classes.plain; -@Route(value = "/components/text", title = "Text") -public class TextContentComponent extends SnippetPage { +@Route(value = "/components/content", title = "Content") +public class ContentComponent extends SnippetPage { - public TextContentComponent() { - super(components.get("text")); + public ContentComponent() { + super(components.get("content")); startExamples(); - addSnippet(new Snippet("text-content-headings", "Heading", - code("text-content-headings"), () -> - // @code-start:text-content-headings + addSnippet(new Snippet("content-wrapper", "Content as wrapper", + code("content-wrapper"), () -> + // @code-start:content-wrapper div() .add(content() - .add(h(1, "Hello World")) - .add(h(2, "Second Level")) - .add(h(3, "Third Level")) - .add(h(4, "Forth Level")) - .add(h(5, "Fifth Level")) - .add(h(6, "Sixth Level"))) + .add(content(p).text( + "Content with a component of type 'p' still renders the same when wrapped with a Content.")) + .add(p().text("If located within a wrapping Content, html elements are styled as well!"))) .element() - // @code-end:text-content-headings + // @code-end:content-wrapper )); - addSnippet(new Snippet("text-content-body", "Body", - code("text-content-body"), () -> - // @code-start:text-content-body + addSnippet(new Snippet("content-headings", "Headings", + code("content-headings"), () -> + // @code-start:content-headings + div() + .add(content() + .add(content(h1).text("Hello World")) + .add(content(h2).text("Second Level")) + .add(content(h3).text("Third Level")) + .add(content(h4).text("Forth Level")) + .add(content(h5).text("Fifth Level")) + .add(content(h6).text("Sixth Level"))) + .element() + // @code-end:content-headings + )); + + addSnippet(new Snippet("content-body", "Body", + code("content-body"), () -> + // @code-start:content-body div() .add(content() .add(p().text(LoremIpsum.paragraphs(5))) @@ -75,12 +95,12 @@ public TextContentComponent() { .add(blockquote().text(LoremIpsum.paragraphs(2))) .add(small().text(LoremIpsum.paragraphs(3)))) .element() - // @code-end:text-content-body + // @code-end:content-body )); - addSnippet(new Snippet("text-content-ul", "Unordered list", - code("text-content-ul"), () -> - // @code-start:text-content-ul + addSnippet(new Snippet("content-ul", "Unordered list", + code("content-ul"), () -> + // @code-start:content-ul div() .add(content() .add(ul() @@ -92,12 +112,12 @@ public TextContentComponent() { .add(li().text(LoremIpsum.words())))) .add(li().add(LoremIpsum.words())))) .element() - // @code-end:text-content-ul + // @code-end:content-ul )); - addSnippet(new Snippet("text-content-ol", "Ordered list", - code("text-content-ol"), () -> - // @code-start:text-content-ol + addSnippet(new Snippet("content-ol", "Ordered list", + code("content-ol"), () -> + // @code-start:content-ol div() .add(content() .add(ol() @@ -109,12 +129,12 @@ public TextContentComponent() { .add(li().text(LoremIpsum.words())) .add(li().text(LoremIpsum.words())))) .element() - // @code-end:text-content-ol + // @code-end:content-ol )); - addSnippet(new Snippet("text-content-plain-list", "Plain list", - code("text-content-plain-list"), () -> - // @code-start:text-content-plain-list + addSnippet(new Snippet("content-plain-list", "Plain list", + code("content-plain-list"), () -> + // @code-start:content-plain-list div() .add(content() .add(h(3, "Plain unordered list")) @@ -133,12 +153,12 @@ public TextContentComponent() { .add(li().text(LoremIpsum.words())) .add(li().text(LoremIpsum.words())))) .element() - // @code-end:text-content-plain-list + // @code-end:content-plain-list )); - addSnippet(new Snippet("text-content-dl", "Description list", - code("text-content-dl"), () -> - // @code-start:text-content-dl + addSnippet(new Snippet("content-dl", "Description list", + code("content-dl"), () -> + // @code-start:content-dl div() .add(content() .add(dl() @@ -150,7 +170,22 @@ public TextContentComponent() { .add(dt().text("CSS")) .add(dd().text("A technology to make HTML look better")))) .element() - // @code-end:text-content-dl + // @code-end:content-dl + )); + + addSnippet(new Snippet("content-editorial", "Editorial content", + code("content-editorial"), () -> + // @code-start:content-editorial + div() + .add(content().editorial() + .add(content(h1).text("Example of editorial content via components")) + .add(content(p).text(LoremIpsum.paragraphs(4)))) + .add(br()) + .add(content().editorial() + .add(h(1, "Example of editorial content via wrapper")) + .add(p().text(LoremIpsum.paragraphs(4)))) + .element() + // @code-end:content-editorial )); startApiDocs(Content.class); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/DataListComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/DataListComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/DataListComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/DataListComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/DescriptionListComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/DescriptionListComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/DescriptionListComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/DescriptionListComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/DividerComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/DividerComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/DividerComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/DividerComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/DrawerComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/DrawerComponent.java similarity index 91% rename from showcase/common/src/main/java/org/patternfly/showcase/component/DrawerComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/DrawerComponent.java index c47d8b9b7..2a51b3975 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/DrawerComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/DrawerComponent.java @@ -17,12 +17,11 @@ import org.jboss.elemento.router.Route; import org.patternfly.component.drawer.Drawer; +import org.patternfly.component.drawer.DrawerBody; import org.patternfly.component.drawer.DrawerCloseButton; import org.patternfly.component.drawer.DrawerColor; import org.patternfly.component.drawer.DrawerContent; -import org.patternfly.component.drawer.DrawerContentBody; import org.patternfly.component.drawer.DrawerPanel; -import org.patternfly.component.drawer.DrawerPanelBody; import org.patternfly.component.drawer.DrawerPanelHead; import org.patternfly.component.drawer.DrawerSection; import org.patternfly.component.drawer.Position; @@ -34,11 +33,10 @@ import static org.jboss.elemento.Elements.span; import static org.patternfly.component.button.Button.button; import static org.patternfly.component.drawer.Drawer.drawer; +import static org.patternfly.component.drawer.DrawerBody.drawerBody; import static org.patternfly.component.drawer.DrawerCloseButton.drawerCloseButton; import static org.patternfly.component.drawer.DrawerContent.drawerContent; -import static org.patternfly.component.drawer.DrawerContentBody.drawerContentBody; import static org.patternfly.component.drawer.DrawerPanel.drawerPanel; -import static org.patternfly.component.drawer.DrawerPanelBody.drawerPanelBody; import static org.patternfly.component.drawer.DrawerPanelHead.drawerPanelHead; import static org.patternfly.component.drawer.DrawerSection.drawerSection; import static org.patternfly.component.drawer.Position.bottom; @@ -73,7 +71,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -93,7 +91,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.position(end) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -113,7 +111,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.position(start) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -134,7 +132,7 @@ public DrawerComponent() { .add(div().style("height", "400px") .add(drawer.position(bottom) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -154,7 +152,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.inline() .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -174,7 +172,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.inline().position(end) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -194,7 +192,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.inline().position(start) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -214,20 +212,20 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text("content-body")) - .addBody(drawerContentBody().padding() + .addBody(drawerBody().padding() .text("content-body with padding")) - .addBody(drawerContentBody() + .addBody(drawerBody() .text("content-body"))) .addPanel(drawerPanel() .addHead(drawerPanelHead() .add(title(3, _2xl, "drawer title")) .addCloseButton(drawerCloseButton()) .add("drawer-panel")) - .addBody(drawerPanelBody().noPadding() + .addBody(drawerBody().noPadding() .text("drawer-panel with no padding")) - .addBody(drawerPanelBody() + .addBody(drawerBody() .text("drawer-panel")))) .element(); // @code-end:drawer-stacked @@ -243,7 +241,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer .addContent(drawerContent() - .addBody(drawerContentBody().padding() + .addBody(drawerBody().padding() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -263,7 +261,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead().noPadding() @@ -284,7 +282,7 @@ public DrawerComponent() { .add(drawer .addSection(drawerSection().text("drawer-section above")) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -305,7 +303,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.static_() .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .addHead(drawerPanelHead() @@ -325,7 +323,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .widths(breakpoints(default_, width33)) @@ -346,7 +344,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .resizable() @@ -368,7 +366,7 @@ public DrawerComponent() { .onClick((event, btn) -> drawer.toggle())) .add(drawer.position(start) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .resizable().increment(50) @@ -391,7 +389,7 @@ public DrawerComponent() { .add(div().style("height", "400px") .add(drawer.position(bottom) .addContent(drawerContent() - .addBody(drawerContentBody() + .addBody(drawerBody() .text(LoremIpsum.paragraphs(20)))) .addPanel(drawerPanel() .resizable() @@ -405,12 +403,11 @@ public DrawerComponent() { startApiDocs(Drawer.class); addApiDoc(Drawer.class, component); + addApiDoc(DrawerBody.class, subcomponent); addApiDoc(DrawerCloseButton.class, subcomponent); addApiDoc(DrawerColor.class, modifier); addApiDoc(DrawerContent.class, subcomponent); - addApiDoc(DrawerContentBody.class, subcomponent); addApiDoc(DrawerPanel.class, subcomponent); - addApiDoc(DrawerPanelBody.class, subcomponent); addApiDoc(DrawerPanelHead.class, subcomponent); addApiDoc(DrawerSection.class, subcomponent); addApiDoc(Position.class, modifier); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/DropdownComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/DropdownComponent.java similarity index 76% rename from showcase/common/src/main/java/org/patternfly/showcase/component/DropdownComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/DropdownComponent.java index f4788a496..f191ada2b 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/DropdownComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/DropdownComponent.java @@ -16,6 +16,7 @@ package org.patternfly.showcase.component; import org.jboss.elemento.Elements; +import org.jboss.elemento.Id; import org.jboss.elemento.router.Route; import org.patternfly.component.menu.Dropdown; import org.patternfly.component.menu.DropdownMenu; @@ -24,24 +25,27 @@ import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.p; import static org.patternfly.component.avatar.Avatar.avatar; import static org.patternfly.component.badge.Badge.badge; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.p; +import static org.patternfly.component.form.Checkbox.checkbox; import static org.patternfly.component.menu.Dropdown.dropdown; import static org.patternfly.component.menu.DropdownMenu.dropdownMenu; import static org.patternfly.component.menu.MenuContent.menuContent; +import static org.patternfly.component.menu.MenuGroup.menuGroup; import static org.patternfly.component.menu.MenuItem.linkMenuItem; import static org.patternfly.component.menu.MenuItem.menuItem; import static org.patternfly.component.menu.MenuList.menuList; import static org.patternfly.component.menu.MenuToggle.menuToggle; -import static org.patternfly.component.menu.MenuToggleCheckbox.menuToggleCheckbox; +import static org.patternfly.component.menu.MenuToggleAction.menuToggleAction; import static org.patternfly.component.menu.MenuToggleType.split; import static org.patternfly.icon.IconSets.fas.cog; import static org.patternfly.icon.IconSets.fas.ellipsisV; import static org.patternfly.showcase.ApiDoc.Type.component; -import static org.patternfly.showcase.Assets.avatarLight; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; +import static org.patternfly.showcase.Resources.avatarData; @Route(value = "/components/menus/dropdown", title = "Dropdown") public class DropdownComponent extends SnippetPage { @@ -49,9 +53,10 @@ public class DropdownComponent extends SnippetPage { public DropdownComponent() { super(components.get("dropdown")); - startExamples(p() + startExamples(content(p).editorial() .add(Elements.code("Dropdown")) .add(" builds off of the Menu component suite to wrap commonly used properties and functions for a dropdown menu.")); + addSnippet(new Snippet("dropdown-basic", "Basic dropdown", code("dropdown-basic"), () -> // @code-start:dropdown-basic @@ -94,6 +99,55 @@ public DropdownComponent() { // @code-end:dropdown-kebab )); + addSnippet(new Snippet("dropdown-groups", "With groups of items", + code("dropdown-groups"), () -> + // @code-start:dropdown-groups + div() + .add(dropdown("Dropdown") + .addMenu(dropdownMenu() + .addContent(menuContent() + .addGroup(menuGroup() + .addList(menuList() + .addItem(menuItem("item-00", "Action")) + .addItem(linkMenuItem("item-01", "Link", "#item-01")))) + .addDivider() + .addGroup(menuGroup("Group 2") + .addList(menuList() + .addItem(menuItem("item-10", "Group 2 action")) + .addItem(linkMenuItem("item-11", "Group 2 link", "#item-11")))) + .addDivider() + .addGroup(menuGroup("Group 3") + .addList(menuList() + .addItem(menuItem("item-20", "Group 3 action")) + .addItem(linkMenuItem("item-21", "Group 3 link", + "#item-21"))))))) + .element() + // @code-end:dropdown-groups + )); + + addSnippet(new Snippet("dropdown-description", "With item descriptions", + code("dropdown-description"), () -> + // @code-start:dropdown-description + div() + .add(dropdown(menuToggle("Dropdown").fullWidth()) + .addMenu(dropdownMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("item-0", "Action") + .description("This is a description")) + .addItem(linkMenuItem("item-1", "Link", "#item-1") + .description( + "This is a very long description that describes the menu item")) + .addItem(menuItem("item-2", "Disabled action") + .disabled() + .description("Disabled action description")) + .addItem(linkMenuItem("item-3", "Disabled link", "#item-3") + .disabled() + .description("Disabled link description")))))) + .element() + // @code-end:dropdown-description + )); + addSnippet(new Snippet("dropdown-badge", "With a badge", code("dropdown-badge"), () -> // @code-start:dropdown-badge @@ -140,7 +194,7 @@ public DropdownComponent() { code("dropdown-avatar"), () -> // @code-start:dropdown-avatar div() - .add(dropdown(menuToggle("John Doe").addAvatar(avatar(avatarLight, "avatar"))) + .add(dropdown(menuToggle("John Doe").addAvatar(avatar(avatarData(), "avatar"))) .addMenu(dropdownMenu() .addContent(menuContent() .addList(menuList() @@ -161,7 +215,8 @@ public DropdownComponent() { code("dropdown-split-check"), () -> // @code-start:dropdown-split-check div() - .add(dropdown(menuToggle(split).addCheckbox(menuToggleCheckbox())) + .add(dropdown(menuToggle(split) + .addCheckbox(checkbox(Id.unique(), "dropdown-split-check"))) .addMenu(dropdownMenu() .addContent(menuContent() .addList(menuList() @@ -177,7 +232,7 @@ public DropdownComponent() { .add(br()) .add(br()) .add(dropdown(menuToggle(split) - .addCheckbox(menuToggleCheckbox()) + .addCheckbox(checkbox(Id.unique(), "dropdown-split-check")) .text("10 selected")) .addMenu(dropdownMenu() .addContent(menuContent() @@ -195,8 +250,6 @@ public DropdownComponent() { // @code-end:dropdown-split-check )); -/* - TODO Fix split type addSnippet(new Snippet("dropdown-split-action", "With an action", code("dropdown-split-action"), () -> // @code-start:dropdown-split-action @@ -218,7 +271,6 @@ public DropdownComponent() { .element() // @code-end:dropdown-split-action )); -*/ startApiDocs(Dropdown.class); addApiDoc(Dropdown.class, component); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/EmptyStateComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/EmptyStateComponent.java similarity index 73% rename from showcase/common/src/main/java/org/patternfly/showcase/component/EmptyStateComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/EmptyStateComponent.java index c5899324f..18334c61c 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/EmptyStateComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/EmptyStateComponent.java @@ -15,12 +15,17 @@ */ package org.patternfly.showcase.component; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.Supplier; + import org.jboss.elemento.router.Route; +import org.patternfly.component.Severity; import org.patternfly.component.emptystate.EmptyState; import org.patternfly.component.emptystate.EmptyStateActions; import org.patternfly.component.emptystate.EmptyStateBody; import org.patternfly.component.emptystate.EmptyStateFooter; -import org.patternfly.component.emptystate.EmptyStateHeader; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; @@ -30,8 +35,6 @@ import static org.patternfly.component.emptystate.EmptyStateActions.emptyStateActions; import static org.patternfly.component.emptystate.EmptyStateBody.emptyStateBody; import static org.patternfly.component.emptystate.EmptyStateFooter.emptyStateFooter; -import static org.patternfly.component.emptystate.EmptyStateHeader.emptyStateHeader; -import static org.patternfly.icon.IconSets.fas.check; import static org.patternfly.icon.IconSets.fas.cubes; import static org.patternfly.icon.IconSets.fas.search; import static org.patternfly.showcase.ApiDoc.Type.component; @@ -42,11 +45,11 @@ import static org.patternfly.style.Size.sm; import static org.patternfly.style.Size.xl; import static org.patternfly.style.Size.xs; -import static org.patternfly.style.Status.success; @Route(value = "/components/empty-state", title = "Empty state") public class EmptyStateComponent extends SnippetPage { + @SuppressWarnings("unchecked") public EmptyStateComponent() { super(components.get("empty-state")); @@ -56,9 +59,8 @@ public EmptyStateComponent() { // @code-start:empty-state-basic div() .add(emptyState() - .addHeader(emptyStateHeader(4) - .icon(cubes()) - .text("Empty state")) + .text("Empty State") + .icon(cubes()) .addBody(emptyStateBody().text( "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs.")) .addFooter(emptyStateFooter() @@ -81,8 +83,8 @@ public EmptyStateComponent() { div() .add(emptyState() .size(xs) - .addHeader(emptyStateHeader(4) - .text("Empty state")) + .text("Empty State") + .icon(cubes()) .addBody(emptyStateBody().text( "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs.")) .addFooter(emptyStateFooter() @@ -103,9 +105,8 @@ public EmptyStateComponent() { div() .add(emptyState() .size(sm) - .addHeader(emptyStateHeader(4) - .icon(cubes()) - .text("Empty state")) + .text("Empty State") + .icon(cubes()) .addBody(emptyStateBody().text( "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs.")) .addFooter(emptyStateFooter() @@ -128,9 +129,8 @@ public EmptyStateComponent() { div() .add(emptyState() .size(lg) - .addHeader(emptyStateHeader(4) - .icon(cubes()) - .text("Empty state")) + .text("Empty State") + .icon(cubes()) .addBody(emptyStateBody().text( "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs.")) .addFooter(emptyStateFooter() @@ -153,9 +153,8 @@ public EmptyStateComponent() { div() .add(emptyState() .size(xl) - .addHeader(emptyStateHeader(4) - .icon(cubes()) - .text("Empty state")) + .text("Empty State") + .icon(cubes()) .addBody(emptyStateBody().text( "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs.")) .addFooter(emptyStateFooter() @@ -172,14 +171,59 @@ public EmptyStateComponent() { // @code-end:empty-state-xl )); + addSnippet(new Snippet("empty-state-status", "With status", + code("empty-state-status"), () -> { + // @code-start:empty-state-status + LinkedHashMap status = new LinkedHashMap<>(); + status.put(Severity.success, "You're all set!"); + status.put(Severity.danger, "You're not set"); + status.put(Severity.warning, "You're probably not set"); + status.put(Severity.info, "You might be set"); + status.put(Severity.custom, "You're custom"); + Iterator>[] iterator = new Iterator[]{status.entrySet().iterator()}; + Supplier> nextStatus = () -> { + if (!iterator[0].hasNext()) { + iterator[0] = status.entrySet().iterator(); + } + return iterator[0].next(); + }; + + EmptyState emptyState = emptyState(); + Map.Entry first = nextStatus.get(); + return div() + .add(emptyState + .status(first.getKey()) + .text(first.getValue()) + .addBody(emptyStateBody().text( + "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs.")) + .addFooter(emptyStateFooter() + .addActions(emptyStateActions() + .add(button("Toggle status") + .primary() + .onClick((e, b) -> { + Map.Entry next = nextStatus.get(); + emptyState.text(next.getValue()); + emptyState.status(next.getKey()); + }) + )) + .addActions(emptyStateActions() + .add(button("Multiple").link()) + .add(button("Action Buttons").link()) + .add(button("Can").link()) + .add(button("Go here").link()) + .add(button("In the secondary").link()) + .add(button("Action area").link())))) + .element(); + // @code-end:empty-state-status + })); + addSnippet(new Snippet("empty-state-spinner", "Spinner", code("empty-state-spinner"), () -> // @code-start:empty-state-spinner div() .add(emptyState() - .addHeader(emptyStateHeader(4) - .spinner("Loading...") - .text("Loading"))) + .text("Loading...") + .spinner("Loading...")) .element() // @code-end:empty-state-spinner )); @@ -189,9 +233,8 @@ public EmptyStateComponent() { // @code-start:empty-state-no-match div() .add(emptyState() - .addHeader(emptyStateHeader(4) - .icon(search()) - .text("No results found")) + .text("No results found") + .icon(search()) .addBody(emptyStateBody().text( "No results match the filter criteria. Clear all filters and try again.")) .addFooter(emptyStateFooter() @@ -201,25 +244,10 @@ public EmptyStateComponent() { // @code-end:empty-state-no-match )); - addSnippet(new Snippet("empty-state-color", "Custom icon color", - code("empty-state-color"), () -> - // @code-start:empty-state-color - div() - .add(emptyState() - .addHeader(emptyStateHeader(4) - .icon(check(), success) - .text("Custom icon color")) - .addBody(emptyStateBody().text( - "This represents an the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to meet a variety of needs."))) - .element() - // @code-end:empty-state-color - )); - startApiDocs(EmptyState.class); addApiDoc(EmptyState.class, component); addApiDoc(EmptyStateActions.class, subcomponent); addApiDoc(EmptyStateBody.class, subcomponent); addApiDoc(EmptyStateFooter.class, subcomponent); - addApiDoc(EmptyStateHeader.class, subcomponent); } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ExpandableSectionComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ExpandableSectionComponent.java similarity index 69% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ExpandableSectionComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ExpandableSectionComponent.java index 7d3ffb1f2..8e0d13447 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/ExpandableSectionComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ExpandableSectionComponent.java @@ -45,52 +45,69 @@ public ExpandableSectionComponent() { super(components.get("expandable-section")); startExamples(); - addSnippet(new Snippet("expandable-section-basic", "Basic", - code("expandable-section-basic"), () -> - // @code-start:expandable-section-basic + addSnippet(new Snippet("es-basic", "Basic", + code("es-basic"), () -> + // @code-start:es-basic div() .add(expandableSection() .addToggle(expandableSectionToggle("Show more")) .addContent(expandableSectionContent() .text("This content is visible only when the component is expanded."))) .element() - // @code-end:expandable-section-basic + // @code-end:es-basic )); - addSnippet(new Snippet("expandable-section-dynamic-text", "Basic with dynamic toggle text", - code("expandable-section-dynamic-text"), () -> - // @code-start:expandable-section-dynamic-text + addSnippet(new Snippet("es-dynamic-text", "Basic with dynamic toggle text", + code("es-dynamic-text"), () -> + // @code-start:es-dynamic-text div() .add(expandableSection() .addToggle(expandableSectionToggle("Show more", "Show less")) .addContent(expandableSectionContent() .text("This content is visible only when the component is expanded."))) .element() - // @code-end:expandable-section-dynamic-text + // @code-end:es-dynamic-text )); - addSnippet(new Snippet("expandable-section-detached", "Detached", - code("expandable-section-detached"), () -> - // @code-start:expandable-section-detached + addSnippet(new Snippet("es-detached-before", "Detached (before)", + code("es-detached-before"), () -> + // @code-start:es-detached-before div() .add(stack().gutter() .addItem(stackItem() - .add(expandableSection("detached-content") - .detachedFrom("detached-toggle") + .add(expandableSection("es-detached-before-0") + .detached() .addContent(expandableSectionContent() .text("This content is visible only when the component is expanded.")))) .addItem(stackItem() - .add(expandableSection("detached-toggle") - .detachedFrom("detached-content") - .addToggle(expandableSectionToggle("Show more", "Show less") - .up())))) + .add(expandableSection("es-detached-before-0") + .detached() + .addToggle(expandableSectionToggle("Show more", "Show less"))))) .element() - // @code-end:expandable-section-detached + // @code-end:es-detached-before )); - addSnippet(new Snippet("expandable-section-disclosure", "Disclosure variation", - code("expandable-section-disclosure"), () -> - // @code-start:expandable-section-disclosure + addSnippet(new Snippet("es-detached-after", "Detached (after)", + code("es-detached-after"), () -> + // @code-start:es-detached-after + div() + .add(stack().gutter() + .addItem(stackItem() + .add(expandableSection("es-detached-after-0") + .detached() + .addToggle(expandableSectionToggle("Show more", "Show less")))) + .addItem(stackItem() + .add(expandableSection("es-detached-after-0") + .detached() + .addContent(expandableSectionContent() + .text("This content is visible only when the component is expanded."))))) + .element() + // @code-end:es-detached-after + )); + + addSnippet(new Snippet("es-disclosure", "Disclosure variation", + code("es-disclosure"), () -> + // @code-start:es-disclosure div() .add(expandableSection() .disclosure() @@ -98,12 +115,12 @@ public ExpandableSectionComponent() { .addContent(expandableSectionContent() .text("This content is visible only when the component is expanded."))) .element() - // @code-end:expandable-section-disclosure + // @code-end:es-disclosure )); - addSnippet(new Snippet("expandable-section-indented", "Indented", - code("expandable-section-indented"), () -> - // @code-start:expandable-section-indented + addSnippet(new Snippet("es-indented", "Indented", + code("es-indented"), () -> + // @code-start:es-indented div() .add(expandableSection() .indented() @@ -111,12 +128,12 @@ public ExpandableSectionComponent() { .addContent(expandableSectionContent() .text("This content is visible only when the component is expanded."))) .element() - // @code-end:expandable-section-indented + // @code-end:es-indented )); - addSnippet(new Snippet("expandable-section-custom-toggle", "With custom toggle content", - code("expandable-section-custom-toggle"), () -> { - // @code-start:expandable-section-custom-toggle + addSnippet(new Snippet("es-custom-toggle", "With custom toggle content", + code("es-custom-toggle"), () -> { + // @code-start:es-custom-toggle Badge badge = badge(4).read(); return div() .add(expandableSection() @@ -131,12 +148,12 @@ public ExpandableSectionComponent() { .addContent(expandableSectionContent() .text("This content is visible only when the component is expanded."))) .element(); - // @code-end:expandable-section-custom-toggle + // @code-end:es-custom-toggle })); - addSnippet(new Snippet("expandable-section-truncate", "Truncate", - code("expandable-section-truncate"), () -> - // @code-start:expandable-section-truncate + addSnippet(new Snippet("es-truncate", "Truncate", + code("es-truncate"), () -> + // @code-start:es-truncate div() .add(expandableSection() .truncate(2) // lines @@ -144,7 +161,7 @@ public ExpandableSectionComponent() { .text(LoremIpsum.paragraphs(20))) .addToggle(expandableSectionToggle("Show more", "Show less"))) .element() - // @code-end:expandable-section-truncate + // @code-end:es-truncate )); startApiDocs(ExpandableSection.class); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/FormComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/FormComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/FormComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/FormComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/FormControlComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/FormControlComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/FormControlComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/FormControlComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/FormSelectComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/FormSelectComponent.java similarity index 97% rename from showcase/common/src/main/java/org/patternfly/showcase/component/FormSelectComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/FormSelectComponent.java index 0dd225de1..2de94b8e1 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/FormSelectComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/FormSelectComponent.java @@ -76,7 +76,8 @@ public FormSelectComponent() { fs.validated(default_); helperText.firstItem() .status(default_) - .text("Validating..."); + .text("Validating...") + .removeIcon(); int number = Integer.parseInt(value); handle[0] = setTimeout(__ -> { if (number == 0) { @@ -99,7 +100,7 @@ public FormSelectComponent() { }); return div() .add(form() - .add(formGroup() + .add(formGroup("validated-form-select-0") .addLabel(formGroupLabel("Comments:")) .addControl(formGroupControl() .addControl(formSelect diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/HelperTextComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/HelperTextComponent.java similarity index 78% rename from showcase/common/src/main/java/org/patternfly/showcase/component/HelperTextComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/HelperTextComponent.java index 124602065..203447e39 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/HelperTextComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/HelperTextComponent.java @@ -60,24 +60,6 @@ public HelperTextComponent() { // @code-end:helper-text-static )); - addSnippet(new Snippet("helper-text-static-icon", "Static with default icons", - code("helper-text-static-icon"), () -> - // @code-start:helper-text-static-icon - div() - .add(helperText() - .addItem(helperTextItem("This is default helper text").defaultIcon())) - .add(helperText() - .addItem(helperTextItem("This is indeterminate helper text", indeterminate).defaultIcon())) - .add(helperText() - .addItem(helperTextItem("This is warning helper text", warning).defaultIcon())) - .add(helperText() - .addItem(helperTextItem("This is success helper text", success).defaultIcon())) - .add(helperText() - .addItem(helperTextItem("This is error helper text", error).defaultIcon())) - .element() - // @code-end:helper-text-static-icon - )); - addSnippet(new Snippet("helper-text-static-custom-icon", "Static with custom icons", code("helper-text-static-custom-icon"), () -> // @code-start:helper-text-static-custom-icon @@ -119,24 +101,19 @@ public HelperTextComponent() { div() .add(helperText() .addItem(helperTextItem("This is default helper text") - .dynamic() - .defaultIcon())) + .dynamic())) .add(helperText() .addItem(helperTextItem("This is indeterminate helper text", indeterminate) - .dynamic() - .defaultIcon())) + .dynamic())) .add(helperText() .addItem(helperTextItem("This is warning helper text", warning) - .dynamic() - .defaultIcon())) + .dynamic())) .add(helperText() .addItem(helperTextItem("This is success helper text", success) - .dynamic() - .defaultIcon())) + .dynamic())) .add(helperText() .addItem(helperTextItem("This is error helper text", error) - .dynamic() - .defaultIcon())) + .dynamic())) .add(helperText() .addItem(helperTextItem("This is error helper text with a custom icon", error) .dynamic() @@ -154,16 +131,13 @@ public HelperTextComponent() { div() .add(helperText(ul()).liveRegion() .addItem(helperTextItem(li(), "Must be at least 14 characters", success) - .dynamic() - .defaultIcon()) + .dynamic()) .addItem(helperTextItem(li(), "Cannot contain any variation of the word 'redhat'", error) - .dynamic() - .defaultIcon()) + .dynamic()) .addItem(helperTextItem( "Must include at least 3 of the following: lowercase letter, uppercase letters, numbers, symbols", success) - .dynamic() - .defaultIcon())) + .dynamic())) .element() // @code-end:helper-text-dynamic-list )); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/HintComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/HintComponent.java similarity index 88% rename from showcase/common/src/main/java/org/patternfly/showcase/component/HintComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/HintComponent.java index 7201b323d..10bf63613 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/HintComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/HintComponent.java @@ -27,6 +27,7 @@ import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.form.Checkbox.checkbox; import static org.patternfly.component.hint.Hint.hint; import static org.patternfly.component.hint.HintActions.hintActions; import static org.patternfly.component.hint.HintBody.hintBody; @@ -44,6 +45,7 @@ import static org.patternfly.showcase.ApiDoc.Type.subcomponent; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; +import static org.patternfly.style.Classes.util; @Route(value = "/components/hint", title = "Hint") public class HintComponent extends SnippetPage { @@ -127,6 +129,23 @@ public HintComponent() { // @code-end:hint-basic-no-title )); + addSnippet(new Snippet("hint-with-action", "With actions", + code("hint-with-action"), () -> { + // @code-start:hint-with-action + HintActions hintActions = hintActions(); + return div() + .add(checkbox("no-offset", "no-offset", "No actions offset") + .onChange((e, c, value) -> hintActions.noOffset(value))) + .add(hint().css(util("mt-sm")) + .addActions(hintActions + .add(button("Action").primary())) + .addTitle(hintTitle().text("Do more with Find it Fix it capabilities")) + .addBody(hintBody().text( + "Upgrade to Red Hat Smart Management to remediate all your systems across regions and geographies."))) + .element(); + // @code-end:hint-with-action + })); + startApiDocs(Hint.class); addApiDoc(Hint.class, component); addApiDoc(HintActions.class, subcomponent); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/IconComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/IconComponent.java similarity index 73% rename from showcase/common/src/main/java/org/patternfly/showcase/component/IconComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/IconComponent.java index b71a1e83a..072d3af38 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/IconComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/IconComponent.java @@ -17,6 +17,7 @@ import org.jboss.elemento.router.Route; import org.patternfly.component.icon.Icon; +import org.patternfly.component.icon.IconSize; import org.patternfly.showcase.LoremIpsum; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; @@ -29,6 +30,21 @@ import static org.patternfly.component.content.Content.content; import static org.patternfly.component.form.Checkbox.checkbox; import static org.patternfly.component.icon.Icon.icon; +import static org.patternfly.component.icon.IconSize._2xl; +import static org.patternfly.component.icon.IconSize._3xl; +import static org.patternfly.component.icon.IconSize.bodyDefault; +import static org.patternfly.component.icon.IconSize.bodyLg; +import static org.patternfly.component.icon.IconSize.bodySm; +import static org.patternfly.component.icon.IconSize.heading2xl; +import static org.patternfly.component.icon.IconSize.heading3xl; +import static org.patternfly.component.icon.IconSize.headingLg; +import static org.patternfly.component.icon.IconSize.headingMd; +import static org.patternfly.component.icon.IconSize.headingSm; +import static org.patternfly.component.icon.IconSize.headingXl; +import static org.patternfly.component.icon.IconSize.lg; +import static org.patternfly.component.icon.IconSize.md; +import static org.patternfly.component.icon.IconSize.sm; +import static org.patternfly.component.icon.IconSize.xl; import static org.patternfly.icon.IconSets.fas.angleDown; import static org.patternfly.icon.IconSets.fas.angleRight; import static org.patternfly.icon.IconSets.fas.check; @@ -41,13 +57,10 @@ import static org.patternfly.icon.IconSets.fas.plusCircle; import static org.patternfly.icon.IconSets.patternfly.bell; import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.modifier; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; import static org.patternfly.style.Classes.util; -import static org.patternfly.style.Size.lg; -import static org.patternfly.style.Size.md; -import static org.patternfly.style.Size.sm; -import static org.patternfly.style.Size.xl; import static org.patternfly.style.Status.custom; import static org.patternfly.style.Status.danger; import static org.patternfly.style.Status.info; @@ -76,7 +89,8 @@ public IconComponent() { // @code-end:icon-basic )); - addSnippet(new Snippet("icon-sizes", "Sizes", + addSnippet(new Snippet("icon-sizes", "Standalone icon sizes", + "These are the standard options for sizing icons.", code("icon-sizes"), () -> // @code-start:icon-sizes div() @@ -87,10 +101,48 @@ public IconComponent() { .add(icon(plusCircle()).size(lg)) .add(" ") .add(icon(plusCircle()).size(xl)) + .add(" ") + .add(icon(plusCircle()).size(_2xl)) + .add(" ") + .add(icon(plusCircle()).size(_3xl)) .element() // @code-end:icon-sizes )); + addSnippet(new Snippet("body-sizes", "Body sizes", + "These size options are meant to make icons match the size of body text.", + code("body-sizes"), () -> + // @code-start:body-sizes + div() + .add(icon(plusCircle()).size(bodySm)) + .add(" ") + .add(icon(plusCircle()).size(bodyDefault)) + .add(" ") + .add(icon(plusCircle()).size(bodyLg)) + .element() + // @code-end:body-sizes + )); + + addSnippet(new Snippet("heading-sizes", "Heading sizes", + "These size options are meant to make icons match the size of heading text.", + code("heading-sizes"), () -> + // @code-start:heading-sizes + div() + .add(icon(plusCircle()).size(headingSm)) + .add(" ") + .add(icon(plusCircle()).size(headingMd)) + .add(" ") + .add(icon(plusCircle()).size(headingLg)) + .add(" ") + .add(icon(plusCircle()).size(headingXl)) + .add(" ") + .add(icon(plusCircle()).size(heading2xl)) + .add(" ") + .add(icon(plusCircle()).size(heading3xl)) + .element() + // @code-end:heading-sizes + )); + addSnippet(new Snippet("icon-status-colors", "Status colors", "The following example demonstrates the various status variants of an icon. Keep in mind that these icons are displayed out of a typical context, and that you should not rely on color alone to convey status to users.", code("icon-status-colors"), () -> @@ -114,13 +166,13 @@ public IconComponent() { code("icon-container"), () -> // @code-start:icon-container div() - .add(icon(plusCircle()).size(xl).iconSize(sm)) + .add(icon(plusCircle()).size(_3xl).iconSize(lg)) .add(" ") - .add(icon(plusCircle()).size(xl).iconSize(md)) + .add(icon(plusCircle()).size(_3xl).iconSize(xl)) .add(" ") - .add(icon(plusCircle()).size(xl).iconSize(lg)) + .add(icon(plusCircle()).size(_3xl).iconSize(_2xl)) .add(" ") - .add(icon(plusCircle()).size(xl)) + .add(icon(plusCircle()).size(_3xl)) .element() // @code-end:icon-container )); @@ -191,5 +243,6 @@ public IconComponent() { startApiDocs(Icon.class); addApiDoc(Icon.class, component); + addApiDoc(IconSize.class, modifier); } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/InputGroupComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/InputGroupComponent.java similarity index 96% rename from showcase/common/src/main/java/org/patternfly/showcase/component/InputGroupComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/InputGroupComponent.java index d7526512c..483521af8 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/InputGroupComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/InputGroupComponent.java @@ -117,12 +117,12 @@ public InputGroupComponent() { addSnippet(new Snippet("input-group-popover", "With popover", code("input-group-popover"), () -> // @code-start:input-group-popover - div().style("width", "500px") + div() .add(inputGroup() .addItem(inputGroupItem().fill() .addControl(textInput("input-group-popover-0"))) - .addText(inputGroupText().id("input-group-popover-icon-0") - .icon(questionCircle())) + .addItem(inputGroupItem().id("input-group-popover-icon-0") + .addButton(button(questionCircle()).control())) .add(popover(By.id("input-group-popover-icon-0")) .placement(top) .addBody("This field is an example of an input group with a popover."))) @@ -130,8 +130,8 @@ public InputGroupComponent() { .add(inputGroup() .addItem(inputGroupItem().fill() .addControl(textInput("input-group-popover-1"))) - .addText(inputGroupText().id("input-group-popover-icon-1") - .icon(questionCircle()).plain()) + .addItem(inputGroupItem().id("input-group-popover-icon-1") + .addButton(button(questionCircle()).plain())) .add(popover(By.id("input-group-popover-icon-1")) .placement(top) .addBody("This field is an example of an input group with a popover."))) diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/JumpLinksComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/JumpLinksComponent.java similarity index 97% rename from showcase/common/src/main/java/org/patternfly/showcase/component/JumpLinksComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/JumpLinksComponent.java index 5f9a314d2..fc79c363e 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/JumpLinksComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/JumpLinksComponent.java @@ -26,7 +26,8 @@ import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.p; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.p; import static org.patternfly.component.jumplinks.JumpLinks.jumpLinks; import static org.patternfly.component.jumplinks.JumpLinksItem.jumpLinksItem; import static org.patternfly.component.jumplinks.JumpLinksList.jumpLinksList; @@ -44,7 +45,7 @@ public class JumpLinksComponent extends SnippetPage { public JumpLinksComponent() { super(components.get("jump-links")); - startExamples(p() + startExamples(content(p).editorial() .add("These examples are static because they have no element to scroll spy on that makes sense. Check out the code of the ") .add(a("https://github.com/patternfly-java/showcase/blob/main/src/main/java/org/patternfly/showcase/SnippetPage.java", ApiDoc.API_DOC_TARGET).text("showcase")) diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/LabelComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/LabelComponent.java similarity index 56% rename from showcase/common/src/main/java/org/patternfly/showcase/component/LabelComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/LabelComponent.java index 1f90b9736..4b19aa882 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/LabelComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/LabelComponent.java @@ -17,6 +17,7 @@ import org.jboss.elemento.HTMLContainerBuilder; import org.jboss.elemento.router.Route; +import org.patternfly.component.Severity; import org.patternfly.component.label.Label; import org.patternfly.component.label.LabelEditCancelHandler; import org.patternfly.component.label.LabelEditCompleteHandler; @@ -30,8 +31,10 @@ import static elemental2.dom.DomGlobal.console; import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.strong; import static org.patternfly.component.label.Label.label; import static org.patternfly.component.label.LabelGroup.labelGroup; +import static org.patternfly.icon.IconSets.fas.cube; import static org.patternfly.icon.IconSets.fas.infoCircle; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.ApiDoc.Type.handler; @@ -53,80 +56,129 @@ public LabelComponent() { addSnippet(new Snippet("label-filled", "Filled labels", code("label-filled"), () -> { // @code-start:label-filled - HTMLContainerBuilder div = div(); - Color[] values = Color.values(); - for (Color color : values) { + HTMLContainerBuilder div = div().id("ws-react-c-label-filled-labels"); + div.add(strong().text("Non-status")).add(br()).add(br()); + for (Color color : Color.values()) { String name = color.name().substring(0, 1).toUpperCase() + color.name().substring(1); - div.add(label(name, color)).add(" "); - div.add(label(name + " icon", color).icon(infoCircle())).add(" "); - div.add(label(name + " removable", color).closable()).add(" "); - div.add(label(name + " icon removable", color).icon(infoCircle()).closable()).add(" "); - div.add(label(name + " link", color).href("#")).add(" "); - div.add(label(name + " link removable", color).href("#").closable()).add(" "); - div.add(label(name + " clickable", color).uniqueId() - .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) - .add(" "); - div.add(label(name + " clickable removable", color).uniqueId().closable() - .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) - .add(" "); - div.add(label(name + " label with icon that overflows", color).closable() + div.add(label(name, color).filled()); + div.add(label(name + " icon", color).filled().icon(cube())); + div.add(label(name + " removable", color).filled().closable()); + div.add(label(name + " icon removable", color).filled().icon(cube()).closable()); + div.add(label(name + " link", color).filled().href("#")); + div.add(label(name + " link removable", color).filled().href("#").closable()); + div.add(label(name + " clickable", color).filled().uniqueId() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); + div.add(label(name + " clickable removable", color).filled().uniqueId().closable() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); + div.add(label(name + " label with icon that overflows", color).filled().closable() .textMaxWidth("16ch")); + div.add(label(name + " link removable (disabled)", color).filled().disabled().href("#").closable()); + div.add(label(name + " clickable removable (disabled)", color).filled().disabled().clickable().closable()); div.add(br()).add(br()); } div.add(div().style("width", "250px") .add(label("Label that overflows its parent, but has no textMaxWidth on its own"))); + + div.add(br()).add(strong().text("Status")).add(br()).add(br()); + for (Severity severity : Severity.values()) { + String name = severity.status.name().substring(0, 1).toUpperCase() + severity.status.name().substring(1); + div.add(label(name).status(severity).filled()); + div.add(label(name + " removable").status(severity).filled().closable()); + div.add(label(name + " link").status(severity).filled().href("#")); + div.add(label(name + " link removable").status(severity).filled().href("#").closable()); + div.add(label(name + " clickable").status(severity).filled().uniqueId() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); + div.add(label(name + " clickable removable").status(severity).filled().uniqueId().closable() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); + div.add(label(name + " label with icon that overflows").status(severity).filled().closable() + .textMaxWidth("16ch")); + div.add(br()).add(br()); + } return div.element(); // @code-end:label-filled })); - addSnippet(new Snippet("label-outline", "Outlined labels", - code("label-outline"), () -> { - // @code-start:label-outline - HTMLContainerBuilder div = div(); - Color[] values = Color.values(); - for (int i = 0; i < values.length; i++) { - Color color = values[i]; + addSnippet(new Snippet("label-outlined", "Filled labels", + code("label-outlined"), () -> { + // @code-start:label-outlined + HTMLContainerBuilder div = div().id("ws-react-c-label-outlined-labels"); + div.add(strong().text("Non-status")).add(br()).add(br()); + for (Color color : Color.values()) { String name = color.name().substring(0, 1).toUpperCase() + color.name().substring(1); - div.add(label(name, color).outline()).add(" "); - div.add(label(name + " icon", color).outline().icon(infoCircle())).add(" "); - div.add(label(name + " removable", color).outline().closable()).add(" "); - div.add(label(name + " icon removable", color).outline().icon(infoCircle()).closable()).add(" "); - div.add(label(name + " link", color).outline().href("#")).add(" "); - div.add(label(name + " link removable", color).outline().href("#").closable()).add(" "); + div.add(label(name, color).outline()); + div.add(label(name + " icon", color).outline().icon(cube())); + div.add(label(name + " removable", color).outline().closable()); + div.add(label(name + " icon removable", color).outline().icon(cube()).closable()); + div.add(label(name + " link", color).outline().href("#")); + div.add(label(name + " link removable", color).outline().href("#").closable()); div.add(label(name + " clickable", color).outline().uniqueId() - .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) - .add(" "); + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); div.add(label(name + " clickable removable", color).outline().uniqueId().closable() - .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) - .add(" "); + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); div.add(label(name + " label with icon that overflows", color).outline().closable() .textMaxWidth("16ch")); - if (i < values.length - 1) { - div.add(br()).add(br()); - } + div.add(label(name + " link removable (disabled)", color).outline().disabled().href("#").closable()); + div.add(label(name + " clickable removable (disabled)", color).outline().disabled().clickable().closable()); + div.add(br()).add(br()); + } + div.add(div().style("width", "250px") + .add(label("Label that overflows its parent, but has no textMaxWidth on its own"))); + + div.add(br()).add(strong().text("Status")).add(br()).add(br()); + for (Severity severity : Severity.values()) { + String name = severity.status.name().substring(0, 1).toUpperCase() + severity.status.name().substring(1); + div.add(label(name).status(severity).outline()); + div.add(label(name + " removable").status(severity).outline().closable()); + div.add(label(name + " link").status(severity).outline().href("#")); + div.add(label(name + " link removable").status(severity).outline().href("#").closable()); + div.add(label(name + " clickable").status(severity).outline().uniqueId() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); + div.add(label(name + " clickable removable").status(severity).outline().uniqueId().closable() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))); + div.add(label(name + " label with icon that overflows").status(severity).outline().closable() + .textMaxWidth("16ch")); + div.add(br()).add(br()); } return div.element(); - // @code-end:label-outline + // @code-end:label-outlined })); addSnippet(new Snippet("label-compact", "Compact labels", code("label-compact"), () -> // @code-start:label-compact - div() - .add(label("Grey").compact()).add(" ") - .add(label("Grey icon").compact().icon(infoCircle())).add(" ") - .add(label("Grey removable").compact().closable()).add(" ") - .add(label("Grey icon removable").compact().icon(infoCircle()).closable()).add(" ") - .add(label("Grey link").compact().href("#")).add(" ") - .add(label("Grey link removable").compact().href("#").closable()).add(" ") - .add(label("Grey clickable").compact().uniqueId() + div().id("ws-react-c-label-compact-labels") + .add(label("Compact").compact().filled()).add(" ") + .add(label("Compact icon").compact().filled().icon(cube())).add(" ") + .add(label("Compact removable").compact().filled().closable()).add(" ") + .add(label("Compact icon removable").compact().filled().icon(cube()).closable()).add(" ") + .add(label("Compact link").compact().filled().href("#")).add(" ") + .add(label("Compact link removable").compact().filled().href("#").closable()).add(" ") + .add(label("Compact clickable").compact().filled().uniqueId() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) + .add(" ") + .add(label("Compact clickable removable").compact().filled().uniqueId().closable() + .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) + .add(" ") + .add(label("Compact label with icon that overflows").compact().filled().closable() + .textMaxWidth("16ch")) + .add(label("Compact link removable (disabled)").compact().filled().disabled().href("#").closable()) + .add(label("Compact clickable removable (disabled)").compact().filled().disabled().clickable().closable()) + .add(label("Compact").compact().outline()).add(" ") + .add(label("Compact icon").compact().outline().icon(cube())).add(" ") + .add(label("Compact removable").compact().outline().closable()).add(" ") + .add(label("Compact icon removable").compact().outline().icon(cube()).closable()).add(" ") + .add(label("Compact link").compact().outline().href("#")).add(" ") + .add(label("Compact link removable").compact().outline().href("#").closable()).add(" ") + .add(label("Compact clickable").compact().outline().uniqueId() .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) .add(" ") - .add(label("Grey clickable removable").compact().uniqueId().closable() + .add(label("Compact clickable removable").compact().outline().uniqueId().closable() .clickable((e, l) -> console.log("Label " + l.element().id + " clicked"))) .add(" ") - .add(label("Grey label with icon that overflows").compact().closable() + .add(label("Compact label with icon that overflows").compact().outline().closable() .textMaxWidth("16ch")) + .add(label("Compact link removable (disabled)").compact().outline().disabled().href("#").closable()) + .add(label("Compact clickable removable (disabled)").compact().outline().disabled().clickable().closable()) .element() // @code-end:label-compact )); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ListComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ListComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ListComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ListComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/MastheadComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/MastheadComponent.java similarity index 82% rename from showcase/common/src/main/java/org/patternfly/showcase/component/MastheadComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/MastheadComponent.java index 90b8b0e60..146d4bdee 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/MastheadComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/MastheadComponent.java @@ -22,14 +22,14 @@ import org.patternfly.component.page.MastheadLogo; import org.patternfly.component.page.MastheadMain; import org.patternfly.component.page.MastheadToggle; +import org.patternfly.showcase.ResourcesImpl; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; -import org.patternfly.style.Classes; import org.patternfly.style.Inset; +import static org.gwtproject.safehtml.shared.SafeHtmlUtils.fromSafeConstant; import static org.jboss.elemento.Elements.div; import static org.jboss.elemento.Elements.span; -import static org.patternfly.component.brand.Brand.brand; import static org.patternfly.component.button.Button.button; import static org.patternfly.component.page.Display.inline; import static org.patternfly.component.page.Display.stack; @@ -42,15 +42,14 @@ import static org.patternfly.layout.flex.Flex.flex; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.ApiDoc.Type.subcomponent; -import static org.patternfly.showcase.Assets.pfLogo; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; import static org.patternfly.style.Breakpoint._2xl; import static org.patternfly.style.Breakpoint.default_; import static org.patternfly.style.Breakpoint.lg; import static org.patternfly.style.Breakpoints.breakpoints; -import static org.patternfly.style.Brightness.light; -import static org.patternfly.style.Brightness.light200; +import static org.patternfly.style.Classes.brand; +import static org.patternfly.style.Classes.component; import static org.patternfly.style.Variable.componentVar; import static org.patternfly.style.Variables.Height; @@ -69,7 +68,8 @@ public MastheadComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() @@ -84,7 +84,8 @@ public MastheadComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .add(flex() .add(span().text("Content")) @@ -101,9 +102,10 @@ public MastheadComponent() { div() .add(masthead().display(breakpoints(default_, inline)) .addMain(mastheadMain() + .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo")) - .addToggle(mastheadToggle())) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() @@ -118,7 +120,8 @@ public MastheadComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() @@ -136,7 +139,8 @@ public MastheadComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() @@ -147,11 +151,12 @@ public MastheadComponent() { code("masthead-light"), () -> // @code-start:masthead-light div() - .add(masthead().background(light) + .add(masthead() .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() @@ -162,11 +167,12 @@ public MastheadComponent() { code("masthead-light-200"), () -> // @code-start:masthead-light-200 div() - .add(masthead().background(light200) + .add(masthead() .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() @@ -181,31 +187,29 @@ public MastheadComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .text("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .text("Content"))) .element() // @code-end:masthead-inset )); - addSnippet(new Snippet("masthead-router", "With icon router link", - code("masthead-router"), () -> - // @code-start:masthead-router + addSnippet(new Snippet("masthead-clc", "Custom logo content", + code("masthead-clc"), () -> + // @code-start:masthead-clc div() .add(masthead() - .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() .addLogo(mastheadLogo("/") - .addBrand(brand(pfLogo, "PatternFly") - .style(componentVar(Classes.component(Classes.brand), - Height).name, - "36px"))))) + .html(fromSafeConstant(ResourcesImpl.INSTANCE.pfLogo().getText())) + .style(componentVar(component(brand), Height).name, "36px")))) .addContent(mastheadContent() .text("Content"))) .element() - // @code-end:masthead-router + // @code-end:masthead-clc )); startApiDocs(Masthead.class); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/MenuComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/MenuComponent.java similarity index 86% rename from showcase/common/src/main/java/org/patternfly/showcase/component/MenuComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/MenuComponent.java index d39092c22..b25515b7a 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/MenuComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/MenuComponent.java @@ -15,11 +15,10 @@ */ package org.patternfly.showcase.component; -import java.util.List; import java.util.Random; -import java.util.function.Function; import org.jboss.elemento.router.Route; +import org.patternfly.component.AsyncItems; import org.patternfly.component.menu.Menu; import org.patternfly.component.menu.MenuActionHandler; import org.patternfly.component.menu.MenuContent; @@ -30,7 +29,6 @@ import org.patternfly.component.menu.MenuItemAction; import org.patternfly.component.menu.MenuList; import org.patternfly.component.menu.MenuSearch; -import org.patternfly.component.menu.MenuSearchInput; import org.patternfly.component.menu.MenuType; import org.patternfly.core.Aria; import org.patternfly.showcase.LoremIpsum; @@ -58,14 +56,17 @@ import static org.patternfly.component.menu.MenuItem.menuItem; import static org.patternfly.component.menu.MenuItemAction.menuItemAction; import static org.patternfly.component.menu.MenuList.menuList; +import static org.patternfly.component.menu.MenuSearch.menuSearch; import static org.patternfly.component.menu.MenuType.checkbox; import static org.patternfly.component.menu.MenuType.menu; import static org.patternfly.component.menu.MenuType.select; +import static org.patternfly.component.textinputgroup.SearchInput.searchInput; import static org.patternfly.icon.IconSets.fas.bars; import static org.patternfly.icon.IconSets.fas.clipboard; import static org.patternfly.icon.IconSets.fas.codeBranch; import static org.patternfly.icon.IconSets.fas.cube; import static org.patternfly.icon.IconSets.fas.layerGroup; +import static org.patternfly.icon.IconSets.fas.search; import static org.patternfly.icon.IconSets.fas.table; import static org.patternfly.icon.IconSets.patternfly.bell; import static org.patternfly.showcase.ApiDoc.Type.component; @@ -88,7 +89,7 @@ public MenuComponent() { // @code-start:menu-basic div() .add(menu(menu, click) - .onSingleSelect((e, item, selected) -> console.log("Item " + item.identifier() + " selected")) + .onSingleSelect((e, item, selected) -> console.log("Item " + item.identifier() + " clicked")) .addContent(menuContent() .addList(menuList() .addItem(menuItem("item-0", "Action") @@ -99,7 +100,12 @@ public MenuComponent() { .addItem(menuItem("item-2", "Disabled action") .disabled()) .addItem(linkMenuItem("item-3", "Disabled link", "#item-3") - .disabled())))) + .disabled()) + .addItem(menuItem("item-4", "Aria-disabled action") + .ariaDisabled()) + .addItem(linkMenuItem("item-5", "Aria-disabled link", "#item-5") + .ariaDisabled()) + ))) .element() // @code-end:menu-basic )); @@ -149,10 +155,14 @@ public MenuComponent() { .addList(menuList() .addItem(menuItem("item-0", "Item 1") .description("This is a description") + .onClick((e, item) -> console.log( + "Item " + item.identifier() + " clicked (local)")) .addAction(menuItemAction("action-0", codeBranch()) .aria(Aria.label, "Code") .onClick((e, itemAction) -> console.log( - "Code action clicked")))) + "Action " + itemAction.identifier() + " on item " + + itemAction.menuItem.identifier() + + " clicked (local)")))) .addItem(menuItem("item-1", "Item 2") .description("This is a description") .disabled() @@ -286,7 +296,7 @@ public MenuComponent() { // @code-start:menu-favorites div() .add(menu(menu, click) - .onSingleSelect((e, item, selected) -> console.log("Item " + item.identifier() + " selected")) + .onSingleSelect((e, item, selected) -> console.log("Item " + item.identifier() + " clicked")) .onAction((menu, item, itemAction) -> console.log( "Action " + itemAction.identifier() + " on item " + item.identifier() + " clicked")) .favorites() @@ -298,13 +308,13 @@ public MenuComponent() { .addAction(menuItemAction("action-0", bars()))) .addItem(menuItem("item-1", "Item 2") .onClick((e, item) -> console.log( - "# Item " + item.identifier() + " clicked")) + "Item " + item.identifier() + " clicked (local)")) .description("Description 2") .addAction(menuItemAction("action-1", clipboard()) .onClick((e, itemAction) -> console.log( - "# Action " + itemAction.identifier() + " on item " + "Action " + itemAction.identifier() + " on item " + itemAction.menuItem.identifier() - + " clicked")))) + + " clicked (local)")))) .addItem(menuItem("item-2", "Item 3") .description("Description 3") .addAction(menuItemAction("action-2", bell()))))))) @@ -315,7 +325,17 @@ public MenuComponent() { addSnippet(new Snippet("menu-filter", "Filtering with search input", code("menu-filter"), () -> // @code-start:menu-filter - nyi().element() + div() + .add(menu(menu, click) + .addSearch(menuSearch() + .addSearchInput(searchInput("menu-filter-0").icon(search()))) + .addDivider() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("item-0", "Action 1")) + .addItem(menuItem("item-1", "Action 2")) + .addItem(menuItem("item-2", "Action 3"))))) + .element() // @code-end:menu-filter )); @@ -391,21 +411,21 @@ public MenuComponent() { // @code-end:menu-scrollable-height )); - addSnippet(new Snippet("menu-async", "Basic menu", + addSnippet(new Snippet("menu-async", "With view more", code("menu-async"), () -> { // @code-start:menu-async - Function>> nextNetworkCall = ml -> new Promise<>((res, rej) -> + AsyncItems finalNetworkCall = ml -> new Promise<>((res, rej) -> setTimeout(__ -> res.onInvoke(asList( menuItem("item-20", "Action 4"), menuItem("item-21", "Action 5"), menuItem("item-22", "Final action"))), 1234 + new Random().nextInt(3456))); - Function>> firstNetworkCall = ml -> new Promise<>((res, rej) -> + AsyncItems firstNetworkCall = ml -> new Promise<>((res, rej) -> setTimeout(__ -> res.onInvoke(asList( menuItem("item-10", "Action 2"), menuItem("item-11", "Action 3"), - asyncMenuItem("item-12", "View even more", nextNetworkCall))), + asyncMenuItem("item-12", "View even more", finalNetworkCall))), 1234 + new Random().nextInt(3456))); return div() @@ -424,6 +444,41 @@ public MenuComponent() { // @code-end:menu-async })); + addSnippet(new Snippet("menu-drilldown", "With drilldown", + code("menu-drilldown"), () -> + // @code-start:menu-drilldown + nyi().element() + // @code-end:menu-drilldown + )); + + addSnippet(new Snippet("menu-drilled-in", "Initially drilled-in menu", + code("menu-drilled-in"), () -> + // @code-start:menu-drilled-in + nyi().element() + // @code-end:menu-drilled-in + )); + + addSnippet(new Snippet("menu-drilled-smf", "With drilldown - submenu functions", + code("menu-drilldown-smf"), () -> + // @code-start:menu-drilldown-smf + nyi().element() + // @code-end:menu-drilldown-smf + )); + + addSnippet(new Snippet("menu-drilldown-breadcrumb", "With drilldown breadcrumbs", + code("menu-drilldown-breadcrumb"), () -> + // @code-start:menu-drilldown-breadcrumb + nyi().element() + // @code-end:menu-drilldown-breadcrumb + )); + + addSnippet(new Snippet("menu-drilldown-filter", "With drilldown and inline filter", + code("menu-drilldown-filter"), () -> + // @code-start:menu-drilldown-filter + nyi().element() + // @code-end:menu-drilldown-filter + )); + startApiDocs(Menu.class); addApiDoc(Menu.class, component); addApiDoc(MenuActionHandler.class, handler); @@ -435,7 +490,7 @@ public MenuComponent() { addApiDoc(MenuItemAction.class, subcomponent); addApiDoc(MenuList.class, subcomponent); addApiDoc(MenuSearch.class, subcomponent); - addApiDoc(MenuSearchInput.class, subcomponent); + addApiDoc(MenuSearch.class, subcomponent); addApiDoc(MenuType.class, other); } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/MenuToggleComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/MenuToggleComponent.java similarity index 61% rename from showcase/common/src/main/java/org/patternfly/showcase/component/MenuToggleComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/MenuToggleComponent.java index 45a67aabf..5fe0fa9ea 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/MenuToggleComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/MenuToggleComponent.java @@ -15,28 +15,33 @@ */ package org.patternfly.showcase.component; +import org.jboss.elemento.Id; import org.jboss.elemento.router.Route; import org.patternfly.component.menu.MenuToggle; import org.patternfly.component.menu.MenuToggleAction; -import org.patternfly.component.menu.MenuToggleCheckbox; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; import static org.jboss.elemento.Elements.div; +import static org.patternfly.component.ValidationStatus.error; +import static org.patternfly.component.ValidationStatus.success; +import static org.patternfly.component.ValidationStatus.warning; import static org.patternfly.component.avatar.Avatar.avatar; import static org.patternfly.component.badge.Badge.badge; +import static org.patternfly.component.form.Checkbox.checkbox; import static org.patternfly.component.menu.MenuToggle.menuToggle; import static org.patternfly.component.menu.MenuToggleAction.menuToggleAction; -import static org.patternfly.component.menu.MenuToggleCheckbox.menuToggleCheckbox; import static org.patternfly.component.menu.MenuToggleType.plainText; import static org.patternfly.component.menu.MenuToggleType.split; +import static org.patternfly.component.menu.MenuToggleType.typeahead; +import static org.patternfly.component.textinputgroup.SearchInput.searchInput; import static org.patternfly.icon.IconSets.fas.cog; import static org.patternfly.icon.IconSets.fas.ellipsisV; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.ApiDoc.Type.subcomponent; -import static org.patternfly.showcase.Assets.avatarLight; import static org.patternfly.showcase.Code.code; import static org.patternfly.showcase.Data.components; +import static org.patternfly.showcase.Resources.avatarData; @Route(value = "/components/menus/menu-toggle", title = "Menu toggle") public class MenuToggleComponent extends SnippetPage { @@ -51,15 +56,20 @@ public MenuToggleComponent() { div() .add(menuToggle("Toggle")) .add(" ") - .add(menuToggle("Toggle").primary()) - .add(" ") - .add(menuToggle("Toggle").secondary()) - .add(" ") .add(menuToggle("Toggle").disabled()) .element() // @code-end:menu-toggle-basic )); + addSnippet(new Snippet("menu-toggle-small", "Small toggle", + code("menu-toggle-small"), () -> + // @code-start:menu-toggle-small + div() + .add(menuToggle("Small toggle").small()) + .element() + // @code-end:menu-toggle-small + )); + addSnippet(new Snippet("menu-toggle-badge", "With a badge", code("menu-toggle-badge"), () -> // @code-start:menu-toggle-badge @@ -73,6 +83,10 @@ public MenuToggleComponent() { .add(menuToggle("Count").secondary() .addBadge(badge(4).unread())) .add(" ") + .add(menuToggle(plainText) + .text("Count") + .addBadge(badge(4).unread())) + .add(" ") .add(menuToggle("Count").disabled() .addBadge(badge(4).unread())) .element() @@ -106,19 +120,19 @@ public MenuToggleComponent() { // @code-start:menu-toggle-avatar div() .add(menuToggle() - .addAvatar(avatar(avatarLight, "avatar")) + .addAvatar(avatar(avatarData(), "avatar")) .text("John Doe")) .add(" ") .add(menuToggle().primary() - .addAvatar(avatar(avatarLight, "avatar")) + .addAvatar(avatar(avatarData(), "avatar")) .text("John Doe")) .add(" ") .add(menuToggle().secondary() - .addAvatar(avatar(avatarLight, "avatar")) + .addAvatar(avatar(avatarData(), "avatar")) .text("John Doe")) .add(" ") .add(menuToggle().disabled() - .addAvatar(avatar(avatarLight, "avatar")) + .addAvatar(avatar(avatarData(), "avatar")) .text("John Doe")) .element() // @code-end:menu-toggle-avatar @@ -148,54 +162,45 @@ public MenuToggleComponent() { // @code-end:menu-toggle-plain-text )); - addSnippet(new Snippet("menu-toggle-split-check", "Split button toggle with checkbox", - code("menu-toggle-split-check"), () -> - // @code-start:menu-toggle-split-check + addSnippet(new Snippet("menu-toggle-split-checkbox", "Split toggle with checkbox", + code("menu-toggle-split-checkbox"), () -> + // @code-start:menu-toggle-split-checkbox div() .add(menuToggle(split) - .addCheckbox(menuToggleCheckbox() - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").standalone())) .add(" ") .add(menuToggle(split).primary() - .addCheckbox(menuToggleCheckbox() - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").standalone())) .add(" ") .add(menuToggle(split).secondary() - .addCheckbox(menuToggleCheckbox() - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").standalone())) .add(" ") .add(menuToggle(split).disabled() - .addCheckbox(menuToggleCheckbox() - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").standalone())) .element() - // @code-end:menu-toggle-split-check + // @code-end:menu-toggle-split-checkbox )); - addSnippet(new Snippet("menu-toggle-split-label", "Split button toggle with text label", - code("menu-toggle-split-label"), () -> - // @code-start:menu-toggle-split-label + addSnippet(new Snippet("menu-toggle-split-checkbox-labeled", "Split toggle with labeled checkbox", + code("menu-toggle-split-checkbox-labeled"), () -> + // @code-start:menu-toggle-split-checkbox-labeled div() .add(menuToggle(split) - .addCheckbox(menuToggleCheckbox("10 selected") - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").text("Select all"))) .add(" ") .add(menuToggle(split).primary() - .addCheckbox(menuToggleCheckbox() - .text("10 selected") - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").text("Select all"))) .add(" ") .add(menuToggle(split).secondary() - .addCheckbox(menuToggleCheckbox("10 selected") - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").text("Select all"))) .add(" ") .add(menuToggle(split).disabled() - .addCheckbox(menuToggleCheckbox("10 selected") - .ariaLabel("Select all"))) + .addCheckbox(checkbox(Id.unique("checkbox"), "select-all").text("Select all"))) .element() - // @code-end:menu-toggle-split-label + // @code-end:menu-toggle-split-checkbox-labeled )); - addSnippet(new Snippet("menu-toggle-split-action", "Split button toggle with action", + addSnippet(new Snippet("menu-toggle-split-action", "Split toggle with action", code("menu-toggle-split-action"), () -> // @code-start:menu-toggle-split-action div() @@ -214,9 +219,58 @@ public MenuToggleComponent() { // @code-end:menu-toggle-split-action )); + addSnippet(new Snippet("menu-toggle-full-height", "Full height toggle", + code("menu-toggle-full-height"), () -> + // @code-start:menu-toggle-full-height + div().style("height: 80px;") + .add(menuToggle("Full height").fullHeight()) + .element() + // @code-end:menu-toggle-full-height + )); + + addSnippet(new Snippet("menu-toggle-full-width", "Full width toggle", + code("menu-toggle-full-width"), () -> + // @code-start:menu-toggle-full-width + div() + .add(menuToggle("Full height").fullWidth()) + .element() + // @code-end:menu-toggle-full-width + )); + + addSnippet(new Snippet("menu-toggle-typeahead", "Typeahead toggle", + code("menu-toggle-typeahead"), () -> + // @code-start:menu-toggle-typeahead + div() + .add(menuToggle(typeahead).fullWidth() + .addSearchInput(searchInput("menu-toggle-typeahead-tig").plain())) + .element() + // @code-end:menu-toggle-typeahead + )); + + addSnippet(new Snippet("menu-toggle-status", "Status toggle", + code("menu-toggle-status"), () -> + // @code-start:menu-toggle-status + div() + .add(menuToggle("Success").validated(success)) + .add(" ") + .add(menuToggle("Warning").validated(warning)) + .add(" ") + .add(menuToggle("Danger").validated(error)) + .element() + // @code-end:menu-toggle-status + )); + + addSnippet(new Snippet("menu-toggle-placeholder", "Placeholder text in toggle", + code("menu-toggle-placeholder"), () -> + // @code-start:menu-toggle-placeholder + div() + .add(menuToggle("Placeholder text").placeholder()) + .element() + // @code-end:menu-toggle-placeholder + )); + startApiDocs(MenuToggle.class); addApiDoc(MenuToggle.class, component); addApiDoc(MenuToggleAction.class, subcomponent); - addApiDoc(MenuToggleCheckbox.class, subcomponent); } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ModalComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ModalComponent.java similarity index 98% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ModalComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ModalComponent.java index 98eab99fa..db785e720 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/ModalComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ModalComponent.java @@ -34,10 +34,12 @@ import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.h; import static org.jboss.elemento.Elements.p; import static org.jboss.elemento.Elements.span; import static org.patternfly.component.Severity.warning; import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.content.Content.content; import static org.patternfly.component.form.Form.form; import static org.patternfly.component.form.FormGroup.formGroup; import static org.patternfly.component.form.FormGroupControl.formGroupControl; @@ -71,7 +73,6 @@ import static org.patternfly.showcase.Data.components; import static org.patternfly.showcase.component.NotYetImplemented.nyi; import static org.patternfly.style.Classes.util; -import static org.patternfly.style.Size._2xl; import static org.patternfly.style.Size.lg; import static org.patternfly.style.Size.md; import static org.patternfly.style.Size.sm; @@ -244,12 +245,10 @@ public ModalComponent() { .aria(labelledBy, "modal-custom-header-label") .aria(describedBy, "modal-custom-header-description") .addHeader(modalHeader() - .add(title(1, _2xl) - .id("modal-custom-header-label") - .text("Custom header/footer modal")) - .add(p().css(util("pt-sm")) - .text( - "Allows for custom content in the header and/or footer by passing components."))) + .add(content() + .add(h(1, "Custom header modal").id("modal-custom-header-label")) + .add(p().text( + "Allows for custom content in the header and/or footer by passing components.")))) .addBody(modalBody() .add(span() .id("modal-custom-header-description") diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/NavigationComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/NavigationComponent.java similarity index 81% rename from showcase/common/src/main/java/org/patternfly/showcase/component/NavigationComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/NavigationComponent.java index 946d90239..ee4268422 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/NavigationComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/NavigationComponent.java @@ -29,19 +29,19 @@ import static java.util.stream.Collectors.toList; import static java.util.stream.IntStream.range; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.small; -import static org.jboss.elemento.Elements.strong; import static org.patternfly.component.navigation.ExpandableNavigationGroup.expandableNavigationGroup; import static org.patternfly.component.navigation.Navigation.navigation; import static org.patternfly.component.navigation.NavigationGroup.navigationGroup; import static org.patternfly.component.navigation.NavigationItem.navigationItem; -import static org.patternfly.component.navigation.NavigationLinkText.navigationLinkText; +import static org.patternfly.component.navigation.NavigationType.Horizontal.primary; import static org.patternfly.component.navigation.NavigationType.Horizontal.secondary; import static org.patternfly.component.navigation.NavigationType.Vertical.expandable; import static org.patternfly.component.navigation.NavigationType.Vertical.flat; import static org.patternfly.component.navigation.NavigationType.Vertical.grouped; -import static org.patternfly.icon.IconSets.fas.arrowRight; -import static org.patternfly.icon.IconSets.fas.user; +import static org.patternfly.icon.IconSets.fas.cloud; +import static org.patternfly.icon.IconSets.fas.cube; +import static org.patternfly.icon.IconSets.fas.folder; +import static org.patternfly.icon.IconSets.fas.link; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.ApiDoc.Type.other; import static org.patternfly.showcase.ApiDoc.Type.subcomponent; @@ -144,17 +144,28 @@ public NavigationComponent() { // @code-end:nav-mixed )); - addSnippet(new Snippet("nav-horizontal", "Horizontal", + addSnippet(new Snippet("nav-horizontal", "Horizontal navigation", code("nav-horizontal"), () -> // @code-start:nav-horizontal div().css("ws-react-c-navigation") - .add(navigation(secondary) + .add(navigation(primary) .addItems(range(1, 11).boxed().collect(toList()), index -> - navigationItem("nav-horizontal-" + index, "Horizontal subnav item " + index))) + navigationItem("nav-horizontal-" + index, "Horizontal navigation item " + index))) .element() // @code-end:nav-horizontal )); + addSnippet(new Snippet("nav-horizontal-sub", "Horizontal subnav", + code("nav-horizontal-sub"), () -> + // @code-start:nav-horizontal-sub + div().css("ws-react-c-navigation") + .add(navigation(secondary) + .addItems(range(1, 11).boxed().collect(toList()), index -> + navigationItem("nav-horizontal-sub-" + index, "Horizontal subnav item " + index))) + .element() + // @code-end:nav-horizontal-sub + )); + addSnippet(new Snippet("nav-flyout", "Flyout", code("nav-flyout"), () -> // @code-start:nav-flyout @@ -169,35 +180,29 @@ public NavigationComponent() { // @code-end:nav-drilldown )); - addSnippet(new Snippet("nav-link-text", "Link text", - code("nav-link-text"), () -> - // @code-start:nav-link-text + addSnippet(new Snippet("nav-item-icons", "With item icons", + code("nav-item-icons"), () -> + // @code-start:nav-item-icons div().css("ws-react-c-navigation") .add(navigation(expandable) - .addItem(navigationItem("nav-link-text-0").href("#item-0") - .addLinkText(navigationLinkText() - .add("Link 1 ") - .add(arrowRight()))) - .addGroup(expandableNavigationGroup("nav-link-text-0") - .addLinkText(navigationLinkText() - .add("Link 2 ") - .add(small("(small text)"))) - .addItem(navigationItem("nav-link-text-00").href("#item-00") - .addLinkText(navigationLinkText() - .add(user()) - .add(" Subnav link 1"))) - .addItem(navigationItem("nav-link-text-01").href("#item-01") - .addLinkText(navigationLinkText() - .add(user()) - .add(" Subnav link 2")))) - .addGroup(expandableNavigationGroup("nav-link-text-1") - .addLinkText(navigationLinkText() - .add("Link 3 ") - .add(strong("(strong text)"))) - .addItem(navigationItem("nav-link-text-10", "Subnav link 1", "#item-10")) - .addItem(navigationItem("nav-link-text-11", "Subnav link 2", "#item-11")))) + .addItem(navigationItem("nav-item-icons-0") + .icon(cube()) + .text("Link 1") + .href("#item-0")) + .addItem(navigationItem("nav-item-icons-1") + .icon(folder()) + .text("Link 2") + .href("#item-1")) + .addItem(navigationItem("nav-item-icons-2") + .icon(cloud()) + .text("Link 3") + .href("#item-2")) + .addItem(navigationItem("nav-item-icons-3") + .icon(link()) + .text("Link 4") + .href("#item-3"))) .element() - // @code-end:nav-mixed + // @code-end:nav-item-icons )); startApiDocs(Navigation.class); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/NotYetImplemented.java b/showcase/src/main/java/org/patternfly/showcase/component/NotYetImplemented.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/NotYetImplemented.java rename to showcase/src/main/java/org/patternfly/showcase/component/NotYetImplemented.java diff --git a/showcase/src/main/java/org/patternfly/showcase/component/NotificationBadgeComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/NotificationBadgeComponent.java new file mode 100644 index 000000000..350954530 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/NotificationBadgeComponent.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.notification.NotificationBadge; +import org.patternfly.core.ObservableValue; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.notification.NotificationBadge.notificationBadge; +import static org.patternfly.core.ObservableValue.ov; +import static org.patternfly.layout.flex.Flex.flex; +import static org.patternfly.layout.flex.Gap.sm; +import static org.patternfly.layout.stack.Stack.stack; +import static org.patternfly.layout.stack.StackItem.stackItem; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; + +@Route(value = "/components/notification-badge", title = "Notification badge") +public class NotificationBadgeComponent extends SnippetPage { + + public NotificationBadgeComponent() { + super(components.get("notification-badge")); + + startExamples( + "Basic notification badges showing read, unread, and attention variants, plus expanded state. The count example shows how to supply a numeric indicator."); + + addSnippet(new Snippet("notification-badge-basic", "Basic", code("notification-badge-basic"), () -> + // @code-start:notification-badge-basic + flex().columnGap(sm) + .add(notificationBadge().ariaLabel("Notifications")) + .add(notificationBadge().ariaLabel("Unread notifications") + .unread()) + .add(notificationBadge().ariaLabel("Attention notifications") + .attention()) + .element() + // @code-end:notification-badge-basic + )); + + addSnippet(new Snippet("notification-badge-with-count", "With count", + code("notification-badge-with-count"), () -> + // @code-start:notification-badge-with-count + flex().columnGap(sm) + .add(notificationBadge().ariaLabel("10 read notifications").count(10)) + .add(notificationBadge().ariaLabel("10 unread notifications").unread().count(10)) + .add(notificationBadge().ariaLabel("10 attention notifications").attention().count(10)) + .element() + // @code-end:notification-badge-with-count + )); + + addSnippet(new Snippet("notification-badge-with-animation", "With animation", + code("notification-badge-with-count"), () -> { + // @code-start:notification-badge-with-count + ObservableValue readValue = ov(10); + NotificationBadge readBadge = notificationBadge().ariaLabel("10 read notifications").bind(readValue); + readValue.subscribe((current, __) -> readBadge.ariaLabel(current + " read notifications")); + + ObservableValue unreadValue = ov(10); + NotificationBadge unreadBadge = notificationBadge().ariaLabel("10 unread notifications") + .bind(unreadValue) + .unread(); + unreadValue.subscribe((current, __) -> unreadBadge.ariaLabel(current + " unread notifications")); + + ObservableValue attentionValue = ov(10); + NotificationBadge attentionBadge = notificationBadge().ariaLabel("10 attention notifications") + .bind(attentionValue) + .attention(); + attentionValue.subscribe((current, __) -> attentionBadge.ariaLabel(current + " attention notifications")); + + return stack().gutter() + .addItem(stackItem() + .add(flex().columnGap(sm) + .add(readBadge) + .add(unreadBadge) + .add(attentionBadge))) + .addItem(stackItem() + .add(button("Add notification").primary() + .onClick((event, button) -> { + readValue.set(readValue.get() + 1); + readBadge.triggerNotification(); + unreadValue.set(unreadValue.get() + 1); + unreadBadge.triggerNotification(); + attentionValue.set(attentionValue.get() + 1); + attentionBadge.triggerNotification(); + }))) + .element(); + // @code-end:notification-badge-with-count + })); + + startApiDocs(NotificationBadge.class); + addApiDoc(NotificationBadge.class, component); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/component/NotificationDrawerComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/NotificationDrawerComponent.java new file mode 100644 index 000000000..5e84c8b50 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/NotificationDrawerComponent.java @@ -0,0 +1,121 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.notification.NotificationDrawer; +import org.patternfly.component.notification.NotificationDrawerBody; +import org.patternfly.component.notification.NotificationDrawerHeader; +import org.patternfly.component.notification.NotificationDrawerItem; +import org.patternfly.component.notification.NotificationDrawerItemBody; +import org.patternfly.component.notification.NotificationDrawerList; +import org.patternfly.showcase.LoremIpsum; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.patternfly.component.Severity.custom; +import static org.patternfly.component.Severity.danger; +import static org.patternfly.component.Severity.info; +import static org.patternfly.component.Severity.success; +import static org.patternfly.component.Severity.warning; +import static org.patternfly.component.menu.Dropdown.dropdown; +import static org.patternfly.component.menu.DropdownMenu.dropdownMenu; +import static org.patternfly.component.menu.MenuContent.menuContent; +import static org.patternfly.component.menu.MenuItem.linkMenuItem; +import static org.patternfly.component.menu.MenuItem.menuItem; +import static org.patternfly.component.menu.MenuList.menuList; +import static org.patternfly.component.notification.NotificationDrawer.notificationDrawer; +import static org.patternfly.component.notification.NotificationDrawerBody.notificationDrawerBody; +import static org.patternfly.component.notification.NotificationDrawerHeader.notificationDrawerHeader; +import static org.patternfly.component.notification.NotificationDrawerItem.notificationDrawerItem; +import static org.patternfly.component.notification.NotificationDrawerItemBody.notificationDrawerItemBody; +import static org.patternfly.component.notification.NotificationDrawerList.notificationDrawerList; +import static org.patternfly.icon.IconSets.fas.ellipsisV; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.subcomponent; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; + +@Route(value = "/components/notification-drawer", title = "Notification drawer") +public class NotificationDrawerComponent extends SnippetPage { + + public NotificationDrawerComponent() { + super(components.get("notification-drawer")); + + startExamples(); + addSnippet(new Snippet("notification-drawer-basic", "Basic", code("notification-drawer-basic"), () -> + // @code-start:notification-drawer-basic + notificationDrawer() + .addHeader(notificationDrawerHeader() + .status("2 unread") + .addAction(dropdown(ellipsisV(), "kebab dropdown toggle") + .addMenu(dropdownMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("item-0", "Action")) + .addItem(linkMenuItem("item-1", "Link", "#item-1")) + .addItem(menuItem("item-2", "Disabled action") + .disabled()) + .addItem(linkMenuItem("item-3", "Disabled link", "#item-3") + .disabled()) + .addDivider() + .addItem(menuItem("item-4", "Separated action")) + .addItem(linkMenuItem("item-5", "Separated link", + "#item-5"))))))) + .addBody(notificationDrawerBody() + .addList(notificationDrawerList() + .addItem(notificationDrawerItem(info, "Unread info notification title") + .addBody(notificationDrawerItemBody( + "This is an info notification description.")) + .hoverable() + .timestamp("5 minutes ago")) + .addItem(notificationDrawerItem(danger, + "Unread danger notification title " + LoremIpsum.words(20)) + .addBody(notificationDrawerItemBody(LoremIpsum.paragraphs(5))) + .hoverable() + .timestamp("10 minutes ago")) + .addItem(notificationDrawerItem(warning, "Read warning notification title") + .addBody(notificationDrawerItemBody( + "This is a warning notification description.")) + .read() + .hoverable() + .timestamp("20 minutes ago")) + .addItem(notificationDrawerItem(success, + "Success notification:Read success notification title") + .addBody(notificationDrawerItemBody( + "This is a success notification description.")) + .read() + .hoverable() + .timestamp("30 minutes ago")) + .addItem(notificationDrawerItem(custom, "Read (default) notification title") + .addBody(notificationDrawerItemBody( + "This is a default notification description.")) + .read() + .hoverable() + .timestamp("35 minutes ago")))) + .element() + // @code-end:notification-drawer-basic + )); + + startApiDocs(NotificationDrawer.class); + addApiDoc(NotificationDrawer.class, component); + addApiDoc(NotificationDrawerHeader.class, subcomponent); + addApiDoc(NotificationDrawerBody.class, subcomponent); + addApiDoc(NotificationDrawerList.class, subcomponent); + addApiDoc(NotificationDrawerItem.class, subcomponent); + addApiDoc(NotificationDrawerItemBody.class, subcomponent); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/component/NumberInputComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/NumberInputComponent.java new file mode 100644 index 000000000..92c26120a --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/NumberInputComponent.java @@ -0,0 +1,173 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.numberinput.NumberInput; +import org.patternfly.component.numberinput.UnitPosition; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static elemental2.dom.DomGlobal.console; +import static org.jboss.elemento.Elements.br; +import static org.jboss.elemento.Elements.div; +import static org.patternfly.component.ValidationStatus.error; +import static org.patternfly.component.ValidationStatus.success; +import static org.patternfly.component.ValidationStatus.warning; +import static org.patternfly.component.numberinput.NumberInput.numberInput; +import static org.patternfly.component.numberinput.UnitPosition.before; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.other; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; + +@Route(value = "/components/number-input", title = "Number input") +public class NumberInputComponent extends SnippetPage { + + public NumberInputComponent() { + super(components.get("number-input")); + + startExamples(); + + // Default + addSnippet(new Snippet("number-input-default", "Default", + code("number-input-default"), () -> + // @code-start:number-input-default + div() + .add(numberInput(90).onBlur((e, c, v) -> { + console.log("blur"); + }).onChange((e, c, v) -> { + console.log("change"); + })) + .element() + // @code-end:number-input-default + )); + + // With unit + addSnippet(new Snippet("number-input-with-unit", "With unit", + code("number-input-with-unit"), () -> + // @code-start:number-input-with-unit + div() + .add(numberInput(90) + .unit("%")) + .add(br()) + .add(br()) + .add(numberInput(90) + .unit("$", before)) + .element() + // @code-end:number-input-with-unit + )); + + // With unit and thresholds + addSnippet(new Snippet("number-input-with-unit-and-thresholds", "With unit and thresholds", + "To enable a user entered value to snap to the nearest threshold if the entered input is out of bounds, define the blur event handler", + code("number-input-with-unit-and-thresholds"), () -> { + // @code-start:number-input-with-unit-and-thresholds + + NumberInput numberInput = numberInput(0) + .min(0) + .max(10) + .unit("%"); + + return div() + .add(" With a minimum value of 0 and maximum value of 10") + .add(br()) + .add(numberInput) + .element(); + // @code-end:number-input-with-unit-and-thresholds + })); + + // Disabled + addSnippet(new Snippet("number-input-disabled", "Disabled", + code("number-input-disabled"), () -> + // @code-start:number-input-disabled + div() + .add(numberInput(100) + .disabled(true)) + .element() + // @code-end:number-input-disabled + )); + + // With status + addSnippet(new Snippet("number-input-with-status", "With status", + code("number-input-with-status"), () -> { + // @code-start:number-input-with-status + NumberInput statusInput = numberInput(5) + .validated(success) + .onChange((e, component, value) -> { + double distance = Math.abs(value - 5); + if (distance == 0) { + component.validated(success); + } else if (distance <= 2) { + component.validated(warning); + } else { + component.validated(error); + } + }); + return div() + .add(statusInput) + .element(); + // @code-end:number-input-with-status + })); + + // Varying sizes + addSnippet(new Snippet("number-input-varying-sizes", "Varying sizes", + code("number-input-varying-sizes"), () -> + // @code-start:number-input-varying-sizes + div() + .add(numberInput(1).widthChars(1)) + .add(br()) + .add(br()) + .add(numberInput(1234567890).widthChars(10)) + .add(br()) + .add(br()) + .add(numberInput(5).widthChars(5)) + .add(br()) + .add(br()) + .add(numberInput(12345).widthChars(5)) + .element() + // @code-end:number-input-varying-sizes + )); + + // Custom increment/decrement + addSnippet(new Snippet("number-input-custom-increment-decrement", "Custom increment/decrement", + code("number-input-custom-increment-decrement"), () -> + // @code-start:number-input-custom-increment-decrement + div() + .add(numberInput(90).step(3)) + .element() + // @code-end:number-input-custom-increment-decrement + )); + + // Custom increment/decrement and thresholds + addSnippet(new Snippet("number-input-custom-increment-decrement-thresholds", + "Custom increment/decrement and thresholds", + code("number-input-custom-increment-decrement-thresholds"), () -> + // @code-start:number-input-custom-increment-decrement-thresholds + div() + .add(numberInput(90) + .min(90) + .max(100) + .step(3)) + .element() + // @code-end:number-input-custom-increment-decrement-thresholds + )); + + startApiDocs(NumberInput.class); + addApiDoc(NumberInput.class, component); + addApiDoc(UnitPosition.class, other); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/PageComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/PageComponent.java similarity index 67% rename from showcase/common/src/main/java/org/patternfly/showcase/component/PageComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/PageComponent.java index 4a0b4d36e..ff29489ec 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/PageComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/PageComponent.java @@ -17,20 +17,22 @@ import org.jboss.elemento.Elements; import org.jboss.elemento.router.Route; +import org.patternfly.component.navigation.Navigation; import org.patternfly.component.page.Page; +import org.patternfly.component.page.PageBreadcrumb; +import org.patternfly.component.page.PageGroup; import org.patternfly.component.page.PageMain; -import org.patternfly.component.page.PageMainBody; -import org.patternfly.component.page.PageMainBreadcrumb; -import org.patternfly.component.page.PageMainGroup; -import org.patternfly.component.page.PageMainNavigation; -import org.patternfly.component.page.PageMainSection; -import org.patternfly.component.page.PageMainTabs; -import org.patternfly.component.page.PageMainWizard; +import org.patternfly.component.page.PageNavigation; import org.patternfly.component.page.PageSection; import org.patternfly.component.page.PageSectionBuilder; +import org.patternfly.component.page.PageSectionLike; +import org.patternfly.component.page.PageTabs; +import org.patternfly.component.page.PageWizard; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; +import static java.util.stream.Collectors.toList; +import static java.util.stream.IntStream.range; import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; import static org.patternfly.component.breadcrumb.Breadcrumb.breadcrumb; @@ -39,19 +41,20 @@ import static org.patternfly.component.card.CardBody.cardBody; import static org.patternfly.component.navigation.Navigation.navigation; import static org.patternfly.component.navigation.NavigationItem.navigationItem; -import static org.patternfly.component.navigation.NavigationType.Horizontal.tertiary; +import static org.patternfly.component.navigation.NavigationType.Horizontal.primary; +import static org.patternfly.component.navigation.NavigationType.Horizontal.secondary; import static org.patternfly.component.page.Masthead.masthead; import static org.patternfly.component.page.MastheadBrand.mastheadBrand; import static org.patternfly.component.page.MastheadContent.mastheadContent; +import static org.patternfly.component.page.MastheadLogo.mastheadLogo; import static org.patternfly.component.page.MastheadMain.mastheadMain; import static org.patternfly.component.page.MastheadToggle.mastheadToggle; import static org.patternfly.component.page.Page.page; +import static org.patternfly.component.page.PageBreadcrumb.pageBreadcrumb; +import static org.patternfly.component.page.PageGroup.pageGroup; import static org.patternfly.component.page.PageMain.pageMain; -import static org.patternfly.component.page.PageMainBody.pageMainBody; -import static org.patternfly.component.page.PageMainBreadcrumb.pageMainBreadcrumb; -import static org.patternfly.component.page.PageMainGroup.pageMainGroup; -import static org.patternfly.component.page.PageMainNavigation.pageMainNavigation; -import static org.patternfly.component.page.PageMainSection.pageMainSection; +import static org.patternfly.component.page.PageNavigation.pageNavigation; +import static org.patternfly.component.page.PageSection.pageSection; import static org.patternfly.component.page.PageSidebar.pageSidebar; import static org.patternfly.component.page.PageSidebarBody.pageSidebarBody; import static org.patternfly.component.toolbar.Toolbar.toolbar; @@ -65,9 +68,6 @@ import static org.patternfly.style.Breakpoint.default_; import static org.patternfly.style.Breakpoint.md; import static org.patternfly.style.Breakpoints.breakpoints; -import static org.patternfly.style.Brightness.dark100; -import static org.patternfly.style.Brightness.dark200; -import static org.patternfly.style.Brightness.light; import static org.patternfly.style.Classes.component; import static org.patternfly.style.Classes.page; import static org.patternfly.style.Classes.section; @@ -92,19 +92,19 @@ public PageComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .add("Logo"))) - .addContent(mastheadContent() - .add("Header tools"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) + .addContent(mastheadContent().text("Header tools"))) .addSidebar(pageSidebar().keepExpanded() .addBody(pageSidebarBody() .add("Navigation"))) .addMain(pageMain("page-vertical-nav-main") - .addSection(pageMainSection().background(dark100) - .text("Section with darker background")) - .addSection(pageMainSection().background(dark200) - .text("Section with dark background")) - .addSection(pageMainSection().background(light) - .text("Section with light background")))) + .addSection(pageSection() + .text("Section 1")) + .addSection(pageSection().secondary() + .text("Section 2 with secondary styling")) + .addSection(pageSection() + .text("Section 3")))) .element() // @code-end:page-vertical-nav )); @@ -118,54 +118,60 @@ public PageComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .add("Logo"))) - .addContent(mastheadContent() - .add("Header tools"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) + .addContent(mastheadContent().text("Header tools"))) .addSidebar(pageSidebar().keepExpanded() + .addBody(pageSidebarBody().contextSelector() + .add("First sidebar body (for a context selector/perspective switcher)")) .addBody(pageSidebarBody().pageInsets() - .add("First sidebar body (with insets)")) + .add("Second sidebar body (with insets)")) .addBody(pageSidebarBody().fill() - .add("Second sidebar body (with fill)")) + .add("Third sidebar body (with fill)")) .addBody(pageSidebarBody().pageInsets().noFill() - .add("Third sidebar body (with insets and no fill)"))) + .add("Fourth sidebar body (with insets and no fill)"))) .addMain(pageMain("page-sidebar-body-main") - .addSection(pageMainSection().background(dark100) - .text("Section with darker background")) - .addSection(pageMainSection().background(dark200) - .text("Section with dark background")) - .addSection(pageMainSection().background(light) - .text("Section with light background")))) + .addSection(pageSection() + .text("Section 1")) + .addSection(pageSection().secondary() + .text("Section 2 with secondary styling")) + .addSection(pageSection() + .text("Section 3")))) .element() // @code-end:page-sidebar-body )); addSnippet(new Snippet("page-horizontal-nav", "Horizontal navigation", - code("page-horizontal-nav"), () -> - // @code-start:page-horizontal-nav - div() - .add(page(true) - .addMasthead(masthead() - .addMain(mastheadMain() - .addToggle(mastheadToggle()) - .addBrand(mastheadBrand() - .add("Logo"))) - .addContent(mastheadContent() - .addToolbar(toolbar() - .addContent(toolbarContent() - .addItem(toolbarItem("page-horizontal-nav-0") - .add("Navigation")) - .addItem(toolbarItem("page-horizontal-nav-1") - .add("Header tools")))))) - .addMain(pageMain("page-horizontal-nav-main") - .addSection(pageMainSection().background(dark100) - .text("Section with darker background")) - .addSection(pageMainSection().background(dark200) - .text("Section with dark background")) - .addSection(pageMainSection().background(light) - .text("Section with light background")))) - .element() - // @code-end:page-horizontal-nav - )); + code("page-horizontal-nav"), () -> { + // @code-start:page-horizontal-nav + Navigation navigation = navigation(primary) + .addItems(range(1, 5).boxed().collect(toList()), index -> + navigationItem("page-horizontal-nav-ni-" + index, "Navigation item " + index)); + return div() + .add(page(true) + .addMasthead(masthead() + .addMain(mastheadMain() + .addBrand(mastheadBrand() + .addLogo(mastheadLogo("#") + .add("Logo")))) + .addContent(mastheadContent() + .addToolbar(toolbar() + .addContent(toolbarContent() + .addItem(toolbarItem("page-horizontal-nav-ti-0") + .overflow() + .add(navigation)) + .addItem(toolbarItem("page-horizontal-nav-ti-1") + .add("Header tools")))))) + .addMain(pageMain("page-horizontal-nav-main") + .addSection(pageSection() + .text("Section 1")) + .addSection(pageSection().secondary() + .text("Section 2 with secondary styling")) + .addSection(pageSection() + .text("Section 3")))) + .element(); + })); + // @code-end:page-horizontal-nav addSnippet(new Snippet("page-filled-sections", "Filled page sections", code("page-filled-sections"), () -> @@ -176,20 +182,19 @@ public PageComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .add("Logo"))) - .addContent(mastheadContent() - .add("Header tools"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) + .addContent(mastheadContent().text("Header tools"))) .addSidebar(pageSidebar().keepExpanded() .addBody(pageSidebarBody() .add("Navigation"))) - .addMain(pageMain("page-filled-sections-main") - .addSection(pageMainSection() - .text("A default page section")) - .addSection(pageMainSection().fill() - .text("This section fills the available space.")) - .addSection(pageMainSection().noFill() - .text( - "This section is set to not fill the available space, since the last page section is set to fill the available space by default.")))) + .addMain(pageMain("page-filled-sections-main").fill() + .addSection(pageSection() + .text("Section without fill")) + .addSection(pageSection().secondary().fill() + .text("Section with fill")) + .addSection(pageSection() + .text("Section without fill")))) .element() // @code-end:page-filled-sections )); @@ -203,24 +208,25 @@ public PageComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .add("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .add("Header tools"))) .addSidebar(pageSidebar().keepExpanded() .addBody(pageSidebarBody() .add("Navigation"))) .addMain(pageMain("page-section-padding-main") - .addSection(pageMainSection() + .addSection(pageSection() .text("Section with default padding")) - .addSection(pageMainSection().background(light) + .addSection(pageSection() .padding(breakpoints(default_, noPadding)) .text("Section with no padding")) - .addSection(pageMainSection() + .addSection(pageSection() .padding(breakpoints( default_, noPadding, md, padding)) .text("Section with padding on medium")) - .addSection(pageMainSection().background(light) + .addSection(pageSection() .padding(breakpoints(md, noPadding)) .text("Section with no padding on medium")))) .element() @@ -236,16 +242,17 @@ public PageComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .add("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .add("Header tools"))) .addSidebar(pageSidebar().keepExpanded() .addBody(pageSidebarBody() .add("Navigation"))) .addMain(pageMain("page-group-main") - .addGroup(pageMainGroup() - .addSection(pageMainNavigation() - .addNavigation(navigation(tertiary) + .addGroup(pageGroup() + .addSection(pageNavigation() + .addNavigation(navigation(secondary) .addItem(navigationItem("page-group-ni-0", "System panel", "#")) .addItem(navigationItem("page-group-ni-1", "Policy", "#")) .addItem(navigationItem("page-group-ni-2", "Authentication", @@ -253,18 +260,18 @@ public PageComponent() { .addItem(navigationItem("page-group-ni-3", "Network services", "#")) .addItem(navigationItem("page-group-ni-4", "Server", "#")))) - .addSection(pageMainBreadcrumb() + .addSection(pageBreadcrumb() .addBreadcrumb(breadcrumb() .addItem(breadcrumbItem("page-group-0", "Section home")) .addItem(breadcrumbItem("page-group-1", "Section title", "#")) .addItem(breadcrumbItem("page-group-2", "Section title", "#")) .addItem(breadcrumbItem("page-group-3", "Section landing", "#").active()))) - .addSection(pageMainSection().background(light) + .addSection(pageSection() .text("Grouped section"))) - .addSection(pageMainSection().background(dark200) + .addSection(pageSection() .text("Section 1")) - .addSection(pageMainSection().background(dark200) + .addSection(pageSection() .text("Section 2")))) .element() // @code-end:page-group @@ -279,26 +286,26 @@ public PageComponent() { .addMain(mastheadMain() .addToggle(mastheadToggle()) .addBrand(mastheadBrand() - .add("Logo"))) + .addLogo(mastheadLogo("#") + .add("Logo")))) .addContent(mastheadContent() .add("Header tools"))) .addSidebar(pageSidebar().keepExpanded() .addBody(pageSidebarBody() .add("Navigation"))) .addMain(pageMain("page-centered-main") - .addSection(pageMainSection().limitWidth().centerAligned() - .addBody(pageMainBody() - .add(card() - .addBody(cardBody() - .add("When a width limited page section is wider than the value of ") - .add(Elements.code(componentVar(component(page), - section, - "m-limit-width", - MaxWidth).name)) - .add(" the section will be centered in the main section.") - .add(br()) - .add(br()) - .add("The content in this example is placed in a card to better illustrate how the section behaves when it is centered. A card is not required to center a page section."))))))) + .addSection(pageSection().limitWidth().centerAligned() + .add(card() + .addBody(cardBody() + .add("When a width limited page section is wider than the value of ") + .add(Elements.code(componentVar(component(page), + section, + "m-limit-width", + MaxWidth).name)) + .add(" the section will be centered in the main section.") + .add(br()) + .add(br()) + .add("The content in this example is placed in a card to better illustrate how the section behaves when it is centered. A card is not required to center a page section.")))))) .element() // @code-end:page-centered )); @@ -306,14 +313,13 @@ public PageComponent() { startApiDocs(Page.class); addApiDoc(Page.class, component); addApiDoc(PageMain.class, subcomponent); - addApiDoc(PageMainBody.class, subcomponent); - addApiDoc(PageMainBreadcrumb.class, subcomponent); - addApiDoc(PageMainGroup.class, subcomponent); - addApiDoc(PageMainNavigation.class, subcomponent); - addApiDoc(PageMainSection.class, subcomponent); - addApiDoc(PageMainTabs.class, subcomponent); - addApiDoc(PageMainWizard.class, subcomponent); + addApiDoc(PageBreadcrumb.class, subcomponent); + addApiDoc(PageGroup.class, subcomponent); + addApiDoc(PageNavigation.class, subcomponent); addApiDoc(PageSection.class, subcomponent); + addApiDoc(PageTabs.class, subcomponent); + addApiDoc(PageWizard.class, subcomponent); + addApiDoc(PageSectionLike.class, subcomponent); addApiDoc(PageSectionBuilder.class, other); } } diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/PanelComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/PanelComponent.java similarity index 94% rename from showcase/common/src/main/java/org/patternfly/showcase/component/PanelComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/PanelComponent.java index f1e50728c..58ac1365a 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/PanelComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/PanelComponent.java @@ -80,6 +80,15 @@ public PanelComponent() { // @code-end:panel-header-footer )); + addSnippet(new Snippet("panel-no-body", "No body", + code("panel-no-body"), () -> + // @code-start:panel-no-body + panel() + .addMain(panelMain().apply( main -> main.textContent = "Main content")) + .element() + // @code-end:panel-no-body + )); + addSnippet(new Snippet("panel-raised", "Raised", code("panel-raised"), () -> // @code-start:panel-raised diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/PopoverComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/PopoverComponent.java similarity index 66% rename from showcase/common/src/main/java/org/patternfly/showcase/component/PopoverComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/PopoverComponent.java index 0eab1dbc7..980f1ab0f 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/PopoverComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/PopoverComponent.java @@ -18,6 +18,7 @@ import org.jboss.elemento.By; import org.jboss.elemento.Elements; import org.jboss.elemento.router.Route; +import org.patternfly.component.Severity; import org.patternfly.component.button.Button; import org.patternfly.component.popover.Popover; import org.patternfly.component.popover.PopoverBody; @@ -31,13 +32,9 @@ import static org.jboss.elemento.Elements.div; import static org.jboss.elemento.Elements.onAttach; -import static org.patternfly.component.Severity.custom; -import static org.patternfly.component.Severity.danger; -import static org.patternfly.component.Severity.info; -import static org.patternfly.component.Severity.success; -import static org.patternfly.component.Severity.warning; import static org.patternfly.component.button.Button.button; import static org.patternfly.component.list.ActionList.actionList; +import static org.patternfly.component.list.ActionListGroup.actionListGroup; import static org.patternfly.component.list.ActionListItem.actionListItem; import static org.patternfly.component.popover.Popover.popover; import static org.patternfly.component.popover.PopoverBody.popoverBody; @@ -57,19 +54,21 @@ public PopoverComponent() { startExamples(); addSnippet(new Snippet("popover-basic", "Basic", - code("popover-basic"), () -> - // @code-start:popover-basic - div().style("margin", "50px") - .add(button("Toggle popover").primary() - .id("popover-basic-button")) - .add(popover(By.id("popover-basic-button")) - .ariaLabel("Basic popover") - .addHeader("Popover header") - .addBody("Popovers are triggered by click rather than hover.") - .addFooter("Popover footer")) - .element() - // @code-end:popover-basic - )); + code("popover-basic"), () -> { + // @code-start:popover-basic + popover(By.id("popover-basic-button")) + .ariaLabel("Basic popover") + .addHeader("Popover header") + .addBody("Popovers are triggered by click rather than hover.") + .addFooter("Popover footer") + .appendToBody(); + + return div().style("margin", "50px") + .add(button("Toggle popover").primary() + .id("popover-basic-button")) + .element(); + // @code-end:popover-basic + })); addSnippet(new Snippet("popover-hoverable", "Hoverable", code("popover-hoverable"), () -> { @@ -192,53 +191,32 @@ public PopoverComponent() { })); addSnippet(new Snippet("popover-alert", "Alert popover", - code("popover-alert"), () -> - // @code-start:popover-alert - div().style("margin", "50px") - .add(actionList() - .addItem(actionListItem() - .add(button("Custom").primary() - .id("popover-alert-custom")) - .add(popover(By.id("popover-alert-custom")) - .severity(custom) - .addHeader("Custom popover title") - .addBody(LoremIpsum.words(20)) - .addFooter("Popover footer"))) - .addItem(actionListItem() - .add(button("Info").secondary() - .id("popover-alert-info")) - .add(popover(By.id("popover-alert-info")) - .severity(info) - .addHeader("Info popover title") - .addBody(LoremIpsum.words(20)) - .addFooter("Popover footer"))) - .addItem(actionListItem() - .add(button("Success").tertiary() - .id("popover-alert-success")) - .add(popover(By.id("popover-alert-success")) - .severity(success) - .addHeader("Success popover title") - .addBody(LoremIpsum.words(20)) - .addFooter("Popover footer"))) - .addItem(actionListItem() - .add(button("Warning").warning() - .id("popover-alert-warning")) - .add(popover(By.id("popover-alert-warning")) - .severity(warning) - .addHeader("Warning popover title") - .addBody(LoremIpsum.words(20)) - .addFooter("Popover footer"))) - .addItem(actionListItem() - .add(button("Danger").danger() - .id("popover-alert-danger")) - .add(popover(By.id("popover-alert-danger")) - .severity(danger) - .addHeader("Danger popover title") - .addBody(LoremIpsum.words(20)) - .addFooter("Popover footer")))) - .element() - // @code-end:popover-alert - )); + code("popover-alert"), () -> { + // @code-start:popover-alert + for (Severity severity : Severity.values()) { + popover(By.id("popover-alert-" + severity.name())) + .status(severity) + .addHeader("Popover " + severity.name() + " header") + .addBody(LoremIpsum.words(20)) + .addFooter("Popover footer") + .appendToBody(); + } + return div().style("margin", "50px") + .add(actionList() + .addItem(actionListGroup() + .addItem(actionListItem() + .add(button("Custom").secondary().id("popover-alert-custom"))) + .addItem(actionListItem() + .add(button("Info").secondary().id("popover-alert-info"))) + .addItem(actionListItem() + .add(button("Success").secondary().id("popover-alert-success"))) + .addItem(actionListItem() + .add(button("Warning").warning().id("popover-alert-warning"))) + .addItem(actionListItem() + .add(button("Danger").danger().id("popover-alert-danger"))))) + .element(); + // @code-end:popover-alert + })); startApiDocs(Popover.class); addApiDoc(Popover.class, component); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ProgressComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ProgressComponent.java similarity index 99% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ProgressComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ProgressComponent.java index ad4975ec6..caa4dc50c 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/ProgressComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ProgressComponent.java @@ -97,7 +97,8 @@ public ProgressComponent() { code("progress-outside"), () -> // @code-start:progress-outside div() - .add(progress().measureLocation(outside) + .add(progress() + .measureLocation(outside) .title("Title") .value(33)) .element() diff --git a/showcase/src/main/java/org/patternfly/showcase/component/ProgressStepperComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ProgressStepperComponent.java new file mode 100644 index 000000000..a8bb71d01 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/ProgressStepperComponent.java @@ -0,0 +1,355 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import java.util.function.Consumer; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.button.Button; +import org.patternfly.component.progressstepper.ProgressStep; +import org.patternfly.component.progressstepper.ProgressStepVariant; +import org.patternfly.component.progressstepper.ProgressStepper; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.jboss.elemento.Elements.br; +import static org.jboss.elemento.Elements.div; +import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.form.Checkbox.checkbox; +import static org.patternfly.component.popover.Popover.popover; +import static org.patternfly.component.progressstepper.ProgressStep.progressStep; +import static org.patternfly.component.progressstepper.ProgressStepVariant.danger; +import static org.patternfly.component.progressstepper.ProgressStepVariant.info; +import static org.patternfly.component.progressstepper.ProgressStepVariant.pending; +import static org.patternfly.component.progressstepper.ProgressStepVariant.success; +import static org.patternfly.component.progressstepper.ProgressStepVariant.warning; +import static org.patternfly.component.progressstepper.ProgressStepper.progressStepper; +import static org.patternfly.icon.IconSets.fas.checkDouble; +import static org.patternfly.icon.IconSets.fas.clock; +import static org.patternfly.icon.IconSets.patternfly.pending; +import static org.patternfly.popper.Placement.right; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.other; +import static org.patternfly.showcase.ApiDoc.Type.subcomponent; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; +import static org.patternfly.style.Classes.label; + +@Route(value = "/components/progress-stepper", title = "Progress stepper") +public class ProgressStepperComponent extends SnippetPage { + + public ProgressStepperComponent() { + super(components.get("progress-stepper")); + + startExamples(); + addSnippet(new Snippet("progress-stepper-basic", "Basic", + code("progress-stepper-basic"), () -> + // @code-start:progress-stepper-basic + div() + .add(progressStepper() + .ariaLabel("Basic progress stepper") + .add(progressStep("step-1", "First step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("step-2", "Second step") + .ariaLabel("step with info") + .variant(info)) + .add(progressStep("step-3", "Third step") + .ariaLabel("pending step") + .variant(pending)) + .first().next()) + .element() + // @code-end:progress-stepper-basic + )); + + addSnippet(new Snippet("progress-stepper-descriptions", "With step descriptions", + code("progress-stepper-descriptions"), () -> + // @code-start:progress-stepper-descriptions + div() + .add(progressStepper() + .ariaLabel("Basic progress stepper with description") + .add(progressStep("desc-step-1", "First step") + .ariaLabel("completed step, step with success") + .variant(success) + .description("This is the first thing to happen")) + .add(progressStep("desc-step-2", "Second step") + .ariaLabel("step with info") + .variant(info) + .description("This is the second thing to happen")) + .add(progressStep("desc-step-3", "Third step") + .ariaLabel("pending step") + .variant(pending) + .description("This is the last thing to happen")) + .first().next()) + .element() + // @code-end:progress-stepper-descriptions + )); + + addSnippet(new Snippet("progress-stepper-alignment", "With alignment", + code("progress-stepper-alignment"), () -> { + // @code-start:progress-stepper-alignment + ProgressStepper stepper = progressStepper() + .ariaLabel("Progress stepper with alignment") + .add(progressStep("align-step-1", "First step") + .variant(success) + .ariaLabel("completed step, step with success") + .description("This is the first thing to happen")) + .add(progressStep("align-step-2", "Second step") + .variant(info) + .ariaLabel("step with info") + .description("This is the second thing to happen")) + .add(progressStep("align-step-3", "Third step") + .variant(pending) + .ariaLabel("pending step") + .description("This is the last thing to happen")) + .first().next(); + + return div() + .add(div().css("pf-u-mb-md") + .add(checkbox("vertical-checkbox", "vertical", + "Vertical alignment") + .aria(label, "Toggle vertical alignment") + .onChange((e, c, value) -> stepper.vertical(value))) + .add(checkbox("center-checkbox", "center", + "Center alignment").css("pf-u-ml-md") + .aria(label, "Toggle center alignment") + .onChange((e, c, value) -> stepper.center(value)))) + .add(br()) + .add(stepper) + .element(); + // @code-end:progress-stepper-alignment + })); + + addSnippet(new Snippet("progress-stepper-compact", "Compact", + code("progress-stepper-compact"), () -> { + // @code-start:progress-stepper-compact + ProgressStepper stepper = progressStepper() + .ariaLabel("Compact progress stepper") + .compact(true) + .add(progressStep("compact-step-1", "First step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("compact-step-2", "Second step") + .ariaLabel("step with info") + .variant(info)) + .add(progressStep("compact-step-3", "Third step") + .ariaLabel("pending step") + .variant(pending)) + .first().next(); + + return div() + .add(div().css("pf-u-mb-md") + .add(checkbox("vertical-compact-checkbox", "vertical", + "Vertical alignment") + .aria(label, "Toggle vertical alignment") + .onChange((e, c, value) -> stepper.vertical(value))) + .add(checkbox("center-compact-checkbox", "center", + "Center alignment").css("pf-u-ml-md") + .aria(label, "Toggle center alignment") + .onChange((e, c, value) -> stepper.center(value)))) + .add(br()) + .add(stepper) + .element(); + // @code-end:progress-stepper-compact + })); + + addSnippet(new Snippet("progress-stepper-custom-icons", "With custom icons", + code("progress-stepper-custom-icons"), () -> + // @code-start:progress-stepper-custom-icons + div() + .add(progressStepper() + .ariaLabel("Progress stepper with custom icons") + .add(progressStep("custom-step-1", "Successful completion") + .ariaLabel("completed step, step with success") + .variant(success) + .icon(checkDouble())) + .add(progressStep("custom-step-2", "In process") + .ariaLabel("in progress") + .variant(info) + .icon(clock())) + .add(progressStep("custom-step-3", "Pending") + .ariaLabel("pending step") + .variant(pending) + .icon(pending())) + .first().next()) + .element() + // @code-end:progress-stepper-custom-icons + )); + + addSnippet(new Snippet("progress-stepper-issue", "With an issue", + code("progress-stepper-issue"), () -> + // @code-start:progress-stepper-issue + div() + .add(progressStepper() + .ariaLabel("Progress stepper with an issue") + .add(progressStep("issue-step-1", "First step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("issue-step-2", "Second step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("issue-step-3", "Third step") + .ariaLabel("completed step, step with warning") + .variant(warning)) + .add(progressStep("issue-step-4", "Fourth step") + .ariaLabel("step with info") + .variant(info)) + .add(progressStep("issue-step-5", "Fifth step") + .ariaLabel("pending step") + .variant(pending)) + .last().previous()) + .element() + // @code-end:progress-stepper-issue + )); + + addSnippet(new Snippet("progress-stepper-failure", "With a failure", + code("progress-stepper-failure"), () -> + // @code-start:progress-stepper-failure + div() + .add(progressStepper() + .ariaLabel("Progress stepper with a failure") + .add(progressStep("failure-step-1", "First step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("failure-step-2", "Second step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("failure-step-3", "Third step") + .ariaLabel("completed step, step with success") + .variant(success)) + .add(progressStep("failure-step-4", "Fourth step") + .ariaLabel("step with danger") + .variant(danger)) + .add(progressStep("failure-step-5", "Fifth step") + .ariaLabel("step with pending") + .variant(pending)) + .last().previous()) + .element() + // @code-end:progress-stepper-failure + )); + + addSnippet(new Snippet("progress-stepper-navigation", "With navigation", + code("progress-stepper-navigation"), () -> { + // @code-start:progress-stepper-navigation + ProgressStepper stepper = progressStepper() + .ariaLabel("Progress stepper with navigation") + .add(progressStep("nav-step-1", "First step") + .ariaLabel("pending step") + .variant(pending) + .description("Description for the first step")) + .add(progressStep("nav-step-2", "Second step") + .ariaLabel("pending step") + .variant(pending) + .description("Description for the second step")) + .add(progressStep("nav-step-3", "Third step") + .ariaLabel("pending step") + .variant(pending) + .description("Description for the third step")) + .add(progressStep("nav-step-4", "Fourth step") + .ariaLabel("pending step") + .variant(pending) + .description("Description for the fourth step")); + + // Navigation buttons + Button prevButton = button("Previous").primary().disabled(true); + Button nextButton = button("Next").primary(); + + Consumer currentStepActionCommon = currentStep -> { + currentStep.variant(info); + currentStep.ariaLabel("current step"); + }; + + prevButton.onClick((e, c) -> stepper.previous((maybeNewCurrentStep, index) -> { + if (index == -1) { + prevButton.disabled(true); + } else if (index == stepper.size() - 1) { + nextButton.disabled(false); + } + maybeNewCurrentStep.ifPresent(currentStepActionCommon); + }, prevCurrentStep -> { + prevCurrentStep.ariaLabel("pending step"); + prevCurrentStep.variant(pending); + })); + + nextButton.onClick((e, c) -> stepper.next((maybeNewCurrentStep, index) -> { + if (index == stepper.size()) { + nextButton.disabled(true); + } else if (index == 0) { + prevButton.disabled(false); + } + maybeNewCurrentStep.ifPresent(currentStepActionCommon); + }, prevCurrentStep -> { + prevCurrentStep.ariaLabel("completed step, step with success"); + prevCurrentStep.variant(success); + })); + + return div() + .add(stepper) + .add(br()) + .add(div().css("pf-u-mt-md") + .add(prevButton) + .add(" ") + .add(nextButton)) + .element(); + // @code-end:progress-stepper-navigation + })); + + addSnippet(new Snippet("progress-stepper-with-popover", "With popover", + code("progress-stepper-with-popover"), () -> { + // @code-start:progress-stepper-with-popover + String popoverBodyContent = "Additional info or help text content."; + + return div() + .add(progressStepper() + .add(progressStep("popover-step-1", "First step") + .ariaLabel("completed step, step with success") + .variant(success) + .description("This is the first step") + .popover(popover().placement(right) + .addHeader("First step popover") + .addBody(popoverBodyContent) + .ariaLabel("First step help"))) + .add(progressStep("popover-step-2", "Second step") + .ariaLabel("completed step, step with danger") + .variant(danger) + .description("This is the second step") + .popover(popover().placement(right) + .addHeader("Second step popover") + .addBody(popoverBodyContent) + .ariaLabel("Second step help"))) + .add(progressStep("popover-step-3", "Third step") + .ariaLabel("step with info") + .variant(info) + .description("This is the third step") + .popover(popover().placement(right) + .addHeader("Third step popover") + .addBody(popoverBodyContent) + .ariaLabel("Third step help"))) + .add(progressStep("popover-step-4", "Fourth step") + .ariaLabel("step with pending") + .variant(pending) + .description("This is the fourth step")) + .first().next().next()) + .element(); + // @code-end:progress-stepper-with-popover + })); + + startApiDocs(ProgressStepper.class); + addApiDoc(ProgressStepper.class, component); + addApiDoc(ProgressStep.class, subcomponent); + addApiDoc(ProgressStepVariant.class, other); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/RadioComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/RadioComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/RadioComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/RadioComponent.java diff --git a/showcase/src/main/java/org/patternfly/showcase/component/SelectComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/SelectComponent.java new file mode 100644 index 000000000..055682239 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/SelectComponent.java @@ -0,0 +1,326 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import java.util.Random; + +import org.jboss.elemento.Id; +import org.jboss.elemento.router.Route; +import org.patternfly.component.AsyncItems; +import org.patternfly.component.ValidationStatus; +import org.patternfly.component.help.HelperText; +import org.patternfly.component.menu.MenuItem; +import org.patternfly.component.menu.MenuList; +import org.patternfly.component.menu.MenuToggle; +import org.patternfly.component.menu.MultiSelect; +import org.patternfly.component.menu.MultiSelectMenu; +import org.patternfly.component.menu.SingleSelect; +import org.patternfly.component.menu.SingleSelectMenu; +import org.patternfly.showcase.LoremIpsum; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; +import org.patternfly.style.Modifiers.FullWidth; +import elemental2.promise.Promise; + +import static elemental2.dom.DomGlobal.setTimeout; +import static java.util.Arrays.stream; +import static java.util.stream.Collectors.toList; +import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.setVisible; +import static org.jboss.elemento.router.Link.link; +import static org.patternfly.component.ValidationStatus.error; +import static org.patternfly.component.ValidationStatus.success; +import static org.patternfly.component.ValidationStatus.warning; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.p; +import static org.patternfly.component.help.HelperText.helperText; +import static org.patternfly.component.help.HelperTextItem.helperTextItem; +import static org.patternfly.component.menu.MenuContent.menuContent; +import static org.patternfly.component.menu.MenuGroup.menuGroup; +import static org.patternfly.component.menu.MenuItem.checkboxMenuItem; +import static org.patternfly.component.menu.MenuItem.linkMenuItem; +import static org.patternfly.component.menu.MenuItem.menuItem; +import static org.patternfly.component.menu.MenuList.menuList; +import static org.patternfly.component.menu.MenuToggle.menuToggle; +import static org.patternfly.component.menu.MultiSelect.multiSelect; +import static org.patternfly.component.menu.MultiSelectMenu.multiSelectCheckboxMenu; +import static org.patternfly.component.menu.MultiSelectMenu.multiSelectMenu; +import static org.patternfly.component.menu.MultiTypeahead.multiTypeahead; +import static org.patternfly.component.menu.SingleSelect.singleSelect; +import static org.patternfly.component.menu.SingleSelectMenu.singleSelectMenu; +import static org.patternfly.component.menu.SingleTypeahead.singleTypeahead; +import static org.patternfly.icon.IconSets.fas.bell; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; +import static org.patternfly.showcase.Showcase.placeManager; + +@Route(value = "/components/menus/select", title = "Select") +public class SelectComponent extends SnippetPage { + + public SelectComponent() { + super(components.get("select")); + + startExamples(content(p).editorial() + .add("Select builds off of the menu component suite to adapt commonly used properties and functions to create a select menu. See the ") + .add(link(placeManager(), "/components/menus/menu").text("menu documentation")) + .add(" for a full list of properties that may be used to further customize a select menu.")); + + addSnippet(new Snippet("single-select", "Single select", + code("single-select"), () -> + // @code-start:single-select + div() + .add(singleSelect("Select a value") + .style("width", "200px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("option-0", "Option 1")) + .addItem(menuItem("option-1", "Option 2")) + .addItem(menuItem("option-2", "Option 3")))))) + .element() + // @code-end:single-select + )); + + addSnippet(new Snippet("select-option-variants", "Select option variants", + code("select-option-variants"), () -> + // @code-start:select-option-variants + div() + .add(singleSelect("Select a value") + .style("width", "200px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("option-0", "Basic option")) + .addItem(menuItem("option-1", "Option with description") + .description("This is a description")) + .addItem(linkMenuItem("option-3", "Option with link", + placeManager().href("/components/menus/select")) + .external()) + .addItem(menuItem("option-4", "Option with icon") + .icon(bell())) + .addItem(menuItem("option-5", "Disabled options") + .disabled()) + .addItem(menuItem("option-6", + "See menu for additional variants")))))) + .element() + // @code-end:select-option-variants + )); + + addSnippet(new Snippet("select-groups", "With grouped items", + code("select-groups"), () -> + // @code-start:select-groups + div() + .add(singleSelect("Select a value") + .style("width", "200px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addGroup(menuGroup("Group 1") + .addList(menuList() + .addItem(menuItem("option-0", "Option 1")) + .addItem(menuItem("option-1", "Option 2")) + .addItem(menuItem("option-2", "Option 3")))) + .addDivider() + .addGroup(menuGroup("Group 2")) + .addList(menuList() + .addItem(menuItem("option-3", "Option 4")) + .addItem(menuItem("option-4", "Option 5")) + .addItem(menuItem("option-5", "Option 6")))))) + .element() + // @code-end:select-groups + )); + + addSnippet(new Snippet("select-validation", "With validation", + code("select-validation"), () -> { + // @code-start:select-validation + MenuToggle menuToggle = menuToggle("Select a value"); + HelperText helperText = helperText().liveRegion().addItem(helperTextItem()); + setVisible(helperText, false); + return div() + .add(singleSelect(menuToggle) + .style("width", "200px") + .addMenu(singleSelectMenu() + .onSingleSelect((event, menuItem, selected) -> { + ValidationStatus validationStatus = menuItem.get("status"); + menuToggle.validated(validationStatus); + setVisible(helperText, validationStatus == warning || validationStatus == error); + helperText.firstItem().status(validationStatus); + if (validationStatus == warning) { + helperText.firstItem().text("Danger text that explains the issue."); + } else if (validationStatus == error) { + helperText.firstItem().text("Warning text that explains the issue."); + } + }) + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("success", "Success").store("status", success)) + .addItem(menuItem("warning", "Warning").store("status", warning)) + .addItem(menuItem("danger", "Danger").store("status", error)))))) + .add(helperText) + .element(); + // @code-end:select-validation + })); + + addSnippet(new Snippet("multi-select", "Checkbox select", + code("multi-select"), () -> + // @code-start:multi-select + div() + .add(multiSelect("Filter by status") + .addMenu(multiSelectCheckboxMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(checkboxMenuItem("debug", "Debug")) + .addItem(checkboxMenuItem("info", "Info")) + .addItem(checkboxMenuItem("warn", "Warn")) + .addItem(checkboxMenuItem("error", "Error") + .disabled()))))) + .element() + // @code-end:multi-select + )); + + addSnippet(new Snippet("single-typeahead", "Typeahead", + code("single-typeahead"), () -> + // @code-start:single-typeahead + div() + .add(singleTypeahead("single-typeahead-0", "Select a state") + .applyTo(FullWidth::fullWidth) + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("alabama", "Alabama")) + .addItem(menuItem("florida", "Florida")) + .addItem(menuItem("new-jersey", "New Jersey")) + .addItem(menuItem("new-mexico", "New Mexico")) + .addItem(menuItem("new-york", "New York")) + .addItem(menuItem("north-carolina", "North Carolina")))))) + .element() + // @code-end:single-typeahead + )); + + addSnippet(new Snippet("single-typeahead-create", "Typeahead with create option", + code("single-typeahead-create"), () -> + // @code-start:single-typeahead-create + div() + .add(singleTypeahead("single-typeahead-create-0", "Select a state") + .applyTo(FullWidth::fullWidth) + .allowNewItems(value -> "Create new item \"" + value + "\"", + value -> Promise.resolve(menuItem(Id.build(value), value))) + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("alabama", "Alabama")) + .addItem(menuItem("florida", "Florida")) + .addItem(menuItem("new-jersey", "New Jersey")) + .addItem(menuItem("new-mexico", "New Mexico")) + .addItem(menuItem("new-york", "New York")) + .addItem(menuItem("north-carolina", "North Carolina")))))) + .element() + // @code-end:single-typeahead-create + )); + + addSnippet(new Snippet("single-typeahead-async", "Typeahead (async)", + code("single-typeahead-async"), () -> { + // @code-start:single-typeahead-async + AsyncItems asyncItems = c -> new Promise<>((res, rej) -> + setTimeout(__ -> res.onInvoke(stream(LoremIpsum.words(100).split(" ")) + .distinct() + .sorted() + .map(word -> menuItem(Id.build("item-", word), word)) + .collect(toList())), + 1234 + new Random().nextInt(3456))); + + + return div() + .add(singleTypeahead("single-typeahead-async-0", "Lorem ipsum") + .applyTo(FullWidth::fullWidth) + .addMenu(singleSelectMenu().scrollable() + .addContent(menuContent() + .addList(menuList() + .addItems(asyncItems))))) + .element(); + // @code-end:single-typeahead-async + })); + + addSnippet(new Snippet("multi-typeahead", "Multiple typeahead with labels", + code("multi-typeahead"), () -> + // @code-start:multi-typeahead + div() + .add(multiTypeahead("multi-typeahead-0", "Select a state") + .applyTo(FullWidth::fullWidth) + .addMenu(multiSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("alabama", "Alabama")) + .addItem(menuItem("florida", "Florida")) + .addItem(menuItem("new-jersey", "New Jersey")) + .addItem(menuItem("new-mexico", "New Mexico")) + .addItem(menuItem("new-york", "New York")) + .addItem(menuItem("north-carolina", "North Carolina")))))) + .element() + // @code-end:multi-typeahead + )); + + addSnippet(new Snippet("multi-typeahead-create", "Multiple typeahead with create option", + code("multi-typeahead-create"), () -> + // @code-start:multi-typeahead-create + div() + .add(multiTypeahead("multi-typeahead-create-0", "Select a state") + .applyTo(FullWidth::fullWidth) + .allowNewItems(value -> "Create new item \"" + value + "\"", + value -> Promise.resolve(menuItem(Id.build(value), value))) + .addMenu(multiSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("alabama", "Alabama")) + .addItem(menuItem("florida", "Florida")) + .addItem(menuItem("new-jersey", "New Jersey")) + .addItem(menuItem("new-mexico", "New Mexico")) + .addItem(menuItem("new-york", "New York")) + .addItem(menuItem("north-carolina", "North Carolina")))))) + .element() + // @code-end:multi-typeahead-create + )); + + addSnippet(new Snippet("multi-typeahead-async", "Multiple typeahead (async)", + code("multi-typeahead-async"), () -> { + // @code-start:multi-typeahead-async + AsyncItems asyncItems = c -> new Promise<>((res, rej) -> + setTimeout(__ -> res.onInvoke(stream(LoremIpsum.words(100).split(" ")) + .distinct() + .sorted() + .map(word -> menuItem(Id.build("item-", word), word)) + .collect(toList())), + 1234 + new Random().nextInt(3456))); + + + return div() + .add(multiTypeahead("multi-typeahead-async-0", "Lorem ipsum") + .applyTo(FullWidth::fullWidth) + .addMenu(multiSelectMenu().scrollable() + .addContent(menuContent() + .addList(menuList() + .addItems(asyncItems))))) + .element(); + // @code-end:multi-typeahead-async + })); + + startApiDocs(MultiSelect.class); + addApiDoc(MultiSelect.class, component); + addApiDoc(MultiSelectMenu.class, component); + addApiDoc(SingleSelect.class, component); + addApiDoc(SingleSelectMenu.class, component); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/SimpleListComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/SimpleListComponent.java similarity index 84% rename from showcase/common/src/main/java/org/patternfly/showcase/component/SimpleListComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/SimpleListComponent.java index be2bf6420..128224588 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/SimpleListComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/SimpleListComponent.java @@ -53,6 +53,18 @@ public SimpleListComponent() { // @code-end:simple-list )); + addSnippet(new Snippet("simple-list-links", "Simple list with links", + code("simple-list-links"), () -> + // @code-start:simple-list-links + div() + .add(simpleList() + .addItems(range(1, 4).boxed().collect(toList()), index -> + simpleListItem(Id.build("simple-list-links", String.valueOf(index)), + "List item " + index, "https://patternfly.org", "_blank"))) + .element() + // @code-end:simple-list-links + )); + addSnippet(new Snippet("grouped-list", "Grouped list", code("grouped-list"), () -> // @code-start:grouped-list diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/SkeletonComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/SkeletonComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/SkeletonComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/SkeletonComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/SliderComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/SliderComponent.java similarity index 93% rename from showcase/common/src/main/java/org/patternfly/showcase/component/SliderComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/SliderComponent.java index 28e1d8823..9803b76b4 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/SliderComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/SliderComponent.java @@ -31,11 +31,12 @@ import static elemental2.dom.DomGlobal.setTimeout; import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.p; import static org.jboss.elemento.Elements.small; import static org.jboss.elemento.Elements.span; import static org.jboss.elemento.EventType.click; import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.h4; import static org.patternfly.component.form.TextInput.textInput; import static org.patternfly.component.form.TextInputType.number; import static org.patternfly.component.inputgroup.InputGroup.inputGroup; @@ -70,7 +71,7 @@ public SliderComponent() { HTMLContainerBuilder[] values = new HTMLContainerBuilder[]{span(), span(), span(), span(), span(), span(), span()}; return div() - .add(p().add("Slider value is ").add(values[0])) + .add(content(h4).add("Slider value is ").add(values[0])) .add(slider() .value(50) .customSteps(sliderSteps( @@ -85,7 +86,7 @@ public SliderComponent() { sliderStep(100d, "8"))) .onChange((e, s, v) -> values[0].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[1])) + .add(content(h4).add("Slider value is ").add(values[1])) .add(small().add("(min = 0, max = 200, step = 50)")) .add(slider() .value(50) @@ -93,7 +94,7 @@ public SliderComponent() { .showTicks() .onChange((e, s, v) -> values[1].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[2])) + .add(content(h4).add("Slider value is ").add(values[2])) .add(small().add("(min = -25, max = 75, step = 10, boundaries not shown)")) .add(slider() .value(25) @@ -102,7 +103,7 @@ public SliderComponent() { .showBoundaries(false) .onChange((e, s, v) -> values[2].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[3])) + .add(content(h4).add("Slider value is ").add(values[3])) .add(small().add("(min = -25, max = 75, step = 10, boundaries shown)")) .add(slider() .value(50) @@ -110,14 +111,14 @@ public SliderComponent() { .showTicks() .onChange((e, s, v) -> values[3].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[4])) + .add(content(h4).add("Slider value is ").add(values[4])) .add(small().add("(min = -25, max = 75, step = 10, boundaries shown, ticks not shown)")) .add(slider() .value(50) .range(-25, 75, 10) .onChange((e, s, v) -> values[4].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[5])) + .add(content(h4).add("Slider value is ").add(values[5])) .add(small().add("(max = 5, custom steps)")) .add(slider() .value(3) @@ -131,7 +132,7 @@ public SliderComponent() { sliderStep(5, "F"))) .onChange((e, s, v) -> values[5].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[6])) + .add(content(h4).add("Slider value is ").add(values[6])) .add(small().add("(min = 12, max = 86, custom steps with non linear data)")) .add(slider() .value(25) @@ -154,12 +155,12 @@ public SliderComponent() { // @code-start:slider-continuous HTMLContainerBuilder[] values = new HTMLContainerBuilder[]{span(), span()}; return div() - .add(p().add("Slider value is ").add(values[0])) + .add(content(h4).add("Slider value is ").add(values[0])) .add(slider() .value(50) .onChange((e, s, v) -> values[0].text(String.valueOf(v)))) .add(br()) - .add(p().add("Slider value is ").add(values[1])) + .add(content(h4).add("Slider value is ").add(values[1])) .add(small().add("(with tooltip over thumb)")) .add(slider() .value(50) @@ -235,7 +236,7 @@ public SliderComponent() { HTMLContainerBuilder value = span(); return div() - .add(p().add("Slider value is ").add(value)) + .add(content(h4).add("Slider value is ").add(value)) .add(slider0 .value(50) .addStartActions(sliderActions() @@ -273,7 +274,7 @@ public SliderComponent() { HTMLContainerBuilder value = span(); setTimeout(__ -> slider.value(50), 333); return div() - .add(p().add("Slider value is ").add(value)) + .add(content(h4).add("Slider value is ").add(value)) .add(slider .disabled() .customSteps(sliderSteps( diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/SpinnerComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/SpinnerComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/SpinnerComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/SpinnerComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/SwitchComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/SwitchComponent.java similarity index 81% rename from showcase/common/src/main/java/org/patternfly/showcase/component/SwitchComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/SwitchComponent.java index 811a9a90a..a5e739e21 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/SwitchComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/SwitchComponent.java @@ -39,7 +39,7 @@ public SwitchComponent() { // @code-start:switch-basic div() .add(switch_("switch-basic-0", "switch-basic-0", true) - .label("Message when on", "Message when off")) + .label("Togglable option for basic example")) .element() // @code-end:switch-basic )); @@ -50,7 +50,7 @@ public SwitchComponent() { div() .add(switch_("switch-reversed-0", "switch-reversed-0", true) .reversed() - .label("Message when on", "Message when off")) + .label("Togglable option for reversed example")) .element() // @code-end:switch-reversed )); @@ -60,7 +60,8 @@ public SwitchComponent() { // @code-start:switch-no-label div() .add(switch_("switch-no-label-0", "switch-no-label-0", true) - .checkIcon()) + .checkIcon() + .ariaLabel("Togglable option for no visible label example")) .element() // @code-end:switch-no-label )); @@ -71,7 +72,7 @@ public SwitchComponent() { div() .add(switch_("switch-checked-label-0", "switch-checked-label-0", true) .checkIcon() - .label("Message when on", "Message when off")) + .label("Togglable option for check icon example")) .element() // @code-end:switch-checked-label )); @@ -82,19 +83,21 @@ public SwitchComponent() { div() .add(switch_("switch-disabled-0", "switch-disabled-0", true) .disabled() - .label("Message when on", "Message when off")) + .label("Togglable option for disabled checked example")) .add(br()) .add(switch_("switch-disabled-1", "switch-disabled-1", false) .disabled() - .label("Message when on", "Message when off")) + .label("Togglable option for disabled unchecked example")) .add(br()) .add(switch_("switch-disabled-2", "switch-disabled-2", true) .disabled() - .checkIcon()) + .checkIcon() + .ariaLabel("Togglable option for checked with no visible label example")) .add(br()) .add(switch_("switch-disabled-3", "switch-disabled-3", false) .disabled() - .checkIcon()) + .checkIcon() + .ariaLabel("Togglable option for unchecked with no visible label example")) .element() // @code-end:switch-disabled )); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TableComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TableComponent.java similarity index 98% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TableComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TableComponent.java index 879e4cf8c..5992ea37f 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TableComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/TableComponent.java @@ -32,7 +32,6 @@ import org.patternfly.component.table.Tr; import org.patternfly.component.table.Wrap; import org.patternfly.component.togglegroup.ToggleGroup; -import org.patternfly.icon.IconSets; import org.patternfly.showcase.Snippet; import org.patternfly.showcase.SnippetPage; import org.patternfly.showcase.model.Repository; @@ -50,7 +49,6 @@ import static org.patternfly.component.emptystate.EmptyState.emptyState; import static org.patternfly.component.emptystate.EmptyStateBody.emptyStateBody; import static org.patternfly.component.emptystate.EmptyStateFooter.emptyStateFooter; -import static org.patternfly.component.emptystate.EmptyStateHeader.emptyStateHeader; import static org.patternfly.component.menu.Dropdown.dropdown; import static org.patternfly.component.menu.DropdownMenu.dropdownMenu; import static org.patternfly.component.menu.MenuContent.menuContent; @@ -74,6 +72,7 @@ import static org.patternfly.icon.IconSets.fas.ellipsisV; import static org.patternfly.icon.IconSets.fas.folder; import static org.patternfly.icon.IconSets.fas.folderOpen; +import static org.patternfly.icon.IconSets.fas.search; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.ApiDoc.Type.modifier; import static org.patternfly.showcase.ApiDoc.Type.subcomponent; @@ -228,10 +227,10 @@ public TableComponent() { boolean primaryAction = repository.pullRequests % 5 != 0; boolean secondaryAction = repository.pullRequests % 2 != 0; if (primaryAction) { - tr.addItem(td("Primary action").wrap(fitContent) + tr.addItem(td("Primary action").action().wrap(fitContent) .add(tableText() .add(button().secondary().text("Start")))); - tr.addItem(td().actionCell().add(dropdown.get().disabled(secondaryAction))); + tr.addItem(td().actions().add(dropdown.get().disabled(secondaryAction))); } else { tr.addItem(td()); tr.addItem(td()); @@ -291,10 +290,11 @@ public TableComponent() { .addRow(tr("table-empty-head") .addItems(columns, t -> th(t.key).text(t.value)))) .addBody(tbody() - .empty(columns.size(), emptyState().size(Size.sm) - .addHeader(emptyStateHeader(2) - .icon(IconSets.fas.search()) - .text("No results found")) + .empty(columns.size(), emptyState() + .size(Size.sm) + .headingLevel(2) + .icon(search()) + .text("No results found") .addBody(emptyStateBody().text( "Clear all filters and try again.")) .addFooter(emptyStateFooter() diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TabsComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TabsComponent.java similarity index 93% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TabsComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TabsComponent.java index 2e94a18df..51cda3f4c 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TabsComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/TabsComponent.java @@ -82,7 +82,7 @@ public TabsComponent() { // @code-start:tabs-default Tabs tabs = tabs(); Checkbox boxToggle = checkbox("tabs-default-box", "tabs-default-box", "Box"); - Checkbox lightToggle = checkbox("tabs-default-light", "tabs-default-light", "Light tabs"); + Checkbox secondaryToggle = checkbox("tabs-default-secondary", "tabs-default-secondary", "Secondary tabs"); return div() .add(tabs .addItem(tab("tabs-default-users", "Users") @@ -105,7 +105,7 @@ public TabsComponent() { .add(div().css(util("mt-md")) .add(boxToggle.onChange((event, component, value) -> tabs.box(value)))) .add(div().css(util("mt-sm")) - .add(lightToggle.onChange((event, component, value) -> tabs.lightTabs(value)))) + .add(secondaryToggle.onChange((event, component, value) -> tabs.secondary(value)))) .element(); // @code-end:tabs-default })); @@ -116,7 +116,6 @@ public TabsComponent() { // @code-start:tabs-vertical Tabs tabs = tabs(); Checkbox boxToggle = checkbox("tabs-vertical-box", "tabs-vertical-box", "Box"); - Checkbox lightToggle = checkbox("tabs-vertical-light", "tabs-vertical-light", "Light tabs"); return div() .add(tabs.vertical() .addItem(tab("tabs-vertical-users", "Users") @@ -138,8 +137,6 @@ public TabsComponent() { .addContent(tabContent().text("ARIA Disabled (Tooltip)")))) .add(div().css(util("mt-md")) .add(boxToggle.onChange((event, component, value) -> tabs.box(value)))) - .add(div().css(util("mt-sm")) - .add(lightToggle.onChange((event, component, value) -> tabs.lightTabs(value)))) .element(); // @code-end:tabs-vertical })); @@ -302,38 +299,38 @@ public TabsComponent() { // @code-end:tabs-icon-text )); - addSnippet(new Snippet("tabs-secondary", "Secondary tabs", - code("tabs-secondary"), () -> { - // @code-start:tabs-secondary + addSnippet(new Snippet("tabs-subtab", "Subtabs", + code("tabs-subtab"), () -> { + // @code-start:tabs-subtab Tabs tabs = tabs(); - Tabs secondaryTabs = tabs().secondary(); - Checkbox boxToggle = checkbox("tabs-secondary-box", "tabs-secondary-box", "Box"); + Tabs subtab = tabs().subtab(); + Checkbox boxToggle = checkbox("tabs-subtab-box", "tabs-subtab-box", "Box"); return div() .add(tabs - .addItem(tab("tabs-secondary-users", "Users") + .addItem(tab("tabs-subtab-users", "Users") .addContent(tabContent() - .add(secondaryTabs + .add(subtab .addItems(range(1, 12).boxed().collect(toList()), index -> tab("secondary-tab-" + index, "Secondary tab item " + index) .addContent(tabContent() .text("Secondary tab section " + index)))))) - .addItem(tab("tabs-secondary-containers", "Containers") + .addItem(tab("tabs-subtab-containers", "Containers") .addContent(tabContent().text("Containers"))) - .addItem(tab("tabs-secondary-database", "Database") + .addItem(tab("tabs-subtab-database", "Database") .addContent(tabContent().text("Database"))) - .addItem(tab("tabs-secondary-server", "Server") + .addItem(tab("tabs-subtab-server", "Server") .addContent(tabContent().text("Server"))) - .addItem(tab("tabs-secondary-system", "System") + .addItem(tab("tabs-subtab-system", "System") .addContent(tabContent().text("System"))) - .addItem(tab("tabs-secondary-network", "Network") + .addItem(tab("tabs-subtab-network", "Network") .addContent(tabContent().text("Network"))) .addItems(range(7, 20).boxed().collect(toList()), index -> - tab("tabs-secondary-" + index, "Tab item " + index) + tab("tabs-subtab-" + index, "Tab item " + index) .addContent(tabContent().text("Tab section " + index)))) .add(div().css(util("mt-md")) .add(boxToggle.onChange((event, component, value) -> tabs.box(value)))) .element(); - // @code-end:tabs-secondary + // @code-end:tabs-subtab })); addSnippet(new Snippet("tabs-icon-filled", "Filled tabs with icons", @@ -387,15 +384,15 @@ public TabsComponent() { // @code-end:tabs-nav )); - addSnippet(new Snippet("tabs-secondary-nav", "Secondary tabs linked to nav elements", - code("tabs-secondary-nav"), () -> - // @code-start:tabs-secondary-nav + addSnippet(new Snippet("tabs-subtab-nav", "Subtabs linked to nav elements", + code("tabs-subtab-nav"), () -> + // @code-start:tabs-subtab-nav div() .add(tabs(nav()) - .addItem(tab(a(), "tabs-secondary-nav-users", "Users") + .addItem(tab(a(), "tabs-subtab-nav-users", "Users") .href("#item-0") .addContent(tabContent() - .add(tabs(nav()).secondary() + .add(tabs(nav()).subtab() .addItem(tab(a(), "secondary-tab-item-1", "Item 1") .href("#item-00") .addContent(tabContent().text("Item 1"))) @@ -416,17 +413,17 @@ public TabsComponent() { .addItem(tab(a(), "secondary-tab-item-6", "Item 6") .href("#item-05") .addContent(tabContent().text("Item 6")))))) - .addItem(tab(a(), "tabs-secondary-nav-containers", "Containers") + .addItem(tab(a(), "tabs-subtab-nav-containers", "Containers") .href("#item-1") .addContent(tabContent().text("Containers"))) - .addItem(tab(a(), "tabs-secondary-nav-database", "Database") + .addItem(tab(a(), "tabs-subtab-nav-database", "Database") .href("#item-2") .addContent(tabContent().text("Database"))) - .addItem(tab(a(), "tabs-secondary-nav-disabled", "Disabled") + .addItem(tab(a(), "tabs-subtab-nav-disabled", "Disabled") .href("#item-3") .disabled() .addContent(tabContent().text("Disabled"))) - .addItem(tab(a(), "tabs-secondary-nav-disabled-aria", "ARIA Disabled") + .addItem(tab(a(), "tabs-subtab-nav-disabled-aria", "ARIA Disabled") .href("#item-4") .ariaDisabled() .addContent(tabContent().text("ARIA Disabled"))) @@ -434,7 +431,7 @@ public TabsComponent() { .href("#item-5") .addContent(tabContent().text("Network")))) .element() - // @code-end:tabs-secondary-nav + // @code-end:tabs-subtab-nav )); addSnippet(new Snippet("tabs-body-padding", "With tab content with body and padding", diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TextAreaComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TextAreaComponent.java similarity index 98% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TextAreaComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TextAreaComponent.java index e31663089..524bb9dfd 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TextAreaComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/TextAreaComponent.java @@ -82,7 +82,8 @@ public TextAreaComponent() { ta.validated(default_); helperText.firstItem() .status(default_) - .text("Validating..."); + .text("Validating...") + .removeIcon(); handle[0] = setTimeout(__ -> { if (value.isEmpty()) { ta.validated(warning); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TextInputComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TextInputComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TextInputComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TextInputComponent.java diff --git a/showcase/src/main/java/org/patternfly/showcase/component/TextInputGroupComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TextInputGroupComponent.java new file mode 100644 index 000000000..5d7682ac5 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/TextInputGroupComponent.java @@ -0,0 +1,133 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.textinputgroup.FilterInput; +import org.patternfly.component.textinputgroup.SearchInput; +import org.patternfly.component.textinputgroup.TextInputGroup; +import org.patternfly.component.textinputgroup.TextInputGroupUtilities; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static elemental2.dom.DomGlobal.console; +import static java.util.stream.Collectors.toList; +import static java.util.stream.IntStream.range; +import static org.jboss.elemento.Elements.div; +import static org.patternfly.component.ValidationStatus.error; +import static org.patternfly.component.ValidationStatus.success; +import static org.patternfly.component.ValidationStatus.warning; +import static org.patternfly.component.label.Label.label; +import static org.patternfly.component.textinputgroup.BaseFilterInput.DEFAULT_TEXT_TO_IDENTIFIER; +import static org.patternfly.component.textinputgroup.FilterInput.filterInput; +import static org.patternfly.component.textinputgroup.SearchInput.searchInput; +import static org.patternfly.component.textinputgroup.TextInputGroup.textInputGroup; +import static org.patternfly.icon.IconSets.fas.search; +import static org.patternfly.layout.flex.Direction.column; +import static org.patternfly.layout.flex.Flex.flex; +import static org.patternfly.layout.flex.FlexItem.flexItem; +import static org.patternfly.layout.flex.Gap.sm; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.subcomponent; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; + +@Route(value = "/components/text-input-group", title = "Text input group") +public class TextInputGroupComponent extends SnippetPage { + + public TextInputGroupComponent() { + super(components.get("text-input-group")); + + startExamples(); + addSnippet(new Snippet("tig-basic", "Basic", + code("tig-basic"), () -> + // @code-start:tig-basic + div() + .add(textInputGroup("basic-tig-0")) + .element() + // @code-end:tig-basic + )); + + addSnippet(new Snippet("tig-disabled", "Disabled", + code("tig-disabled"), () -> + // @code-start:tig-disabled + div() + .add(textInputGroup("disabled-tig-0", "Disabled") + .disabled()) + .element() + // @code-end:tig-disabled + )); + + addSnippet(new Snippet("tig-search-input", "Utilities and icon", + code("tig-search-input"), () -> + // @code-start:tig-search-input + div() + .add(searchInput("tig-search-input-0").icon(search())) + .element() + // @code-end:tig-search-input + )); + + addSnippet(new Snippet("tig-validation", "With validation", + code("tig-validation"), () -> + // @code-start:tig-validation + div() + .add(flex().direction(column).rowGap(sm) + .addItem(flexItem() + .add(textInputGroup("tig-validation-0", "Success validation") + .validated(success))) + .addItem(flexItem() + .add(textInputGroup("tig-validation-1", + "Warning validation with custom non-status icon at start") + .icon(search()) + .validated(warning))) + .addItem(flexItem() + .add(searchInput("tig-validation-2", + "Error validation with custom non-status icon at start and utilities") + .icon(search()) + .validated(error)))) + .element() + // @code-end:tig-validation + )); + + addSnippet(new Snippet("tig-filter-input", "Filters (no duplicates)", + code("tig-filter-input"), () -> { + // @code-start:tig-filter-input + FilterInput filterInput = filterInput("tig-filter-input-0").icon(search()) + .allowDuplicates(false) + .onAdd((fi, filter) -> { + fi.removeIcon(); + console.log("Filter added: %s", filter.text()); + }) + .onRemove((fi, filter) -> { + if (fi.labelGroup().isEmpty()) { + fi.icon(search()); + } + console.log("Filter removed: %s", filter.text()); + }); + filterInput.labelGroup().addItems(range(1, 12).boxed().collect(toList()), index -> + label(DEFAULT_TEXT_TO_IDENTIFIER.apply("Label " + index), "Label " + index) + .outline().closable()); + return div().add(filterInput).element(); + // @code-end:tig-filter-input + })); + + startApiDocs(TextInputGroup.class); + addApiDoc(TextInputGroup.class, component); + addApiDoc(SearchInput.class, component); + addApiDoc(FilterInput.class, component); + addApiDoc(TextInputGroupUtilities.class, subcomponent); + } +} diff --git a/showcase/src/main/java/org/patternfly/showcase/component/TimestampComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TimestampComponent.java new file mode 100644 index 000000000..142b607c5 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/TimestampComponent.java @@ -0,0 +1,116 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import java.util.Date; + +import org.jboss.elemento.router.Route; +import org.patternfly.component.timestamp.CustomFormat; +import org.patternfly.component.timestamp.DateTimeFormatOptions.Day; +import org.patternfly.component.timestamp.DateTimeFormatOptions.Hour; +import org.patternfly.component.timestamp.DateTimeFormatOptions.Month; +import org.patternfly.component.timestamp.DateTimeFormatOptions.Weekday; +import org.patternfly.component.timestamp.DateTimeFormatOptions.Year; +import org.patternfly.component.timestamp.Timestamp; +import org.patternfly.component.timestamp.TimestampFormat; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; + +import static org.jboss.elemento.Elements.br; +import static org.jboss.elemento.Elements.div; +import static org.patternfly.component.timestamp.Timestamp.timestamp; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; +import static org.patternfly.style.Classes.timestamp; + +@Route(value = "/components/timestamp", title = "Timestamp") +public class TimestampComponent extends SnippetPage { + + @SuppressWarnings({"deprecation", "MagicConstant"}) + public TimestampComponent() { + super(components.get(timestamp)); + + startExamples(); + addSnippet(new Snippet("timestamp-default", "Default", + code("timestamp-default"), () -> { + // @code-start:timestamp-default + return div() + .add(timestamp()) + .add(br()) + .add(timestamp().utc(true)) + .add(br()) + .add(timestamp().timeFormat(TimestampFormat._short)) + .element(); + // @code-end:timestamp-default + })); + + addSnippet(new Snippet("timestamp-basic-formats", "Basic formats", + code("timestamp-basic-formats"), () -> { + // @code-start:timestamp-basic-formats + Date currentDateTime = new Date(); + return div() + .add(timestamp().dateTime(currentDateTime) + .dateFormat(TimestampFormat.full) + .timeFormat(TimestampFormat.full)) + .add(br()).add(br()) + .add(timestamp().dateTime(currentDateTime) + .dateFormat(TimestampFormat.full)) + .add(br()).add(br()) + .add(timestamp().dateTime(currentDateTime) + .timeFormat(TimestampFormat.full)) + .add(br()).add(br()) + .add(timestamp().dateTime(currentDateTime) + .dateFormat(TimestampFormat.medium) + .timeFormat(TimestampFormat._short) + .displaySuffix("US Eastern")) + .element(); + // @code-end:timestamp-basic-formats + })); + + addSnippet(new Snippet("timestamp-custom-format", "Custom format", + code("timestamp-custom-format"), () -> { + // @code-start:timestamp-custom-format + Date currentDate = new Date(); + + return div() + .add(timestamp().dateTime(currentDate) + .customFormat(CustomFormat.create() + .weekday(Weekday._short) + .day(Day.numeric) + .month(Month._short) + .year(Year._2digit) + .hour(Hour._2digit))) + .element(); + // @code-end:timestamp-custom-format + })); + + addSnippet(new Snippet("timestamp-custom-content", "Custom content", + code("timestamp-custom-content"), () -> { + Date pastDateTime = new Date(122, 7, 9, 14, 57); + return div() + .add(timestamp("1 hour ago").dateTime(pastDateTime)) + .add(br()).add(br()) + .add(timestamp("Last updated August 9th, 2022 at 2:57 PM EDT") + .dateTime(pastDateTime)) + .element(); + // @code-end:timestamp-custom-content + })); + + startApiDocs(Timestamp.class); + addApiDoc(Timestamp.class, component); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TitleComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TitleComponent.java similarity index 70% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TitleComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TitleComponent.java index f600d361a..ca47db5cf 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TitleComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/TitleComponent.java @@ -21,7 +21,6 @@ import org.patternfly.showcase.SnippetPage; import static org.jboss.elemento.Elements.div; -import static org.patternfly.component.content.Content.content; import static org.patternfly.component.title.Title.title; import static org.patternfly.showcase.ApiDoc.Type.component; import static org.patternfly.showcase.Code.code; @@ -44,13 +43,12 @@ public TitleComponent() { code("title-default-sizes"), () -> // @code-start:title-default-sizes div() - .add(content() - .add(title(1, "h1 defaults to 2xl")) - .add(title(2, "h2 defaults to xl")) - .add(title(3, "h3 defaults to lg")) - .add(title(4, "h4 defaults to md")) - .add(title(5, "h5 defaults to md")) - .add(title(6, "h6 defaults to md"))) + .add(title(1, "H1-styled title")) + .add(title(2, "H2-styled title")) + .add(title(3, "H3-styled title")) + .add(title(4, "H4-styled title")) + .add(title(5, "H5-styled title")) + .add(title(6, "H6-styled title")) .element() // @code-end:title-default-sizes )); @@ -59,13 +57,12 @@ public TitleComponent() { code("title-custom-sizes"), () -> // @code-start:title-custom-sizes div() - .add(content() - .add(title(1, _4xl, "h1 as 4xl")) - .add(title(2, _3xl, "h2 as 3xl")) - .add(title(3, _2xl, "h3 as 2xl")) - .add(title(4, xl, "h4 as xl")) - .add(title(5, lg, "h5 has lg")) - .add(title(6, md, "h6 as md"))) + .add(title(1, _4xl, "4xl title")) + .add(title(2, _3xl, "3xl title")) + .add(title(3, _2xl, "2xl title")) + .add(title(4, xl, "xl title")) + .add(title(5, lg, "lg title")) + .add(title(6, md, "md title")) .element() // @code-end:title-custom-sizes )); diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/ToggleGroupComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ToggleGroupComponent.java similarity index 84% rename from showcase/common/src/main/java/org/patternfly/showcase/component/ToggleGroupComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/ToggleGroupComponent.java index 3a340e10f..d7a2a5d9a 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/ToggleGroupComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/ToggleGroupComponent.java @@ -24,8 +24,10 @@ import static java.util.stream.Collectors.toList; import static java.util.stream.IntStream.range; +import static org.jboss.elemento.Elements.br; import static org.jboss.elemento.Elements.div; import static org.jboss.elemento.Id.build; +import static org.patternfly.component.IconPosition.end; import static org.patternfly.component.SelectionMode.multi; import static org.patternfly.component.SelectionMode.single; import static org.patternfly.component.button.Button.button; @@ -48,7 +50,19 @@ public ToggleGroupComponent() { super(components.get("toggle-group")); startExamples(); - addSnippet(new Snippet("toggle-group-multiple", "Default with multiple selectable", + addSnippet(new Snippet("toggle-group-single", "Single select toggle group", + code("toggle-group-single"), () -> + // @code-start:toggle-group-single + div() + .add(toggleGroup(single) + .addItems(range(1, 4).boxed().collect(toList()), index -> + toggleGroupItem(build("toggle-group-single", String.valueOf(index)), + "Option " + index))) + .element() + // @code-end:toggle-group-single + )); + + addSnippet(new Snippet("toggle-group-multiple", "Multi select toggle group", code("toggle-group-multiple"), () -> { // @code-start:toggle-group-multiple Button disableAll = button("Disable all").primary(); @@ -70,19 +84,7 @@ public ToggleGroupComponent() { // @code-end:toggle-group-multiple })); - addSnippet(new Snippet("toggle-group-single", "Default with single selectable", - code("toggle-group-single"), () -> - // @code-start:toggle-group-single - div() - .add(toggleGroup(single) - .addItems(range(1, 4).boxed().collect(toList()), index -> - toggleGroupItem(build("toggle-group-single", String.valueOf(index)), - "Option " + index))) - .element() - // @code-end:toggle-group-single - )); - - addSnippet(new Snippet("toggle-group-icon", "With icon", + addSnippet(new Snippet("toggle-group-icon", "With icons", code("toggle-group-icon"), () -> // @code-start:toggle-group-icon div() @@ -94,19 +96,24 @@ public ToggleGroupComponent() { // @code-end:toggle-group-icon )); - addSnippet(new Snippet("toggle-group-text-icon", "With icon", + addSnippet(new Snippet("toggle-group-text-icon", "With text and icons", code("toggle-group-text-icon"), () -> // @code-start:toggle-group-text-icon div() .add(toggleGroup(multi) - .addItem(toggleGroupItem("toggle-group-text-icon-0", "Copy").icon(copy())) - .addItem(toggleGroupItem("toggle-group-text-icon-1", "Undo").icon(undo())) - .addItem(toggleGroupItem("toggle-group-text-icon-2", "Share").icon(shareSquare()))) + .addItem(toggleGroupItem("toggle-group-text-icon-0").iconAndText(copy(), "Copy")) + .addItem(toggleGroupItem("toggle-group-text-icon-1").iconAndText(undo(), "Undo")) + .addItem(toggleGroupItem("toggle-group-text-icon-2").iconAndText(shareSquare(), "Share"))) + .add(br()) + .add(toggleGroup(multi) + .addItem(toggleGroupItem("toggle-group-text-icon-0").iconAndText(copy(), "Copy", end)) + .addItem(toggleGroupItem("toggle-group-text-icon-1").iconAndText(undo(), "Undo", end)) + .addItem(toggleGroupItem("toggle-group-text-icon-2").iconAndText(shareSquare(), "Share", end))) .element() // @code-end:toggle-group-text-icon )); - addSnippet(new Snippet("toggle-group-compact", "Compact variant", + addSnippet(new Snippet("toggle-group-compact", "Compact toggle group", code("toggle-group-compact"), () -> // @code-start:toggle-group-compact div() diff --git a/showcase/src/main/java/org/patternfly/showcase/component/ToolbarComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/ToolbarComponent.java new file mode 100644 index 000000000..522c08b66 --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/ToolbarComponent.java @@ -0,0 +1,317 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import org.jboss.elemento.Id; +import org.jboss.elemento.router.Route; +import org.patternfly.component.form.Checkbox; +import org.patternfly.component.list.List; +import org.patternfly.component.list.ListItem; +import org.patternfly.component.toolbar.AlignItems; +import org.patternfly.component.toolbar.RowWrap; +import org.patternfly.component.toolbar.Toolbar; +import org.patternfly.component.toolbar.ToolbarColor; +import org.patternfly.component.toolbar.ToolbarContent; +import org.patternfly.component.toolbar.ToolbarFilterContent; +import org.patternfly.component.toolbar.ToolbarFilterLabelGroup; +import org.patternfly.component.toolbar.ToolbarGroup; +import org.patternfly.component.toolbar.ToolbarGroupType; +import org.patternfly.component.toolbar.ToolbarItem; +import org.patternfly.component.toolbar.ToolbarItemType; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; +import org.patternfly.style.Breakpoint; +import org.patternfly.style.Classes; +import org.patternfly.style.Inset; + +import static java.util.stream.Collectors.toList; +import static java.util.stream.IntStream.range; +import static org.jboss.elemento.Elements.br; +import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.ol; +import static org.jboss.elemento.Elements.setVisible; +import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.form.Checkbox.checkbox; +import static org.patternfly.component.list.List.list; +import static org.patternfly.component.list.ListItem.listItem; +import static org.patternfly.component.menu.MenuContent.menuContent; +import static org.patternfly.component.menu.MenuItem.menuItem; +import static org.patternfly.component.menu.MenuList.menuList; +import static org.patternfly.component.menu.SingleSelect.singleSelect; +import static org.patternfly.component.menu.SingleSelectMenu.singleSelectMenu; +import static org.patternfly.component.textinputgroup.SearchInput.searchInput; +import static org.patternfly.component.toolbar.AlignItems.center; +import static org.patternfly.component.toolbar.Toolbar.toolbar; +import static org.patternfly.component.toolbar.ToolbarColor.noBackground; +import static org.patternfly.component.toolbar.ToolbarColor.primary; +import static org.patternfly.component.toolbar.ToolbarColor.secondary; +import static org.patternfly.component.toolbar.ToolbarContent.toolbarContent; +import static org.patternfly.component.toolbar.ToolbarGroup.toolbarGroup; +import static org.patternfly.component.toolbar.ToolbarGroupType.actionGroup; +import static org.patternfly.component.toolbar.ToolbarGroupType.actionGroupPlain; +import static org.patternfly.component.toolbar.ToolbarGroupType.filterGroup; +import static org.patternfly.component.toolbar.ToolbarItem.toolbarItem; +import static org.patternfly.component.toolbar.ToolbarToggleGroup.toolbarToggleGroup; +import static org.patternfly.icon.IconSets.fas.clone_; +import static org.patternfly.icon.IconSets.fas.edit; +import static org.patternfly.icon.IconSets.fas.sync; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.other; +import static org.patternfly.showcase.ApiDoc.Type.subcomponent; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; +import static org.patternfly.style.Breakpoints.breakpoints; +import static org.patternfly.style.Classes.component; +import static org.patternfly.style.Classes.util; +import static org.patternfly.style.Variable.componentVar; + +@Route(value = "/components/toolbar", title = "Toolbar") +public class ToolbarComponent extends SnippetPage { + + public ToolbarComponent() { + super(components.get("toolbar")); + + // ------------------------------------------------------ examples + + addHeader("toolbar-examples", "Examples"); + addSnippet(new Snippet("toolbar-items", "Toolbar items", + code("toolbar-items"), () -> + // @code-start:toolbar-items + div() + .add(toolbar() + .addContent(toolbarContent() + .addItem(toolbarItem() + .add(searchInput("toolbar-items-tig-0"))) + .addItem(toolbarItem() + .add(button("Action").secondary())) + .addDivider() + .addItem(toolbarItem() + .add(button("Action").primary())))) + .element() + // @code-end:toolbar-items + )); + + addSnippet(new Snippet("toolbar-inset", "With adjusted inset", + code("toolbar-inset"), () -> + // @code-start:toolbar-inset + div() + .add(toolbar().inset(breakpoints( + Breakpoint.default_, Inset.md, + Breakpoint.md, Inset.sm, + Breakpoint.xl, Inset._2xl, + Breakpoint._2xl, Inset.lg)) + .addContent(toolbarContent() + .addGroup(toolbarGroup(actionGroup) + .addItem(toolbarItem().add(button("Action").secondary())) + .addItem(toolbarItem().add(button("Action").secondary())) + .addItem(toolbarItem().add(button("Action").secondary())) + .addItem(toolbarItem().add(button("Action").secondary()))) + .addDivider() + .addGroup(toolbarGroup(actionGroup) + .addItem(toolbarItem().add(button("Action").secondary())) + .addItem(toolbarItem().add(button("Action").primary()))) + .addDivider() + .addGroup(toolbarGroup(actionGroup) + .addItem(toolbarItem().add(button("Action").secondary())) + .addItem(toolbarItem().add(button("Action").primary()))))) + .element() + // @code-end:toolbar-inset + )); + + addSnippet(new Snippet("toolbar-sticky", "Sticky toolbar", + code("toolbar-sticky"), () -> { + // @code-start:toolbar-sticky + Toolbar toolbar = toolbar(); + List numbers = list(ol()) + .plain() + .style(componentVar(component(Classes.list), "Gap").name, 0) + .addItems(range(1, 31).boxed().collect(toList()), number -> + listItem(Id.build("toolbar-sticky", number.toString())) + .store("number", number) + .text(number.toString())); + Checkbox even = checkbox("toolbar-sticky-even", "toolbar-sticky-even", "Show only even number items") + .onChange((event, component, value) -> { + for (ListItem item : numbers.items()) { + int number = item.get("number"); + setVisible(item, !value || number % 2 == 0); + } + }); + Checkbox sticky = checkbox("toolbar-sticky-sticky", "toolbar-sticky-sticky", "Is toolbar sticky") + .value(true) + .onChange((event, component, value) -> toolbar.sticky(value)); + return div().style("overflow-y: scroll; height: 200px;") + .add(toolbar.sticky() + .addContent(toolbarContent().alignItems(center) + .addItem(toolbarItem() + .add(searchInput("toolbar-sticky-tig-0"))) + .addItem(toolbarItem() + .add(even)))) + .add(numbers.css(util("mt-sm"))) + .add(sticky.css(util("mt-sm"))) + .element(); + // @code-end:toolbar-sticky + })); + + addSnippet(new Snippet("toolbar-groups", "With groups of items", + code("toolbar-groups"), () -> + // @code-start:toolbar-groups + div() + .add(toolbar() + .addContent(toolbarContent() + .addGroup(toolbarGroup(filterGroup) + .addItem(toolbarItem().add(singleSelect("A") + .style("width", "88px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("toolbar-groups-a", "A") + .selected()) + .addItem(menuItem("toolbar-groups-b", "B")) + .addItem(menuItem("toolbar-groups-c", "C"))))))) + .addItem(toolbarItem().add(singleSelect("1") + .style("width", "120px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("toolbar-groups-1", "1") + .selected()) + .addItem(menuItem("toolbar-groups-2", "2")) + .addItem(menuItem("toolbar-groups-3", "3"))))))) + .addItem(toolbarItem().add(singleSelect("I") + .style("width", "96px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("toolbar-groups-i", "I") + .selected()) + .addItem(menuItem("toolbar-groups-ii", "II")) + .addItem(menuItem("toolbar-groups-iii", + "III")))))))) + .addGroup(toolbarGroup(actionGroupPlain) + .addItem(toolbarItem().add(button(edit()).plain())) + .addItem(toolbarItem().add(button(clone_()).plain())) + .addItem(toolbarItem().add(button(sync()).plain()))) + .addGroup(toolbarGroup(actionGroup) + .addItem(toolbarItem().add(button("Action").primary())) + .addItem(toolbarItem().add(button("Secondary").secondary())) + .addItem(toolbarItem().add(button("Tertiary").tertiary()))))) + .element() + // @code-end:toolbar-groups + )); + + addSnippet(new Snippet("toolbar-color", "Background color variants", + code("toolbar-color"), () -> + // @code-start:toolbar-color + div() + .add("No background") + .add(toolbar().color(noBackground) + .addContent(toolbarContent() + .addItem(toolbarItem() + .add(searchInput("toolbar-color-tig-0"))) + .addItem(toolbarItem() + .add(button("Action").secondary())) + .addDivider() + .addItem(toolbarItem() + .add(button("Action").primary())))) + .add(br()) + .add("Primary background") + .add(toolbar().color(primary) + .addContent(toolbarContent() + .addItem(toolbarItem() + .add(searchInput("toolbar-color-tig-1"))) + .addItem(toolbarItem() + .add(button("Action").secondary())) + .addDivider() + .addItem(toolbarItem() + .add(button("Action").primary())))) + .add(br()) + .add("Secondary background") + .add(toolbar().color(secondary) + .addContent(toolbarContent() + .addItem(toolbarItem() + .add(searchInput("toolbar-color-tig-2"))) + .addItem(toolbarItem() + .add(button("Action").secondary())) + .addDivider() + .addItem(toolbarItem() + .add(button("Action").primary())))) + .element() + // @code-end:toolbar-color + )); + + // ------------------------------------------------------ examples + + addHeader("toolbar-filters", "Examples with toggle groups and filters", + "The following examples use toggle groups to allow for more responsive and complex toolbars " + + "with multiple items and groups of items. To visualize responsive toolbar behavior in the following " + + "examples, resize the browser to a smaller screen width."); + + addSnippet(new Snippet("toolbar-tg", "Toggle groups", + "A toggle group allows you to collapse a set of items into an overlay panel at a certain breakpoint. " + + "For example, when a toggle group contains filter controls, its contents will collapse into an " + + "overlay panel when the toolbar adapts to a change in the viewport size. The contents can be toggled " + + "by selecting the filter icon in the overlay panel.", + code("toolbar-tg"), () -> + // @code-start:toolbar-tg + div() + .add(toolbar() + .addContent(toolbarContent() + .addToggleGroup(toolbarToggleGroup() + .addItem(toolbarItem() + .add(searchInput("toolbar-tg-0"))) + .addGroup(toolbarGroup(filterGroup) + .addItem(toolbarItem().add(singleSelect("Running") + .style("width", "150px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem(menuItem("toolbar-tg-p", + "Pending")) + .addItem(menuItem("toolbar-tg-r", + "Running") + .selected()) + .addItem(menuItem("toolbar-tg-c", + "Cancelled"))))))) + .addItem(toolbarItem().add(singleSelect("Medium") + .style("width", "120px") + .addMenu(singleSelectMenu() + .addContent(menuContent() + .addList(menuList() + .addItem( + menuItem("toolbar-tg-l", "Low")) + .addItem(menuItem("toolbar-tg-m", + "Medium") + .selected()) + .addItem(menuItem("toolbar-tg-h", + "High"))))))))))) + .element() + // @code-end:toolbar-tg + )); + + startApiDocs(Toolbar.class); + addApiDoc(AlignItems.class, other); + addApiDoc(RowWrap.class, other); + addApiDoc(Toolbar.class, component); + addApiDoc(ToolbarColor.class, other); + addApiDoc(ToolbarContent.class, subcomponent); + addApiDoc(ToolbarFilterLabelGroup.class, subcomponent); + addApiDoc(ToolbarFilterContent.class, subcomponent); + addApiDoc(ToolbarGroup.class, subcomponent); + addApiDoc(ToolbarGroupType.class, other); + addApiDoc(ToolbarItem.class, subcomponent); + addApiDoc(ToolbarItemType.class, other); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TooltipComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TooltipComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TooltipComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TooltipComponent.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TreeViewComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TreeViewComponent.java similarity index 98% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TreeViewComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TreeViewComponent.java index 5f9ec60e8..eba94f86c 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/component/TreeViewComponent.java +++ b/showcase/src/main/java/org/patternfly/showcase/component/TreeViewComponent.java @@ -34,8 +34,9 @@ import static java.util.stream.Collectors.toList; import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.div; -import static org.jboss.elemento.Elements.p; import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.p; import static org.patternfly.component.tree.TreeView.treeView; import static org.patternfly.component.tree.TreeViewItem.treeViewItem; import static org.patternfly.component.tree.TreeViewType.checkboxes; @@ -208,7 +209,7 @@ public TreeViewComponent() { )); addSnippet(new Snippet("tv-async", "Async items", - p().add("The tree below contains the ") + content(p).editorial().add("The tree below contains the ") .add(a("https://en.wikipedia.org/wiki/Red_Hot_Chili_Peppers#Discography", "_blank") .text("discography")) .add(" of the Red Hot Chili Peppers. ") diff --git a/showcase/common/src/main/java/org/patternfly/showcase/component/TruncateComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/TruncateComponent.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/component/TruncateComponent.java rename to showcase/src/main/java/org/patternfly/showcase/component/TruncateComponent.java diff --git a/showcase/src/main/java/org/patternfly/showcase/component/WizardComponent.java b/showcase/src/main/java/org/patternfly/showcase/component/WizardComponent.java new file mode 100644 index 000000000..0d9de20ec --- /dev/null +++ b/showcase/src/main/java/org/patternfly/showcase/component/WizardComponent.java @@ -0,0 +1,638 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.patternfly.showcase.component; + +import java.util.function.BiConsumer; + +import org.jboss.elemento.Elements; +import org.jboss.elemento.HTMLContainerBuilder; +import org.jboss.elemento.intl.DateTimeFormat; +import org.jboss.elemento.router.Route; +import org.patternfly.component.Severity; +import org.patternfly.component.emptystate.EmptyState; +import org.patternfly.component.emptystate.EmptyStateBody; +import org.patternfly.component.form.Form; +import org.patternfly.component.form.FormAlert; +import org.patternfly.component.form.TextInput; +import org.patternfly.component.help.HelperText; +import org.patternfly.component.help.HelperTextItem; +import org.patternfly.component.progress.Progress; +import org.patternfly.component.slider.Slider; +import org.patternfly.component.switch_.Switch; +import org.patternfly.component.wizard.Wizard; +import org.patternfly.component.wizard.WizardContext; +import org.patternfly.component.wizard.WizardFooter; +import org.patternfly.component.wizard.WizardHeader; +import org.patternfly.component.wizard.WizardHeaderDescription; +import org.patternfly.component.wizard.WizardHeaderTitle; +import org.patternfly.component.wizard.WizardNav; +import org.patternfly.component.wizard.WizardNavItem; +import org.patternfly.component.wizard.WizardStep; +import org.patternfly.component.wizard.WizardStepChangeHandler; +import org.patternfly.component.wizard.WizardStepEnterHandler; +import org.patternfly.component.wizard.WizardStepLeaveHandler; +import org.patternfly.component.wizard.WizardStepNextHandler; +import org.patternfly.component.wizard.WizardStepNextPromise; +import org.patternfly.component.wizard.WizardStepPreviousHandler; +import org.patternfly.component.wizard.WizardStepPreviousPromise; +import org.patternfly.component.wizard.WizardStepType; +import org.patternfly.showcase.LoremIpsum; +import org.patternfly.showcase.Snippet; +import org.patternfly.showcase.SnippetPage; +import org.patternfly.style.Size; + +import elemental2.core.JsDate; +import elemental2.core.JsRegExp; +import elemental2.dom.HTMLElement; +import elemental2.promise.Promise; + +import static elemental2.dom.DomGlobal.clearInterval; +import static elemental2.dom.DomGlobal.console; +import static elemental2.dom.DomGlobal.navigator; +import static elemental2.dom.DomGlobal.setInterval; +import static org.jboss.elemento.Elements.div; +import static org.jboss.elemento.Elements.isAttached; +import static org.jboss.elemento.Elements.p; +import static org.jboss.elemento.Elements.span; +import static org.jboss.elemento.Elements.strong; +import static org.jboss.elemento.intl.DateTimeFormat.dateTimeFormat; +import static org.jboss.elemento.intl.DateTimeFormatOptions.dateTimeFormatOptions; +import static org.jboss.elemento.intl.Format.medium; +import static org.patternfly.component.Severity.danger; +import static org.patternfly.component.ValidationStatus.default_; +import static org.patternfly.component.ValidationStatus.error; +import static org.patternfly.component.ValidationStatus.success; +import static org.patternfly.component.alert.Alert.alert; +import static org.patternfly.component.button.Button.button; +import static org.patternfly.component.content.Content.content; +import static org.patternfly.component.content.ContentType.p; +import static org.patternfly.component.emptystate.EmptyState.emptyState; +import static org.patternfly.component.emptystate.EmptyStateActions.emptyStateActions; +import static org.patternfly.component.emptystate.EmptyStateBody.emptyStateBody; +import static org.patternfly.component.emptystate.EmptyStateFooter.emptyStateFooter; +import static org.patternfly.component.form.Form.form; +import static org.patternfly.component.form.FormAlert.formAlert; +import static org.patternfly.component.form.FormGroup.formGroup; +import static org.patternfly.component.form.FormGroupControl.formGroupControl; +import static org.patternfly.component.form.FormGroupLabel.formGroupLabel; +import static org.patternfly.component.form.Radio.radio; +import static org.patternfly.component.form.TextInput.textInput; +import static org.patternfly.component.form.TextInputType.number; +import static org.patternfly.component.help.HelperText.helperText; +import static org.patternfly.component.help.HelperTextItem.helperTextItem; +import static org.patternfly.component.modal.Modal.modal; +import static org.patternfly.component.progress.MeasureLocation.outside; +import static org.patternfly.component.progress.Progress.progress; +import static org.patternfly.component.slider.Slider.slider; +import static org.patternfly.component.switch_.Switch.switch_; +import static org.patternfly.component.wizard.Wizard.wizard; +import static org.patternfly.component.wizard.WizardHeader.wizardHeader; +import static org.patternfly.component.wizard.WizardHeaderDescription.wizardHeaderDescription; +import static org.patternfly.component.wizard.WizardHeaderTitle.wizardHeaderTitle; +import static org.patternfly.component.wizard.WizardStep.wizardStep; +import static org.patternfly.component.wizard.WizardStepType.review; +import static org.patternfly.component.wizard.WizardStepType.summary; +import static org.patternfly.icon.IconSets.fas.birthdayCake; +import static org.patternfly.icon.IconSets.fas.cogs; +import static org.patternfly.icon.IconSets.fas.utensils; +import static org.patternfly.layout.bullseye.Bullseye.bullseye; +import static org.patternfly.layout.bullseye.BullseyeItem.bullseyeItem; +import static org.patternfly.layout.flex.AlignItems.center; +import static org.patternfly.layout.flex.Direction.column; +import static org.patternfly.layout.flex.Direction.row; +import static org.patternfly.layout.flex.Flex.flex; +import static org.patternfly.layout.flex.FlexItem.flexItem; +import static org.patternfly.layout.flex.FlexShorthand._1; +import static org.patternfly.layout.flex.Gap.md; +import static org.patternfly.layout.flex.Gap.sm; +import static org.patternfly.showcase.ApiDoc.Type.component; +import static org.patternfly.showcase.ApiDoc.Type.other; +import static org.patternfly.showcase.ApiDoc.Type.subcomponent; +import static org.patternfly.showcase.Code.code; +import static org.patternfly.showcase.Data.components; +import static org.patternfly.style.Size.lg; +import static org.patternfly.style.Size.xs; + +@Route(value = "/components/wizard", title = "Wizard") +public class WizardComponent extends SnippetPage { + + public WizardComponent() { + super(components.get("wizard")); + + startExamples(); + addSnippet(new Snippet("wizard-basic", "Basic", + code("wizard-basic"), () -> + // @code-start:wizard-basic + div() + .add(wizard().height(400) + .addItem(wizardStep("wizard-basic-step-0", "Step 1") + .add(p().text(LoremIpsum.words(60))) + .add(p().text(LoremIpsum.words(40))) + .add(p().text(LoremIpsum.words(30))) + .add(p().text(LoremIpsum.words(50)))) + .addItem(wizardStep("wizard-basic-step-1", "Step 2") + .add(p().text("Step 2 content"))) + .addItem(wizardStep("wizard-basic-step-2", "Review", review) + .add(p().text("Review content")))) + .element() + // @code-end:wizard-basic + )); + + addSnippet(new Snippet("wizard-basic-disabled", "Basic with disabled steps", + code("wizard-basic-disabled"), () -> + // @code-start:wizard-basic-disabled + div() + .add(wizard().height(400) + .addItem(wizardStep("wizard-basic-disabled-step-0", "Step 1") + .add(p().text("Step 1 content"))) + .addItem(wizardStep("wizard-basic-disabled-step-1", "Step 2").disabled() + .add(p().text("Step 2 content"))) + .addItem(wizardStep("wizard-basic-disabled-step-2", "Step 3") + .add(p().text("Step 3 content"))) + .addItem(wizardStep("wizard-basic-disabled-step-3", "Step 4").disabled() + .add(p().text("Step 4 content"))) + .addItem(wizardStep("wizard-basic-disabled-step-4", "Review", review) + .add(p().text("Review content")))) + .element() + // @code-end:wizard-basic-disabled + )); + + addSnippet(new Snippet("wizard-visit-required", "Incrementally enabled steps", + code("wizard-visit-required"), () -> + // @code-start:wizard-visit-required + div() + .add(wizard().visitRequired().height(400) + .addItem(wizardStep("wizard-visit-required-step-0", "Step 1") + .add(p().text("Step 1 content"))) + .addItem(wizardStep("wizard-visit-required-step-1", "Step 2") + .add(p().text("Step 2 content"))) + .addItem(wizardStep("wizard-visit-required-step-2", "Step 3") + .add(p().text("Step 3 content"))) + .addItem(wizardStep("wizard-visit-required-step-3", "Step 4") + .add(p().text("Step 4 content"))) + .addItem(wizardStep("wizard-visit-required-step-4", "Review", review) + .add(p().text("Review content")))) + .element() + // @code-end:wizard-visit-required + )); + + addSnippet(new Snippet("wizard-progress", "Progress after submission", + code("wizard-progress"), () -> { + // @code-start:wizard-progress + int[] counter = new int[1]; + double[] intervalHandle = new double[1]; + Wizard wizard = wizard().height(400); + Progress progress = progress().measureLocation(outside); + + return div() + .add(wizard + .addItem(wizardStep("wizard-progress-step-0", "Step 1") + .add(p().text("Step 1 content"))) + .addItem(wizardStep("wizard-progress-step-1", "Step 2") + .add(p().text("Step 2 content"))) + .addItem(wizardStep("wizard-progress-step-2", "Review", review) + .add(p().text("Review content"))) + .addItem(wizardStep("wizard-progress-step-3", "Progress", WizardStepType.progress) + .add(bullseye().addItem(bullseyeItem() + .add(emptyState().size(lg) + .text("Validating credentials") + .icon(cogs()) + .addBody(emptyStateBody().add(progress)) + .addBody(emptyStateBody().text(LoremIpsum.words(20)))))) + .onEnter((wzd, step) -> { + counter[0] = 0; + progress.value(0); + intervalHandle[0] = setInterval((__) -> { + counter[0] = counter[0] + 1; + if (counter[0] > 5) { + wzd.next(); + } + progress.value(counter[0] * 20); + }, 1000); + }) + .onLeave((wzd, step) -> clearInterval(intervalHandle[0]))) + .addItem(wizardStep("wizard-progress-step-4", "Summary", summary) + .add(bullseye().addItem(bullseyeItem() + .add(emptyState().size(lg) + .text("You're all set!") + .status(Severity.success) + .addBody(emptyStateBody() + .text("Congratulations. You have successfully completed all steps.")) + .addFooter(emptyStateFooter() + .addActions(emptyStateActions() + .add(button("Start over").primary() + .onClick((e, c) -> wizard.select( + "wizard-progress-step-0")))))))))) + .element(); + // @code-end:wizard-progress + })); + + addSnippet(new Snippet("wizard-form-validation", "Form validation", + code("wizard-form-validation"), () -> { + // @code-start:wizard-form-validation + JsRegExp numeric = new JsRegExp("^\\d+$"); + HelperTextItem hti = helperTextItem(); + Wizard wizard = wizard().visitRequired().height(400); + TextInput ageIn = textInput("wizard-form-validation-age", "Thirty"); + HTMLContainerBuilder ageOut = span(); + BiConsumer ageHandler = (textInput, value) -> { + if (numeric.test(value)) { + textInput.validated(default_); + hti.status(default_).text("Write your age in numbers"); + wizard.footer().nextButton().disabled(false); + } else { + textInput.validated(error); + hti.status(error).text("Age has to be a number"); + wizard.footer().nextButton().disabled(true); + } + }; + + return div() + .add(wizard + .addItem(wizardStep("wizard-form-validation-step-0", "Information") + .add(p().text("Information content"))) + .addItem(wizardStep("wizard-form-validation-step-1", "Configuration") + .add(form().addGroup(formGroup("wizard-form-validation-age") + .addLabel(formGroupLabel("Age")) + .addControl(formGroupControl() + .addControl(ageIn.onKeyup((e, ti, value) -> + ageHandler.accept(ti, value))) + .addHelperText(helperText().addItem(hti))))) + .onEnter((wzd, step) -> ageHandler.accept(ageIn, ageIn.value())) + .onLeave((wzd, step) -> wzd.context().store("age", ageIn.value()))) + .addItem(wizardStep("wizard-form-validation-step-2", "Additional") + .add(p().text("Additional content"))) + .addItem(wizardStep("wizard-form-validation-step-3", "Review", review) + .add(p().text("Review content")) + .add(p().add("Age: ").add(ageOut)) + .onEnter((wzd, step) -> ageOut.text(wzd.context().get("age", "n/a"))))) + .element(); + // @code-end:wizard-form-validation + })); + + addSnippet(new Snippet("wizard-progressive", "Progressive steps", + code("wizard-progressive"), () -> + // @code-start:wizard-progressive + div() + .add(wizard().progressive().height(400) + .addItem(wizardStep("wizard-progressive-step-0", "Step 1") + .add(p().text("Step 1 content"))) + .addItem(wizardStep("wizard-progressive-step-1", "Step 2") + .add(p().text("Step 2 content"))) + .addItem(wizardStep("wizard-progressive-step-2", "Step 3") + .add(p().text("Step 3 content"))) + .addItem(wizardStep("wizard-progressive-step-3", "Step 4") + .add(p().text("Step 4 content"))) + .addItem(wizardStep("wizard-progressive-step-4", "Review", review) + .add(p().text("Review content")))) + .element() + // @code-end:wizard-progressive + )); + + addSnippet(new Snippet("wizard-modal", "Within modal", + code("wizard-modal"), () -> + // @code-start:wizard-modal + div().add(button("Show modal").primary().onClick((e, c) -> modal().size(Size.md) + .addWizard(wizard().height(400) + .addHeader(wizardHeader() + .addTitle(wizardHeaderTitle("Wizard in modal")) + .addDescription(wizardHeaderDescription("Simple wizard description"))) + .addItem(wizardStep("wizard-modal-step-0", "Step 1") + .add(p().text("Step 1 content"))) + .addItem(wizardStep("wizard-modal-step-1", "Step 2") + .add(p().text("Step 2 content"))) + .addItem(wizardStep("wizard-modal-step-4", "Review", review) + .add(p().text("Review content")))) + .appendToBody() + .open())) + .element() + // @code-end:wizard-modal + )); + + addSnippet(new Snippet("wizard-step-status", "Step status", + code("wizard-step-status"), () -> { + // @code-start:wizard-step-status + Wizard wizard = wizard(); + return div() + .add(wizard.height(400) + .addItem(wizardStep("wizard-step-status-step-0", "Step 1") + .add(p().text("Step 1 content"))) + .addItem(wizardStep("wizard-step-status-step-1", "Status step") + .add(radio("wizard-step-status-radio-error", "wizard-step-status-radio", + "Give step 1 an error status") + .onChange((e, c, value) -> { + if (value) { + wizard.item("wizard-step-status-step-0").status(error); + } + })) + .add(radio("wizard-step-status-radio-success", "wizard-step-status-radio", + "Give step 1 a success status") + .onChange((e, c, value) -> { + if (value) { + wizard.item("wizard-step-status-step-0").status(success); + } + })) + ) + .addItem(wizardStep("wizard-step-status-step-4", "Review", review) + .add(p().text("Review content")))) + .element(); + // @code-end:wizard-step-status + })); + + addSnippet(new Snippet("wizard-hap", "Handlers and promises", + "This wizard demonstrates how to use various handlers and promises to control the wizard flow.", + code("wizard-hap"), () -> { + // @code-start:wizard-hap + // ------------------------------------------------------ (n)ext (h)andler + + String nhId = "wizard-hap-nh"; + TextInput nhInput = textInput(number, nhId).value("2"); + HelperText nhHelper = helperText("Enter an even number"); + FormAlert nhAlert = formAlert().addAlert(alert(danger, "Invalid number") + .addDescription("Please enter an even number")); + Form nhForm = form() + .addGroup(formGroup(nhId) + .addLabel(formGroupLabel("Number")) + .addControl(formGroupControl() + .add(nhInput) + .add(nhHelper))); + WizardStepNextHandler nh = (wzd, current, next) -> { + boolean even = !nhInput.value().isEmpty() && Integer.parseInt(nhInput.value()) % 2 == 0; + if (even) { + nhForm.clearAlerts(); + nhInput.resetValidation(); + nhHelper.firstItem().status(default_); + } else { + if (!isAttached(nhAlert)) { + nhForm.addAlert(nhAlert); + } + nhInput.validated(error); + nhHelper.firstItem().status(error); + } + return even; + }; + + // ------------------------------------------------------ (p)revious (h)andler + + String phId = "wizard-hap-ph"; + TextInput phInput = textInput(number, phId).value("3"); + HelperText phHelper = helperText("Enter an odd number"); + FormAlert phAlert = formAlert().addAlert(alert(danger, "Invalid number") + .addDescription("Please enter an odd number")); + Form phForm = form() + .addGroup(formGroup(phId) + .addLabel(formGroupLabel("Number")) + .addControl(formGroupControl() + .add(phInput) + .add(phHelper))); + WizardStepPreviousHandler ph = (wzd, current, next) -> { + boolean odd = !phInput.value().isEmpty() && Integer.parseInt(phInput.value()) % 2 != 0; + if (odd) { + phForm.clearAlerts(); + phInput.resetValidation(); + phHelper.firstItem().status(default_); + } else { + if (!isAttached(phAlert)) { + phForm.addAlert(phAlert); + } + phInput.validated(error); + phHelper.firstItem().status(error); + } + return odd; + }; + + // ------------------------------------------------------ cooking steps + + String[] steps = new String[]{ + "Chopping the ingredients πŸ”ͺ", + "Heating up the pan πŸ”₯", + "Throwing everything together 🍳", + "Letting it simmer for a bit ⏳", + "Tasting and adjusting the seasoning πŸ˜‹", + "Plating it nicely 🍽", + "Dinner is served βœ…" + }; + + // ------------------------------------------------------ (n)ext (p)romise + + int[] npIndex = new int[1]; + double[] npHandle = new double[1]; + double[] npInterval = new double[]{1200}; + Switch npSwitch = switch_("wizard-hap-np", "wizard-hap-np", true) + .label("Be a good chef."); + HTMLContainerBuilder npMs = span(); + Slider npSpeed = slider() + .value(npInterval[0]) + .range(200, 2000, 200) + .showTicks(false) + .showBoundaries(false) + .onChange((e, c, value) -> { + npInterval[0] = value; + npMs.text(value + " ms"); + }); + EmptyStateBody npBody = emptyStateBody(); + EmptyState npEmptyState = emptyState().size(xs).addBody(npBody); + WizardStepEnterHandler npEnter = (wzd, step) -> { + npEmptyState.clearStatus().icon(utensils()).text("I'm hungry"); + npBody.text("Think of your favorite meal and press 'Next'."); + }; + WizardStepNextPromise np = (wzd, current, next) -> { + npIndex[0] = 0; + boolean success = npSwitch.value(); + int end = success ? steps.length : 3 + (int) (Math.random() * (steps.length - 3)); + npEmptyState.clearStatus().spinner().text("I'm hungry."); + return new Promise<>((resolve, reject) -> { + npHandle[0] = setInterval((__) -> { + npBody.text(steps[npIndex[0]++]); + if (npIndex[0] > end) { + clearInterval(npHandle[0]); + if (!success) { + npEmptyState.status(danger).text("The chef failed"); + npBody.text("Try again later."); + } + resolve.onInvoke(success); + } + }, npInterval[0]); + }); + }; + + // ------------------------------------------------------ (p)revious (p)romise + + int[] ppIndex = new int[1]; + double[] ppHandle = new double[1]; + double[] ppInterval = new double[]{1200}; + Switch ppSwitch = switch_("wizard-hap-pp", "wizard-hap-pp", true) + .label("Be a good chef."); + HTMLContainerBuilder ppMs = span(); + Slider ppSpeed = slider() + .value(npInterval[0]) + .range(200, 2000, 200) + .showTicks(false) + .showBoundaries(false) + .onChange((e, c, value) -> { + ppInterval[0] = value; + ppMs.text(value + " ms"); + }); + EmptyStateBody ppBody = emptyStateBody(); + EmptyState ppEmptyState = emptyState().size(xs).addBody(ppBody); + WizardStepEnterHandler ppEnter = (wzd, step) -> { + ppEmptyState.clearStatus().icon(utensils()).text("I'm hungry"); + ppBody.text("Think of your favorite meal and press 'Back'."); + }; + WizardStepPreviousPromise pp = (wzd, current, next) -> { + ppIndex[0] = 0; + boolean success = ppSwitch.value(); + int end = success ? steps.length : 3 + (int) (Math.random() * (steps.length - 3)); + ppEmptyState.clearStatus().spinner().text("I'm hungry."); + return new Promise<>((resolve, reject) -> { + ppHandle[0] = setInterval((__) -> { + ppBody.text(steps[ppIndex[0]++]); + if (ppIndex[0] > end) { + clearInterval(ppHandle[0]); + if (!success) { + ppEmptyState.status(danger).text("The chef failed"); + ppBody.text("Try again later."); + } + resolve.onInvoke(success); + } + }, ppInterval[0]); + }); + }; + + // ------------------------------------------------------ enter and leave handlers + + DateTimeFormat dtf = dateTimeFormat(navigator.language, dateTimeFormatOptions().timeStyle(medium)); + HTMLContainerBuilder ehTime = strong("n/a"); + WizardStepEnterHandler eh = (wzd, step) -> ehTime.text(dtf.format(new JsDate())); + HTMLContainerBuilder lhTime = strong("n/a"); + WizardStepLeaveHandler lh = (wzd, step) -> lhTime.text(dtf.format(new JsDate())); + + // ------------------------------------------------------ wizard and step components + + return div() + .add(wizard().height(450) + .onStepChange((wzd, previous, current) -> { + if (previous == null) { + console.log("Step changed to '%s'", current.identifier()); + } else { + console.log("Step changed from '%s' to '%s'", + previous.identifier(), current.identifier()); + } + }) + .addItem(wizardStep("wizard-hap-step-nh", "Next handler") + .add(content(p).editorial() + .add("This step has a ") + .add(Elements.code("WizardStepNextHandler")) + .add(" that returns ") + .add(Elements.code("true")) + .add(" if the number is even.")) + .add(content(p).editorial() + .add("This prevents a next step from being executed as long as the number is not even.")) + .add(nhForm) + .nextIf(nh)) + .addItem(wizardStep("wizard-hap-step-np", "Next promise") + .add(flex().direction(column).gap(md) + .addItem(flexItem() + .add(content(p).editorial() + .add("This step has a ") + .add(Elements.code("WizardStepNextPromise")) + .add(" that simulates cooking a meal and you can decide whether you get something to eat or not.")) + .add(flex().direction(row).gap(md).alignItems(center) + .addItem(flexItem().add(npSwitch)) + .addItem(flexItem().flex(_1) + .add(flex().direction(row).gap(sm).alignItems(center) + .addItem(flexItem().add("Cooking speed: ")) + .addItem(flexItem().flex(_1).add(npSpeed)) + .addItem(flexItem().add(npMs)))))) + .addItem(flexItem().add(npEmptyState))) + .onEnter(npEnter) + .nextIfPromised(np)) + .addItem(wizardStep("wizard-hap-step-ph", "Previous handler") + .add(content(p).editorial() + .add("This step has a ") + .add(Elements.code("WizardStepPreviousHandler")) + .add(" that returns ") + .add(Elements.code("true")) + .add(" if the number is odd.")) + .add(content(p).editorial() + .add("This prevents a previous step from being executed as long as the number is not odd.")) + .add(phForm) + .previousIf(ph)) + .addItem(wizardStep("wizard-hap-step-pp", "Previous promise") + .add(flex().direction(column).gap(md) + .addItem(flexItem() + .add(content(p).editorial() + .add("This step has a ") + .add(Elements.code("WizardStepPreviousPromise")) + .add(" that simulates cooking a meal and you can decide whether you get something to eat or not.")) + .add(flex().direction(row).gap(md).alignItems(center) + .addItem(flexItem().add(ppSwitch)) + .addItem(flexItem().flex(_1) + .add(flex().direction(row).gap(sm).alignItems(center) + .addItem(flexItem().add("Cooking speed: ")) + .addItem(flexItem().flex(_1).add(ppSpeed)) + .addItem(flexItem().add(ppMs)))))) + .addItem(flexItem().add(ppEmptyState))) + .onEnter(ppEnter) + .previousIfPromised(pp)) + .addItem(wizardStep("wizard-hap-step-eh", "Enter handler") + .add(content(p).editorial() + .add("This step has a ") + .add(Elements.code("WizardStepEnterHandler")) + .add(" that logs the time when you've entered this step.")) + .add(content(p).editorial() + .add("Step entered at ") + .add(ehTime)) + .onEnter(eh)) + .addItem(wizardStep("wizard-hap-step-lh", "Leave handler") + .add(content(p).editorial() + .add("This step has a ") + .add(Elements.code("WizardStepLeaveHandler")) + .add(" that logs the time when you've left this step.")) + .add(content(p).editorial() + .add("Step left at ") + .add(lhTime)) + .onLeave(lh)) + .addItem(wizardStep("wizard-hap-step-rvw", "Review", review) + .add(bullseye().addItem(bullseyeItem().add(emptyState().size(xs) + .icon(birthdayCake()) + .text("Congratulations!") + .addBody(emptyStateBody().add(content(p).editorial() + .text("You have successfully completed all steps.")))))))) + .element(); + // @code-end:wizard-hap + })); + + startApiDocs(Wizard.class); + addApiDoc(Wizard.class, component); + addApiDoc(WizardContext.class, other); + addApiDoc(WizardFooter.class, subcomponent); + addApiDoc(WizardHeader.class, subcomponent); + addApiDoc(WizardHeaderDescription.class, subcomponent); + addApiDoc(WizardHeaderTitle.class, subcomponent); + addApiDoc(WizardNav.class, subcomponent); + addApiDoc(WizardNavItem.class, subcomponent); + addApiDoc(WizardStep.class, subcomponent); + addApiDoc(WizardStepChangeHandler.class, other); + addApiDoc(WizardStepEnterHandler.class, other); + addApiDoc(WizardStepLeaveHandler.class, other); + addApiDoc(WizardStepNextHandler.class, other); + addApiDoc(WizardStepNextPromise.class, other); + addApiDoc(WizardStepPreviousHandler.class, other); + addApiDoc(WizardStepPreviousPromise.class, other); + addApiDoc(WizardStepType.class, other); + } +} diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/BullseyeLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/BullseyeLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/BullseyeLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/BullseyeLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/FlexLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/FlexLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/FlexLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/FlexLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/GalleryLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/GalleryLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/GalleryLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/GalleryLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/GridLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/GridLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/GridLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/GridLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/Layout.java b/showcase/src/main/java/org/patternfly/showcase/layout/Layout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/Layout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/Layout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/LayoutsPage.java b/showcase/src/main/java/org/patternfly/showcase/layout/LayoutsPage.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/LayoutsPage.java rename to showcase/src/main/java/org/patternfly/showcase/layout/LayoutsPage.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/LevelLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/LevelLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/LevelLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/LevelLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/SplitLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/SplitLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/SplitLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/SplitLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/layout/StackLayout.java b/showcase/src/main/java/org/patternfly/showcase/layout/StackLayout.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/layout/StackLayout.java rename to showcase/src/main/java/org/patternfly/showcase/layout/StackLayout.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Coordinates.java b/showcase/src/main/java/org/patternfly/showcase/model/Coordinates.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Coordinates.java rename to showcase/src/main/java/org/patternfly/showcase/model/Coordinates.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/DateOfBirth.java b/showcase/src/main/java/org/patternfly/showcase/model/DateOfBirth.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/DateOfBirth.java rename to showcase/src/main/java/org/patternfly/showcase/model/DateOfBirth.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Discography.java b/showcase/src/main/java/org/patternfly/showcase/model/Discography.java similarity index 91% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Discography.java rename to showcase/src/main/java/org/patternfly/showcase/model/Discography.java index 181970370..b20152f93 100644 --- a/showcase/common/src/main/java/org/patternfly/showcase/model/Discography.java +++ b/showcase/src/main/java/org/patternfly/showcase/model/Discography.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.function.Predicate; -import org.patternfly.showcase.ResourceBundle; +import org.patternfly.showcase.ResourcesImpl; import jsinterop.base.Js; import jsinterop.base.JsPropertyMap; @@ -31,7 +31,7 @@ public class Discography { public static JsPropertyMap data; static { - data = Js.cast(JSON.parse(ResourceBundle.rhcp)); + data = Js.cast(JSON.parse(ResourcesImpl.INSTANCE.rhcp().getText())); } public static List records(Predicate predicate) { diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Location.java b/showcase/src/main/java/org/patternfly/showcase/model/Location.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Location.java rename to showcase/src/main/java/org/patternfly/showcase/model/Location.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Login.java b/showcase/src/main/java/org/patternfly/showcase/model/Login.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Login.java rename to showcase/src/main/java/org/patternfly/showcase/model/Login.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Name.java b/showcase/src/main/java/org/patternfly/showcase/model/Name.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Name.java rename to showcase/src/main/java/org/patternfly/showcase/model/Name.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Picture.java b/showcase/src/main/java/org/patternfly/showcase/model/Picture.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Picture.java rename to showcase/src/main/java/org/patternfly/showcase/model/Picture.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Record.java b/showcase/src/main/java/org/patternfly/showcase/model/Record.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Record.java rename to showcase/src/main/java/org/patternfly/showcase/model/Record.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Repositories.java b/showcase/src/main/java/org/patternfly/showcase/model/Repositories.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Repositories.java rename to showcase/src/main/java/org/patternfly/showcase/model/Repositories.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Repository.java b/showcase/src/main/java/org/patternfly/showcase/model/Repository.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Repository.java rename to showcase/src/main/java/org/patternfly/showcase/model/Repository.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Server.java b/showcase/src/main/java/org/patternfly/showcase/model/Server.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Server.java rename to showcase/src/main/java/org/patternfly/showcase/model/Server.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Street.java b/showcase/src/main/java/org/patternfly/showcase/model/Street.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Street.java rename to showcase/src/main/java/org/patternfly/showcase/model/Street.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Timezone.java b/showcase/src/main/java/org/patternfly/showcase/model/Timezone.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Timezone.java rename to showcase/src/main/java/org/patternfly/showcase/model/Timezone.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/Track.java b/showcase/src/main/java/org/patternfly/showcase/model/Track.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/Track.java rename to showcase/src/main/java/org/patternfly/showcase/model/Track.java diff --git a/showcase/common/src/main/java/org/patternfly/showcase/model/User.java b/showcase/src/main/java/org/patternfly/showcase/model/User.java similarity index 100% rename from showcase/common/src/main/java/org/patternfly/showcase/model/User.java rename to showcase/src/main/java/org/patternfly/showcase/model/User.java diff --git a/showcase/j2cl/src/main/resources/META-INF/externs/highlight.externs.js b/showcase/src/main/resources/META-INF/externs/highlight.externs.js similarity index 100% rename from showcase/j2cl/src/main/resources/META-INF/externs/highlight.externs.js rename to showcase/src/main/resources/META-INF/externs/highlight.externs.js diff --git a/showcase/j2cl/src/main/resources/META-INF/externs/showcase.externs.js b/showcase/src/main/resources/META-INF/externs/showcase.externs.js similarity index 82% rename from showcase/j2cl/src/main/resources/META-INF/externs/showcase.externs.js rename to showcase/src/main/resources/META-INF/externs/showcase.externs.js index b2f9ba284..d01629a37 100644 --- a/showcase/j2cl/src/main/resources/META-INF/externs/showcase.externs.js +++ b/showcase/src/main/resources/META-INF/externs/showcase.externs.js @@ -65,3 +65,24 @@ Layout.prototype.clazz /** @type {string} */ Layout.prototype.summary + +// ------------------------------------------------------ chart + +/** @constructor */ +function Chart() { +} + +/** @type {string} */ +Chart.prototype.name + +/** @type {string} */ +Chart.prototype.title + +/** @type {string} */ +Chart.prototype.route + +/** @type {string} */ +Chart.prototype.clazz + +/** @type {string} */ +Chart.prototype.summary diff --git a/showcase/common/src/bundle/avatar-light.svg b/showcase/src/main/resources/org/patternfly/showcase/avatar.svg similarity index 100% rename from showcase/common/src/bundle/avatar-light.svg rename to showcase/src/main/resources/org/patternfly/showcase/avatar.svg diff --git a/showcase/src/main/resources/org/patternfly/showcase/charts.json b/showcase/src/main/resources/org/patternfly/showcase/charts.json new file mode 100644 index 000000000..a523763d9 --- /dev/null +++ b/showcase/src/main/resources/org/patternfly/showcase/charts.json @@ -0,0 +1,30 @@ +{ + "bullet": { + "name": "bullet", + "title": "Bullet", + "route": "/charts/bullet", + "clazz": "org.patternfly.chart.bullet.Bullet", + "summary": "A bullet chart can be thought of as an extension to a bar chart that measures a dynamic value with thresholds and target values. " + }, + "donut": { + "name": "donut", + "title": "Donut", + "route": "/charts/donut", + "clazz": "org.patternfly.chart.donut.Donut", + "summary": "A donut chart represents relative amounts that must add up to 100%." + }, + "donut-utilization": { + "name": "donut-utilization", + "title": "Donut utilization", + "route": "/charts/donut-utilization", + "clazz": "org.patternfly.chart.utilization.DonutUtilization", + "summary": "A donut utilization chart is a donut chart used specifically to show utilization metrics." + }, + "pie": { + "name": "pie", + "title": "Pie", + "route": "/charts/pie", + "clazz": "org.patternfly.chart.pie.Pie", + "summary": "A pie chart is commonly used to show percentages or proportional data." + } +} \ No newline at end of file diff --git a/showcase/common/src/bundle/components.json b/showcase/src/main/resources/org/patternfly/showcase/components.json similarity index 98% rename from showcase/common/src/bundle/components.json rename to showcase/src/main/resources/org/patternfly/showcase/components.json index 74d93af33..8bfc1c1d1 100644 --- a/showcase/common/src/bundle/components.json +++ b/showcase/src/main/resources/org/patternfly/showcase/components.json @@ -157,7 +157,7 @@ "name": "content", "title": "Content", "route": "/components/content", - "clazz": "org.patternfly.component.text.Content", + "clazz": "org.patternfly.component.content.Content", "illustration": "content.png", "summary": "A content component contains a block of styled HTML content." }, @@ -259,14 +259,6 @@ "illustration": "file-upload.png", "summary": "A simple file upload component allows users to select and upload a single file to a specific location." }, - "form-control": { - "name": "form-control", - "title": "Form control", - "route": "/components/forms/form-control", - "clazz": "org.patternfly.component.form.FormControl", - "illustration": "form-control.png", - "summary": "A form control is a form element that guides users and accepts user input, such as text areas and selection menus." - }, "form": { "name": "form", "title": "Form", @@ -275,6 +267,14 @@ "illustration": "form.png", "summary": "A form is a group of related elements that allow users to provide data and configure options in a variety of contexts, such as within modals, wizards, and pages." }, + "form-control": { + "name": "form-control", + "title": "Form control", + "route": "/components/forms/form-control", + "clazz": "org.patternfly.component.form.FormControl", + "illustration": "form-control.png", + "summary": "A form control is a form element that guides users and accepts user input, such as text areas and selection menus." + }, "form-select": { "name": "form-select", "title": "Form select", @@ -397,6 +397,7 @@ "name": "notification-badge", "title": "Notification badge", "route": "/components/notification-badge", + "clazz": "org.patternfly.component.notification.NotificationBadge", "illustration": "notification-badge.png", "summary": "A notification badge is a visual indicator that alerts users about incoming notifications." }, @@ -404,6 +405,7 @@ "name": "notification-drawer", "title": "Notification drawer", "route": "/components/notification-drawer", + "clazz": "org.patternfly.component.notification.NotificationDrawer", "illustration": "notification-drawer.png", "summary": "A notification drawer contains an application's notifications, which users can view and manage without having to navigate to a new screen." }, @@ -411,6 +413,7 @@ "name": "number-input", "title": "Number input", "route": "/components/number-input", + "clazz": "org.patternfly.component.notification.NumberInput", "illustration": "number-input.png", "summary": "A number input combines a text input field with buttons to provide users with a quick and effective way to enter and modify a numeric value." }, @@ -470,6 +473,7 @@ "name": "progress-stepper", "title": "Progress stepper", "route": "/components/progress-stepper", + "clazz": "org.patternfly.component.progressstepper.ProgressStepper", "illustration": "progress-stepper.png", "summary": "A progress stepper displays a timeline of tasks in a workflow and tracks a user's progress through the workflow." }, @@ -508,7 +512,6 @@ "name": "sidebar", "title": "Sidebar", "route": "/components/sidebar", - "clazz": "org.patternfly.component.page.Sidebar", "illustration": "sidebar.png", "summary": "A sidebar is a panel that splits content into a secondary area within a page." }, @@ -617,7 +620,8 @@ "timestamp": { "name": "timestamp", "title": "Timestamp", - "route": "/components/date-and-time/timestamp", + "route": "/components/timestamp", + "clazz": "org.patternfly.component.timestamp.Timestamp", "illustration": "timestamp.png", "summary": "A timestamp is a consistently formatted visual that displays date and time values." }, @@ -673,6 +677,7 @@ "name": "wizard", "title": "Wizard", "route": "/components/wizard", + "clazz": "org.patternfly.component.wizard.Wizard", "illustration": "wizard.png", "summary": "A wizard is a guided workflow that helps users complete complex tasks, create objects, or follow a series of steps." } diff --git a/showcase/common/src/bundle/layouts.json b/showcase/src/main/resources/org/patternfly/showcase/layouts.json similarity index 100% rename from showcase/common/src/bundle/layouts.json rename to showcase/src/main/resources/org/patternfly/showcase/layouts.json diff --git a/showcase/common/src/bundle/pf-logo.svg b/showcase/src/main/resources/org/patternfly/showcase/pf-logo.svg similarity index 76% rename from showcase/common/src/bundle/pf-logo.svg rename to showcase/src/main/resources/org/patternfly/showcase/pf-logo.svg index 2bbd45d54..887d20c3c 100644 --- a/showcase/common/src/bundle/pf-logo.svg +++ b/showcase/src/main/resources/org/patternfly/showcase/pf-logo.svg @@ -1,33 +1,28 @@ - - PF-HorizontalLogo-Color + + PF-HorizontalLogo-Color - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + - \ No newline at end of file + diff --git a/showcase/common/src/bundle/rhcp.json b/showcase/src/main/resources/org/patternfly/showcase/rhcp.json similarity index 100% rename from showcase/common/src/bundle/rhcp.json rename to showcase/src/main/resources/org/patternfly/showcase/rhcp.json diff --git a/showcase/common/src/bundle/servers.json b/showcase/src/main/resources/org/patternfly/showcase/servers.json similarity index 100% rename from showcase/common/src/bundle/servers.json rename to showcase/src/main/resources/org/patternfly/showcase/servers.json diff --git a/showcase/common/src/bundle/users.json b/showcase/src/main/resources/org/patternfly/showcase/users.json similarity index 100% rename from showcase/common/src/bundle/users.json rename to showcase/src/main/resources/org/patternfly/showcase/users.json diff --git a/showcase/j2cl/src/web/dev.html b/showcase/src/web/dev.html similarity index 100% rename from showcase/j2cl/src/web/dev.html rename to showcase/src/web/dev.html diff --git a/showcase/gwt/src/web/favicon.png b/showcase/src/web/favicon.png similarity index 100% rename from showcase/gwt/src/web/favicon.png rename to showcase/src/web/favicon.png diff --git a/showcase/src/web/images/about-modal.png b/showcase/src/web/images/about-modal.png new file mode 100644 index 000000000..098a4aaa1 Binary files /dev/null and b/showcase/src/web/images/about-modal.png differ diff --git a/showcase/src/web/images/accordion.png b/showcase/src/web/images/accordion.png new file mode 100644 index 000000000..e4929ec1a Binary files /dev/null and b/showcase/src/web/images/accordion.png differ diff --git a/showcase/src/web/images/action-list.png b/showcase/src/web/images/action-list.png new file mode 100644 index 000000000..1df8287ac Binary files /dev/null and b/showcase/src/web/images/action-list.png differ diff --git a/showcase/src/web/images/alert.png b/showcase/src/web/images/alert.png new file mode 100644 index 000000000..966db3bbb Binary files /dev/null and b/showcase/src/web/images/alert.png differ diff --git a/showcase/src/web/images/application-launcher.png b/showcase/src/web/images/application-launcher.png new file mode 100644 index 000000000..3a2d501b1 Binary files /dev/null and b/showcase/src/web/images/application-launcher.png differ diff --git a/showcase/src/web/images/avatar.png b/showcase/src/web/images/avatar.png new file mode 100644 index 000000000..8dedd7c87 Binary files /dev/null and b/showcase/src/web/images/avatar.png differ diff --git a/showcase/src/web/images/back-to-top.png b/showcase/src/web/images/back-to-top.png new file mode 100644 index 000000000..42cdb15fe Binary files /dev/null and b/showcase/src/web/images/back-to-top.png differ diff --git a/showcase/src/web/images/backdrop.png b/showcase/src/web/images/backdrop.png new file mode 100644 index 000000000..18f27383d Binary files /dev/null and b/showcase/src/web/images/backdrop.png differ diff --git a/showcase/src/web/images/background-image.png b/showcase/src/web/images/background-image.png new file mode 100644 index 000000000..23d184069 Binary files /dev/null and b/showcase/src/web/images/background-image.png differ diff --git a/showcase/src/web/images/badge.png b/showcase/src/web/images/badge.png new file mode 100644 index 000000000..f5152656e Binary files /dev/null and b/showcase/src/web/images/badge.png differ diff --git a/showcase/src/web/images/banner.png b/showcase/src/web/images/banner.png new file mode 100644 index 000000000..6ee0cfcac Binary files /dev/null and b/showcase/src/web/images/banner.png differ diff --git a/showcase/src/web/images/brand.png b/showcase/src/web/images/brand.png new file mode 100644 index 000000000..64aa21811 Binary files /dev/null and b/showcase/src/web/images/brand.png differ diff --git a/showcase/src/web/images/breadcrumb.png b/showcase/src/web/images/breadcrumb.png new file mode 100644 index 000000000..e1188e088 Binary files /dev/null and b/showcase/src/web/images/breadcrumb.png differ diff --git a/showcase/src/web/images/button.png b/showcase/src/web/images/button.png new file mode 100644 index 000000000..ba738faca Binary files /dev/null and b/showcase/src/web/images/button.png differ diff --git a/showcase/src/web/images/calendar-month.png b/showcase/src/web/images/calendar-month.png new file mode 100644 index 000000000..779a09f2c Binary files /dev/null and b/showcase/src/web/images/calendar-month.png differ diff --git a/showcase/src/web/images/card.png b/showcase/src/web/images/card.png new file mode 100644 index 000000000..8bd07d047 Binary files /dev/null and b/showcase/src/web/images/card.png differ diff --git a/showcase/src/web/images/checkbox.png b/showcase/src/web/images/checkbox.png new file mode 100644 index 000000000..b9e996c04 Binary files /dev/null and b/showcase/src/web/images/checkbox.png differ diff --git a/showcase/src/web/images/chip.png b/showcase/src/web/images/chip.png new file mode 100644 index 000000000..0dd187cfd Binary files /dev/null and b/showcase/src/web/images/chip.png differ diff --git a/showcase/src/web/images/clipboard-copy.png b/showcase/src/web/images/clipboard-copy.png new file mode 100644 index 000000000..d5565dc97 Binary files /dev/null and b/showcase/src/web/images/clipboard-copy.png differ diff --git a/showcase/src/web/images/code-block.png b/showcase/src/web/images/code-block.png new file mode 100644 index 000000000..c62c85a4f Binary files /dev/null and b/showcase/src/web/images/code-block.png differ diff --git a/showcase/src/web/images/code-editor.png b/showcase/src/web/images/code-editor.png new file mode 100644 index 000000000..3791b1b19 Binary files /dev/null and b/showcase/src/web/images/code-editor.png differ diff --git a/showcase/src/web/images/content.png b/showcase/src/web/images/content.png new file mode 100644 index 000000000..ec20d1e89 Binary files /dev/null and b/showcase/src/web/images/content.png differ diff --git a/showcase/src/web/images/context-selector.png b/showcase/src/web/images/context-selector.png new file mode 100644 index 000000000..7ec64e68c Binary files /dev/null and b/showcase/src/web/images/context-selector.png differ diff --git a/showcase/src/web/images/custom-menus.png b/showcase/src/web/images/custom-menus.png new file mode 100644 index 000000000..cbe910979 Binary files /dev/null and b/showcase/src/web/images/custom-menus.png differ diff --git a/showcase/src/web/images/data-list.png b/showcase/src/web/images/data-list.png new file mode 100644 index 000000000..07143216c Binary files /dev/null and b/showcase/src/web/images/data-list.png differ diff --git a/showcase/src/web/images/date-and-time-picker.png b/showcase/src/web/images/date-and-time-picker.png new file mode 100644 index 000000000..01a863f53 Binary files /dev/null and b/showcase/src/web/images/date-and-time-picker.png differ diff --git a/showcase/src/web/images/date-picker.png b/showcase/src/web/images/date-picker.png new file mode 100644 index 000000000..b581c0d47 Binary files /dev/null and b/showcase/src/web/images/date-picker.png differ diff --git a/showcase/src/web/images/description-list.png b/showcase/src/web/images/description-list.png new file mode 100644 index 000000000..357d1cf0e Binary files /dev/null and b/showcase/src/web/images/description-list.png differ diff --git a/showcase/src/web/images/divider.png b/showcase/src/web/images/divider.png new file mode 100644 index 000000000..de3a03f09 Binary files /dev/null and b/showcase/src/web/images/divider.png differ diff --git a/showcase/src/web/images/drag-and-drop.png b/showcase/src/web/images/drag-and-drop.png new file mode 100644 index 000000000..b5615cb90 Binary files /dev/null and b/showcase/src/web/images/drag-and-drop.png differ diff --git a/showcase/src/web/images/drawer.png b/showcase/src/web/images/drawer.png new file mode 100644 index 000000000..a717bae81 Binary files /dev/null and b/showcase/src/web/images/drawer.png differ diff --git a/showcase/src/web/images/dropdown.png b/showcase/src/web/images/dropdown.png new file mode 100644 index 000000000..319641246 Binary files /dev/null and b/showcase/src/web/images/dropdown.png differ diff --git a/showcase/src/web/images/dual-list-selector.png b/showcase/src/web/images/dual-list-selector.png new file mode 100644 index 000000000..6a9f3e13e Binary files /dev/null and b/showcase/src/web/images/dual-list-selector.png differ diff --git a/showcase/src/web/images/empty-state.png b/showcase/src/web/images/empty-state.png new file mode 100644 index 000000000..c24957e77 Binary files /dev/null and b/showcase/src/web/images/empty-state.png differ diff --git a/showcase/src/web/images/expandable-section.png b/showcase/src/web/images/expandable-section.png new file mode 100644 index 000000000..f8f9c1cd9 Binary files /dev/null and b/showcase/src/web/images/expandable-section.png differ diff --git a/showcase/src/web/images/form-control.png b/showcase/src/web/images/form-control.png new file mode 100644 index 000000000..058c49ce2 Binary files /dev/null and b/showcase/src/web/images/form-control.png differ diff --git a/showcase/src/web/images/form-select.png b/showcase/src/web/images/form-select.png new file mode 100644 index 000000000..074551b47 Binary files /dev/null and b/showcase/src/web/images/form-select.png differ diff --git a/showcase/src/web/images/form.png b/showcase/src/web/images/form.png new file mode 100644 index 000000000..4f4bcec85 Binary files /dev/null and b/showcase/src/web/images/form.png differ diff --git a/showcase/src/web/images/helper-text.png b/showcase/src/web/images/helper-text.png new file mode 100644 index 000000000..338a837b1 Binary files /dev/null and b/showcase/src/web/images/helper-text.png differ diff --git a/showcase/src/web/images/hint.png b/showcase/src/web/images/hint.png new file mode 100644 index 000000000..3664d16ef Binary files /dev/null and b/showcase/src/web/images/hint.png differ diff --git a/showcase/src/web/images/icon.png b/showcase/src/web/images/icon.png new file mode 100644 index 000000000..edd3fd600 Binary files /dev/null and b/showcase/src/web/images/icon.png differ diff --git a/showcase/src/web/images/inline-edit.png b/showcase/src/web/images/inline-edit.png new file mode 100644 index 000000000..7f2762bb8 Binary files /dev/null and b/showcase/src/web/images/inline-edit.png differ diff --git a/showcase/src/web/images/input-group.png b/showcase/src/web/images/input-group.png new file mode 100644 index 000000000..302e57ef4 Binary files /dev/null and b/showcase/src/web/images/input-group.png differ diff --git a/showcase/src/web/images/jump-links.png b/showcase/src/web/images/jump-links.png new file mode 100644 index 000000000..b49565118 Binary files /dev/null and b/showcase/src/web/images/jump-links.png differ diff --git a/showcase/src/web/images/label.png b/showcase/src/web/images/label.png new file mode 100644 index 000000000..31d2ec926 Binary files /dev/null and b/showcase/src/web/images/label.png differ diff --git a/showcase/src/web/images/list.png b/showcase/src/web/images/list.png new file mode 100644 index 000000000..e730406ba Binary files /dev/null and b/showcase/src/web/images/list.png differ diff --git a/showcase/src/web/images/login-page.png b/showcase/src/web/images/login-page.png new file mode 100644 index 000000000..6406e3505 Binary files /dev/null and b/showcase/src/web/images/login-page.png differ diff --git a/showcase/src/web/images/masthead.png b/showcase/src/web/images/masthead.png new file mode 100644 index 000000000..444fa9a9d Binary files /dev/null and b/showcase/src/web/images/masthead.png differ diff --git a/showcase/src/web/images/menu-toggle.png b/showcase/src/web/images/menu-toggle.png new file mode 100644 index 000000000..c3c416df7 Binary files /dev/null and b/showcase/src/web/images/menu-toggle.png differ diff --git a/showcase/src/web/images/menu.png b/showcase/src/web/images/menu.png new file mode 100644 index 000000000..6f9865a44 Binary files /dev/null and b/showcase/src/web/images/menu.png differ diff --git a/showcase/src/web/images/modal.png b/showcase/src/web/images/modal.png new file mode 100644 index 000000000..c2dacc4f5 Binary files /dev/null and b/showcase/src/web/images/modal.png differ diff --git a/showcase/src/web/images/multiple-file-upload.png b/showcase/src/web/images/multiple-file-upload.png new file mode 100644 index 000000000..32a24b293 Binary files /dev/null and b/showcase/src/web/images/multiple-file-upload.png differ diff --git a/showcase/src/web/images/navigation.png b/showcase/src/web/images/navigation.png new file mode 100644 index 000000000..f5ad0ca51 Binary files /dev/null and b/showcase/src/web/images/navigation.png differ diff --git a/showcase/src/web/images/notification-badge.png b/showcase/src/web/images/notification-badge.png new file mode 100644 index 000000000..736528a85 Binary files /dev/null and b/showcase/src/web/images/notification-badge.png differ diff --git a/showcase/src/web/images/notification-drawer.png b/showcase/src/web/images/notification-drawer.png new file mode 100644 index 000000000..7404abbb5 Binary files /dev/null and b/showcase/src/web/images/notification-drawer.png differ diff --git a/showcase/src/web/images/number-input.png b/showcase/src/web/images/number-input.png new file mode 100644 index 000000000..5443fe5d3 Binary files /dev/null and b/showcase/src/web/images/number-input.png differ diff --git a/showcase/src/web/images/options-menu.png b/showcase/src/web/images/options-menu.png new file mode 100644 index 000000000..05dddb7b3 Binary files /dev/null and b/showcase/src/web/images/options-menu.png differ diff --git a/showcase/src/web/images/overflow-menu.png b/showcase/src/web/images/overflow-menu.png new file mode 100644 index 000000000..497908bd5 Binary files /dev/null and b/showcase/src/web/images/overflow-menu.png differ diff --git a/showcase/src/web/images/page.png b/showcase/src/web/images/page.png new file mode 100644 index 000000000..32097203d Binary files /dev/null and b/showcase/src/web/images/page.png differ diff --git a/showcase/src/web/images/pagination.png b/showcase/src/web/images/pagination.png new file mode 100644 index 000000000..bb8c1fcf4 Binary files /dev/null and b/showcase/src/web/images/pagination.png differ diff --git a/showcase/src/web/images/panel.png b/showcase/src/web/images/panel.png new file mode 100644 index 000000000..d4c0ac5f3 Binary files /dev/null and b/showcase/src/web/images/panel.png differ diff --git a/showcase/src/web/images/password-generator.png b/showcase/src/web/images/password-generator.png new file mode 100644 index 000000000..9e9d6f71a Binary files /dev/null and b/showcase/src/web/images/password-generator.png differ diff --git a/showcase/src/web/images/password-strength.png b/showcase/src/web/images/password-strength.png new file mode 100644 index 000000000..749167e39 Binary files /dev/null and b/showcase/src/web/images/password-strength.png differ diff --git a/showcase/src/web/images/popover.png b/showcase/src/web/images/popover.png new file mode 100644 index 000000000..8ff5a963e Binary files /dev/null and b/showcase/src/web/images/popover.png differ diff --git a/showcase/src/web/images/progress-stepper.png b/showcase/src/web/images/progress-stepper.png new file mode 100644 index 000000000..147f7e4fe Binary files /dev/null and b/showcase/src/web/images/progress-stepper.png differ diff --git a/showcase/src/web/images/progress.png b/showcase/src/web/images/progress.png new file mode 100644 index 000000000..c7c20690f Binary files /dev/null and b/showcase/src/web/images/progress.png differ diff --git a/showcase/src/web/images/radio.png b/showcase/src/web/images/radio.png new file mode 100644 index 000000000..df9e79c54 Binary files /dev/null and b/showcase/src/web/images/radio.png differ diff --git a/showcase/src/web/images/search-input.png b/showcase/src/web/images/search-input.png new file mode 100644 index 000000000..3e84a239c Binary files /dev/null and b/showcase/src/web/images/search-input.png differ diff --git a/showcase/src/web/images/select.png b/showcase/src/web/images/select.png new file mode 100644 index 000000000..e80f9ab5d Binary files /dev/null and b/showcase/src/web/images/select.png differ diff --git a/showcase/src/web/images/sidebar.png b/showcase/src/web/images/sidebar.png new file mode 100644 index 000000000..a523fa415 Binary files /dev/null and b/showcase/src/web/images/sidebar.png differ diff --git a/showcase/src/web/images/simple-file-upload.png b/showcase/src/web/images/simple-file-upload.png new file mode 100644 index 000000000..9871b5517 Binary files /dev/null and b/showcase/src/web/images/simple-file-upload.png differ diff --git a/showcase/src/web/images/simple-list.png b/showcase/src/web/images/simple-list.png new file mode 100644 index 000000000..6ea1d2716 Binary files /dev/null and b/showcase/src/web/images/simple-list.png differ diff --git a/showcase/src/web/images/skeleton.png b/showcase/src/web/images/skeleton.png new file mode 100644 index 000000000..fac59238e Binary files /dev/null and b/showcase/src/web/images/skeleton.png differ diff --git a/showcase/src/web/images/skip-to-content.png b/showcase/src/web/images/skip-to-content.png new file mode 100644 index 000000000..cdb56487e Binary files /dev/null and b/showcase/src/web/images/skip-to-content.png differ diff --git a/showcase/src/web/images/slider.png b/showcase/src/web/images/slider.png new file mode 100644 index 000000000..11217046a Binary files /dev/null and b/showcase/src/web/images/slider.png differ diff --git a/showcase/src/web/images/spinner.png b/showcase/src/web/images/spinner.png new file mode 100644 index 000000000..ef2f7fbf2 Binary files /dev/null and b/showcase/src/web/images/spinner.png differ diff --git a/showcase/src/web/images/switch.png b/showcase/src/web/images/switch.png new file mode 100644 index 000000000..1ad11eee3 Binary files /dev/null and b/showcase/src/web/images/switch.png differ diff --git a/showcase/src/web/images/table.png b/showcase/src/web/images/table.png new file mode 100644 index 000000000..59dc36d79 Binary files /dev/null and b/showcase/src/web/images/table.png differ diff --git a/showcase/src/web/images/tabs.png b/showcase/src/web/images/tabs.png new file mode 100644 index 000000000..1dc0a62dc Binary files /dev/null and b/showcase/src/web/images/tabs.png differ diff --git a/showcase/src/web/images/text-area.png b/showcase/src/web/images/text-area.png new file mode 100644 index 000000000..6f4d5df36 Binary files /dev/null and b/showcase/src/web/images/text-area.png differ diff --git a/showcase/src/web/images/text-input-group.png b/showcase/src/web/images/text-input-group.png new file mode 100644 index 000000000..d2db0acef Binary files /dev/null and b/showcase/src/web/images/text-input-group.png differ diff --git a/showcase/src/web/images/text-input.png b/showcase/src/web/images/text-input.png new file mode 100644 index 000000000..bdf9a4d2b Binary files /dev/null and b/showcase/src/web/images/text-input.png differ diff --git a/showcase/src/web/images/tile.png b/showcase/src/web/images/tile.png new file mode 100644 index 000000000..fdea182a1 Binary files /dev/null and b/showcase/src/web/images/tile.png differ diff --git a/showcase/src/web/images/time-picker.png b/showcase/src/web/images/time-picker.png new file mode 100644 index 000000000..5980aae8b Binary files /dev/null and b/showcase/src/web/images/time-picker.png differ diff --git a/showcase/src/web/images/timestamp.png b/showcase/src/web/images/timestamp.png new file mode 100644 index 000000000..4d4ba52bc Binary files /dev/null and b/showcase/src/web/images/timestamp.png differ diff --git a/showcase/src/web/images/title.png b/showcase/src/web/images/title.png new file mode 100644 index 000000000..3034c2e1b Binary files /dev/null and b/showcase/src/web/images/title.png differ diff --git a/showcase/src/web/images/toggle-group.png b/showcase/src/web/images/toggle-group.png new file mode 100644 index 000000000..4a7bfa35f Binary files /dev/null and b/showcase/src/web/images/toggle-group.png differ diff --git a/showcase/src/web/images/toolbar.png b/showcase/src/web/images/toolbar.png new file mode 100644 index 000000000..17fa70cde Binary files /dev/null and b/showcase/src/web/images/toolbar.png differ diff --git a/showcase/src/web/images/tooltip.png b/showcase/src/web/images/tooltip.png new file mode 100644 index 000000000..264055095 Binary files /dev/null and b/showcase/src/web/images/tooltip.png differ diff --git a/showcase/src/web/images/tree-view.png b/showcase/src/web/images/tree-view.png new file mode 100644 index 000000000..5fb896a09 Binary files /dev/null and b/showcase/src/web/images/tree-view.png differ diff --git a/showcase/src/web/images/truncate.png b/showcase/src/web/images/truncate.png new file mode 100644 index 000000000..6bf24a0c2 Binary files /dev/null and b/showcase/src/web/images/truncate.png differ diff --git a/showcase/src/web/images/wizard.png b/showcase/src/web/images/wizard.png new file mode 100644 index 000000000..69ece9c04 Binary files /dev/null and b/showcase/src/web/images/wizard.png differ diff --git a/showcase/j2cl/src/web/index.html b/showcase/src/web/index.html similarity index 100% rename from showcase/j2cl/src/web/index.html rename to showcase/src/web/index.html diff --git a/showcase/j2cl/src/web/main.js b/showcase/src/web/main.js similarity index 80% rename from showcase/j2cl/src/web/main.js rename to showcase/src/web/main.js index 705f2a508..e416f36a6 100644 --- a/showcase/j2cl/src/web/main.js +++ b/showcase/src/web/main.js @@ -15,11 +15,13 @@ */ import "@patternfly/patternfly/patternfly.css"; import "@patternfly/patternfly/patternfly-addons.css"; - -import "showcase-common/pforg/*.css"; -import "showcase-common/showcase.css"; +import "@patternfly/patternfly/patternfly-charts.css"; +import "@patternfly-java/charts/dist/charts"; +import "./pforg/*.css"; +import "./showcase.css"; import "@github/relative-time-element"; import hljs from "highlight.js/lib/common"; import "highlight.js/styles/github.css"; -window["hljs"] = hljs; // 'export' for J2CL + +window["hljs"] = hljs; // 'export' hljs for J2CL diff --git a/showcase/common/local_modules/showcase-common/pforg/autoLinkHeader.css b/showcase/src/web/pforg/autoLinkHeader.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/autoLinkHeader.css rename to showcase/src/web/pforg/autoLinkHeader.css diff --git a/showcase/common/local_modules/showcase-common/pforg/backToTop.css b/showcase/src/web/pforg/backToTop.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/backToTop.css rename to showcase/src/web/pforg/backToTop.css diff --git a/showcase/common/local_modules/showcase-common/pforg/cssVariables.css b/showcase/src/web/pforg/cssVariables.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/cssVariables.css rename to showcase/src/web/pforg/cssVariables.css diff --git a/showcase/common/local_modules/showcase-common/pforg/example.css b/showcase/src/web/pforg/example.css similarity index 96% rename from showcase/common/local_modules/showcase-common/pforg/example.css rename to showcase/src/web/pforg/example.css index 601614767..739f328e3 100644 --- a/showcase/common/local_modules/showcase-common/pforg/example.css +++ b/showcase/src/web/pforg/example.css @@ -32,6 +32,12 @@ --pf-v6-c-button--after--BorderWidth: 0; } +.ws-example-page-wrapper { + min-width: 825px; + max-width: 1200px; + flex-grow: 1; +} + .ws-preview__thumbnail-link { position: relative; line-height: 0; diff --git a/showcase/common/local_modules/showcase-common/pforg/footer.css b/showcase/src/web/pforg/footer.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/footer.css rename to showcase/src/web/pforg/footer.css diff --git a/showcase/src/web/pforg/label.css b/showcase/src/web/pforg/label.css new file mode 100644 index 000000000..356f40f6c --- /dev/null +++ b/showcase/src/web/pforg/label.css @@ -0,0 +1,21 @@ +/** + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ws-react-c-label-filled-labels .pf-v6-c-label, +#ws-react-c-label-outlined-labels .pf-v6-c-label, +#ws-react-c-label-compact-labels .pf-v6-c-label { + margin-inline-end: var(--pf-t--global--spacer--sm); + margin-block-end: var(--pf-t--global--spacer--sm); +} diff --git a/showcase/common/local_modules/showcase-common/pforg/layouts.css b/showcase/src/web/pforg/layouts.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/layouts.css rename to showcase/src/web/pforg/layouts.css diff --git a/showcase/common/local_modules/showcase-common/pforg/mdx.css b/showcase/src/web/pforg/mdx.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/mdx.css rename to showcase/src/web/pforg/mdx.css diff --git a/showcase/common/local_modules/showcase-common/pforg/sectionGallery.css b/showcase/src/web/pforg/sectionGallery.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/sectionGallery.css rename to showcase/src/web/pforg/sectionGallery.css diff --git a/showcase/common/local_modules/showcase-common/pforg/sideNavLayout.css b/showcase/src/web/pforg/sideNavLayout.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/sideNavLayout.css rename to showcase/src/web/pforg/sideNavLayout.css diff --git a/showcase/common/local_modules/showcase-common/pforg/tableOfContents.css b/showcase/src/web/pforg/tableOfContents.css similarity index 99% rename from showcase/common/local_modules/showcase-common/pforg/tableOfContents.css rename to showcase/src/web/pforg/tableOfContents.css index 9e7c1461a..3e121ae78 100644 --- a/showcase/common/local_modules/showcase-common/pforg/tableOfContents.css +++ b/showcase/src/web/pforg/tableOfContents.css @@ -63,7 +63,6 @@ @media (min-width: 1451px) { .ws-toc { - width: 260px; max-height: calc(100vh - 76px); overflow-y: auto; /* Hide TOC scrollbar IE, Edge & Firefox */ diff --git a/showcase/common/local_modules/showcase-common/pforg/truncate.css b/showcase/src/web/pforg/truncate.css similarity index 100% rename from showcase/common/local_modules/showcase-common/pforg/truncate.css rename to showcase/src/web/pforg/truncate.css diff --git a/showcase/common/local_modules/showcase-common/showcase.css b/showcase/src/web/showcase.css similarity index 100% rename from showcase/common/local_modules/showcase-common/showcase.css rename to showcase/src/web/showcase.css diff --git a/tokens/package-lock.json b/tokens/package-lock.json index 1da83871c..ab365da36 100644 --- a/tokens/package-lock.json +++ b/tokens/package-lock.json @@ -6,435 +6,26 @@ "": { "name": "icons", "devDependencies": { - "@patternfly/react-tokens": "^6.0.0", - "@types/node": "^22.9.3", - "camelcase": "^8.0.0", - "tsx": "^4.7.1" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", - "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", - "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", - "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", - "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", - "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", - "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", - "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", - "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", - "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", - "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", - "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", - "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", - "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", - "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", - "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", - "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", - "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", - "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", - "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", - "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", - "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", - "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", - "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" + "@patternfly/react-tokens": "^6.2.2", + "@types/node": "^22.15.3", + "camelcase": "^8.0.0" } }, "node_modules/@patternfly/react-tokens": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.0.0.tgz", - "integrity": "sha512-xd0ynDkiIW2rp8jz4TNvR4Dyaw9kSMkZdsuYcLlFXCVmvX//Mnl4rhBnid/2j2TaqK0NbkyTTPnPY/BU7SfLVQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.2.2.tgz", + "integrity": "sha512-2GRWDPBTrcTlGNFc5NPJjrjEVU90RpgcGX/CIe2MplLgM32tpVIkeUtqIoJPLRk5GrbhyFuHJYRU+O93gU4o3Q==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", + "version": "22.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", + "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.21.0" } }, "node_modules/camelcase": { @@ -450,108 +41,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esbuild": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/tsx": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", - "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.23.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" } diff --git a/tokens/package.json b/tokens/package.json index c95f79195..b8490a7e2 100644 --- a/tokens/package.json +++ b/tokens/package.json @@ -3,12 +3,11 @@ "private": true, "type": "module", "scripts": { - "generate": "tsx src/scripts/generate.ts" + "generate": "node src/scripts/generate.mjs" }, "devDependencies": { - "@patternfly/react-tokens": "^6.0.0", - "@types/node": "^22.9.3", - "camelcase": "^8.0.0", - "tsx": "^4.7.1" + "@patternfly/react-tokens": "^6.2.2", + "@types/node": "^22.15.3", + "camelcase": "^8.0.0" } } diff --git a/tokens/pom.xml b/tokens/pom.xml index eeb9be6a4..db8685808 100644 --- a/tokens/pom.xml +++ b/tokens/pom.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + 4.0.0 org.patternfly patternfly-java-code-parent - 0.2.12-SNAPSHOT + 0.4.18-SNAPSHOT ../code-parent/pom.xml diff --git a/tokens/src/main/java/org/patternfly/token/package-info.java b/tokens/src/main/java/org/patternfly/token/package-info.java new file mode 100644 index 000000000..dbb2d2cab --- /dev/null +++ b/tokens/src/main/java/org/patternfly/token/package-info.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * PatternFly design tokens for Java. + *

+ * This package provides predefined enum constants for all PatternFly design tokens. Design tokens are the visual design atoms + * of the design system β€” specifically, they are named entities that store visual design attributes. They are used in place of + * hard-coded values to ensure flexibility and unity across the design system. + *

+ * All tokens are defined in the {@link org.patternfly.token.Token} enum class. Each token constant has three properties: + *

    + *
  • {@code name} - The CSS custom property name starting with {@code --pf-t}
  • + *
  • {@code value} - The default value for the custom property
  • + *
  • {@code var} - The property name wrapped in {@code var()}, ready to use in styles
  • + *
+ *

+ * Example usage: + * + * {@snippet : + * import static org.patternfly.style.Classes.modifier; + * import static org.patternfly.token.Token.*; + * + * // Access token properties + * String name = color_blue_10.name; // "--pf-t--global--color--blue--10" + * String value = color_blue_10.value; // "#cfe7ff" + * String var = color_blue_10.var; // "var(--pf-t--global--color--blue--10)" + * + * // Use in styles + * div().css(modifier("custom")) + * .style("color", color_blue_50.var) + * .style("background-color", color_blue_10.var); + * } + * + * @see PatternFly Design Tokens + * @see All PatternFly Tokens + */ +package org.patternfly.token; \ No newline at end of file diff --git a/tokens/src/scripts/generate.ts b/tokens/src/scripts/generate.mjs similarity index 58% rename from tokens/src/scripts/generate.ts rename to tokens/src/scripts/generate.mjs index fcf669a76..7338c3841 100644 --- a/tokens/src/scripts/generate.ts +++ b/tokens/src/scripts/generate.mjs @@ -1,40 +1,32 @@ -/// -/// Copyright 2023 Red Hat -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// https://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// - -// @ts-ignore -import {writeFile} from 'node:fs/promises'; +/* + * Copyright 2023 Red Hat + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {mkdir, writeFile} from 'node:fs/promises'; import camelCase from 'camelcase'; import * as TOKENS from "@patternfly/react-tokens"; // ------------------------------------------------------ constants -const keywords: string[] = ["clone", "import", "package", "private"]; -const root: string = "../main/java"; -const path: string = "org/patternfly/token"; -const package_: string = path.replaceAll('/', '.'); +const keywords = ["clone", "import", "package", "private"]; +const root = "../main/java"; +const path = "org/patternfly/token"; +const package_ = path.replaceAll('/', '.'); // ------------------------------------------------------ tokens -interface Token { - name: string; - value: string; - var: string; -} - -const generateTokens = (entries: [string, Token][]) => `package ${package_}; +const generateTokens = (entries) => `package ${package_}; import javax.annotation.processing.Generated; @@ -44,7 +36,7 @@ import javax.annotation.processing.Generated; * @see https://www.patternfly.org/tokens/about-tokens * @see https://www.patternfly.org/tokens/all-patternfly-tokens */ -@Generated("generate.ts") +@Generated("generate.mjs") @SuppressWarnings("SpellCheckingInspection") // WARNING: This class is generated. Do not modify. public enum Token { @@ -65,14 +57,14 @@ public enum Token { } `; -const generateConstant = (javaName: string, token: Token) => +const generateConstant = (javaName, token) => `${javaName}("${token.name}", "${token.value}", "${token.var}"),`; -const failSafeName = (value: string) => keywords.includes(value) ? value + "_" : value +const failSafeName = (value) => keywords.includes(value) ? value + "_" : value // ------------------------------------------------------ main -let tokens: [string, Token][] = Object.keys(TOKENS) +let tokens = Object.keys(TOKENS) .filter(key => key.startsWith("t_")) .map(key => { let javaName = failSafeName(camelCase(key.substring(2))); @@ -81,10 +73,11 @@ let tokens: [string, Token][] = Object.keys(TOKENS) .replace(/\n/g, "\\n") .replace(/"/g, '\\"'); // @ts-ignore - let token: Token = {name: TOKENS[key].name, value: safeValue, var: TOKENS[key].var}; + let token = {name: TOKENS[key].name, value: safeValue, var: TOKENS[key].var}; return [javaName, token]; }); const dir = new URL(`${root}/${path}/`, import.meta.url); +await mkdir(dir, { recursive: true }); await writeFile(new URL(`./Token.java`, dir), generateTokens(tokens), 'utf8'); console.info(`Generated code for ${tokens.length} tokens`); diff --git a/validate.sh b/validate.sh index 43b659b60..cc386659e 100755 --- a/validate.sh +++ b/validate.sh @@ -97,7 +97,7 @@ parse_params() { parse_params "$@" setup_colors -mvn \ +mvn -P showcase \ org.apache.maven.plugins:maven-enforcer-plugin:enforce \ org.apache.maven.plugins:maven-checkstyle-plugin:check \ com.mycila:license-maven-plugin:check \ diff --git a/versionBump.sh b/versionBump.sh index 2ae5446f6..a4d5afee6 100755 --- a/versionBump.sh +++ b/versionBump.sh @@ -100,5 +100,11 @@ parse_params() { parse_params "$@" setup_colors -msg "Update version to ${CYAN}${NEW_VERSION}${NOFORMAT}" +cd bom +msg "Update BOM version to ${CYAN}${NEW_VERSION}${NOFORMAT}" mvn --quiet versions:set -DnewVersion="${NEW_VERSION}" &> /dev/null +msg "Install BOM ${CYAN}${NEW_VERSION}${NOFORMAT}" +mvn --quiet install &> /dev/null +cd "${script_dir}" +msg "Update version to ${CYAN}${NEW_VERSION}${NOFORMAT}" +mvn --quiet versions:set -DnewVersion="${NEW_VERSION}" -P apidoc &> /dev/null