From a271f3581eaf2dd6f64b4d7073e98601adda62ce Mon Sep 17 00:00:00 2001 From: Tracy French Date: Wed, 5 Feb 2025 15:12:52 -0700 Subject: [PATCH 01/10] chore: smoke test --- .github/workflows/validate.yml | 74 + .gitignore | 1 + iot-app-kit.sh | 200 + package-lock.json | 21 +- packages/react-components/package.json | 3 +- prep-smoke-test-env.sh | 12 + testing/smoke-test/README.md | 35 + testing/smoke-test/index.html | 12 + testing/smoke-test/package-lock.json | 3917 +++++++++++++++++++ testing/smoke-test/package.json | 36 + testing/smoke-test/playwright.config.ts | 36 + testing/smoke-test/src/App.tsx | 38 + testing/smoke-test/src/main.tsx | 9 + testing/smoke-test/src/vite-env.d.ts | 1 + testing/smoke-test/tests/smoke-test.spec.ts | 9 + testing/smoke-test/tsconfig.app.json | 26 + testing/smoke-test/tsconfig.json | 7 + testing/smoke-test/tsconfig.node.json | 24 + testing/smoke-test/vite.config.ts | 31 + 19 files changed, 4488 insertions(+), 4 deletions(-) create mode 100755 iot-app-kit.sh create mode 100755 prep-smoke-test-env.sh create mode 100644 testing/smoke-test/README.md create mode 100644 testing/smoke-test/index.html create mode 100644 testing/smoke-test/package-lock.json create mode 100644 testing/smoke-test/package.json create mode 100644 testing/smoke-test/playwright.config.ts create mode 100644 testing/smoke-test/src/App.tsx create mode 100644 testing/smoke-test/src/main.tsx create mode 100644 testing/smoke-test/src/vite-env.d.ts create mode 100644 testing/smoke-test/tests/smoke-test.spec.ts create mode 100644 testing/smoke-test/tsconfig.app.json create mode 100644 testing/smoke-test/tsconfig.json create mode 100644 testing/smoke-test/tsconfig.node.json create mode 100644 testing/smoke-test/vite.config.ts diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 24d082f13..1ea6cc122 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -207,3 +207,77 @@ jobs: name: ${{ matrix.package.name }}-${{ matrix.package.shardIndex }}-test-results path: packages/**/test-results retention-days: 30 + + smoke-test: + needs: repo + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + lfs: 'true' + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + + - name: node_modules cache + id: npm-cache + uses: actions/cache@v4 + with: + path: '**/node_modules' + key: ${{ runner.os }}-node_modules-${{hashFiles('**/package-lock.json')}} + restore-keys: | + ${{ runner.os }}-node_modules- + + - name: Install monorepo dependencies (not including smoke-test package) + if: steps.npm-cache.outputs.cache-hit != 'true' + shell: bash + env: + NODE_OPTIONS: '--max_old_space_size=8192' + run: npm ci --prefer-offline --no-audit --progress=false --workspaces --include-workspace-root + + - name: Build and pack iot-app-kit packages + run: ./prep-smoke-test-env.sh + + - name: Validate package installation + run: npm run validate:installation + working-directory: ./testing/smoke-test + + - name: Validate package bundling + run: npm run validate:bundling + working-directory: ./testing/smoke-test + + - name: Get installed Playwright version + id: playwright-version + run: echo "::set-output name=version::$(npm info @playwright/test version)" + working-directory: ./testing/smoke-test + + - name: Playwright cache (smoke test) + uses: actions/cache@v4 + id: playwright-cache + with: + path: | + ~/.cache/ms-playwright + key: '${{ runner.os }}-playwright-smoke-test-${{ steps.playwright-version.outputs.version }}' + restore-keys: | + ${{ runner.os }}-playwright-smoke-test- + + - name: Install Playwright with dependencies + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: npx playwright install --with-deps + working-directory: ./testing/smoke-test + + - name: Install Playwright's dependencies + if: steps.playwright-cache.outputs.cache-hit == 'true' + run: npx playwright install-deps + working-directory: ./testing/smoke-test + + - name: Validate package runtime + run: npm run validate:runtime + working-directory: ./testing/smoke-test diff --git a/.gitignore b/.gitignore index 934e6495c..70d38e7d5 100755 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ npm-debug.log *.sublime-project *.sublime-workspace *.docx +*.tgz .idea/ .vscode/ diff --git a/iot-app-kit.sh b/iot-app-kit.sh new file mode 100755 index 000000000..17d8492dd --- /dev/null +++ b/iot-app-kit.sh @@ -0,0 +1,200 @@ +#!/usr/bin/env bash + +bold=$(tput bold) +normal=$(tput sgr0) + +PACKAGE_LIST=( + "@iot-app-kit/core" + "@iot-app-kit/core-util" + "@iot-app-kit/dashboard" + "@iot-app-kit/react-components" + "@iot-app-kit/source-iotsitewise" + "@iot-app-kit/source-iottwinmaker" +) + +# iot-app-kit CLI command initiator +function iot-app-kit() { + # get the command (e.g., package, tarball, etc.) and then shift the argument stack + local cmd=$1; shift + + # run the requested command and proxy the remaining/shifted arguments as a list (i.e., without the command) + if [ $cmd = package ]; then + iot-app-kit__package "$@" + elif [ $cmd = tarball ]; then + iot-app-kit__tarball "$@" + elif [ $cmd = --help ]; then + echo " +${bold}USAGE${normal} + iot-app-kit [flags] + +${bold}CORE COMMANDS${normal} + package: Manage iot-app-kit packages + tarball: Manage iot-app-kit package tarballs + +${bold}FLAGS${normal} + --help Show help for a command + --version Show iot-app-kit version + " + elif [ $cmd = --version ]; then + npm pkg get version | tr -d '"' + else + echo "Invalid iot-app-kit command: $cmd" + exit 1 + fi +} + +# iot-app-kit package CLI command initiator +function iot-app-kit__package() { + # get the command (e.g., build, pack, etc.) and then shift the argument stack + local cmd=$1; shift + + # run the requested command and proxy the remaining/shifted arguments as a list(i.e., without the command) + if [ $cmd = build ]; then + iot-app-kit__package__build "$@" + elif [ $cmd = pack ]; then + iot-app-kit__package__pack "$@" + elif [ $cmd = publish ]; then + iot-app-kit__package__publish "$@" + elif [ $cmd = list ]; then + iot-app-kit__package__list "$@" + else + echo "Invalid iot-app-kit package command: $cmd" + exit 1 + fi +} + +# iot-app-kit tarball CLI command initiator +function iot-app-kit__tarball() { + # get the command (e.g., copy, link, etc.) and then shift the argument stack + local cmd=$1; shift + + # run the requested command and proxy the remaining/shifted arguments as a list (i.e., without the command) + if [ $cmd = copy ]; then + iot-app-kit__tarball__copy "$@" + elif [ $cmd = link ]; then + iot-app-kit__tarball__link "$@" + else + echo "Invalid iot-app-kit tarball command: $cmd" + exit 1 + fi +} + +function iot-app-kit__package__build() { + local package=$1 + + npx turbo build --filter=@iot-app-kit/$package +} + +# Create iot-app-kit package tarballs +function iot-app-kit__package__pack() { + # get the package name and then shift the argument stack + local package=$1; shift + + # get optional pack destination from flag (default is ".") + declare pack_destination + while [ $# -gt 0 ] ; do + case $1 in + -d | --destination) pack_destination="$2" ;; + esac + shift + done + + # re-direct the output to avoid echoing custom prepack/postpack npm scripts + npm pack -w @iot-app-kit/$package --pack-destination=$pack_destination > /dev/null + + # get the filename of the newly created tarball + local tarball=$(find . -name "iot-app-kit-$package-*.tgz" -type f -exec basename {} \; | head -n 1) + + # echo the tarball filename to allow consumer to utilize + echo $tarball +} + +# Publish iot-app-kit packages +function iot-app-kit__package__publish() { + local package=$1 + + # get optional simulation parameter from flag + local is_sim=0 + while [ $# -gt 0 ] ; do + case $1 in + --simulate | -s) is_sim=1 ;; + esac + shift + done + + # exit until supported + if [ $is_sim -eq 0 ]; then + echo "publish currently only supports simulation for testing." + exit 1 + fi + + # create the package tarball + local tarball=$(iot-app-kit package pack $package) + # get the list of consuming iot-app-kit package directories + local destinations=$(iot-app-kit package list $package) + # copy the tarball into each consuming package's directory + iot-app-kit tarball copy $tarball -d "$destinations" + # link the tarball to each consuming package's package.json + iot-app-kit tarball link $tarball -d "$destinations" +} + +# List a package's iot-app-kit dependencies +function iot-app-kit__package__list() { + local package=$1 + # get the list of iot-app-kit packages a package depends on at runtime from the package's package.json + local deps=$(npm pkg get dependencies --ws | jq -r 'to_entries[] | select(.value | has("@iot-app-kit/'"$package"'")) | .key') + + # format json to create flat package list and echo the packages + echo "$deps" | grep -Fx -f <(printf "%s\n" "${PACKAGE_LIST[@]}") | awk -F'/' '{print $2}' +} + +# Copy iot-app-kit package tarballs into a list of package directories +function iot-app-kit__tarball__copy() { + local tarball=$1; shift + local package_dirs=() + + # get list of package directories to copy into from flag + declare destinations + while [ $# -gt 0 ]; do + case $1 in + -d | --destinations) destinations="$2" ;; + esac + shift + done + + # prepend package directory name to tarball destinations + for destination in $destinations; do + package_dirs+="packages/$destination " + done + + # always copy tarball into smoke-test for testing + package_dirs+="testing/smoke-test" + + # copy the tarball into each package directory (no echo) + find $package_dirs -type d -maxdepth 0 -exec cp $tarball {} \; > /dev/null +} + +# Update a list of packages to install an iot-app-kit from a tarball +function iot-app-kit__tarball__link() { + local tarball=$1; shift + # get the package name from the tarball + local package=${tarball#iot-app-kit-} + local package=${package%-*} + + # get list of package directories to copy into from flag + declare destinations + while [ $# -gt 0 ]; do + case $1 in + -d | --destinations) destinations="$2" ;; + esac + shift + done + + for destination in $destinations; do + # append the tarball file name to the destination package's files list to include it in the destination package's tarball + npm pkg -w @iot-app-kit/$destination set files[]="$tarball" + # update the destination package's dependencies to install the tarball instead of installing from npm + npm pkg -w @iot-app-kit/$destination set dependencies."@iot-app-kit/$package"="file:$tarball" + done +} + diff --git a/package-lock.json b/package-lock.json index b59eb98b3..3d72d9594 100644 --- a/package-lock.json +++ b/package-lock.json @@ -169,6 +169,24 @@ "vite": "^5.4.12" } }, + "examples/vite": { + "name": "sample-vite-app", + "version": "0.0.0", + "extraneous": true, + "hasInstallScript": true, + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/react": "^18.2.12", + "@types/react-dom": "^18.2.5", + "@vitejs/plugin-react": "^4.3.3", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vite-plugin-dynamic-import": "^1.6.0" + } + }, "node_modules/@adobe/css-tools": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.1.tgz", @@ -36963,6 +36981,7 @@ "@iot-app-kit/charts-core": "^2.1.2", "@iot-app-kit/core": "12.5.0", "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", "@iot-app-kit/source-iottwinmaker": "12.5.0", "@tanstack/react-query": "^5.32.1", "autosize": "^6.0.1", @@ -36994,8 +37013,6 @@ "zustand": "^4.5.2" }, "devDependencies": { - "@iot-app-kit/core": "12.5.0", - "@iot-app-kit/source-iotsitewise": "12.5.0", "@iot-app-kit/testing-util": "12.5.0", "@iot-app-kit/ts-config": "12.5.0", "@playwright/test": "^1.48.2", diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 9331bbd9e..aa45d92e1 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -57,8 +57,6 @@ "pack": "npm pack" }, "devDependencies": { - "@iot-app-kit/core": "12.5.0", - "@iot-app-kit/source-iotsitewise": "12.5.0", "@iot-app-kit/testing-util": "12.5.0", "@iot-app-kit/ts-config": "12.5.0", "@playwright/test": "^1.48.2", @@ -120,6 +118,7 @@ "@iot-app-kit/charts-core": "^2.1.2", "@iot-app-kit/core": "12.5.0", "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", "@iot-app-kit/source-iottwinmaker": "12.5.0", "@tanstack/react-query": "^5.32.1", "autosize": "^6.0.1", diff --git a/prep-smoke-test-env.sh b/prep-smoke-test-env.sh new file mode 100755 index 000000000..63eda5044 --- /dev/null +++ b/prep-smoke-test-env.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Smoke test environment setup script + +source ./iot-app-kit.sh +iot-app-kit package build dashboard +iot-app-kit package publish core --simulate +iot-app-kit package publish core-util --simulate +iot-app-kit package publish source-iotsitewise --simulate +iot-app-kit package publish source-iottwinmaker --simulate +iot-app-kit package publish react-components --simulate +iot-app-kit package pack dashboard --destination testing/smoke-test diff --git a/testing/smoke-test/README.md b/testing/smoke-test/README.md new file mode 100644 index 000000000..36c450c10 --- /dev/null +++ b/testing/smoke-test/README.md @@ -0,0 +1,35 @@ +# `smoke-test` + +`smoke-test` is involved in the automated validation of code changes to ensure they will eventually result in publishable packages able to be successfully installed and integrated by users. + +## Purpose + +`npm` allows broken packages to be tarred with `npm pack` or tarred and published with `npm publish`. When `npm` tars the package, the closure includes the `package.json`, a few other standard files, if they exist, and our custom files specified in the `package.json`'s `.files` field, which typically includes `dist`. If the package has not been built and there is no `dist` folder, for example, the tarball will simply not contain the `dist` folder and the published package will contain no build artifacts. + +While a package's build may succeed, it does not necessarily mean the build artifacts will be functional at runtime. To function at runtime, a package's `package.json` must correctly describe to the Node.js runtime how to consume the package (i.e., using `.main`, `.type`, `.exports`, `.imports`, and other key fields). If the `package.json` does not describe the build artifacts accurately, the package cannot be utilized by the consumer, even if it installs. Keeping the `package.json` and the build artifacts synchronized is challenging, as any single change to these key fields, the `tsconfig.json` (or other build configuration), or the `package.json`'s build scripts may result in failure if any single common configuration does not receive the corresponding required change. + +With `npm` workspaces, during development, when an iot-app-kit package depends on another, it consumes its build artifacts with a symlink in `node_modules` pointing to the consumed package's `dist`. When packages are published, iot-app-kit packages consume other iot-app-kit packages the same as any typical dependency, by downloading and installing the package's tarball from `npm`. The disparity between how packages are consumed in development and in production by real users allows for the utilization of packages during development in ways unsupported in production and undetectable until the package is tarred and consumed outside of the monorepo/`npm` workspaces context. + +_Note: It is critical this package is not included in the `npm` workspaces configuration to avoid npm creating symbolic links to and internally consumed iot-app-kit packages._ + +## Supported scope and validations + +The current scope includes explicitly validating the `dashboard` package and implicitly all of its internal package runtime dependencies, including `core`, `core-util`, `react-components`, `source-iotsitewise`, and `source-iottwinmaker`. We expect these packages may be successfully installed (including re-installed), loaded at runtime, and bundled by consumers. + +## Desired qualities + +- **Correctness/Predictability** - Validations should provide us the confidence to conduct a successful release at any time. +- **Extensibility** - Additional packages and validations, including different types of validations, may be added to the package without requiring significant changes to the package. +- **Performance** - Validations should be quick and not slow down development and release workflows. +- **Scalability** - Performance standards should be maintained as more packages and validations are added. + +## Responsibilities + +- Provide confidence in our ability to publish packages. +- Reliably validate the ability to install, load at runtime, and bundle published iot-app-kit packages prior to publishing. +- Provide interface to run the validation tests via CI. + +## Relationships + +- `smoke-test` relies on CI orchestration (see `.github/workflows/validate.yml`) to facilitate package validation. +- `prep-smoke-test-env.sh` is an executable script called by the CI orchestration to prepare the smoke test environment. The script incrementally builds and tars the packages, modifies their `package.json`s to depend on the tarballs along the way. diff --git a/testing/smoke-test/index.html b/testing/smoke-test/index.html new file mode 100644 index 000000000..c38adace6 --- /dev/null +++ b/testing/smoke-test/index.html @@ -0,0 +1,12 @@ + + + + + + Smoke Test + + +
+ + + diff --git a/testing/smoke-test/package-lock.json b/testing/smoke-test/package-lock.json new file mode 100644 index 000000000..5519922ce --- /dev/null +++ b/testing/smoke-test/package-lock.json @@ -0,0 +1,3917 @@ +{ + "name": "smoke-test", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "smoke-test", + "version": "0.0.0", + "dependencies": { + "@aws-sdk/client-iot-events": "^3.354.0", + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@playwright/test": "^1.48.2", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/react-dom": "^18.2.5", + "@vitejs/plugin-react": "^4.3.3", + "rimraf": "^5.0.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vite-plugin-dynamic-import": "^1.6.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@aws-crypto/crc32": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-iot-events": { + "version": "3.741.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-iot-events/-/client-iot-events-3.741.0.tgz", + "integrity": "sha512-IR4C6q8RaXWoryisSCimVBn8kcfB2qd+qKJRWeFFqOXo/4WIuKe59PCLlow2nF5xGnpbgtLq1Gunz/87r+kwMQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.734.0", + "@aws-sdk/credential-provider-node": "3.741.0", + "@aws-sdk/middleware-host-header": "3.734.0", + "@aws-sdk/middleware-logger": "3.734.0", + "@aws-sdk/middleware-recursion-detection": "3.734.0", + "@aws-sdk/middleware-user-agent": "3.734.0", + "@aws-sdk/region-config-resolver": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@aws-sdk/util-endpoints": "3.734.0", + "@aws-sdk/util-user-agent-browser": "3.734.0", + "@aws-sdk/util-user-agent-node": "3.734.0", + "@smithy/config-resolver": "^4.0.1", + "@smithy/core": "^3.1.1", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/hash-node": "^4.0.1", + "@smithy/invalid-dependency": "^4.0.1", + "@smithy/middleware-content-length": "^4.0.1", + "@smithy/middleware-endpoint": "^4.0.2", + "@smithy/middleware-retry": "^4.0.3", + "@smithy/middleware-serde": "^4.0.1", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.3", + "@smithy/util-defaults-mode-node": "^4.0.3", + "@smithy/util-endpoints": "^3.0.1", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-iotsitewise": { + "version": "3.741.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-iotsitewise/-/client-iotsitewise-3.741.0.tgz", + "integrity": "sha512-akCAMRjgbcw4oXosMMLxZFaFKcwbyIhc8LbUO6/sCWBqEisAt7a5pKvPlOJS9r1KWC5VL69ePwkfz7LfgIAoUA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.734.0", + "@aws-sdk/credential-provider-node": "3.741.0", + "@aws-sdk/middleware-host-header": "3.734.0", + "@aws-sdk/middleware-logger": "3.734.0", + "@aws-sdk/middleware-recursion-detection": "3.734.0", + "@aws-sdk/middleware-user-agent": "3.734.0", + "@aws-sdk/region-config-resolver": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@aws-sdk/util-endpoints": "3.734.0", + "@aws-sdk/util-user-agent-browser": "3.734.0", + "@aws-sdk/util-user-agent-node": "3.734.0", + "@smithy/config-resolver": "^4.0.1", + "@smithy/core": "^3.1.1", + "@smithy/eventstream-serde-browser": "^4.0.1", + "@smithy/eventstream-serde-config-resolver": "^4.0.1", + "@smithy/eventstream-serde-node": "^4.0.1", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/hash-node": "^4.0.1", + "@smithy/invalid-dependency": "^4.0.1", + "@smithy/middleware-content-length": "^4.0.1", + "@smithy/middleware-endpoint": "^4.0.2", + "@smithy/middleware-retry": "^4.0.3", + "@smithy/middleware-serde": "^4.0.1", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.3", + "@smithy/util-defaults-mode-node": "^4.0.3", + "@smithy/util-endpoints": "^3.0.1", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-utf8": "^4.0.0", + "@smithy/util-waiter": "^4.0.2", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.734.0.tgz", + "integrity": "sha512-oerepp0mut9VlgTwnG5Ds/lb0C0b2/rQ+hL/rF6q+HGKPfGsCuPvFx1GtwGKCXd49ase88/jVgrhcA9OQbz3kg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.734.0", + "@aws-sdk/middleware-host-header": "3.734.0", + "@aws-sdk/middleware-logger": "3.734.0", + "@aws-sdk/middleware-recursion-detection": "3.734.0", + "@aws-sdk/middleware-user-agent": "3.734.0", + "@aws-sdk/region-config-resolver": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@aws-sdk/util-endpoints": "3.734.0", + "@aws-sdk/util-user-agent-browser": "3.734.0", + "@aws-sdk/util-user-agent-node": "3.734.0", + "@smithy/config-resolver": "^4.0.1", + "@smithy/core": "^3.1.1", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/hash-node": "^4.0.1", + "@smithy/invalid-dependency": "^4.0.1", + "@smithy/middleware-content-length": "^4.0.1", + "@smithy/middleware-endpoint": "^4.0.2", + "@smithy/middleware-retry": "^4.0.3", + "@smithy/middleware-serde": "^4.0.1", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.3", + "@smithy/util-defaults-mode-node": "^4.0.3", + "@smithy/util-endpoints": "^3.0.1", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.734.0.tgz", + "integrity": "sha512-SxnDqf3vobdm50OLyAKfqZetv6zzwnSqwIwd3jrbopxxHKqNIM/I0xcYjD6Tn+mPig+u7iRKb9q3QnEooFTlmg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/core": "^3.1.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/property-provider": "^4.0.1", + "@smithy/protocol-http": "^5.0.1", + "@smithy/signature-v4": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/util-middleware": "^4.0.1", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.734.0.tgz", + "integrity": "sha512-gtRkzYTGafnm1FPpiNO8VBmJrYMoxhDlGPYDVcijzx3DlF8dhWnowuSBCxLSi+MJMx5hvwrX2A+e/q0QAeHqmw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/property-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.734.0.tgz", + "integrity": "sha512-JFSL6xhONsq+hKM8xroIPhM5/FOhiQ1cov0lZxhzZWj6Ai3UAjucy3zyIFDr9MgP1KfCYNdvyaUq9/o+HWvEDg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/property-provider": "^4.0.1", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/util-stream": "^4.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.741.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.741.0.tgz", + "integrity": "sha512-/XvnVp6zZXsyUlP1FtmspcWnd+Z1u2WK0wwzTE/x277M0oIhAezCW79VmcY4jcDQbYH+qMbtnBexfwgFDARxQg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.734.0", + "@aws-sdk/credential-provider-env": "3.734.0", + "@aws-sdk/credential-provider-http": "3.734.0", + "@aws-sdk/credential-provider-process": "3.734.0", + "@aws-sdk/credential-provider-sso": "3.734.0", + "@aws-sdk/credential-provider-web-identity": "3.734.0", + "@aws-sdk/nested-clients": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/credential-provider-imds": "^4.0.1", + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.741.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.741.0.tgz", + "integrity": "sha512-iz/puK9CZZkZjrKXX2W+PaiewHtlcD7RKUIsw4YHFyb8lrOt7yTYpM6VjeI+T//1sozjymmAnnp1SST9TXApLQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.734.0", + "@aws-sdk/credential-provider-http": "3.734.0", + "@aws-sdk/credential-provider-ini": "3.741.0", + "@aws-sdk/credential-provider-process": "3.734.0", + "@aws-sdk/credential-provider-sso": "3.734.0", + "@aws-sdk/credential-provider-web-identity": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/credential-provider-imds": "^4.0.1", + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.734.0.tgz", + "integrity": "sha512-zvjsUo+bkYn2vjT+EtLWu3eD6me+uun+Hws1IyWej/fKFAqiBPwyeyCgU7qjkiPQSXqk1U9+/HG9IQ6Iiz+eBw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.734.0.tgz", + "integrity": "sha512-cCwwcgUBJOsV/ddyh1OGb4gKYWEaTeTsqaAK19hiNINfYV/DO9r4RMlnWAo84sSBfJuj9shUNsxzyoe6K7R92Q==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.734.0", + "@aws-sdk/core": "3.734.0", + "@aws-sdk/token-providers": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.734.0.tgz", + "integrity": "sha512-t4OSOerc+ppK541/Iyn1AS40+2vT/qE+MFMotFkhCgCJbApeRF2ozEdnDN6tGmnl4ybcUuxnp9JWLjwDVlR/4g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.734.0", + "@aws-sdk/nested-clients": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/property-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.734.0.tgz", + "integrity": "sha512-LW7RRgSOHHBzWZnigNsDIzu3AiwtjeI2X66v+Wn1P1u+eXssy1+up4ZY/h+t2sU4LU36UvEf+jrZti9c6vRnFw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.734.0.tgz", + "integrity": "sha512-mUMFITpJUW3LcKvFok176eI5zXAUomVtahb9IQBwLzkqFYOrMJvWAvoV4yuxrJ8TlQBG8gyEnkb9SnhZvjg67w==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.734.0.tgz", + "integrity": "sha512-CUat2d9ITsFc2XsmeiRQO96iWpxSKYFjxvj27Hc7vo87YUHRnfMfnc8jw1EpxEwMcvBD7LsRa6vDNky6AjcrFA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.734.0.tgz", + "integrity": "sha512-MFVzLWRkfFz02GqGPjqSOteLe5kPfElUrXZft1eElnqulqs6RJfVSpOV7mO90gu293tNAeggMWAVSGRPKIYVMg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@aws-sdk/util-endpoints": "3.734.0", + "@smithy/core": "^3.1.1", + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.734.0.tgz", + "integrity": "sha512-iph2XUy8UzIfdJFWo1r0Zng9uWj3253yvW9gljhtu+y/LNmNvSnJxQk1f3D2BC5WmcoPZqTS3UsycT3mLPSzWA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.734.0", + "@aws-sdk/middleware-host-header": "3.734.0", + "@aws-sdk/middleware-logger": "3.734.0", + "@aws-sdk/middleware-recursion-detection": "3.734.0", + "@aws-sdk/middleware-user-agent": "3.734.0", + "@aws-sdk/region-config-resolver": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@aws-sdk/util-endpoints": "3.734.0", + "@aws-sdk/util-user-agent-browser": "3.734.0", + "@aws-sdk/util-user-agent-node": "3.734.0", + "@smithy/config-resolver": "^4.0.1", + "@smithy/core": "^3.1.1", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/hash-node": "^4.0.1", + "@smithy/invalid-dependency": "^4.0.1", + "@smithy/middleware-content-length": "^4.0.1", + "@smithy/middleware-endpoint": "^4.0.2", + "@smithy/middleware-retry": "^4.0.3", + "@smithy/middleware-serde": "^4.0.1", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.3", + "@smithy/util-defaults-mode-node": "^4.0.3", + "@smithy/util-endpoints": "^3.0.1", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.734.0.tgz", + "integrity": "sha512-Lvj1kPRC5IuJBr9DyJ9T9/plkh+EfKLy+12s/mykOy1JaKHDpvj+XGy2YO6YgYVOb8JFtaqloid+5COtje4JTQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.734.0.tgz", + "integrity": "sha512-2U6yWKrjWjZO8Y5SHQxkFvMVWHQWbS0ufqfAIBROqmIZNubOL7jXCiVdEFekz6MZ9LF2tvYGnOW4jX8OKDGfIw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/nested-clients": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.734.0.tgz", + "integrity": "sha512-o11tSPTT70nAkGV1fN9wm/hAIiLPyWX6SuGf+9JyTp7S/rC2cFWhR26MvA69nplcjNaXVzB0f+QFrLXXjOqCrg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.734.0.tgz", + "integrity": "sha512-w2+/E88NUbqql6uCVAsmMxDQKu7vsKV0KqhlQb0lL+RCq4zy07yXYptVNs13qrnuTfyX7uPXkXrlugvK9R1Ucg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/types": "^4.1.0", + "@smithy/util-endpoints": "^3.0.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.723.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.723.0.tgz", + "integrity": "sha512-Yf2CS10BqK688DRsrKI/EO6B8ff5J86NXe4C+VCysK7UOgN0l1zOTeTukZ3H8Q9tYYX3oaF1961o8vRkFm7Nmw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.734.0.tgz", + "integrity": "sha512-xQTCus6Q9LwUuALW+S76OL0jcWtMOVu14q+GoLnWPUM7QeUw963oQcLhF7oq0CtaLLKyl4GOUfcwc773Zmwwng==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.734.0", + "@smithy/types": "^4.1.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.734.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.734.0.tgz", + "integrity": "sha512-c6Iinh+RVQKs6jYUFQ64htOU2HUXFQ3TVx+8Tu3EDF19+9vzWi9UukhIMH9rqyyEXIAkk9XL7avt8y2Uyw2dGA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.734.0", + "@aws-sdk/types": "3.734.0", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "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/compat-data": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.5.tgz", + "integrity": "sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.7.tgz", + "integrity": "sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.5", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.7", + "@babel/parser": "^7.26.7", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.26.7", + "@babel/types": "^7.26.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.5.tgz", + "integrity": "sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.26.5", + "@babel/types": "^7.26.5", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "license": "MIT", + "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/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz", + "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz", + "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz", + "integrity": "sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz", + "integrity": "sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.7.tgz", + "integrity": "sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.5", + "@babel/parser": "^7.26.7", + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz", + "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@playwright/test": { + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.1.tgz", + "integrity": "sha512-Jii3aBg+CEDpgnuDxEp/h7BimHcUTDlpEtce89xEumlJ5ef2hqepZ+PWp1DDpYC/VO9fmWVI1IlEaoI5fK9FXQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.50.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.4.tgz", + "integrity": "sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.4.tgz", + "integrity": "sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.4.tgz", + "integrity": "sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.4.tgz", + "integrity": "sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.4.tgz", + "integrity": "sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.4.tgz", + "integrity": "sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.4.tgz", + "integrity": "sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.4.tgz", + "integrity": "sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.4.tgz", + "integrity": "sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.4.tgz", + "integrity": "sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.4.tgz", + "integrity": "sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.4.tgz", + "integrity": "sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.4.tgz", + "integrity": "sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.4.tgz", + "integrity": "sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.4.tgz", + "integrity": "sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.4.tgz", + "integrity": "sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.4.tgz", + "integrity": "sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.4.tgz", + "integrity": "sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.4.tgz", + "integrity": "sha512-p0scwGkR4kZ242xLPBuhSckrJ734frz6v9xZzD+kHVYRAkSUmdSLCIJRfql6H5//aF8Q10K+i7q8DiPfZp0b7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@smithy/abort-controller": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.1.tgz", + "integrity": "sha512-fiUIYgIgRjMWznk6iLJz35K2YxSLHzLBA/RC6lBrKfQ8fHbPfvk7Pk9UvpKoHgJjI18MnbPuEju53zcVy6KF1g==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/config-resolver": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.0.1.tgz", + "integrity": "sha512-Igfg8lKu3dRVkTSEm98QpZUvKEOa71jDX4vKRcvJVyRc3UgN3j7vFMf0s7xLQhYmKa8kyJGQgUJDOV5V3neVlQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.1.2.tgz", + "integrity": "sha512-htwQXkbdF13uwwDevz9BEzL5ABK+1sJpVQXywwGSH973AVOvisHNfpcB8A8761G6XgHoS2kHPqc9DqHJ2gp+/Q==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-serde": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-stream": "^4.0.2", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.1.tgz", + "integrity": "sha512-l/qdInaDq1Zpznpmev/+52QomsJNZ3JkTl5yrTl02V6NBgJOQ4LY0SFw/8zsMwj3tLe8vqiIuwF6nxaEwgf6mg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.0.1", + "@smithy/property-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-codec": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.0.1.tgz", + "integrity": "sha512-Q2bCAAR6zXNVtJgifsU16ZjKGqdw/DyecKNgIgi7dlqw04fqDu0mnq+JmGphqheypVc64CYq3azSuCpAdFk2+A==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^4.1.0", + "@smithy/util-hex-encoding": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.0.1.tgz", + "integrity": "sha512-HbIybmz5rhNg+zxKiyVAnvdM3vkzjE6ccrJ620iPL8IXcJEntd3hnBl+ktMwIy12Te/kyrSbUb8UCdnUT4QEdA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.0.1.tgz", + "integrity": "sha512-lSipaiq3rmHguHa3QFF4YcCM3VJOrY9oq2sow3qlhFY+nBSTF/nrO82MUQRPrxHQXA58J5G1UnU2WuJfi465BA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.0.1.tgz", + "integrity": "sha512-o4CoOI6oYGYJ4zXo34U8X9szDe3oGjmHgsMGiZM0j4vtNoT+h80TLnkUcrLZR3+E6HIxqW+G+9WHAVfl0GXK0Q==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.0.1.tgz", + "integrity": "sha512-Z94uZp0tGJuxds3iEAZBqGU2QiaBHP4YytLUjwZWx+oUeohCsLyUm33yp4MMBmhkuPqSbQCXq5hDet6JGUgHWA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-codec": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.1.tgz", + "integrity": "sha512-3aS+fP28urrMW2KTjb6z9iFow6jO8n3MFfineGbndvzGZit3taZhKWtTorf+Gp5RpFDDafeHlhfsGlDCXvUnJA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.0.1", + "@smithy/querystring-builder": "^4.0.1", + "@smithy/types": "^4.1.0", + "@smithy/util-base64": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-node": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.1.tgz", + "integrity": "sha512-TJ6oZS+3r2Xu4emVse1YPB3Dq3d8RkZDKcPr71Nj/lJsdAP1c7oFzYqEn1IBc915TsgLl2xIJNuxCz+gLbLE0w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.1.tgz", + "integrity": "sha512-gdudFPf4QRQ5pzj7HEnu6FhKRi61BfH/Gk5Yf6O0KiSbr1LlVhgjThcvjdu658VE6Nve8vaIWB8/fodmS1rBPQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.0.0.tgz", + "integrity": "sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.1.tgz", + "integrity": "sha512-OGXo7w5EkB5pPiac7KNzVtfCW2vKBTZNuCctn++TTSOMpe6RZO/n6WEC1AxJINn3+vWLKW49uad3lo/u0WJ9oQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.0.3.tgz", + "integrity": "sha512-YdbmWhQF5kIxZjWqPIgboVfi8i5XgiYMM7GGKFMTvBei4XjNQfNv8sukT50ITvgnWKKKpOtp0C0h7qixLgb77Q==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.1.2", + "@smithy/middleware-serde": "^4.0.2", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-middleware": "^4.0.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.0.4.tgz", + "integrity": "sha512-wmxyUBGHaYUqul0wZiset4M39SMtDBOtUr2KpDuftKNN74Do9Y36Go6Eqzj9tL0mIPpr31ulB5UUtxcsCeGXsQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.0.1", + "@smithy/protocol-http": "^5.0.1", + "@smithy/service-error-classification": "^4.0.1", + "@smithy/smithy-client": "^4.1.3", + "@smithy/types": "^4.1.0", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.2.tgz", + "integrity": "sha512-Sdr5lOagCn5tt+zKsaW+U2/iwr6bI9p08wOkCp6/eL6iMbgdtc2R5Ety66rf87PeohR0ExI84Txz9GYv5ou3iQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.1.tgz", + "integrity": "sha512-dHwDmrtR/ln8UTHpaIavRSzeIk5+YZTBtLnKwDW3G2t6nAupCiQUvNzNoHBpik63fwUaJPtlnMzXbQrNFWssIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.0.1.tgz", + "integrity": "sha512-8mRTjvCtVET8+rxvmzRNRR0hH2JjV0DFOmwXPrISmTIJEfnCBugpYYGAsCj8t41qd+RB5gbheSQ/6aKZCQvFLQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.2.tgz", + "integrity": "sha512-X66H9aah9hisLLSnGuzRYba6vckuFtGE+a5DcHLliI/YlqKrGoxhisD5XbX44KyoeRzoNlGr94eTsMVHFAzPOw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.0.1", + "@smithy/protocol-http": "^5.0.1", + "@smithy/querystring-builder": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/property-provider": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.1.tgz", + "integrity": "sha512-o+VRiwC2cgmk/WFV0jaETGOtX16VNPp2bSQEzu0whbReqE1BMqsP2ami2Vi3cbGVdKu1kq9gQkDAGKbt0WOHAQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.0.1.tgz", + "integrity": "sha512-TE4cpj49jJNB/oHyh/cRVEgNZaoPaxd4vteJNB0yGidOCVR0jCw/hjPVsT8Q8FRmj8Bd3bFZt8Dh7xGCT+xMBQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.1.tgz", + "integrity": "sha512-wU87iWZoCbcqrwszsOewEIuq+SU2mSoBE2CcsLwE0I19m0B2gOJr1MVjxWcDQYOzHbR1xCk7AcOBbGFUYOKvdg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "@smithy/util-uri-escape": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.1.tgz", + "integrity": "sha512-Ma2XC7VS9aV77+clSFylVUnPZRindhB7BbmYiNOdr+CHt/kZNJoPP0cd3QxCnCFyPXC4eybmyE98phEHkqZ5Jw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.1.tgz", + "integrity": "sha512-3JNjBfOWpj/mYfjXJHB4Txc/7E4LVq32bwzE7m28GN79+M1f76XHflUaSUkhOriprPDzev9cX/M+dEB80DNDKA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.1.tgz", + "integrity": "sha512-hC8F6qTBbuHRI/uqDgqqi6J0R4GtEZcgrZPhFQnMhfJs3MnUTGSnR1NSJCJs5VWlMydu0kJz15M640fJlRsIOw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.0.1.tgz", + "integrity": "sha512-nCe6fQ+ppm1bQuw5iKoeJ0MJfz2os7Ic3GBjOkLOPtavbD1ONoyE3ygjBfz2ythFWm4YnRm6OxW+8p/m9uCoIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^4.0.0", + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-uri-escape": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.1.3.tgz", + "integrity": "sha512-A2Hz85pu8BJJaYFdX8yb1yocqigyqBzn+OVaVgm+Kwi/DkN8vhN2kbDVEfADo6jXf5hPKquMLGA3UINA64UZ7A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.1.2", + "@smithy/middleware-endpoint": "^4.0.3", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/protocol-http": "^5.0.1", + "@smithy/types": "^4.1.0", + "@smithy/util-stream": "^4.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.1.0.tgz", + "integrity": "sha512-enhjdwp4D7CXmwLtD6zbcDMbo6/T6WtuuKCY49Xxc6OMOmUWlBEBDREsxxgV2LIdeQPW756+f97GzcgAwp3iLw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.1.tgz", + "integrity": "sha512-gPXcIEUtw7VlK8f/QcruNXm7q+T5hhvGu9tl63LsJPZ27exB6dtNwvh2HIi0v7JcXJ5emBxB+CJxwaLEdJfA+g==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-base64": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", + "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.0.0.tgz", + "integrity": "sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.0.0.tgz", + "integrity": "sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.0.0.tgz", + "integrity": "sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.0.0.tgz", + "integrity": "sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.4.tgz", + "integrity": "sha512-Ej1bV5sbrIfH++KnWxjjzFNq9nyP3RIUq2c9Iqq7SmMO/idUR24sqvKH2LUQFTSPy/K7G4sB2m8n7YYlEAfZaw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.0.1", + "@smithy/smithy-client": "^4.1.3", + "@smithy/types": "^4.1.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.4.tgz", + "integrity": "sha512-HE1I7gxa6yP7ZgXPCFfZSDmVmMtY7SHqzFF55gM/GPegzZKaQWZZ+nYn9C2Cc3JltCMyWe63VPR3tSFDEvuGjw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/config-resolver": "^4.0.1", + "@smithy/credential-provider-imds": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/property-provider": "^4.0.1", + "@smithy/smithy-client": "^4.1.3", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-endpoints": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.1.tgz", + "integrity": "sha512-zVdUENQpdtn9jbpD9SCFK4+aSiavRb9BxEtw9ZGUR1TYo6bBHbIoi7VkrFQ0/RwZlzx0wRBaRmPclj8iAoJCLA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.0.0.tgz", + "integrity": "sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-middleware": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.1.tgz", + "integrity": "sha512-HiLAvlcqhbzhuiOa0Lyct5IIlyIz0PQO5dnMlmQ/ubYM46dPInB+3yQGkfxsk6Q24Y0n3/JmcA1v5iEhmOF5mA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.1.tgz", + "integrity": "sha512-WmRHqNVwn3kI3rKk1LsKcVgPBG6iLTBGC1iYOV3GQegwJ3E8yjzHytPt26VNzOWr1qu0xE03nK0Ug8S7T7oufw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/service-error-classification": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.0.2.tgz", + "integrity": "sha512-0eZ4G5fRzIoewtHtwaYyl8g2C+osYOT4KClXgfdNEDAgkbe2TYPqcnw4GAWabqkZCax2ihRGPe9LZnsPdIUIHA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/types": "^4.1.0", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-uri-escape": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.0.0.tgz", + "integrity": "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-utf8": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", + "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-waiter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.0.2.tgz", + "integrity": "sha512-piUTHyp2Axx3p/kc2CIJkYSv0BAaheBQmbACZgQSSfWUumWNW+R1lL+H9PDBxKJkvOeEX+hKYEFiwO8xagL8AQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.0.1", + "@smithy/types": "^4.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "18.19.75", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.75.tgz", + "integrity": "sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/prop-types": { + "version": "15.7.14", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", + "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.18.tgz", + "integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.5", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.5.tgz", + "integrity": "sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "license": "MIT" + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz", + "integrity": "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.26.0", + "@babel/plugin-transform-react-jsx-self": "^7.25.9", + "@babel/plugin-transform-react-jsx-source": "^7.25.9", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "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.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "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.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001697", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001697.tgz", + "integrity": "sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==", + "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/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/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.92", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.92.tgz", + "integrity": "sha512-BeHgmNobs05N1HMmMZ7YIuHfYBGlq/UmvlsTgg+fsbFs9xVMj+xJHFg19GN04+9Q+r8Xnh9LXqaYIyEWElnNgQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "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/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-xml-parser": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fastq": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "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/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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-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/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.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==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "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/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "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/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "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/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/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "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/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "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/playwright": { + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", + "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.50.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", + "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/postcss": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "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/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "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/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.34.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.4.tgz", + "integrity": "sha512-spF66xoyD7rz3o08sHP7wogp1gZ6itSq22SGa/IZTcUDXDlOyrShwMwkVSB+BUxFRZZCUYqdb3KWDEOMVQZxuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.34.4", + "@rollup/rollup-android-arm64": "4.34.4", + "@rollup/rollup-darwin-arm64": "4.34.4", + "@rollup/rollup-darwin-x64": "4.34.4", + "@rollup/rollup-freebsd-arm64": "4.34.4", + "@rollup/rollup-freebsd-x64": "4.34.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.34.4", + "@rollup/rollup-linux-arm-musleabihf": "4.34.4", + "@rollup/rollup-linux-arm64-gnu": "4.34.4", + "@rollup/rollup-linux-arm64-musl": "4.34.4", + "@rollup/rollup-linux-loongarch64-gnu": "4.34.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.34.4", + "@rollup/rollup-linux-riscv64-gnu": "4.34.4", + "@rollup/rollup-linux-s390x-gnu": "4.34.4", + "@rollup/rollup-linux-x64-gnu": "4.34.4", + "@rollup/rollup-linux-x64-musl": "4.34.4", + "@rollup/rollup-win32-arm64-msvc": "4.34.4", + "@rollup/rollup-win32-ia32-msvc": "4.34.4", + "@rollup/rollup-win32-x64-msvc": "4.34.4", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "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/string-width-cjs/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/string-width-cjs/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/string-width-cjs/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/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "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/strip-ansi-cjs/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/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "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==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", + "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/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vite": { + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", + "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-plugin-dynamic-import": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-plugin-dynamic-import/-/vite-plugin-dynamic-import-1.6.0.tgz", + "integrity": "sha512-TM0sz70wfzTIo9YCxVFwS8OA9lNREsh+0vMHGSkWDTZ7bgd1Yjs5RV8EgB634l/91IsXJReg0xtmuQqP0mf+rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.12.1", + "es-module-lexer": "^1.5.4", + "fast-glob": "^3.3.2", + "magic-string": "^0.30.11" + } + }, + "node_modules/vite/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/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/testing/smoke-test/package.json b/testing/smoke-test/package.json new file mode 100644 index 000000000..6c1de9dd3 --- /dev/null +++ b/testing/smoke-test/package.json @@ -0,0 +1,36 @@ +{ + "name": "smoke-test", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "clean": "rimraf *.tgz playwright-report test-results dist", + "clean:nuke": "rimraf *.tgz playwright-report test-results node_modules", + "dev": "vite", + "validate:installation": "npm install $(find . -name '*.tgz') && npm run validate:re-installation", + "validate:re-installation": "npm install", + "validate:runtime": "npx playwright test", + "validate:bundling": "vite build" + }, + "dependencies": { + "@aws-sdk/client-iot-events": "^3.354.0", + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@playwright/test": "^1.48.2", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/react-dom": "^18.2.5", + "@vitejs/plugin-react": "^4.3.3", + "rimraf": "^5.0.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vite-plugin-dynamic-import": "^1.6.0" + }, + "volta": { + "node": "18.20.5", + "npm": "10.8.2" + } +} diff --git a/testing/smoke-test/playwright.config.ts b/testing/smoke-test/playwright.config.ts new file mode 100644 index 000000000..0117afb47 --- /dev/null +++ b/testing/smoke-test/playwright.config.ts @@ -0,0 +1,36 @@ +import { defineConfig, devices } from '@playwright/test'; + +const BASE_URL = 'http://localhost:5173/'; +const SECOND_IN_MS = 1000; +const MINUTE_IN_MS = 60 * SECOND_IN_MS; + +export default defineConfig({ + testDir: './tests', + expect: { + timeout: 100 * SECOND_IN_MS, + }, + timeout: 100 * SECOND_IN_MS, + globalTimeout: 10 * MINUTE_IN_MS, + fullyParallel: true, + forbidOnly: !!process.env.CI, + retries: process.env.CI ? 2 : 0, + workers: process.env.CI ? 1 : undefined, + reporter: 'html', + use: { + viewport: { height: 1500, width: 1028 }, + trace: 'on-first-retry', + baseURL: BASE_URL, + }, + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + }, + ], + webServer: { + command: 'npm run dev', + reuseExistingServer: !process.env.CI, + url: BASE_URL, + timeout: 1 * MINUTE_IN_MS, + }, +}); diff --git a/testing/smoke-test/src/App.tsx b/testing/smoke-test/src/App.tsx new file mode 100644 index 000000000..561e9e3e2 --- /dev/null +++ b/testing/smoke-test/src/App.tsx @@ -0,0 +1,38 @@ +import { Dashboard } from '@iot-app-kit/dashboard'; + +export function App() { + return ( + + ); +} diff --git a/testing/smoke-test/src/main.tsx b/testing/smoke-test/src/main.tsx new file mode 100644 index 000000000..3f642d5f9 --- /dev/null +++ b/testing/smoke-test/src/main.tsx @@ -0,0 +1,9 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { App } from './App.tsx'; + +createRoot(document.getElementById('root')!).render( + + + +); diff --git a/testing/smoke-test/src/vite-env.d.ts b/testing/smoke-test/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/testing/smoke-test/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/testing/smoke-test/tests/smoke-test.spec.ts b/testing/smoke-test/tests/smoke-test.spec.ts new file mode 100644 index 000000000..cbf0f739e --- /dev/null +++ b/testing/smoke-test/tests/smoke-test.spec.ts @@ -0,0 +1,9 @@ +import { expect, test } from '@playwright/test'; + +test('dashboard package smoke test', async ({ page }) => { + await page.goto('/'); + + await expect( + page.getByText('Browse assets and add asset properties to the line widget.') + ).toBeVisible(); +}); diff --git a/testing/smoke-test/tsconfig.app.json b/testing/smoke-test/tsconfig.app.json new file mode 100644 index 000000000..e79516d0d --- /dev/null +++ b/testing/smoke-test/tsconfig.app.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src", "vite.config.ts"] +} diff --git a/testing/smoke-test/tsconfig.json b/testing/smoke-test/tsconfig.json new file mode 100644 index 000000000..1ffef600d --- /dev/null +++ b/testing/smoke-test/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/testing/smoke-test/tsconfig.node.json b/testing/smoke-test/tsconfig.node.json new file mode 100644 index 000000000..db0becc8b --- /dev/null +++ b/testing/smoke-test/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/testing/smoke-test/vite.config.ts b/testing/smoke-test/vite.config.ts new file mode 100644 index 000000000..dce80de0f --- /dev/null +++ b/testing/smoke-test/vite.config.ts @@ -0,0 +1,31 @@ +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; +import dynamicImport from 'vite-plugin-dynamic-import'; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [ + react(), + /* + * This plugin is required to resolve the charts-core module as they are dynamically imported + * when the library is loaded. + * See the dynamic loading code here: https://github.com/ionic-team/stencil/blob/main/src/client/client-load-module.ts#L32 + * Unfortunately, we are using an older version of the stencil library which doesn't use the syntax vite supports to + * detect the dynamic imports automatically, so we need to use this plugin to explicitly tell vite to include the + * charts-core module otherwise their code will not be included in the build. + */ + dynamicImport({ + filter(id) { + // `node_modules` is exclude by default, so we need to include it explicitly + // https://github.com/vite-plugin/vite-plugin-dynamic-import/blob/v1.3.0/src/index.ts#L133-L135 + if (id.includes('/node_modules/@iot-app-kit/charts-core')) { + console.log('dynamically import entry point', id); + return true; + } + }, + onFiles(files) { + console.log('dynamically import files', files); + }, + }), + ], +}); From 16457c8d97248d0c622474ca2af3a79e88b495d0 Mon Sep 17 00:00:00 2001 From: chejimmy Date: Thu, 20 Feb 2025 09:13:04 -0800 Subject: [PATCH 02/10] fix: optional property check for error metadata --- .../client/batchGetAggregatedPropertyDataPoints.ts | 2 +- .../client/batchGetHistoricalPropertyDataPoints.ts | 2 +- .../time-series-data/client/batchGetLatestPropertyDataPoints.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts index 336e21753..96855d02e 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts @@ -168,7 +168,7 @@ const sendRequest = ({ Object.entries(callbackCache).forEach(([entryId, { onError }]) => { onError({ entryId, - errorCode: e.$metadata.httpStatusCode, + errorCode: e.$metadata?.httpStatusCode, errorMessage: e.message, }); }); diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts index b551fccbc..ea4e2436f 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts @@ -163,7 +163,7 @@ const sendRequest = ({ Object.entries(callbackCache).forEach(([entryId, { onError }]) => { onError({ entryId, - errorCode: e?.$metadata.httpStatusCode, + errorCode: e.$metadata?.httpStatusCode, errorMessage: e.message, }); }); diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts index 2543f4fdc..fe8f4cc3c 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts @@ -143,7 +143,7 @@ const sendRequest = ({ Object.entries(callbackCache).forEach(([entryId, { onError }]) => { onError({ entryId, - errorCode: e.$metadata.httpStatusCode, + errorCode: e.$metadata?.httpStatusCode, errorMessage: e.message, }); }); From 688fabf175fe9e4019bbaa36b900b632fdf2d739 Mon Sep 17 00:00:00 2001 From: Tracy French Date: Fri, 14 Feb 2025 14:38:17 -0700 Subject: [PATCH 03/10] chore: local npm repository --- .github/workflows/validate.yml | 33 +- .npmrc | 2 +- iot-app-kit.sh | 200 -------- package-lock.json | 828 ++++++++++++++++++++++++++++++++ package.json | 1 + prep-smoke-test-env.sh | 12 - smoke-test.sh | 378 +++++++++++++++ testing/smoke-test/README.md | 2 +- testing/smoke-test/package.json | 9 +- 9 files changed, 1215 insertions(+), 250 deletions(-) mode change 100755 => 100644 .npmrc delete mode 100755 iot-app-kit.sh delete mode 100755 prep-smoke-test-env.sh create mode 100755 smoke-test.sh diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1ea6cc122..23d0deef0 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -209,7 +209,6 @@ jobs: retention-days: 30 smoke-test: - needs: repo runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -226,33 +225,6 @@ jobs: cache: 'npm' cache-dependency-path: '**/package-lock.json' - - name: node_modules cache - id: npm-cache - uses: actions/cache@v4 - with: - path: '**/node_modules' - key: ${{ runner.os }}-node_modules-${{hashFiles('**/package-lock.json')}} - restore-keys: | - ${{ runner.os }}-node_modules- - - - name: Install monorepo dependencies (not including smoke-test package) - if: steps.npm-cache.outputs.cache-hit != 'true' - shell: bash - env: - NODE_OPTIONS: '--max_old_space_size=8192' - run: npm ci --prefer-offline --no-audit --progress=false --workspaces --include-workspace-root - - - name: Build and pack iot-app-kit packages - run: ./prep-smoke-test-env.sh - - - name: Validate package installation - run: npm run validate:installation - working-directory: ./testing/smoke-test - - - name: Validate package bundling - run: npm run validate:bundling - working-directory: ./testing/smoke-test - - name: Get installed Playwright version id: playwright-version run: echo "::set-output name=version::$(npm info @playwright/test version)" @@ -278,6 +250,5 @@ jobs: run: npx playwright install-deps working-directory: ./testing/smoke-test - - name: Validate package runtime - run: npm run validate:runtime - working-directory: ./testing/smoke-test + - name: Run smoke test + run: ./smoke-test.sh -n diff --git a/.npmrc b/.npmrc old mode 100755 new mode 100644 index 44d5bb0c4..c523e4607 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1,4 @@ CYPRESS_INSTALL_BINARY=0 puppeteer_skip_chromium_download=true legacy-peer-deps=true -progress=false \ No newline at end of file +progress=false diff --git a/iot-app-kit.sh b/iot-app-kit.sh deleted file mode 100755 index 17d8492dd..000000000 --- a/iot-app-kit.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env bash - -bold=$(tput bold) -normal=$(tput sgr0) - -PACKAGE_LIST=( - "@iot-app-kit/core" - "@iot-app-kit/core-util" - "@iot-app-kit/dashboard" - "@iot-app-kit/react-components" - "@iot-app-kit/source-iotsitewise" - "@iot-app-kit/source-iottwinmaker" -) - -# iot-app-kit CLI command initiator -function iot-app-kit() { - # get the command (e.g., package, tarball, etc.) and then shift the argument stack - local cmd=$1; shift - - # run the requested command and proxy the remaining/shifted arguments as a list (i.e., without the command) - if [ $cmd = package ]; then - iot-app-kit__package "$@" - elif [ $cmd = tarball ]; then - iot-app-kit__tarball "$@" - elif [ $cmd = --help ]; then - echo " -${bold}USAGE${normal} - iot-app-kit [flags] - -${bold}CORE COMMANDS${normal} - package: Manage iot-app-kit packages - tarball: Manage iot-app-kit package tarballs - -${bold}FLAGS${normal} - --help Show help for a command - --version Show iot-app-kit version - " - elif [ $cmd = --version ]; then - npm pkg get version | tr -d '"' - else - echo "Invalid iot-app-kit command: $cmd" - exit 1 - fi -} - -# iot-app-kit package CLI command initiator -function iot-app-kit__package() { - # get the command (e.g., build, pack, etc.) and then shift the argument stack - local cmd=$1; shift - - # run the requested command and proxy the remaining/shifted arguments as a list(i.e., without the command) - if [ $cmd = build ]; then - iot-app-kit__package__build "$@" - elif [ $cmd = pack ]; then - iot-app-kit__package__pack "$@" - elif [ $cmd = publish ]; then - iot-app-kit__package__publish "$@" - elif [ $cmd = list ]; then - iot-app-kit__package__list "$@" - else - echo "Invalid iot-app-kit package command: $cmd" - exit 1 - fi -} - -# iot-app-kit tarball CLI command initiator -function iot-app-kit__tarball() { - # get the command (e.g., copy, link, etc.) and then shift the argument stack - local cmd=$1; shift - - # run the requested command and proxy the remaining/shifted arguments as a list (i.e., without the command) - if [ $cmd = copy ]; then - iot-app-kit__tarball__copy "$@" - elif [ $cmd = link ]; then - iot-app-kit__tarball__link "$@" - else - echo "Invalid iot-app-kit tarball command: $cmd" - exit 1 - fi -} - -function iot-app-kit__package__build() { - local package=$1 - - npx turbo build --filter=@iot-app-kit/$package -} - -# Create iot-app-kit package tarballs -function iot-app-kit__package__pack() { - # get the package name and then shift the argument stack - local package=$1; shift - - # get optional pack destination from flag (default is ".") - declare pack_destination - while [ $# -gt 0 ] ; do - case $1 in - -d | --destination) pack_destination="$2" ;; - esac - shift - done - - # re-direct the output to avoid echoing custom prepack/postpack npm scripts - npm pack -w @iot-app-kit/$package --pack-destination=$pack_destination > /dev/null - - # get the filename of the newly created tarball - local tarball=$(find . -name "iot-app-kit-$package-*.tgz" -type f -exec basename {} \; | head -n 1) - - # echo the tarball filename to allow consumer to utilize - echo $tarball -} - -# Publish iot-app-kit packages -function iot-app-kit__package__publish() { - local package=$1 - - # get optional simulation parameter from flag - local is_sim=0 - while [ $# -gt 0 ] ; do - case $1 in - --simulate | -s) is_sim=1 ;; - esac - shift - done - - # exit until supported - if [ $is_sim -eq 0 ]; then - echo "publish currently only supports simulation for testing." - exit 1 - fi - - # create the package tarball - local tarball=$(iot-app-kit package pack $package) - # get the list of consuming iot-app-kit package directories - local destinations=$(iot-app-kit package list $package) - # copy the tarball into each consuming package's directory - iot-app-kit tarball copy $tarball -d "$destinations" - # link the tarball to each consuming package's package.json - iot-app-kit tarball link $tarball -d "$destinations" -} - -# List a package's iot-app-kit dependencies -function iot-app-kit__package__list() { - local package=$1 - # get the list of iot-app-kit packages a package depends on at runtime from the package's package.json - local deps=$(npm pkg get dependencies --ws | jq -r 'to_entries[] | select(.value | has("@iot-app-kit/'"$package"'")) | .key') - - # format json to create flat package list and echo the packages - echo "$deps" | grep -Fx -f <(printf "%s\n" "${PACKAGE_LIST[@]}") | awk -F'/' '{print $2}' -} - -# Copy iot-app-kit package tarballs into a list of package directories -function iot-app-kit__tarball__copy() { - local tarball=$1; shift - local package_dirs=() - - # get list of package directories to copy into from flag - declare destinations - while [ $# -gt 0 ]; do - case $1 in - -d | --destinations) destinations="$2" ;; - esac - shift - done - - # prepend package directory name to tarball destinations - for destination in $destinations; do - package_dirs+="packages/$destination " - done - - # always copy tarball into smoke-test for testing - package_dirs+="testing/smoke-test" - - # copy the tarball into each package directory (no echo) - find $package_dirs -type d -maxdepth 0 -exec cp $tarball {} \; > /dev/null -} - -# Update a list of packages to install an iot-app-kit from a tarball -function iot-app-kit__tarball__link() { - local tarball=$1; shift - # get the package name from the tarball - local package=${tarball#iot-app-kit-} - local package=${package%-*} - - # get list of package directories to copy into from flag - declare destinations - while [ $# -gt 0 ]; do - case $1 in - -d | --destinations) destinations="$2" ;; - esac - shift - done - - for destination in $destinations; do - # append the tarball file name to the destination package's files list to include it in the destination package's tarball - npm pkg -w @iot-app-kit/$destination set files[]="$tarball" - # update the destination package's dependencies to install the tarball instead of installing from npm - npm pkg -w @iot-app-kit/$destination set dependencies."@iot-app-kit/$package"="file:$tarball" - done -} - diff --git a/package-lock.json b/package-lock.json index 3d72d9594..a242215db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "packages/*" ], "devDependencies": { + "@changesets/cli": "^2.28.0", "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", "@playwright/test": "^1.48.2", @@ -7988,6 +7989,341 @@ "node": ">= 4.0.0" } }, + "node_modules/@changesets/apply-release-plan": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.9.tgz", + "integrity": "sha512-xB1shQP6WhflnAN+rV8eJ7j4oBgka/K62+pHuEv6jmUtSqlx2ZvJSnCGzyNfkiQmSfVsqXoI3pbAuyVpTbsKzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/config": "^3.1.0", + "@changesets/get-version-range-type": "^0.4.0", + "@changesets/git": "^3.0.2", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "detect-indent": "^6.0.0", + "fs-extra": "^7.0.1", + "lodash.startcase": "^4.4.0", + "outdent": "^0.5.0", + "prettier": "^2.7.1", + "resolve-from": "^5.0.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/assemble-release-plan": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.6.tgz", + "integrity": "sha512-Frkj8hWJ1FRZiY3kzVCKzS0N5mMwWKwmv9vpam7vt8rZjLL1JMthdh6pSDVSPumHPshTTkKZ0VtNbE0cJHZZUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.3", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/assemble-release-plan/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/changelog-git": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.1.tgz", + "integrity": "sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0" + } + }, + "node_modules/@changesets/cli": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.28.0.tgz", + "integrity": "sha512-of9/8Gzc+DP/Ol9Lak++Y0RsB1oO1CRzZoGIWTYcvHNREJQNqxW5tXm3YzqsA1Gx8ecZZw82FfahtiS+HkNqIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/apply-release-plan": "^7.0.9", + "@changesets/assemble-release-plan": "^6.0.6", + "@changesets/changelog-git": "^0.2.1", + "@changesets/config": "^3.1.0", + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.3", + "@changesets/get-release-plan": "^4.0.7", + "@changesets/git": "^3.0.2", + "@changesets/logger": "^0.1.1", + "@changesets/pre": "^2.0.2", + "@changesets/read": "^0.6.3", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@changesets/write": "^0.4.0", + "@manypkg/get-packages": "^1.1.3", + "ansi-colors": "^4.1.3", + "ci-info": "^3.7.0", + "enquirer": "^2.4.1", + "external-editor": "^3.1.0", + "fs-extra": "^7.0.1", + "mri": "^1.2.0", + "p-limit": "^2.2.0", + "package-manager-detector": "^0.2.0", + "picocolors": "^1.1.0", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "spawndamnit": "^3.0.1", + "term-size": "^2.1.0" + }, + "bin": { + "changeset": "bin.js" + } + }, + "node_modules/@changesets/cli/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@changesets/cli/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/config": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.0.tgz", + "integrity": "sha512-UbZsPkRnv2SF8Ln72B8opmNLhsazv7/M0r6GSQSQzLY++/ZPr5dDSz3L+6G2fDZ+AN1ZjsEGDdBkpEna9eJtrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.3", + "@changesets/logger": "^0.1.1", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + "micromatch": "^4.0.8" + } + }, + "node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/get-dependents-graph": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.3.tgz", + "integrity": "sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "picocolors": "^1.1.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/get-dependents-graph/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/get-release-plan": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.7.tgz", + "integrity": "sha512-FdXJ5B4ZcIWtTu+SEIAthnSScwF+mS+e657gagYUyprVLFSkAJKrA50MqoW3iOopbwQ/UhYaTESNyF9cpg1bQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/assemble-release-plan": "^6.0.6", + "@changesets/config": "^3.1.0", + "@changesets/pre": "^2.0.2", + "@changesets/read": "^0.6.3", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/get-version-range-type": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", + "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/git": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.2.tgz", + "integrity": "sha512-r1/Kju9Y8OxRRdvna+nxpQIsMsRQn9dhhAZt94FLDeu0Hij2hnOozW8iqnHBgvu+KdnJppCveQwK4odwfw/aWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.8", + "spawndamnit": "^3.0.1" + } + }, + "node_modules/@changesets/logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", + "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/parse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.1.tgz", + "integrity": "sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@changesets/parse/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@changesets/parse/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@changesets/pre": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", + "integrity": "sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, + "node_modules/@changesets/read": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.3.tgz", + "integrity": "sha512-9H4p/OuJ3jXEUTjaVGdQEhBdqoT2cO5Ts95JTFsQyawmKzpL8FnIeJSyhTDPW1MBRDnwZlHFEM9SpPwJDY5wIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/git": "^3.0.2", + "@changesets/logger": "^0.1.1", + "@changesets/parse": "^0.4.1", + "@changesets/types": "^6.1.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0", + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/should-skip-package": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", + "integrity": "sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/types": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.1.0.tgz", + "integrity": "sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/write": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.4.0.tgz", + "integrity": "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "fs-extra": "^7.0.1", + "human-id": "^4.1.1", + "prettier": "^2.7.1" + } + }, "node_modules/@chevrotain/cst-dts-gen": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz", @@ -10273,6 +10609,184 @@ "@lit-labs/ssr-dom-shim": "^1.0.0" } }, + "node_modules/@manypkg/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@types/node": "^12.7.1", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + } + }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/find-root/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@manypkg/find-root/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@manypkg/get-packages": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", + "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@changesets/types": "^4.0.1", + "@manypkg/find-root": "^1.1.0", + "fs-extra": "^8.1.0", + "globby": "^11.0.0", + "read-yaml-file": "^1.1.0" + } + }, + "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", + "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/get-packages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/get-packages/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@manypkg/get-packages/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@matterport/r3f": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/@matterport/r3f/-/r3f-0.2.7.tgz", @@ -17908,6 +18422,16 @@ "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==", "license": "MIT" }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -18556,6 +19080,19 @@ "node": ">=12.0.0" } }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-windows": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/bidi-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", @@ -19110,6 +19647,13 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -19361,6 +19905,22 @@ "dev": true, "license": "ISC" }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cipher-base": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.5.tgz", @@ -20877,6 +21437,16 @@ "webgl-constants": "^1.1.1" } }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-libc": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", @@ -21190,6 +21760,20 @@ "node": ">=10.13.0" } }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -22726,6 +23310,41 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "license": "MIT" }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -23122,6 +23741,41 @@ "dev": true, "license": "MIT" }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-extra/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/fs-extra/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -23861,6 +24515,16 @@ "node": ">= 14" } }, + "node_modules/human-id": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-4.1.1.tgz", + "integrity": "sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==", + "dev": true, + "license": "MIT", + "bin": { + "human-id": "dist/cli.js" + } + }, "node_modules/husky": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", @@ -24740,6 +25404,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", @@ -24823,6 +25500,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -28350,12 +29037,42 @@ "dev": true, "license": "MIT" }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true, + "license": "MIT" + }, "node_modules/outvariant": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==", "license": "MIT" }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/p-is-promise": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", @@ -28398,6 +29115,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -28414,6 +29141,13 @@ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "license": "BlueOak-1.0.0" }, + "node_modules/package-manager-detector": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.9.tgz", + "integrity": "sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==", + "dev": true, + "license": "MIT" + }, "node_modules/pako": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", @@ -30845,6 +31579,56 @@ "node": ">=4" } }, + "node_modules/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/read-yaml-file/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/readable-stream": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", @@ -32154,6 +32938,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/spawndamnit": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-3.0.1.tgz", + "integrity": "sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==", + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "cross-spawn": "^7.0.5", + "signal-exit": "^4.0.1" + } + }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -32200,6 +32995,13 @@ "node": ">= 10.x" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/stack-generator": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz", @@ -33948,6 +34750,19 @@ "memoizerific": "^1.11.3" } }, + "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/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -34204,6 +35019,19 @@ "dev": true, "license": "MIT" }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", diff --git a/package.json b/package.json index 143fcad2a..61547eb15 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "test:ci": "if test \"$NODE_ENV\" = \"production\"; then echo \"Yes!\"; fi" }, "devDependencies": { + "@changesets/cli": "^2.28.0", "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", "@playwright/test": "^1.48.2", diff --git a/prep-smoke-test-env.sh b/prep-smoke-test-env.sh deleted file mode 100755 index 63eda5044..000000000 --- a/prep-smoke-test-env.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# Smoke test environment setup script - -source ./iot-app-kit.sh -iot-app-kit package build dashboard -iot-app-kit package publish core --simulate -iot-app-kit package publish core-util --simulate -iot-app-kit package publish source-iotsitewise --simulate -iot-app-kit package publish source-iottwinmaker --simulate -iot-app-kit package publish react-components --simulate -iot-app-kit package pack dashboard --destination testing/smoke-test diff --git a/smoke-test.sh b/smoke-test.sh new file mode 100755 index 000000000..9b8ff4b9c --- /dev/null +++ b/smoke-test.sh @@ -0,0 +1,378 @@ +#!/usr/bin/env bash +# iot-app-kit smoke test script + +############################################################################### +# SAFETY +############################################################################### + +# set a safe internal field separator +IFS=$'\n\t' + +# run the script from where it is located +cd "$(dirname "${BASH_SOURCE[0]}")" || { + echo -e "\033[0;31m[ERROR] Failed to run smoke test script from root directory as expected\033[0m" >&2 + exit 1 +} + +# exit on error, undefined variable reference, or error in a pipeline +set -euo pipefail + +############################################################################### +# GLOBALS +############################################################################### + +# global flags +DEBUG=false +FORCE=false +NO_TEARDOWN=false + +# usage function for help text +usage() { + cat <&2 + usage + exit 1 + ;; + esac +done +# remove all parsed flags from the input +shift "$((OPTIND -1))" + +# ANSI color definitions +readonly COLOR_RED="\033[0;31m" +readonly COLOR_GREEN="\033[0;32m" +readonly COLOR_YELLOW="\033[0;33m" +readonly COLOR_BLUE="\033[0;34m" +readonly COLOR_RESET="\033[0m" + +# constants +readonly SMOKE_TEST_DIR="testing/smoke-test" +readonly REGISTRY_PORT=4873 +readonly REGISTRY_ENDPOINT="http://localhost:${REGISTRY_PORT}" +readonly REGISTRY_TIMEOUT=30 # seconds +readonly REGISTRY_POLL_INTERVAL=1 # seconds +readonly CHANGESET_FILE=".changeset/smoke-test-$(date +%s).md" + +# global variable for capturing verdaccio PID when started +VERDACCIO_PID="" + +# global variable to track dirty status +DIRTY=false + +############################################################################### +# LOGGING +############################################################################### + +log_info() { + printf "[%s] ${COLOR_GREEN}[INFO] %s${COLOR_RESET}\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$*" +} + +log_warn() { + printf "[%s] ${COLOR_YELLOW}[WARN] %s${COLOR_RESET}\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$*" >&2 +} + +log_error() { + printf "[%s] ${COLOR_RED}[ERROR] %s${COLOR_RESET}\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$*" >&2 + exit 1 +} + +log_debug() { + if [ "$DEBUG" = true ]; then + printf "[%s] ${COLOR_BLUE}[DEBUG] %s${COLOR_RESET}\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$*" + fi +} + +############################################################################### +# HELPERS +############################################################################### + +# execute command in the smoke-test dir +smoke_test_run_cmd() { + if [ ! -d "$SMOKE_TEST_DIR" ]; then + log_error "Smoke test directory: '$SMOKE_TEST_DIR' does not exist." + fi + + log_debug "Running command in smoke test directory: $*" + + # spawn sub-shell and run command in the smoke-test dir + if ! (cd "$SMOKE_TEST_DIR" && "$@"); then + log_error "Command failed to run in smoke test directory: $*" + fi +} + +# when we need a way to wait for the registry server to start before utilizing it +wait_for_registry() { + local max_attempts=$((REGISTRY_TIMEOUT / REGISTRY_POLL_INTERVAL)) + local attempt=0 + + log_debug "Requesting status of ${REGISTRY_ENDPOINT}" + + until curl --silent --fail "${REGISTRY_ENDPOINT}" &>/dev/null; do + sleep "$REGISTRY_POLL_INTERVAL" + attempt=$((attempt + 1)) + + if [ "$attempt" -ge "$max_attempts" ]; then + log_error "Local npm registry did not start within ${REGISTRY_TIMEOUT} seconds." + fi + + log_debug "Registry not ready, attempt $attempt" + done +} + +############################################################################### +# CLEAN UP & PROCESS MANAGEMENT +############################################################################### + +kill_local_npm_registry_server() { + log_debug "Attempting to gracefully terminate Verdaccio processes at ${REGISTRY_ENDPOINT}" + + # if we captured a PID when launching Verdaccio, attempt to shut it down + if [ -n "$VERDACCIO_PID" ] && kill -0 "$VERDACCIO_PID" 2>/dev/null; then + log_debug "Sending SIGTERM to captured Verdaccio PID: ${VERDACCIO_PID}" + kill "$VERDACCIO_PID" 2>/dev/null || true + fi + + # fallback: find any Verdaccio processes (case-insensitive) + local pids=$(pgrep -i verdaccio || true) + if [ -z "$pids" ]; then + log_debug "No additional Verdaccio processes found." + else + for pid in $pids; do + if kill -0 "$pid" 2>/dev/null; then + log_debug "Sending SIGTERM to process $pid" + kill "$pid" 2>/dev/null || true + fi + done + fi + + # wait to give processes the chance to die on their own + sleep 2 + + # force kill any remaining processes + if [ -n "$pids" ]; then + for pid in $pids; do + if kill -0 "$pid" 2>/dev/null; then + log_debug "Process $pid still running; sending SIGKILL" + kill -9 "$pid" 2>/dev/null || true + fi + done + fi +} + +revert_local_changes() { + log_debug "Reverting local changes made during smoke test" + git restore . || log_warn "git restore failed" +} + +sanitize_local_env() { + log_debug "Sanitizing local development environment" + log_debug "Deleting all untracked changes" + git clean -fxd &>/dev/null + + if [ -d ~/.local/share/verdaccio/storage ]; then + log_debug "Deleting remaining Verdaccio artifacts" + rm -rf ~/.local/share/verdaccio/storage + fi +} + +teardown() { + # temporarily disable exit-on-error to ensure all cleanup commands run + set +e + + if [ "$DIRTY" = false ]; then + log_debug "Environment is clean; skipping teardown." + return 0 + fi + + if [ "$NO_TEARDOWN" = true ]; then + log_debug "NO_TEARDOWN flag set; skipping teardown." + return 0 + fi + + log_info "Running teardown" + kill_local_npm_registry_server + revert_local_changes + sanitize_local_env + + # re-enable exit-on-error + set -e +} + +# ensure teardown runs on exit or interruption +trap teardown INT EXIT SIGTERM + +############################################################################### +# PRE-CHECKS +############################################################################### + +check_for_local_changes() { + log_debug "Checking for uncommitted local changes..." + if [ "$FORCE" = false ]; then + if ! git diff --cached --quiet || ! git diff --quiet; then + log_error "Uncommitted changes detected; commit or use -f to force." + fi + else + log_warn "FORCE flag enabled; skipping uncommitted changes check." + fi +} + +# check for existence of required command +check_for_package() { + log_debug "Checking if $1 is installed..." + if ! command -v "$1" &>/dev/null; then + log_error "Required command: '$1' is not installed or in PATH." + fi +} + +check_for_playwright() { + log_debug "Checking if Playwright is installed..." + if ! smoke_test_run_cmd npx --yes playwright install --with-deps --only-shell &>/dev/null; then + log_error "Playwright is not installed or cannot be installed." + fi +} + +check_for_dependencies() { + log_debug "Checking for required dependencies..." + check_for_package npm + check_for_package npx + check_for_package git + check_for_package curl + check_for_package pgrep + check_for_playwright +} + +############################################################################### +# MAIN SCRIPT +############################################################################### + +log_info "Starting smoke test" +check_for_local_changes + +log_info "Cleaning local environment" +sanitize_local_env + +log_info "Checking for required dependencies" +check_for_dependencies + +DIRTY=true +log_debug "Environment is now considered dirty and will be sanitized on teardown." + +log_info "Installing workspace dependencies" +# capture output of npm ci for easier debugging +if ! npm ci --prefer-offline --no-audit --progress=false --workspaces --include-workspace-root; then + log_error "Failed to install workspace dependencies." +fi + +log_info "Building dashboard and its dependent packages" +if ! npx --yes turbo run build --filter=@iot-app-kit/dashboard; then + log_error "Failed to build dashboard and its dependent packages." +fi + +log_info "Starting local npm registry server on port ${REGISTRY_PORT}" +# launch verdaccio in the background +npx --yes verdaccio --listen "${REGISTRY_PORT}" & +VERDACCIO_PID=$! +sleep 2 # give verdaccio a moment to start +if ! kill -0 "$VERDACCIO_PID" &>/dev/null; then + log_error "Verdaccio failed to start." +fi +log_debug "Verdaccio PID: ${VERDACCIO_PID}" + +log_info "Waiting for local npm registry to be ready at ${REGISTRY_ENDPOINT}" +wait_for_registry + +log_info "Setting npm registry to ${REGISTRY_ENDPOINT}" +if ! npm config set registry "${REGISTRY_ENDPOINT}" --location=project; then + log_error "Failed to set registry ${REGISTRY_ENDPOINT}" +fi + +log_info "Authenticating into local npm registry with dummy credentials" +if ! npx --yes npm-cli-login -u test -p 1234 -e test@domain.test -r "${REGISTRY_ENDPOINT}"; then + log_error "Authentication into local npm registry failed." +fi + +log_info "Bumping package versions" +log_debug "Initializing changesets dependency" +if ! npx --yes changeset init; then + log_error "Changeset initialization failed." +fi + +log_debug "Creating ephemeral patch changeset: ${CHANGESET_FILE}" +{ + echo "---" + echo "'@iot-app-kit/core': patch" + echo "'@iot-app-kit/core-util': patch" + echo "'@iot-app-kit/dashboard': patch" + echo "'@iot-app-kit/react-components': patch" + echo "'@iot-app-kit/source-iotsitewise': patch" + echo "'@iot-app-kit/source-iottwinmaker': patch" + echo "---" + echo "" + echo "Smoke test patch bump." +} > "${CHANGESET_FILE}" + +log_debug "Performing patch version bump" +if ! npx --yes changeset version; then + log_error "Changeset version bump failed." +fi + +log_info "Publishing packages to local npm registry: ${REGISTRY_ENDPOINT}" +if ! npm publish -w @iot-app-kit/core \ + -w @iot-app-kit/core-util \ + -w @iot-app-kit/dashboard \ + -w @iot-app-kit/react-components \ + -w @iot-app-kit/source-iotsitewise \ + -w @iot-app-kit/source-iottwinmaker; then + log_error "Failed to publish packages." +fi + +log_info "Bumping dashboard version in smoke-test" +DASHBOARD_VERSION=$(cd packages/dashboard && npm pkg get version --workspaces=false | tr -d '"') +if [ -z "$DASHBOARD_VERSION" ]; then + log_error "Failed to extract dashboard version." +fi +smoke_test_run_cmd npm pkg set dependencies.@iot-app-kit/dashboard="${DASHBOARD_VERSION}" + +log_info "Validating installation" +if ! smoke_test_run_cmd npm install --registry="${REGISTRY_ENDPOINT}"; then + log_error "Installation validation failed." +fi + +log_info "Validating re-installation" +if ! smoke_test_run_cmd npm install --registry="${REGISTRY_ENDPOINT}"; then + log_error "Re-installation validation failed." +fi + +log_info "Validating bundling" +if ! smoke_test_run_cmd npm run validate:bundling; then + log_error "Bundling validation failed." +fi + +log_info "Validating runtime" +if ! smoke_test_run_cmd npm run validate:runtime; then + log_error "Runtime validation failed." +fi + +log_info "Smoke test completed successfully." diff --git a/testing/smoke-test/README.md b/testing/smoke-test/README.md index 36c450c10..fe6f422e3 100644 --- a/testing/smoke-test/README.md +++ b/testing/smoke-test/README.md @@ -32,4 +32,4 @@ The current scope includes explicitly validating the `dashboard` package and imp ## Relationships - `smoke-test` relies on CI orchestration (see `.github/workflows/validate.yml`) to facilitate package validation. -- `prep-smoke-test-env.sh` is an executable script called by the CI orchestration to prepare the smoke test environment. The script incrementally builds and tars the packages, modifies their `package.json`s to depend on the tarballs along the way. +- `smoke-test.sh` is an executable script for the smoke test. diff --git a/testing/smoke-test/package.json b/testing/smoke-test/package.json index 6c1de9dd3..9a7763dcd 100644 --- a/testing/smoke-test/package.json +++ b/testing/smoke-test/package.json @@ -4,17 +4,16 @@ "version": "0.0.0", "type": "module", "scripts": { - "clean": "rimraf *.tgz playwright-report test-results dist", - "clean:nuke": "rimraf *.tgz playwright-report test-results node_modules", + "clean": "rimraf playwright-report test-results dist", + "clean:nuke": "rimraf playwright-report test-results node_modules", "dev": "vite", - "validate:installation": "npm install $(find . -name '*.tgz') && npm run validate:re-installation", - "validate:re-installation": "npm install", - "validate:runtime": "npx playwright test", + "validate:runtime": "npx --yes playwright test", "validate:bundling": "vite build" }, "dependencies": { "@aws-sdk/client-iot-events": "^3.354.0", "@aws-sdk/client-iotsitewise": "^3.696.0", + "@iot-app-kit/dashboard": "12.5.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, From 8dbd74cb79f085580251a111aad46811dc2f7753 Mon Sep 17 00:00:00 2001 From: jmbuss Date: Wed, 19 Feb 2025 13:34:18 -0700 Subject: [PATCH 04/10] feat(resource-explorer): add dark mode support --- package-lock.json | 17 ++++++++++++- packages/react-components/.storybook/main.ts | 2 +- packages/react-components/package.json | 3 ++- .../asset-drop-down.spec.tsx | 8 +++++-- .../time-series-drop-down.spec.tsx | 8 +++++-- .../resource-table/resource-table.tsx | 5 ++-- .../src/hooks/useTheming/applyTokens.ts | 1 + .../src/hooks/useTheming/types.ts | 1 + .../alarm-explorer.stories.tsx | 2 ++ .../asset-explorer.stories.tsx | 2 ++ .../asset-model-explorer.stories.tsx | 2 ++ .../asset-property-explorer.stories.tsx | 2 ++ .../stories/resource-explorers/decorators.tsx | 24 +++++++++++++++++++ .../explorer-combinations.stories.tsx | 7 +++++- .../time-series-explorer.stories.tsx | 2 ++ 15 files changed, 76 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index a242215db..9a60a001f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14733,6 +14733,20 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/@storybook/preview-api": { + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/@storybook/preview-api/-/preview-api-8.5.8.tgz", + "integrity": "sha512-HJoz2o28VVprnU5OG6JO6CHrD3ah6qVPWixbnmyUKd0hOYF5dayK5ptmeLyUpYX56Eb2KoYcuVaeQqAby4RkNw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + } + }, "node_modules/@storybook/react": { "version": "8.4.5", "resolved": "https://registry.npmjs.org/@storybook/react/-/react-8.4.5.tgz", @@ -37846,6 +37860,7 @@ "@playwright/test": "^1.48.2", "@storybook/addon-essentials": "^8.4.5", "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", "@storybook/react": "^8.4.5", "@storybook/react-vite": "^8.4.5", "@storybook/test": "^8.4.5", @@ -37884,7 +37899,7 @@ "react-intl": "^6.8.7", "rimraf": "^5.0.1", "storybook": "^8.4.5", - "storybook-dark-mode": "^3.0.0", + "storybook-dark-mode": "^3.0.3", "tsconfig-paths-webpack-plugin": "^4.1.0", "type-fest": "^4.28.1", "typescript": "^5.5.4", diff --git a/packages/react-components/.storybook/main.ts b/packages/react-components/.storybook/main.ts index bb436f6ef..787bf57aa 100644 --- a/packages/react-components/.storybook/main.ts +++ b/packages/react-components/.storybook/main.ts @@ -6,7 +6,7 @@ dotenv.config(); const config = { stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'], - addons: ['@storybook/addon-links', '@storybook/addon-essentials'], + addons: ['@storybook/addon-links', '@storybook/addon-essentials', 'storybook-dark-mode'], framework: '@storybook/react-vite', diff --git a/packages/react-components/package.json b/packages/react-components/package.json index aa45d92e1..34fd4c9e6 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -62,6 +62,7 @@ "@playwright/test": "^1.48.2", "@storybook/addon-essentials": "^8.4.5", "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", "@storybook/react": "^8.4.5", "@storybook/react-vite": "^8.4.5", "@storybook/test": "^8.4.5", @@ -100,7 +101,7 @@ "react-intl": "^6.8.7", "rimraf": "^5.0.1", "storybook": "^8.4.5", - "storybook-dark-mode": "^3.0.0", + "storybook-dark-mode": "^3.0.3", "tsconfig-paths-webpack-plugin": "^4.1.0", "type-fest": "^4.28.1", "typescript": "^5.5.4", diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-drop-down.spec.tsx b/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-drop-down.spec.tsx index 4b1cef57a..3f3733d8c 100644 --- a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-drop-down.spec.tsx +++ b/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-drop-down.spec.tsx @@ -42,7 +42,11 @@ describe('asset drop-down', () => { await dropDown.open(); - expect(screen.getByText('No assets.')).toBeVisible(); + /** + * cloudscape added an extra span for screenreaders + * that is detected by the testing framework + */ + expect(screen.getAllByText('No assets.')[0]).toBeVisible(); }); it('renders a multi-select drop-down without configuration', async () => { @@ -52,7 +56,7 @@ describe('asset drop-down', () => { await dropDown.open(); - expect(screen.getByText('No assets.')).toBeVisible(); + expect(screen.getAllByText('No assets.')[0]).toBeVisible(); }); it('renders drop-down options', async () => { diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/time-series-drop-down.spec.tsx b/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/time-series-drop-down.spec.tsx index 2535f58e5..7532767d1 100644 --- a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/time-series-drop-down.spec.tsx +++ b/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/time-series-drop-down.spec.tsx @@ -48,7 +48,11 @@ describe('time series drop-down', () => { await dropDown.open(); - expect(screen.getByText('No time series.')).toBeVisible(); + /** + * cloudscape added an extra span for screenreaders + * that is detected by the testing framework + */ + expect(screen.getAllByText('No time series.')[0]).toBeVisible(); }); it('renders a multi-select drop-down without configuration', async () => { @@ -58,7 +62,7 @@ describe('time series drop-down', () => { await dropDown.open(); - expect(screen.getByText('No time series.')).toBeVisible(); + expect(screen.getAllByText('No time series.')[0]).toBeVisible(); }); it('renders drop-down options', async () => { diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table.tsx b/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table.tsx index 673903443..ede4d5478 100644 --- a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table.tsx +++ b/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table.tsx @@ -16,6 +16,7 @@ import { ResourceTablePagination } from './resource-table-pagination'; import { ResourceTableSearch } from './resource-table-search'; import { ResourceTableTitle } from './resource-table-title'; import { ResourceTableUserSettings } from './resource-table-user-settings'; +import { colorBackgroundContainerContent } from '@cloudscape-design/design-tokens'; export function ResourceTable({ resourceName, @@ -101,7 +102,7 @@ export function ResourceTable({ ); return ( - <> +
({ resizableColumns ariaLabels={ariaLabels} /> - +
); } diff --git a/packages/react-components/src/hooks/useTheming/applyTokens.ts b/packages/react-components/src/hooks/useTheming/applyTokens.ts index bca630741..976663261 100644 --- a/packages/react-components/src/hooks/useTheming/applyTokens.ts +++ b/packages/react-components/src/hooks/useTheming/applyTokens.ts @@ -27,6 +27,7 @@ export const applyTokens = (tokens?: Tokens) => { tokens?.colorBackgroundButtonPrimaryDisabled, colorBackgroundButtonPrimaryHover: tokens?.colorBackgroundButtonPrimaryHover, + colorBackgroundContainerContent: tokens?.colorBackgroundContainerContent, colorBackgroundControlChecked: tokens?.colorBackgroundControlChecked, colorBackgroundControlDefault: tokens?.colorBackgroundControlDefault, colorBackgroundControlDisabled: tokens?.colorBackgroundControlDisabled, diff --git a/packages/react-components/src/hooks/useTheming/types.ts b/packages/react-components/src/hooks/useTheming/types.ts index 000452eb6..96ddc1f04 100644 --- a/packages/react-components/src/hooks/useTheming/types.ts +++ b/packages/react-components/src/hooks/useTheming/types.ts @@ -20,6 +20,7 @@ export type Tokens = Pick< | 'colorBackgroundButtonPrimaryDefault' | 'colorBackgroundButtonPrimaryDisabled' | 'colorBackgroundButtonPrimaryHover' + | 'colorBackgroundContainerContent' | 'colorBackgroundControlChecked' | 'colorBackgroundControlDefault' | 'colorBackgroundControlDisabled' diff --git a/packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx b/packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx index 526b5ca32..c01c9e53a 100644 --- a/packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx +++ b/packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx @@ -13,6 +13,7 @@ import { StoryWithClearedResourceCache, StoryWithSelectableResource, StoryWithTanstackDevTools, + StoryWithTheming, } from './decorators'; export default { @@ -27,6 +28,7 @@ export default { StoryWithTanstackDevTools, StoryWithClearedResourceCache, StoryWithSelectableResource, + StoryWithTheming, ], argTypes: { ...SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx b/packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx index ab89b3eb7..ecaaae911 100644 --- a/packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx +++ b/packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx @@ -13,6 +13,7 @@ import { StoryWithClearedResourceCache, StoryWithSelectableResource, StoryWithTanstackDevTools, + StoryWithTheming, } from './decorators'; export default { @@ -27,6 +28,7 @@ export default { StoryWithTanstackDevTools, StoryWithClearedResourceCache, StoryWithSelectableResource, + StoryWithTheming, ], argTypes: { ...SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx b/packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx index 0a69bb7fe..5e3baedc6 100644 --- a/packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx +++ b/packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx @@ -13,6 +13,7 @@ import { StoryWithClearedResourceCache, StoryWithSelectableResource, StoryWithTanstackDevTools, + StoryWithTheming, } from './decorators'; export default { @@ -28,6 +29,7 @@ export default { StoryWithTanstackDevTools, StoryWithClearedResourceCache, StoryWithSelectableResource, + StoryWithTheming, ], argTypes: { ...SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx b/packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx index ac62dddf9..b1f4c4a1c 100644 --- a/packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx +++ b/packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx @@ -13,6 +13,7 @@ import { StoryWithClearedResourceCache, StoryWithSelectableResource, StoryWithTanstackDevTools, + StoryWithTheming, } from './decorators'; export default { @@ -27,6 +28,7 @@ export default { StoryWithTanstackDevTools, StoryWithClearedResourceCache, StoryWithSelectableResource, + StoryWithTheming, ], argTypes: { ...SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/decorators.tsx b/packages/react-components/stories/resource-explorers/decorators.tsx index eebb399f1..8edcbc45b 100644 --- a/packages/react-components/stories/resource-explorers/decorators.tsx +++ b/packages/react-components/stories/resource-explorers/decorators.tsx @@ -2,6 +2,12 @@ import { type DecoratorFn } from '@storybook/react'; import { useEffect, useState } from 'react'; import { resourceExplorerQueryClient } from '../../src/components/resource-explorers/requests'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; +import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode'; +import { addons } from '@storybook/preview-api'; +import { useTheme } from '../../src/hooks/useTheming'; + +// get channel to listen to event emitter +const channel = addons.getChannel(); export const StoryWithTanstackDevTools: DecoratorFn = (Story) => { return ( @@ -30,3 +36,21 @@ export const StoryWithSelectableResource: DecoratorFn = (Story) => { /> ); }; + +export const StoryWithTheming: DecoratorFn = (Story) => { + // this example uses hook but you can also use class component as well + const [isDark, setDark] = useState(false); + + useEffect(() => { + // listen to DARK_MODE event + channel.on(DARK_MODE_EVENT_NAME, setDark); + return () => channel.off(DARK_MODE_EVENT_NAME, setDark); + }, [setDark]); + + useTheme({ mode: isDark ? 'dark' : 'light' }); + return ( + <> + + + ); +}; diff --git a/packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx b/packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx index 05b37c9cb..4607dca51 100644 --- a/packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx +++ b/packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx @@ -14,12 +14,17 @@ import { client, eventsClient } from './data-source'; import { StoryWithClearedResourceCache, StoryWithTanstackDevTools, + StoryWithTheming, } from './decorators'; export default { title: 'Resource Explorers/Combinations', component: AssetExplorer, - decorators: [StoryWithTanstackDevTools, StoryWithClearedResourceCache], + decorators: [ + StoryWithTanstackDevTools, + StoryWithClearedResourceCache, + StoryWithTheming, + ], } satisfies Meta; export function AssetExplorerPlusAssetPropertyExplorer() { diff --git a/packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx b/packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx index 4007c549e..53d039326 100644 --- a/packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx +++ b/packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx @@ -13,6 +13,7 @@ import { StoryWithClearedResourceCache, StoryWithSelectableResource, StoryWithTanstackDevTools, + StoryWithTheming, } from './decorators'; export default { @@ -28,6 +29,7 @@ export default { StoryWithTanstackDevTools, StoryWithClearedResourceCache, StoryWithSelectableResource, + StoryWithTheming, ], argTypes: { ...SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, From b6edf85f9d80f3cec276bfa8bc31cf20863ea84c Mon Sep 17 00:00:00 2001 From: jmbuss Date: Tue, 4 Mar 2025 14:41:39 -0700 Subject: [PATCH 05/10] chore(core-util): security fix for isNumeric util --- packages/core-util/src/sdks/number.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/core-util/src/sdks/number.ts b/packages/core-util/src/sdks/number.ts index 1d4123725..bf6a8721b 100644 --- a/packages/core-util/src/sdks/number.ts +++ b/packages/core-util/src/sdks/number.ts @@ -1,4 +1,5 @@ import type { Primitive } from '@iot-app-kit/core'; +import { isNaN, isNumber } from 'lodash-es'; /** * Rounds a number to a given precision @@ -26,5 +27,11 @@ export const round = (num: number, precision?: number): string => { /** * Checks if value can be used as a number */ -export const isNumeric = (value: Primitive): value is number => - /^(\+|-)?(Infinity|\d+)(\.\d+)?e?((\+|-)?\d+)?$/.test(String(value)); +export const isNumeric = (value: Primitive): value is number => { + if (typeof value !== 'number' && typeof value !== 'string') { + return false; + } + + const test = Number(value); + return isNumber(test) && !isNaN(test); +}; From 35df3fdc762b030b21476eccd0284bc3b1a4d4ee Mon Sep 17 00:00:00 2001 From: jmbuss Date: Fri, 28 Feb 2025 10:43:32 -0700 Subject: [PATCH 06/10] feat: separate hooks and react-components into packages --- package-lock.json | 355 ++ packages/component-core/.dockerignore | 2 + packages/component-core/.env.example | 9 + packages/component-core/.eslintignore | 5 + packages/component-core/.eslintrc.cjs | 22 + packages/component-core/CHANGELOG.md | 2925 +++++++++++++++++ packages/component-core/README.md | 22 + packages/component-core/package.json | 110 + .../src/common/chartTypes.ts | 0 .../component-core/src/common/constants.ts | 21 + .../src/data/README.md | 0 .../dataSourceLoader/dataSourceLoader.spec.ts | 0 .../data/dataSourceLoader/dataSourceLoader.ts | 0 .../src/data/dataSourceLoader/index.ts | 0 .../src/data/index.ts | 0 .../transformers/anomaly/arrow/datasource.ts | 0 .../data/transformers/anomaly/arrow/index.ts | 0 .../data/transformers/anomaly/arrow/input.ts | 0 .../anomaly/arrow/transformer.spec.ts | 0 .../transformers/anomaly/arrow/transformer.ts | 0 .../src/data/transformers/anomaly/index.ts | 0 .../src/data/transformers/anomaly/input.ts | 0 .../transformers/anomaly/object/datasource.ts | 0 .../data/transformers/anomaly/object/index.ts | 0 .../data/transformers/anomaly/object/input.ts | 0 .../anomaly/object/transformer.spec.ts | 0 .../anomaly/object/transformer.ts | 0 .../src/data/transformers/anomaly/output.ts | 0 .../src/data/transformers/arrow/dataSource.ts | 0 .../src/data/transformers/arrow/index.ts | 0 .../src/data/transformers/arrow/input.ts | 0 .../transformers/arrow/transformer.spec.ts | 0 .../data/transformers/arrow/transformer.ts | 0 .../src/data/transformers/index.ts | 0 .../src/data/transformers/input.ts | 0 .../data/transformers/object/dataSource.ts | 0 .../src/data/transformers/object/index.ts | 0 .../src/data/transformers/object/input.ts | 0 .../transformers/object/transformer.spec.ts | 0 .../data/transformers/object/transformer.ts | 0 .../src/data/types.ts | 0 .../hooks/requestFunctions/data/iotevents.ts | 0 .../requestFunctions/data/iotsitewise.ts | 0 .../useIoTEventsClient.spec.ts | 0 .../requestFunctions/useIoTEventsClient.ts | 0 .../useIoTSiteWiseClient.spec.ts | 0 .../requestFunctions/useIoTSiteWiseClient.ts | 0 .../src/hooks/useAlarms/constants.ts | 0 .../src/hooks/useAlarms/hookHelpers/index.ts | 0 .../useAlarms/hookHelpers/predicates.spec.ts | 0 .../hooks/useAlarms/hookHelpers/predicates.ts | 0 .../hookHelpers/useAlarmAssets.spec.ts | 0 .../useAlarms/hookHelpers/useAlarmAssets.ts | 0 .../hookHelpers/useAlarmModels.spec.ts | 0 .../useAlarms/hookHelpers/useAlarmModels.ts | 0 .../hookHelpers/useAlarmSources.spec.ts | 0 .../useAlarms/hookHelpers/useAlarmSources.ts | 0 .../hookHelpers/useAlarmState.spec.ts | 0 .../useAlarms/hookHelpers/useAlarmState.ts | 2 +- .../hookHelpers/useAlarmThreshold.spec.ts | 0 .../hookHelpers/useAlarmThreshold.ts | 2 +- .../hookHelpers/useAlarmTypes.spec.ts | 0 .../useAlarms/hookHelpers/useAlarmTypes.ts | 0 .../alarmToSiteWiseDataStreamQuery.spec.ts | 0 .../alarmToSiteWiseDataStreamQuery.ts | 2 +- .../filterDatastreamsForAlarm.ts | 0 .../useInputPropertyTimeSeriesData/types.ts | 0 .../updateAlarmInputPropertyData.ts | 0 .../updateAlarmStatusForDatastreams.ts | 0 .../useInputPropertyTimeSeriesData.spec.ts | 0 .../useInputPropertyTimeSeriesData.ts | 0 .../useLatestAlarmPropertyValues.spec.ts | 0 .../useLatestAlarmPropertyValues.ts | 0 .../useAlarms/hookHelpers/useQueryMode.ts | 0 .../hookHelpers/useReactQueryEffect.ts | 0 .../src/hooks/useAlarms/index.ts | 0 .../hooks/useAlarms/state/actions/index.ts | 0 .../actions/summarizeAlarmModels/index.ts | 0 .../summarizeAlarmModels.spec.ts | 0 .../summarizeAlarmModels.ts | 2 +- .../actions/summarizeAlarmModels/types.ts | 0 .../summarizeAlarms/createAlarmsByAsset.ts | 0 .../createAlarmsByAssetModel.ts | 0 .../state/actions/summarizeAlarms/index.ts | 0 .../summarizeAlarms/summarizeAlarms.spec.ts | 0 .../summarizeAlarms/summarizeAlarms.ts | 0 .../state/actions/summarizeAlarms/types.ts | 0 .../filterDataStreamsForAlarm.spec.ts | 0 .../filterDataStreamsForAlarm.ts | 0 .../updateAlarmInputPropertyData/index.ts | 0 .../matchesDataStream.spec.ts | 0 .../matchesDataStream.ts | 0 .../updateAlarmInputPropertyData/types.ts | 0 .../updateAlarmInputPropertyData.spec.ts | 0 .../updateAlarmInputPropertyData.ts | 0 .../actions/updateAlarmSourceData/index.ts | 0 .../actions/updateAlarmSourceData/types.ts | 0 .../updateAlarmSourceData.spec.ts | 0 .../updateAlarmSourceData.ts | 0 .../actions/updateAlarmStateData/index.ts | 0 .../actions/updateAlarmStateData/types.ts | 0 .../updateAlarmStateData.spec.ts | 0 .../updateAlarmStateData.ts | 0 .../actions/updateAlarmThresholdData/index.ts | 0 .../actions/updateAlarmThresholdData/types.ts | 0 .../updateAlarmThresholdData.spec.ts | 0 .../updateAlarmThresholdData.ts | 2 +- .../actions/updateAlarmTypeData/index.ts | 0 .../actions/updateAlarmTypeData/types.ts | 0 .../updateAlarmTypeData.spec.ts | 0 .../updateAlarmTypeData.ts | 0 .../actions/utils/assetPropertyValueTime.ts | 2 +- .../utils/compareAssetPropertyValues.ts | 0 .../utils/filterAssetPropertyValues.ts | 2 +- .../utils/shouldUpdateAssetPropertyValues.ts | 0 .../utils/uniqueSortAssetPropertyValues.ts | 0 .../state/actions/utils/viewportAsInterval.ts | 0 .../convertAlarmRequestStateToAlarmData.ts | 2 +- ...vertAlarmRequestStateToInitialAlarmData.ts | 2 +- .../convertAlarmsStateToAlarmDatas.spec.ts | 0 .../convertAlarmsStateToAlarmDatas.ts | 0 .../hooks/useAlarms/state/converter/index.ts | 0 .../converter/utils/alarmDataAsComparable.ts | 0 .../useAlarms/state/converter/utils/index.ts | 0 .../isGettingLatestAlarmSourceValue.spec.ts | 0 .../utils/isGettingLatestAlarmSourceValue.ts | 0 .../utils/isInputPropertyRequest.spec.ts | 0 .../converter/utils/isInputPropertyRequest.ts | 0 .../utils/isSummarizingAlarmModels.spec.ts | 0 .../utils/isSummarizingAlarmModels.ts | 0 .../utils/isSummarizingAlarms.spec.ts | 0 .../converter/utils/isSummarizingAlarms.ts | 2 +- .../src/hooks/useAlarms/state/index.ts | 0 .../src/hooks/useAlarms/state/reducer.ts | 0 .../src/hooks/useAlarms/state/types.ts | 0 .../hooks/useAlarms/state/useAlarmState.ts | 0 .../useAlarms/state/useRequestSelector.ts | 0 .../src/hooks/useAlarms/transformers/index.ts | 1 + .../mapAlarmRuleExpression.spec.ts | 0 .../transformers/mapAlarmRuleExpression.ts | 0 .../parseAlarmStateProperty.spec.ts | 0 .../transformers/parseAlarmStateProperty.ts | 2 +- .../src/hooks/useAlarms/types.ts | 0 .../src/hooks/useAlarms/useAlarms.spec.ts | 0 .../src/hooks/useAlarms/useAlarms.ts | 0 .../useAlarms/utils/alarmValueFilterer.ts | 2 +- .../useAlarms/utils/constructAlarmProperty.ts | 0 .../hooks/useAlarms/utils/createAlarmData.ts | 0 .../utils/filterAlarmInputProperties.ts | 0 .../hooks/useAlarms/utils/parseAlarmModels.ts | 0 .../useAlarms/utils/parseCompositeModels.ts | 0 .../hooks/useAlarms/utils/queryStatus.spec.ts | 0 .../src/hooks/useAlarms/utils/queryStatus.ts | 0 .../useAlarms/utils/updateAlarmValues.ts | 9 +- .../src/hooks/useAlarmsFromQueries/index.ts | 0 .../useAlarmsFromQueries.ts | 2 +- .../src/hooks/useColoredDataStreams/index.ts | 0 .../useColoredDataStreams.spec.ts | 0 .../useColoredDataStreams.ts | 0 .../useDataStreamColorer.ts | 0 .../src/hooks/useSingleQueryAlarm/index.ts | 1 + .../src/hooks/useSingleQueryAlarm/types.ts | 9 + .../useSingleQueryAlarm.ts | 2 +- .../src/hooks/useTheming/applyTokens.ts | 0 .../src/hooks/useTheming/index.ts | 0 .../src/hooks/useTheming/types.ts | 0 .../src/hooks/useTheming/useTheming.ts | 0 .../src/hooks/useTimeSeriesData/index.ts | 0 .../hooks/useTimeSeriesData/providerStore.ts | 0 .../useTimeSeriesData.spec.ts | 0 .../useTimeSeriesData/useTimeSeriesData.ts | 0 .../src/hooks/useViewport/index.ts | 2 + .../hooks/useViewport/useUtilizedViewport.ts | 0 .../src/hooks/useViewport/useViewport.ts | 18 + .../utils/bindStylesToDataStreams.spec.ts | 0 .../hooks/utils/bindStylesToDataStreams.ts | 0 .../src/hooks/utils/combineTimeSeriesData.ts | 0 packages/component-core/src/index.ts | 63 + .../src/queries/common}/anySignal.ts | 0 .../src/queries/common/constants.ts | 1 + .../src/queries/common}/types.ts | 11 +- .../src/queries/index.ts | 2 +- .../src/queries/predicates/index.ts | 0 .../src/queries/queryClient.ts | 0 .../describeAlarmModelQueryKeyFactory.ts | 0 .../queries/useDescribeAlarmModels/index.ts | 0 .../useDescribeAlarmModels.spec.ts | 0 .../useDescribeAlarmModels.ts | 0 .../describeAssetQueryKeyFactory.ts | 0 .../getDescribeAssetRequest.ts | 0 .../src/queries/useDescribeAsset/index.ts | 0 .../useDescribeAsset/useDescribeAsset.ts | 0 ...assetModelCompositeModelQueryKeyFactory.ts | 0 ...DescribeAssetModelCompositeModelRequest.ts | 0 .../index.ts | 0 .../useDescribeAssetModelCompositeModel.ts | 0 .../describeAssetModelQueryKeyFactory.ts | 0 .../queries/useDescribeAssetModels/index.ts | 0 .../useDescribeAssetModels.spec.ts | 0 .../useDescribeAssetModels.ts | 0 .../useDescribeAssetProperties/index.ts | 0 .../useDescribeAssetProperties.ts | 2 +- .../describeAssetPropertyQueryKeyFactory.ts | 0 .../getDescribeAssetPropertyRequest.ts | 0 .../queries/useDescribeAssetProperty/index.ts | 0 .../useDescribeAssetProperty.ts | 0 .../src/queries/useDescribeAssets/index.ts | 0 .../useDescribeAssets.spec.tsx | 0 .../useDescribeAssets/useDescribeAssets.ts | 0 ...ssetPropertyValueHistoryQueryKeyFactory.ts | 0 .../getGetAssetPropertyValueHistoryRequest.ts | 2 +- .../useGetAssetPropertyValueHistory/index.ts | 0 .../useGetAssetPropertyValueHistory.ts | 2 +- .../historicalAssetPropertyValueKeyFactory.ts | 0 .../useHistoricalAssetPropertyValues/index.ts | 0 .../batchResponseProcessor.ts | 0 .../requestExecution/batcher.ts | 2 +- .../requestExecution/constants.ts | 0 .../getHistoricalAssetPropertyValueRequest.ts | 0 .../requestExecution/index.ts | 0 .../requestExecution/mapTimeOrdering.ts | 0 .../requestExecution/mapViewport.ts | 2 +- .../useHistoricalAssetPropertyValues/types.ts | 0 .../useHistoricalAssetPropertyValues.spec.ts | 0 .../useHistoricalAssetPropertyValues.ts | 0 .../useRefreshRate.ts | 0 .../useLatestAssetPropertyValues/index.ts | 0 .../latestAssetPropertyValueKeyFactory.ts | 0 .../requestExecution/batcher.ts | 2 +- .../getLatestAssetPropertyValueRequest.ts | 0 .../requestExecution/index.ts | 0 .../useLatestAssetPropertyValues/types.ts | 0 .../useLatestAssetPropertyValues.spec.ts | 0 .../useLatestAssetPropertyValues.ts | 0 .../useSiteWiseAnomalyDataSource/constants.ts | 0 .../getAnomalyResultProperty.ts | 0 .../useSiteWiseAnomalyDataSource/index.ts | 1 + .../completeAnomalyEvents.spec.ts | 0 .../parseAnomaly/completeAnomalyEvents.ts | 0 .../extractDiagnoticProperties.ts | 0 .../parseAnomaly/isAnomalyEvent.ts | 0 .../parseAnomaly/isDiagnostic.ts | 0 .../parseAnomaly/parseAnomalyEvent.ts | 2 +- .../parseAnomaly/parseAnomalyEvents.spec.ts | 0 .../parseAnomaly/parseAnomalyEvents.ts | 2 +- .../parseAnomaly/parseDiagnostics.ts | 0 .../parseAnomaly/types.ts | 0 .../useAnomalyEventsViewport.ts | 0 .../useSiteWiseAnomalyDataSource.ts | 0 .../utils/convertAlarmQueryToAlarmRequest.ts | 0 .../utils/useTimeSeriesDataQuerySync.ts | 0 .../src/testing/alarms/index.ts | 0 .../src/testing/alarms/mockAlarmData.ts | 0 .../src/testing/alarms/mockAlarmModel.ts | 0 .../src/testing/alarms/mockCompositeModels.ts | 0 .../src/testing/alarms/mockDescribeAsset.ts | 0 .../testing/alarms/mockDescribeAssetModel.ts | 0 .../src/testing/alarms/mockEventsClient.ts | 0 .../src/testing/alarms/mockIds.ts | 0 .../src/testing/alarms/mockProperties.ts | 0 .../src/testing/alarms/mockSiteWiseClient.ts | 0 .../src/testing/alarms/mockStatuses.ts | 0 .../src/testing/mockWidgetProperties.ts | 132 + ...uildTransformAlarmForSingleQueryWidgets.ts | 0 .../src/utils}/isDurationViewport.ts | 0 .../src/utils/queries.ts | 0 .../utils/transformAlarmsToThreshold.spec.ts | 0 .../src/utils/transformAlarmsToThreshold.ts | 0 packages/component-core/tsconfig.cjs.json | 17 + packages/component-core/tsconfig.esm.json | 17 + packages/component-core/tsconfig.json | 9 + packages/component-core/vite.config.ts | 29 + packages/component-core/vitest.setup.ts | 49 + packages/core/package.json | 1 + .../core/src/common/createNonNullableList.ts | 7 + packages/core/src/common/time.spec.ts | 71 + packages/core/src/common/time.ts | 33 + packages/core/src/index.ts | 11 +- packages/react-components/.env.example | 16 +- packages/react-components/package.json | 2 + .../react-components/src/common/constants.ts | 21 - .../alarm-components/alarm-content/types.ts | 2 +- .../alarm-icons/getIconForAlarmState.ts | 2 +- .../alarm-state/alarmStateText.tsx | 6 +- .../alarm-state/alarmStateTextCustomIcon.tsx | 2 +- .../converters/convertDataset.ts | 2 +- .../anomaly-chart/converters/convertXAxis.ts | 6 +- .../components/anomaly-chart/hooks/types.ts | 5 +- .../anomaly-chart/hooks/useAnomalyEchart.ts | 6 +- .../anomaly-chart/hooks/useTransformedData.ts | 4 +- .../src/components/anomaly-chart/index.tsx | 6 +- .../anomaly-chart/tests/mockDataSources.ts | 8 +- .../components/anomaly-chart/tooltip/date.tsx | 2 +- .../src/components/anomaly-chart/types.ts | 2 +- .../src/components/bar-chart/barChart.tsx | 12 +- .../bar-chart/hooks/useBarChartAlarms.ts | 8 +- .../hooks/useNormalizedDataStreams.ts | 2 +- .../src/components/chart/baseChart.tsx | 3 +- .../chart/chartOptions/convertThresholds.ts | 2 +- .../chart/chartOptions/tooltip/time.tsx | 2 +- .../chartOptions/useChartConfiguration.ts | 2 +- .../src/components/chart/eChartsConstants.ts | 6 +- .../components/chart/hooks/useChartAlarms.ts | 14 +- .../src/components/chart/hooks/useDataZoom.ts | 2 +- .../chart/hooks/useNormalizedDataStreams.ts | 2 +- .../chart/hooks/useVisualizedDataStreams.ts | 9 +- .../latestAlarmStateValueCell.tsx | 2 +- .../trendCursor/trendCursorHeader.tsx | 2 +- .../chart/legend/table/table.spec.tsx | 2 +- .../src/components/chart/types.ts | 2 +- .../src/components/dial/dial.tsx | 12 +- .../gauge/converters/convertSeries.spec.ts | 34 + .../src/components/gauge/gauge.tsx | 15 +- .../src/components/gauge/gaugeText.tsx | 2 +- .../hooks/useGaugeFormatterValue.spec.ts | 99 + .../gauge/hooks/useGaugeFormatterValue.ts | 2 +- .../src/components/gauge/types.ts | 6 +- .../gauge/utils/calculatePadding.spec.ts | 24 + ...onvertThresholdsToEchartsValuePair.spec.ts | 66 + .../src/components/kpi/kpi.tsx | 21 +- .../src/components/kpi/kpiTextFragments.tsx | 4 +- .../src/components/kpi/tests/kpi.spec.tsx | 17 +- .../src/components/kpi/tests/kpiBase.spec.tsx | 2 +- .../src/components/kpi/types.ts | 2 +- .../src/components/line-chart/lineChart.tsx | 12 +- .../components/scatter-chart/scatterChart.tsx | 12 +- .../status-timeline/alarmTransforms.ts | 4 +- .../status-timeline/statusTimeline.tsx | 21 +- .../src/components/status/status.tsx | 2 +- .../src/components/table/table.tsx | 26 +- .../src/components/table/tableHelpers.tsx | 2 +- .../src/components/table/types.ts | 2 +- .../src/components/time-sync/index.tsx | 15 +- .../components/time-sync/time-sync.spec.tsx | 2 +- .../components/time-sync/timeSelection.tsx | 2 +- .../src/components/timestampBar/index.tsx | 3 +- .../src/components/tooltip/tooltip.test.tsx | 2 +- .../extensions/trendCursors/view/view.ts | 2 +- .../unboundedZoom/useUnboundedDataZoom.ts | 6 +- .../src/hooks/useAssistantContext/utils.ts | 2 +- .../useComponentId/useComponentId.spec.ts | 43 + .../hooks/useComponenttId/useComponenttId.ts | 14 - .../hooks/useECharts/useZoomableECharts.ts | 6 +- .../src/hooks/useViewport/index.ts | 1 - .../src/hooks/useViewport/useViewport.ts | 4 - packages/react-components/src/index.ts | 17 +- .../src/queries/common/types.ts | 3 - .../cacheClient/cacheClient.ts | 50 - .../cacheClient/concreteClients.ts | 11 - .../cacheClient/index.ts | 3 - .../cacheClient/keyManager.ts | 38 - .../cacheUtils/filterAssetPropertyValues.ts | 16 - .../queries/useAssetPropertyValues/index.ts | 1 - .../batchGetAssetPropertyAggregates/index.ts | 1 - .../batchGetAssetPropertyAggregates/loader.ts | 153 - .../requestManager.ts | 121 - .../index.ts | 1 - .../loader.ts | 153 - .../requestManager.ts | 121 - .../getAssetPropertyAggregates.ts | 106 - .../getAssetPropertyValueHistory.ts | 109 - .../requestExecution/index.ts | 2 - .../requestExecution/requestExecution.ts | 108 - .../assetPropertyValuesRequestResolver.ts | 69 - .../requestManager/index.ts | 2 - .../useAutoRequestResolution.ts | 97 - .../useRequestResolverStrategy.ts | 112 - .../queries/useAssetPropertyValues/types.ts | 95 - .../useAssetPropertyValues.ts | 97 - .../utils/secondsSinceEpoch.spec.ts | 17 - .../utils/secondsSinceEpoch.ts | 2 - .../utils/timeConstants.ts | 6 - .../utils/toDataPoint.spec.ts | 129 - .../utils/toDataPoint.ts | 139 - .../cacheClient/cacheClient.ts | 180 - .../useTimeSeriesData/cacheClient/index.ts | 2 - .../cacheClient/keyManager.ts | 132 - .../cacheUtils/filterTimeSeriesData.spec.ts | 95 - .../cacheUtils/filterTimeSeriesData.ts | 34 - .../useTimeSeriesData/cacheUtils/index.ts | 1 - .../src/queries/useTimeSeriesData/index.ts | 10 - .../useTimeSeriesData/intervals/index.ts | 3 - .../useTimeSeriesData/intervals/liveData.ts | 62 - .../intervals/useLiveDataIntervals.ts | 57 - .../intervals/utils/collapse.spec.ts | 85 - .../intervals/utils/collapse.ts | 62 - .../intervals/utils/contains.spec.ts | 110 - .../intervals/utils/contains.ts | 33 - .../intervals/utils/divideInterval.ts | 22 - .../intervals/utils/index.ts | 7 - .../intervals/utils/overlaps.spec.ts | 49 - .../intervals/utils/overlaps.ts | 10 - .../intervals/utils/removeExpiredIntervals.ts | 9 - .../intervals/utils/requestRange.ts | 55 - .../intervals/utils/sort.spec.ts | 47 - .../useTimeSeriesData/intervals/utils/sort.ts | 13 - .../intervals/utils/subtractIntervals.ts | 31 - .../intervals/utils/testData.ts | 55 - .../intervals/utils/transformer.spec.ts | 144 - .../intervals/utils/transformer.ts | 58 - .../useTimeSeriesData/queryUtils/index.ts | 1 - .../queryUtils/queryStatus.ts | 9 - .../requestExecution/index.ts | 4 - .../requestExecution/requestExecution.ts | 41 - .../requestExecutionStrategy.ts | 25 - .../requestExecution/types.ts | 7 - .../requestExecution/useRequestExecuter.ts | 113 - .../absoluteDurationRequestResolver.ts | 49 - .../useTimeSeriesData/requestManager/index.ts | 5 - .../liveDurationRequestResolver.ts | 95 - .../requestManager/requestResolver.ts | 57 - .../useTimeSeriesData/requestManager/types.ts | 14 - .../requestManager/useRequestManager.ts | 58 - .../useTimeSeriesData/useBisectedData.ts | 41 - .../useTimeSeriesData/useCachedQueries.ts | 44 - .../useTimeSeriesData/useRequestStatus.ts | 61 - .../queries/useTimeSeriesData/useResponse.ts | 33 - .../useTimeSeriesData/useTimeSeriesData.ts | 33 - .../src/testing/mockWidgetProperties.ts | 9 +- .../src/utils/aggregationFrequency.ts | 2 +- .../src/utils/breachedThreshold.spec.ts | 6 +- .../src/utils/convertViewportToMs.ts | 2 +- .../src/utils/createNonNullableList.ts | 22 - .../src/utils/isDurationViewport.ts | 6 - .../src/utils/thresholdUtils.spec.ts | 4 +- .../react-components/src/utils/time.spec.ts | 312 -- packages/react-components/src/utils/time.ts | 192 -- .../anomaly/anomaly-timezone.stories.tsx | 2 +- .../stories/anomaly/anomaly.stories.tsx | 2 +- .../stories/anomaly/mockData.ts | 2 +- .../stories/gauge/connected-gauge.stories.tsx | 2 +- .../stories/kpi/connected-kpi.stories.tsx | 2 +- .../stories/queries/queriesBase.stories.tsx | 12 +- .../react-components/stories/utils/query.ts | 39 +- packages/resource-explorer/.dockerignore | 2 + packages/resource-explorer/.env.example | 9 + packages/resource-explorer/.eslintignore | 5 + packages/resource-explorer/.eslintrc.cjs | 22 + .../resource-explorer/.storybook/global.scss | 4 + packages/resource-explorer/.storybook/main.ts | 21 + .../resource-explorer/.storybook/preview.js | 12 + packages/resource-explorer/CHANGELOG.md | 2925 +++++++++++++++++ packages/resource-explorer/README.md | 22 + packages/resource-explorer/package.json | 108 + .../resource-explorer/playwright.config.ts | 76 + .../src}/constants/defaults.ts | 3 +- .../drop-down-resource-definitions.ts | 0 .../constants/table-resource-definitions.ts | 0 .../alarm-explorer/alarm-explorer.tsx | 0 .../src}/explorers/alarm-explorer/index.ts | 0 .../internal-alarm-explorer.tsx | 2 +- .../alarm-explorer/transformAlarmData.ts | 4 +- .../src}/explorers/alarm-explorer/types.ts | 0 .../asset-explorer/asset-explorer.tsx | 0 .../asset-hierarchy-path.spec.tsx | 0 .../asset-hierarchy-path.tsx | 0 .../asset-hierarchy-path/constants.ts | 0 .../asset-hierarchy-path/index.ts | 0 .../resource-relationship-path.tsx | 0 .../asset-hierarchy-path/types.ts | 0 .../use-ancestor-assets.ts | 0 .../src}/explorers/asset-explorer/index.ts | 0 .../internal-asset-explorer.tsx | 0 .../explorers/asset-explorer/predicates.ts | 0 .../src}/explorers/asset-explorer/types.ts | 0 .../asset-explorer/use-assets/index.ts | 0 .../use-assets/use-asset-model-assets.ts | 0 .../use-assets/use-asset-search.ts | 0 .../asset-explorer/use-assets/use-assets.ts | 0 .../use-assets/use-child-assets.ts | 0 .../use-assets/use-root-assets.ts | 0 .../asset-explorer/use-parent-asset.ts | 0 .../asset-model-explorer.tsx | 0 .../explorers/asset-model-explorer/index.ts | 0 .../internal-asset-model-explorer.tsx | 0 .../explorers/asset-model-explorer/types.ts | 0 .../asset-model-explorer/use-asset-models.ts | 0 .../asset-property-explorer.tsx | 0 .../asset-property-explorer/index.ts | 0 .../internal-asset-property-explorer.tsx | 0 .../asset-property-explorer/types.ts | 0 .../use-asset-properties/index.ts | 0 .../use-asset-model-properties.ts | 0 .../use-asset-properties.ts | 0 .../use-asset-property-search.ts | 0 .../use-list-asset-properties.ts | 0 .../src}/explorers/index.ts | 0 .../explorers/time-series-explorer/index.ts | 0 .../internal-time-series-explorer.tsx | 0 .../time-series-explorer.tsx | 0 .../explorers/time-series-explorer/types.ts | 0 .../time-series-explorer/use-time-series.ts | 0 .../src}/helpers/response-transformers.ts | 0 .../search-statement-normalizer.spec.ts | 0 .../helpers/search-statement-normalizer.ts | 0 .../src}/helpers/use-persistable-state.ts | 0 .../src}/helpers/use-user-customization.ts | 0 .../src}/index.ts | 9 +- .../src}/requests/index.ts | 0 .../resource-explorer-query-client.tsx | 0 .../create-data-streams-with-latest-value.ts | 0 .../create-request-entry-batches.ts | 0 .../src}/requests/use-latest-values/index.ts | 0 .../requests/use-latest-values/toValue.ts | 0 .../src}/requests/use-latest-values/types.ts | 0 .../use-latest-values/use-latest-values.ts | 0 .../use-multiple-list-requests/index.ts | 0 .../use-multiple-list-requests/types.ts | 0 .../use-multiple-list-requests.ts | 0 .../alarm-drop-down.spec.tsx | 2 +- .../asset-drop-down.spec.tsx | 0 .../asset-model-drop-down.spec.tsx | 0 .../asset-property-drop-down.spec.tsx | 0 .../time-series-drop-down.spec.tsx | 0 .../src}/testing/helpers/drop-down.tsx | 0 .../src}/testing/helpers/responses.ts | 0 .../src}/testing/helpers/table.tsx | 0 .../table-variant/alarm-table.spec.tsx | 2 +- .../table-variant/asset-model-table.spec.tsx | 0 .../asset-property-table.spec.tsx | 2 +- .../table-variant/asset-table.spec.tsx | 0 .../table-variant/time-series-table.spec.tsx | 2 +- .../src}/types/common.ts | 0 .../src}/types/drop-down.ts | 0 .../src}/types/requests.ts | 0 .../src}/types/resource-explorer.ts | 0 .../src}/types/resources.ts | 0 .../src}/types/table.ts | 0 .../src}/variants/index.ts | 0 .../src}/variants/resource-drop-down/index.ts | 0 .../resource-drop-down/resource-drop-down.tsx | 0 .../src}/variants/resource-table/index.ts | 0 .../resource-table/resource-table-empty.tsx | 0 .../resource-table/resource-table-error.tsx | 0 .../resource-table/resource-table-filter.css | 0 .../resource-table/resource-table-filter.tsx | 0 .../resource-table/resource-table-header.css | 0 .../resource-table/resource-table-header.tsx | 0 .../resource-table-no-filter-match.tsx | 0 .../resource-table-pagination.tsx | 0 .../resource-table/resource-table-search.css | 0 .../resource-table/resource-table-search.tsx | 0 .../resource-table/resource-table-title.tsx | 0 .../resource-table-user-settings.tsx | 0 .../resource-table/resource-table.tsx | 0 .../src}/variants/variant-selector.tsx | 0 .../stories}/alarm-explorer.stories.tsx | 5 +- .../stories}/asset-explorer.stories.tsx | 5 +- .../stories}/asset-model-explorer.stories.tsx | 2 +- .../asset-property-explorer.stories.tsx | 2 +- .../stories}/controls.ts | 4 +- .../stories}/data-source.ts | 6 +- .../stories}/decorators.tsx | 4 +- .../explorer-combinations.stories.tsx | 2 +- .../stories}/time-series-explorer.stories.tsx | 2 +- packages/resource-explorer/tsconfig.cjs.json | 17 + packages/resource-explorer/tsconfig.esm.json | 17 + packages/resource-explorer/tsconfig.json | 9 + packages/resource-explorer/vite.config.ts | 29 + packages/resource-explorer/vitest.setup.ts | 1 + smoke-test.sh | 4 + turbo.json | 62 +- 562 files changed, 7841 insertions(+), 4675 deletions(-) create mode 100644 packages/component-core/.dockerignore create mode 100644 packages/component-core/.env.example create mode 100755 packages/component-core/.eslintignore create mode 100644 packages/component-core/.eslintrc.cjs create mode 100644 packages/component-core/CHANGELOG.md create mode 100644 packages/component-core/README.md create mode 100644 packages/component-core/package.json rename packages/{react-components => component-core}/src/common/chartTypes.ts (100%) create mode 100644 packages/component-core/src/common/constants.ts rename packages/{react-components => component-core}/src/data/README.md (100%) rename packages/{react-components => component-core}/src/data/dataSourceLoader/dataSourceLoader.spec.ts (100%) rename packages/{react-components => component-core}/src/data/dataSourceLoader/dataSourceLoader.ts (100%) rename packages/{react-components => component-core}/src/data/dataSourceLoader/index.ts (100%) rename packages/{react-components => component-core}/src/data/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/arrow/datasource.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/arrow/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/arrow/input.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/arrow/transformer.spec.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/arrow/transformer.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/input.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/object/datasource.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/object/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/object/input.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/object/transformer.spec.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/object/transformer.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/anomaly/output.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/arrow/dataSource.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/arrow/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/arrow/input.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/arrow/transformer.spec.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/arrow/transformer.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/input.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/object/dataSource.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/object/index.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/object/input.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/object/transformer.spec.ts (100%) rename packages/{react-components => component-core}/src/data/transformers/object/transformer.ts (100%) rename packages/{react-components => component-core}/src/data/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/requestFunctions/data/iotevents.ts (100%) rename packages/{react-components => component-core}/src/hooks/requestFunctions/data/iotsitewise.ts (100%) rename packages/{react-components => component-core}/src/hooks/requestFunctions/useIoTEventsClient.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/requestFunctions/useIoTEventsClient.ts (100%) rename packages/{react-components => component-core}/src/hooks/requestFunctions/useIoTSiteWiseClient.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/requestFunctions/useIoTSiteWiseClient.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/constants.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/predicates.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/predicates.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmAssets.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmAssets.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmModels.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmModels.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmSources.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmSources.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmState.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmState.ts (98%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts (98%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmTypes.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useAlarmTypes.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts (96%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/filterDatastreamsForAlarm.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmInputPropertyData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmStatusForDatastreams.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useQueryMode.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/hookHelpers/useReactQueryEffect.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarmModels/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts (97%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarmModels/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAsset.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAssetModel.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarms/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/summarizeAlarms/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmSourceData/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmSourceData/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmStateData/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmStateData/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts (97%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmTypeData/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmTypeData/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts (77%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/utils/compareAssetPropertyValues.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts (93%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/utils/shouldUpdateAssetPropertyValues.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/utils/uniqueSortAssetPropertyValues.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/actions/utils/viewportAsInterval.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts (92%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts (94%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/alarmDataAsComparable.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts (86%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/reducer.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/useAlarmState.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/state/useRequestSelector.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/transformers/index.ts (50%) rename packages/{react-components => component-core}/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/transformers/parseAlarmStateProperty.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts (97%) rename packages/{react-components => component-core}/src/hooks/useAlarms/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/useAlarms.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/useAlarms.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/alarmValueFilterer.ts (91%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/constructAlarmProperty.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/createAlarmData.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/filterAlarmInputProperties.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/parseAlarmModels.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/parseCompositeModels.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/queryStatus.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/queryStatus.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarms/utils/updateAlarmValues.ts (95%) rename packages/{react-components => component-core}/src/hooks/useAlarmsFromQueries/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts (97%) rename packages/{react-components => component-core}/src/hooks/useColoredDataStreams/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useColoredDataStreams/useColoredDataStreams.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useColoredDataStreams/useColoredDataStreams.ts (100%) rename packages/{react-components => component-core}/src/hooks/useColoredDataStreams/useDataStreamColorer.ts (100%) rename packages/{react-components => component-core}/src/hooks/useSingleQueryAlarm/index.ts (60%) create mode 100644 packages/component-core/src/hooks/useSingleQueryAlarm/types.ts rename packages/{react-components => component-core}/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts (97%) rename packages/{react-components => component-core}/src/hooks/useTheming/applyTokens.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTheming/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTheming/types.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTheming/useTheming.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTimeSeriesData/index.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTimeSeriesData/providerStore.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTimeSeriesData/useTimeSeriesData.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/useTimeSeriesData/useTimeSeriesData.ts (100%) create mode 100644 packages/component-core/src/hooks/useViewport/index.ts rename packages/{react-components => component-core}/src/hooks/useViewport/useUtilizedViewport.ts (100%) create mode 100644 packages/component-core/src/hooks/useViewport/useViewport.ts rename packages/{react-components => component-core}/src/hooks/utils/bindStylesToDataStreams.spec.ts (100%) rename packages/{react-components => component-core}/src/hooks/utils/bindStylesToDataStreams.ts (100%) rename packages/{react-components => component-core}/src/hooks/utils/combineTimeSeriesData.ts (100%) create mode 100644 packages/component-core/src/index.ts rename packages/{react-components/src/queries/useAssetPropertyValues/requestExecution/utils => component-core/src/queries/common}/anySignal.ts (100%) create mode 100644 packages/component-core/src/queries/common/constants.ts rename packages/{react-components/src/queries/useTimeSeriesData => component-core/src/queries/common}/types.ts (70%) rename packages/{react-components => component-core}/src/queries/index.ts (88%) rename packages/{react-components => component-core}/src/queries/predicates/index.ts (100%) rename packages/{react-components => component-core}/src/queries/queryClient.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAlarmModels/describeAlarmModelQueryKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAlarmModels/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.spec.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAsset/describeAssetQueryKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAsset/getDescribeAssetRequest.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAsset/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAsset/useDescribeAsset.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModelCompositeModel/assetModelCompositeModelQueryKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModelCompositeModel/getDescribeAssetModelCompositeModelRequest.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModelCompositeModel/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModelCompositeModel/useDescribeAssetModelCompositeModel.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModels/describeAssetModelQueryKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModels/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModels/useDescribeAssetModels.spec.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetModels/useDescribeAssetModels.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetProperties/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts (95%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetProperty/describeAssetPropertyQueryKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetProperty/getDescribeAssetPropertyRequest.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetProperty/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssetProperty/useDescribeAssetProperty.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssets/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssets/useDescribeAssets.spec.tsx (100%) rename packages/{react-components => component-core}/src/queries/useDescribeAssets/useDescribeAssets.ts (100%) rename packages/{react-components => component-core}/src/queries/useGetAssetPropertyValueHistory/getAssetPropertyValueHistoryQueryKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts (97%) rename packages/{react-components => component-core}/src/queries/useGetAssetPropertyValueHistory/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts (97%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/historicalAssetPropertyValueKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/batchResponseProcessor.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts (98%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/constants.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/getHistoricalAssetPropertyValueRequest.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapTimeOrdering.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts (89%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/types.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.spec.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.ts (100%) rename packages/{react-components => component-core}/src/queries/useHistoricalAssetPropertyValues/useRefreshRate.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/latestAssetPropertyValueKeyFactory.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts (98%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/requestExecution/getLatestAssetPropertyValueRequest.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/requestExecution/index.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/types.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.spec.ts (100%) rename packages/{react-components => component-core}/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/constants.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/getAnomalyResultProperty.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/index.ts (62%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.spec.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/extractDiagnoticProperties.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isAnomalyEvent.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isDiagnostic.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts (93%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.spec.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts (79%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseDiagnostics.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/types.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/useAnomalyEventsViewport.ts (100%) rename packages/{react-components => component-core}/src/queries/useSiteWiseAnomalyDataSource/useSiteWiseAnomalyDataSource.ts (100%) rename packages/{react-components => component-core}/src/queries/utils/convertAlarmQueryToAlarmRequest.ts (100%) rename packages/{react-components => component-core}/src/queries/utils/useTimeSeriesDataQuerySync.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/index.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockAlarmData.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockAlarmModel.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockCompositeModels.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockDescribeAsset.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockDescribeAssetModel.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockEventsClient.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockIds.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockProperties.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockSiteWiseClient.ts (100%) rename packages/{react-components => component-core}/src/testing/alarms/mockStatuses.ts (100%) create mode 100644 packages/component-core/src/testing/mockWidgetProperties.ts rename packages/{react-components => component-core}/src/utils/buildTransformAlarmForSingleQueryWidgets.ts (100%) rename packages/{react-components/src/echarts/unboundedZoom => component-core/src/utils}/isDurationViewport.ts (100%) rename packages/{react-components => component-core}/src/utils/queries.ts (100%) rename packages/{react-components => component-core}/src/utils/transformAlarmsToThreshold.spec.ts (100%) rename packages/{react-components => component-core}/src/utils/transformAlarmsToThreshold.ts (100%) create mode 100644 packages/component-core/tsconfig.cjs.json create mode 100644 packages/component-core/tsconfig.esm.json create mode 100644 packages/component-core/tsconfig.json create mode 100644 packages/component-core/vite.config.ts create mode 100644 packages/component-core/vitest.setup.ts create mode 100644 packages/core/src/common/createNonNullableList.ts create mode 100644 packages/react-components/src/components/gauge/converters/convertSeries.spec.ts create mode 100644 packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.spec.ts create mode 100644 packages/react-components/src/components/gauge/utils/calculatePadding.spec.ts create mode 100644 packages/react-components/src/components/gauge/utils/convertThresholdsToEchartsValuePair.spec.ts create mode 100644 packages/react-components/src/hooks/useComponentId/useComponentId.spec.ts delete mode 100644 packages/react-components/src/hooks/useComponenttId/useComponenttId.ts delete mode 100644 packages/react-components/src/hooks/useViewport/index.ts delete mode 100644 packages/react-components/src/hooks/useViewport/useViewport.ts delete mode 100644 packages/react-components/src/queries/common/types.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/cacheClient/cacheClient.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/cacheClient/concreteClients.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/cacheClient/index.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/cacheClient/keyManager.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/cacheUtils/filterAssetPropertyValues.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/index.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/index.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/loader.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/requestManager.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/index.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/loader.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/requestManager.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyAggregates.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyValueHistory.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/index.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestExecution/requestExecution.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestManager/assetPropertyValuesRequestResolver.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestManager/index.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestManager/useAutoRequestResolution.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/requestManager/useRequestResolverStrategy.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/types.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/useAssetPropertyValues.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.spec.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/utils/timeConstants.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.spec.ts delete mode 100644 packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/cacheClient/cacheClient.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/cacheClient/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/cacheClient/keyManager.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.spec.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/cacheUtils/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/liveData.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/useLiveDataIntervals.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.spec.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.spec.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/divideInterval.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.spec.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/removeExpiredIntervals.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/requestRange.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.spec.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/subtractIntervals.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/testData.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.spec.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/queryUtils/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/queryUtils/queryStatus.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestExecution/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecution.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecutionStrategy.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestExecution/types.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestExecution/useRequestExecuter.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestManager/absoluteDurationRequestResolver.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestManager/index.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestManager/liveDurationRequestResolver.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestManager/requestResolver.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestManager/types.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/requestManager/useRequestManager.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/useBisectedData.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/useCachedQueries.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/useRequestStatus.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/useResponse.ts delete mode 100644 packages/react-components/src/queries/useTimeSeriesData/useTimeSeriesData.ts delete mode 100644 packages/react-components/src/utils/createNonNullableList.ts delete mode 100644 packages/react-components/src/utils/isDurationViewport.ts create mode 100644 packages/resource-explorer/.dockerignore create mode 100644 packages/resource-explorer/.env.example create mode 100755 packages/resource-explorer/.eslintignore create mode 100644 packages/resource-explorer/.eslintrc.cjs create mode 100644 packages/resource-explorer/.storybook/global.scss create mode 100644 packages/resource-explorer/.storybook/main.ts create mode 100644 packages/resource-explorer/.storybook/preview.js create mode 100644 packages/resource-explorer/CHANGELOG.md create mode 100644 packages/resource-explorer/README.md create mode 100644 packages/resource-explorer/package.json create mode 100644 packages/resource-explorer/playwright.config.ts rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/constants/defaults.ts (97%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/constants/drop-down-resource-definitions.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/constants/table-resource-definitions.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/alarm-explorer/alarm-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/alarm-explorer/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/alarm-explorer/internal-alarm-explorer.tsx (99%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/alarm-explorer/transformAlarmData.ts (90%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/alarm-explorer/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/constants.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/resource-relationship-path.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/asset-hierarchy-path/use-ancestor-assets.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/internal-asset-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/predicates.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-assets/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-assets/use-asset-model-assets.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-assets/use-asset-search.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-assets/use-assets.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-assets/use-child-assets.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-assets/use-root-assets.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-explorer/use-parent-asset.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-model-explorer/asset-model-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-model-explorer/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-model-explorer/internal-asset-model-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-model-explorer/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-model-explorer/use-asset-models.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/asset-property-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/internal-asset-property-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/use-asset-properties/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/use-asset-properties/use-asset-model-properties.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/use-asset-properties/use-asset-properties.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/use-asset-properties/use-asset-property-search.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/asset-property-explorer/use-asset-properties/use-list-asset-properties.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/time-series-explorer/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/time-series-explorer/internal-time-series-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/time-series-explorer/time-series-explorer.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/time-series-explorer/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/explorers/time-series-explorer/use-time-series.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/helpers/response-transformers.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/helpers/search-statement-normalizer.spec.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/helpers/search-statement-normalizer.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/helpers/use-persistable-state.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/helpers/use-user-customization.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/index.ts (76%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/resource-explorer-query-client.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-latest-values/create-data-streams-with-latest-value.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-latest-values/create-request-entry-batches.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-latest-values/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-latest-values/toValue.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-latest-values/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-latest-values/use-latest-values.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-multiple-list-requests/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-multiple-list-requests/types.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/requests/use-multiple-list-requests/use-multiple-list-requests.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/drop-down-variant/alarm-drop-down.spec.tsx (99%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/drop-down-variant/asset-drop-down.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/drop-down-variant/asset-model-drop-down.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/drop-down-variant/asset-property-drop-down.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/drop-down-variant/time-series-drop-down.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/helpers/drop-down.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/helpers/responses.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/helpers/table.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/table-variant/alarm-table.spec.tsx (99%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/table-variant/asset-model-table.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/table-variant/asset-property-table.spec.tsx (99%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/table-variant/asset-table.spec.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/testing/table-variant/time-series-table.spec.tsx (99%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/types/common.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/types/drop-down.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/types/requests.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/types/resource-explorer.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/types/resources.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/types/table.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-drop-down/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-drop-down/resource-drop-down.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/index.ts (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-empty.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-error.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-filter.css (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-filter.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-header.css (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-header.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-no-filter-match.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-pagination.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-search.css (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-search.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-title.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table-user-settings.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/resource-table/resource-table.tsx (100%) rename packages/{react-components/src/components/resource-explorers => resource-explorer/src}/variants/variant-selector.tsx (100%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/alarm-explorer.stories.tsx (95%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/asset-explorer.stories.tsx (96%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/asset-model-explorer.stories.tsx (98%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/asset-property-explorer.stories.tsx (98%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/controls.ts (93%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/data-source.ts (79%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/decorators.tsx (90%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/explorer-combinations.stories.tsx (99%) rename packages/{react-components/stories/resource-explorers => resource-explorer/stories}/time-series-explorer.stories.tsx (98%) create mode 100644 packages/resource-explorer/tsconfig.cjs.json create mode 100644 packages/resource-explorer/tsconfig.esm.json create mode 100644 packages/resource-explorer/tsconfig.json create mode 100644 packages/resource-explorer/vite.config.ts create mode 100644 packages/resource-explorer/vitest.setup.ts diff --git a/package-lock.json b/package-lock.json index 9a60a001f..009753540 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10230,6 +10230,10 @@ "integrity": "sha512-7rIRO23jVKWcAPFdW/HREU2NZMGWPBZ4XwEMt0Ak0jwLUKVJhcKM55eCBWyGZq/KiQbeo1IeuAoo/9l2dzhTXA==", "license": "MIT" }, + "node_modules/@iot-app-kit/component-core": { + "resolved": "packages/component-core", + "link": true + }, "node_modules/@iot-app-kit/core": { "resolved": "packages/core", "link": true @@ -10258,6 +10262,10 @@ "resolved": "packages/react-components", "link": true }, + "node_modules/@iot-app-kit/resource-explorer": { + "resolved": "packages/resource-explorer", + "link": true + }, "node_modules/@iot-app-kit/scene-composer": { "resolved": "packages/scene-composer", "link": true @@ -37480,6 +37488,111 @@ "url": "https://github.com/sponsors/wooorm" } }, + "packages/component-core": { + "name": "@iot-app-kit/component-core", + "version": "12.5.0", + "license": "Apache-2.0", + "dependencies": { + "@cloudscape-design/chat-components": "^1.0.10", + "@cloudscape-design/collection-hooks": "1.0.49", + "@cloudscape-design/components": "3.0.693", + "@cloudscape-design/design-tokens": "3.0.42", + "@cloudscape-design/global-styles": "1.0.32", + "@iot-app-kit/charts": "^2.1.2", + "@iot-app-kit/charts-core": "^2.1.2", + "@iot-app-kit/core": "12.5.0", + "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", + "@iot-app-kit/source-iottwinmaker": "12.5.0", + "@tanstack/react-query": "^5.32.1", + "d3-array": "^3.2.3", + "dataloader": "^2.2.2", + "date-fns": "^2.30.0", + "lodash-es": "^4.17.21", + "react-use": "17.4.0", + "tiny-invariant": "^1.3.1", + "uuid": "^9.0.0", + "zustand": "^4.5.2" + }, + "devDependencies": { + "@iot-app-kit/testing-util": "12.5.0", + "@iot-app-kit/ts-config": "12.5.0", + "@playwright/test": "^1.48.2", + "@storybook/addon-essentials": "^8.4.5", + "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", + "@storybook/react": "^8.4.5", + "@storybook/react-vite": "^8.4.5", + "@storybook/test": "^8.4.5", + "@tanstack/eslint-plugin-query": "^5.40.1", + "@tanstack/react-query-devtools": "^5.40.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@types/lodash-es": "^4.17.12", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/uuid": "^9.0.2", + "@vitejs/plugin-react": "^4.3.3", + "@vitest/coverage-v8": "^2.1.5", + "copyfiles": "^2.4.1", + "eslint-config-iot-app-kit": "12.5.0", + "jest-extended": "^3.2.4", + "react": "^18.2.0", + "rimraf": "^5.0.1", + "storybook": "^8.4.5", + "type-fest": "^4.28.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vitest": "^2.1.5", + "vitest-canvas-mock": "^0.3.3" + }, + "peerDependencies": { + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18" + } + }, + "packages/component-core/node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "packages/component-core/node_modules/zustand": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.6.tgz", + "integrity": "sha512-ibr/n1hBzLLj5Y+yUcU7dYw8p6WnIVzdJbnX+1YpaScvZVF2ziugqHs+LAmHw4lWO9c/zRj+K1ncgWDQuthEdQ==", + "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + }, "packages/core": { "name": "@iot-app-kit/core", "version": "12.5.0", @@ -37498,6 +37611,7 @@ "@types/node": "^18.16.18", "@types/uuid": "^9.0.2", "@vitest/coverage-v8": "^2.1.5", + "date-fns-tz": "^2.0.1", "eslint-config-iot-app-kit": "12.5.0", "flush-promises": "^1.0.2", "jest-extended": "^3.2.4", @@ -37809,6 +37923,71 @@ "uuid": "^9.0.0" } }, + "packages/hooks": { + "name": "@iot-app-kit/component-core", + "version": "12.5.0", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@cloudscape-design/chat-components": "^1.0.10", + "@cloudscape-design/collection-hooks": "1.0.49", + "@cloudscape-design/components": "3.0.693", + "@cloudscape-design/design-tokens": "3.0.42", + "@cloudscape-design/global-styles": "1.0.32", + "@iot-app-kit/charts": "^2.1.2", + "@iot-app-kit/charts-core": "^2.1.2", + "@iot-app-kit/core": "12.5.0", + "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", + "@iot-app-kit/source-iottwinmaker": "12.5.0", + "@tanstack/react-query": "^5.32.1", + "d3-array": "^3.2.3", + "dataloader": "^2.2.2", + "date-fns": "^2.30.0", + "lodash-es": "^4.17.21", + "react-use": "17.4.0", + "tiny-invariant": "^1.3.1", + "uuid": "^9.0.0", + "zustand": "^4.5.2" + }, + "devDependencies": { + "@iot-app-kit/testing-util": "12.5.0", + "@iot-app-kit/ts-config": "12.5.0", + "@playwright/test": "^1.48.2", + "@storybook/addon-essentials": "^8.4.5", + "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", + "@storybook/react": "^8.4.5", + "@storybook/react-vite": "^8.4.5", + "@storybook/test": "^8.4.5", + "@tanstack/eslint-plugin-query": "^5.40.1", + "@tanstack/react-query-devtools": "^5.40.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@types/lodash-es": "^4.17.12", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/uuid": "^9.0.2", + "@vitejs/plugin-react": "^4.3.3", + "@vitest/coverage-v8": "^2.1.5", + "copyfiles": "^2.4.1", + "eslint-config-iot-app-kit": "12.5.0", + "jest-extended": "^3.2.4", + "react": "^18.2.0", + "rimraf": "^5.0.1", + "storybook": "^8.4.5", + "type-fest": "^4.28.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vitest": "^2.1.5", + "vitest-canvas-mock": "^0.3.3" + }, + "peerDependencies": { + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18" + } + }, "packages/react-components": { "name": "@iot-app-kit/react-components", "version": "12.5.0", @@ -37821,8 +38000,10 @@ "@cloudscape-design/global-styles": "1.0.32", "@iot-app-kit/charts": "^2.1.2", "@iot-app-kit/charts-core": "^2.1.2", + "@iot-app-kit/component-core": "12.5.0", "@iot-app-kit/core": "12.5.0", "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/resource-explorer": "12.5.0", "@iot-app-kit/source-iotsitewise": "12.5.0", "@iot-app-kit/source-iottwinmaker": "12.5.0", "@tanstack/react-query": "^5.32.1", @@ -38065,6 +38246,180 @@ } } }, + "packages/resource-explorer": { + "name": "@iot-app-kit/resource-explorer", + "version": "12.5.0", + "license": "Apache-2.0", + "dependencies": { + "@cloudscape-design/collection-hooks": "1.0.49", + "@cloudscape-design/components": "3.0.693", + "@cloudscape-design/design-tokens": "3.0.42", + "@cloudscape-design/global-styles": "1.0.32", + "@iot-app-kit/charts-core": "^2.1.2", + "@iot-app-kit/component-core": "12.5.0", + "@iot-app-kit/core": "12.5.0", + "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", + "@tanstack/react-query": "^5.32.1", + "react-use": "17.4.0" + }, + "devDependencies": { + "@iot-app-kit/testing-util": "12.5.0", + "@iot-app-kit/ts-config": "12.5.0", + "@playwright/test": "^1.48.2", + "@storybook/addon-essentials": "^8.4.5", + "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", + "@storybook/react": "^8.4.5", + "@storybook/react-vite": "^8.4.5", + "@storybook/test": "^8.4.5", + "@tanstack/eslint-plugin-query": "^5.40.1", + "@tanstack/react-query-devtools": "^5.40.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/react-dom": "^18.2.5", + "@vitejs/plugin-react": "^4.3.3", + "@vitest/coverage-v8": "^2.1.5", + "babel-plugin-formatjs": "10.5.3", + "copyfiles": "^2.4.1", + "eslint-config-iot-app-kit": "12.5.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "jest-extended": "^3.2.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "rimraf": "^5.0.1", + "storybook": "^8.4.5", + "storybook-dark-mode": "^3.0.3", + "tsconfig-paths-webpack-plugin": "^4.1.0", + "type-fest": "^4.28.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vitest": "^2.1.5", + "vitest-canvas-mock": "^0.3.3" + }, + "peerDependencies": { + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18", + "react-dom": "^18" + } + }, + "packages/resource-explorer/node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "packages/resource-explorer/node_modules/ast-types-flow": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", + "dev": true, + "license": "MIT" + }, + "packages/resource-explorer/node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "packages/resource-explorer/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "packages/resource-explorer/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "packages/resource-explorer/node_modules/eslint-plugin-jsx-a11y": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", + "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "aria-query": "^5.3.2", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.1" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" + } + }, + "packages/resource-explorer/node_modules/language-tags": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", + "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" + } + }, + "packages/resource-explorer/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "packages/resource-explorer/node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "packages/scene-composer": { "name": "@iot-app-kit/scene-composer", "version": "12.5.0", diff --git a/packages/component-core/.dockerignore b/packages/component-core/.dockerignore new file mode 100644 index 000000000..0dbcd2a51 --- /dev/null +++ b/packages/component-core/.dockerignore @@ -0,0 +1,2 @@ +node_modules +**/node_modules \ No newline at end of file diff --git a/packages/component-core/.env.example b/packages/component-core/.env.example new file mode 100644 index 000000000..f9d0ba292 --- /dev/null +++ b/packages/component-core/.env.example @@ -0,0 +1,9 @@ +AWS_ACCESS_KEY_ID=xxxxxxxxxx +AWS_SECRET_ACCESS_KEY=xxxxxxxxxx +AWS_SESSION_TOKEN=xxxxxxxxxx +AWS_REGION=xxxxxxxxxx + +ASSET_ID_1=xxxxxxxxxx +PROPERTY_ID_1=xxxxxxxxxx +PROPERTY_ID_2=xxxxxxxxxx +PROPERTY_ID_3=xxxxxxxxxx \ No newline at end of file diff --git a/packages/component-core/.eslintignore b/packages/component-core/.eslintignore new file mode 100755 index 000000000..c212b2f71 --- /dev/null +++ b/packages/component-core/.eslintignore @@ -0,0 +1,5 @@ +dist +coverage +storybook-static +stencil-generated +test-results diff --git a/packages/component-core/.eslintrc.cjs b/packages/component-core/.eslintrc.cjs new file mode 100644 index 000000000..19b3d8024 --- /dev/null +++ b/packages/component-core/.eslintrc.cjs @@ -0,0 +1,22 @@ +module.exports = { + root: true, + extends: [ + 'iot-app-kit', + 'plugin:react-hooks/recommended', + 'plugin:jsx-a11y/recommended', + ], + plugins: ['jsx-a11y'], + overrides: [ + { + // Disabling explicit any rule for graph-view component since types are defined in 3p component. + files: [ + '**/src/components/knowledge-graph/graph/graph-view.tsx', + '**/src/components/knowledge-graph/responseParser.tsx', + ], + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + }, + }, + ], +}; diff --git a/packages/component-core/CHANGELOG.md b/packages/component-core/CHANGELOG.md new file mode 100644 index 000000000..fc097dcd9 --- /dev/null +++ b/packages/component-core/CHANGELOG.md @@ -0,0 +1,2925 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [12.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.4.0...react-components-v12.5.0) (2025-02-03) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/core-util bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 12.4.0 to 12.5.0 + * devDependencies + * @iot-app-kit/core bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/source-iotsitewise bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/testing-util bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/ts-config bumped from 12.4.0 to 12.5.0 + * eslint-config-iot-app-kit bumped from 12.4.0 to 12.5.0 + +## [12.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.3.0...react-components-v12.4.0) (2025-01-16) + + +### Features + +* add null/NaN support ([450fc70](https://github.com/awslabs/iot-app-kit/commit/450fc7080f11e908b9f2bf53218f674b9b9b6185)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/core-util bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 12.3.0 to 12.4.0 + * devDependencies + * @iot-app-kit/core bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/source-iotsitewise bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/testing-util bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/ts-config bumped from 12.3.0 to 12.4.0 + * eslint-config-iot-app-kit bumped from 12.3.0 to 12.4.0 + +## [12.2.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.2.0...react-components-v12.2.1) (2024-12-03) + + +### Bug Fixes + +* helpers package resolution ([2939048](https://github.com/awslabs/iot-app-kit/commit/2939048c5dc5f49167f9058eb6e2e746f7d8485e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/core-util bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/source-iottwinmaker bumped from 12.2.0 to 12.2.1 + * devDependencies + * @iot-app-kit/core bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/source-iotsitewise bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/testing-util bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/ts-config bumped from 12.2.0 to 12.2.1 + * eslint-config-iot-app-kit bumped from 12.2.0 to 12.2.1 + +## [12.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.1.0...react-components-v12.2.0) (2024-11-28) + + +### Features + +* improve prompt engering for assistant dashboard ([f3a1a24](https://github.com/awslabs/iot-app-kit/commit/f3a1a24c6d27f92cdd518527806289b8d53f3b91)) + + +### Bug Fixes + +* disable chatbot button when assistant is loading, improve error messages ([24e8dcb](https://github.com/awslabs/iot-app-kit/commit/24e8dcb805940bd3426029f8699e1b775582d2f2)) +* fix time series data hook reactivity ([4f307ff](https://github.com/awslabs/iot-app-kit/commit/4f307ffa3f9b6be60c2b34a86af5809f299700f2)) +* **react-components:** allow vertical legend reszing when title present on widget ([5734ceb](https://github.com/awslabs/iot-app-kit/commit/5734ceb8cc888486406ce1c69bdc7b302b78001f)) +* type-fest dep ([7afa99d](https://github.com/awslabs/iot-app-kit/commit/7afa99d2cc0d1a1565d30d52c8eaa94bbe9270af)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from * to 12.2.0 + * @iot-app-kit/core-util bumped from * to 12.2.0 + * @iot-app-kit/source-iottwinmaker bumped from * to 12.2.0 + * devDependencies + * @iot-app-kit/core bumped from * to 12.2.0 + * @iot-app-kit/source-iotsitewise bumped from * to 12.2.0 + * @iot-app-kit/testing-util bumped from * to 12.2.0 + * @iot-app-kit/ts-config bumped from * to 12.2.0 + * eslint-config-iot-app-kit bumped from * to 12.2.0 + +## [12.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.0.0...react-components-v12.1.0) (2024-11-20) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/core-util bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 12.0.0 to 12.1.0 + * devDependencies + * @iot-app-kit/core bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/jest-config bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/source-iotsitewise bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/testing-util bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/ts-config bumped from 12.0.0 to 12.1.0 + * eslint-config-iot-app-kit bumped from 12.0.0 to 12.1.0 + +## [12.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v11.0.0...react-components-v12.0.0) (2024-11-18) + + +### Features + +* add a widget level loading indicator for x-y plot ([9be5617](https://github.com/awslabs/iot-app-kit/commit/9be5617aabe7a1edf88876406aeb1e83f174a288)) +* add anomaly query ([3c11512](https://github.com/awslabs/iot-app-kit/commit/3c115121db6fc8248bcd6b36989f6ebea3212ba7)) +* add data quality to kpi and status ([7248004](https://github.com/awslabs/iot-app-kit/commit/724800417bc8c74f518d6a39044c815848ef431f)) +* add gauge component in doc site package ([17a02f5](https://github.com/awslabs/iot-app-kit/commit/17a02f54ac811ab384aa6b8ad2dd4f61e0cc1514)) +* add step chart to l4e ([0983438](https://github.com/awslabs/iot-app-kit/commit/0983438c28ad7603e689697b0bd68cc10ce6fb50)) +* add threshold settings to KPI ([2fa0429](https://github.com/awslabs/iot-app-kit/commit/2fa0429b6262092b4b3c86c21b8808b90e2d49fe)) +* add timezone converter util ([e5d59c4](https://github.com/awslabs/iot-app-kit/commit/e5d59c43803a03413e77556f6ca4179b18ecb3d7)) +* added a label time range for viewport picker in dashboard header [#2559](https://github.com/awslabs/iot-app-kit/issues/2559) ([743cb80](https://github.com/awslabs/iot-app-kit/commit/743cb80ec36d116d6ef25e97ec54f2238ddb2ea1)) +* added accessible labels to different toolbar container [#2510](https://github.com/awslabs/iot-app-kit/issues/2510) ([ce5af6f](https://github.com/awslabs/iot-app-kit/commit/ce5af6fbc6e6b887f3fade9395bcbf54da386a88)) +* added data quality icon and text next to value in table [#2664](https://github.com/awslabs/iot-app-kit/issues/2664) ([91cd12f](https://github.com/awslabs/iot-app-kit/commit/91cd12f9e73fa5c77ab8e7209376116f4307526b)) +* added support for border theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([66e6680](https://github.com/awslabs/iot-app-kit/commit/66e6680fbea3f005aba7239c3c47bf13e5184462)) +* added viewport timestamps in xy plot [#2470](https://github.com/awslabs/iot-app-kit/issues/2470) ([46c1d24](https://github.com/awslabs/iot-app-kit/commit/46c1d24b99ff2ca9fb990ceed341ad6820c21f01)) +* adding timezone support to dashboard/widgets ([6435b90](https://github.com/awslabs/iot-app-kit/commit/6435b90d93246e319b939b7c316c6ffbea12ef8d)) +* **anomaly-chart:** added `gestures` enablement option ([4c2402c](https://github.com/awslabs/iot-app-kit/commit/4c2402c44a5c3538fdc60fe8210b626670073479)) +* changed ui experience of chart legend based on legend position [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([de1f147](https://github.com/awslabs/iot-app-kit/commit/de1f14772b614f67156a34ac64300111a6c55126)) +* chart legend support px rem em % unit type ([4e023e6](https://github.com/awslabs/iot-app-kit/commit/4e023e6c4a735189e2db04de886555a0199087b2)) +* chat legend enhancement [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([b1ca8ae](https://github.com/awslabs/iot-app-kit/commit/b1ca8aeda126f09f371e23133fa600d5b56c9b21)) +* conditionally display latest value in legend table [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([d3feb29](https://github.com/awslabs/iot-app-kit/commit/d3feb2920f3c63b0b2ce9580fc07a86475fc1ff1)) +* customize gauge in dashboard config ([8af089e](https://github.com/awslabs/iot-app-kit/commit/8af089e94a2c11cab1c9473d384ed241da7f6461)) +* **dashboard:** add colors to trendcursors ([a890c7d](https://github.com/awslabs/iot-app-kit/commit/a890c7db39df1a836312ac4050c41e2f4fdd9f4a)) +* **dashboard:** add new RE components to dynamic assets tab ([c588848](https://github.com/awslabs/iot-app-kit/commit/c5888485c3205c7ee572ec01d6f0b34d1789da23)) +* **dashboard:** default viewport setting ([0c3f3ef](https://github.com/awslabs/iot-app-kit/commit/0c3f3efa3a48be537d0eed0e6a1a02ecaa7c1f03)) +* **dashboard:** use new RE components to update dashboard RE for modeled and unmodeled data ([d7db11e](https://github.com/awslabs/iot-app-kit/commit/d7db11ee7c16dd012b7ced86dc52cde9a483e24e)) +* display assetname conditionally in legend [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([c4c443f](https://github.com/awslabs/iot-app-kit/commit/c4c443fab77d6e337d32fbecebb308c7f339fab5)) +* display legend unit conditionally [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([9f6440e](https://github.com/awslabs/iot-app-kit/commit/9f6440e9e06c9040a6be46eab3a9141ad02a0509)) +* first click on paginate timeline should move backward from current time duration ([5f9aa42](https://github.com/awslabs/iot-app-kit/commit/5f9aa42aef52d1bade596d0b8cfa1d58d51cce52)) +* gauge widget to dashboard ([17cde64](https://github.com/awslabs/iot-app-kit/commit/17cde64259ab6b69beec2f2de4eaca9750504a5c)) +* guage component data quality and error text ([2dca188](https://github.com/awslabs/iot-app-kit/commit/2dca1889462a6002980b105ae5338265c187b502)) +* guage component initail commit ([305657a](https://github.com/awslabs/iot-app-kit/commit/305657a7aa761883da7a9839d0ae0a3914751a51)) +* kpi and status gated config panel ([1f56b4f](https://github.com/awslabs/iot-app-kit/commit/1f56b4f2e7212ddfcc216fb778e0d4db57309ab2)) +* l4e table ([5bd6898](https://github.com/awslabs/iot-app-kit/commit/5bd68983268d00ff60bf0434e5b810e52254c16c)) +* l4e timeline (mock data only) ([829496c](https://github.com/awslabs/iot-app-kit/commit/829496cd0f51fb4131b5a081c8ecc7d17763b5be)) +* legend resize ([792b617](https://github.com/awslabs/iot-app-kit/commit/792b6170cc19402f3c49fbd60e4a07dc0890c434)) +* legend table is implemeted using tanstack table ([c92533a](https://github.com/awslabs/iot-app-kit/commit/c92533a342c95618d6dcf7d2a13bdad204bb01de)) +* lint accessibility ([0db36ef](https://github.com/awslabs/iot-app-kit/commit/0db36ef6a07fe5e0709d17081dffa7d23669e2fe)) +* new design status (gated) ([69d6c97](https://github.com/awslabs/iot-app-kit/commit/69d6c979d1baefd4fd486cf0d1402b7357e8506b)) +* new KPI and update tests ([328e41a](https://github.com/awslabs/iot-app-kit/commit/328e41ae6f1b25c743a16f03d966a5b97408455a)) +* onViewportChange and currentViewport ([d63c9e3](https://github.com/awslabs/iot-app-kit/commit/d63c9e3a416e78a78b3a453755be39a6879eb07c)) +* **react-components:** add arrow datasource ([efb0d6d](https://github.com/awslabs/iot-app-kit/commit/efb0d6d01549011e57400c6b48033264a7e122c9)) +* **react-components:** add auto resolution and batching ([073029f](https://github.com/awslabs/iot-app-kit/commit/073029f4312c988bf099251284bf63d9515e01fd)) +* **react-components:** add axis option to anomaly widget ([d0733e1](https://github.com/awslabs/iot-app-kit/commit/d0733e12863f4ee2db1e29576c8ea6b1d5964f62)) +* **react-components:** add data quality to xy-plot ([ed18e0d](https://github.com/awslabs/iot-app-kit/commit/ed18e0d891035803dfc0cc646371ae1e20914d2a)) +* **react-components:** add hook for get asset property value history ([c708b4a](https://github.com/awslabs/iot-app-kit/commit/c708b4a6c2c3e9d6e843829692a2046c00ee6950)) +* **react-components:** add hook for latest asset property value ([ce9ec7c](https://github.com/awslabs/iot-app-kit/commit/ce9ec7c714e6c600da59af8f4bffaf210f0041c0)) +* **react-components:** add intl ([c7c30c3](https://github.com/awslabs/iot-app-kit/commit/c7c30c3f969c71de6856d98d59e1043a6c785a45)) +* **react-components:** add l4e datasource ([748f8c1](https://github.com/awslabs/iot-app-kit/commit/748f8c17d56bbef0f2190fde38b5717c29d1d942)) +* **react-components:** add l4e queries ([328da8e](https://github.com/awslabs/iot-app-kit/commit/328da8ed9341c68c8c0a3a6b672170f1fa8eeb37)) +* **react-components:** add max column to legend ([322c20f](https://github.com/awslabs/iot-app-kit/commit/322c20f0d438ecb45ee02fae186f6a198963c5b6)) +* **react-components:** add min column to legend ([69ba923](https://github.com/awslabs/iot-app-kit/commit/69ba92324da42770e267c9a0bce717ebf1ca0dbf)) +* **react-components:** add useLatestAlarmPropertyValue hook to fetch alarm prop vals in useAlarms ([18aa854](https://github.com/awslabs/iot-app-kit/commit/18aa8548bbc9aa9d4343a1d85b3cefdb798e1b25)) +* **react-components:** calculate min/max and store value in store for chart to consume ([41b8551](https://github.com/awslabs/iot-app-kit/commit/41b855103e6643dd79e6e0fc9e7350fddefd9101)) +* **react-components:** hide/show properties from legend ([e666cf1](https://github.com/awslabs/iot-app-kit/commit/e666cf1cfba8343d1a5bbb0f38a4341969a18575)) +* **react-components:** implement request functions and hooks to build clients ([2ca7e6c](https://github.com/awslabs/iot-app-kit/commit/2ca7e6caf771bd929b993d79f91f6e7d3ce21350)) +* **react-components:** initiali implementation for useTimeSeriesData ([50db88f](https://github.com/awslabs/iot-app-kit/commit/50db88f309e6470bfc510824f6deb564c949b794)) +* **react-components:** l4e anomaly tests ([fbff596](https://github.com/awslabs/iot-app-kit/commit/fbff5968b7ddb406fa0eaaa21b84489010d55591)) +* **react-components:** trendcurors using echarts extension ([a7c6bbe](https://github.com/awslabs/iot-app-kit/commit/a7c6bbe064ae746f024b74d885721a70a06716a2)) +* **react-components:** useAlarms hook ([7103db6](https://github.com/awslabs/iot-app-kit/commit/7103db640cd1531823a51fe3277691c869b581ed)) +* **react-components:** useDescribeAssets and useDescribeAssetModels queries implemented ([bfb07e1](https://github.com/awslabs/iot-app-kit/commit/bfb07e16b1fceabdd676ebdb833c4d85baaafb0d)) +* **react-components:** y axis and timestamp options ([bfe2520](https://github.com/awslabs/iot-app-kit/commit/bfe2520a731dc6ea24d0ad928084546d45ed8643)) +* resource explorers ([f604b15](https://github.com/awslabs/iot-app-kit/commit/f604b15dd35e014e78e1f56fd666602767e6b5bd)) +* **ResourceExplorer:** hide properties table when not needed to be displayed ([0fca5e9](https://github.com/awslabs/iot-app-kit/commit/0fca5e9089ac7af52e1d31b2143acb121cb7869b)) +* show/hide aggregation and resolution in KPI ([aef1f14](https://github.com/awslabs/iot-app-kit/commit/aef1f146c6d4db03d759b76896d78e966b1ce1e6)) +* **sitewise-alarms:** add useAlarmModels hook to fetch iot events alarm models in useAlarms ([c4c4986](https://github.com/awslabs/iot-app-kit/commit/c4c4986fde3fd65d7ca7e8b1f7a364fcc079ca10)) +* support theming using cloudscape mechanism [#2667](https://github.com/awslabs/iot-app-kit/issues/2667) ([c342310](https://github.com/awslabs/iot-app-kit/commit/c3423101f4f60410d2168a2605fadeb3c6c2d5bc)) +* updated KPI style (gated) ([31ea2f3](https://github.com/awslabs/iot-app-kit/commit/31ea2f371676be9b6412073772b9110b01c42786)) +* updated the theming support for kpi and tc [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([d32a018](https://github.com/awslabs/iot-app-kit/commit/d32a0184518ef02222ef15359d49bccb68f6ee39)) +* user selected dashboard refresh-rate ([1c1256d](https://github.com/awslabs/iot-app-kit/commit/1c1256da83c938037a47e930c127c2bf3bc14e90)) +* widget tool box on mouse hover and selection state ([c80d42a](https://github.com/awslabs/iot-app-kit/commit/c80d42a3d10223d0d7edd5b3ee1b23c9ab613399)) +* **widgets:** add name style settings for line/table + edit label in config panel ([f5e9b3f](https://github.com/awslabs/iot-app-kit/commit/f5e9b3fc99a176b3d9eb54ef0a387d171791aaf9)) +* xy-plot y axis lable changes [#2378](https://github.com/awslabs/iot-app-kit/issues/2378) ([48389c3](https://github.com/awslabs/iot-app-kit/commit/48389c3e59305525b11b63233c3a79d4a8e3a78d)) + + +### Bug Fixes + +* add default settings to charts ([5917c83](https://github.com/awslabs/iot-app-kit/commit/5917c83674ffe67ced2bc7fe18c226460c115e80)) +* add missing loading indication for widget values ([d90f9a6](https://github.com/awslabs/iot-app-kit/commit/d90f9a68e63b6280c1fb1187b8b34853fc2047ec)) +* add signigicant digits to xy plot ([70a109e](https://github.com/awslabs/iot-app-kit/commit/70a109e8083b6729313f4f0dc362df0f3cf6ea62)) +* add trailing zeros to decimal point rounding, fix rounding function ([9c13177](https://github.com/awslabs/iot-app-kit/commit/9c131779c5a3f5b2ce7c6d1239e54ed82bfbf572)) +* better handling of light and dark mode w thresholds ([bd70051](https://github.com/awslabs/iot-app-kit/commit/bd70051944a9a21e21479f4793614f85a4716b2b)) +* chart gesture icons overlap on mouse hover ([b5e5c0d](https://github.com/awslabs/iot-app-kit/commit/b5e5c0d6115ed8eb9d819a9b4ceef31c7b56db2b)) +* **dashboard:** add descriptions to all RE tables ([f7b4f0c](https://github.com/awslabs/iot-app-kit/commit/f7b4f0c89d8b05be988acac54b8edf35ab3b7367)) +* **dashboard:** add descriptions to all tables in RE ([c7aff00](https://github.com/awslabs/iot-app-kit/commit/c7aff00ea0d6175186317f06ca7eec4c550de7a0)) +* **dashboard:** add timezone support for new RE ([2d4b5dd](https://github.com/awslabs/iot-app-kit/commit/2d4b5ddcbdefe4828168a7864bd679744e5a97eb)) +* **dashboard:** adds resolution and aggregation to new proeprty in gauge widget ([5f5af30](https://github.com/awslabs/iot-app-kit/commit/5f5af3068defeb2a609e68ca0d29cc09f9960cfd)) +* **dashboard:** decimal places fixes ([710a6ae](https://github.com/awslabs/iot-app-kit/commit/710a6aeee8e16fbf7f204d9214dbd8c86fce16e2)) +* **dashboard:** fast follow to clean up messy code for table cell render ([649f75d](https://github.com/awslabs/iot-app-kit/commit/649f75d91bd4865d94db633ecd3fb865098fc1ff)) +* **dashboard:** fix flaky test in dashboard ([6fe3285](https://github.com/awslabs/iot-app-kit/commit/6fe328510bfd4ed36a24935085aa41ac0c83dfa5)) +* **dashboard:** label matches kpi name ([f675d11](https://github.com/awslabs/iot-app-kit/commit/f675d11857c0b0a3869d03d9c1339c405a85d11e)) +* **dashboard:** re reflects significant digits + timezone support for unmodeled ([195be67](https://github.com/awslabs/iot-app-kit/commit/195be67fe0e5b7ef7b262491ff4fec574c62db8c)) +* datastream not show unit if it's undefined [#2660](https://github.com/awslabs/iot-app-kit/issues/2660) ([7418773](https://github.com/awslabs/iot-app-kit/commit/7418773d7a39ef978ad3663e12fcf87082767f54)) +* fix bugs on l4e widget ([17a4896](https://github.com/awslabs/iot-app-kit/commit/17a489631da778b13fcb194b8bd527874e9e2858)) +* fix data-zoom behavior for base chart ([0c66a80](https://github.com/awslabs/iot-app-kit/commit/0c66a8016e2aa827ad3093c3ef89d6437e014d18)) +* fix filtered data on zooms ([99e2f90](https://github.com/awslabs/iot-app-kit/commit/99e2f90aecdbaaa354e62e76b22c88a8530c1509)) +* hidden and highlighted datastreams persist correctly ([5a85bb7](https://github.com/awslabs/iot-app-kit/commit/5a85bb7d40d07dce439a1bfa15550d8893089cbd)) +* **imports:** move luxon dependency to right package ([31235da](https://github.com/awslabs/iot-app-kit/commit/31235da4b31e49ec0fc0f1ec21f649cf7af7e253)) +* improved zoom and default values for y axis ([112e5c5](https://github.com/awslabs/iot-app-kit/commit/112e5c58d7e3478dec03dfbb2eb52ec315b4690d)) +* internal pipeline has issues with lfs, reverting ([968f950](https://github.com/awslabs/iot-app-kit/commit/968f95005c51591d7cb99af323808fd232b8d4e9)) +* l4e bug fixes ([a71673c](https://github.com/awslabs/iot-app-kit/commit/a71673c9fbc701a5e26ed8d8c9bda191bc9b9285)) +* l4e code clean up ([ad19b6c](https://github.com/awslabs/iot-app-kit/commit/ad19b6c68c515182454d9132629f2736f5fa4988)) +* l4e widget quick fixes ([286f724](https://github.com/awslabs/iot-app-kit/commit/286f7244ac501ffc877dd0e0d40d76e97ab98bda)) +* make context menu appear on top of chart tooltip ([e1622c8](https://github.com/awslabs/iot-app-kit/commit/e1622c86bf4ead6856e7e1c9be1d5b8a1d6d4d61)) +* migrated tooltip css to styled component for customizing theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([515ad24](https://github.com/awslabs/iot-app-kit/commit/515ad2478abf20a9490ac725ee80ce7cc6ae111f)) +* min max is sortable and not present on widget add ([7578a2e](https://github.com/awslabs/iot-app-kit/commit/7578a2e113221b2d3c00c01d2ede253e7ce07081)) +* min/max values have correct significant digits ([50e183d](https://github.com/awslabs/iot-app-kit/commit/50e183d240ecf329362e10d21b9864d08cb525ee)) +* move data quality widget on gauge to be closer to value ([d20b65f](https://github.com/awslabs/iot-app-kit/commit/d20b65f5704ffd5d56c4f402877be72d59adcadd)) +* pass in refresh rate through the query instead of props ([b6df585](https://github.com/awslabs/iot-app-kit/commit/b6df5856b4407c74d4746d12a1781d11976f9948)) +* **react components:** updating import for popper.js ([00c1707](https://github.com/awslabs/iot-app-kit/commit/00c17078163cc2ef48a8eb6e370652ca9823e8e2)) +* react-component Chart story book is broken ([c273ad5](https://github.com/awslabs/iot-app-kit/commit/c273ad529a7d78f887a2b8c64b50f76bfc018fc2)) +* **react-components:** add error state ([e16671f](https://github.com/awslabs/iot-app-kit/commit/e16671f11bbae4b768220b93b8cae0fe9ffee9c3)) +* **react-components:** add snapshot tests ([178f0e7](https://github.com/awslabs/iot-app-kit/commit/178f0e7bbba316c711ff7c8fc18455cdccf939fb)) +* **react-components:** add timezone to anomaly chart ([5379bd1](https://github.com/awslabs/iot-app-kit/commit/5379bd19d0d47e62f42a19230e9cf52e2a715d95)) +* **react-components:** anomaly chart move loading state ([581a3c5](https://github.com/awslabs/iot-app-kit/commit/581a3c57734ba460ced0e32e232ed38583f232ba)) +* **react-components:** anomaly chart timestamp padding ([b376bf4](https://github.com/awslabs/iot-app-kit/commit/b376bf4861f58bd5489c907d2ae72107a2178eb3)) +* **react-components:** anomaly chart xaxis formatting ([740ee2a](https://github.com/awslabs/iot-app-kit/commit/740ee2a0ecbbe29c43a02fd04c0193935d79dd0e)) +* **react-components:** anomaly widget error and empty states ([2d70b79](https://github.com/awslabs/iot-app-kit/commit/2d70b79467fe94621dd722bb95e7f52c21b477f2)) +* **react-components:** center error ([12da428](https://github.com/awslabs/iot-app-kit/commit/12da428c354b999a8dc350e3811cd9f3a44ef782)) +* **react-components:** clear ymin and ymax was getting emitted on every loop ([8609a48](https://github.com/awslabs/iot-app-kit/commit/8609a487a1b7ba9d4884750a6e6ee8819873a4b1)) +* **react-components:** comment out flaky resource expl tests ([ca1039d](https://github.com/awslabs/iot-app-kit/commit/ca1039dc5c66cd30cc578651184463c889febd83)) +* **react-components:** confining tootip to the chart area ([1bff986](https://github.com/awslabs/iot-app-kit/commit/1bff986999dc88a261caed22c3a77aab892219ad)) +* **react-components:** do not use decimal places setting in y axis ([f9fbf74](https://github.com/awslabs/iot-app-kit/commit/f9fbf74311af528b89ad34333b36508eeb3d9ae5)) +* **react-components:** ensure anomaly chart colors are in order ([3fd8d87](https://github.com/awslabs/iot-app-kit/commit/3fd8d87c2dee6615a7e22962c0d8dbd0cfff97c0)) +* **react-components:** ensure chart uses initial passed in viewport ([0b17318](https://github.com/awslabs/iot-app-kit/commit/0b173182adb4180ca0065b4238549cd30a0af3d2)) +* **react-components:** ensure enabled flag is never undefined for queries ([eb95ef4](https://github.com/awslabs/iot-app-kit/commit/eb95ef4e8f186f5f969e366321f01d9ab1ea1ab8)) +* **react-components:** export anomaly chart ([30ae675](https://github.com/awslabs/iot-app-kit/commit/30ae675d92acd26d0414f6aa2da953bc0b37d5e7)) +* **react-components:** filter out non anomalous data ([70f0a1c](https://github.com/awslabs/iot-app-kit/commit/70f0a1cdbada92336d9597c6e2a5f456896a15f5)) +* **react-components:** fix chart flickering and bugginess in live mode ([3cc3b41](https://github.com/awslabs/iot-app-kit/commit/3cc3b41d59d5c799b750eb76d809007b30dfe2a8)) +* **react-components:** fix error state display ([dead60a](https://github.com/awslabs/iot-app-kit/commit/dead60a175b236b4d74d1ca65a882821c5e49e26)) +* **react-components:** fix get value history request ([a701ef4](https://github.com/awslabs/iot-app-kit/commit/a701ef48519807612715eaf2714f3eb6a306de05)) +* **react-components:** fix global and chart store persistence ([83f1345](https://github.com/awslabs/iot-app-kit/commit/83f13452cbf350639cc2cc576d47a26138d58832)) +* **react-components:** fix passed in viewport for anomaly widget ([f73fafc](https://github.com/awslabs/iot-app-kit/commit/f73fafcd5dfdf7238f69848f1808fbbb0b17f281)) +* **react-components:** fix support for anomaly datasource outside of time sync ([d45cc6b](https://github.com/awslabs/iot-app-kit/commit/d45cc6b45adb67b8bc44b975a2a65c5942f0d746)) +* **react-components:** fix the mouse events ([7c07a37](https://github.com/awslabs/iot-app-kit/commit/7c07a37eb5e8649a6d967c96b297659caad270a8)) +* **react-components:** gauge properly shows property name again ([ddb65c6](https://github.com/awslabs/iot-app-kit/commit/ddb65c6304c473e01e0c7ae3e868eba98923574c)) +* **react-components:** gauge thresholds ([8e3bec3](https://github.com/awslabs/iot-app-kit/commit/8e3bec3f6058c9c96ac42439c1b33b90a0d3912e)) +* **react-components:** gauge thresholds with negative ranges ([2100221](https://github.com/awslabs/iot-app-kit/commit/21002216dc53230e95762ac3f46734ab90d8d1f6)) +* **react-components:** gestures prop works ([6141c32](https://github.com/awslabs/iot-app-kit/commit/6141c3234095c658240e528207cdcbe3ff6e2d62)) +* **react-components:** improve axis styling and add labels ([490058f](https://github.com/awslabs/iot-app-kit/commit/490058fbdb9ca102ca85abc2ff5770caafa52a71)) +* **react-components:** improve gauge thresholds ([09b352f](https://github.com/awslabs/iot-app-kit/commit/09b352f9a255cf3fb04f8c0382a8013db0f1ae35)) +* **react-components:** lowered min/max throttle to match TC throttle ([e972b1b](https://github.com/awslabs/iot-app-kit/commit/e972b1bfe89a25094b9884c38afd2ac7faa35c5c)) +* **react-components:** make anomaly chart responsive ([4b31b8c](https://github.com/awslabs/iot-app-kit/commit/4b31b8cece18f1a1e1e91447c31ca79ec0b3867f)) +* **react-components:** minor anomaly widget style changes ([19fc67a](https://github.com/awslabs/iot-app-kit/commit/19fc67a7768604d39c728ea4e1df8f318042d8b8)) +* **react-components:** performance fixes for chart component ([403f2bf](https://github.com/awslabs/iot-app-kit/commit/403f2bf6beea75e1e1668e33c60a6149ef1b5436)) +* **react-components:** refactor chart to use dataset ([b403789](https://github.com/awslabs/iot-app-kit/commit/b4037897cd4e7169958373bbf61d29c7454706ef)) +* **react-components:** refactor legend table into modules ([f5eed70](https://github.com/awslabs/iot-app-kit/commit/f5eed7068b70ae9305782f07b08115294b26a3b7)) +* **react-components:** remove data points after a threshold ([cd6a189](https://github.com/awslabs/iot-app-kit/commit/cd6a18913d2c0f3fb8b066dffbdf48f38d6955e4)) +* **react-components:** remove flaky test in new RE ([9e15637](https://github.com/awslabs/iot-app-kit/commit/9e15637ecced497aec52a7189fc1e0adcf1de361)) +* **react-components:** remove padded y axis code ([7e3d365](https://github.com/awslabs/iot-app-kit/commit/7e3d365d07dd4b074c6dda6d2934b7cb05fcde55)) +* **react-components:** remove secondary selection state when using TCs or gestures ([3ba4e6a](https://github.com/awslabs/iot-app-kit/commit/3ba4e6a1cc0c2a7fd48eb130f3b72262fcd97ad5)) +* **react-components:** skip flaky test in new RE ([e7928d3](https://github.com/awslabs/iot-app-kit/commit/e7928d329edef47871ed9978d820994ad2d76dcc)) +* **react-components:** support nanoseconds for datapoints ([34d2dff](https://github.com/awslabs/iot-app-kit/commit/34d2dff489ff77d9eb9226443218b4c7cf725ff2)) +* **react-components:** thresholds properly add and remove series ([bb8e451](https://github.com/awslabs/iot-app-kit/commit/bb8e451fbb4ed57a204b9936cf2e1c8853931c60)) +* **react-components:** timestamp bar correct date ([2063935](https://github.com/awslabs/iot-app-kit/commit/20639352a433cea9abfceee439f7aa9c36db05b9)) +* **react-components:** trendcursor hotkey indicates addition state ([c9d34e0](https://github.com/awslabs/iot-app-kit/commit/c9d34e0ef4ba891522336f05718d1808442949e3)) +* **react-components:** update date-fns dependency ([1267b65](https://github.com/awslabs/iot-app-kit/commit/1267b6583034f17b14b8ca1de52125640bfdf3ea)) +* **react-components:** updates for x-axis panning performance ([07a7624](https://github.com/awslabs/iot-app-kit/commit/07a7624d77962c38e7457abea1602082ebf2f5a3)) +* **react-components:** viewport fixes ([b5846ed](https://github.com/awslabs/iot-app-kit/commit/b5846edf5c795c2bccdfee2a71d6b65f44dd56e5)) +* **react-components:** zoom icons ([4da01df](https://github.com/awslabs/iot-app-kit/commit/4da01df378b1d3e2804c4802bd9250c7e180990f)) +* refresh rate defined in dashboard and on query ([43cc5e4](https://github.com/awslabs/iot-app-kit/commit/43cc5e437543aed60663620655044cba9437a226)) +* relative month test ([5c6e262](https://github.com/awslabs/iot-app-kit/commit/5c6e262b16b8a739c4a4d9e823453094242c67d9)) +* remove duplicate constants and types ([45c155b](https://github.com/awslabs/iot-app-kit/commit/45c155b414a29c767e276060f1c60ce8401ea456)) +* remove fetchMostRecentBeforeStart from status and kpi ([f9b3183](https://github.com/awslabs/iot-app-kit/commit/f9b3183ce5e52462f5120362a130b4aea6588671)) +* removed tanstack table related code ([c8be85d](https://github.com/awslabs/iot-app-kit/commit/c8be85d919faac44441f4b00aa81ac7dbf215599)) +* **resource-explorer:** only use alias to query if present ([ca35aee](https://github.com/awslabs/iot-app-kit/commit/ca35aee4cdd31c79302c282d5965911df6d0b6f5)) +* sort and pagination colors ([4dd6bb9](https://github.com/awslabs/iot-app-kit/commit/4dd6bb94198cd4c40fb1bde2d0b350c97d4ec540)) +* table resize button aria label ([1618d50](https://github.com/awslabs/iot-app-kit/commit/1618d50a713cb1be8b9a74899144ca92cd9ec5f1)) +* **timeZone:** wrap timezone setState in useEffect ([6cd74a1](https://github.com/awslabs/iot-app-kit/commit/6cd74a1019499b8d6586cac0d26d605cdcd9c928)) +* tooltip styled component issue is fixed ([5af6e22](https://github.com/awslabs/iot-app-kit/commit/5af6e2285cfc2e346e417e13f305f3a0a0c05439)) +* update data quality UX to match mocks ([ed62846](https://github.com/awslabs/iot-app-kit/commit/ed628461c0dd582ae2f03f06b81c8d25aab3832c)) +* update react-components public API for status and kpi widgets ([5e7bd49](https://github.com/awslabs/iot-app-kit/commit/5e7bd49fc6ae36fbdbd85e8c02bbb0b4ac082346)) +* updated the new set of design tokens [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([7bdb8b0](https://github.com/awslabs/iot-app-kit/commit/7bdb8b08db1dcdc06153d71eff191a5e5a93a48b)) +* updated theming support for buttons [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([1ffead0](https://github.com/awslabs/iot-app-kit/commit/1ffead0805048445b677f4cd63a31af7d5912095)) +* updates for performance issues ([8863b9a](https://github.com/awslabs/iot-app-kit/commit/8863b9a80d7a8284aa4732ed25298d165a769ea9)) +* use datastream id as legend table row key ([b4c11bc](https://github.com/awslabs/iot-app-kit/commit/b4c11bcd40400d4f7eae680d5ab521f00b638f64)) +* yAxis label collides with yAxis name [#2471](https://github.com/awslabs/iot-app-kit/issues/2471) ([85ac6ac](https://github.com/awslabs/iot-app-kit/commit/85ac6ac4586d560e44cadedbffe5b1a187bd8bb8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from * to 12.0.0 + * @iot-app-kit/core-util bumped from * to 12.0.0 + * @iot-app-kit/source-iottwinmaker bumped from * to 12.0.0 + * devDependencies + * @iot-app-kit/core bumped from * to 12.0.0 + * @iot-app-kit/jest-config bumped from * to 12.0.0 + * @iot-app-kit/source-iotsitewise bumped from * to 12.0.0 + * @iot-app-kit/testing-util bumped from * to 12.0.0 + * @iot-app-kit/ts-config bumped from * to 12.0.0 + * eslint-config-iot-app-kit bumped from * to 12.0.0 + +## [10.13.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.13.0...react-components-v10.13.1) (2024-10-16) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/core bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/core-util bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.13.0 to 10.13.1 + * devDependencies + * @iot-app-kit/core bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/jest-config bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/source-iotsitewise bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/testing-util bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/ts-config bumped from 10.13.0 to 10.13.1 + * eslint-config-iot-app-kit bumped from 10.13.0 to 10.13.1 + +## [10.13.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.12.2...react-components-v10.13.0) (2024-10-10) + + +### Bug Fixes + +* **imports:** move luxon dependency to right package ([31235da](https://github.com/awslabs/iot-app-kit/commit/31235da4b31e49ec0fc0f1ec21f649cf7af7e253)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/core bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/core-util bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.12.2 to 10.13.0 + * devDependencies + * @iot-app-kit/core bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/jest-config bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/source-iotsitewise bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/testing-util bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/ts-config bumped from 10.12.2 to 10.13.0 + * eslint-config-iot-app-kit bumped from 10.12.2 to 10.13.0 + +## [10.12.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.12.1...react-components-v10.12.2) (2024-09-17) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/core bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/core-util bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/source-iottwinmaker bumped from 10.12.1 to 10.12.2 + * devDependencies + * @iot-app-kit/core bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/jest-config bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/source-iotsitewise bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/testing-util bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/ts-config bumped from 10.12.1 to 10.12.2 + * eslint-config-iot-app-kit bumped from 10.12.1 to 10.12.2 + +## [10.12.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.12.0...react-components-v10.12.1) (2024-09-14) + + +### Bug Fixes + +* **resource-explorer:** only use alias to query if present ([ca35aee](https://github.com/awslabs/iot-app-kit/commit/ca35aee4cdd31c79302c282d5965911df6d0b6f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/core bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/core-util bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.12.0 to 10.12.1 + * devDependencies + * @iot-app-kit/core bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/jest-config bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/source-iotsitewise bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/testing-util bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/ts-config bumped from 10.12.0 to 10.12.1 + * eslint-config-iot-app-kit bumped from 10.12.0 to 10.12.1 + +## [10.12.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.11.0...react-components-v10.12.0) (2024-09-13) + + +### Features + +* adding timezone support to dashboard/widgets ([6435b90](https://github.com/awslabs/iot-app-kit/commit/6435b90d93246e319b939b7c316c6ffbea12ef8d)) +* **dashboard:** add new RE components to dynamic assets tab ([c588848](https://github.com/awslabs/iot-app-kit/commit/c5888485c3205c7ee572ec01d6f0b34d1789da23)) +* **dashboard:** use new RE components to update dashboard RE for modeled and unmodeled data ([d7db11e](https://github.com/awslabs/iot-app-kit/commit/d7db11ee7c16dd012b7ced86dc52cde9a483e24e)) +* **react-components:** add auto resolution and batching ([073029f](https://github.com/awslabs/iot-app-kit/commit/073029f4312c988bf099251284bf63d9515e01fd)) +* **react-components:** add hook for get asset property value history ([c708b4a](https://github.com/awslabs/iot-app-kit/commit/c708b4a6c2c3e9d6e843829692a2046c00ee6950)) +* **react-components:** add hook for latest asset property value ([ce9ec7c](https://github.com/awslabs/iot-app-kit/commit/ce9ec7c714e6c600da59af8f4bffaf210f0041c0)) +* **react-components:** add useLatestAlarmPropertyValue hook to fetch alarm prop vals in useAlarms ([18aa854](https://github.com/awslabs/iot-app-kit/commit/18aa8548bbc9aa9d4343a1d85b3cefdb798e1b25)) +* **react-components:** implement request functions and hooks to build clients ([2ca7e6c](https://github.com/awslabs/iot-app-kit/commit/2ca7e6caf771bd929b993d79f91f6e7d3ce21350)) +* **react-components:** initiali implementation for useTimeSeriesData ([50db88f](https://github.com/awslabs/iot-app-kit/commit/50db88f309e6470bfc510824f6deb564c949b794)) +* **react-components:** useAlarms hook ([7103db6](https://github.com/awslabs/iot-app-kit/commit/7103db640cd1531823a51fe3277691c869b581ed)) +* **react-components:** useDescribeAssets and useDescribeAssetModels queries implemented ([bfb07e1](https://github.com/awslabs/iot-app-kit/commit/bfb07e16b1fceabdd676ebdb833c4d85baaafb0d)) +* **sitewise-alarms:** add useAlarmModels hook to fetch iot events alarm models in useAlarms ([c4c4986](https://github.com/awslabs/iot-app-kit/commit/c4c4986fde3fd65d7ca7e8b1f7a364fcc079ca10)) + + +### Bug Fixes + +* **dashboard:** add descriptions to all RE tables ([f7b4f0c](https://github.com/awslabs/iot-app-kit/commit/f7b4f0c89d8b05be988acac54b8edf35ab3b7367)) +* **dashboard:** add descriptions to all tables in RE ([c7aff00](https://github.com/awslabs/iot-app-kit/commit/c7aff00ea0d6175186317f06ca7eec4c550de7a0)) +* **dashboard:** add timezone support for new RE ([2d4b5dd](https://github.com/awslabs/iot-app-kit/commit/2d4b5ddcbdefe4828168a7864bd679744e5a97eb)) +* **dashboard:** fast follow to clean up messy code for table cell render ([649f75d](https://github.com/awslabs/iot-app-kit/commit/649f75d91bd4865d94db633ecd3fb865098fc1ff)) +* **dashboard:** fix flaky test in dashboard ([6fe3285](https://github.com/awslabs/iot-app-kit/commit/6fe328510bfd4ed36a24935085aa41ac0c83dfa5)) +* **dashboard:** label matches kpi name ([f675d11](https://github.com/awslabs/iot-app-kit/commit/f675d11857c0b0a3869d03d9c1339c405a85d11e)) +* **dashboard:** re reflects significant digits + timezone support for unmodeled ([195be67](https://github.com/awslabs/iot-app-kit/commit/195be67fe0e5b7ef7b262491ff4fec574c62db8c)) +* **react-components:** ensure enabled flag is never undefined for queries ([eb95ef4](https://github.com/awslabs/iot-app-kit/commit/eb95ef4e8f186f5f969e366321f01d9ab1ea1ab8)) +* **react-components:** remove flaky test in new RE ([9e15637](https://github.com/awslabs/iot-app-kit/commit/9e15637ecced497aec52a7189fc1e0adcf1de361)) +* **react-components:** skip flaky test in new RE ([e7928d3](https://github.com/awslabs/iot-app-kit/commit/e7928d329edef47871ed9978d820994ad2d76dcc)) +* **timeZone:** wrap timezone setState in useEffect ([6cd74a1](https://github.com/awslabs/iot-app-kit/commit/6cd74a1019499b8d6586cac0d26d605cdcd9c928)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/core bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/core-util bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.11.0 to 10.12.0 + * devDependencies + * @iot-app-kit/core bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/jest-config bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/source-iotsitewise bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/testing-util bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/ts-config bumped from 10.11.0 to 10.12.0 + * eslint-config-iot-app-kit bumped from 10.11.0 to 10.12.0 + +## [10.11.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.10.2...react-components-v10.11.0) (2024-08-28) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/core bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/core-util bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.10.2 to 10.11.0 + * devDependencies + * @iot-app-kit/core bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/jest-config bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/source-iotsitewise bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/testing-util bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/ts-config bumped from 10.10.2 to 10.11.0 + * eslint-config-iot-app-kit bumped from 10.10.2 to 10.11.0 + +## [10.10.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.10.1...react-components-v10.10.2) (2024-08-08) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/core bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/core-util bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/source-iottwinmaker bumped from 10.10.1 to 10.10.2 + * devDependencies + * @iot-app-kit/core bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/jest-config bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/source-iotsitewise bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/testing-util bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/ts-config bumped from 10.10.1 to 10.10.2 + * eslint-config-iot-app-kit bumped from 10.10.1 to 10.10.2 + +## [10.10.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.10.0...react-components-v10.10.1) (2024-08-02) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/core bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/core-util bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.10.0 to 10.10.1 + * devDependencies + * @iot-app-kit/core bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/jest-config bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/source-iotsitewise bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/testing-util bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/ts-config bumped from 10.10.0 to 10.10.1 + * eslint-config-iot-app-kit bumped from 10.10.0 to 10.10.1 + +## [10.10.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.9.0...react-components-v10.10.0) (2024-07-29) + + +### Features + +* add timezone converter util ([e5d59c4](https://github.com/awslabs/iot-app-kit/commit/e5d59c43803a03413e77556f6ca4179b18ecb3d7)) + + +### Bug Fixes + +* **dashboard:** adds resolution and aggregation to new proeprty in gauge widget ([5f5af30](https://github.com/awslabs/iot-app-kit/commit/5f5af3068defeb2a609e68ca0d29cc09f9960cfd)) +* move data quality widget on gauge to be closer to value ([d20b65f](https://github.com/awslabs/iot-app-kit/commit/d20b65f5704ffd5d56c4f402877be72d59adcadd)) +* **react-components:** gauge properly shows property name again ([ddb65c6](https://github.com/awslabs/iot-app-kit/commit/ddb65c6304c473e01e0c7ae3e868eba98923574c)) +* **react-components:** gauge thresholds with negative ranges ([2100221](https://github.com/awslabs/iot-app-kit/commit/21002216dc53230e95762ac3f46734ab90d8d1f6)) +* **react-components:** gestures prop works ([6141c32](https://github.com/awslabs/iot-app-kit/commit/6141c3234095c658240e528207cdcbe3ff6e2d62)) +* update data quality UX to match mocks ([ed62846](https://github.com/awslabs/iot-app-kit/commit/ed628461c0dd582ae2f03f06b81c8d25aab3832c)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/core bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/core-util bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.9.0 to 10.10.0 + * devDependencies + * @iot-app-kit/core bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/jest-config bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/source-iotsitewise bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/testing-util bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/ts-config bumped from 10.9.0 to 10.10.0 + * eslint-config-iot-app-kit bumped from 10.9.0 to 10.10.0 + +## [10.9.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.8.1...react-components-v10.9.0) (2024-07-08) + + +### Bug Fixes + +* **react-components:** anomaly chart move loading state ([581a3c5](https://github.com/awslabs/iot-app-kit/commit/581a3c57734ba460ced0e32e232ed38583f232ba)) +* **react-components:** anomaly chart xaxis formatting ([740ee2a](https://github.com/awslabs/iot-app-kit/commit/740ee2a0ecbbe29c43a02fd04c0193935d79dd0e)) +* **react-components:** ensure anomaly chart colors are in order ([3fd8d87](https://github.com/awslabs/iot-app-kit/commit/3fd8d87c2dee6615a7e22962c0d8dbd0cfff97c0)) +* **react-components:** improve axis styling and add labels ([490058f](https://github.com/awslabs/iot-app-kit/commit/490058fbdb9ca102ca85abc2ff5770caafa52a71)) +* **react-components:** minor anomaly widget style changes ([19fc67a](https://github.com/awslabs/iot-app-kit/commit/19fc67a7768604d39c728ea4e1df8f318042d8b8)) +* **react-components:** zoom icons ([4da01df](https://github.com/awslabs/iot-app-kit/commit/4da01df378b1d3e2804c4802bd9250c7e180990f)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/core bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/core-util bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.8.1 to 10.9.0 + * devDependencies + * @iot-app-kit/core bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/jest-config bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/source-iotsitewise bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/testing-util bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/ts-config bumped from 10.8.1 to 10.9.0 + * eslint-config-iot-app-kit bumped from 10.8.1 to 10.9.0 + +## [10.8.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.8.0...react-components-v10.8.1) (2024-06-27) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/core bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/core-util bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.8.0 to 10.8.1 + * devDependencies + * @iot-app-kit/core bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/jest-config bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/source-iotsitewise bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/testing-util bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/ts-config bumped from 10.8.0 to 10.8.1 + * eslint-config-iot-app-kit bumped from 10.8.0 to 10.8.1 + +## [10.8.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.7.0...react-components-v10.8.0) (2024-06-24) + + +### Features + +* **anomaly-chart:** added `gestures` enablement option ([4c2402c](https://github.com/awslabs/iot-app-kit/commit/4c2402c44a5c3538fdc60fe8210b626670073479)) +* **react-components:** add arrow datasource ([efb0d6d](https://github.com/awslabs/iot-app-kit/commit/efb0d6d01549011e57400c6b48033264a7e122c9)) + + +### Bug Fixes + +* **react-components:** improve gauge thresholds ([09b352f](https://github.com/awslabs/iot-app-kit/commit/09b352f9a255cf3fb04f8c0382a8013db0f1ae35)) +* **react-components:** thresholds properly add and remove series ([bb8e451](https://github.com/awslabs/iot-app-kit/commit/bb8e451fbb4ed57a204b9936cf2e1c8853931c60)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/core bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/core-util bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.7.0 to 10.8.0 + * devDependencies + * @iot-app-kit/core bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/jest-config bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/source-iotsitewise bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/testing-util bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/ts-config bumped from 10.7.0 to 10.8.0 + * eslint-config-iot-app-kit bumped from 10.7.0 to 10.8.0 + +## [10.7.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.6.1...react-components-v10.7.0) (2024-06-18) + + +### Features + +* customize gauge in dashboard config ([8af089e](https://github.com/awslabs/iot-app-kit/commit/8af089e94a2c11cab1c9473d384ed241da7f6461)) +* onViewportChange and currentViewport ([d63c9e3](https://github.com/awslabs/iot-app-kit/commit/d63c9e3a416e78a78b3a453755be39a6879eb07c)) + + +### Bug Fixes + +* **dashboard:** decimal places fixes ([710a6ae](https://github.com/awslabs/iot-app-kit/commit/710a6aeee8e16fbf7f204d9214dbd8c86fce16e2)) +* **react-components:** add timezone to anomaly chart ([5379bd1](https://github.com/awslabs/iot-app-kit/commit/5379bd19d0d47e62f42a19230e9cf52e2a715d95)) +* **react-components:** anomaly chart timestamp padding ([b376bf4](https://github.com/awslabs/iot-app-kit/commit/b376bf4861f58bd5489c907d2ae72107a2178eb3)) +* **react-components:** do not use decimal places setting in y axis ([f9fbf74](https://github.com/awslabs/iot-app-kit/commit/f9fbf74311af528b89ad34333b36508eeb3d9ae5)) +* **react-components:** ensure chart uses initial passed in viewport ([0b17318](https://github.com/awslabs/iot-app-kit/commit/0b173182adb4180ca0065b4238549cd30a0af3d2)) +* **react-components:** fix chart flickering and bugginess in live mode ([3cc3b41](https://github.com/awslabs/iot-app-kit/commit/3cc3b41d59d5c799b750eb76d809007b30dfe2a8)) +* **react-components:** fix passed in viewport for anomaly widget ([f73fafc](https://github.com/awslabs/iot-app-kit/commit/f73fafcd5dfdf7238f69848f1808fbbb0b17f281)) +* **react-components:** fix support for anomaly datasource outside of time sync ([d45cc6b](https://github.com/awslabs/iot-app-kit/commit/d45cc6b45adb67b8bc44b975a2a65c5942f0d746)) +* **react-components:** make anomaly chart responsive ([4b31b8c](https://github.com/awslabs/iot-app-kit/commit/4b31b8cece18f1a1e1e91447c31ca79ec0b3867f)) +* **react-components:** timestamp bar correct date ([2063935](https://github.com/awslabs/iot-app-kit/commit/20639352a433cea9abfceee439f7aa9c36db05b9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/core bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/core-util bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.6.1 to 10.7.0 + * devDependencies + * @iot-app-kit/core bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/jest-config bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/source-iotsitewise bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/testing-util bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/ts-config bumped from 10.6.1 to 10.7.0 + * eslint-config-iot-app-kit bumped from 10.6.1 to 10.7.0 + +## [10.6.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.6.0...react-components-v10.6.1) (2024-06-12) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/core bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/core-util bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.6.0 to 10.6.1 + * devDependencies + * @iot-app-kit/core bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/jest-config bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/source-iotsitewise bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/testing-util bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/ts-config bumped from 10.6.0 to 10.6.1 + * eslint-config-iot-app-kit bumped from 10.6.0 to 10.6.1 + +## [10.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.5.0...react-components-v10.6.0) (2024-06-06) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/core bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/core-util bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.5.0 to 10.6.0 + * devDependencies + * @iot-app-kit/core bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/jest-config bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/source-iotsitewise bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/testing-util bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/ts-config bumped from 10.5.0 to 10.6.0 + * eslint-config-iot-app-kit bumped from 10.5.0 to 10.6.0 + +## [10.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.4.1...react-components-v10.5.0) (2024-05-29) + + +### Features + +* **dashboard:** default viewport setting ([0c3f3ef](https://github.com/awslabs/iot-app-kit/commit/0c3f3efa3a48be537d0eed0e6a1a02ecaa7c1f03)) +* resource explorers ([f604b15](https://github.com/awslabs/iot-app-kit/commit/f604b15dd35e014e78e1f56fd666602767e6b5bd)) + + +### Bug Fixes + +* **react-components:** anomaly widget error and empty states ([2d70b79](https://github.com/awslabs/iot-app-kit/commit/2d70b79467fe94621dd722bb95e7f52c21b477f2)) +* **react-components:** comment out flaky resource expl tests ([ca1039d](https://github.com/awslabs/iot-app-kit/commit/ca1039dc5c66cd30cc578651184463c889febd83)) +* **react-components:** filter out non anomalous data ([70f0a1c](https://github.com/awslabs/iot-app-kit/commit/70f0a1cdbada92336d9597c6e2a5f456896a15f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/core bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/core-util bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.4.1 to 10.5.0 + * devDependencies + * @iot-app-kit/core bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/jest-config bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/source-iotsitewise bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/testing-util bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/ts-config bumped from 10.4.1 to 10.5.0 + * eslint-config-iot-app-kit bumped from 10.4.1 to 10.5.0 + +## [10.4.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.4.0...react-components-v10.4.1) (2024-05-20) + + +### Bug Fixes + +* **react-components:** update date-fns dependency ([1267b65](https://github.com/awslabs/iot-app-kit/commit/1267b6583034f17b14b8ca1de52125640bfdf3ea)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/core bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/core-util bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.4.0 to 10.4.1 + * devDependencies + * @iot-app-kit/core bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/jest-config bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/source-iotsitewise bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/testing-util bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/ts-config bumped from 10.4.0 to 10.4.1 + * eslint-config-iot-app-kit bumped from 10.4.0 to 10.4.1 + +## [10.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.3.0...react-components-v10.4.0) (2024-05-20) + + +### Features + +* add anomaly query ([3c11512](https://github.com/awslabs/iot-app-kit/commit/3c115121db6fc8248bcd6b36989f6ebea3212ba7)) +* add gauge component in doc site package ([17a02f5](https://github.com/awslabs/iot-app-kit/commit/17a02f54ac811ab384aa6b8ad2dd4f61e0cc1514)) +* add step chart to l4e ([0983438](https://github.com/awslabs/iot-app-kit/commit/0983438c28ad7603e689697b0bd68cc10ce6fb50)) +* gauge widget to dashboard ([17cde64](https://github.com/awslabs/iot-app-kit/commit/17cde64259ab6b69beec2f2de4eaca9750504a5c)) +* guage component data quality and error text ([2dca188](https://github.com/awslabs/iot-app-kit/commit/2dca1889462a6002980b105ae5338265c187b502)) +* guage component initail commit ([305657a](https://github.com/awslabs/iot-app-kit/commit/305657a7aa761883da7a9839d0ae0a3914751a51)) +* **react-components:** add axis option to anomaly widget ([d0733e1](https://github.com/awslabs/iot-app-kit/commit/d0733e12863f4ee2db1e29576c8ea6b1d5964f62)) +* **react-components:** add intl ([c7c30c3](https://github.com/awslabs/iot-app-kit/commit/c7c30c3f969c71de6856d98d59e1043a6c785a45)) +* **react-components:** add l4e datasource ([748f8c1](https://github.com/awslabs/iot-app-kit/commit/748f8c17d56bbef0f2190fde38b5717c29d1d942)) +* **react-components:** add l4e queries ([328da8e](https://github.com/awslabs/iot-app-kit/commit/328da8ed9341c68c8c0a3a6b672170f1fa8eeb37)) +* **react-components:** l4e anomaly tests ([fbff596](https://github.com/awslabs/iot-app-kit/commit/fbff5968b7ddb406fa0eaaa21b84489010d55591)) +* **react-components:** y axis and timestamp options ([bfe2520](https://github.com/awslabs/iot-app-kit/commit/bfe2520a731dc6ea24d0ad928084546d45ed8643)) +* **widgets:** add name style settings for line/table + edit label in config panel ([f5e9b3f](https://github.com/awslabs/iot-app-kit/commit/f5e9b3fc99a176b3d9eb54ef0a387d171791aaf9)) + + +### Bug Fixes + +* add default settings to charts ([5917c83](https://github.com/awslabs/iot-app-kit/commit/5917c83674ffe67ced2bc7fe18c226460c115e80)) +* add trailing zeros to decimal point rounding, fix rounding function ([9c13177](https://github.com/awslabs/iot-app-kit/commit/9c131779c5a3f5b2ce7c6d1239e54ed82bfbf572)) +* better handling of light and dark mode w thresholds ([bd70051](https://github.com/awslabs/iot-app-kit/commit/bd70051944a9a21e21479f4793614f85a4716b2b)) +* fix bugs on l4e widget ([17a4896](https://github.com/awslabs/iot-app-kit/commit/17a489631da778b13fcb194b8bd527874e9e2858)) +* l4e bug fixes ([a71673c](https://github.com/awslabs/iot-app-kit/commit/a71673c9fbc701a5e26ed8d8c9bda191bc9b9285)) +* l4e widget quick fixes ([286f724](https://github.com/awslabs/iot-app-kit/commit/286f7244ac501ffc877dd0e0d40d76e97ab98bda)) +* migrated tooltip css to styled component for customizing theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([515ad24](https://github.com/awslabs/iot-app-kit/commit/515ad2478abf20a9490ac725ee80ce7cc6ae111f)) +* **react-components:** add error state ([e16671f](https://github.com/awslabs/iot-app-kit/commit/e16671f11bbae4b768220b93b8cae0fe9ffee9c3)) +* **react-components:** add snapshot tests ([178f0e7](https://github.com/awslabs/iot-app-kit/commit/178f0e7bbba316c711ff7c8fc18455cdccf939fb)) +* **react-components:** center error ([12da428](https://github.com/awslabs/iot-app-kit/commit/12da428c354b999a8dc350e3811cd9f3a44ef782)) +* **react-components:** export anomaly chart ([30ae675](https://github.com/awslabs/iot-app-kit/commit/30ae675d92acd26d0414f6aa2da953bc0b37d5e7)) +* **react-components:** fix error state display ([dead60a](https://github.com/awslabs/iot-app-kit/commit/dead60a175b236b4d74d1ca65a882821c5e49e26)) +* **react-components:** fix get value history request ([a701ef4](https://github.com/awslabs/iot-app-kit/commit/a701ef48519807612715eaf2714f3eb6a306de05)) +* **react-components:** gauge thresholds ([8e3bec3](https://github.com/awslabs/iot-app-kit/commit/8e3bec3f6058c9c96ac42439c1b33b90a0d3912e)) +* **react-components:** support nanoseconds for datapoints ([34d2dff](https://github.com/awslabs/iot-app-kit/commit/34d2dff489ff77d9eb9226443218b4c7cf725ff2)) +* **react-components:** viewport fixes ([b5846ed](https://github.com/awslabs/iot-app-kit/commit/b5846edf5c795c2bccdfee2a71d6b65f44dd56e5)) +* sort and pagination colors ([4dd6bb9](https://github.com/awslabs/iot-app-kit/commit/4dd6bb94198cd4c40fb1bde2d0b350c97d4ec540)) +* tooltip styled component issue is fixed ([5af6e22](https://github.com/awslabs/iot-app-kit/commit/5af6e2285cfc2e346e417e13f305f3a0a0c05439)) +* updated the new set of design tokens [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([7bdb8b0](https://github.com/awslabs/iot-app-kit/commit/7bdb8b08db1dcdc06153d71eff191a5e5a93a48b)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/core bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/core-util bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.3.0 to 10.4.0 + * devDependencies + * @iot-app-kit/core bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/jest-config bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/source-iotsitewise bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/testing-util bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/ts-config bumped from 10.3.0 to 10.4.0 + * eslint-config-iot-app-kit bumped from 10.3.0 to 10.4.0 + +## [10.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.2.0...react-components-v10.3.0) (2024-05-09) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/core bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/core-util bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.2.0 to 10.3.0 + * devDependencies + * @iot-app-kit/core bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/jest-config bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/source-iotsitewise bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/testing-util bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/ts-config bumped from 10.2.0 to 10.3.0 + * eslint-config-iot-app-kit bumped from 10.2.0 to 10.3.0 + +## [10.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.1.0...react-components-v10.2.0) (2024-03-29) + + +### Features + +* add data quality to kpi and status ([7248004](https://github.com/awslabs/iot-app-kit/commit/724800417bc8c74f518d6a39044c815848ef431f)) +* display assetname conditionally in legend [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([c4c443f](https://github.com/awslabs/iot-app-kit/commit/c4c443fab77d6e337d32fbecebb308c7f339fab5)) +* l4e table ([5bd6898](https://github.com/awslabs/iot-app-kit/commit/5bd68983268d00ff60bf0434e5b810e52254c16c)) +* l4e timeline (mock data only) ([829496c](https://github.com/awslabs/iot-app-kit/commit/829496cd0f51fb4131b5a081c8ecc7d17763b5be)) +* **react-components:** add data quality to xy-plot ([ed18e0d](https://github.com/awslabs/iot-app-kit/commit/ed18e0d891035803dfc0cc646371ae1e20914d2a)) +* updated the theming support for kpi and tc [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([d32a018](https://github.com/awslabs/iot-app-kit/commit/d32a0184518ef02222ef15359d49bccb68f6ee39)) + + +### Bug Fixes + +* l4e code clean up ([ad19b6c](https://github.com/awslabs/iot-app-kit/commit/ad19b6c68c515182454d9132629f2736f5fa4988)) +* updated theming support for buttons [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([1ffead0](https://github.com/awslabs/iot-app-kit/commit/1ffead0805048445b677f4cd63a31af7d5912095)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/core bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/core-util bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.1.0 to 10.2.0 + * devDependencies + * @iot-app-kit/core bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/jest-config bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/source-iotsitewise bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/testing-util bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/ts-config bumped from 10.1.0 to 10.2.0 + * eslint-config-iot-app-kit bumped from 10.1.0 to 10.2.0 + +## [10.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.0.0...react-components-v10.1.0) (2024-03-21) + + +### Features + +* add a widget level loading indicator for x-y plot ([9be5617](https://github.com/awslabs/iot-app-kit/commit/9be5617aabe7a1edf88876406aeb1e83f174a288)) +* added data quality icon and text next to value in table [#2664](https://github.com/awslabs/iot-app-kit/issues/2664) ([91cd12f](https://github.com/awslabs/iot-app-kit/commit/91cd12f9e73fa5c77ab8e7209376116f4307526b)) +* added support for border theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([66e6680](https://github.com/awslabs/iot-app-kit/commit/66e6680fbea3f005aba7239c3c47bf13e5184462)) +* chart legend support px rem em % unit type ([4e023e6](https://github.com/awslabs/iot-app-kit/commit/4e023e6c4a735189e2db04de886555a0199087b2)) +* new KPI and update tests ([328e41a](https://github.com/awslabs/iot-app-kit/commit/328e41ae6f1b25c743a16f03d966a5b97408455a)) +* support theming using cloudscape mechanism [#2667](https://github.com/awslabs/iot-app-kit/issues/2667) ([c342310](https://github.com/awslabs/iot-app-kit/commit/c3423101f4f60410d2168a2605fadeb3c6c2d5bc)) +* user selected dashboard refresh-rate ([1c1256d](https://github.com/awslabs/iot-app-kit/commit/1c1256da83c938037a47e930c127c2bf3bc14e90)) + + +### Bug Fixes + +* add missing loading indication for widget values ([d90f9a6](https://github.com/awslabs/iot-app-kit/commit/d90f9a68e63b6280c1fb1187b8b34853fc2047ec)) +* datastream not show unit if it's undefined [#2660](https://github.com/awslabs/iot-app-kit/issues/2660) ([7418773](https://github.com/awslabs/iot-app-kit/commit/7418773d7a39ef978ad3663e12fcf87082767f54)) +* pass in refresh rate through the query instead of props ([b6df585](https://github.com/awslabs/iot-app-kit/commit/b6df5856b4407c74d4746d12a1781d11976f9948)) +* **react components:** updating import for popper.js ([00c1707](https://github.com/awslabs/iot-app-kit/commit/00c17078163cc2ef48a8eb6e370652ca9823e8e2)) +* **react-components:** lowered min/max throttle to match TC throttle ([e972b1b](https://github.com/awslabs/iot-app-kit/commit/e972b1bfe89a25094b9884c38afd2ac7faa35c5c)) +* refresh rate defined in dashboard and on query ([43cc5e4](https://github.com/awslabs/iot-app-kit/commit/43cc5e437543aed60663620655044cba9437a226)) +* remove duplicate constants and types ([45c155b](https://github.com/awslabs/iot-app-kit/commit/45c155b414a29c767e276060f1c60ce8401ea456)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/core bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/core-util bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.0.0 to 10.1.0 + * devDependencies + * @iot-app-kit/core bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/jest-config bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/source-iotsitewise bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/testing-util bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/ts-config bumped from 10.0.0 to 10.1.0 + * eslint-config-iot-app-kit bumped from 10.0.0 to 10.1.0 + +## [10.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.15.0...react-components-v10.0.0) (2024-02-28) + + +### Features + +* add threshold settings to KPI ([2fa0429](https://github.com/awslabs/iot-app-kit/commit/2fa0429b6262092b4b3c86c21b8808b90e2d49fe)) +* added a label time range for viewport picker in dashboard header [#2559](https://github.com/awslabs/iot-app-kit/issues/2559) ([743cb80](https://github.com/awslabs/iot-app-kit/commit/743cb80ec36d116d6ef25e97ec54f2238ddb2ea1)) +* added accessible labels to different toolbar container [#2510](https://github.com/awslabs/iot-app-kit/issues/2510) ([ce5af6f](https://github.com/awslabs/iot-app-kit/commit/ce5af6fbc6e6b887f3fade9395bcbf54da386a88)) +* added viewport timestamps in xy plot [#2470](https://github.com/awslabs/iot-app-kit/issues/2470) ([46c1d24](https://github.com/awslabs/iot-app-kit/commit/46c1d24b99ff2ca9fb990ceed341ad6820c21f01)) +* conditionally display latest value in legend table [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([d3feb29](https://github.com/awslabs/iot-app-kit/commit/d3feb2920f3c63b0b2ce9580fc07a86475fc1ff1)) +* kpi and status gated config panel ([1f56b4f](https://github.com/awslabs/iot-app-kit/commit/1f56b4f2e7212ddfcc216fb778e0d4db57309ab2)) +* new design status (gated) ([69d6c97](https://github.com/awslabs/iot-app-kit/commit/69d6c979d1baefd4fd486cf0d1402b7357e8506b)) +* **react-components:** add max column to legend ([322c20f](https://github.com/awslabs/iot-app-kit/commit/322c20f0d438ecb45ee02fae186f6a198963c5b6)) +* **react-components:** add min column to legend ([69ba923](https://github.com/awslabs/iot-app-kit/commit/69ba92324da42770e267c9a0bce717ebf1ca0dbf)) +* **react-components:** calculate min/max and store value in store for chart to consume ([41b8551](https://github.com/awslabs/iot-app-kit/commit/41b855103e6643dd79e6e0fc9e7350fddefd9101)) +* show/hide aggregation and resolution in KPI ([aef1f14](https://github.com/awslabs/iot-app-kit/commit/aef1f146c6d4db03d759b76896d78e966b1ce1e6)) +* updated KPI style (gated) ([31ea2f3](https://github.com/awslabs/iot-app-kit/commit/31ea2f371676be9b6412073772b9110b01c42786)) +* widget tool box on mouse hover and selection state ([c80d42a](https://github.com/awslabs/iot-app-kit/commit/c80d42a3d10223d0d7edd5b3ee1b23c9ab613399)) + + +### Bug Fixes + +* chart gesture icons overlap on mouse hover ([b5e5c0d](https://github.com/awslabs/iot-app-kit/commit/b5e5c0d6115ed8eb9d819a9b4ceef31c7b56db2b)) +* internal pipeline has issues with lfs, reverting ([968f950](https://github.com/awslabs/iot-app-kit/commit/968f95005c51591d7cb99af323808fd232b8d4e9)) +* min max is sortable and not present on widget add ([7578a2e](https://github.com/awslabs/iot-app-kit/commit/7578a2e113221b2d3c00c01d2ede253e7ce07081)) +* min/max values have correct significant digits ([50e183d](https://github.com/awslabs/iot-app-kit/commit/50e183d240ecf329362e10d21b9864d08cb525ee)) +* remove fetchMostRecentBeforeStart from status and kpi ([f9b3183](https://github.com/awslabs/iot-app-kit/commit/f9b3183ce5e52462f5120362a130b4aea6588671)) +* update react-components public API for status and kpi widgets ([5e7bd49](https://github.com/awslabs/iot-app-kit/commit/5e7bd49fc6ae36fbdbd85e8c02bbb0b4ac082346)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/core bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/core-util bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.15.0 to 10.0.0 + * devDependencies + * @iot-app-kit/core bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/jest-config bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/source-iotsitewise bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/testing-util bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/ts-config bumped from 9.15.0 to 10.0.0 + * eslint-config-iot-app-kit bumped from 9.15.0 to 10.0.0 + +## [9.15.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.14.0...react-components-v9.15.0) (2024-02-01) + + +### Features + +* display legend unit conditionally [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([9f6440e](https://github.com/awslabs/iot-app-kit/commit/9f6440e9e06c9040a6be46eab3a9141ad02a0509)) +* legend resize ([792b617](https://github.com/awslabs/iot-app-kit/commit/792b6170cc19402f3c49fbd60e4a07dc0890c434)) +* **react-components:** trendcurors using echarts extension ([a7c6bbe](https://github.com/awslabs/iot-app-kit/commit/a7c6bbe064ae746f024b74d885721a70a06716a2)) + + +### Bug Fixes + +* add signigicant digits to xy plot ([70a109e](https://github.com/awslabs/iot-app-kit/commit/70a109e8083b6729313f4f0dc362df0f3cf6ea62)) +* fix filtered data on zooms ([99e2f90](https://github.com/awslabs/iot-app-kit/commit/99e2f90aecdbaaa354e62e76b22c88a8530c1509)) +* hidden and highlighted datastreams persist correctly ([5a85bb7](https://github.com/awslabs/iot-app-kit/commit/5a85bb7d40d07dce439a1bfa15550d8893089cbd)) +* react-component Chart story book is broken ([c273ad5](https://github.com/awslabs/iot-app-kit/commit/c273ad529a7d78f887a2b8c64b50f76bfc018fc2)) +* **react-components:** fix global and chart store persistence ([83f1345](https://github.com/awslabs/iot-app-kit/commit/83f13452cbf350639cc2cc576d47a26138d58832)) +* **react-components:** refactor legend table into modules ([f5eed70](https://github.com/awslabs/iot-app-kit/commit/f5eed7068b70ae9305782f07b08115294b26a3b7)) +* yAxis label collides with yAxis name [#2471](https://github.com/awslabs/iot-app-kit/issues/2471) ([85ac6ac](https://github.com/awslabs/iot-app-kit/commit/85ac6ac4586d560e44cadedbffe5b1a187bd8bb8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/core bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/core-util bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.14.0 to 9.15.0 + * devDependencies + * @iot-app-kit/core bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/jest-config bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/source-iotsitewise bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/testing-util bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/ts-config bumped from 9.14.0 to 9.15.0 + * eslint-config-iot-app-kit bumped from 9.14.0 to 9.15.0 + +## [9.14.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.13.0...react-components-v9.14.0) (2024-01-18) + + +### Features + +* changed ui experience of chart legend based on legend position [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([de1f147](https://github.com/awslabs/iot-app-kit/commit/de1f14772b614f67156a34ac64300111a6c55126)) + + +### Bug Fixes + +* improved zoom and default values for y axis ([112e5c5](https://github.com/awslabs/iot-app-kit/commit/112e5c58d7e3478dec03dfbb2eb52ec315b4690d)) +* make context menu appear on top of chart tooltip ([e1622c8](https://github.com/awslabs/iot-app-kit/commit/e1622c86bf4ead6856e7e1c9be1d5b8a1d6d4d61)) +* **react-components:** fix the mouse events ([7c07a37](https://github.com/awslabs/iot-app-kit/commit/7c07a37eb5e8649a6d967c96b297659caad270a8)) +* **react-components:** refactor chart to use dataset ([b403789](https://github.com/awslabs/iot-app-kit/commit/b4037897cd4e7169958373bbf61d29c7454706ef)) +* removed tanstack table related code ([c8be85d](https://github.com/awslabs/iot-app-kit/commit/c8be85d919faac44441f4b00aa81ac7dbf215599)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/core bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/core-util bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.13.0 to 9.14.0 + * devDependencies + * @iot-app-kit/core bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/jest-config bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/source-iotsitewise bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/testing-util bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/ts-config bumped from 9.13.0 to 9.14.0 + * eslint-config-iot-app-kit bumped from 9.13.0 to 9.14.0 + +## [9.13.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.12.0...react-components-v9.13.0) (2024-01-05) + + +### Features + +* legend table is implemeted using tanstack table ([c92533a](https://github.com/awslabs/iot-app-kit/commit/c92533a342c95618d6dcf7d2a13bdad204bb01de)) +* **react-components:** hide/show properties from legend ([e666cf1](https://github.com/awslabs/iot-app-kit/commit/e666cf1cfba8343d1a5bbb0f38a4341969a18575)) +* **ResourceExplorer:** hide properties table when not needed to be displayed ([0fca5e9](https://github.com/awslabs/iot-app-kit/commit/0fca5e9089ac7af52e1d31b2143acb121cb7869b)) +* xy-plot y axis lable changes [#2378](https://github.com/awslabs/iot-app-kit/issues/2378) ([48389c3](https://github.com/awslabs/iot-app-kit/commit/48389c3e59305525b11b63233c3a79d4a8e3a78d)) + + +### Bug Fixes + +* fix data-zoom behavior for base chart ([0c66a80](https://github.com/awslabs/iot-app-kit/commit/0c66a8016e2aa827ad3093c3ef89d6437e014d18)) +* **react-components:** clear ymin and ymax was getting emitted on every loop ([8609a48](https://github.com/awslabs/iot-app-kit/commit/8609a487a1b7ba9d4884750a6e6ee8819873a4b1)) +* **react-components:** confining tootip to the chart area ([1bff986](https://github.com/awslabs/iot-app-kit/commit/1bff986999dc88a261caed22c3a77aab892219ad)) +* **react-components:** performance fixes for chart component ([403f2bf](https://github.com/awslabs/iot-app-kit/commit/403f2bf6beea75e1e1668e33c60a6149ef1b5436)) +* **react-components:** remove data points after a threshold ([cd6a189](https://github.com/awslabs/iot-app-kit/commit/cd6a18913d2c0f3fb8b066dffbdf48f38d6955e4)) +* **react-components:** remove padded y axis code ([7e3d365](https://github.com/awslabs/iot-app-kit/commit/7e3d365d07dd4b074c6dda6d2934b7cb05fcde55)) +* **react-components:** remove secondary selection state when using TCs or gestures ([3ba4e6a](https://github.com/awslabs/iot-app-kit/commit/3ba4e6a1cc0c2a7fd48eb130f3b72262fcd97ad5)) +* **react-components:** updates for x-axis panning performance ([07a7624](https://github.com/awslabs/iot-app-kit/commit/07a7624d77962c38e7457abea1602082ebf2f5a3)) +* relative month test ([5c6e262](https://github.com/awslabs/iot-app-kit/commit/5c6e262b16b8a739c4a4d9e823453094242c67d9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/core bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/core-util bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.12.0 to 9.13.0 + * devDependencies + * @iot-app-kit/core bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/jest-config bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/source-iotsitewise bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/testing-util bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/ts-config bumped from 9.12.0 to 9.13.0 + * eslint-config-iot-app-kit bumped from 9.12.0 to 9.13.0 + +## [9.12.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.11.0...react-components-v9.12.0) (2023-12-18) + + +### Features + +* chat legend enhancement [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([b1ca8ae](https://github.com/awslabs/iot-app-kit/commit/b1ca8aeda126f09f371e23133fa600d5b56c9b21)) +* **dashboard:** add colors to trendcursors ([a890c7d](https://github.com/awslabs/iot-app-kit/commit/a890c7db39df1a836312ac4050c41e2f4fdd9f4a)) +* first click on paginate timeline should move backward from current time duration ([5f9aa42](https://github.com/awslabs/iot-app-kit/commit/5f9aa42aef52d1bade596d0b8cfa1d58d51cce52)) +* lint accessibility ([0db36ef](https://github.com/awslabs/iot-app-kit/commit/0db36ef6a07fe5e0709d17081dffa7d23669e2fe)) + + +### Bug Fixes + +* table resize button aria label ([1618d50](https://github.com/awslabs/iot-app-kit/commit/1618d50a713cb1be8b9a74899144ca92cd9ec5f1)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/core bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/core-util bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.11.0 to 9.12.0 + * devDependencies + * @iot-app-kit/core bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/jest-config bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/source-iotsitewise bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/testing-util bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/ts-config bumped from 9.11.0 to 9.12.0 + * eslint-config-iot-app-kit bumped from 9.11.0 to 9.12.0 + +## [9.11.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.10.0...react-components-v9.11.0) (2023-12-07) + + +### Bug Fixes + +* use datastream id as legend table row key ([b4c11bc](https://github.com/awslabs/iot-app-kit/commit/b4c11bcd40400d4f7eae680d5ab521f00b638f64)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/core bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/core-util bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.10.0 to 9.11.0 + * devDependencies + * @iot-app-kit/core bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/jest-config bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/source-iotsitewise bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/testing-util bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/ts-config bumped from 9.10.0 to 9.11.0 + * eslint-config-iot-app-kit bumped from 9.10.0 to 9.11.0 + +## [9.10.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.9.1...react-components-v9.10.0) (2023-12-07) + + +### Bug Fixes + +* **react-components:** trendcursor hotkey indicates addition state ([c9d34e0](https://github.com/awslabs/iot-app-kit/commit/c9d34e0ef4ba891522336f05718d1808442949e3)) +* updates for performance issues ([8863b9a](https://github.com/awslabs/iot-app-kit/commit/8863b9a80d7a8284aa4732ed25298d165a769ea9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/core bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/core-util bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.9.1 to 9.10.0 + * devDependencies + * @iot-app-kit/core bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/jest-config bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/source-iotsitewise bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/testing-util bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/ts-config bumped from 9.9.1 to 9.10.0 + * eslint-config-iot-app-kit bumped from 9.9.1 to 9.10.0 + +## [9.9.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.9.0...react-components-v9.9.1) (2023-12-06) + + +### Bug Fixes + +* update dependency to not include styles ([e09651e](https://github.com/awslabs/iot-app-kit/commit/e09651e5c065458a269d8d95d1c9c959c5f95ace)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/core bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/core-util bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/source-iottwinmaker bumped from 9.9.0 to 9.9.1 + * devDependencies + * @iot-app-kit/core bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/jest-config bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/source-iotsitewise bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/testing-util bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/ts-config bumped from 9.9.0 to 9.9.1 + * eslint-config-iot-app-kit bumped from 9.9.0 to 9.9.1 + +## [9.9.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.8.0...react-components-v9.9.0) (2023-12-05) + + +### Bug Fixes + +* accessible property filter labels ([30554a1](https://github.com/awslabs/iot-app-kit/commit/30554a1f59f2462b1a5334424866f67ee4507455)) +* fixed property section tooltip gets cut off if property has longer name [#2293](https://github.com/awslabs/iot-app-kit/issues/2293) ([e496e4d](https://github.com/awslabs/iot-app-kit/commit/e496e4d52c566cab3e17e332ef3b587cd9fcc094)) +* panning on chart widget moving [#2294](https://github.com/awslabs/iot-app-kit/issues/2294) ([9cefd9a](https://github.com/awslabs/iot-app-kit/commit/9cefd9a2107465ccde1468f1e0e2a271b0d30381)) +* **react-components:** add echarts extension for handling custom-y-axis ([b481beb](https://github.com/awslabs/iot-app-kit/commit/b481beb1e5a9a014a688d264aa3cb3addc4f51c7)) +* **react-components:** add fallback for property name to id ([a1024d4](https://github.com/awslabs/iot-app-kit/commit/a1024d459fd24d8c7056326706b41ff505eb41ec)) +* **react-components:** mock date in viewport adapter date tests ([06200dd](https://github.com/awslabs/iot-app-kit/commit/06200dda24e5956c6db0a2b4bfe750cdf53c8592)) +* remove line chart tweening animation ([d9e894b](https://github.com/awslabs/iot-app-kit/commit/d9e894b0f651ad24dce87d7f7c4dbe28f43f43e0)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/core bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/core-util bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.8.0 to 9.9.0 + * devDependencies + * @iot-app-kit/core bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/jest-config bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/source-iotsitewise bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/testing-util bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/ts-config bumped from 9.8.0 to 9.9.0 + * eslint-config-iot-app-kit bumped from 9.8.0 to 9.9.0 + +## [9.8.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.7.0...react-components-v9.8.0) (2023-11-25) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/core bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/core-util bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.7.0 to 9.8.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/source-iotsitewise bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/testing-util bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/ts-config bumped from 9.7.0 to 9.8.0 + * eslint-config-iot-app-kit bumped from 9.7.0 to 9.8.0 + +## [9.7.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.6.0...react-components-v9.7.0) (2023-11-21) + + +### Features + +* charts legend resize drag-handle improvements [#2055](https://github.com/awslabs/iot-app-kit/issues/2055) ([9e9db52](https://github.com/awslabs/iot-app-kit/commit/9e9db524cf1b403c9a64c631751ff862349b7ad2)) +* **dashboard:** add model based query support ([b95b60c](https://github.com/awslabs/iot-app-kit/commit/b95b60ccf074069268a8d71071067cfbd8265a20)) +* **dashboard:** gated CSV download button ([645fb1c](https://github.com/awslabs/iot-app-kit/commit/645fb1cc3fdac5e27369a6ee538e0677ab4eb8b3)) +* header design update ([700a913](https://github.com/awslabs/iot-app-kit/commit/700a91366ba57d7f6ca4b2058ee308a7317db9eb)) +* **react-components:** adding significant digits to trendcursors ([ef4c987](https://github.com/awslabs/iot-app-kit/commit/ef4c987f5142a7be0ec22aae49a31397999b45e2)) +* **react-components:** brush zoom ([bddb7e1](https://github.com/awslabs/iot-app-kit/commit/bddb7e1e7b18a2179678fd6bee6a50d0a978d26d)) +* updated the chart legend ux [#1930](https://github.com/awslabs/iot-app-kit/issues/1930) ([68b8618](https://github.com/awslabs/iot-app-kit/commit/68b8618226c5f9ab0c5da64f7ad9210459809232)) + + +### Bug Fixes + +* bugfix for overlapping colors in color palette ([7b4c95b](https://github.com/awslabs/iot-app-kit/commit/7b4c95b45866548f85b10fee3167a35354d73cfb)) +* chart gesture performance ([cdd52c6](https://github.com/awslabs/iot-app-kit/commit/cdd52c627e99f4e712475b90d2869b16a5684038)) +* download button and zoom undo button ([a60a81b](https://github.com/awslabs/iot-app-kit/commit/a60a81b6f6e64b3113b14edcf6efe9fe82ef47f7)) +* immediately change the line chart viewport when updating relative time range ([5ebb2f1](https://github.com/awslabs/iot-app-kit/commit/5ebb2f1597595bf66c63850835e2a64752e4ef9b)) +* immediately change the line chart viewport when updating relative time range ([95b5b7d](https://github.com/awslabs/iot-app-kit/commit/95b5b7d80914a757613c3263f7bf0218acb355b4)) +* **react-components:** adding handling of Yminmax for TC and fixing styling issues ([1581b9f](https://github.com/awslabs/iot-app-kit/commit/1581b9fb7cb77037fa830eaba07155aa253cfa33)) +* **react-components:** echarts grab on canvas update cursor and tooltip ([bfef4e8](https://github.com/awslabs/iot-app-kit/commit/bfef4e878e9a47a9ed1f578767a04b03e6bc8a5e)) +* **react-components:** pagination can move forward on first click from relative range ([fcb04f7](https://github.com/awslabs/iot-app-kit/commit/fcb04f73c3bf3af8a467169a3e9cbd6a6743d462)) +* **react-components:** removing animation for series lines ([b245995](https://github.com/awslabs/iot-app-kit/commit/b245995766c4f2b83bca219e9d8e6f806912cd6c)) +* ungate CSV download feature ([ec11c82](https://github.com/awslabs/iot-app-kit/commit/ec11c82c1b2932a5f7f28d9394f469cac6d68f97)) +* updated the wcag compliance for dashboard resource explorer pane [#2173](https://github.com/awslabs/iot-app-kit/issues/2173) ([26bd618](https://github.com/awslabs/iot-app-kit/commit/26bd6181e4c507360247d6a7cddee7db0ba2c5bd)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/core bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/core-util bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.6.0 to 9.7.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/source-iotsitewise bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/testing-util bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/ts-config bumped from 9.6.0 to 9.7.0 + * eslint-config-iot-app-kit bumped from 9.6.0 to 9.7.0 + +## [9.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.5.0...react-components-v9.6.0) (2023-11-16) + + +### Bug Fixes + +* **video-player:** toggle playback mode and update time range ([a033cb0](https://github.com/awslabs/iot-app-kit/commit/a033cb01824ccff6a63eb4e62d019b691b085a0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/core bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/core-util bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.5.0 to 9.6.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/source-iotsitewise bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/testing-util bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/ts-config bumped from 9.5.0 to 9.6.0 + * eslint-config-iot-app-kit bumped from 9.5.0 to 9.6.0 + +## [9.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.4.0...react-components-v9.5.0) (2023-11-08) + + +### Bug Fixes + +* **react-components:** update viewportAdapter tests for month and minutes ([a269626](https://github.com/awslabs/iot-app-kit/commit/a269626bd3e78a8b5f515b8f3d590848e9f70725)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/core bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/core-util bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.4.0 to 9.5.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/source-iotsitewise bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/testing-util bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/ts-config bumped from 9.4.0 to 9.5.0 + * eslint-config-iot-app-kit bumped from 9.4.0 to 9.5.0 + +## [9.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.3.0...react-components-v9.4.0) (2023-10-26) + + +### Bug Fixes + +* broken tooltip imports ([8a25332](https://github.com/awslabs/iot-app-kit/commit/8a25332379e647911504cd75ff913f6b911a43c4)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/core bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/core-util bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.3.0 to 9.4.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/source-iotsitewise bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/testing-util bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/ts-config bumped from 9.3.0 to 9.4.0 + * eslint-config-iot-app-kit bumped from 9.3.0 to 9.4.0 + +## [9.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.2.0...react-components-v9.3.0) (2023-10-26) + + +### Features + +* charts legend resize drag handle improvements [#2055](https://github.com/awslabs/iot-app-kit/issues/2055) ([0c69b75](https://github.com/awslabs/iot-app-kit/commit/0c69b755e8b1200238dcaac90a44ad07ab222b23)) +* decimal round of in resource table ([a5da972](https://github.com/awslabs/iot-app-kit/commit/a5da9726649ca81a578efd365ba05d0dbe302b55)) +* **react-components:** refactoring echarts ([83e505f](https://github.com/awslabs/iot-app-kit/commit/83e505ffaa9d31fe476be4d7f8029b5ae7c5a3ea)) + + +### Bug Fixes + +* **react-components:** fixing the prod issue of dashboard throwing exception ([7ecd252](https://github.com/awslabs/iot-app-kit/commit/7ecd2526ed5c07f793ec5e97b1d3eb5595e67a7d)) +* **react-components:** hitbox spans entire pagination button ([6a5b2f8](https://github.com/awslabs/iot-app-kit/commit/6a5b2f8eaf237edc4aaae414765f5f186ce09c6a)) +* **react-components:** pagination over time + tooltip ([ff052c9](https://github.com/awslabs/iot-app-kit/commit/ff052c94fa9f57ac8138d025301a384ab217b258)) +* **react-components:** toggle legend hides container ([8d0ae53](https://github.com/awslabs/iot-app-kit/commit/8d0ae53981698bc8121cb0e40831b9d61e693075)) +* **react-component:** updating TC to have a drag area instead of just drag on the line ([05068bd](https://github.com/awslabs/iot-app-kit/commit/05068bddfd3a7ff0876550a11263496765b51080)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/core bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/core-util bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.2.0 to 9.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/source-iotsitewise bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/testing-util bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/ts-config bumped from 9.2.0 to 9.3.0 + * eslint-config-iot-app-kit bumped from 9.2.0 to 9.3.0 + +## [9.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.1.0...react-components-v9.2.0) (2023-10-17) + + +### Bug Fixes + +* **react-components:** echarts grab on canvas update cursor and tooltip ([a29da3a](https://github.com/awslabs/iot-app-kit/commit/a29da3a08a769137610bc37efde5605bf6b62dc2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/core bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/core-util bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.1.0 to 9.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/source-iotsitewise bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/testing-util bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/ts-config bumped from 9.1.0 to 9.2.0 + * eslint-config-iot-app-kit bumped from 9.1.0 to 9.2.0 + +## [9.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.0.0...react-components-v9.1.0) (2023-10-13) + + +### Features + +* **composer:** utils to handle model shader component in entity ([95a4be6](https://github.com/awslabs/iot-app-kit/commit/95a4be668b51d413589b16b7edde67fdd40375d1)) + + +### Bug Fixes + +* **dashboard:** improve widget drag and resize ([fcdc586](https://github.com/awslabs/iot-app-kit/commit/fcdc5862fc558f136d510eaa85e241daa61d9988)) +* **echarts:** improved x+y axis min and max ([38741e2](https://github.com/awslabs/iot-app-kit/commit/38741e245b450c7e547b10305349f9652ae1872f)) +* **react-components:** fixing the xaxis and viewport dependency ([139bcc1](https://github.com/awslabs/iot-app-kit/commit/139bcc15aa219c1906544086ab6bf3d24e4035da)) +* style updates and bugfixes for multi y axis ([e11fd3e](https://github.com/awslabs/iot-app-kit/commit/e11fd3eb6629d75b3b2abdb2ad0466d02e66b8ef)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/core bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/core-util bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.0.0 to 9.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/source-iotsitewise bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/testing-util bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/ts-config bumped from 9.0.0 to 9.1.0 + * eslint-config-iot-app-kit bumped from 9.0.0 to 9.1.0 + +## [9.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.1.1...react-components-v9.0.0) (2023-10-10) + + +### Features + +* updated the chart legend ux(spacing, legend border color, width, tooltip) ([390cbe3](https://github.com/awslabs/iot-app-kit/commit/390cbe3414286bd7cfb1f041a2d21264552e7bd3)) + + +### Bug Fixes + +* line chart progresses in time ([15876a8](https://github.com/awslabs/iot-app-kit/commit/15876a86e4d3790e41f917758618b3f11cc948c7)) + + +### Reverts + +* updated the chart legend ux(spacing, legend border color, width, tooltip) ([6bbe391](https://github.com/awslabs/iot-app-kit/commit/6bbe39103f286ed6f09bd1f4fdd3353dba833e5a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/core bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/core-util bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 8.1.1 to 9.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/source-iotsitewise bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/testing-util bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/ts-config bumped from 8.1.1 to 9.0.0 + * eslint-config-iot-app-kit bumped from 8.1.1 to 9.0.0 + +## [8.1.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.1.0...react-components-v8.1.1) (2023-10-05) + + +### Bug Fixes + +* add eslint rule for hooks ([de7cc0d](https://github.com/awslabs/iot-app-kit/commit/de7cc0d94ffdb79d3cb2ce622dd322e6d8497d61)) +* **dashboard:** chart respects absolute min and max between data and thresholds ([db16712](https://github.com/awslabs/iot-app-kit/commit/db1671225e300a18765d55a8afd1534640d264de)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/core bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/core-util bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/source-iottwinmaker bumped from 8.1.0 to 8.1.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/source-iotsitewise bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/testing-util bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/ts-config bumped from 8.1.0 to 8.1.1 + * eslint-config-iot-app-kit bumped from 8.1.0 to 8.1.1 + +## [8.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.0.2...react-components-v8.1.0) (2023-10-04) + + +### Bug Fixes + +* **video player:** correcting the VideoPlayer export ([18213d7](https://github.com/awslabs/iot-app-kit/commit/18213d7b254355776900c0e6c735ce6a039ac3f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/core bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/core-util bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 8.0.2 to 8.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/source-iotsitewise bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/testing-util bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/ts-config bumped from 8.0.2 to 8.1.0 + * eslint-config-iot-app-kit bumped from 8.0.2 to 8.1.0 + +## [8.0.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.0.1...react-components-v8.0.2) (2023-09-30) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/core bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/core-util bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/source-iottwinmaker bumped from 8.0.1 to 8.0.2 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/source-iotsitewise bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/testing-util bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/ts-config bumped from 8.0.1 to 8.0.2 + * eslint-config-iot-app-kit bumped from 8.0.1 to 8.0.2 + +## [8.0.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.0.0...react-components-v8.0.1) (2023-09-30) + + +### Bug Fixes + +* toggle working linechar ([9ea6117](https://github.com/awslabs/iot-app-kit/commit/9ea61177710b9ece1be169a0c50e1c19fdefb5e6)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/core bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/core-util bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/source-iottwinmaker bumped from 8.0.0 to 8.0.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/source-iotsitewise bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/testing-util bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/ts-config bumped from 8.0.0 to 8.0.1 + * eslint-config-iot-app-kit bumped from 8.0.0 to 8.0.1 + +## [8.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.5.0...react-components-v8.0.0) (2023-09-30) + + +### Features + +* add filtering ability ([51933bc](https://github.com/awslabs/iot-app-kit/commit/51933bc6cc1a76071ae1287ee7f79072c8d4dac7)) +* preferences for pagination in table widget [#1890](https://github.com/awslabs/iot-app-kit/issues/1890) ([8072232](https://github.com/awslabs/iot-app-kit/commit/8072232240a17274556d208fc22d32a811866517)) + + +### Bug Fixes + +* **dashboard:** remove viewport from the dashboard state to use viewport hook ([a9011a8](https://github.com/awslabs/iot-app-kit/commit/a9011a8a22e3bc41076fa6fb64065c016282d012)) +* groupable echarts ([d704292](https://github.com/awslabs/iot-app-kit/commit/d704292964e6434450572154c60863fbdb027dc2)) +* update unit test ([2276584](https://github.com/awslabs/iot-app-kit/commit/2276584325c75b8aa823d24588fb589b18876699)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/core bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/core-util bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.5.0 to 8.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/source-iotsitewise bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/testing-util bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/ts-config bumped from 7.5.0 to 8.0.0 + * eslint-config-iot-app-kit bumped from 7.5.0 to 8.0.0 + +## [7.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.4.0...react-components-v7.5.0) (2023-09-26) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/core bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/core-util bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.4.0 to 7.5.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/source-iotsitewise bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/testing-util bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/ts-config bumped from 7.4.0 to 7.5.0 + * eslint-config-iot-app-kit bumped from 7.4.0 to 7.5.0 + +## [7.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.3.1...react-components-v7.4.0) (2023-09-25) + + +### Features + +* add fixed width and height to the table ([7005009](https://github.com/awslabs/iot-app-kit/commit/7005009b1e325a8f333b281113ce1cf4745b0b19)) +* chart fit and finish - match cloudscape colors for axis and labels [#1929](https://github.com/awslabs/iot-app-kit/issues/1929) ([6fe3424](https://github.com/awslabs/iot-app-kit/commit/6fe3424ec90052d2e63a06a34b874958b9c7bf0c)) +* **dashboard:** new line-scatter-chart ([53768b9](https://github.com/awslabs/iot-app-kit/commit/53768b911a13066b9527c88f0e95a620f0025f7a)) +* **echarts:** allow scroll left and right ([5d2341e](https://github.com/awslabs/iot-app-kit/commit/5d2341e71f531556ac8147e1a0742233992ed82d)) +* **react-components:** adding TrendCursor Sync to dashboard ([d046184](https://github.com/awslabs/iot-app-kit/commit/d046184b836e9cb3670b210eb24c4fd91167b52a)) +* **react-components:** sync echarts viewport ([e04e040](https://github.com/awslabs/iot-app-kit/commit/e04e04079630361047e82d8564678cd4e5857cdd)) +* table widget pagination and sortingdisabled ([b727eae](https://github.com/awslabs/iot-app-kit/commit/b727eae8364f19f2e997fa0c9275e1f0a947f854)) + + +### Bug Fixes + +* **CSS-Loader:** updated sass-loader & fixed style ([aee4abc](https://github.com/awslabs/iot-app-kit/commit/aee4abcd22617cd1b28641711a4be2d1bab4e252)) +* **react-components:** adding debounce to the echarts zoom handler ([b983385](https://github.com/awslabs/iot-app-kit/commit/b98338508da223bab1a99c28641276ff02c537b5)) +* **react-components:** echarts resize drag fix ([19ccc7e](https://github.com/awslabs/iot-app-kit/commit/19ccc7ee4569aea891b43883a8ba1dedf3ac4fc9)) +* **react-components:** fix TC behaviour when there is a change in query ([50edcc1](https://github.com/awslabs/iot-app-kit/commit/50edcc1b2131c03c9e30621407a3d3d201825a90)) +* **react-components:** fixing TCs on data zoom ([379525c](https://github.com/awslabs/iot-app-kit/commit/379525cd1246061398ff8a113963b968466ae11a)) +* **react-components:** fixing the duplicate yAxis values ([60073ef](https://github.com/awslabs/iot-app-kit/commit/60073ef7ea4e1167218c8cdecd021bc677d5cc66)) +* **react-components:** fixing the viewport and some styling elements ([7d3526e](https://github.com/awslabs/iot-app-kit/commit/7d3526e34c86b55632a4d5aa0c7029fd1499a48b)) +* **react-components:** need stop propagation in start and end of resize event ([30e9901](https://github.com/awslabs/iot-app-kit/commit/30e99010bc57e48040ddcac8c41546e745a5a3f9)) +* **react-components:** updating echarts ux ([ddfc9c8](https://github.com/awslabs/iot-app-kit/commit/ddfc9c8cc15f32a8c307653daf5d2159918e58b2)) +* **react-components:** updating echarts with the fixes founf during bug bash ([9f32c21](https://github.com/awslabs/iot-app-kit/commit/9f32c21ae53d99ddac718caa520d9e852a25f499)) +* x-axis toggle will toggle both x and y axis [#1925](https://github.com/awslabs/iot-app-kit/issues/1925) ([58b0dbb](https://github.com/awslabs/iot-app-kit/commit/58b0dbbc72a9dbfd13648a454ea36ac570efd0eb)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/core bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/core-util bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.3.1 to 7.4.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/source-iotsitewise bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/testing-util bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/ts-config bumped from 7.3.1 to 7.4.0 + * eslint-config-iot-app-kit bumped from 7.3.1 to 7.4.0 + +## [7.3.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.3.0...react-components-v7.3.1) (2023-08-24) + + +### Bug Fixes + +* **react-component:** updating the calculateTimeStamp method to use ([e0e1f42](https://github.com/awslabs/iot-app-kit/commit/e0e1f428f012b157938eced89efcd30101f2d7f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/core bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/core-util bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/source-iottwinmaker bumped from 7.3.0 to 7.3.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/source-iotsitewise bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/testing-util bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/ts-config bumped from 7.3.0 to 7.3.1 + * eslint-config-iot-app-kit bumped from 7.3.0 to 7.3.1 + +## [7.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.2.1...react-components-v7.3.0) (2023-08-23) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/core bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/core-util bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.2.1 to 7.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/source-iotsitewise bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/testing-util bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/ts-config bumped from 7.2.1 to 7.3.0 + * eslint-config-iot-app-kit bumped from 7.2.1 to 7.3.0 + +## [7.2.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.2.0...react-components-v7.2.1) (2023-08-18) + + +### Bug Fixes + +* **react-components:** the dependencies were added to dashboard instead of react-components ([8b2f12f](https://github.com/awslabs/iot-app-kit/commit/8b2f12fb67a1705ffdb722e02cf8c1ff1ae2ed97)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/core bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/core-util bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/source-iottwinmaker bumped from 7.2.0 to 7.2.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/source-iotsitewise bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/testing-util bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/ts-config bumped from 7.2.0 to 7.2.1 + * eslint-config-iot-app-kit bumped from 7.2.0 to 7.2.1 + +## [7.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.1.0...react-components-v7.2.0) (2023-08-17) + + +### Features + +* **dashboard:** add advanced search using knowledge graph to query editor ([8722b33](https://github.com/awslabs/iot-app-kit/commit/8722b338a919d6fb51b21a861cf7e96e44246dbd)) +* **echarts:** threshold support ([2d7ccfe](https://github.com/awslabs/iot-app-kit/commit/2d7ccfe6695070126b60f352733ef1512c966984)) +* **react-component:** adding config service to toggle echarts ([96d0351](https://github.com/awslabs/iot-app-kit/commit/96d0351b7e20a728154d3ebfed0efd5205b841bd)) +* **react-component:** adding context menu per chart ([a368eb9](https://github.com/awslabs/iot-app-kit/commit/a368eb99b230f2a5a8bb39d7c0bc52e42ae9f5ad)) +* **react-component:** adding sorting ability for the chart legends ([ca330eb](https://github.com/awslabs/iot-app-kit/commit/ca330eb711923a32531871b714c2252fe31850ae)) +* **react-component:** adding trendcursor sync component ([52d6033](https://github.com/awslabs/iot-app-kit/commit/52d6033337937c5b7b1774d5a5b04907e126df60)) +* **react-components:** add a sitewise connected chart story ([b66de3b](https://github.com/awslabs/iot-app-kit/commit/b66de3b4d87ac2a3157c6cae176a216dff1ceb92)) +* **react-components:** add multiple y axis legend ([79023c0](https://github.com/awslabs/iot-app-kit/commit/79023c025e09e3ad485c84ad1d54b0ed2e0e0589)) +* **react-components:** supporting live mode in echarts ([cdf1caa](https://github.com/awslabs/iot-app-kit/commit/cdf1caab9399cc770c91c3fd40ffde23e7795ab5)) + + +### Bug Fixes + +* **3DKG:** fix height flexibility for KG component ([f9943ce](https://github.com/awslabs/iot-app-kit/commit/f9943cee4741da7b5fc2f11f67a429424c2d88b7)) +* **react-component:** removing the dependency of the yMin and Ymax and ([9360fe4](https://github.com/awslabs/iot-app-kit/commit/9360fe42e081263ccd1896f47fb5d8a7ba6b1d0f)) +* **react-component:** removing transition animation for trend cursors ([5e84d15](https://github.com/awslabs/iot-app-kit/commit/5e84d15fcecb7ee0e1f242fd0f1ce47960818696)) +* **react-components:** add memoization for chart reactivity and refactor echarts hook ([128f5b0](https://github.com/awslabs/iot-app-kit/commit/128f5b0c2f8a1c164241ef216d5d489d9d69164c)) +* **react-component:** updating the sytling and adding some visual ques for the trend cursors ([dc50a2c](https://github.com/awslabs/iot-app-kit/commit/dc50a2c8c04167f1137deec350d735847d6d233a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/core bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/core-util bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.1.0 to 7.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/source-iotsitewise bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/testing-util bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/ts-config bumped from 7.1.0 to 7.2.0 + * eslint-config-iot-app-kit bumped from 7.1.0 to 7.2.0 + +## [7.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.0.0...react-components-v7.1.0) (2023-07-28) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/core bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/core-util bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.0.0 to 7.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/source-iotsitewise bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/testing-util bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/ts-config bumped from 7.0.0 to 7.1.0 + * eslint-config-iot-app-kit bumped from 7.0.0 to 7.1.0 + +## [7.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.3.1...react-components-v7.0.0) (2023-07-25) + + +### Features + +* **react-component:** adding drag and delete to TC ([7c6a017](https://github.com/awslabs/iot-app-kit/commit/7c6a017eaad9fe4c2f6881adb7e807f4b154f93c)) +* **react-component:** adding resizability for Charts components ([3ae7f56](https://github.com/awslabs/iot-app-kit/commit/3ae7f568a30947782c2d29ecf72eacf3df31d18b)) +* **react-component:** adding TC markers ([4105adb](https://github.com/awslabs/iot-app-kit/commit/4105adb218fbf05b6145348d660fc24b2cec0b66)) +* **react-component:** adding the inital implementation of the trend cursors ([ce37fe2](https://github.com/awslabs/iot-app-kit/commit/ce37fe21a36f13fe1438c0653eb47992d774b15e)) +* **react-components:** add menu component ([cdd196e](https://github.com/awslabs/iot-app-kit/commit/cdd196ebcf42b5ddbdc34005fe4b54ae24767609)) +* **react-components:** add time selection component to react components ([e99f301](https://github.com/awslabs/iot-app-kit/commit/e99f3011a063c861cc22264687a9f3d5d9d56841)) +* **react-components:** adding resizing to trend cursors ([400189a](https://github.com/awslabs/iot-app-kit/commit/400189a221f16123ce193222eacd2583ea25360a)) +* **react-components:** feature flag context ([d313682](https://github.com/awslabs/iot-app-kit/commit/d31368282b9f5882c6f6cef0a66c2c085ee56aff)) +* **Vite:** migrate example app to vite ([d2e65be](https://github.com/awslabs/iot-app-kit/commit/d2e65bed32dc3c470b52d418dacb61610c16ab5a)) + + +### Bug Fixes + +* **react-components:** ensure provider is unsubscribed correctly ([2db74d2](https://github.com/awslabs/iot-app-kit/commit/2db74d2d51f1104478540528cb4be982c4afc351)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/core bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/core-util bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.3.1 to 7.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/source-iotsitewise bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/testing-util bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/ts-config bumped from 6.3.1 to 7.0.0 + * eslint-config-iot-app-kit bumped from 6.3.1 to 7.0.0 + +## [6.3.1](https://github.com/awslabs/iot-app-kit/compare/root-v6.3.0...root-v6.3.1) (2023-06-28) + +## Fix +* **Emergency revert** + +## [6.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.2.0...react-components-v6.3.0) (2023-06-23) + + +### Features + +* **react-components:** add significant digits configuration for charts ([41cba0e](https://github.com/awslabs/iot-app-kit/commit/41cba0e655ac944889d6f15db56282a30e53997e)) +* **react-components:** base echarts ([bc6ee62](https://github.com/awslabs/iot-app-kit/commit/bc6ee6250417a7d71f6aaf0692f1a02d4059b8f6)) + + +### Bug Fixes + +* **dashboard:** fixed the flash of graphs on change in query(s) ([45edc69](https://github.com/awslabs/iot-app-kit/commit/45edc69ae67796ce9566c491a8f39921029ad0a0)) +* **KG Component:** ux review changes ([9133094](https://github.com/awslabs/iot-app-kit/commit/9133094b7352676277e951dda2c92cb0db566488)) +* **knowledge-graph:** fix node to node selection and layout adjustment ([98df518](https://github.com/awslabs/iot-app-kit/commit/98df518f25cc3a15254917520a1750d013fc2984)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/core bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/core-util bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.2.0 to 6.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/source-iotsitewise bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/testing-util bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/ts-config bumped from 6.2.0 to 6.3.0 + * eslint-config-iot-app-kit bumped from 6.2.0 to 6.3.0 + +## [6.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.1.0...react-components-v6.2.0) (2023-06-07) + + +### Features + +* **Knowledge Graph:** adding clear and render graph results events ([5479a51](https://github.com/awslabs/iot-app-kit/commit/5479a51b85574d4c751c8e0aba40fa54e76d7504)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/core bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/core-util bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.1.0 to 6.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/source-iotsitewise bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/testing-util bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/ts-config bumped from 6.1.0 to 6.2.0 + * eslint-config-iot-app-kit bumped from 6.1.0 to 6.2.0 + +## [6.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.0.0...react-components-v6.1.0) (2023-06-06) + + +### Features + +* **KG Component:** event modeling ([b918237](https://github.com/awslabs/iot-app-kit/commit/b918237e82738cf1dbc61f95c303881b65166abb)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/core bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/core-util bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.0.0 to 6.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/source-iotsitewise bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/testing-util bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/ts-config bumped from 6.0.0 to 6.1.0 + * eslint-config-iot-app-kit bumped from 6.0.0 to 6.1.0 + +## [6.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.9.0...react-components-v6.0.0) (2023-06-05) + + +### ⚠ BREAKING CHANGES + +* aggregation and resolution picker + +### Features + +* aggregation and resolution picker ([77a53fe](https://github.com/awslabs/iot-app-kit/commit/77a53feffdb1956707dca5d45f43a1f7ea0c5453)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/core bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/core-util bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.9.0 to 6.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/source-iotsitewise bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/testing-util bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/ts-config bumped from 5.9.0 to 6.0.0 + * eslint-config-iot-app-kit bumped from 5.9.0 to 6.0.0 + +## [5.9.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.8.1...react-components-v5.9.0) (2023-06-01) + + +### Features + +* **Knowledge Graph:** adding KG parent component, search and explore logic ([95cc307](https://github.com/awslabs/iot-app-kit/commit/95cc307d6fcf2592d376830283069ddce463d0cf)) + + +### Bug Fixes + +* graph css not distributed correctly ([d7b2717](https://github.com/awslabs/iot-app-kit/commit/d7b2717647507533bfeda81774c44a3c5727e15c)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/core bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/core-util bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.8.1 to 5.9.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/source-iotsitewise bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/testing-util bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/ts-config bumped from 5.8.1 to 5.9.0 + * eslint-config-iot-app-kit bumped from 5.8.1 to 5.9.0 + +## [5.8.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.8.0...react-components-v5.8.1) (2023-05-19) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/core bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/core-util bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/source-iottwinmaker bumped from 5.8.0 to 5.8.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/source-iotsitewise bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/testing-util bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/ts-config bumped from 5.8.0 to 5.8.1 + * eslint-config-iot-app-kit bumped from 5.8.0 to 5.8.1 + +## [5.8.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.7.0...react-components-v5.8.0) (2023-05-18) + + +### Features + +* **GraphVisualization:** graph data visualizer ([13e004a](https://github.com/awslabs/iot-app-kit/commit/13e004a3c9256cc20af1e49dd52737b17ae7078b)) +* **SkinVisualization:** enable default style for visualization and allow overrides ([6240195](https://github.com/awslabs/iot-app-kit/commit/624019522a940bc9cf5c69253156db871576302d)) + + +### Bug Fixes + +* **scene composer:** refactoring video player to work with react 18 updates ([c177802](https://github.com/awslabs/iot-app-kit/commit/c1778025babf75d89d74c1b355f54e46f2e740be)) +* **video-player:** video seek percent calculation ([828e4f1](https://github.com/awslabs/iot-app-kit/commit/828e4f18dfe5f25ddd6f045f921f24ffba35535c)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/core bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/core-util bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.7.0 to 5.8.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/source-iotsitewise bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/testing-util bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/ts-config bumped from 5.7.0 to 5.8.0 + * eslint-config-iot-app-kit bumped from 5.7.0 to 5.8.0 + +## [5.7.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.6.0...react-components-v5.7.0) (2023-05-02) + + +### Bug Fixes + +* no flash of error, remove ghosting ([5a2723b](https://github.com/awslabs/iot-app-kit/commit/5a2723ba9cb78d3b4fbd6ed64e9c1558d6a01c98)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/core bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/core-util bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.6.0 to 5.7.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/source-iotsitewise bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/testing-util bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/ts-config bumped from 5.6.0 to 5.7.0 + * eslint-config-iot-app-kit bumped from 5.6.0 to 5.7.0 + +## [5.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.5.2...react-components-v5.6.0) (2023-04-20) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/core bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/core-util bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.5.2 to 5.6.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/source-iotsitewise bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/testing-util bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/ts-config bumped from 5.5.2 to 5.6.0 + * eslint-config-iot-app-kit bumped from 5.5.2 to 5.6.0 + +## [5.5.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.5.1...react-components-v5.5.2) (2023-04-19) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/core bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/core-util bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/source-iottwinmaker bumped from 5.5.1 to 5.5.2 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/source-iotsitewise bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/testing-util bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/ts-config bumped from 5.5.1 to 5.5.2 + * eslint-config-iot-app-kit bumped from 5.5.1 to 5.5.2 + +## [5.5.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.5.0...react-components-v5.5.1) (2023-04-14) + + +### Bug Fixes + +* **react-components:** useTimeSeriesData hook works when number of queries changes ([feb6076](https://github.com/awslabs/iot-app-kit/commit/feb607642299fb90fb9f70f8cd4b76007bd5791e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/core bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/core-util bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/source-iottwinmaker bumped from 5.5.0 to 5.5.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/source-iotsitewise bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/testing-util bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/ts-config bumped from 5.5.0 to 5.5.1 + * eslint-config-iot-app-kit bumped from 5.5.0 to 5.5.1 + +## [5.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.4.0...react-components-v5.5.0) (2023-04-13) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/core bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/core-util bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.4.0 to 5.5.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/source-iotsitewise bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/testing-util bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/ts-config bumped from 5.4.0 to 5.5.0 + * eslint-config-iot-app-kit bumped from 5.4.0 to 5.5.0 + +## [5.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.3.0...react-components-v5.4.0) (2023-04-12) + + +### Bug Fixes + +* **dashboard:** fix tooltip positioning ([cc82474](https://github.com/awslabs/iot-app-kit/commit/cc824747e85a56c35c590020dd185d576f45ee6f)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/core bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/core-util bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.3.0 to 5.4.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/source-iotsitewise bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/testing-util bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/ts-config bumped from 5.3.0 to 5.4.0 + * eslint-config-iot-app-kit bumped from 5.3.0 to 5.4.0 + +## [5.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.2.0...react-components-v5.3.0) (2023-04-12) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/core bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/core-util bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.2.0 to 5.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/source-iotsitewise bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/testing-util bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/ts-config bumped from 5.2.0 to 5.3.0 + * eslint-config-iot-app-kit bumped from 5.2.0 to 5.3.0 + +## [5.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.1.1...react-components-v5.2.0) (2023-04-05) + + +### Bug Fixes + +* **react-components:** add core-util as a dependency ([5c4d420](https://github.com/awslabs/iot-app-kit/commit/5c4d4209d364640aebb78134fc08bc32707795f0)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/core bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/core-util bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.1.1 to 5.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/source-iotsitewise bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/testing-util bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/ts-config bumped from 5.1.1 to 5.2.0 + * eslint-config-iot-app-kit bumped from 5.1.1 to 5.2.0 + +## [5.1.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.1.0...react-components-v5.1.1) (2023-04-03) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/core bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/source-iottwinmaker bumped from 5.1.0 to 5.1.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/source-iotsitewise bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/testing-util bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/ts-config bumped from 5.1.0 to 5.1.1 + * eslint-config-iot-app-kit bumped from 5.1.0 to 5.1.1 + +## [5.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.0.0...react-components-v5.1.0) (2023-04-03) + + +### Features + +* **charts:** add legend to charts ([0abfcf6](https://github.com/awslabs/iot-app-kit/commit/0abfcf6c5a325ee24290d5ac990703e24f6db3f0)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/core bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.0.0 to 5.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/source-iotsitewise bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/testing-util bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/ts-config bumped from 5.0.0 to 5.1.0 + * eslint-config-iot-app-kit bumped from 5.0.0 to 5.1.0 + +## [5.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.3...react-components-v5.0.0) (2023-03-31) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([64e64b8](https://github.com/awslabs/iot-app-kit/commit/64e64b800ad3b6ddbee78cfe84c3750e73dead65)) +* **all:** release 4.0.3 ([2b933ba](https://github.com/awslabs/iot-app-kit/commit/2b933ba31e60666323df7bfae0e962698636a4bf)) +* **all:** release version 4.0.2 ([72ca893](https://github.com/awslabs/iot-app-kit/commit/72ca8930db4de95e56381c7f79c9d934230c2283)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([4f17201](https://github.com/awslabs/iot-app-kit/commit/4f17201f5990876b67861f091dbdcdb5345a28c2)) +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([16451b1](https://github.com/awslabs/iot-app-kit/commit/16451b12e0fe2662069275185b2fea61048d3fab)) +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **dashboard:** assign default color based on cloudscape design ([5855096](https://github.com/awslabs/iot-app-kit/commit/58550960ce402c6e18ee25ffee87945a6aeb4f77)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **EnvironmentModel:** Adding support for environment overlay ([#262](https://github.com/awslabs/iot-app-kit/issues/262)) ([0277027](https://github.com/awslabs/iot-app-kit/commit/0277027d59f232c2c8e29fac0bc53399a1eb9c1e)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([f4239cf](https://github.com/awslabs/iot-app-kit/commit/f4239cf1ca201044095004a2e6c358f3a4c90ebc)) +* Introduce alarms ([#135](https://github.com/awslabs/iot-app-kit/issues/135)) ([5c19b99](https://github.com/awslabs/iot-app-kit/commit/5c19b9957c05fbc8df15545ae9847d39030b686b)) +* **props:** adapt props for synchro-charts ([#133](https://github.com/awslabs/iot-app-kit/issues/133)) ([a98bf06](https://github.com/awslabs/iot-app-kit/commit/a98bf064f14979823f51437dbd599259b6bd6d78)) +* **react-comp:** isThresholdBreached checks all comparison ops ([de3fe49](https://github.com/awslabs/iot-app-kit/commit/de3fe495b764d45dd9c364b93f2e5898d2cb661e)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) +* **react-comp:** sync viewports using @iot-app-kit/charts pckg ([08c7eda](https://github.com/awslabs/iot-app-kit/commit/08c7eda38c600120aebe228285c5c1dc311ab8af)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) +* **TwinMaker:** Add TwinMaker packages ([#252](https://github.com/awslabs/iot-app-kit/issues/252)) ([fabbe03](https://github.com/awslabs/iot-app-kit/commit/fabbe0399dd37293e99588124404c37c929f4330)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **charts:** fix live mode viewport scrollingbug ([dbea3ff](https://github.com/awslabs/iot-app-kit/commit/dbea3ff3f1908a6a48b1ca9ee5c654f9b55eb616)) +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **dashboard:** update props passed to kpi and status components based on new api ([e2023c9](https://github.com/awslabs/iot-app-kit/commit/e2023c92ecfea6cac947f5c5f795001395ad2bd4)) +* **react-components, videoPlayer:** fix propertiesNotChanged for videoPlayer ([11665c0](https://github.com/awslabs/iot-app-kit/commit/11665c0af13e98dc6602d8bf8aac7733d063633c)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) +* **ReactComponents:** configure table, kpi and status to always fetch raw data ([c02b566](https://github.com/awslabs/iot-app-kit/commit/c02b566cad9aa2b8e700765f7923df2d4a6fbec4)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) +* **UITests:** fix dashbaord e2e tests ([dd98c0e](https://github.com/awslabs/iot-app-kit/commit/dd98c0ea9ccd6a7dacc9ee5f994ccce7007f0b21)) +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/core bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.3 to 5.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/source-iotsitewise bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/testing-util bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/ts-config bumped from 4.0.3 to 5.0.0 + * eslint-config-iot-app-kit bumped from 4.0.3 to 5.0.0 + +## [4.0.3](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.2...react-components-v4.0.3) (2023-03-31) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([64e64b8](https://github.com/awslabs/iot-app-kit/commit/64e64b800ad3b6ddbee78cfe84c3750e73dead65)) +* **all:** release version 4.0.2 ([72ca893](https://github.com/awslabs/iot-app-kit/commit/72ca8930db4de95e56381c7f79c9d934230c2283)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([4f17201](https://github.com/awslabs/iot-app-kit/commit/4f17201f5990876b67861f091dbdcdb5345a28c2)) +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([16451b1](https://github.com/awslabs/iot-app-kit/commit/16451b12e0fe2662069275185b2fea61048d3fab)) +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **dashboard:** assign default color based on cloudscape design ([5855096](https://github.com/awslabs/iot-app-kit/commit/58550960ce402c6e18ee25ffee87945a6aeb4f77)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **EnvironmentModel:** Adding support for environment overlay ([#262](https://github.com/awslabs/iot-app-kit/issues/262)) ([0277027](https://github.com/awslabs/iot-app-kit/commit/0277027d59f232c2c8e29fac0bc53399a1eb9c1e)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([f4239cf](https://github.com/awslabs/iot-app-kit/commit/f4239cf1ca201044095004a2e6c358f3a4c90ebc)) +* Introduce alarms ([#135](https://github.com/awslabs/iot-app-kit/issues/135)) ([5c19b99](https://github.com/awslabs/iot-app-kit/commit/5c19b9957c05fbc8df15545ae9847d39030b686b)) +* **props:** adapt props for synchro-charts ([#133](https://github.com/awslabs/iot-app-kit/issues/133)) ([a98bf06](https://github.com/awslabs/iot-app-kit/commit/a98bf064f14979823f51437dbd599259b6bd6d78)) +* **react-comp:** isThresholdBreached checks all comparison ops ([de3fe49](https://github.com/awslabs/iot-app-kit/commit/de3fe495b764d45dd9c364b93f2e5898d2cb661e)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) +* **react-comp:** sync viewports using @iot-app-kit/charts pckg ([08c7eda](https://github.com/awslabs/iot-app-kit/commit/08c7eda38c600120aebe228285c5c1dc311ab8af)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) +* **TwinMaker:** Add TwinMaker packages ([#252](https://github.com/awslabs/iot-app-kit/issues/252)) ([fabbe03](https://github.com/awslabs/iot-app-kit/commit/fabbe0399dd37293e99588124404c37c929f4330)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **charts:** fix live mode viewport scrollingbug ([dbea3ff](https://github.com/awslabs/iot-app-kit/commit/dbea3ff3f1908a6a48b1ca9ee5c654f9b55eb616)) +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **dashboard:** update props passed to kpi and status components based on new api ([e2023c9](https://github.com/awslabs/iot-app-kit/commit/e2023c92ecfea6cac947f5c5f795001395ad2bd4)) +* **react-components, videoPlayer:** fix propertiesNotChanged for videoPlayer ([11665c0](https://github.com/awslabs/iot-app-kit/commit/11665c0af13e98dc6602d8bf8aac7733d063633c)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) +* **ReactComponents:** configure table, kpi and status to always fetch raw data ([c02b566](https://github.com/awslabs/iot-app-kit/commit/c02b566cad9aa2b8e700765f7923df2d4a6fbec4)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) +* **UITests:** fix dashbaord e2e tests ([dd98c0e](https://github.com/awslabs/iot-app-kit/commit/dd98c0ea9ccd6a7dacc9ee5f994ccce7007f0b21)) +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/core bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.2 to 4.0.3 + * devDependencies + * @iot-app-kit/jest-config bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/source-iotsitewise bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/testing-util bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/ts-config bumped from 4.0.2 to 4.0.3 + * eslint-config-iot-app-kit bumped from 4.0.2 to 4.0.3 + +## [4.0.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.1...react-components-v4.0.2) (2023-03-30) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([64e64b8](https://github.com/awslabs/iot-app-kit/commit/64e64b800ad3b6ddbee78cfe84c3750e73dead65)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([4f17201](https://github.com/awslabs/iot-app-kit/commit/4f17201f5990876b67861f091dbdcdb5345a28c2)) +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([16451b1](https://github.com/awslabs/iot-app-kit/commit/16451b12e0fe2662069275185b2fea61048d3fab)) +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **dashboard:** assign default color based on cloudscape design ([5855096](https://github.com/awslabs/iot-app-kit/commit/58550960ce402c6e18ee25ffee87945a6aeb4f77)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **EnvironmentModel:** Adding support for environment overlay ([#262](https://github.com/awslabs/iot-app-kit/issues/262)) ([0277027](https://github.com/awslabs/iot-app-kit/commit/0277027d59f232c2c8e29fac0bc53399a1eb9c1e)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([f4239cf](https://github.com/awslabs/iot-app-kit/commit/f4239cf1ca201044095004a2e6c358f3a4c90ebc)) +* Introduce alarms ([#135](https://github.com/awslabs/iot-app-kit/issues/135)) ([5c19b99](https://github.com/awslabs/iot-app-kit/commit/5c19b9957c05fbc8df15545ae9847d39030b686b)) +* **props:** adapt props for synchro-charts ([#133](https://github.com/awslabs/iot-app-kit/issues/133)) ([a98bf06](https://github.com/awslabs/iot-app-kit/commit/a98bf064f14979823f51437dbd599259b6bd6d78)) +* **react-comp:** isThresholdBreached checks all comparison ops ([de3fe49](https://github.com/awslabs/iot-app-kit/commit/de3fe495b764d45dd9c364b93f2e5898d2cb661e)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) +* **react-comp:** sync viewports using @iot-app-kit/charts pckg ([08c7eda](https://github.com/awslabs/iot-app-kit/commit/08c7eda38c600120aebe228285c5c1dc311ab8af)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) +* **TwinMaker:** Add TwinMaker packages ([#252](https://github.com/awslabs/iot-app-kit/issues/252)) ([fabbe03](https://github.com/awslabs/iot-app-kit/commit/fabbe0399dd37293e99588124404c37c929f4330)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **charts:** fix live mode viewport scrollingbug ([dbea3ff](https://github.com/awslabs/iot-app-kit/commit/dbea3ff3f1908a6a48b1ca9ee5c654f9b55eb616)) +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **dashboard:** update props passed to kpi and status components based on new api ([e2023c9](https://github.com/awslabs/iot-app-kit/commit/e2023c92ecfea6cac947f5c5f795001395ad2bd4)) +* **react-components, videoPlayer:** fix propertiesNotChanged for videoPlayer ([11665c0](https://github.com/awslabs/iot-app-kit/commit/11665c0af13e98dc6602d8bf8aac7733d063633c)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) +* **ReactComponents:** configure table, kpi and status to always fetch raw data ([c02b566](https://github.com/awslabs/iot-app-kit/commit/c02b566cad9aa2b8e700765f7923df2d4a6fbec4)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) +* **UITests:** fix dashbaord e2e tests ([dd98c0e](https://github.com/awslabs/iot-app-kit/commit/dd98c0ea9ccd6a7dacc9ee5f994ccce7007f0b21)) +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.1 to 4.0.2 + * @iot-app-kit/core bumped from 4.0.1 to 4.0.2 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.1 to 4.0.2 + * devDependencies + * @iot-app-kit/jest-config bumped from * to 4.0.2 + * @iot-app-kit/source-iotsitewise bumped from 4.0.1 to 4.0.2 + * @iot-app-kit/testing-util bumped from * to 4.0.2 + * @iot-app-kit/ts-config bumped from * to 4.0.2 + * eslint-config-iot-app-kit bumped from * to 4.0.2 + +## [4.0.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.0...react-components-v4.0.1) (2023-03-28) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations + +### Features + +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.0 to 4.0.1 + * @iot-app-kit/core bumped from 4.0.0 to 4.0.1 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.0 to 4.0.1 + * devDependencies + * @iot-app-kit/source-iotsitewise bumped from ^4.0.0 to ^4.0.1 + +## [4.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v3.0.0...react-components-v4.0.0) (2023-03-15) + + +### ⚠ BREAKING CHANGES + +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper + +### Features + +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) + + +### Bug Fixes + +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 3.0.0 to 4.0.0 + * @iot-app-kit/core bumped from 3.0.0 to 4.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 3.0.0 to 4.0.0 + * devDependencies + * @iot-app-kit/source-iotsitewise bumped from ^3.0.0 to ^4.0.0 + +## [3.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.5...react-components-v3.0.0) (2023-03-04) + + +### ⚠ BREAKING CHANGES + +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) + + +### Bug Fixes + +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from * to 3.0.0 + * @iot-app-kit/core bumped from * to 3.0.0 + * @iot-app-kit/source-iottwinmaker bumped from * to 3.0.0 + +## [2.6.5](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.4...react-components-v2.6.5) (2023-01-25) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.4 to ^2.6.5 + * @iot-app-kit/components bumped from ^2.6.4 to ^2.6.5 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.4 to ^2.6.5 + +## [2.6.4](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.3...react-components-v2.6.4) (2023-01-23) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.3 to ^2.6.4 + * @iot-app-kit/components bumped from ^2.6.3 to ^2.6.4 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.3 to ^2.6.4 + +## [2.6.3](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.2...react-components-v2.6.3) (2023-01-13) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.2 to ^2.6.3 + * @iot-app-kit/components bumped from ^2.6.2 to ^2.6.3 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.2 to ^2.6.3 + +## [2.6.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.1...react-components-v2.6.2) (2023-01-09) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.1 to ^2.6.2 + * @iot-app-kit/components bumped from ^2.6.1 to ^2.6.2 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.1 to ^2.6.2 + +## [2.6.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.0...react-components-v2.6.1) (2023-01-09) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.0 to ^2.6.1 + * @iot-app-kit/components bumped from ^2.6.0 to ^2.6.1 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.0 to ^2.6.1 + +## [2.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.5.1...react-components-v2.6.0) (2022-12-19) + + +### Bug Fixes + +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.5.1 to ^2.6.0 + * @iot-app-kit/components bumped from ^2.5.1 to ^2.6.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.5.1 to ^2.6.0 + +## [2.5.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.5.0...react-components-v2.5.1) (2022-11-16) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.5.0 to ^2.5.1 + * @iot-app-kit/components bumped from ^2.5.0 to ^2.5.1 + * @iot-app-kit/source-iottwinmaker bumped from ^2.5.0 to ^2.5.1 + +## [2.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.4.2...react-components-v2.5.0) (2022-11-11) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.4.2 to ^2.5.0 + * @iot-app-kit/components bumped from ^2.4.2 to ^2.5.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.4.2 to ^2.5.0 + +## [2.4.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.4.1...react-components-v2.4.2) (2022-11-08) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.4.1 to ^2.4.2 + * @iot-app-kit/components bumped from ^2.4.1 to ^2.4.2 + * @iot-app-kit/source-iottwinmaker bumped from ^2.4.1 to ^2.4.2 + +## [2.4.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.4.0...react-components-v2.4.1) (2022-11-07) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.4.0 to ^2.4.1 + * @iot-app-kit/components bumped from ^2.4.0 to ^2.4.1 + * @iot-app-kit/source-iottwinmaker bumped from ^2.4.0 to ^2.4.1 + +## [2.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.3.0...react-components-v2.4.0) (2022-11-04) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.3.0 to ^2.4.0 + * @iot-app-kit/components bumped from ^2.3.0 to ^2.4.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.3.0 to ^2.4.0 + +## [2.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.2.0...react-components-v2.3.0) (2022-11-02) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.2.0 to ^2.3.0 + * @iot-app-kit/components bumped from ^2.2.0 to ^2.3.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.2.0 to ^2.3.0 + +## 2.2.0 (2022-10-21) + +### Features + +* source-iotsitewise, core, components: + * Introduce alarms support ([9bc221e](https://github.com/awslabs/iot-app-kit/commit/9bc221ef19fc5a9db4360c1d124f41e7b0d896be)) + +* react-components, scene-composer: + * EnvironmentModelComponent for Adding support for environment overlay ([eb91179](https://github.com/awslabs/iot-app-kit/commit/eb911799e555c07c535853661e93237969159ff0)) + +* core, components: + * Support viewport grouping in iot-table ([be5b588](https://github.com/awslabs/iot-app-kit/commit/be5b588a90ec267a2c8cdce24bdea86b45c97136)) + +* scene-composer: + * Removes the dependency on the feature flag for the top bar camera drowpdown ([fb8e333](https://github.com/awslabs/iot-app-kit/commit/fb8e3330cc4f4933ccd6f9cde32b1d4694897358)) + * Add flag to resizable tags ([560e1b1](https://github.com/awslabs/iot-app-kit/commit/560e1b1a2db0f60700b7246626c71f1bc05f49e1)) + +### Bug Fixes + +* scene-composer: + * Camera Component Editor for Lens and Clipping planes updates when changing between cameras ([94c5978](https://github.com/awslabs/iot-app-kit/commit/94c59786aae02a4c9fd088cfc6c9cea516880f3c)) + * improve ViewCursorWidget performance ([58b70bd](https://github.com/awslabs/iot-app-kit/commit/58b70bdc82cd1e4bbcc0c0e7f66bfef3f064e86b)) + * Allows user to hit Esc key to cancel Enhanced Editing ([9c1b9e6](https://github.com/awslabs/iot-app-kit/commit/9c1b9e64c725671adb0766d1c080297389385fd8)) + * selectedDataBinding not able to update selected node ([b23bce2](https://github.com/awslabs/iot-app-kit/commit/b23bce279b81496583c052a0dc69ac9be5994643)) + * use arrow data as texture to avoid public path issue ([0d2e427](https://github.com/awslabs/iot-app-kit/commit/0d2e427354cbd3c0678d579ceaffab84e5e88e5c)) + * fix show svg ([cb6094e](https://github.com/awslabs/iot-app-kit/commit/cb6094e724465ccc11d9f7ae7f7fe3179d4d2596)) + * fix adding tag always attached to root ([775446a](https://github.com/awslabs/iot-app-kit/commit/775446a210877780c2a220092e6b0210edc7ea2c)) + * Fix the tag scaling with parent scale regression ([4483140](https://github.com/awslabs/iot-app-kit/commit/448314018882912a49c8522786bc8ae3c964b7aa)) + * SceneHierarchy Tree Performance ([c74d1dc](https://github.com/awslabs/iot-app-kit/commit/c74d1dc8be97135529d55e994834e7dd3f352ee8)) + * Minimum FOV check introduced ([720b8e8](https://github.com/awslabs/iot-app-kit/commit/720b8e85d3b8329c898638030e32ad1e910c4e62)) + * Fix the camera zoom field locked to 1 or greater ([cada75e](https://github.com/awslabs/iot-app-kit/commit/cada75ec32c81312bf5ee403f10bbf4567c30c05)) + * Add success popup message when updating camera location ([4af9c07](https://github.com/awslabs/iot-app-kit/commit/4af9c0758c8adc04f35c80fae2f39b60460e903a)) + * Update the text from Cameras in the drop down to Camera View ([5687f5e](https://github.com/awslabs/iot-app-kit/commit/5687f5efc38dabbd0ec06ccc5e395576fa3d57e4)) + * fix model shader material color restore ([0786c4a](https://github.com/awslabs/iot-app-kit/commit/0786c4a038cbe93be8a4d7a4b2f7a57bfacd76c2)) + * CSS updates to Scene Hierarchy ([ab3c749](https://github.com/awslabs/iot-app-kit/commit/ab3c7490add7338611533e6b68cecefe0f9cb3a1)) + +* core: + * add currentTime param to viewportStartDate and `viewportEndDate` ([eb02085](https://github.com/awslabs/iot-app-kit/commit/eb02085fd3b0aa987c38278cedc8eba0e56d9fa9)) + +* react-components: + * fix propertiesNotChanged for videoPlayer ([9a360b1](https://github.com/awslabs/iot-app-kit/commit/9a360b10fc87b2e31b4c6a00d9e49a5224e207d0)) + +### Documentation + +* Updating scene-composer documentation for Storybook ([901ff53](https://github.com/awslabs/iot-app-kit/commit/901ff53efc86d0c68f0cbc15dc7be9dfc00b0243)) +* add TwinMaker components to GettingStarted doc ([84e9fdf](https://github.com/awslabs/iot-app-kit/commit/84e9fdfb3b1af3c47343a91ca1259e5e45f1eaac)) + +### Miscellaneous + +* reduce concurrent workers in testing ([e8d6dbc](https://github.com/awslabs/iot-app-kit/commit/e8d6dbcac3f3e2e503e02db0087d5db324e9b521)) +* easier linking for iot-app-kit packages ([44d454d](https://github.com/awslabs/iot-app-kit/commit/44d454d955e22581228d3d77829b8ad27a24fd52)) + +## 2.1.0 (2022-09-30) + +### Features + +* react-components: + * add VideoPlayer and RequestVideoUpload components ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) +* scene-composer: + * add SceneViewer component ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) +* source-iottwinmaker: + * add source-iottwinmaker module ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) + +### Bug Fixes + +* components: + * import missing CSS style sheets. ([f2450bc](https://github.com/awslabs/iot-app-kit/commit/f2450bc17906bff2ad4ac065eb26b36726d530d6)) + +### Documentation + +* add SceneViewer, VideoPlayer and AWSIoTTwinMakerSource documentation and link to main ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919) & [71e59be](https://github.com/awslabs/iot-app-kit/commit/71e59be2ad0abcabb9136cf88c3c6c1d16606390)) +* doc: update link in Coding Guidelines ([ea041cd](https://github.com/awslabs/iot-app-kit/commit/ea041cd8aadcb65b08c5bc09e6baf2958dbbdd35)) + +### Miscellaneous + +* update react / react-dom versions from >=16 to ^17 ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) +* update jest versions from 28 to 27 to be consistent with other modules ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) + +## 2.0.0 (2022-09-14) + +### Miscellaneous +* Migrate to NPM workspaces ([8e200be](https://github.com/awslabs/iot-app-kit/commit/8e200be0401fe6fa989cbf9a1ad96aafd8305a96)) + + +## 1.4.0 (2022-06-09) + + +### Features + +* support auto-assigning colors for certain components ([8df4f15](https://github.com/awslabs/iot-app-kit/commit/8df4f150be4d8d1d8c3b55fe46ec91e6d9a7bb9a)) +* bump synchro-charts to 4.0.1 ([977f461](https://github.com/awslabs/iot-app-kit/commit/977f461504292409cbde7e82166fa32ef0c9a93c)) +* add expanded property to iot-resource-explorer ([dda6ef8](https://github.com/awslabs/iot-app-kit/commit/dda6ef8957617cfcb1c99d4bea06036a896c6aae)) + + + + +## 1.3.0 (2022-04-29) +* update documentation ([a9154ef](https://github.com/awslabs/iot-app-kit/commit/b02ed4a48f1e4cdbf948ac482062df6b3c9d2ab7)) +* automatically define components for the react-components library ([a9154ef](https://github.com/awslabs/iot-app-kit/commit/b02ed4a48f1e4cdbf948ac482062df6b3c9d2ab7)) + +## 1.2.1 (2022-03-11) + + +### Bug Fixes + +* unsubrscribe data provider on component updates ([a9154ef](https://github.com/awslabs/iot-app-kit/commit/a9154eff3f3fcd55eb5ae501354de8530f706108)) + + + + + +# 1.2.0 (2022-03-03) + + +### Bug Fixes + +* attach ResourceExplorer react component onSelectionChange prop ([#81](https://github.com/awslabs/iot-app-kit/issues/81)) + + +### Features + +* export table react component ([#81](https://github.com/awslabs/iot-app-kit/issues/81)) + + + + + +# 1.1.0 (2022-03-01) + + +### Features + +* Export global styles. This will allow imports from @iot-app-kit/components/styles.css ([#72](https://github.com/awslabs/iot-app-kit/issues/72)) + + + + + +# 1.0.0 (2022-02-28) + + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([1d14361](https://github.com/awslabs/iot-app-kit/commit/1d14361b88e86ea44ad2d38409dd53c96f550fd3)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([ac16b08](https://github.com/awslabs/iot-app-kit/commit/ac16b0807cdb86cbd700e38154bd7a563222560e)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([7b0f3cf](https://github.com/awslabs/iot-app-kit/commit/7b0f3cf443d89ff7f89f334d9c5abb7400ab084b)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([a1615f9](https://github.com/awslabs/iot-app-kit/commit/a1615f958371b14e75550df97e56e0deca3c34e3)) diff --git a/packages/component-core/README.md b/packages/component-core/README.md new file mode 100644 index 000000000..fd569d7fc --- /dev/null +++ b/packages/component-core/README.md @@ -0,0 +1,22 @@ +# IoT Application Kit +[![NPM Version](https://img.shields.io/npm/v/@iot-app-kit/core)](https://npmjs.org/package/@iot-app-kit/core) +[![License](https://img.shields.io/npm/l/@iot-app-kit/core)](https://github.com/awslabs/iot-app-kit/blob/main/LICENSE) +[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@iot-app-kit/core)](https://bundlephobia.com/package/@iot-app-kit/core) +[![Downloads](https://img.shields.io/npm/dw/@iot-app-kit/core)](https://npmjs.org/package/@iot-app-kit/core) + +## Official IoT App Kit documentation site + +#### Please visit [https://awslabs.github.io/iot-app-kit/](https://awslabs.github.io/iot-app-kit/) for docs, guides and more! + +## Overview + +IoT Application Kit is a development library for building Industrial IoT web based applications. + +IoT App Kit is an open-source library consisting of front-end components and utilities. With IoT App Kit, you can build front-end applications and webpages to utilize IoT data. By default, IoT App Kit helps to retrieve data from [AWS IoT SiteWise](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/what-is-sitewise.html) and [AWS IoT TwinMaker](https://docs.aws.amazon.com/iot-twinmaker/latest/guide/what-is-twinmaker.html) You can also install plugins to retrieve data from your own sources. There’s no charge for using IoT App Kit. + +For an example of a real world use case using the IoT App Kit, [visit this tutorial on how to use IoT App Kit](https://aws.amazon.com/blogs/iot/build-iot-applications-using-aws-iot-application-kit/) + +IoT App Kit Demo + +## License +This project is licensed under the Apache-2.0 License. \ No newline at end of file diff --git a/packages/component-core/package.json b/packages/component-core/package.json new file mode 100644 index 000000000..b663dab07 --- /dev/null +++ b/packages/component-core/package.json @@ -0,0 +1,110 @@ +{ + "name": "@iot-app-kit/component-core", + "version": "12.5.0", + "license": "Apache-2.0", + "source": "./src/index.ts", + "type": "module", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", + "exports": { + ".": { + "types": "./dist/esm/index.d.ts", + "require": "./dist/cjs/index.js", + "import": "./dist/esm/index.js", + "default": "./dist/esm/index.js" + } + }, + "files": [ + "dist", + "CHANGELOG.md", + "*NOTICE", + "*styles.css" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json && npm run copy-assets:es && npm run copy-assets:cjs", + "build:cjs": "tsc -b ./tsconfig.cjs.json && npm run copy-assets:cjs", + "build:es": "tsc -b ./tsconfig.esm.json && npm run copy-assets:es", + "clean": "rimraf dist storybook-static test-results coverage .turbo .cache", + "clean:nuke": "npm run clean && rimraf node_modules", + "copy-assets:es": "copyfiles -e \"**/*.tsx\" -e \"**/*.ts\" -e \"**/*.snap\" -e \"**/*.js\" -e \"**/*.jsx\" -e \"**/*.json\" \"src/**/*\" -u 1 dist/esm/", + "copy-assets:cjs": "copyfiles -e \"**/*.tsx\" -e \"**/*.ts\" -e \"**/*.snap\" -e \"**/*.js\" -e \"**/*.jsx\" -e \"**/*.json\" \"src/**/*\" -u 1 dist/cjs/", + "copy:styles": "cp ../components/styles.css styles.css", + "dev": "tsc -b ./tsconfig.esm.json --watch", + "test": "TZ=utc vitest run --silent --coverage", + "test:watch": "TZ=utc vitest --silent", + "test:types": "tsc -p ./tsconfig.json --noEmit", + "lint": "eslint . --max-warnings=0 --cache --cache-location .cache/eslint/", + "fix": "eslint --fix . --cache --cache-location .cache/eslint/", + "copy:license": "cp ../../LICENSE LICENSE", + "copy:notice": "cp ../../NOTICE NOTICE", + "prepack": "npm run copy:license && npm run copy:notice", + "pack": "npm pack" + }, + "devDependencies": { + "@iot-app-kit/testing-util": "12.5.0", + "@iot-app-kit/ts-config": "12.5.0", + "@playwright/test": "^1.48.2", + "@storybook/addon-essentials": "^8.4.5", + "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", + "@storybook/react": "^8.4.5", + "@storybook/react-vite": "^8.4.5", + "@storybook/test": "^8.4.5", + "@tanstack/eslint-plugin-query": "^5.40.1", + "@tanstack/react-query-devtools": "^5.40.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@types/lodash-es": "^4.17.12", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/uuid": "^9.0.2", + "@vitejs/plugin-react": "^4.3.3", + "@vitest/coverage-v8": "^2.1.5", + "copyfiles": "^2.4.1", + "eslint-config-iot-app-kit": "12.5.0", + "jest-extended": "^3.2.4", + "react": "^18.2.0", + "rimraf": "^5.0.1", + "storybook": "^8.4.5", + "type-fest": "^4.28.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vitest": "^2.1.5", + "vitest-canvas-mock": "^0.3.3" + }, + "dependencies": { + "@cloudscape-design/chat-components": "^1.0.10", + "@cloudscape-design/collection-hooks": "1.0.49", + "@cloudscape-design/components": "3.0.693", + "@cloudscape-design/design-tokens": "3.0.42", + "@cloudscape-design/global-styles": "1.0.32", + "@iot-app-kit/charts": "^2.1.2", + "@iot-app-kit/charts-core": "^2.1.2", + "@iot-app-kit/core": "12.5.0", + "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", + "@iot-app-kit/source-iottwinmaker": "12.5.0", + "@tanstack/react-query": "^5.32.1", + "d3-array": "^3.2.3", + "dataloader": "^2.2.2", + "date-fns": "^2.30.0", + "lodash-es": "^4.17.21", + "react-use": "17.4.0", + "tiny-invariant": "^1.3.1", + "uuid": "^9.0.0", + "zustand": "^4.5.2" + }, + "peerDependencies": { + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18" + }, + "bugs": { + "url": "https://github.com/awslabs/iot-app-kit/issues" + }, + "homepage": "https://github.com/awslabs/iot-app-kit#readme" +} diff --git a/packages/react-components/src/common/chartTypes.ts b/packages/component-core/src/common/chartTypes.ts similarity index 100% rename from packages/react-components/src/common/chartTypes.ts rename to packages/component-core/src/common/chartTypes.ts diff --git a/packages/component-core/src/common/constants.ts b/packages/component-core/src/common/constants.ts new file mode 100644 index 000000000..0b6f3eb87 --- /dev/null +++ b/packages/component-core/src/common/constants.ts @@ -0,0 +1,21 @@ +import type { Viewport } from '@iot-app-kit/core'; + +export enum COMPARISON_OPERATOR { + LESS_THAN = 'LT', + GREATER_THAN = 'GT', + LESS_THAN_EQUAL = 'LTE', + GREATER_THAN_EQUAL = 'GTE', + EQUAL = 'EQ', + CONTAINS = 'CONTAINS', +} + +export const COMPARATOR_MAP = { + GTE: '>=', + GT: '>', + LTE: '<=', + LT: '<', + EQ: '=', + CONTAINS: 'Contains', +}; + +export const DEFAULT_VIEWPORT: Viewport = { duration: '10m' }; diff --git a/packages/react-components/src/data/README.md b/packages/component-core/src/data/README.md similarity index 100% rename from packages/react-components/src/data/README.md rename to packages/component-core/src/data/README.md diff --git a/packages/react-components/src/data/dataSourceLoader/dataSourceLoader.spec.ts b/packages/component-core/src/data/dataSourceLoader/dataSourceLoader.spec.ts similarity index 100% rename from packages/react-components/src/data/dataSourceLoader/dataSourceLoader.spec.ts rename to packages/component-core/src/data/dataSourceLoader/dataSourceLoader.spec.ts diff --git a/packages/react-components/src/data/dataSourceLoader/dataSourceLoader.ts b/packages/component-core/src/data/dataSourceLoader/dataSourceLoader.ts similarity index 100% rename from packages/react-components/src/data/dataSourceLoader/dataSourceLoader.ts rename to packages/component-core/src/data/dataSourceLoader/dataSourceLoader.ts diff --git a/packages/react-components/src/data/dataSourceLoader/index.ts b/packages/component-core/src/data/dataSourceLoader/index.ts similarity index 100% rename from packages/react-components/src/data/dataSourceLoader/index.ts rename to packages/component-core/src/data/dataSourceLoader/index.ts diff --git a/packages/react-components/src/data/index.ts b/packages/component-core/src/data/index.ts similarity index 100% rename from packages/react-components/src/data/index.ts rename to packages/component-core/src/data/index.ts diff --git a/packages/react-components/src/data/transformers/anomaly/arrow/datasource.ts b/packages/component-core/src/data/transformers/anomaly/arrow/datasource.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/arrow/datasource.ts rename to packages/component-core/src/data/transformers/anomaly/arrow/datasource.ts diff --git a/packages/react-components/src/data/transformers/anomaly/arrow/index.ts b/packages/component-core/src/data/transformers/anomaly/arrow/index.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/arrow/index.ts rename to packages/component-core/src/data/transformers/anomaly/arrow/index.ts diff --git a/packages/react-components/src/data/transformers/anomaly/arrow/input.ts b/packages/component-core/src/data/transformers/anomaly/arrow/input.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/arrow/input.ts rename to packages/component-core/src/data/transformers/anomaly/arrow/input.ts diff --git a/packages/react-components/src/data/transformers/anomaly/arrow/transformer.spec.ts b/packages/component-core/src/data/transformers/anomaly/arrow/transformer.spec.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/arrow/transformer.spec.ts rename to packages/component-core/src/data/transformers/anomaly/arrow/transformer.spec.ts diff --git a/packages/react-components/src/data/transformers/anomaly/arrow/transformer.ts b/packages/component-core/src/data/transformers/anomaly/arrow/transformer.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/arrow/transformer.ts rename to packages/component-core/src/data/transformers/anomaly/arrow/transformer.ts diff --git a/packages/react-components/src/data/transformers/anomaly/index.ts b/packages/component-core/src/data/transformers/anomaly/index.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/index.ts rename to packages/component-core/src/data/transformers/anomaly/index.ts diff --git a/packages/react-components/src/data/transformers/anomaly/input.ts b/packages/component-core/src/data/transformers/anomaly/input.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/input.ts rename to packages/component-core/src/data/transformers/anomaly/input.ts diff --git a/packages/react-components/src/data/transformers/anomaly/object/datasource.ts b/packages/component-core/src/data/transformers/anomaly/object/datasource.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/object/datasource.ts rename to packages/component-core/src/data/transformers/anomaly/object/datasource.ts diff --git a/packages/react-components/src/data/transformers/anomaly/object/index.ts b/packages/component-core/src/data/transformers/anomaly/object/index.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/object/index.ts rename to packages/component-core/src/data/transformers/anomaly/object/index.ts diff --git a/packages/react-components/src/data/transformers/anomaly/object/input.ts b/packages/component-core/src/data/transformers/anomaly/object/input.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/object/input.ts rename to packages/component-core/src/data/transformers/anomaly/object/input.ts diff --git a/packages/react-components/src/data/transformers/anomaly/object/transformer.spec.ts b/packages/component-core/src/data/transformers/anomaly/object/transformer.spec.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/object/transformer.spec.ts rename to packages/component-core/src/data/transformers/anomaly/object/transformer.spec.ts diff --git a/packages/react-components/src/data/transformers/anomaly/object/transformer.ts b/packages/component-core/src/data/transformers/anomaly/object/transformer.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/object/transformer.ts rename to packages/component-core/src/data/transformers/anomaly/object/transformer.ts diff --git a/packages/react-components/src/data/transformers/anomaly/output.ts b/packages/component-core/src/data/transformers/anomaly/output.ts similarity index 100% rename from packages/react-components/src/data/transformers/anomaly/output.ts rename to packages/component-core/src/data/transformers/anomaly/output.ts diff --git a/packages/react-components/src/data/transformers/arrow/dataSource.ts b/packages/component-core/src/data/transformers/arrow/dataSource.ts similarity index 100% rename from packages/react-components/src/data/transformers/arrow/dataSource.ts rename to packages/component-core/src/data/transformers/arrow/dataSource.ts diff --git a/packages/react-components/src/data/transformers/arrow/index.ts b/packages/component-core/src/data/transformers/arrow/index.ts similarity index 100% rename from packages/react-components/src/data/transformers/arrow/index.ts rename to packages/component-core/src/data/transformers/arrow/index.ts diff --git a/packages/react-components/src/data/transformers/arrow/input.ts b/packages/component-core/src/data/transformers/arrow/input.ts similarity index 100% rename from packages/react-components/src/data/transformers/arrow/input.ts rename to packages/component-core/src/data/transformers/arrow/input.ts diff --git a/packages/react-components/src/data/transformers/arrow/transformer.spec.ts b/packages/component-core/src/data/transformers/arrow/transformer.spec.ts similarity index 100% rename from packages/react-components/src/data/transformers/arrow/transformer.spec.ts rename to packages/component-core/src/data/transformers/arrow/transformer.spec.ts diff --git a/packages/react-components/src/data/transformers/arrow/transformer.ts b/packages/component-core/src/data/transformers/arrow/transformer.ts similarity index 100% rename from packages/react-components/src/data/transformers/arrow/transformer.ts rename to packages/component-core/src/data/transformers/arrow/transformer.ts diff --git a/packages/react-components/src/data/transformers/index.ts b/packages/component-core/src/data/transformers/index.ts similarity index 100% rename from packages/react-components/src/data/transformers/index.ts rename to packages/component-core/src/data/transformers/index.ts diff --git a/packages/react-components/src/data/transformers/input.ts b/packages/component-core/src/data/transformers/input.ts similarity index 100% rename from packages/react-components/src/data/transformers/input.ts rename to packages/component-core/src/data/transformers/input.ts diff --git a/packages/react-components/src/data/transformers/object/dataSource.ts b/packages/component-core/src/data/transformers/object/dataSource.ts similarity index 100% rename from packages/react-components/src/data/transformers/object/dataSource.ts rename to packages/component-core/src/data/transformers/object/dataSource.ts diff --git a/packages/react-components/src/data/transformers/object/index.ts b/packages/component-core/src/data/transformers/object/index.ts similarity index 100% rename from packages/react-components/src/data/transformers/object/index.ts rename to packages/component-core/src/data/transformers/object/index.ts diff --git a/packages/react-components/src/data/transformers/object/input.ts b/packages/component-core/src/data/transformers/object/input.ts similarity index 100% rename from packages/react-components/src/data/transformers/object/input.ts rename to packages/component-core/src/data/transformers/object/input.ts diff --git a/packages/react-components/src/data/transformers/object/transformer.spec.ts b/packages/component-core/src/data/transformers/object/transformer.spec.ts similarity index 100% rename from packages/react-components/src/data/transformers/object/transformer.spec.ts rename to packages/component-core/src/data/transformers/object/transformer.spec.ts diff --git a/packages/react-components/src/data/transformers/object/transformer.ts b/packages/component-core/src/data/transformers/object/transformer.ts similarity index 100% rename from packages/react-components/src/data/transformers/object/transformer.ts rename to packages/component-core/src/data/transformers/object/transformer.ts diff --git a/packages/react-components/src/data/types.ts b/packages/component-core/src/data/types.ts similarity index 100% rename from packages/react-components/src/data/types.ts rename to packages/component-core/src/data/types.ts diff --git a/packages/react-components/src/hooks/requestFunctions/data/iotevents.ts b/packages/component-core/src/hooks/requestFunctions/data/iotevents.ts similarity index 100% rename from packages/react-components/src/hooks/requestFunctions/data/iotevents.ts rename to packages/component-core/src/hooks/requestFunctions/data/iotevents.ts diff --git a/packages/react-components/src/hooks/requestFunctions/data/iotsitewise.ts b/packages/component-core/src/hooks/requestFunctions/data/iotsitewise.ts similarity index 100% rename from packages/react-components/src/hooks/requestFunctions/data/iotsitewise.ts rename to packages/component-core/src/hooks/requestFunctions/data/iotsitewise.ts diff --git a/packages/react-components/src/hooks/requestFunctions/useIoTEventsClient.spec.ts b/packages/component-core/src/hooks/requestFunctions/useIoTEventsClient.spec.ts similarity index 100% rename from packages/react-components/src/hooks/requestFunctions/useIoTEventsClient.spec.ts rename to packages/component-core/src/hooks/requestFunctions/useIoTEventsClient.spec.ts diff --git a/packages/react-components/src/hooks/requestFunctions/useIoTEventsClient.ts b/packages/component-core/src/hooks/requestFunctions/useIoTEventsClient.ts similarity index 100% rename from packages/react-components/src/hooks/requestFunctions/useIoTEventsClient.ts rename to packages/component-core/src/hooks/requestFunctions/useIoTEventsClient.ts diff --git a/packages/react-components/src/hooks/requestFunctions/useIoTSiteWiseClient.spec.ts b/packages/component-core/src/hooks/requestFunctions/useIoTSiteWiseClient.spec.ts similarity index 100% rename from packages/react-components/src/hooks/requestFunctions/useIoTSiteWiseClient.spec.ts rename to packages/component-core/src/hooks/requestFunctions/useIoTSiteWiseClient.spec.ts diff --git a/packages/react-components/src/hooks/requestFunctions/useIoTSiteWiseClient.ts b/packages/component-core/src/hooks/requestFunctions/useIoTSiteWiseClient.ts similarity index 100% rename from packages/react-components/src/hooks/requestFunctions/useIoTSiteWiseClient.ts rename to packages/component-core/src/hooks/requestFunctions/useIoTSiteWiseClient.ts diff --git a/packages/react-components/src/hooks/useAlarms/constants.ts b/packages/component-core/src/hooks/useAlarms/constants.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/constants.ts rename to packages/component-core/src/hooks/useAlarms/constants.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/index.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/index.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/predicates.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/predicates.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/predicates.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/predicates.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/predicates.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/predicates.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/predicates.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/predicates.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmAssets.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmAssets.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmAssets.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmAssets.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmAssets.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmAssets.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmAssets.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmAssets.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmModels.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmModels.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmModels.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmModels.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmModels.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmModels.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmModels.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmModels.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmSources.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmSources.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmSources.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmSources.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmSources.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmSources.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmSources.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmSources.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmState.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmState.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmState.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmState.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmState.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmState.ts similarity index 98% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmState.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmState.ts index 64b90ea3f..aa5faf6ca 100644 --- a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmState.ts +++ b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmState.ts @@ -8,7 +8,7 @@ import { useQueryMode } from './useQueryMode'; import { combineStatusForQueries } from '../utils/queryStatus'; import { useLatestAssetPropertyValues } from '../../../queries'; import { useHistoricalAssetPropertyValues } from '../../../queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type OnUpdateAlarmStateDataAction, useRequestSelector, diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts similarity index 98% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts index 03abcac6a..18fdc0fa3 100644 --- a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts +++ b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmThreshold.ts @@ -8,7 +8,7 @@ import { useLatestAssetPropertyValues, } from '../../../queries'; import { combineStatusForQueries } from '../utils/queryStatus'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type OnUpdateAlarmThresholdDataAction, useRequestSelector, diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmTypes.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmTypes.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmTypes.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmTypes.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmTypes.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmTypes.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useAlarmTypes.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useAlarmTypes.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts similarity index 96% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts index cdc6b1be4..b66c6c702 100644 --- a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts +++ b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/alarmToSiteWiseDataStreamQuery.ts @@ -1,7 +1,7 @@ import { type AggregateType } from '@aws-sdk/client-iotsitewise'; import { type SiteWiseDataStreamQuery } from '@iot-app-kit/source-iotsitewise'; import { type AlarmData } from '../../types'; -import { createNonNullableList } from '../../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type IterableElement } from 'type-fest'; type Properties = Set; diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/filterDatastreamsForAlarm.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/filterDatastreamsForAlarm.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/filterDatastreamsForAlarm.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/filterDatastreamsForAlarm.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/types.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/types.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmInputPropertyData.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmInputPropertyData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmInputPropertyData.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmInputPropertyData.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmStatusForDatastreams.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmStatusForDatastreams.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmStatusForDatastreams.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/updateAlarmStatusForDatastreams.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useInputPropertyTimeSeriesData/useInputPropertyTimeSeriesData.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.spec.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.spec.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useLatestAlarmPropertyValues.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useQueryMode.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useQueryMode.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useQueryMode.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useQueryMode.ts diff --git a/packages/react-components/src/hooks/useAlarms/hookHelpers/useReactQueryEffect.ts b/packages/component-core/src/hooks/useAlarms/hookHelpers/useReactQueryEffect.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/hookHelpers/useReactQueryEffect.ts rename to packages/component-core/src/hooks/useAlarms/hookHelpers/useReactQueryEffect.ts diff --git a/packages/react-components/src/hooks/useAlarms/index.ts b/packages/component-core/src/hooks/useAlarms/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/index.ts rename to packages/component-core/src/hooks/useAlarms/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts similarity index 97% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts index a94e17876..edc9b9a6e 100644 --- a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts +++ b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/summarizeAlarmModels.ts @@ -1,6 +1,6 @@ import isEqual from 'lodash-es/isEqual'; import uniqWith from 'lodash-es/uniqWith'; -import { createNonNullableList } from '../../../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { extractAssetPropertyId, getAlarmModelNameFromAlarmSourceProperty, diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarmModels/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarmModels/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAsset.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAsset.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAsset.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAsset.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAssetModel.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAssetModel.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAssetModel.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/createAlarmsByAssetModel.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/summarizeAlarms.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/summarizeAlarms/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/summarizeAlarms/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/filterDataStreamsForAlarm.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/matchesDataStream.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmInputPropertyData/updateAlarmInputPropertyData.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmSourceData/updateAlarmSourceData.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmStateData/updateAlarmStateData.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts similarity index 97% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts index 645838274..6e5cac737 100644 --- a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts +++ b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmThresholdData/updateAlarmThresholdData.ts @@ -7,7 +7,7 @@ import { type UpdateAlarmThresholdDataActionPayload, } from './types'; import { uniqueSortAssetPropertyValues } from '../utils/uniqueSortAssetPropertyValues'; -import { createNonNullableList } from '../../../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { extractAssetPropertyId } from '../../../utils/parseAlarmModels'; const findAssetPropertyValueSummary = ( diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/index.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/index.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/types.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/types.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.spec.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.ts b/packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/updateAlarmTypeData/updateAlarmTypeData.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts b/packages/component-core/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts similarity index 77% rename from packages/react-components/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts index 4495bd41f..5cd58990a 100644 --- a/packages/react-components/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts +++ b/packages/component-core/src/hooks/useAlarms/state/actions/utils/assetPropertyValueTime.ts @@ -1,5 +1,5 @@ import { type AssetPropertyValue } from '@aws-sdk/client-iotsitewise'; -import { toTimestamp } from '../../../../../utils/time'; +import { toTimestamp } from '@iot-app-kit/core'; export const assetPropertyValueTime = ( assetPropertyValue: AssetPropertyValue diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/utils/compareAssetPropertyValues.ts b/packages/component-core/src/hooks/useAlarms/state/actions/utils/compareAssetPropertyValues.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/utils/compareAssetPropertyValues.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/utils/compareAssetPropertyValues.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts b/packages/component-core/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts similarity index 93% rename from packages/react-components/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts index a3bfc739e..6cbe0db63 100644 --- a/packages/react-components/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts +++ b/packages/component-core/src/hooks/useAlarms/state/actions/utils/filterAssetPropertyValues.ts @@ -1,6 +1,6 @@ import { type Bisector, bisector } from 'd3-array'; -import { type Interval } from '../../../../../queries'; import { assetPropertyValueTime } from './assetPropertyValueTime'; +import { type Interval } from '../../../../../queries/common/types'; export const alarmValueFilterer = ( diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/utils/shouldUpdateAssetPropertyValues.ts b/packages/component-core/src/hooks/useAlarms/state/actions/utils/shouldUpdateAssetPropertyValues.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/utils/shouldUpdateAssetPropertyValues.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/utils/shouldUpdateAssetPropertyValues.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/utils/uniqueSortAssetPropertyValues.ts b/packages/component-core/src/hooks/useAlarms/state/actions/utils/uniqueSortAssetPropertyValues.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/utils/uniqueSortAssetPropertyValues.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/utils/uniqueSortAssetPropertyValues.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/actions/utils/viewportAsInterval.ts b/packages/component-core/src/hooks/useAlarms/state/actions/utils/viewportAsInterval.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/actions/utils/viewportAsInterval.ts rename to packages/component-core/src/hooks/useAlarms/state/actions/utils/viewportAsInterval.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts b/packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts similarity index 92% rename from packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts index 41ccad6aa..4180153d4 100644 --- a/packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts +++ b/packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToAlarmData.ts @@ -1,4 +1,4 @@ -import { createNonNullableList } from '../../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type AlarmData, type AlarmRequest } from '../../types'; import { combineStatusForQueries } from '../../utils/queryStatus'; import { type AlarmRequestState } from '../types'; diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts b/packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts similarity index 94% rename from packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts index 68b4281d3..343b246a5 100644 --- a/packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts +++ b/packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmRequestStateToInitialAlarmData.ts @@ -1,4 +1,4 @@ -import { createNonNullableList } from '../../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type AlarmData, type AlarmRequest } from '../../types'; import { combineStatusForQueries } from '../../utils/queryStatus'; import { type AlarmRequestState } from '../types'; diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.spec.ts b/packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.ts b/packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/convertAlarmsStateToAlarmDatas.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/index.ts b/packages/component-core/src/hooks/useAlarms/state/converter/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/index.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/alarmDataAsComparable.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/alarmDataAsComparable.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/alarmDataAsComparable.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/alarmDataAsComparable.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/index.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/index.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.spec.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isGettingLatestAlarmSourceValue.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.spec.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isInputPropertyRequest.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.spec.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarmModels.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.spec.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.spec.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts similarity index 86% rename from packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts rename to packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts index 562401691..c8836c8b2 100644 --- a/packages/react-components/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts +++ b/packages/component-core/src/hooks/useAlarms/state/converter/utils/isSummarizingAlarms.ts @@ -1,4 +1,4 @@ -import { createNonNullableList } from '../../../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type AlarmRequest } from '../../../types'; import { type AlarmRequestState } from '../../types'; diff --git a/packages/react-components/src/hooks/useAlarms/state/index.ts b/packages/component-core/src/hooks/useAlarms/state/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/index.ts rename to packages/component-core/src/hooks/useAlarms/state/index.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/reducer.ts b/packages/component-core/src/hooks/useAlarms/state/reducer.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/reducer.ts rename to packages/component-core/src/hooks/useAlarms/state/reducer.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/types.ts b/packages/component-core/src/hooks/useAlarms/state/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/types.ts rename to packages/component-core/src/hooks/useAlarms/state/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/useAlarmState.ts b/packages/component-core/src/hooks/useAlarms/state/useAlarmState.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/useAlarmState.ts rename to packages/component-core/src/hooks/useAlarms/state/useAlarmState.ts diff --git a/packages/react-components/src/hooks/useAlarms/state/useRequestSelector.ts b/packages/component-core/src/hooks/useAlarms/state/useRequestSelector.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/state/useRequestSelector.ts rename to packages/component-core/src/hooks/useAlarms/state/useRequestSelector.ts diff --git a/packages/react-components/src/hooks/useAlarms/transformers/index.ts b/packages/component-core/src/hooks/useAlarms/transformers/index.ts similarity index 50% rename from packages/react-components/src/hooks/useAlarms/transformers/index.ts rename to packages/component-core/src/hooks/useAlarms/transformers/index.ts index 8e671928e..caefc152d 100644 --- a/packages/react-components/src/hooks/useAlarms/transformers/index.ts +++ b/packages/component-core/src/hooks/useAlarms/transformers/index.ts @@ -1 +1,2 @@ export * from './parseAlarmStateProperty'; +export * from './mapAlarmRuleExpression'; diff --git a/packages/react-components/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.spec.ts b/packages/component-core/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.spec.ts rename to packages/component-core/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.ts b/packages/component-core/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.ts rename to packages/component-core/src/hooks/useAlarms/transformers/mapAlarmRuleExpression.ts diff --git a/packages/react-components/src/hooks/useAlarms/transformers/parseAlarmStateProperty.spec.ts b/packages/component-core/src/hooks/useAlarms/transformers/parseAlarmStateProperty.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/transformers/parseAlarmStateProperty.spec.ts rename to packages/component-core/src/hooks/useAlarms/transformers/parseAlarmStateProperty.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts b/packages/component-core/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts similarity index 97% rename from packages/react-components/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts rename to packages/component-core/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts index 8208d5b21..88ef2cf30 100644 --- a/packages/react-components/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts +++ b/packages/component-core/src/hooks/useAlarms/transformers/parseAlarmStateProperty.ts @@ -1,6 +1,6 @@ import { type AssetPropertyValue } from '@aws-sdk/client-iotsitewise'; import { ALARM_STATUS } from '../constants'; -import { toTimestamp } from '../../../utils/time'; +import { toTimestamp } from '@iot-app-kit/core'; export type UpperCaseStateName = keyof typeof ALARM_STATUS; export type PascalCaseStateName = (typeof ALARM_STATUS)[UpperCaseStateName]; diff --git a/packages/react-components/src/hooks/useAlarms/types.ts b/packages/component-core/src/hooks/useAlarms/types.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/types.ts rename to packages/component-core/src/hooks/useAlarms/types.ts diff --git a/packages/react-components/src/hooks/useAlarms/useAlarms.spec.ts b/packages/component-core/src/hooks/useAlarms/useAlarms.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/useAlarms.spec.ts rename to packages/component-core/src/hooks/useAlarms/useAlarms.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/useAlarms.ts b/packages/component-core/src/hooks/useAlarms/useAlarms.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/useAlarms.ts rename to packages/component-core/src/hooks/useAlarms/useAlarms.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/alarmValueFilterer.ts b/packages/component-core/src/hooks/useAlarms/utils/alarmValueFilterer.ts similarity index 91% rename from packages/react-components/src/hooks/useAlarms/utils/alarmValueFilterer.ts rename to packages/component-core/src/hooks/useAlarms/utils/alarmValueFilterer.ts index c74d363eb..9937f195f 100644 --- a/packages/react-components/src/hooks/useAlarms/utils/alarmValueFilterer.ts +++ b/packages/component-core/src/hooks/useAlarms/utils/alarmValueFilterer.ts @@ -1,5 +1,5 @@ import { type Bisector } from 'd3-array'; -import { type Interval } from '../../../queries'; +import { type Interval } from '../../../queries/common/types'; export const alarmValueFilterer = ( diff --git a/packages/react-components/src/hooks/useAlarms/utils/constructAlarmProperty.ts b/packages/component-core/src/hooks/useAlarms/utils/constructAlarmProperty.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/constructAlarmProperty.ts rename to packages/component-core/src/hooks/useAlarms/utils/constructAlarmProperty.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/createAlarmData.ts b/packages/component-core/src/hooks/useAlarms/utils/createAlarmData.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/createAlarmData.ts rename to packages/component-core/src/hooks/useAlarms/utils/createAlarmData.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/filterAlarmInputProperties.ts b/packages/component-core/src/hooks/useAlarms/utils/filterAlarmInputProperties.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/filterAlarmInputProperties.ts rename to packages/component-core/src/hooks/useAlarms/utils/filterAlarmInputProperties.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/parseAlarmModels.ts b/packages/component-core/src/hooks/useAlarms/utils/parseAlarmModels.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/parseAlarmModels.ts rename to packages/component-core/src/hooks/useAlarms/utils/parseAlarmModels.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/parseCompositeModels.ts b/packages/component-core/src/hooks/useAlarms/utils/parseCompositeModels.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/parseCompositeModels.ts rename to packages/component-core/src/hooks/useAlarms/utils/parseCompositeModels.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/queryStatus.spec.ts b/packages/component-core/src/hooks/useAlarms/utils/queryStatus.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/queryStatus.spec.ts rename to packages/component-core/src/hooks/useAlarms/utils/queryStatus.spec.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/queryStatus.ts b/packages/component-core/src/hooks/useAlarms/utils/queryStatus.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarms/utils/queryStatus.ts rename to packages/component-core/src/hooks/useAlarms/utils/queryStatus.ts diff --git a/packages/react-components/src/hooks/useAlarms/utils/updateAlarmValues.ts b/packages/component-core/src/hooks/useAlarms/utils/updateAlarmValues.ts similarity index 95% rename from packages/react-components/src/hooks/useAlarms/utils/updateAlarmValues.ts rename to packages/component-core/src/hooks/useAlarms/utils/updateAlarmValues.ts index cf751bdad..e720c2ce3 100644 --- a/packages/react-components/src/hooks/useAlarms/utils/updateAlarmValues.ts +++ b/packages/component-core/src/hooks/useAlarms/utils/updateAlarmValues.ts @@ -1,9 +1,12 @@ import { type AssetPropertyValue } from '@aws-sdk/client-iotsitewise'; import type { AlarmData } from '../types'; -import { toTimestamp } from '../../../utils/time'; +import { + toTimestamp, + viewportEndDate, + viewportStartDate, +} from '@iot-app-kit/core'; import { bisector } from 'd3-array'; -import { type Viewport } from '../../../queries'; -import { viewportEndDate, viewportStartDate } from '@iot-app-kit/core'; +import { type Viewport } from '../../../queries/common/types'; import { alarmValueFilterer } from './alarmValueFilterer'; const assetPropertyValueTime = (assetPropertyValue: AssetPropertyValue) => diff --git a/packages/react-components/src/hooks/useAlarmsFromQueries/index.ts b/packages/component-core/src/hooks/useAlarmsFromQueries/index.ts similarity index 100% rename from packages/react-components/src/hooks/useAlarmsFromQueries/index.ts rename to packages/component-core/src/hooks/useAlarmsFromQueries/index.ts diff --git a/packages/react-components/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts b/packages/component-core/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts similarity index 97% rename from packages/react-components/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts rename to packages/component-core/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts index f11bf0812..c1857fd78 100644 --- a/packages/react-components/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts +++ b/packages/component-core/src/hooks/useAlarmsFromQueries/useAlarmsFromQueries.ts @@ -8,7 +8,7 @@ import { type UseAlarmsOptions, useAlarms, } from '../useAlarms'; -import { createNonNullableList } from '../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; /** * diff --git a/packages/react-components/src/hooks/useColoredDataStreams/index.ts b/packages/component-core/src/hooks/useColoredDataStreams/index.ts similarity index 100% rename from packages/react-components/src/hooks/useColoredDataStreams/index.ts rename to packages/component-core/src/hooks/useColoredDataStreams/index.ts diff --git a/packages/react-components/src/hooks/useColoredDataStreams/useColoredDataStreams.spec.ts b/packages/component-core/src/hooks/useColoredDataStreams/useColoredDataStreams.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useColoredDataStreams/useColoredDataStreams.spec.ts rename to packages/component-core/src/hooks/useColoredDataStreams/useColoredDataStreams.spec.ts diff --git a/packages/react-components/src/hooks/useColoredDataStreams/useColoredDataStreams.ts b/packages/component-core/src/hooks/useColoredDataStreams/useColoredDataStreams.ts similarity index 100% rename from packages/react-components/src/hooks/useColoredDataStreams/useColoredDataStreams.ts rename to packages/component-core/src/hooks/useColoredDataStreams/useColoredDataStreams.ts diff --git a/packages/react-components/src/hooks/useColoredDataStreams/useDataStreamColorer.ts b/packages/component-core/src/hooks/useColoredDataStreams/useDataStreamColorer.ts similarity index 100% rename from packages/react-components/src/hooks/useColoredDataStreams/useDataStreamColorer.ts rename to packages/component-core/src/hooks/useColoredDataStreams/useDataStreamColorer.ts diff --git a/packages/react-components/src/hooks/useSingleQueryAlarm/index.ts b/packages/component-core/src/hooks/useSingleQueryAlarm/index.ts similarity index 60% rename from packages/react-components/src/hooks/useSingleQueryAlarm/index.ts rename to packages/component-core/src/hooks/useSingleQueryAlarm/index.ts index 8d2048dd2..8cd3c05e5 100644 --- a/packages/react-components/src/hooks/useSingleQueryAlarm/index.ts +++ b/packages/component-core/src/hooks/useSingleQueryAlarm/index.ts @@ -1 +1,2 @@ export * from './useSingleQueryAlarm'; +export * from './types'; diff --git a/packages/component-core/src/hooks/useSingleQueryAlarm/types.ts b/packages/component-core/src/hooks/useSingleQueryAlarm/types.ts new file mode 100644 index 000000000..ce634e6f5 --- /dev/null +++ b/packages/component-core/src/hooks/useSingleQueryAlarm/types.ts @@ -0,0 +1,9 @@ +import { type PascalCaseStateName } from '../useAlarms/transformers'; + +export type AlarmContent = { + alarmName?: string; + alarmExpression?: string; + assetId?: string; + alarmState?: PascalCaseStateName; + severity?: number; +}; diff --git a/packages/react-components/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts b/packages/component-core/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts similarity index 97% rename from packages/react-components/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts rename to packages/component-core/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts index 18b6b91d3..9da6132a4 100644 --- a/packages/react-components/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts +++ b/packages/component-core/src/hooks/useSingleQueryAlarm/useSingleQueryAlarm.ts @@ -9,7 +9,7 @@ import isEqual from 'lodash-es/isEqual'; import { useState } from 'react'; import useCustomCompareEffect from 'react-use/esm/useCustomCompareEffect'; import { type ComponentQuery } from '../../common/chartTypes'; -import { type AlarmContent } from '../../components/alarm-components/alarm-content/types'; +import { type AlarmContent } from './types'; import { transformAlarmsToThreshold } from '../../utils/transformAlarmsToThreshold'; import { type AlarmData, type AlarmDataStatus } from '../useAlarms'; import { parseAlarmStateAssetProperty } from '../useAlarms/transformers'; diff --git a/packages/react-components/src/hooks/useTheming/applyTokens.ts b/packages/component-core/src/hooks/useTheming/applyTokens.ts similarity index 100% rename from packages/react-components/src/hooks/useTheming/applyTokens.ts rename to packages/component-core/src/hooks/useTheming/applyTokens.ts diff --git a/packages/react-components/src/hooks/useTheming/index.ts b/packages/component-core/src/hooks/useTheming/index.ts similarity index 100% rename from packages/react-components/src/hooks/useTheming/index.ts rename to packages/component-core/src/hooks/useTheming/index.ts diff --git a/packages/react-components/src/hooks/useTheming/types.ts b/packages/component-core/src/hooks/useTheming/types.ts similarity index 100% rename from packages/react-components/src/hooks/useTheming/types.ts rename to packages/component-core/src/hooks/useTheming/types.ts diff --git a/packages/react-components/src/hooks/useTheming/useTheming.ts b/packages/component-core/src/hooks/useTheming/useTheming.ts similarity index 100% rename from packages/react-components/src/hooks/useTheming/useTheming.ts rename to packages/component-core/src/hooks/useTheming/useTheming.ts diff --git a/packages/react-components/src/hooks/useTimeSeriesData/index.ts b/packages/component-core/src/hooks/useTimeSeriesData/index.ts similarity index 100% rename from packages/react-components/src/hooks/useTimeSeriesData/index.ts rename to packages/component-core/src/hooks/useTimeSeriesData/index.ts diff --git a/packages/react-components/src/hooks/useTimeSeriesData/providerStore.ts b/packages/component-core/src/hooks/useTimeSeriesData/providerStore.ts similarity index 100% rename from packages/react-components/src/hooks/useTimeSeriesData/providerStore.ts rename to packages/component-core/src/hooks/useTimeSeriesData/providerStore.ts diff --git a/packages/react-components/src/hooks/useTimeSeriesData/useTimeSeriesData.spec.ts b/packages/component-core/src/hooks/useTimeSeriesData/useTimeSeriesData.spec.ts similarity index 100% rename from packages/react-components/src/hooks/useTimeSeriesData/useTimeSeriesData.spec.ts rename to packages/component-core/src/hooks/useTimeSeriesData/useTimeSeriesData.spec.ts diff --git a/packages/react-components/src/hooks/useTimeSeriesData/useTimeSeriesData.ts b/packages/component-core/src/hooks/useTimeSeriesData/useTimeSeriesData.ts similarity index 100% rename from packages/react-components/src/hooks/useTimeSeriesData/useTimeSeriesData.ts rename to packages/component-core/src/hooks/useTimeSeriesData/useTimeSeriesData.ts diff --git a/packages/component-core/src/hooks/useViewport/index.ts b/packages/component-core/src/hooks/useViewport/index.ts new file mode 100644 index 000000000..92dbb6a35 --- /dev/null +++ b/packages/component-core/src/hooks/useViewport/index.ts @@ -0,0 +1,2 @@ +export * from './useViewport'; +export * from './useUtilizedViewport'; diff --git a/packages/react-components/src/hooks/useViewport/useUtilizedViewport.ts b/packages/component-core/src/hooks/useViewport/useUtilizedViewport.ts similarity index 100% rename from packages/react-components/src/hooks/useViewport/useUtilizedViewport.ts rename to packages/component-core/src/hooks/useViewport/useUtilizedViewport.ts diff --git a/packages/component-core/src/hooks/useViewport/useViewport.ts b/packages/component-core/src/hooks/useViewport/useViewport.ts new file mode 100644 index 000000000..33df00b2e --- /dev/null +++ b/packages/component-core/src/hooks/useViewport/useViewport.ts @@ -0,0 +1,18 @@ +import { createContext, useContext } from 'react'; +import { v4 as uuid } from 'uuid'; +import { type Viewport } from '@iot-app-kit/core'; + +export interface IViewportContext { + viewport?: Viewport; + setViewport(viewport: Viewport, lastUpdatedBy?: string): void; + group: string; + lastUpdatedBy?: string; + onViewportChange?: (viewport: Viewport) => void; +} + +export const ViewportContext = createContext({ + setViewport: () => {}, + group: uuid(), +}); + +export const useViewport = () => useContext(ViewportContext); diff --git a/packages/react-components/src/hooks/utils/bindStylesToDataStreams.spec.ts b/packages/component-core/src/hooks/utils/bindStylesToDataStreams.spec.ts similarity index 100% rename from packages/react-components/src/hooks/utils/bindStylesToDataStreams.spec.ts rename to packages/component-core/src/hooks/utils/bindStylesToDataStreams.spec.ts diff --git a/packages/react-components/src/hooks/utils/bindStylesToDataStreams.ts b/packages/component-core/src/hooks/utils/bindStylesToDataStreams.ts similarity index 100% rename from packages/react-components/src/hooks/utils/bindStylesToDataStreams.ts rename to packages/component-core/src/hooks/utils/bindStylesToDataStreams.ts diff --git a/packages/react-components/src/hooks/utils/combineTimeSeriesData.ts b/packages/component-core/src/hooks/utils/combineTimeSeriesData.ts similarity index 100% rename from packages/react-components/src/hooks/utils/combineTimeSeriesData.ts rename to packages/component-core/src/hooks/utils/combineTimeSeriesData.ts diff --git a/packages/component-core/src/index.ts b/packages/component-core/src/index.ts new file mode 100644 index 000000000..b59660c48 --- /dev/null +++ b/packages/component-core/src/index.ts @@ -0,0 +1,63 @@ +/** + * ONLY EXPORT THE PUBLIC API! + * + * carefully consider what should be part of the public API. Attempt to minimize the overall API surface area. + */ +export { useTheme } from './hooks/useTheming'; +export { useTimeSeriesData } from './hooks/useTimeSeriesData'; +export { + useViewport, + ViewportContext, + useUtilizedViewport, + type UtilizedViewportType, +} from './hooks/useViewport'; +export { + useAlarms, + type AlarmData, + type AlarmDataStatus, +} from './hooks/useAlarms'; +export { useAlarmsFromQueries } from './hooks/useAlarmsFromQueries'; +export { useSingleQueryAlarm } from './hooks/useSingleQueryAlarm'; +export { + parseAlarmStateAssetProperty, + mapAlarmRuleExpression, + type PascalCaseStateName, + isAlarmState, +} from './hooks/useAlarms/transformers'; +export { + type Viewport, + type Interval, + DEFAULT_ANOMALY_DATA_SOURCE_VIEWPORT, + useSiteWiseAnomalyDataSource, + queryClient, + useDescribeAssetModelCompositeModel, + useDescribeAssetProperty, + useGetAssetPropertyValueHistory, + useHistoricalAssetPropertyValues, + useLatestAssetPropertyValues, +} from './queries'; +export { convertAlarmQueryToAlarmRequest } from './queries/utils/convertAlarmQueryToAlarmRequest'; +export { transformAlarmsToThreshold } from './utils/transformAlarmsToThreshold'; +export { buildTransformAlarmForSingleQueryWidgets } from './utils/buildTransformAlarmForSingleQueryWidgets'; +export type { + AxisSettings, + ChartSize, + ComponentQuery, +} from './common/chartTypes'; +export { + COMPARISON_OPERATOR, + COMPARATOR_MAP, + DEFAULT_VIEWPORT, +} from './common/constants'; +export { + type AnomalyData, + type AnomalyDescription, + DataSourceLoader, + AnomalyObjectDataSourceTransformer, + AnomalyArrowDataSourceTransformer, + FieldType, + type AnomalyObjectDataSource, + type AnomalyArrowDataSource, +} from './data'; +export { getTimeSeriesQueries, getAlarmQueries } from './utils/queries'; +export { isDurationViewport } from './utils/isDurationViewport'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/utils/anySignal.ts b/packages/component-core/src/queries/common/anySignal.ts similarity index 100% rename from packages/react-components/src/queries/useAssetPropertyValues/requestExecution/utils/anySignal.ts rename to packages/component-core/src/queries/common/anySignal.ts diff --git a/packages/component-core/src/queries/common/constants.ts b/packages/component-core/src/queries/common/constants.ts new file mode 100644 index 000000000..9ebe88486 --- /dev/null +++ b/packages/component-core/src/queries/common/constants.ts @@ -0,0 +1 @@ +export const SITEWISE_PREVIEW_DATE = new Date(2018, 0, 1); diff --git a/packages/react-components/src/queries/useTimeSeriesData/types.ts b/packages/component-core/src/queries/common/types.ts similarity index 70% rename from packages/react-components/src/queries/useTimeSeriesData/types.ts rename to packages/component-core/src/queries/common/types.ts index f09f91f72..27e208149 100644 --- a/packages/react-components/src/queries/useTimeSeriesData/types.ts +++ b/packages/component-core/src/queries/common/types.ts @@ -2,16 +2,9 @@ import { type DurationViewport, type HistoricalViewport, } from '@iot-app-kit/core'; +import { type UseQueryOptions } from '@tanstack/react-query'; -export type LiveDataConfiguration = { - duration: number; - refreshRate: number; -}; - -export type SeriaizedRequest = Record< - string, - string | number | Date | undefined | Array ->; +export type QueryOptionsGlobal = Pick; export type Interval = { start: Date; diff --git a/packages/react-components/src/queries/index.ts b/packages/component-core/src/queries/index.ts similarity index 88% rename from packages/react-components/src/queries/index.ts rename to packages/component-core/src/queries/index.ts index d94679cda..435efc069 100644 --- a/packages/react-components/src/queries/index.ts +++ b/packages/component-core/src/queries/index.ts @@ -3,9 +3,9 @@ export * from './useDescribeAssetModelCompositeModel'; export * from './useGetAssetPropertyValueHistory'; export * from './useDescribeAssetProperty'; export * from './useSiteWiseAnomalyDataSource'; -export * from './useTimeSeriesData'; export * from './useDescribeAssets'; export * from './useDescribeAssetModels'; export * from './useLatestAssetPropertyValues'; export * from './useHistoricalAssetPropertyValues'; export * from './useDescribeAlarmModels'; +export type { Viewport, Interval } from './common/types'; diff --git a/packages/react-components/src/queries/predicates/index.ts b/packages/component-core/src/queries/predicates/index.ts similarity index 100% rename from packages/react-components/src/queries/predicates/index.ts rename to packages/component-core/src/queries/predicates/index.ts diff --git a/packages/react-components/src/queries/queryClient.ts b/packages/component-core/src/queries/queryClient.ts similarity index 100% rename from packages/react-components/src/queries/queryClient.ts rename to packages/component-core/src/queries/queryClient.ts diff --git a/packages/react-components/src/queries/useDescribeAlarmModels/describeAlarmModelQueryKeyFactory.ts b/packages/component-core/src/queries/useDescribeAlarmModels/describeAlarmModelQueryKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAlarmModels/describeAlarmModelQueryKeyFactory.ts rename to packages/component-core/src/queries/useDescribeAlarmModels/describeAlarmModelQueryKeyFactory.ts diff --git a/packages/react-components/src/queries/useDescribeAlarmModels/index.ts b/packages/component-core/src/queries/useDescribeAlarmModels/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAlarmModels/index.ts rename to packages/component-core/src/queries/useDescribeAlarmModels/index.ts diff --git a/packages/react-components/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.spec.ts b/packages/component-core/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.spec.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.spec.ts rename to packages/component-core/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.spec.ts diff --git a/packages/react-components/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.ts b/packages/component-core/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.ts rename to packages/component-core/src/queries/useDescribeAlarmModels/useDescribeAlarmModels.ts diff --git a/packages/react-components/src/queries/useDescribeAsset/describeAssetQueryKeyFactory.ts b/packages/component-core/src/queries/useDescribeAsset/describeAssetQueryKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAsset/describeAssetQueryKeyFactory.ts rename to packages/component-core/src/queries/useDescribeAsset/describeAssetQueryKeyFactory.ts diff --git a/packages/react-components/src/queries/useDescribeAsset/getDescribeAssetRequest.ts b/packages/component-core/src/queries/useDescribeAsset/getDescribeAssetRequest.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAsset/getDescribeAssetRequest.ts rename to packages/component-core/src/queries/useDescribeAsset/getDescribeAssetRequest.ts diff --git a/packages/react-components/src/queries/useDescribeAsset/index.ts b/packages/component-core/src/queries/useDescribeAsset/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAsset/index.ts rename to packages/component-core/src/queries/useDescribeAsset/index.ts diff --git a/packages/react-components/src/queries/useDescribeAsset/useDescribeAsset.ts b/packages/component-core/src/queries/useDescribeAsset/useDescribeAsset.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAsset/useDescribeAsset.ts rename to packages/component-core/src/queries/useDescribeAsset/useDescribeAsset.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModelCompositeModel/assetModelCompositeModelQueryKeyFactory.ts b/packages/component-core/src/queries/useDescribeAssetModelCompositeModel/assetModelCompositeModelQueryKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModelCompositeModel/assetModelCompositeModelQueryKeyFactory.ts rename to packages/component-core/src/queries/useDescribeAssetModelCompositeModel/assetModelCompositeModelQueryKeyFactory.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModelCompositeModel/getDescribeAssetModelCompositeModelRequest.ts b/packages/component-core/src/queries/useDescribeAssetModelCompositeModel/getDescribeAssetModelCompositeModelRequest.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModelCompositeModel/getDescribeAssetModelCompositeModelRequest.ts rename to packages/component-core/src/queries/useDescribeAssetModelCompositeModel/getDescribeAssetModelCompositeModelRequest.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModelCompositeModel/index.ts b/packages/component-core/src/queries/useDescribeAssetModelCompositeModel/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModelCompositeModel/index.ts rename to packages/component-core/src/queries/useDescribeAssetModelCompositeModel/index.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModelCompositeModel/useDescribeAssetModelCompositeModel.ts b/packages/component-core/src/queries/useDescribeAssetModelCompositeModel/useDescribeAssetModelCompositeModel.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModelCompositeModel/useDescribeAssetModelCompositeModel.ts rename to packages/component-core/src/queries/useDescribeAssetModelCompositeModel/useDescribeAssetModelCompositeModel.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModels/describeAssetModelQueryKeyFactory.ts b/packages/component-core/src/queries/useDescribeAssetModels/describeAssetModelQueryKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModels/describeAssetModelQueryKeyFactory.ts rename to packages/component-core/src/queries/useDescribeAssetModels/describeAssetModelQueryKeyFactory.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModels/index.ts b/packages/component-core/src/queries/useDescribeAssetModels/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModels/index.ts rename to packages/component-core/src/queries/useDescribeAssetModels/index.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModels/useDescribeAssetModels.spec.ts b/packages/component-core/src/queries/useDescribeAssetModels/useDescribeAssetModels.spec.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModels/useDescribeAssetModels.spec.ts rename to packages/component-core/src/queries/useDescribeAssetModels/useDescribeAssetModels.spec.ts diff --git a/packages/react-components/src/queries/useDescribeAssetModels/useDescribeAssetModels.ts b/packages/component-core/src/queries/useDescribeAssetModels/useDescribeAssetModels.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetModels/useDescribeAssetModels.ts rename to packages/component-core/src/queries/useDescribeAssetModels/useDescribeAssetModels.ts diff --git a/packages/react-components/src/queries/useDescribeAssetProperties/index.ts b/packages/component-core/src/queries/useDescribeAssetProperties/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetProperties/index.ts rename to packages/component-core/src/queries/useDescribeAssetProperties/index.ts diff --git a/packages/react-components/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts b/packages/component-core/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts similarity index 95% rename from packages/react-components/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts rename to packages/component-core/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts index 80722cb79..0da255f84 100644 --- a/packages/react-components/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts +++ b/packages/component-core/src/queries/useDescribeAssetProperties/useDescribeAssetProperties.ts @@ -4,9 +4,9 @@ import { createDescribeAssetPropertyQueryFn, isDescribeAssetPropertyEnabled, } from '../useDescribeAssetProperty'; -import { createNonNullableList } from '../../utils/createNonNullableList'; import { DescribeAssetPropertyCacheKeyFactory } from '../useDescribeAssetProperty/describeAssetPropertyQueryKeyFactory'; import { queryClient } from '../queryClient'; +import { createNonNullableList } from '@iot-app-kit/core'; export interface UseDescribeAssetPropertiesOptions { client?: IoTSiteWiseClient; diff --git a/packages/react-components/src/queries/useDescribeAssetProperty/describeAssetPropertyQueryKeyFactory.ts b/packages/component-core/src/queries/useDescribeAssetProperty/describeAssetPropertyQueryKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetProperty/describeAssetPropertyQueryKeyFactory.ts rename to packages/component-core/src/queries/useDescribeAssetProperty/describeAssetPropertyQueryKeyFactory.ts diff --git a/packages/react-components/src/queries/useDescribeAssetProperty/getDescribeAssetPropertyRequest.ts b/packages/component-core/src/queries/useDescribeAssetProperty/getDescribeAssetPropertyRequest.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetProperty/getDescribeAssetPropertyRequest.ts rename to packages/component-core/src/queries/useDescribeAssetProperty/getDescribeAssetPropertyRequest.ts diff --git a/packages/react-components/src/queries/useDescribeAssetProperty/index.ts b/packages/component-core/src/queries/useDescribeAssetProperty/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetProperty/index.ts rename to packages/component-core/src/queries/useDescribeAssetProperty/index.ts diff --git a/packages/react-components/src/queries/useDescribeAssetProperty/useDescribeAssetProperty.ts b/packages/component-core/src/queries/useDescribeAssetProperty/useDescribeAssetProperty.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssetProperty/useDescribeAssetProperty.ts rename to packages/component-core/src/queries/useDescribeAssetProperty/useDescribeAssetProperty.ts diff --git a/packages/react-components/src/queries/useDescribeAssets/index.ts b/packages/component-core/src/queries/useDescribeAssets/index.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssets/index.ts rename to packages/component-core/src/queries/useDescribeAssets/index.ts diff --git a/packages/react-components/src/queries/useDescribeAssets/useDescribeAssets.spec.tsx b/packages/component-core/src/queries/useDescribeAssets/useDescribeAssets.spec.tsx similarity index 100% rename from packages/react-components/src/queries/useDescribeAssets/useDescribeAssets.spec.tsx rename to packages/component-core/src/queries/useDescribeAssets/useDescribeAssets.spec.tsx diff --git a/packages/react-components/src/queries/useDescribeAssets/useDescribeAssets.ts b/packages/component-core/src/queries/useDescribeAssets/useDescribeAssets.ts similarity index 100% rename from packages/react-components/src/queries/useDescribeAssets/useDescribeAssets.ts rename to packages/component-core/src/queries/useDescribeAssets/useDescribeAssets.ts diff --git a/packages/react-components/src/queries/useGetAssetPropertyValueHistory/getAssetPropertyValueHistoryQueryKeyFactory.ts b/packages/component-core/src/queries/useGetAssetPropertyValueHistory/getAssetPropertyValueHistoryQueryKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useGetAssetPropertyValueHistory/getAssetPropertyValueHistoryQueryKeyFactory.ts rename to packages/component-core/src/queries/useGetAssetPropertyValueHistory/getAssetPropertyValueHistoryQueryKeyFactory.ts diff --git a/packages/react-components/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts b/packages/component-core/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts similarity index 97% rename from packages/react-components/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts rename to packages/component-core/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts index d6a0e2dd7..52c44aa0f 100644 --- a/packages/react-components/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts +++ b/packages/component-core/src/queries/useGetAssetPropertyValueHistory/getGetAssetPropertyValueHistoryRequest.ts @@ -3,7 +3,7 @@ import { type GetAssetPropertyValueHistoryCommandOutput, type IoTSiteWiseClient, } from '@aws-sdk/client-iotsitewise'; -import { createNonNullableList } from '../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; export class GetGetAssetPropertyValueHistoryRequest { readonly #command: GetAssetPropertyValueHistoryCommand; diff --git a/packages/react-components/src/queries/useGetAssetPropertyValueHistory/index.ts b/packages/component-core/src/queries/useGetAssetPropertyValueHistory/index.ts similarity index 100% rename from packages/react-components/src/queries/useGetAssetPropertyValueHistory/index.ts rename to packages/component-core/src/queries/useGetAssetPropertyValueHistory/index.ts diff --git a/packages/react-components/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts b/packages/component-core/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts similarity index 97% rename from packages/react-components/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts rename to packages/component-core/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts index 6bfcf169a..19290cb76 100644 --- a/packages/react-components/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts +++ b/packages/component-core/src/queries/useGetAssetPropertyValueHistory/useGetAssetPropertyValueHistory.ts @@ -6,7 +6,6 @@ import { import invariant from 'tiny-invariant'; import { AssetPropertyValueHistoryCacheKeyFactory } from './getAssetPropertyValueHistoryQueryKeyFactory'; import { GetGetAssetPropertyValueHistoryRequest } from './getGetAssetPropertyValueHistoryRequest'; -import { createNonNullableList } from '../../utils/createNonNullableList'; import { queryClient } from '../queryClient'; import { hasClient, @@ -15,6 +14,7 @@ import { isPropertyId, isStartDate, } from '../predicates'; +import { createNonNullableList } from '@iot-app-kit/core'; export interface UseGetAssetPropertyValueHistoryOptions { client?: IoTSiteWiseClient; diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/historicalAssetPropertyValueKeyFactory.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/historicalAssetPropertyValueKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/historicalAssetPropertyValueKeyFactory.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/historicalAssetPropertyValueKeyFactory.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/index.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/index.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/index.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/index.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/batchResponseProcessor.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/batchResponseProcessor.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/batchResponseProcessor.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/batchResponseProcessor.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts similarity index 98% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts index 07a816f21..be6da57d9 100644 --- a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts +++ b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/batcher.ts @@ -8,12 +8,12 @@ import { type HistoricalAssetPropertyValueRequest, type HistoricalAssetPropertyValueResponse, } from '../types'; -import { anySignal } from '../../useAssetPropertyValues/requestExecution/utils/anySignal'; import { type BatchGetAssetPropertyValueHistoryErrorEntry } from '@aws-sdk/client-iotsitewise'; import { BatchResponseProcessor } from './batchResponseProcessor'; import { mapViewport } from './mapViewport'; import { mapTimeOrdering } from './mapTimeOrdering'; import { DEFAULT_MAX_RESULTS } from './constants'; +import { anySignal } from '../../common/anySignal'; type LoaderRequest = HistoricalAssetPropertyValueRequest & { abortSignal: AbortSignal; diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/constants.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/constants.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/constants.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/constants.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/getHistoricalAssetPropertyValueRequest.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/getHistoricalAssetPropertyValueRequest.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/getHistoricalAssetPropertyValueRequest.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/getHistoricalAssetPropertyValueRequest.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/index.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/index.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/index.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/index.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapTimeOrdering.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapTimeOrdering.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapTimeOrdering.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapTimeOrdering.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts similarity index 89% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts index db680acc9..c65655f98 100644 --- a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts +++ b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/requestExecution/mapViewport.ts @@ -4,7 +4,7 @@ import { viewportStartDate, } from '@iot-app-kit/core'; import { type FetchMode } from '../types'; -import { SITEWISE_PREVIEW_DATE } from '../../useAssetPropertyValues/utils/timeConstants'; +import { SITEWISE_PREVIEW_DATE } from '../../common/constants'; export const mapViewport = ({ viewport, diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/types.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/types.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/types.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/types.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.spec.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.spec.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.spec.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.spec.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues.ts diff --git a/packages/react-components/src/queries/useHistoricalAssetPropertyValues/useRefreshRate.ts b/packages/component-core/src/queries/useHistoricalAssetPropertyValues/useRefreshRate.ts similarity index 100% rename from packages/react-components/src/queries/useHistoricalAssetPropertyValues/useRefreshRate.ts rename to packages/component-core/src/queries/useHistoricalAssetPropertyValues/useRefreshRate.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/index.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/index.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/index.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/index.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/latestAssetPropertyValueKeyFactory.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/latestAssetPropertyValueKeyFactory.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/latestAssetPropertyValueKeyFactory.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/latestAssetPropertyValueKeyFactory.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts similarity index 98% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts index 4cd569b88..b5063d745 100644 --- a/packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts +++ b/packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/batcher.ts @@ -8,8 +8,8 @@ import { type LatestAssetPropertyValueRequest, type LatestAssetPropertyValueResponse, } from '../types'; -import { anySignal } from '../../useAssetPropertyValues/requestExecution/utils/anySignal'; import { type BatchGetAssetPropertyValueErrorEntry } from '@aws-sdk/client-iotsitewise'; +import { anySignal } from '../../common/anySignal'; type LoaderRequest = LatestAssetPropertyValueRequest & { abortSignal: AbortSignal; diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/getLatestAssetPropertyValueRequest.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/getLatestAssetPropertyValueRequest.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/getLatestAssetPropertyValueRequest.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/getLatestAssetPropertyValueRequest.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/index.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/index.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/requestExecution/index.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/requestExecution/index.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/types.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/types.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/types.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/types.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.spec.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.spec.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.spec.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.spec.ts diff --git a/packages/react-components/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.ts b/packages/component-core/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.ts similarity index 100% rename from packages/react-components/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.ts rename to packages/component-core/src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/constants.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/constants.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/constants.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/constants.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/getAnomalyResultProperty.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/getAnomalyResultProperty.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/getAnomalyResultProperty.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/getAnomalyResultProperty.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/index.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/index.ts similarity index 62% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/index.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/index.ts index 3159ec156..70ddc09ab 100644 --- a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/index.ts +++ b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/index.ts @@ -1 +1,2 @@ export * from './useSiteWiseAnomalyDataSource'; +export * from './constants'; diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.spec.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.spec.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.spec.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.spec.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/completeAnomalyEvents.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/extractDiagnoticProperties.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/extractDiagnoticProperties.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/extractDiagnoticProperties.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/extractDiagnoticProperties.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isAnomalyEvent.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isAnomalyEvent.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isAnomalyEvent.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isAnomalyEvent.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isDiagnostic.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isDiagnostic.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isDiagnostic.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/isDiagnostic.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts similarity index 93% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts index 3503c1ed5..e89961944 100644 --- a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts +++ b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvent.ts @@ -2,7 +2,7 @@ import { type AssetPropertyValue } from '@aws-sdk/client-iotsitewise'; import { isAnomalyEvent } from './isAnomalyEvent'; import { type AnomalyEvent } from './types'; import { parseDiagnostics } from './parseDiagnostics'; -import { toTimestamp } from '../../../utils/time'; +import { toTimestamp } from '@iot-app-kit/core'; export const parseAnomalyEvent = ( assetPropertyValue: AssetPropertyValue diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.spec.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.spec.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.spec.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.spec.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts similarity index 79% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts index de2ea8dac..0fe2dbf3b 100644 --- a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts +++ b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseAnomalyEvents.ts @@ -1,6 +1,6 @@ import { type AssetPropertyValue } from '@aws-sdk/client-iotsitewise'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; import { parseAnomalyEvent } from './parseAnomalyEvent'; +import { createNonNullableList } from '@iot-app-kit/core'; export const parseAnomalyEvents = ( assetPropertyValues: AssetPropertyValue[] diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseDiagnostics.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseDiagnostics.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseDiagnostics.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/parseDiagnostics.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/types.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/types.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/types.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/parseAnomaly/types.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/useAnomalyEventsViewport.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/useAnomalyEventsViewport.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/useAnomalyEventsViewport.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/useAnomalyEventsViewport.ts diff --git a/packages/react-components/src/queries/useSiteWiseAnomalyDataSource/useSiteWiseAnomalyDataSource.ts b/packages/component-core/src/queries/useSiteWiseAnomalyDataSource/useSiteWiseAnomalyDataSource.ts similarity index 100% rename from packages/react-components/src/queries/useSiteWiseAnomalyDataSource/useSiteWiseAnomalyDataSource.ts rename to packages/component-core/src/queries/useSiteWiseAnomalyDataSource/useSiteWiseAnomalyDataSource.ts diff --git a/packages/react-components/src/queries/utils/convertAlarmQueryToAlarmRequest.ts b/packages/component-core/src/queries/utils/convertAlarmQueryToAlarmRequest.ts similarity index 100% rename from packages/react-components/src/queries/utils/convertAlarmQueryToAlarmRequest.ts rename to packages/component-core/src/queries/utils/convertAlarmQueryToAlarmRequest.ts diff --git a/packages/react-components/src/queries/utils/useTimeSeriesDataQuerySync.ts b/packages/component-core/src/queries/utils/useTimeSeriesDataQuerySync.ts similarity index 100% rename from packages/react-components/src/queries/utils/useTimeSeriesDataQuerySync.ts rename to packages/component-core/src/queries/utils/useTimeSeriesDataQuerySync.ts diff --git a/packages/react-components/src/testing/alarms/index.ts b/packages/component-core/src/testing/alarms/index.ts similarity index 100% rename from packages/react-components/src/testing/alarms/index.ts rename to packages/component-core/src/testing/alarms/index.ts diff --git a/packages/react-components/src/testing/alarms/mockAlarmData.ts b/packages/component-core/src/testing/alarms/mockAlarmData.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockAlarmData.ts rename to packages/component-core/src/testing/alarms/mockAlarmData.ts diff --git a/packages/react-components/src/testing/alarms/mockAlarmModel.ts b/packages/component-core/src/testing/alarms/mockAlarmModel.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockAlarmModel.ts rename to packages/component-core/src/testing/alarms/mockAlarmModel.ts diff --git a/packages/react-components/src/testing/alarms/mockCompositeModels.ts b/packages/component-core/src/testing/alarms/mockCompositeModels.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockCompositeModels.ts rename to packages/component-core/src/testing/alarms/mockCompositeModels.ts diff --git a/packages/react-components/src/testing/alarms/mockDescribeAsset.ts b/packages/component-core/src/testing/alarms/mockDescribeAsset.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockDescribeAsset.ts rename to packages/component-core/src/testing/alarms/mockDescribeAsset.ts diff --git a/packages/react-components/src/testing/alarms/mockDescribeAssetModel.ts b/packages/component-core/src/testing/alarms/mockDescribeAssetModel.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockDescribeAssetModel.ts rename to packages/component-core/src/testing/alarms/mockDescribeAssetModel.ts diff --git a/packages/react-components/src/testing/alarms/mockEventsClient.ts b/packages/component-core/src/testing/alarms/mockEventsClient.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockEventsClient.ts rename to packages/component-core/src/testing/alarms/mockEventsClient.ts diff --git a/packages/react-components/src/testing/alarms/mockIds.ts b/packages/component-core/src/testing/alarms/mockIds.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockIds.ts rename to packages/component-core/src/testing/alarms/mockIds.ts diff --git a/packages/react-components/src/testing/alarms/mockProperties.ts b/packages/component-core/src/testing/alarms/mockProperties.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockProperties.ts rename to packages/component-core/src/testing/alarms/mockProperties.ts diff --git a/packages/react-components/src/testing/alarms/mockSiteWiseClient.ts b/packages/component-core/src/testing/alarms/mockSiteWiseClient.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockSiteWiseClient.ts rename to packages/component-core/src/testing/alarms/mockSiteWiseClient.ts diff --git a/packages/react-components/src/testing/alarms/mockStatuses.ts b/packages/component-core/src/testing/alarms/mockStatuses.ts similarity index 100% rename from packages/react-components/src/testing/alarms/mockStatuses.ts rename to packages/component-core/src/testing/alarms/mockStatuses.ts diff --git a/packages/component-core/src/testing/mockWidgetProperties.ts b/packages/component-core/src/testing/mockWidgetProperties.ts new file mode 100644 index 000000000..334ddb214 --- /dev/null +++ b/packages/component-core/src/testing/mockWidgetProperties.ts @@ -0,0 +1,132 @@ +import { + DATA_TYPE, + STATUS_ICON_TYPE, + type Threshold, + type DataStream, + COMPARISON_OPERATOR, + type HistoricalViewport, +} from '@iot-app-kit/core'; +import { DAY_IN_MS } from '@iot-app-kit/core'; + +export const VIEWPORT: HistoricalViewport = { + start: new Date(2000, 0, 0, 0), + end: new Date(2001, 0, 0, 0), +}; + +export const START_DATE = new Date(2000, 0, 0); + +/** + * Shared Mock Data + */ + +export const NUMBER_EMPTY_STREAM: DataStream = { + id: 'empty-info-id', + dataType: DATA_TYPE.NUMBER, + data: [], + color: 'blue', + name: 'empty-info-name', + resolution: 0, +}; + +export const NUMBER_STREAM_1: DataStream = { + id: 'number-some-id', + dataType: DATA_TYPE.NUMBER, + color: 'cyan', + name: 'number-some-name', + resolution: 0, + data: [ + { + x: new Date(2000, 0, 0, 0, 0).getTime(), + y: 100, + }, + ], +}; + +export const NUMBER_STREAM_2: DataStream = { + id: 'number-some-id-2', + dataType: DATA_TYPE.NUMBER, + color: 'black', + name: 'number-some-name-2', + resolution: 0, + data: [ + { + x: new Date(2000, 0, 0, 0, 0).getTime(), + y: 9999, + }, + ], +}; + +export const STRING_STREAM_1: DataStream = { + id: 'some-id', + dataType: DATA_TYPE.STRING, + color: 'red', + name: 'some-name', + resolution: 0, + data: [ + { + x: new Date(2000, 0, 0, 0, 0).getTime(), + y: 'ALARM', + }, + ], +}; + +export const STRING_STREAM_2: DataStream = { + id: 'some-id-2', + color: 'green', + name: 'some-name-2', + dataType: DATA_TYPE.STRING, + resolution: 0, + data: [ + { + x: new Date(2000, 0, 0, 0, 0).getTime(), + y: 'OK', + }, + ], +}; + +export const DATA_STREAM: DataStream = { + id: 'some-id', + detailedName: 'data-stream-name/detailed-name', + name: 'data-stream-name', + color: 'black', + resolution: 0, + dataType: DATA_TYPE.NUMBER, + data: [], +}; + +export const DATA_STREAM_2: DataStream = { + id: 'id-2', + name: 'data-stream-name-2', + color: 'black', + resolution: 0, + dataType: DATA_TYPE.NUMBER, + data: [], +}; + +const THRESHOLD_VALUE = 20; +export const THRESHOLD: Threshold = { + color: 'purple', + value: THRESHOLD_VALUE, + comparisonOperator: COMPARISON_OPERATOR.LT, +}; + +// since we have a 'less than' operation, it breaches if it is below the threshold value. +export const BREACHING_VALUE = THRESHOLD_VALUE - 1; +/** + * Construct mock alarms streams and related resources + */ + +export const ALARM = 'alarm'; +export const OK = 'ok'; + +export const ALARM_THRESHOLD: Threshold = { + value: ALARM, + color: 'orange', + comparisonOperator: COMPARISON_OPERATOR.EQ, + icon: STATUS_ICON_TYPE.active, +}; + +export const WITHIN_VIEWPORT_DATE = new Date(2000, 0, 1); +export const BEFORE_VIEWPORT_DATE = new Date( + VIEWPORT.start.getTime() - DAY_IN_MS +); diff --git a/packages/react-components/src/utils/buildTransformAlarmForSingleQueryWidgets.ts b/packages/component-core/src/utils/buildTransformAlarmForSingleQueryWidgets.ts similarity index 100% rename from packages/react-components/src/utils/buildTransformAlarmForSingleQueryWidgets.ts rename to packages/component-core/src/utils/buildTransformAlarmForSingleQueryWidgets.ts diff --git a/packages/react-components/src/echarts/unboundedZoom/isDurationViewport.ts b/packages/component-core/src/utils/isDurationViewport.ts similarity index 100% rename from packages/react-components/src/echarts/unboundedZoom/isDurationViewport.ts rename to packages/component-core/src/utils/isDurationViewport.ts diff --git a/packages/react-components/src/utils/queries.ts b/packages/component-core/src/utils/queries.ts similarity index 100% rename from packages/react-components/src/utils/queries.ts rename to packages/component-core/src/utils/queries.ts diff --git a/packages/react-components/src/utils/transformAlarmsToThreshold.spec.ts b/packages/component-core/src/utils/transformAlarmsToThreshold.spec.ts similarity index 100% rename from packages/react-components/src/utils/transformAlarmsToThreshold.spec.ts rename to packages/component-core/src/utils/transformAlarmsToThreshold.spec.ts diff --git a/packages/react-components/src/utils/transformAlarmsToThreshold.ts b/packages/component-core/src/utils/transformAlarmsToThreshold.ts similarity index 100% rename from packages/react-components/src/utils/transformAlarmsToThreshold.ts rename to packages/component-core/src/utils/transformAlarmsToThreshold.ts diff --git a/packages/component-core/tsconfig.cjs.json b/packages/component-core/tsconfig.cjs.json new file mode 100644 index 000000000..727b1d592 --- /dev/null +++ b/packages/component-core/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@iot-app-kit/ts-config/tsconfig.cjs.json", + "include": ["src"], + "files": [], + "exclude": [ + "./src/**/*.spec.*", + "./src/**/*.test.*", + "./src/**/__mocks__", + "./src/**/testing" + ], + "compilerOptions": { + "types": [], + "outDir": "./dist/cjs", + "tsBuildInfoFile": "./dist/cjs/.tsbuildinfo" + } +} diff --git a/packages/component-core/tsconfig.esm.json b/packages/component-core/tsconfig.esm.json new file mode 100644 index 000000000..72cf67a63 --- /dev/null +++ b/packages/component-core/tsconfig.esm.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@iot-app-kit/ts-config/tsconfig.esm.json", + "include": ["src"], + "files": [], + "exclude": [ + "./src/**/*.spec.*", + "./src/**/*.test.*", + "./src/**/__mocks__", + "./src/**/testing" + ], + "compilerOptions": { + "types": [], + "outDir": "./dist/esm", + "tsBuildInfoFile": "./dist/esm/.tsbuildinfo" + } +} diff --git a/packages/component-core/tsconfig.json b/packages/component-core/tsconfig.json new file mode 100644 index 000000000..da080b641 --- /dev/null +++ b/packages/component-core/tsconfig.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@iot-app-kit/ts-config/tsconfig.base.json", + "include": ["src", "stories", "e2e", "vite.config.ts", "__mocks__"], + "files": ["vitest.setup.ts"], + "compilerOptions": { + "types": ["vite/client", "vitest/globals", "jest-extended"] + } +} diff --git a/packages/component-core/vite.config.ts b/packages/component-core/vite.config.ts new file mode 100644 index 000000000..e68518159 --- /dev/null +++ b/packages/component-core/vite.config.ts @@ -0,0 +1,29 @@ +/// +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + test: { + pool: 'threads', + include: ['./src/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + globals: true, + css: false, + environment: 'happy-dom', + setupFiles: [ + './vitest.setup.ts', + 'vitest-canvas-mock', + 'jest-extended/all', + ], + retry: 3, + coverage: { + thresholds: { + statements: 60, + branches: 75, + functions: 70, + lines: 60, + }, + }, + }, +}); diff --git a/packages/component-core/vitest.setup.ts b/packages/component-core/vitest.setup.ts new file mode 100644 index 000000000..8197977c3 --- /dev/null +++ b/packages/component-core/vitest.setup.ts @@ -0,0 +1,49 @@ +import '@testing-library/jest-dom'; +import { act } from '@testing-library/react'; +import type * as ZustandExportedTypes from 'zustand'; + +const { create: actualCreate } = await vi.importActual< + typeof ZustandExportedTypes +>('zustand'); + +// a variable to hold reset functions for all stores declared in the app +export const storeResetFns = new Set<() => void>(); + +const createUncurried = ( + stateCreator: ZustandExportedTypes.StateCreator +) => { + const store = actualCreate(stateCreator); + const initialState = store.getInitialState(); + storeResetFns.add(() => { + store.setState(initialState, true); + }); + return store; +}; + +// when creating a store, we get its initial state, create a reset function and add it in the set +export const create = (( + stateCreator: ZustandExportedTypes.StateCreator +) => { + console.log('zustand create mock'); + + // to support curried version of create + return typeof stateCreator === 'function' + ? createUncurried(stateCreator) + : createUncurried; +}) as typeof ZustandExportedTypes.create; + +vi.mock('zustand', async (importActual) => { + return { + ...(await importActual()), + create, + }; +}); + +// reset all stores after each test run +afterEach(() => { + act(() => { + storeResetFns.forEach((resetFn) => { + resetFn(); + }); + }); +}); diff --git a/packages/core/package.json b/packages/core/package.json index b6a06fdea..ed966d0fa 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -56,6 +56,7 @@ "@types/node": "^18.16.18", "@types/uuid": "^9.0.2", "@vitest/coverage-v8": "^2.1.5", + "date-fns-tz": "^2.0.1", "eslint-config-iot-app-kit": "12.5.0", "flush-promises": "^1.0.2", "jest-extended": "^3.2.4", diff --git a/packages/core/src/common/createNonNullableList.ts b/packages/core/src/common/createNonNullableList.ts new file mode 100644 index 000000000..352015a1a --- /dev/null +++ b/packages/core/src/common/createNonNullableList.ts @@ -0,0 +1,7 @@ +export function createNonNullableList( + list: T[] +): NonNullable[] { + return list.filter>( + (item): item is NonNullable => item != null + ); +} diff --git a/packages/core/src/common/time.spec.ts b/packages/core/src/common/time.spec.ts index 1741656ad..0a0f473dd 100644 --- a/packages/core/src/common/time.spec.ts +++ b/packages/core/src/common/time.spec.ts @@ -2,10 +2,12 @@ import { convertMS, DAY_IN_MS, displayDate, + formatDate, HOUR_IN_MS, MINUTE_IN_MS, MONTH_IN_MS, SECOND_IN_MS, + toTimestamp, YEAR_IN_MS, } from './time'; @@ -241,3 +243,72 @@ describe('display date', () => { }); }); }); + +describe('formatDate', () => { + it('correctly converts to a different timezone', () => { + const date = new Date(0).getTime(); + + const formattedDate = formatDate(date, { timeZone: 'America/Denver' }); + + // UTC-7 + expect(formattedDate).toBe('1969-12-31 05:00:00 p.m.'); + + const formattedDate2 = formatDate(date, { timeZone: 'Asia/Tokyo' }); + + // UTC+9 + expect(formattedDate2).toBe('1970-01-01 09:00:00 a.m.'); + }); + + it('converts date to specified pattern', () => { + const date = new Date(0).getTime(); + + const formattedDate = formatDate(date, { + timeZone: 'America/Denver', + pattern: 'hh:mm a', + }); + expect(formattedDate).toBe('05:00 PM'); + }); +}); + +describe('toTimestamp', () => { + it('can handle an undefined time', () => { + expect(toTimestamp(undefined)).toBe(0); + expect( + toTimestamp({ + timeInSeconds: undefined, + offsetInNanos: undefined, + }) + ).toBe(0); + }); + it('converts a time with seconds and nanos to milliseconds', () => { + expect( + toTimestamp({ + timeInSeconds: 0.1, + offsetInNanos: 1000000, + }) + ).toBe(101); + }); + it('converts a time with only seconds to milliseconds', () => { + expect( + toTimestamp({ + timeInSeconds: 0.1, + }) + ).toBe(100); + }); + it('converts a time with only nanos to milliseconds', () => { + expect( + toTimestamp({ + timeInSeconds: undefined, + offsetInNanos: 1000000, + }) + ).toBe(1); + }); + it('does not return fractional milliseconds', () => { + expect( + toTimestamp({ + timeInSeconds: undefined, + offsetInNanos: 1000, + }) + ).toBe(0); + }); +}); diff --git a/packages/core/src/common/time.ts b/packages/core/src/common/time.ts index 7c061587b..0ef2a138c 100644 --- a/packages/core/src/common/time.ts +++ b/packages/core/src/common/time.ts @@ -1,4 +1,6 @@ import parse from 'parse-duration'; +import { utcToZonedTime, format } from 'date-fns-tz'; +import { type TimeInNanos } from '@aws-sdk/client-iotsitewise'; export const NANO_SECOND_IN_MS = 1 / 1000000; export const SECOND_IN_MS = 1000; @@ -10,6 +12,7 @@ export const MONTH_IN_MS = 30 * DAY_IN_MS; export const YEAR_IN_MS = 12 * MONTH_IN_MS; // Global time format strings +export const DEFAULT_DATE_TIME = 'yyyy-MM-dd hh:mm:ss aaaa'; export const SHORT_TIME = 'hh:mm a'; export const FULL_DATE = 'yyy-MM-dd hh:mm:ss a'; @@ -156,3 +159,33 @@ export const parseDuration = (duration: number | string): number => { // if duration is a string but we cannot parse it, we default to 10 mins. return parsedTime != null ? parsedTime : 10 * MINUTE_IN_MS; }; + +// https://date-fns.org/v3.6.0/docs/Time-Zones#date-fns-tz +// converts an epoch date to a formatted string in a specific timeZone +export const formatDate = ( + dateTime: number, + options?: { timeZone?: string; pattern?: string } +) => { + const formatPattern = options?.pattern ?? DEFAULT_DATE_TIME; + + const userTimeZone = + options?.timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone; + + // Convert epoch time to a zoned date object + const zonedDate = utcToZonedTime(new Date(dateTime), userTimeZone); + + const formattedString = format(zonedDate, formatPattern, { + timeZone: userTimeZone, + }); + + return formattedString; +}; + +/** converts the TimeInNanos to milliseconds */ +export const toTimestamp = (time: TimeInNanos | undefined): number => + (time && + Math.floor( + (time.timeInSeconds || 0) * SECOND_IN_MS + + (time.offsetInNanos || 0) * NANO_SECOND_IN_MS + )) || + 0; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index ff1b77085..ebb1d7384 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -15,7 +15,14 @@ export { toSiteWiseAssetProperty } from './common/dataStreamId'; // Viewport utilities export { isDurationViewport, isHistoricalViewport } from './common/predicates'; -export { parseDuration } from './common/time'; +export { + parseDuration, + formatDate, + toTimestamp, + convertMS, + FULL_DATE, + DEFAULT_DATE_TIME, +} from './common/time'; export { viewportEndDate, viewportStartDate } from './common/viewport'; export { viewportManager } from './viewportManager/viewportManager'; @@ -68,3 +75,5 @@ export type { RequestResponse, RequestTimeout, } from './requestFunctions'; + +export { createNonNullableList } from './common/createNonNullableList'; diff --git a/packages/react-components/.env.example b/packages/react-components/.env.example index f9d0ba292..b9d4fbfad 100644 --- a/packages/react-components/.env.example +++ b/packages/react-components/.env.example @@ -1,9 +1,9 @@ -AWS_ACCESS_KEY_ID=xxxxxxxxxx -AWS_SECRET_ACCESS_KEY=xxxxxxxxxx -AWS_SESSION_TOKEN=xxxxxxxxxx -AWS_REGION=xxxxxxxxxx +VITE_AWS_ACCESS_KEY_ID=xxxxxxxxxx +VITE_AWS_SECRET_ACCESS_KEY=xxxxxxxxxx +VITE_AWS_SESSION_TOKEN=xxxxxxxxxx +VITE_AWS_REGION=xxxxxxxxxx -ASSET_ID_1=xxxxxxxxxx -PROPERTY_ID_1=xxxxxxxxxx -PROPERTY_ID_2=xxxxxxxxxx -PROPERTY_ID_3=xxxxxxxxxx \ No newline at end of file +VITE_ASSET_ID_1=xxxxxxxxxx +VITE_PROPERTY_ID_1=xxxxxxxxxx +VITE_PROPERTY_ID_2=xxxxxxxxxx +VITE_PROPERTY_ID_3=xxxxxxxxxx \ No newline at end of file diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 34fd4c9e6..d6bafc2b9 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -119,6 +119,8 @@ "@iot-app-kit/charts-core": "^2.1.2", "@iot-app-kit/core": "12.5.0", "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/component-core": "12.5.0", + "@iot-app-kit/resource-explorer": "12.5.0", "@iot-app-kit/source-iotsitewise": "12.5.0", "@iot-app-kit/source-iottwinmaker": "12.5.0", "@tanstack/react-query": "^5.32.1", diff --git a/packages/react-components/src/common/constants.ts b/packages/react-components/src/common/constants.ts index c203f1482..1c9c5663b 100644 --- a/packages/react-components/src/common/constants.ts +++ b/packages/react-components/src/common/constants.ts @@ -1,5 +1,4 @@ import { type LegendConfig } from '@iot-app-kit/charts-core'; -import type { Viewport } from '@iot-app-kit/core'; /** * Stream type is a classification of a `DataStream`, which contains with it additional structure and features specific @@ -29,24 +28,6 @@ export enum LEGEND_POSITION { BOTTOM = 'BOTTOM', } -export enum COMPARISON_OPERATOR { - LESS_THAN = 'LT', - GREATER_THAN = 'GT', - LESS_THAN_EQUAL = 'LTE', - GREATER_THAN_EQUAL = 'GTE', - EQUAL = 'EQ', - CONTAINS = 'CONTAINS', -} - -export const COMPARATOR_MAP = { - GTE: '>=', - GT: '>', - LTE: '<=', - LT: '<', - EQ: '=', - CONTAINS: 'Contains', -}; - export enum StatusIconType { ERROR = 'error', ACTIVE = 'active', @@ -85,8 +66,6 @@ export enum TREND_TYPE { LINEAR = 'linear-regression', } -export const DEFAULT_VIEWPORT: Viewport = { duration: '10m' }; - export const DEFAULT_LEGEND: LegendConfig = { position: LEGEND_POSITION.BOTTOM, width: 0, diff --git a/packages/react-components/src/components/alarm-components/alarm-content/types.ts b/packages/react-components/src/components/alarm-components/alarm-content/types.ts index 2e8a6a968..aae801c7c 100644 --- a/packages/react-components/src/components/alarm-components/alarm-content/types.ts +++ b/packages/react-components/src/components/alarm-components/alarm-content/types.ts @@ -1,4 +1,4 @@ -import { type PascalCaseStateName } from '../../../hooks/useAlarms/transformers'; +import { type PascalCaseStateName } from '@iot-app-kit/component-core'; export type AlarmContent = { alarmName?: string; diff --git a/packages/react-components/src/components/alarm-components/alarm-icons/getIconForAlarmState.ts b/packages/react-components/src/components/alarm-components/alarm-icons/getIconForAlarmState.ts index 09031a18b..5e5a4acbb 100644 --- a/packages/react-components/src/components/alarm-components/alarm-icons/getIconForAlarmState.ts +++ b/packages/react-components/src/components/alarm-components/alarm-icons/getIconForAlarmState.ts @@ -1,5 +1,5 @@ import type * as React from 'react'; -import { type PascalCaseStateName } from '../../../hooks/useAlarms/transformers'; +import { type PascalCaseStateName } from '@iot-app-kit/component-core'; import { alarmAcknowledgedIcon, alarmActiveIcon, diff --git a/packages/react-components/src/components/alarm-components/alarm-state/alarmStateText.tsx b/packages/react-components/src/components/alarm-components/alarm-state/alarmStateText.tsx index de3d7a549..f8f5205f3 100644 --- a/packages/react-components/src/components/alarm-components/alarm-state/alarmStateText.tsx +++ b/packages/react-components/src/components/alarm-components/alarm-state/alarmStateText.tsx @@ -8,8 +8,10 @@ import { spaceScaledXxs, } from '@cloudscape-design/design-tokens'; import { Spinner } from '@cloudscape-design/components'; -import { type AlarmDataStatus } from '../../../hooks/useAlarms'; -import { type PascalCaseStateName } from '../../../hooks/useAlarms/transformers'; +import { + type AlarmDataStatus, + type PascalCaseStateName, +} from '@iot-app-kit/component-core'; import './alarmStateText.css'; export type AlarmStateTextOptions = { diff --git a/packages/react-components/src/components/alarm-components/alarm-state/alarmStateTextCustomIcon.tsx b/packages/react-components/src/components/alarm-components/alarm-state/alarmStateTextCustomIcon.tsx index 2dac54c7e..f81e35dfc 100644 --- a/packages/react-components/src/components/alarm-components/alarm-state/alarmStateTextCustomIcon.tsx +++ b/packages/react-components/src/components/alarm-components/alarm-state/alarmStateTextCustomIcon.tsx @@ -1,4 +1,4 @@ -import { type PascalCaseStateName } from '../../../hooks/useAlarms/transformers'; +import { type PascalCaseStateName } from '@iot-app-kit/component-core'; import { getIconForAlarmState } from '../alarm-icons/getIconForAlarmState'; import { spaceScaledXxs } from '@cloudscape-design/design-tokens'; import { Box } from '@cloudscape-design/components'; diff --git a/packages/react-components/src/components/anomaly-chart/converters/convertDataset.ts b/packages/react-components/src/components/anomaly-chart/converters/convertDataset.ts index 6cd745b27..f3e755bfc 100644 --- a/packages/react-components/src/components/anomaly-chart/converters/convertDataset.ts +++ b/packages/react-components/src/components/anomaly-chart/converters/convertDataset.ts @@ -1,4 +1,4 @@ -import { type AnomalyData } from '../../../data'; +import { type AnomalyData } from '@iot-app-kit/component-core'; import { SORT_TRANSFORM } from '../constants'; const isEmptyDataSet = (data: AnomalyData | undefined) => diff --git a/packages/react-components/src/components/anomaly-chart/converters/convertXAxis.ts b/packages/react-components/src/components/anomaly-chart/converters/convertXAxis.ts index 52f3b222b..3bc0fb749 100644 --- a/packages/react-components/src/components/anomaly-chart/converters/convertXAxis.ts +++ b/packages/react-components/src/components/anomaly-chart/converters/convertXAxis.ts @@ -1,8 +1,6 @@ import merge from 'lodash-es/merge'; -import { - formatDate, - getPatternForXAxisLabelForAnomalyChart, -} from '../../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; +import { getPatternForXAxisLabelForAnomalyChart } from '../../../utils/time'; import { ANOMALY_X_AXIS } from '../constants'; import { type ConfigurationOptions } from '../hooks/types'; diff --git a/packages/react-components/src/components/anomaly-chart/hooks/types.ts b/packages/react-components/src/components/anomaly-chart/hooks/types.ts index ffe6f0e83..bfae9be5b 100644 --- a/packages/react-components/src/components/anomaly-chart/hooks/types.ts +++ b/packages/react-components/src/components/anomaly-chart/hooks/types.ts @@ -1,4 +1,7 @@ -import { type AnomalyData, type AnomalyDescription } from '../../../data'; +import { + type AnomalyData, + type AnomalyDescription, +} from '@iot-app-kit/component-core'; import { type ThemeMode, type TooltipSort } from '../types'; export type ConfigurationOptions = { diff --git a/packages/react-components/src/components/anomaly-chart/hooks/useAnomalyEchart.ts b/packages/react-components/src/components/anomaly-chart/hooks/useAnomalyEchart.ts index 14c504cb4..40c3d7b26 100644 --- a/packages/react-components/src/components/anomaly-chart/hooks/useAnomalyEchart.ts +++ b/packages/react-components/src/components/anomaly-chart/hooks/useAnomalyEchart.ts @@ -3,9 +3,11 @@ import isEqual from 'lodash-es/isEqual'; import merge from 'lodash-es/merge'; import { useEffect, useReducer } from 'react'; import { useCustomCompareEffect } from 'react-use'; -import { type AnomalyData } from '../../../data'; +import { + type AnomalyData, + type UtilizedViewportType, +} from '@iot-app-kit/component-core'; import { useZoomableECharts } from '../../../hooks/useECharts/useZoomableECharts'; -import { type UtilizedViewportType } from '../../../hooks/useViewport/useUtilizedViewport'; import { DEFAULT_ANOMALY_WIDGET_SETTINGS } from '../constants'; import { convertDataset, diff --git a/packages/react-components/src/components/anomaly-chart/hooks/useTransformedData.ts b/packages/react-components/src/components/anomaly-chart/hooks/useTransformedData.ts index 2cf9f9060..e20346a00 100644 --- a/packages/react-components/src/components/anomaly-chart/hooks/useTransformedData.ts +++ b/packages/react-components/src/components/anomaly-chart/hooks/useTransformedData.ts @@ -3,8 +3,8 @@ import { type AnomalyData, type AnomalyDescription, type DataSourceLoader, -} from '../../../data'; -import { useSiteWiseAnomalyDataSource } from '../../../queries'; +} from '@iot-app-kit/component-core'; +import { useSiteWiseAnomalyDataSource } from '@iot-app-kit/component-core'; import { type AnomalyChartWithData } from '../types'; type UseTransformedDataOptions = AnomalyChartWithData & { diff --git a/packages/react-components/src/components/anomaly-chart/index.tsx b/packages/react-components/src/components/anomaly-chart/index.tsx index 722ffb9fb..0f21ad9c9 100644 --- a/packages/react-components/src/components/anomaly-chart/index.tsx +++ b/packages/react-components/src/components/anomaly-chart/index.tsx @@ -4,7 +4,9 @@ import { AnomalyObjectDataSourceTransformer, AnomalyArrowDataSourceTransformer, DataSourceLoader, -} from '../../data'; + DEFAULT_ANOMALY_DATA_SOURCE_VIEWPORT, + useUtilizedViewport, +} from '@iot-app-kit/component-core'; import { colorBackgroundContainerContent } from '@cloudscape-design/design-tokens'; @@ -14,8 +16,6 @@ import { Timestamp } from '../timestampBar'; import { AnomalyChartError } from './anomalyChartError'; import { useTransformedData } from './hooks/useTransformedData'; import { AnomalyChartEmpty } from './anomalyChartEmpty'; -import { useUtilizedViewport } from '../../hooks/useViewport/useUtilizedViewport'; -import { DEFAULT_ANOMALY_DATA_SOURCE_VIEWPORT } from '../../queries/useSiteWiseAnomalyDataSource/constants'; import useDataStore from '../../store'; /** diff --git a/packages/react-components/src/components/anomaly-chart/tests/mockDataSources.ts b/packages/react-components/src/components/anomaly-chart/tests/mockDataSources.ts index 5e7ab65a0..833cea082 100644 --- a/packages/react-components/src/components/anomaly-chart/tests/mockDataSources.ts +++ b/packages/react-components/src/components/anomaly-chart/tests/mockDataSources.ts @@ -1,6 +1,8 @@ -import { type AnomalyArrowDataSource } from '../../../data/transformers/anomaly/arrow/datasource'; -import { type AnomalyObjectDataSource } from '../../../data/transformers/anomaly/object/datasource'; -import { FieldType } from '../../../data/transformers/arrow'; +import { + type AnomalyArrowDataSource, + type AnomalyObjectDataSource, + FieldType, +} from '@iot-app-kit/component-core'; export const MOCK_DATA_SOURCE_EMPTY_SUCCESS: AnomalyObjectDataSource = { state: 'success', diff --git a/packages/react-components/src/components/anomaly-chart/tooltip/date.tsx b/packages/react-components/src/components/anomaly-chart/tooltip/date.tsx index b7dde18f7..d7775be79 100644 --- a/packages/react-components/src/components/anomaly-chart/tooltip/date.tsx +++ b/packages/react-components/src/components/anomaly-chart/tooltip/date.tsx @@ -1,6 +1,6 @@ import Box from '@cloudscape-design/components/box'; import useDataStore from '../../../store'; -import { formatDate } from '../../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; export const TooltipDate = ({ date }: { date: string }) => { const timeZone = useDataStore().timeZone; diff --git a/packages/react-components/src/components/anomaly-chart/types.ts b/packages/react-components/src/components/anomaly-chart/types.ts index 8d26e0154..a362e5252 100644 --- a/packages/react-components/src/components/anomaly-chart/types.ts +++ b/packages/react-components/src/components/anomaly-chart/types.ts @@ -5,7 +5,7 @@ import { type AssistantProperty } from '../../common/assistantProps'; import { type AnomalyArrowDataSource, type AnomalyObjectDataSource, -} from '../../data'; +} from '@iot-app-kit/component-core'; export type TooltipSort = 'value' | 'alphabetical'; export type ThemeMode = 'light' | 'dark'; diff --git a/packages/react-components/src/components/bar-chart/barChart.tsx b/packages/react-components/src/components/bar-chart/barChart.tsx index 9ed4b9018..222dc150a 100644 --- a/packages/react-components/src/components/bar-chart/barChart.tsx +++ b/packages/react-components/src/components/bar-chart/barChart.tsx @@ -12,19 +12,15 @@ import type { DataStream as DataStreamViz, YAnnotation, } from '@iot-app-kit/charts-core'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport, useTimeSeriesData } from '@iot-app-kit/component-core'; +import { DEFAULT_LEGEND, ECHARTS_GESTURE } from '../../common/constants'; import { - DEFAULT_LEGEND, DEFAULT_VIEWPORT, - ECHARTS_GESTURE, -} from '../../common/constants'; -import { getTimeSeriesQueries } from '../../utils/queries'; -import { + getTimeSeriesQueries, type AxisSettings, type ChartSize, type ComponentQuery, -} from '../../common/chartTypes'; +} from '@iot-app-kit/component-core'; import { type AssistantProperty } from '../../common/assistantProps'; import { Title, getAdjustedChartHeight } from '../../common/title'; import { useBarChartAlarms, useNormalizedDataStreams } from './hooks'; diff --git a/packages/react-components/src/components/bar-chart/hooks/useBarChartAlarms.ts b/packages/react-components/src/components/bar-chart/hooks/useBarChartAlarms.ts index afb3475b3..4f6174e29 100644 --- a/packages/react-components/src/components/bar-chart/hooks/useBarChartAlarms.ts +++ b/packages/react-components/src/components/bar-chart/hooks/useBarChartAlarms.ts @@ -9,9 +9,11 @@ import { toId } from '@iot-app-kit/source-iotsitewise'; import isEqual from 'lodash-es/isEqual'; import { useState } from 'react'; import { useCustomCompareEffect } from 'react-use'; -import { type AlarmData } from '../../../hooks/useAlarms'; -import { useAlarmsFromQueries } from '../../../hooks/useAlarmsFromQueries'; -import { transformAlarmsToThreshold } from '../../../utils/transformAlarmsToThreshold'; +import { + type AlarmData, + useAlarmsFromQueries, + transformAlarmsToThreshold, +} from '@iot-app-kit/component-core'; import { type BarChartProps } from '../barChart'; type UseBarChartAlarmOptions = Pick & { diff --git a/packages/react-components/src/components/bar-chart/hooks/useNormalizedDataStreams.ts b/packages/react-components/src/components/bar-chart/hooks/useNormalizedDataStreams.ts index 85a80acbe..70ac346ce 100644 --- a/packages/react-components/src/components/bar-chart/hooks/useNormalizedDataStreams.ts +++ b/packages/react-components/src/components/bar-chart/hooks/useNormalizedDataStreams.ts @@ -1,7 +1,7 @@ import { type DataStream } from '@iot-app-kit/core'; import { toId } from '@iot-app-kit/source-iotsitewise'; import { type BarChartAlarms } from './useBarChartAlarms'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { useMemo } from 'react'; type UseNormalizedDataStreamsOptions = { diff --git a/packages/react-components/src/components/chart/baseChart.tsx b/packages/react-components/src/components/chart/baseChart.tsx index a8fafd73d..237dddf2e 100644 --- a/packages/react-components/src/components/chart/baseChart.tsx +++ b/packages/react-components/src/components/chart/baseChart.tsx @@ -14,7 +14,7 @@ import { import { HotKeys } from 'react-hotkeys'; import { Resizable, type ResizeHandle } from 'react-resizable'; import { useECharts, useResizeableEChart } from '../../hooks/useECharts'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport, getTimeSeriesQueries } from '@iot-app-kit/component-core'; import { useChartConfiguration } from './chartOptions/useChartConfiguration'; import { useChartDataset } from './chartOptions/useChartDataset'; import ChartContextMenu from './contextMenu/ChartContextMenu'; @@ -35,7 +35,6 @@ import { } from '../../hooks/useAssistantContext/utils'; import { useModalVisibility } from '../../hooks/useModalVisibility/useModalVisibility'; import useDataStore from '../../store'; -import { getTimeSeriesQueries } from '../../utils/queries'; import { Timestamp } from '../timestampBar'; import './chart.css'; import { diff --git a/packages/react-components/src/components/chart/chartOptions/convertThresholds.ts b/packages/react-components/src/components/chart/chartOptions/convertThresholds.ts index a878e06f3..1dc6c278d 100644 --- a/packages/react-components/src/components/chart/chartOptions/convertThresholds.ts +++ b/packages/react-components/src/components/chart/chartOptions/convertThresholds.ts @@ -4,7 +4,7 @@ import { type ComparisonOperator, type StyledThreshold, } from '@iot-app-kit/core'; -import { COMPARATOR_MAP } from '../../../common/constants'; +import { COMPARATOR_MAP } from '@iot-app-kit/component-core'; const comparisonOperatorToLowerYAxis = ( comparisonOperator: ComparisonOperator, diff --git a/packages/react-components/src/components/chart/chartOptions/tooltip/time.tsx b/packages/react-components/src/components/chart/chartOptions/tooltip/time.tsx index 0dc514d98..fde1ea695 100644 --- a/packages/react-components/src/components/chart/chartOptions/tooltip/time.tsx +++ b/packages/react-components/src/components/chart/chartOptions/tooltip/time.tsx @@ -1,5 +1,5 @@ import { fontWeightHeadingS } from '@cloudscape-design/design-tokens'; -import { FULL_DATE, formatDate } from '../../../../utils/time'; +import { FULL_DATE, formatDate } from '@iot-app-kit/core'; import useDataStore from '../../../../store'; export type XYPlotTooltipTimeOptions = { diff --git a/packages/react-components/src/components/chart/chartOptions/useChartConfiguration.ts b/packages/react-components/src/components/chart/chartOptions/useChartConfiguration.ts index bc659cb00..93c24374f 100644 --- a/packages/react-components/src/components/chart/chartOptions/useChartConfiguration.ts +++ b/packages/react-components/src/components/chart/chartOptions/useChartConfiguration.ts @@ -13,7 +13,7 @@ import { useGroupableEChart, useLoadableEChart, } from '../../../hooks/useECharts'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { DEFAULT_DATA_ZOOM, getDefaultChartOption, diff --git a/packages/react-components/src/components/chart/eChartsConstants.ts b/packages/react-components/src/components/chart/eChartsConstants.ts index 12aaba83d..4ca36dfbb 100644 --- a/packages/react-components/src/components/chart/eChartsConstants.ts +++ b/packages/react-components/src/components/chart/eChartsConstants.ts @@ -9,10 +9,8 @@ import type { XAXisComponentOption, YAXisComponentOption, } from 'echarts'; -import { - formatDate, - getPatternForXAxisLabelForLineChart, -} from '../../utils/time'; +import { getPatternForXAxisLabelForLineChart } from '../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; import { type ChartAxisOptions, type ChartLegend } from './types'; export const DEFAULT_TOOLBOX_CONFIG: ToolboxComponentOption = { diff --git a/packages/react-components/src/components/chart/hooks/useChartAlarms.ts b/packages/react-components/src/components/chart/hooks/useChartAlarms.ts index a3fbdd232..00440eee1 100644 --- a/packages/react-components/src/components/chart/hooks/useChartAlarms.ts +++ b/packages/react-components/src/components/chart/hooks/useChartAlarms.ts @@ -8,12 +8,14 @@ import { toId } from '@iot-app-kit/source-iotsitewise'; import isEqual from 'lodash-es/isEqual'; import { useCallback, useMemo, useState } from 'react'; import { useCustomCompareEffect } from 'react-use'; -import { type AlarmData } from '../../../hooks/useAlarms'; -import { parseAlarmStateAssetProperty } from '../../../hooks/useAlarms/transformers'; -import { mapAlarmRuleExpression } from '../../../hooks/useAlarms/transformers/mapAlarmRuleExpression'; -import { useAlarmsFromQueries } from '../../../hooks/useAlarmsFromQueries/useAlarmsFromQueries'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; -import { transformAlarmsToThreshold } from '../../../utils/transformAlarmsToThreshold'; +import { + transformAlarmsToThreshold, + type AlarmData, + parseAlarmStateAssetProperty, + mapAlarmRuleExpression, + useAlarmsFromQueries, +} from '@iot-app-kit/component-core'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type AlarmContent } from '../../alarm-components/alarm-content/types'; import { type ChartOptions } from '../types'; diff --git a/packages/react-components/src/components/chart/hooks/useDataZoom.ts b/packages/react-components/src/components/chart/hooks/useDataZoom.ts index ef301a2a8..a0c6bf799 100644 --- a/packages/react-components/src/components/chart/hooks/useDataZoom.ts +++ b/packages/react-components/src/components/chart/hooks/useDataZoom.ts @@ -8,7 +8,7 @@ import { } from 'react'; import { useEffectOnce } from 'react-use'; import { ECHARTS_GESTURE } from '../../../common/constants'; -import { useViewport } from '../../../hooks/useViewport'; +import { useViewport } from '@iot-app-kit/component-core'; import { convertViewportToMs } from '../../../utils/convertViewportToMs'; import { DEFAULT_VIEWPORT } from '../../time-sync'; import { diff --git a/packages/react-components/src/components/chart/hooks/useNormalizedDataStreams.ts b/packages/react-components/src/components/chart/hooks/useNormalizedDataStreams.ts index 9da0b9c2d..74b05b0fa 100644 --- a/packages/react-components/src/components/chart/hooks/useNormalizedDataStreams.ts +++ b/packages/react-components/src/components/chart/hooks/useNormalizedDataStreams.ts @@ -4,7 +4,7 @@ import { bisector } from 'd3-array'; import uniqWith from 'lodash-es/uniqWith'; import { useMemo } from 'react'; import type { AlarmAssistantContext } from '../../../common/assistantProps'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; +import { createNonNullableList } from '@iot-app-kit/core'; import { type AlarmContent } from '../../alarm-components/alarm-content/types'; import { type ChartAlarm, type ChartAlarms } from './useChartAlarms'; diff --git a/packages/react-components/src/components/chart/hooks/useVisualizedDataStreams.ts b/packages/react-components/src/components/chart/hooks/useVisualizedDataStreams.ts index ef539e88b..7e52fd5ec 100644 --- a/packages/react-components/src/components/chart/hooks/useVisualizedDataStreams.ts +++ b/packages/react-components/src/components/chart/hooks/useVisualizedDataStreams.ts @@ -8,9 +8,12 @@ import { } from '@iot-app-kit/core'; import isEqual from 'lodash-es/isEqual'; import { useEffect, useMemo, useState } from 'react'; -import { DEFAULT_VIEWPORT, StreamType } from '../../../common/constants'; -import { useTimeSeriesData } from '../../../hooks/useTimeSeriesData'; -import { useViewport } from '../../../hooks/useViewport'; +import { StreamType } from '../../../common/constants'; +import { + useViewport, + useTimeSeriesData, + DEFAULT_VIEWPORT, +} from '@iot-app-kit/component-core'; const isNotAlarmStream = ({ streamType }: DataStream) => streamType !== StreamType.ALARM; diff --git a/packages/react-components/src/components/chart/legend/table/columnDefinitions/latestAlarmStateValue/latestAlarmStateValueCell.tsx b/packages/react-components/src/components/chart/legend/table/columnDefinitions/latestAlarmStateValue/latestAlarmStateValueCell.tsx index 2e972b662..5d5e540b2 100644 --- a/packages/react-components/src/components/chart/legend/table/columnDefinitions/latestAlarmStateValue/latestAlarmStateValueCell.tsx +++ b/packages/react-components/src/components/chart/legend/table/columnDefinitions/latestAlarmStateValue/latestAlarmStateValueCell.tsx @@ -3,7 +3,7 @@ import { type DataStream } from '@iot-app-kit/core'; import { useVisibleDataStreams } from '../../../../hooks/useVisibleDataStreams'; import { type DataStreamInformation } from '../../types'; import { AlarmStateText } from '../../../../../alarm-components/alarm-state/alarmStateText'; -import { type PascalCaseStateName } from '../../../../../../hooks/useAlarms/transformers'; +import { type PascalCaseStateName } from '@iot-app-kit/component-core'; export const LatestAlarmStateValueCell = ({ id, diff --git a/packages/react-components/src/components/chart/legend/table/columnDefinitions/trendCursor/trendCursorHeader.tsx b/packages/react-components/src/components/chart/legend/table/columnDefinitions/trendCursor/trendCursorHeader.tsx index 2fd140c09..6e220c47f 100644 --- a/packages/react-components/src/components/chart/legend/table/columnDefinitions/trendCursor/trendCursorHeader.tsx +++ b/packages/react-components/src/components/chart/legend/table/columnDefinitions/trendCursor/trendCursorHeader.tsx @@ -1,4 +1,4 @@ -import { formatDate } from '../../../../../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; import useDataStore from '../../../../../../store'; type TrendCursorColumnHeaderOptions = { diff --git a/packages/react-components/src/components/chart/legend/table/table.spec.tsx b/packages/react-components/src/components/chart/legend/table/table.spec.tsx index d9d4ed400..8cb339760 100644 --- a/packages/react-components/src/components/chart/legend/table/table.spec.tsx +++ b/packages/react-components/src/components/chart/legend/table/table.spec.tsx @@ -2,7 +2,7 @@ import { render, renderHook, screen } from '@testing-library/react'; import { ChartLegendTable } from './table'; import { type DataStreamInformation, type TrendCursor } from './types'; import { useChartStore } from '../../store'; -import { formatDate } from '../../../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; const setupStore = () => { renderHook(() => useChartStore((state) => state.unHighlightDataStream)); diff --git a/packages/react-components/src/components/chart/types.ts b/packages/react-components/src/components/chart/types.ts index cb8d46aaf..39f68a9ba 100644 --- a/packages/react-components/src/components/chart/types.ts +++ b/packages/react-components/src/components/chart/types.ts @@ -7,7 +7,7 @@ import { } from '@iot-app-kit/core'; import { type OptionId } from 'echarts/types/src/util/types.js'; import { type AssistantProperty } from '../../common/assistantProps'; -import type { ComponentQuery } from '../../common/chartTypes'; +import type { ComponentQuery } from '@iot-app-kit/component-core'; export type YAxisOptions = { yLabel?: string; diff --git a/packages/react-components/src/components/dial/dial.tsx b/packages/react-components/src/components/dial/dial.tsx index bf1dee05b..1683196f2 100644 --- a/packages/react-components/src/components/dial/dial.tsx +++ b/packages/react-components/src/components/dial/dial.tsx @@ -1,13 +1,15 @@ import { DialBase } from './dialBase'; -import { DEFAULT_VIEWPORT, ECHARTS_GESTURE } from '../../common/constants'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; +import { ECHARTS_GESTURE } from '../../common/constants'; import { widgetPropertiesFromInputs } from '../../common/widgetPropertiesFromInputs'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport, useTimeSeriesData } from '@iot-app-kit/component-core'; import type { Threshold, StyleSettingsMap, Viewport } from '@iot-app-kit/core'; import type { DialSettings } from './types'; import { DEFAULT_DIAL_SETTINGS } from './constants'; -import type { ComponentQuery } from '../../common/chartTypes'; -import { getTimeSeriesQueries } from '../../utils/queries'; +import { + DEFAULT_VIEWPORT, + type ComponentQuery, + getTimeSeriesQueries, +} from '@iot-app-kit/component-core'; export const Dial = ({ query, diff --git a/packages/react-components/src/components/gauge/converters/convertSeries.spec.ts b/packages/react-components/src/components/gauge/converters/convertSeries.spec.ts new file mode 100644 index 000000000..c20800f91 --- /dev/null +++ b/packages/react-components/src/components/gauge/converters/convertSeries.spec.ts @@ -0,0 +1,34 @@ +import { type Threshold } from '@iot-app-kit/core'; +import { convertSeries } from './convertSeries'; + +describe('convertSeries', () => { + it('returns only emptySeries and progressSeries when no thresholds are provided', () => { + const settings = { yMin: 0, yMax: 100, gaugeThickness: 20 }; + const result = convertSeries({ + unit: '°C', + significantDigits: 2, + thresholds: [], + settings, + }); + + expect(result).toHaveLength(2); + expect(result[0]).toMatchObject({ min: 0, max: 100 }); + expect(result[1]).toMatchObject({ min: 0, max: 100 }); + }); + + it('includes thresholdSeries when valid thresholds are provided', () => { + const settings = { yMin: 0, yMax: 100 }; + const thresholds: Threshold[] = [ + { value: 50, color: 'red', comparisonOperator: 'GT' }, + ]; + const result = convertSeries({ + unit: '°C', + significantDigits: 2, + thresholds, + settings, + }); + + expect(result).toHaveLength(3); + expect(result[2]).toMatchObject({ min: 0, max: 100 }); + }); +}); diff --git a/packages/react-components/src/components/gauge/gauge.tsx b/packages/react-components/src/components/gauge/gauge.tsx index b880a1c51..57c91a60a 100644 --- a/packages/react-components/src/components/gauge/gauge.tsx +++ b/packages/react-components/src/components/gauge/gauge.tsx @@ -1,14 +1,15 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { useEffect, useMemo } from 'react'; import { AssistantWrapperPanel } from '../assistant-panels/assistantWrapperPanel'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; -import { widgetPropertiesFromInputs } from '../../common/widgetPropertiesFromInputs'; import { - CHART_ALARM_ERROR, + useViewport, + useTimeSeriesData, + useSingleQueryAlarm, + getTimeSeriesQueries, DEFAULT_VIEWPORT, - ECHARTS_GESTURE, -} from '../../common/constants'; +} from '@iot-app-kit/component-core'; +import { widgetPropertiesFromInputs } from '../../common/widgetPropertiesFromInputs'; +import { CHART_ALARM_ERROR, ECHARTS_GESTURE } from '../../common/constants'; import { type DataStream, viewportEndDate, @@ -21,12 +22,10 @@ import { DEFAULT_GAUGE_STYLES, } from './constants'; import { useAssistantContext } from '../../hooks/useAssistantContext/useAssistantContext'; -import { getTimeSeriesQueries } from '../../utils/queries'; import { convertToSupportedTimeRange, serializeTimeSeriesQuery, } from '../../hooks/useAssistantContext/utils'; -import { useSingleQueryAlarm } from '../../hooks/useSingleQueryAlarm'; export const Gauge = ({ size, diff --git a/packages/react-components/src/components/gauge/gaugeText.tsx b/packages/react-components/src/components/gauge/gaugeText.tsx index 5c4fa0fa3..aba3e6b05 100644 --- a/packages/react-components/src/components/gauge/gaugeText.tsx +++ b/packages/react-components/src/components/gauge/gaugeText.tsx @@ -13,7 +13,7 @@ import { type Primitive } from '@iot-app-kit/core'; import { GaugeErrorText } from './gaugeErrorText'; import { type AlarmContent } from '../alarm-components/alarm-content/types'; import { type AssistantProperty } from '../../common/assistantProps'; -import { type AlarmDataStatus } from '../../hooks/useAlarms'; +import { type AlarmDataStatus } from '@iot-app-kit/component-core'; import { Spinner } from '@cloudscape-design/components'; const getFormattedValue = ({ diff --git a/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.spec.ts b/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.spec.ts new file mode 100644 index 000000000..cd0545c3f --- /dev/null +++ b/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.spec.ts @@ -0,0 +1,99 @@ +import { renderHook } from '@testing-library/react'; +import { useGaugeFormatterValue } from './useGaugeFormatterValue'; + +describe('useGaugeFormatterValue', () => { + it('formats value correctly with default precision', () => { + const { result } = renderHook(() => + useGaugeFormatterValue({ + unit: 'kg', + settings: { showUnit: true }, + significantDigits: 2, + }) + ); + + expect(result.current.getFormatterValue(42.5678)).toBe( + '{value|42.57} {unit| kg}' + ); + }); + + it('formats value correctly without unit when showUnit is false', () => { + const { result } = renderHook(() => + useGaugeFormatterValue({ + unit: 'kg', + settings: { showUnit: false }, + significantDigits: 2, + }) + ); + + expect(result.current.getFormatterValue(42.5678)).toBe('{value|42.57}'); + }); + + it('formats value correctly when unit is missing', () => { + const { result } = renderHook(() => + useGaugeFormatterValue({ + settings: { showUnit: true }, + significantDigits: 2, + }) + ); + + expect(result.current.getFormatterValue(42.5678)).toBe('{value|42.57}'); + }); + + it('returns "-" for falsy values (0, null, undefined)', () => { + const { result } = renderHook(() => + useGaugeFormatterValue({ + unit: 'kg', + settings: { showUnit: true }, + significantDigits: 2, + }) + ); + + expect(result.current.getFormatterValue(0)).toBe('-'); + expect(result.current.getFormatterValue(null as unknown as number)).toBe( + '-' + ); + expect( + result.current.getFormatterValue(undefined as unknown as number) + ).toBe('-'); + }); + + it('handles different significantDigits values', () => { + const { result } = renderHook(() => + useGaugeFormatterValue({ + unit: 'kg', + settings: { showUnit: true }, + significantDigits: 3, + }) + ); + + expect(result.current.getFormatterValue(42.5678)).toBe( + '{value|42.568} {unit| kg}' + ); + }); + + it('reacts to dependency changes', () => { + const { result, rerender } = renderHook( + ({ unit, showUnit, digits }) => + useGaugeFormatterValue({ + unit, + settings: { showUnit }, + significantDigits: digits, + }), + { + initialProps: { unit: 'kg', showUnit: true, digits: 2 }, + } + ); + + expect(result.current.getFormatterValue(42.5678)).toBe( + '{value|42.57} {unit| kg}' + ); + + rerender({ unit: 'lbs', showUnit: true, digits: 2 }); + expect(result.current.getFormatterValue(42.5678)).toBe( + '{value|42.57} {unit| lbs}' + ); + + rerender({ unit: 'lbs', showUnit: false, digits: 2 }); + expect(result.current.getFormatterValue(42.5678)).toBe('{value|42.57}'); + }); +}); diff --git a/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.ts b/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.ts index 4a10cd0ea..e9f9a37de 100644 --- a/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.ts +++ b/packages/react-components/src/components/gauge/hooks/useGaugeFormatterValue.ts @@ -14,7 +14,7 @@ export const useGaugeFormatterValue = ({ if (!value) return '-'; return `{value|${getPreciseValue(value, significantDigits)}} ${ settings?.showUnit && unit ? '{unit| ' + unit + '}' : '' - }`; + }`.trim(); }, [settings?.showUnit, significantDigits, unit] ); diff --git a/packages/react-components/src/components/gauge/types.ts b/packages/react-components/src/components/gauge/types.ts index afbbb9003..cfa36d760 100644 --- a/packages/react-components/src/components/gauge/types.ts +++ b/packages/react-components/src/components/gauge/types.ts @@ -6,9 +6,11 @@ import { } from '@iot-app-kit/core'; import type { WidgetSettings } from '../../common/dataTypes'; import { type AssistantProperty } from '../../common/assistantProps'; -import type { ComponentQuery } from '../../common/chartTypes'; import type { AlarmContent } from '../alarm-components/alarm-content/types'; -import { type AlarmDataStatus } from '../../hooks/useAlarms'; +import { + type AlarmDataStatus, + type ComponentQuery, +} from '@iot-app-kit/component-core'; export type GaugeProps = { size?: { width: number; height: number }; diff --git a/packages/react-components/src/components/gauge/utils/calculatePadding.spec.ts b/packages/react-components/src/components/gauge/utils/calculatePadding.spec.ts new file mode 100644 index 000000000..f756bcb98 --- /dev/null +++ b/packages/react-components/src/components/gauge/utils/calculatePadding.spec.ts @@ -0,0 +1,24 @@ +import { calculatePadding } from './calculatePadding'; + +describe('calculatePadding', () => { + it('returns negative padding when fontSize is greater than unitFontSize', () => { + expect(calculatePadding({ fontSize: 20, unitFontSize: 10 })).toBe(-5); + expect(calculatePadding({ fontSize: 30, unitFontSize: 10 })).toBe(-10); + }); + + it('returns positive padding when fontSize is less than unitFontSize', () => { + expect(calculatePadding({ fontSize: 10, unitFontSize: 20 })).toBe(5); + expect(calculatePadding({ fontSize: 5, unitFontSize: 15 })).toBe(5); + }); + + it('returns 0 when fontSize is equal to unitFontSize', () => { + expect(calculatePadding({ fontSize: 15, unitFontSize: 15 })).toBe(0); + expect(calculatePadding({ fontSize: 0, unitFontSize: 0 })).toBe(0); + }); + + it('handles default values when parameters are omitted', () => { + expect(calculatePadding({})).toBe(0); + expect(calculatePadding({ fontSize: 10 })).toBe(-5); + expect(calculatePadding({ unitFontSize: 10 })).toBe(5); + }); +}); diff --git a/packages/react-components/src/components/gauge/utils/convertThresholdsToEchartsValuePair.spec.ts b/packages/react-components/src/components/gauge/utils/convertThresholdsToEchartsValuePair.spec.ts new file mode 100644 index 000000000..459c708a6 --- /dev/null +++ b/packages/react-components/src/components/gauge/utils/convertThresholdsToEchartsValuePair.spec.ts @@ -0,0 +1,66 @@ +import { type Threshold } from '@iot-app-kit/core'; +import { convertThresholdsToEchartsValuePair } from './convertThresholdsToEchartsValuePair'; +import { DEFAULT_GAUGE_PROGRESS_COLOR } from '../constants'; + +const testThresholds: Threshold[] = [ + { + color: 'red', + value: 50, + comparisonOperator: 'LT', + description: 'Value is less than 50', + severity: 1, + dataStreamIds: ['stream-1'], + }, + { + color: 'green', + value: 90, + comparisonOperator: 'GTE', + description: 'Value is greater than or equal to 100', + severity: 2, + dataStreamIds: ['stream-2', 'stream-3'], + showValue: true, + }, + { + color: 'blue', + value: 101, + comparisonOperator: 'GT', + description: 'Value is greater than 101', + isEditable: true, + id: 'threshold-101', + }, + { + color: 'yellow', + value: 75, + comparisonOperator: 'LTE', + description: 'Value is less than or equal to 75', + }, + { + color: 'purple', + value: 80, + comparisonOperator: 'EQ', + description: 'Value equals 80', + }, + { + color: 'orange', + value: 90, + comparisonOperator: 'CONTAINS', + description: 'Contains value 90', + isEditable: false, + }, +]; + +describe('convertThresholdsToEchartsValuePair', () => { + it('can convert thresholds', () => { + const convertedThresholds = convertThresholdsToEchartsValuePair({ + thresholds: testThresholds, + }); + + expect(convertedThresholds).toEqual([ + [0.4999999999, 'red'], + [0.75, 'yellow'], + [0.9, DEFAULT_GAUGE_PROGRESS_COLOR], + [1, 'green'], + [1, DEFAULT_GAUGE_PROGRESS_COLOR], + ]); + }); +}); diff --git a/packages/react-components/src/components/kpi/kpi.tsx b/packages/react-components/src/components/kpi/kpi.tsx index ed4cccda4..8e128c13d 100644 --- a/packages/react-components/src/components/kpi/kpi.tsx +++ b/packages/react-components/src/components/kpi/kpi.tsx @@ -1,11 +1,14 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { useEffect, useMemo } from 'react'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport, useTimeSeriesData } from '@iot-app-kit/component-core'; import { widgetPropertiesFromInputs } from '../../common/widgetPropertiesFromInputs'; -import { CHART_ALARM_ERROR, DEFAULT_VIEWPORT } from '../../common/constants'; +import { CHART_ALARM_ERROR } from '../../common/constants'; import type { AssistantProperty } from '../../common/assistantProps'; -import { viewportEndDate, viewportStartDate } from '@iot-app-kit/core'; +import { + viewportEndDate, + viewportStartDate, + createNonNullableList, +} from '@iot-app-kit/core'; import { AssistantWrapperPanel } from '../assistant-panels/assistantWrapperPanel'; import { useAssistantContext } from '../../hooks/useAssistantContext/useAssistantContext'; import type { @@ -15,14 +18,16 @@ import type { } from '@iot-app-kit/core'; import type { KPISettings } from './types'; import { KpiBase } from './kpiBase'; -import type { ComponentQuery } from '../../common/chartTypes'; -import { getTimeSeriesQueries } from '../../utils/queries'; -import { useSingleQueryAlarm } from '../../hooks/useSingleQueryAlarm'; +import { + useSingleQueryAlarm, + getTimeSeriesQueries, + type ComponentQuery, + DEFAULT_VIEWPORT, +} from '@iot-app-kit/component-core'; import { convertToSupportedTimeRange, serializeTimeSeriesQuery, } from '../../hooks/useAssistantContext/utils'; -import { createNonNullableList } from '../../utils/createNonNullableList'; export const KPI = ({ query, diff --git a/packages/react-components/src/components/kpi/kpiTextFragments.tsx b/packages/react-components/src/components/kpi/kpiTextFragments.tsx index fdcb5e3cd..ee4fe5cd3 100644 --- a/packages/react-components/src/components/kpi/kpiTextFragments.tsx +++ b/packages/react-components/src/components/kpi/kpiTextFragments.tsx @@ -1,10 +1,10 @@ import Spinner from '@cloudscape-design/components/spinner'; import { Value } from '../shared-components'; import { DataQualityText } from '../data-quality/data-quality-text'; -import { formatDate } from '../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; import { AlarmStateTextWithAssistant } from '../alarm-components/alarm-state/alarmStateTextWithAssistant'; import { AlarmStateText } from '../alarm-components/alarm-state/alarmStateText'; -import { type AlarmDataStatus } from '../../hooks/useAlarms'; +import { type AlarmDataStatus } from '@iot-app-kit/component-core'; import type { DataPoint } from '@iot-app-kit/core'; import { Alert, Box } from '@cloudscape-design/components'; import { type AlarmContent } from '../alarm-components/alarm-content/types'; diff --git a/packages/react-components/src/components/kpi/tests/kpi.spec.tsx b/packages/react-components/src/components/kpi/tests/kpi.spec.tsx index 7ffb486b9..ebc0d796e 100644 --- a/packages/react-components/src/components/kpi/tests/kpi.spec.tsx +++ b/packages/react-components/src/components/kpi/tests/kpi.spec.tsx @@ -1,8 +1,11 @@ import { render, screen } from '@testing-library/react'; import { KPI } from '../kpi'; -import { COMPARISON_OPERATOR, type Viewport } from '@iot-app-kit/core'; +import { + COMPARISON_OPERATOR, + type Viewport, + formatDate, +} from '@iot-app-kit/core'; import { mockTimeSeriesDataQuery } from '@iot-app-kit/testing-util'; -import { formatDate } from '../../../utils/time'; export const VIEWPORT = { duration: '5m' }; export const PREVIOUS_VALUE = 123.21239; @@ -81,9 +84,13 @@ const mockUserViewport: { group: string; } = { viewport: undefined, setViewport: vi.fn(), group: 'group' }; -vi.mock('../../../hooks/useViewport', () => ({ - useViewport: vi.fn(() => mockUserViewport), -})); +vi.mock('@iot-app-kit/component-core', async () => { + const actual = await vi.importActual('@iot-app-kit/component-core'); + return { + ...actual, + useViewport: vi.fn(() => mockUserViewport), + }; +}); // a default KPI widget has all values, text, dates, etc. set to be visible describe('default kpi widget', () => { diff --git a/packages/react-components/src/components/kpi/tests/kpiBase.spec.tsx b/packages/react-components/src/components/kpi/tests/kpiBase.spec.tsx index 59f9c22ff..37e4e2f7c 100644 --- a/packages/react-components/src/components/kpi/tests/kpiBase.spec.tsx +++ b/packages/react-components/src/components/kpi/tests/kpiBase.spec.tsx @@ -1,7 +1,7 @@ import { render, screen } from '@testing-library/react'; import { KpiBase } from '../kpiBase'; import type { DataPoint } from '@iot-app-kit/core'; -import { formatDate } from '../../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; describe('name', () => { it('renders name when showName is true', () => { diff --git a/packages/react-components/src/components/kpi/types.ts b/packages/react-components/src/components/kpi/types.ts index a777558ab..60a66e2b5 100644 --- a/packages/react-components/src/components/kpi/types.ts +++ b/packages/react-components/src/components/kpi/types.ts @@ -2,7 +2,7 @@ import { type StyledThreshold } from '@iot-app-kit/core'; import type { WidgetSettings } from '../../common/dataTypes'; import { type AlarmContent } from '../alarm-components/alarm-content/types'; import { type AssistantProperty } from '../../common/assistantProps'; -import { type AlarmDataStatus } from '../../hooks/useAlarms'; +import { type AlarmDataStatus } from '@iot-app-kit/component-core'; export type KPIBaseProperties = WidgetSettings & { settings?: Partial; diff --git a/packages/react-components/src/components/line-chart/lineChart.tsx b/packages/react-components/src/components/line-chart/lineChart.tsx index a043e2940..411f174a7 100644 --- a/packages/react-components/src/components/line-chart/lineChart.tsx +++ b/packages/react-components/src/components/line-chart/lineChart.tsx @@ -10,14 +10,14 @@ import type { DataStream as DataStreamViz, YAnnotation, } from '@iot-app-kit/charts-core'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; import { - DEFAULT_LEGEND, + useViewport, + useTimeSeriesData, DEFAULT_VIEWPORT, - ECHARTS_GESTURE, -} from '../../common/constants'; -import { type AxisSettings, type ChartSize } from '../../common/chartTypes'; + type AxisSettings, + type ChartSize, +} from '@iot-app-kit/component-core'; +import { DEFAULT_LEGEND, ECHARTS_GESTURE } from '../../common/constants'; export interface LineChartProps { queries: TimeSeriesDataQuery[]; diff --git a/packages/react-components/src/components/scatter-chart/scatterChart.tsx b/packages/react-components/src/components/scatter-chart/scatterChart.tsx index 3ea4a85db..db4db56b6 100644 --- a/packages/react-components/src/components/scatter-chart/scatterChart.tsx +++ b/packages/react-components/src/components/scatter-chart/scatterChart.tsx @@ -10,14 +10,14 @@ import { type TimeSeriesDataQuery, type Viewport, } from '@iot-app-kit/core'; -import { type AxisSettings, type ChartSize } from '../../common/chartTypes'; +import { DEFAULT_LEGEND, ECHARTS_GESTURE } from '../../common/constants'; import { - DEFAULT_LEGEND, DEFAULT_VIEWPORT, - ECHARTS_GESTURE, -} from '../../common/constants'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; + useViewport, + useTimeSeriesData, + type AxisSettings, + type ChartSize, +} from '@iot-app-kit/component-core'; export interface ScatterChartProps { queries: TimeSeriesDataQuery[]; diff --git a/packages/react-components/src/components/status-timeline/alarmTransforms.ts b/packages/react-components/src/components/status-timeline/alarmTransforms.ts index 4ef6483ab..1f6739746 100644 --- a/packages/react-components/src/components/status-timeline/alarmTransforms.ts +++ b/packages/react-components/src/components/status-timeline/alarmTransforms.ts @@ -3,11 +3,11 @@ import { type DataPoint, type DataStream, } from '@iot-app-kit/core'; -import type { AlarmData } from '../../hooks/useAlarms'; import { parseAlarmStateAssetProperty, type PascalCaseStateName, -} from '../../hooks/useAlarms/transformers'; + type AlarmData, +} from '@iot-app-kit/component-core'; import { CHART_ALARM_ERROR } from '../../common/constants'; export const transformAlarmStateToDataStream = ( diff --git a/packages/react-components/src/components/status-timeline/statusTimeline.tsx b/packages/react-components/src/components/status-timeline/statusTimeline.tsx index b11a04027..1e67c544d 100644 --- a/packages/react-components/src/components/status-timeline/statusTimeline.tsx +++ b/packages/react-components/src/components/status-timeline/statusTimeline.tsx @@ -13,20 +13,19 @@ import type { DataStream as DataStreamViz, Annotations, } from '@iot-app-kit/charts-core'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport, useTimeSeriesData } from '@iot-app-kit/component-core'; import { type AssistantProperty } from '../../common/assistantProps'; -import { - DEFAULT_LEGEND, - DEFAULT_VIEWPORT, - ECHARTS_GESTURE, -} from '../../common/constants'; +import { DEFAULT_LEGEND, ECHARTS_GESTURE } from '../../common/constants'; import { getAdjustedChartHeight, Title } from '../../common/title'; -import type { ComponentQuery } from '../../common/chartTypes'; -import { useAlarms } from '../../hooks/useAlarms'; import { useResizeObserver } from 'usehooks-ts'; -import { getAlarmQueries, getTimeSeriesQueries } from '../../utils/queries'; -import { convertAlarmQueryToAlarmRequest } from '../../queries/utils/convertAlarmQueryToAlarmRequest'; +import { + type ComponentQuery, + useAlarms, + convertAlarmQueryToAlarmRequest, + DEFAULT_VIEWPORT, + getAlarmQueries, + getTimeSeriesQueries, +} from '@iot-app-kit/component-core'; import { ALARM_STATE_THRESHOLDS, transformAlarmStateToDataStream, diff --git a/packages/react-components/src/components/status/status.tsx b/packages/react-components/src/components/status/status.tsx index 884b474fa..bc05b2fb2 100644 --- a/packages/react-components/src/components/status/status.tsx +++ b/packages/react-components/src/components/status/status.tsx @@ -1,7 +1,7 @@ import type { StatusSettings } from './types'; import { KPI } from '../kpi/kpi'; import type { Threshold, StyleSettingsMap, Viewport } from '@iot-app-kit/core'; -import type { ComponentQuery } from '../../common/chartTypes'; +import type { ComponentQuery } from '@iot-app-kit/component-core'; export const Status = ({ query, diff --git a/packages/react-components/src/components/table/table.tsx b/packages/react-components/src/components/table/table.tsx index adae2b107..584971cc5 100644 --- a/packages/react-components/src/components/table/table.tsx +++ b/packages/react-components/src/components/table/table.tsx @@ -1,7 +1,6 @@ import { useCallback, useMemo, useState } from 'react'; import { TableBase } from './tableBase'; -import { useTimeSeriesData } from '../../hooks/useTimeSeriesData'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport, useTimeSeriesData } from '@iot-app-kit/component-core'; import type { StyleSettingsMap, Threshold, Viewport } from '@iot-app-kit/core'; import { type UseCollectionOptions } from '@cloudscape-design/collection-hooks'; import { @@ -15,22 +14,27 @@ import { DEFAULT_TABLE_MESSAGES } from './messages'; import type { TableProps as TableBaseProps } from '@cloudscape-design/components'; import type { AssistantProperty } from '../../common/assistantProps'; import { useAssistantContext } from '../../hooks/useAssistantContext/useAssistantContext'; -import { viewportEndDate, viewportStartDate } from '@iot-app-kit/core'; +import { + viewportEndDate, + viewportStartDate, + createNonNullableList, +} from '@iot-app-kit/core'; import { TableHeader } from './tableHeader'; import { TableAssistantResults } from './tableAssistantResults'; import { IntlProvider } from 'react-intl'; -import type { ComponentQuery } from '../../common/chartTypes'; -import { getTimeSeriesQueries } from '../../utils/queries'; -import { useAlarmsFromQueries } from '../../hooks/useAlarmsFromQueries/useAlarmsFromQueries'; -import { parseAlarmStateAssetProperty } from '../../hooks/useAlarms/transformers'; -import { mapAlarmRuleExpression } from '../../hooks/useAlarms/transformers/mapAlarmRuleExpression'; +import { + type ComponentQuery, + getTimeSeriesQueries, + useAlarmsFromQueries, + parseAlarmStateAssetProperty, + mapAlarmRuleExpression, + type AlarmData, + transformAlarmsToThreshold, +} from '@iot-app-kit/component-core'; import { convertToSupportedTimeRange, getSelectedQueriesAndProperties, } from '../../hooks/useAssistantContext/utils'; -import { type AlarmData } from '../../hooks/useAlarms'; -import { transformAlarmsToThreshold } from '../../utils/transformAlarmsToThreshold'; -import { createNonNullableList } from '../../utils/createNonNullableList'; const DEFAULT_VIEWPORT: Viewport = { duration: '10m' }; diff --git a/packages/react-components/src/components/table/tableHelpers.tsx b/packages/react-components/src/components/table/tableHelpers.tsx index 16474ae76..34826274a 100644 --- a/packages/react-components/src/components/table/tableHelpers.tsx +++ b/packages/react-components/src/components/table/tableHelpers.tsx @@ -17,7 +17,7 @@ import { spaceStaticXxs, } from '@cloudscape-design/design-tokens'; import { AlarmStateText } from '../alarm-components/alarm-state/alarmStateText'; -import { isAlarmState } from '../../hooks/useAlarms/transformers'; +import { isAlarmState } from '@iot-app-kit/component-core'; const dataQuality = ({ quality }: { quality: DataPoint['quality'] }) => { const color = diff --git a/packages/react-components/src/components/table/types.ts b/packages/react-components/src/components/table/types.ts index 0d7b33bf7..6be983f47 100644 --- a/packages/react-components/src/components/table/types.ts +++ b/packages/react-components/src/components/table/types.ts @@ -8,7 +8,7 @@ import type { import type { UseCollectionOptions } from '@cloudscape-design/collection-hooks'; import type { TableMessages } from './messages'; import type { AssistantProperty } from '../../common/assistantProps'; -import { type PascalCaseStateName } from '../../hooks/useAlarms/transformers'; +import { type PascalCaseStateName } from '@iot-app-kit/component-core'; export type TableItemRef = { $cellRef: { diff --git a/packages/react-components/src/components/time-sync/index.tsx b/packages/react-components/src/components/time-sync/index.tsx index fd2096349..beaaa3a02 100644 --- a/packages/react-components/src/components/time-sync/index.tsx +++ b/packages/react-components/src/components/time-sync/index.tsx @@ -1,6 +1,6 @@ import { viewportManager, type Viewport } from '@iot-app-kit/core'; +import { ViewportContext } from '@iot-app-kit/component-core'; import { - createContext, useCallback, useEffect, useRef, @@ -9,19 +9,6 @@ import { } from 'react'; import { v4 as uuid } from 'uuid'; -export interface IViewportContext { - viewport?: Viewport; - setViewport(viewport: Viewport, lastUpdatedBy?: string): void; - group: string; - lastUpdatedBy?: string; - onViewportChange?: (viewport: Viewport) => void; -} - -export const ViewportContext = createContext({ - setViewport: () => {}, - group: uuid(), -}); - export interface TimeSyncProps { group?: string; initialViewport?: Viewport; diff --git a/packages/react-components/src/components/time-sync/time-sync.spec.tsx b/packages/react-components/src/components/time-sync/time-sync.spec.tsx index a2e860a3b..c591c1a86 100644 --- a/packages/react-components/src/components/time-sync/time-sync.spec.tsx +++ b/packages/react-components/src/components/time-sync/time-sync.spec.tsx @@ -1,7 +1,7 @@ import { viewportManager } from '@iot-app-kit/core'; import { render, screen } from '@testing-library/react'; import { TimeSync } from './index'; -import { useViewport } from '../../hooks/useViewport/useViewport'; +import { useViewport } from '@iot-app-kit/component-core'; afterEach(() => { viewportManager.reset(); diff --git a/packages/react-components/src/components/time-sync/timeSelection.tsx b/packages/react-components/src/components/time-sync/timeSelection.tsx index adc8753cb..18a9a12ff 100644 --- a/packages/react-components/src/components/time-sync/timeSelection.tsx +++ b/packages/react-components/src/components/time-sync/timeSelection.tsx @@ -12,7 +12,7 @@ import { viewportToDateRange, } from '@iot-app-kit/core-util'; import { DateTime } from 'luxon'; -import { useViewport } from '../../hooks/useViewport'; +import { useViewport } from '@iot-app-kit/component-core'; import { Tooltip } from '../tooltip/index'; export type ViewportMessages = DateRangePickerProps.I18nStrings & { diff --git a/packages/react-components/src/components/timestampBar/index.tsx b/packages/react-components/src/components/timestampBar/index.tsx index 4477b0884..960ed2c02 100644 --- a/packages/react-components/src/components/timestampBar/index.tsx +++ b/packages/react-components/src/components/timestampBar/index.tsx @@ -7,8 +7,7 @@ import { Spinner } from '@cloudscape-design/components'; import './timestamp.css'; import { convertViewportToMs } from '../../utils/convertViewportToMs'; -import { type Viewport } from '@iot-app-kit/core'; -import { formatDate } from '../../utils/time'; +import { type Viewport, formatDate } from '@iot-app-kit/core'; import useDataStore from '../../store'; type TimestampProps = { diff --git a/packages/react-components/src/components/tooltip/tooltip.test.tsx b/packages/react-components/src/components/tooltip/tooltip.test.tsx index d41291cd9..2c2718d3b 100644 --- a/packages/react-components/src/components/tooltip/tooltip.test.tsx +++ b/packages/react-components/src/components/tooltip/tooltip.test.tsx @@ -14,7 +14,7 @@ describe('Tooltip', () => { it('renders the tooltip content correctly', () => { const { getByText } = render( - + {' '} {' '} diff --git a/packages/react-components/src/echarts/extensions/trendCursors/view/view.ts b/packages/react-components/src/echarts/extensions/trendCursors/view/view.ts index ee37df187..49dbea739 100644 --- a/packages/react-components/src/echarts/extensions/trendCursors/view/view.ts +++ b/packages/react-components/src/echarts/extensions/trendCursors/view/view.ts @@ -4,7 +4,7 @@ import { type SeriesModel } from 'echarts'; import type Axis2D from 'echarts/types/src/coord/cartesian/Axis2D.js'; import type ExtensionAPI from 'echarts/types/src/core/ExtensionAPI.js'; import useDataStore from '../../../../store'; -import { formatDate } from '../../../../utils/time'; +import { formatDate } from '@iot-app-kit/core'; import { type GenericSeries } from '../../../types'; import { type TrendCursorModel } from '../model'; import { type TrendCursor } from '../store'; diff --git a/packages/react-components/src/echarts/unboundedZoom/useUnboundedDataZoom.ts b/packages/react-components/src/echarts/unboundedZoom/useUnboundedDataZoom.ts index 09e1a79d9..3ae1dabbf 100644 --- a/packages/react-components/src/echarts/unboundedZoom/useUnboundedDataZoom.ts +++ b/packages/react-components/src/echarts/unboundedZoom/useUnboundedDataZoom.ts @@ -15,8 +15,10 @@ import { useEffectOnce, useUpdateEffect } from 'react-use'; import merge from 'lodash-es/merge'; import { DEFAULT_VIEWPORT } from '../../components/time-sync'; -import { useViewport } from '../../hooks/useViewport'; -import { type UtilizedViewportType } from '../../hooks/useViewport/useUtilizedViewport'; +import { + type UtilizedViewportType, + useViewport, +} from '@iot-app-kit/component-core'; import useIntlStore from '../../translations'; import { DEFAULT_DATA_ZOOM, diff --git a/packages/react-components/src/hooks/useAssistantContext/utils.ts b/packages/react-components/src/hooks/useAssistantContext/utils.ts index 677bef170..dfbddb374 100644 --- a/packages/react-components/src/hooks/useAssistantContext/utils.ts +++ b/packages/react-components/src/hooks/useAssistantContext/utils.ts @@ -5,7 +5,7 @@ import type { PropertyAliasQuery, SiteWiseDataStreamQuery, } from '@iot-app-kit/source-iotsitewise'; -import { type ComponentQuery } from '../../common/chartTypes'; +import { type ComponentQuery } from '@iot-app-kit/component-core'; export const convertToSupportedTimeRange = (start: Date, end: Date) => { let startISO = start.toISOString(); diff --git a/packages/react-components/src/hooks/useComponentId/useComponentId.spec.ts b/packages/react-components/src/hooks/useComponentId/useComponentId.spec.ts new file mode 100644 index 000000000..046f513de --- /dev/null +++ b/packages/react-components/src/hooks/useComponentId/useComponentId.spec.ts @@ -0,0 +1,43 @@ +import { renderHook } from '@testing-library/react'; +import { useComponentId } from './useComponentId'; + +// Mock uuid to return a predictable value +vi.mock('uuid', () => ({ + v4: vi.fn(() => 'mocked-uuid'), +})); + +describe('useComponentId', () => { + it('returns the provided ID when given', () => { + const { result } = renderHook(() => useComponentId('custom-id')); + expect(result.current).toBe('custom-id'); + }); + + it('generates a new unique ID when no ID is provided', () => { + const { result } = renderHook(() => useComponentId()); + expect(result.current).toBe('widget-mocked-uuid'); // Uses the mocked UUID + }); + + it('returns the same ID on re-render when the input ID does not change', () => { + const { result, rerender } = renderHook(({ id }) => useComponentId(id), { + initialProps: { id: 'fixed-id' }, + }); + + expect(result.current).toBe('fixed-id'); + + rerender({ id: 'fixed-id' }); + + expect(result.current).toBe('fixed-id'); // Should not change + }); + + it('generates a new ID when the input ID changes', () => { + const { result, rerender } = renderHook(({ id }) => useComponentId(id), { + initialProps: { id: 'first-id' }, + }); + + expect(result.current).toBe('first-id'); + + rerender({ id: 'second-id' }); + + expect(result.current).toBe('second-id'); // Should update to the new ID + }); +}); diff --git a/packages/react-components/src/hooks/useComponenttId/useComponenttId.ts b/packages/react-components/src/hooks/useComponenttId/useComponenttId.ts deleted file mode 100644 index 58ba0ff4d..000000000 --- a/packages/react-components/src/hooks/useComponenttId/useComponenttId.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { useMemo } from 'react'; - -import { v4 as uuid } from 'uuid'; - -const generateId = (id?: string) => - id && id.length > 0 ? id : `chart-${uuid()}`; - -/** - * Hook that provides a memoized id for the chart. - * Will use the given id if defined or generate a unique one - */ -export const useComponentId = (id?: string) => { - return useMemo(() => generateId(id), [id]); -}; diff --git a/packages/react-components/src/hooks/useECharts/useZoomableECharts.ts b/packages/react-components/src/hooks/useECharts/useZoomableECharts.ts index 9babdda8c..27582f51f 100644 --- a/packages/react-components/src/hooks/useECharts/useZoomableECharts.ts +++ b/packages/react-components/src/hooks/useECharts/useZoomableECharts.ts @@ -7,9 +7,11 @@ import { } from '../../echarts'; import { useUnboundedDataZoom } from '../../echarts/unboundedZoom'; import { type Viewport } from '@iot-app-kit/core'; -import { useViewport } from '../useViewport'; import { useMeasure } from 'react-use'; -import { type UtilizedViewportType } from '../useViewport/useUtilizedViewport'; +import { + type UtilizedViewportType, + useViewport, +} from '@iot-app-kit/component-core'; configureEchartsPlugins(); diff --git a/packages/react-components/src/hooks/useViewport/index.ts b/packages/react-components/src/hooks/useViewport/index.ts deleted file mode 100644 index 9319c8453..000000000 --- a/packages/react-components/src/hooks/useViewport/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './useViewport'; diff --git a/packages/react-components/src/hooks/useViewport/useViewport.ts b/packages/react-components/src/hooks/useViewport/useViewport.ts deleted file mode 100644 index bc7fd1c45..000000000 --- a/packages/react-components/src/hooks/useViewport/useViewport.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { useContext } from 'react'; -import { ViewportContext } from '../../components/time-sync'; - -export const useViewport = () => useContext(ViewportContext); diff --git a/packages/react-components/src/index.ts b/packages/react-components/src/index.ts index 322fa3e03..6610a3635 100644 --- a/packages/react-components/src/index.ts +++ b/packages/react-components/src/index.ts @@ -32,8 +32,8 @@ export { TimeSync } from './components/time-sync'; export { TimeSelection } from './components/time-sync/timeSelection'; export { useHasFeatureFlag } from './hooks/useHasFeatureFlag'; -export { useTimeSeriesData } from './hooks/useTimeSeriesData'; -export { useViewport } from './hooks/useViewport'; +export { useTimeSeriesData } from '@iot-app-kit/component-core'; +export { useViewport } from '@iot-app-kit/component-core'; export { useGetConfigValue } from './store/index'; export { @@ -57,7 +57,7 @@ export type { TableItemRef, } from './components/table'; -export { formatDate } from './utils/time'; +export { formatDate } from '@iot-app-kit/core'; export { AlarmExplorer, @@ -78,13 +78,10 @@ export { type SelectionMode, type TimeSeriesExplorerProps, type TimeSeriesResource, -} from './components/resource-explorers'; - -export { type TableResourceDefinition } from './components/resource-explorers/types/table'; - -export { type TimeSeriesResourceWithLatestValue } from './components/resource-explorers/types/resources'; - -export { type ResourceFieldFilterOperator } from './components/resource-explorers/types/common'; + type TableResourceDefinition, + type TimeSeriesResourceWithLatestValue, + type ResourceFieldFilterOperator, +} from '@iot-app-kit/resource-explorer'; export type { AlarmAssistantContext, diff --git a/packages/react-components/src/queries/common/types.ts b/packages/react-components/src/queries/common/types.ts deleted file mode 100644 index 671ab1fbf..000000000 --- a/packages/react-components/src/queries/common/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type UseQueryOptions } from '@tanstack/react-query'; - -export type QueryOptionsGlobal = Pick; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/cacheClient.ts b/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/cacheClient.ts deleted file mode 100644 index f8c504925..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/cacheClient.ts +++ /dev/null @@ -1,50 +0,0 @@ -import isEqual from 'lodash-es/isEqual'; -import isUndefined from 'lodash-es/isUndefined'; -import omitBy from 'lodash-es/omitBy'; -import { - type Interval, - TimeSeriesDataCacheClient, -} from '../../useTimeSeriesData'; -import { - assetPropertyValuePointMilliseconds, - filterAssetPropertyValues, -} from '../cacheUtils/filterAssetPropertyValues'; -import { - type AssetPropertyValuesData, - type AssetPropertyValuesRequest, -} from '../types'; - -export class AssetPropertyValuesCacheClient extends TimeSeriesDataCacheClient< - AssetPropertyValuesRequest, - AssetPropertyValuesData[number] -> { - #sortTimeSeriesData(data: AssetPropertyValuesData): AssetPropertyValuesData { - return data.sort( - (a, b) => - assetPropertyValuePointMilliseconds(a) - - assetPropertyValuePointMilliseconds(b) - ); - } - - matchesRequest( - requestA: AssetPropertyValuesRequest, - requestB: AssetPropertyValuesRequest - ): boolean { - return isEqual( - omitBy(requestA, isUndefined), - omitBy(requestB, isUndefined) - ); - } - filterTimeSeriesData( - data: AssetPropertyValuesData, - interval: Interval - ): AssetPropertyValuesData { - return filterAssetPropertyValues(data, interval); - } - addTimeSeriesData( - oldData?: AssetPropertyValuesData, - newData?: AssetPropertyValuesData - ): AssetPropertyValuesData { - return this.#sortTimeSeriesData([...(oldData ?? []), ...(newData ?? [])]); - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/concreteClients.ts b/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/concreteClients.ts deleted file mode 100644 index c1d4b9de5..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/concreteClients.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { queryClient } from '../../queryClient'; -import { AssetPropertyValuesCacheClient } from './cacheClient'; -import { AssetPropertyValuesKeyManager } from './keyManager'; - -export const ASSET_PROPERTY_VALUES_KEY_MANAGER = - new AssetPropertyValuesKeyManager(); -export const ASSET_PROPERTY_VALUES_CACHE_CLIENT = - new AssetPropertyValuesCacheClient({ - keyManager: ASSET_PROPERTY_VALUES_KEY_MANAGER, - client: queryClient, - }); diff --git a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/index.ts b/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/index.ts deleted file mode 100644 index 86c196339..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './cacheClient'; -export * from './keyManager'; -export * from './concreteClients'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/keyManager.ts b/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/keyManager.ts deleted file mode 100644 index bfd79c7ca..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/cacheClient/keyManager.ts +++ /dev/null @@ -1,38 +0,0 @@ -import isUndefined from 'lodash-es/isUndefined'; -import omit from 'lodash-es/omit'; -import omitBy from 'lodash-es/omitBy'; -import { - type SeriaizedRequest, - TimeSeriesDataCacheKeyManager, -} from '../../useTimeSeriesData'; -import { type AssetPropertyValuesRequest } from '../types'; - -export class AssetPropertyValuesKeyManager extends TimeSeriesDataCacheKeyManager { - RESOURCE = 'Asset property values'; - - serializeQueryExecutionRequest( - request: AssetPropertyValuesRequest - ): SeriaizedRequest { - return omit(omitBy(request, isUndefined), [ - 'startDate', - 'endDate', - 'nextToken', - ]); - } - - serializeRequest(request: AssetPropertyValuesRequest): SeriaizedRequest { - return omit(omitBy(request, isUndefined), [ - 'startDate', - 'endDate', - 'nextToken', - 'maxResults', - 'numberOfDataPointsToScanFor', - 'timeOrdering', - ]); - } - deserializeRequest( - serializedRequest: SeriaizedRequest - ): AssetPropertyValuesRequest { - return serializedRequest; - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/cacheUtils/filterAssetPropertyValues.ts b/packages/react-components/src/queries/useAssetPropertyValues/cacheUtils/filterAssetPropertyValues.ts deleted file mode 100644 index b5160de47..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/cacheUtils/filterAssetPropertyValues.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { bisector } from 'd3-array'; -import { timeSeriesDataFilterer } from '../../useTimeSeriesData'; -import { type DataPoint } from '@iot-app-kit/charts-core'; - -export const assetPropertyValuePointMilliseconds = (point: DataPoint) => { - return point.x; -}; - -export const assetPropertyValuesBisector = bisector((p: DataPoint) => - assetPropertyValuePointMilliseconds(p) -); - -export const filterAssetPropertyValues = timeSeriesDataFilterer( - assetPropertyValuesBisector, - assetPropertyValuePointMilliseconds -); diff --git a/packages/react-components/src/queries/useAssetPropertyValues/index.ts b/packages/react-components/src/queries/useAssetPropertyValues/index.ts deleted file mode 100644 index fcb073fef..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './types'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/index.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/index.ts deleted file mode 100644 index 3f3b9e663..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './loader'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/loader.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/loader.ts deleted file mode 100644 index bf8095d26..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/loader.ts +++ /dev/null @@ -1,153 +0,0 @@ -import DataLoader from 'dataloader'; -import { - type ExecuteRequestStrategy, - type OnRequestSuccessCallback, - type SendOptions, -} from '../../../useTimeSeriesData'; -import { - type AssetPropertyAggregatesRequest, - type AssetPropertyValuesData, - type BatchGetAssetPropertyAggregatesRequestFunction, - type BatchGetAssetPropertyAggregatesRequestResponse, -} from '../../types'; -import { anySignal } from '../utils/anySignal'; -import { type BatchGetRequest, BatchGetRequestManager } from './requestManager'; -import { createNonNullableList } from '../../../../utils/createNonNullableList'; - -export type AssetPropertyAggregatesLoaderOptions = { - batchGetAssetPropertyAggregates: BatchGetAssetPropertyAggregatesRequestFunction; - batchSchedulerTimeout?: number; - maxResults?: number; - batchSize?: number; -}; - -export class AssetPropertyAggregatesLoader - implements - ExecuteRequestStrategy< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - > -{ - private static instance: AssetPropertyAggregatesLoader; - - private batchSchedulerTimeout: number; - private maxResults: number; - private batchSize: number; - - private batchGetAssetPropertyAggregates: BatchGetAssetPropertyAggregatesRequestFunction; - - private loader: DataLoader< - BatchGetRequest, - ReturnType - >; - - private constructor({ - batchGetAssetPropertyAggregates, - batchSchedulerTimeout = 100, - maxResults = 4000, - batchSize = 16, - }: AssetPropertyAggregatesLoaderOptions) { - this.batchGetAssetPropertyAggregates = batchGetAssetPropertyAggregates; - this.batchSchedulerTimeout = batchSchedulerTimeout; - this.maxResults = maxResults; - this.batchSize = batchSize; - - this.loader = new DataLoader(this.batchLoaderFn.bind(this), { - batchScheduleFn: this.batchScheduleFn.bind(this), - cache: false, - maxBatchSize: this.batchSize, - }); - } - - private handleError( - requests: readonly AssetPropertyAggregatesRequest[], - error: unknown - ): never { - console.error( - `Failed to batch get asset property value histories. Error: ${error}` - ); - console.info('Request input:'); - console.table(requests); - - throw error; - } - - private async batchLoaderFn( - entries: readonly BatchGetRequest[] - ): Promise[]> { - let nextToken = undefined; - - const requests = entries.map((batchRequest) => { - return new BatchGetRequestManager(batchRequest); - }); - - const abortSignal = anySignal( - entries.map(({ options: { signal } }) => signal) - ); - - try { - do { - const entries = createNonNullableList( - requests.map((request) => request.getRequest()) - ); - abortSignal.throwIfAborted(); - - const response: BatchGetAssetPropertyAggregatesRequestResponse = - await this.batchGetAssetPropertyAggregates( - { - entries, - maxResults: this.maxResults, - nextToken, - }, - { - abortSignal, - } - ); - - requests.forEach((request) => { - request.processResponse(response); - }); - - nextToken = response.nextToken; - } while (nextToken && requests.every((request) => !request.complete)); - - return requests.map((request) => request.getResponse()); - } catch (error) { - this.handleError( - entries.map((entry) => entry.options.request), - error - ); - } - } - - private batchScheduleFn(callback: () => void) { - return setTimeout(callback, this.batchSchedulerTimeout); - } - - public static getInstance( - options: AssetPropertyAggregatesLoaderOptions - ): AssetPropertyAggregatesLoader { - if (!AssetPropertyAggregatesLoader.instance) { - AssetPropertyAggregatesLoader.instance = - new AssetPropertyAggregatesLoader(options); - } - return AssetPropertyAggregatesLoader.instance; - } - - public async send( - options: SendOptions, - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - > - ): Promise { - const { error, data } = await this.loader.load({ - options, - onRequestSuccess, - }); - if (error != null) { - this.handleError([options.request], error); - } - return data; - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/requestManager.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/requestManager.ts deleted file mode 100644 index 570bd51f3..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyAggregates/requestManager.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { TimeOrdering } from '@aws-sdk/client-iotsitewise'; -import takeRight from 'lodash-es/takeRight'; -import { nanoid } from 'nanoid'; -import { createNonNullableList } from '../../../../utils/createNonNullableList'; -import { - type OnRequestSuccessCallback, - type SendOptions, -} from '../../../useTimeSeriesData'; -import { - type AssetPropertyAggregatesRequest, - type AssetPropertyValuesData, - type BatchGetAssetPropertyAggregatesRequestParameters, - type BatchGetAssetPropertyAggregatesRequestResponse, -} from '../../types'; -import { aggregateToDataPoint } from '../../utils/toDataPoint'; - -export type BatchGetRequest = { - options: SendOptions; - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - >; -}; - -export type BatchGetSuccessResponse = NonNullable< - BatchGetAssetPropertyAggregatesRequestResponse['successEntries'] ->[number]; -export type BatchGetErrorResponse = NonNullable< - BatchGetAssetPropertyAggregatesRequestResponse['errorEntries'] ->[number]; -export type BatchGetEntry = NonNullable< - BatchGetAssetPropertyAggregatesRequestParameters['entries'] ->[number]; - -export class BatchGetRequestManager { - private options: SendOptions; - private onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - >; - - private dataPointNumberTarget: number; - - public assetPropertyValues: AssetPropertyValuesData = []; - - public error?: Omit; - - public entryId = nanoid(64); - - public complete = false; - - constructor({ options, onRequestSuccess }: BatchGetRequest) { - this.options = options; - this.onRequestSuccess = onRequestSuccess; - - this.dataPointNumberTarget = - options.request.numberOfDataPointsToScanFor ?? Infinity; - } - - getRequest(): BatchGetEntry | undefined { - /** - * We don't need to fulfill this request if we've already found all - * the points we needed - */ - if (this.complete) return; - - const { - request, - interval: { start, end }, - } = this.options; - return { - ...request, - entryId: this.entryId, - endDate: end, - startDate: start, - timeOrdering: request.timeOrdering ?? TimeOrdering.DESCENDING, - }; - } - - processResponse(response: BatchGetAssetPropertyAggregatesRequestResponse) { - const { errorEntries, successEntries } = response; - - successEntries?.forEach((entry) => { - if (entry.entryId !== this.entryId) return; - - const assetPropertyAggregateValues = entry.aggregatedValues ?? []; - const reducedAssetPropertyAggregateValues = takeRight( - assetPropertyAggregateValues, - this.dataPointNumberTarget - ); - this.dataPointNumberTarget -= assetPropertyAggregateValues.length; - - const datapoints = createNonNullableList( - reducedAssetPropertyAggregateValues.map(aggregateToDataPoint) - ); - - this.onRequestSuccess(this.options.request, datapoints); - this.assetPropertyValues.push(...datapoints); - - if (this.dataPointNumberTarget <= 0) { - this.complete = true; - } - }); - - errorEntries?.forEach((entry) => { - if (entry.entryId !== this.entryId) return; - - this.error = { - errorCode: entry.errorCode, - errorMessage: entry.errorMessage, - }; - }); - } - - getResponse() { - return { - error: this.error, - data: this.assetPropertyValues, - }; - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/index.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/index.ts deleted file mode 100644 index 3f3b9e663..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './loader'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/loader.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/loader.ts deleted file mode 100644 index b23815416..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/loader.ts +++ /dev/null @@ -1,153 +0,0 @@ -import DataLoader from 'dataloader'; -import { - type ExecuteRequestStrategy, - type OnRequestSuccessCallback, - type SendOptions, -} from '../../../useTimeSeriesData'; -import { - type AssetPropertyValueHistoryRequest, - type AssetPropertyValuesData, - type BatchGetAssetPropertyValueHistoryRequestFunction, - type BatchGetAssetPropertyValueHistoryRequestResponse, -} from '../../types'; -import { anySignal } from '../utils/anySignal'; -import { type BatchGetRequest, BatchGetRequestManager } from './requestManager'; -import { createNonNullableList } from '../../../../utils/createNonNullableList'; - -export type AssetPropertyValueHistoryLoaderOptions = { - batchGetAssetPropertyValueHistory: BatchGetAssetPropertyValueHistoryRequestFunction; - batchSchedulerTimeout?: number; - maxResults?: number; - batchSize?: number; -}; - -export class AssetPropertyValueHistoryLoader - implements - ExecuteRequestStrategy< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - > -{ - private static instance: AssetPropertyValueHistoryLoader; - - private batchSchedulerTimeout: number; - private maxResults: number; - private batchSize: number; - - private batchGetAssetPropertyValueHistory: BatchGetAssetPropertyValueHistoryRequestFunction; - - private loader: DataLoader< - BatchGetRequest, - ReturnType - >; - - private constructor({ - batchGetAssetPropertyValueHistory, - batchSchedulerTimeout = 100, - maxResults = 20000, - batchSize = 16, - }: AssetPropertyValueHistoryLoaderOptions) { - this.batchGetAssetPropertyValueHistory = batchGetAssetPropertyValueHistory; - this.batchSchedulerTimeout = batchSchedulerTimeout; - this.maxResults = maxResults; - this.batchSize = batchSize; - - this.loader = new DataLoader(this.batchLoaderFn.bind(this), { - batchScheduleFn: this.batchScheduleFn.bind(this), - cache: false, - maxBatchSize: this.batchSize, - }); - } - - private handleError( - requests: readonly AssetPropertyValueHistoryRequest[], - error: unknown - ): never { - console.error( - `Failed to batch get asset property value histories. Error: ${error}` - ); - console.info('Request input:'); - console.table(requests); - - throw error; - } - - private async batchLoaderFn( - entries: readonly BatchGetRequest[] - ): Promise[]> { - let nextToken = undefined; - - const requests = entries.map((batchRequest) => { - return new BatchGetRequestManager(batchRequest); - }); - - const abortSignal = anySignal( - entries.map(({ options: { signal } }) => signal) - ); - - try { - do { - const entries = createNonNullableList( - requests.map((request) => request.getRequest()) - ); - abortSignal.throwIfAborted(); - - const response: BatchGetAssetPropertyValueHistoryRequestResponse = - await this.batchGetAssetPropertyValueHistory( - { - entries, - maxResults: this.maxResults, - nextToken, - }, - { - abortSignal, - } - ); - - requests.forEach((request) => { - request.processResponse(response); - }); - - nextToken = response.nextToken; - } while (nextToken && requests.every((request) => !request.complete)); - - return requests.map((request) => request.getResponse()); - } catch (error) { - this.handleError( - entries.map((entry) => entry.options.request), - error - ); - } - } - - private batchScheduleFn(callback: () => void) { - return setTimeout(callback, this.batchSchedulerTimeout); - } - - public static getInstance( - options: AssetPropertyValueHistoryLoaderOptions - ): AssetPropertyValueHistoryLoader { - if (!AssetPropertyValueHistoryLoader.instance) { - AssetPropertyValueHistoryLoader.instance = - new AssetPropertyValueHistoryLoader(options); - } - return AssetPropertyValueHistoryLoader.instance; - } - - public async send( - options: SendOptions, - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - > - ): Promise { - const { error, data } = await this.loader.load({ - options, - onRequestSuccess, - }); - if (error != null) { - this.handleError([options.request], error); - } - return data; - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/requestManager.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/requestManager.ts deleted file mode 100644 index 868142110..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/batchGetAssetPropertyValueHistory/requestManager.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { TimeOrdering } from '@aws-sdk/client-iotsitewise'; -import takeRight from 'lodash-es/takeRight'; -import { nanoid } from 'nanoid'; -import { createNonNullableList } from '../../../../utils/createNonNullableList'; -import { - type OnRequestSuccessCallback, - type SendOptions, -} from '../../../useTimeSeriesData'; -import { - type AssetPropertyValueHistoryRequest, - type AssetPropertyValuesData, - type BatchGetAssetPropertyValueHistoryRequestParameters, - type BatchGetAssetPropertyValueHistoryRequestResponse, -} from '../../types'; -import { toDataPoint } from '../../utils/toDataPoint'; - -export type BatchGetRequest = { - options: SendOptions; - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - >; -}; - -export type BatchGetSuccessResponse = NonNullable< - BatchGetAssetPropertyValueHistoryRequestResponse['successEntries'] ->[number]; -export type BatchGetErrorResponse = NonNullable< - BatchGetAssetPropertyValueHistoryRequestResponse['errorEntries'] ->[number]; -export type BatchGetEntry = NonNullable< - BatchGetAssetPropertyValueHistoryRequestParameters['entries'] ->[number]; - -export class BatchGetRequestManager { - private options: SendOptions; - private onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - >; - - private dataPointNumberTarget: number; - - public assetPropertyValues: AssetPropertyValuesData = []; - - public error?: Omit; - - public entryId = nanoid(64); - - public complete = false; - - constructor({ options, onRequestSuccess }: BatchGetRequest) { - this.options = options; - this.onRequestSuccess = onRequestSuccess; - - this.dataPointNumberTarget = - options.request.numberOfDataPointsToScanFor ?? Infinity; - } - - getRequest(): BatchGetEntry | undefined { - /** - * We don't need to fulfill this request if we've already found all - * the points we needed - */ - if (this.complete) return; - - const { - request, - interval: { start, end }, - } = this.options; - return { - ...request, - entryId: this.entryId, - endDate: end, - startDate: start, - timeOrdering: request.timeOrdering ?? TimeOrdering.DESCENDING, - }; - } - - processResponse(response: BatchGetAssetPropertyValueHistoryRequestResponse) { - const { errorEntries, successEntries } = response; - - successEntries?.forEach((entry) => { - if (entry.entryId !== this.entryId) return; - - const assetPropertyValueHistory = entry.assetPropertyValueHistory ?? []; - const reducedAssetPropertyValueHistory = takeRight( - assetPropertyValueHistory, - this.dataPointNumberTarget - ); - this.dataPointNumberTarget -= assetPropertyValueHistory.length; - - const datapoints = createNonNullableList( - reducedAssetPropertyValueHistory.map(toDataPoint) - ); - - this.onRequestSuccess(this.options.request, datapoints); - this.assetPropertyValues.push(...datapoints); - - if (this.dataPointNumberTarget <= 0) { - this.complete = true; - } - }); - - errorEntries?.forEach((entry) => { - if (entry.entryId !== this.entryId) return; - - this.error = { - errorCode: entry.errorCode, - errorMessage: entry.errorMessage, - }; - }); - } - - getResponse() { - return { - error: this.error, - data: this.assetPropertyValues, - }; - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyAggregates.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyAggregates.ts deleted file mode 100644 index 8096a4c4e..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyAggregates.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { TimeOrdering } from '@aws-sdk/client-iotsitewise'; -import { type RequestResponse } from '@iot-app-kit/core'; -import takeRight from 'lodash-es/takeRight'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; -import { - type ExecuteRequestStrategy, - type OnRequestSuccessCallback, -} from '../../useTimeSeriesData/requestExecution/requestExecutionStrategy'; -import { type SendOptions } from '../../useTimeSeriesData/requestExecution/types'; -import { - type AssetPropertyAggregatesRequest, - type AssetPropertyValuesData, - type GetAssetPropertyAggregatesRequestFunction, -} from '../types'; -import { aggregateToDataPoint } from '../utils/toDataPoint'; - -export class GetAssetPropertyAggregates - implements - ExecuteRequestStrategy< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - > -{ - private maxResults = 2500; - - private getAssetPropertyAggregates: GetAssetPropertyAggregatesRequestFunction; - - constructor({ - getAssetPropertyAggregates, - }: { - getAssetPropertyAggregates: GetAssetPropertyAggregatesRequestFunction; - }) { - this.getAssetPropertyAggregates = getAssetPropertyAggregates; - } - - private handleError( - request: AssetPropertyAggregatesRequest, - error: unknown - ): never { - console.error(`Failed to get asset property aggregates. Error: ${error}`); - console.info('Request input:'); - console.table(request); - - throw error; - } - - public async send( - { - request, - signal, - interval: { start, end }, - }: SendOptions, - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - > - ): Promise { - let dataPointNumberTarget = request.numberOfDataPointsToScanFor ?? Infinity; - - let nextToken = undefined; - - const assetPropertyValues: AssetPropertyValuesData = []; - - try { - do { - signal.throwIfAborted(); - - const response: RequestResponse = - await this.getAssetPropertyAggregates( - { - ...request, - endDate: end, - startDate: start, - maxResults: request.maxResults ?? this.maxResults, - timeOrdering: request.timeOrdering ?? TimeOrdering.DESCENDING, - nextToken, - }, - { - abortSignal: signal, - } - ); - - const assetPropertyAggregateValues = response.aggregatedValues ?? []; - const reducedAssetPropertyAggregateValues = takeRight( - assetPropertyAggregateValues, - dataPointNumberTarget - ); - dataPointNumberTarget -= assetPropertyAggregateValues.length; - - const datapoints = createNonNullableList( - reducedAssetPropertyAggregateValues.map(aggregateToDataPoint) - ); - - onRequestSuccess(request, datapoints); - - nextToken = response.nextToken; - - assetPropertyValues.push(...datapoints); - } while (nextToken && assetPropertyValues.length < dataPointNumberTarget); - - return assetPropertyValues; - } catch (error) { - this.handleError(request, error); - } - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyValueHistory.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyValueHistory.ts deleted file mode 100644 index 70a716908..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/getAssetPropertyValueHistory.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { TimeOrdering } from '@aws-sdk/client-iotsitewise'; -import { type RequestResponse } from '@iot-app-kit/core'; -import takeRight from 'lodash-es/takeRight'; -import { createNonNullableList } from '../../../utils/createNonNullableList'; -import { - type ExecuteRequestStrategy, - type OnRequestSuccessCallback, -} from '../../useTimeSeriesData/requestExecution/requestExecutionStrategy'; -import { type SendOptions } from '../../useTimeSeriesData/requestExecution/types'; -import { - type AssetPropertyValueHistoryRequest, - type AssetPropertyValuesData, - type GetAssetPropertyValueHistoryRequestFunction, -} from '../types'; -import { toDataPoint } from '../utils/toDataPoint'; - -export class GetAssetPropertyValueHistory - implements - ExecuteRequestStrategy< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - > -{ - private maxResults = 20000; - - private getAssetPropertyValueHistory: GetAssetPropertyValueHistoryRequestFunction; - - constructor({ - getAssetPropertyValueHistory, - }: { - getAssetPropertyValueHistory: GetAssetPropertyValueHistoryRequestFunction; - }) { - this.getAssetPropertyValueHistory = getAssetPropertyValueHistory; - } - - private handleError( - request: AssetPropertyValueHistoryRequest, - error: unknown - ): never { - console.error( - `Failed to get asset property value history. Error: ${error}` - ); - console.info('Request input:'); - console.table(request); - - throw error; - } - - public async send( - { - request, - signal, - interval: { start, end }, - }: SendOptions, - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - > - ): Promise { - let dataPointNumberTarget = request.numberOfDataPointsToScanFor ?? Infinity; - - let nextToken = undefined; - - const assetPropertyValues: AssetPropertyValuesData = []; - - try { - do { - signal.throwIfAborted(); - - const response: RequestResponse = - await this.getAssetPropertyValueHistory( - { - ...request, - endDate: end, - startDate: start, - maxResults: request.maxResults ?? this.maxResults, - timeOrdering: request.timeOrdering ?? TimeOrdering.DESCENDING, - nextToken, - }, - { - abortSignal: signal, - } - ); - - const assetPropertyValueHistory = - response.assetPropertyValueHistory ?? []; - const reducedAssetPropertyValueHistory = takeRight( - assetPropertyValueHistory, - dataPointNumberTarget - ); - dataPointNumberTarget -= assetPropertyValueHistory.length; - - const datapoints = createNonNullableList( - reducedAssetPropertyValueHistory.map(toDataPoint) - ); - - onRequestSuccess(request, datapoints); - - nextToken = response.nextToken; - - assetPropertyValues.push(...datapoints); - } while (nextToken && assetPropertyValues.length < dataPointNumberTarget); - - return assetPropertyValues; - } catch (error) { - this.handleError(request, error); - } - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/index.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/index.ts deleted file mode 100644 index 00bf90874..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getAssetPropertyValueHistory'; -export * from './requestExecution'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/requestExecution.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/requestExecution.ts deleted file mode 100644 index 74183a5e9..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestExecution/requestExecution.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { TimeSeriesDataRequestExecution } from '../../useTimeSeriesData/requestExecution/requestExecution'; -import { - type AssetPropertyAggregatesRequest, - type AssetPropertyValueHistoryRequest, - type AssetPropertyValuesData, - type AssetPropertyValuesRequest, - type AssetPropertyValuesRequestFunctions, -} from '../types'; -import { GetAssetPropertyValueHistory } from './getAssetPropertyValueHistory'; -import { GetAssetPropertyAggregates } from './getAssetPropertyAggregates'; -import { type AssetPropertyValuesCacheClient } from '../cacheClient'; -import { type SendOptions } from '../../useTimeSeriesData/requestExecution/types'; -import { - type ExecuteRequestStrategy, - NoopExecuteRequestStrategy, - type OnRequestSuccessCallback, -} from '../../useTimeSeriesData/requestExecution/requestExecutionStrategy'; -import { AssetPropertyValueHistoryLoader } from './batchGetAssetPropertyValueHistory'; -import { AssetPropertyAggregatesLoader } from './batchGetAssetPropertyAggregates'; - -const isAggregateRequest = ( - options: SendOptions -): options is SendOptions => { - return ( - 'resolution' in options.request && - options.request.resolution != null && - options.request.resolution !== '0' && - 'aggregateTypes' in options.request && - options.request.aggregateTypes != null - ); -}; - -type GetAssetPropertyValuesRequestExecutionOptions = - AssetPropertyValuesRequestFunctions & { - cacheClient: AssetPropertyValuesCacheClient; - }; - -export class GetAssetPropertyValuesRequestExecution extends TimeSeriesDataRequestExecution< - AssetPropertyValuesRequest, - AssetPropertyValuesData[number] -> { - private rawDataRequestExecutionStrategy: ExecuteRequestStrategy< - AssetPropertyValueHistoryRequest, - AssetPropertyValuesData[number] - > = new NoopExecuteRequestStrategy(); - - private aggregateDataRequestExecutionStrategy: ExecuteRequestStrategy< - AssetPropertyAggregatesRequest, - AssetPropertyValuesData[number] - > = new NoopExecuteRequestStrategy(); - - constructor({ - cacheClient, - getAssetPropertyValueHistory, - batchGetAssetPropertyValueHistory, - getAssetPropertyAggregates, - batchGetAssetPropertyAggregates, - }: GetAssetPropertyValuesRequestExecutionOptions) { - super({ cacheClient }); - - if (getAssetPropertyValueHistory != null) { - this.rawDataRequestExecutionStrategy = new GetAssetPropertyValueHistory({ - getAssetPropertyValueHistory, - }); - } - - if (batchGetAssetPropertyValueHistory != null) { - this.rawDataRequestExecutionStrategy = - AssetPropertyValueHistoryLoader.getInstance({ - batchGetAssetPropertyValueHistory, - }); - } - - if (getAssetPropertyAggregates != null) { - this.aggregateDataRequestExecutionStrategy = - new GetAssetPropertyAggregates({ - getAssetPropertyAggregates, - }); - } - - if (batchGetAssetPropertyAggregates != null) { - this.aggregateDataRequestExecutionStrategy = - AssetPropertyAggregatesLoader.getInstance({ - batchGetAssetPropertyAggregates, - }); - } - } - - async sendRequest( - sendOptions: SendOptions, - onRequestSuccess: OnRequestSuccessCallback< - AssetPropertyValuesRequest, - AssetPropertyValuesData[number] - > - ): Promise { - if (isAggregateRequest(sendOptions)) { - return await this.aggregateDataRequestExecutionStrategy.send( - sendOptions, - onRequestSuccess - ); - } - - return await this.rawDataRequestExecutionStrategy.send( - sendOptions, - onRequestSuccess - ); - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/assetPropertyValuesRequestResolver.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestManager/assetPropertyValuesRequestResolver.ts deleted file mode 100644 index 6f4165335..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/assetPropertyValuesRequestResolver.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { TimeOrdering } from '@aws-sdk/client-iotsitewise'; -import { - type RequestResolverStrategy, - type RequestSettings, - type Viewport, -} from '../../useTimeSeriesData'; -import { type AssetPropertyValuesRequest } from '../types'; -import { viewportEndDate, viewportStartDate } from '@iot-app-kit/core'; - -const SITEWISE_PREVIEW_DATE = new Date(2018, 0, 1); - -export class AssetPropertyValuesRequestResolver - implements RequestResolverStrategy -{ - #viewportResolverStrategy: RequestResolverStrategy; - constructor( - viewportResolverStrategy: RequestResolverStrategy - ) { - this.#viewportResolverStrategy = viewportResolverStrategy; - } - - resolve( - options: { - request: AssetPropertyValuesRequest; - viewport: Viewport; - }, - settings?: RequestSettings | undefined - ): { request: AssetPropertyValuesRequest; viewport: Viewport }[] { - const resolved = this.#viewportResolverStrategy.resolve(options, settings); - - const { request, viewport } = options; - - if (settings?.fetchMostRecentBeforeEnd) { - const mostRecentBeforeEndRequest: AssetPropertyValuesRequest = { - ...request, - maxResults: 1, - numberOfDataPointsToScanFor: 1, - timeOrdering: TimeOrdering.DESCENDING, - }; - const mostRecentBeforeEndViewport: Viewport = { - start: SITEWISE_PREVIEW_DATE, - end: viewportEndDate(viewport), - }; - resolved.push({ - request: mostRecentBeforeEndRequest, - viewport: mostRecentBeforeEndViewport, - }); - } - - if (settings?.fetchMostRecentBeforeStart) { - const mostRecentBeforeStartRequest: AssetPropertyValuesRequest = { - ...request, - maxResults: 1, - numberOfDataPointsToScanFor: 1, - timeOrdering: TimeOrdering.DESCENDING, - }; - const mostRecentBeforeStartViewport: Viewport = { - start: SITEWISE_PREVIEW_DATE, - end: viewportStartDate(viewport), - }; - resolved.push({ - request: mostRecentBeforeStartRequest, - viewport: mostRecentBeforeStartViewport, - }); - } - - return resolved; - } -} diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/index.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestManager/index.ts deleted file mode 100644 index bcd2a8d64..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './useRequestResolverStrategy'; -export * from './useAutoRequestResolution'; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/useAutoRequestResolution.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestManager/useAutoRequestResolution.ts deleted file mode 100644 index 555ba6047..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/useAutoRequestResolution.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { parseDuration } from '@iot-app-kit/core'; -import { - IntervalTransformer, - type Viewport, - getViewportType, -} from '../../useTimeSeriesData'; -import { - type AssetPropertyAggregatesRequest, - type AssetPropertyValueHistoryRequest, - type AssetPropertyValuesRequest, -} from '../types'; -import { AggregateType } from '@aws-sdk/client-iotsitewise'; -import { useMemo } from 'react'; - -const hasResolution = ( - request: AssetPropertyValuesRequest -): request is AssetPropertyAggregatesRequest => { - return 'resolution' in request && request.resolution != null; -}; - -const hasAggregates = ( - request: AssetPropertyValuesRequest -): request is AssetPropertyAggregatesRequest => { - return 'aggregateTypes' in request && request.aggregateTypes != null; -}; - -type ResolutionConfiguration = { - resolution: string; - duration: number; -}; - -export const DEFAULT_RESOLUTION_CONFIGURATIONS: ResolutionConfiguration[] = [ - { - resolution: '0', - duration: parseDuration('15m'), - }, - { - resolution: '1m', - duration: parseDuration('15h'), - }, - { - resolution: '1h', - duration: parseDuration('60d'), - }, - { - resolution: '1d', - duration: Infinity, - }, -]; - -type UseAutoRequestResolutionOptions = { - requests: AssetPropertyValueHistoryRequest[]; - viewport: Viewport; - resolutionConfigurations?: ResolutionConfiguration[]; -}; - -export const useAutoRequestResolution = ({ - requests, - viewport, - resolutionConfigurations = DEFAULT_RESOLUTION_CONFIGURATIONS, -}: UseAutoRequestResolutionOptions) => { - return useMemo(() => { - const sortedResolutionConfgurations = resolutionConfigurations.sort( - (a, b) => a.duration - b.duration - ); - - const intervalTransformer = new IntervalTransformer({ - now: Date.now(), - viewportType: getViewportType(viewport), - }); - const interval = intervalTransformer.toInterval(viewport); - const intervalDuration = interval.end.getTime() - interval.start.getTime(); - - return requests.map((request) => { - if (hasResolution(request)) return request; - - const resolutionConfiguration = sortedResolutionConfgurations.find( - (configuration) => { - return intervalDuration <= configuration.duration; - } - ); - - const resolution = resolutionConfiguration?.resolution; - const aggregateTypes = hasAggregates(request) - ? request.aggregateTypes - : [AggregateType.AVERAGE]; - - if (resolution === '0') return request; - - return { - ...request, - resolution, - aggregateTypes, - }; - }); - }, [requests, viewport, resolutionConfigurations]); -}; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/useRequestResolverStrategy.ts b/packages/react-components/src/queries/useAssetPropertyValues/requestManager/useRequestResolverStrategy.ts deleted file mode 100644 index 180ffbcb3..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/requestManager/useRequestResolverStrategy.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { isDurationViewport, viewportEndDate } from '@iot-app-kit/core'; -import { isAfter } from 'date-fns'; -import minBy from 'lodash-es/minBy'; -import { useCallback, useMemo, useState } from 'react'; -import { useHarmonicIntervalFn } from 'react-use'; -import { - AbsoluteDurationTimeSeriesDataRequestResolver, - getViewportType, - IntervalTransformer, - LIVE_DATA_INTERVALS, - LiveDurationTimeSeriesDataRequestResolver, - type RequestResolverStrategy, - type Viewport, -} from '../../useTimeSeriesData'; -import { type AssetPropertyValuesCacheClient } from '../cacheClient'; -import { type AssetPropertyValueHistoryRequest } from '../types'; -import { AssetPropertyValuesRequestResolver } from './assetPropertyValuesRequestResolver'; - -/** - * Interval to update resolver strategy in case of - * a historic viewport overlapping live data or - * future data intervals - */ -const UPDATE_RESOLVER_INTERVAL = 1000; - -type UseRequestResolverStrategyOptions = { - viewport: Viewport; - cacheClient: AssetPropertyValuesCacheClient; - liveDataIntervals?: Viewport[]; -}; - -export const useRequestResolverStrategy = ({ - viewport, - cacheClient, - liveDataIntervals = LIVE_DATA_INTERVALS, -}: UseRequestResolverStrategyOptions) => { - const liveDurationRequestResolver = useMemo(() => { - return new AssetPropertyValuesRequestResolver( - new LiveDurationTimeSeriesDataRequestResolver({ - liveDataIntervals, - cacheClient, - }) - ); - }, [liveDataIntervals, cacheClient]); - - const absoluteDurationRequestResolver = useMemo(() => { - return new AssetPropertyValuesRequestResolver( - new AbsoluteDurationTimeSeriesDataRequestResolver({ cacheClient }) - ); - }, [cacheClient]); - - const pickResolverStrategy = useCallback(() => { - const viewportType = getViewportType(viewport); - const now = Date.now(); - - const intervalTransformer = new IntervalTransformer({ - now, - viewportType, - }); - - const liveDataIntervalCutoff = - minBy( - liveDataIntervals.map((viewport) => - intervalTransformer.toInterval(viewport) - ), - (interval) => interval.start.getTime() - )?.start ?? new Date(now); - - if ( - isDurationViewport(viewport) || - isAfter(viewportEndDate(viewport), liveDataIntervalCutoff) - ) { - return { - strategy: liveDurationRequestResolver, - type: 'live', - } as const; - } - - return { - strategy: absoluteDurationRequestResolver, - type: 'absolute', - } as const; - }, [ - liveDurationRequestResolver, - absoluteDurationRequestResolver, - viewport, - liveDataIntervals, - ]); - - const [resolverType, setResolverType] = useState<'live' | 'absolute'>( - pickResolverStrategy().type - ); - - const [requestResolverStrategy, setRequestResolverStrategy] = useState< - RequestResolverStrategy - >(pickResolverStrategy().strategy); - - /** - * Update the resolver strategy incase a historic viewport - * whose enddate is in the live data range moves - * is before now - */ - useHarmonicIntervalFn(() => { - const { type, strategy } = pickResolverStrategy(); - if (resolverType !== type) { - setResolverType(type); - setRequestResolverStrategy(strategy); - } - }, UPDATE_RESOLVER_INTERVAL); - - return requestResolverStrategy; -}; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/types.ts b/packages/react-components/src/queries/useAssetPropertyValues/types.ts deleted file mode 100644 index 3a8169733..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/types.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { - type BatchGetAssetPropertyAggregatesRequest, - type BatchGetAssetPropertyAggregatesResponse, - type BatchGetAssetPropertyValueHistoryRequest, - type BatchGetAssetPropertyValueHistoryResponse, - type GetAssetPropertyAggregatesRequest, - type GetAssetPropertyAggregatesResponse, - type GetAssetPropertyValueHistoryRequest, - type GetAssetPropertyValueHistoryResponse, -} from '@aws-sdk/client-iotsitewise'; -import { type Primitive } from '@iot-app-kit/charts-core'; -import { - type RequestFunction, - type RequestParameters, - type RequestResponse, - type DataPoint, -} from '@iot-app-kit/core'; - -export type CommonRequestParameters = { - numberOfDataPointsToScanFor?: number; -}; - -/** - * Raw data - */ -export type GetAssetPropertyValueHistoryRequestFunction = RequestFunction< - GetAssetPropertyValueHistoryRequest, - GetAssetPropertyValueHistoryResponse ->; - -export type GetAssetPropertyValueHistoryRequestParameters = - RequestParameters; -export type GetAssetPropertyValueHistoryRequestResponse = - RequestResponse; - -export type AssetPropertyValueHistoryRequest = - GetAssetPropertyValueHistoryRequestParameters & CommonRequestParameters; - -export type BatchGetAssetPropertyValueHistoryRequestFunction = RequestFunction< - BatchGetAssetPropertyValueHistoryRequest, - BatchGetAssetPropertyValueHistoryResponse ->; - -export type BatchGetAssetPropertyValueHistoryRequestParameters = - RequestParameters; -export type BatchGetAssetPropertyValueHistoryRequestResponse = - RequestResponse; - -export type BatchAssetPropertyValueHistoryRequest = - BatchGetAssetPropertyValueHistoryRequestParameters & CommonRequestParameters; - -/** - * Aggregate data - */ -export type GetAssetPropertyAggregatesRequestFunction = RequestFunction< - GetAssetPropertyAggregatesRequest, - GetAssetPropertyAggregatesResponse ->; - -export type GetAssetPropertyAggregatesRequestParameters = - RequestParameters; -export type GetAssetPropertyAggregatesRequestResponse = - RequestResponse; - -export type AssetPropertyAggregatesRequest = - GetAssetPropertyAggregatesRequestParameters & CommonRequestParameters; - -export type BatchGetAssetPropertyAggregatesRequestFunction = RequestFunction< - BatchGetAssetPropertyAggregatesRequest, - BatchGetAssetPropertyAggregatesResponse ->; - -export type BatchGetAssetPropertyAggregatesRequestParameters = - RequestParameters; -export type BatchGetAssetPropertyAggregatesRequestResponse = - RequestResponse; - -export type BatchAssetPropertyAggregatesRequest = - BatchGetAssetPropertyAggregatesRequestParameters & CommonRequestParameters; - -/** - * Helper types - */ -export type AssetPropertyValuesRequest = - | AssetPropertyValueHistoryRequest - | AssetPropertyAggregatesRequest; - -export type AssetPropertyValuesData = DataPoint[]; - -export type AssetPropertyValuesRequestFunctions = { - getAssetPropertyValueHistory?: GetAssetPropertyValueHistoryRequestFunction; - batchGetAssetPropertyValueHistory?: BatchGetAssetPropertyValueHistoryRequestFunction; - getAssetPropertyAggregates?: GetAssetPropertyAggregatesRequestFunction; - batchGetAssetPropertyAggregates?: BatchGetAssetPropertyAggregatesRequestFunction; -}; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/useAssetPropertyValues.ts b/packages/react-components/src/queries/useAssetPropertyValues/useAssetPropertyValues.ts deleted file mode 100644 index 2c00dc80a..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/useAssetPropertyValues.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { useMemo } from 'react'; -import { - type RequestSettings, - type Viewport, - useLiveDataIntervals, - useTimeSeriesBisectedData, - useTimeSeriesDataCachedQueries, - useTimeSeriesDataRequestExecuter, - useTimeSeriesDataRequestManager, - useTimeSeriesDataRequestStatus, -} from '../useTimeSeriesData'; -import { - type AssetPropertyValueHistoryRequest, - type AssetPropertyValuesRequestFunctions, -} from './types'; -import { ASSET_PROPERTY_VALUES_CACHE_CLIENT } from './cacheClient'; - -import { GetAssetPropertyValuesRequestExecution } from './requestExecution'; -import { useTimeSeriesDataResponse } from '../useTimeSeriesData/useResponse'; -import { - useAutoRequestResolution, - useRequestResolverStrategy, -} from './requestManager'; - -type AssetPropertyValuesOptions = { - requests: AssetPropertyValueHistoryRequest[]; - viewport: Viewport; - requestFns: AssetPropertyValuesRequestFunctions; - settings: RequestSettings; -}; - -export const useAssetPropertyValues = ({ - requests: passedInRequests, - viewport, - requestFns, - settings, -}: AssetPropertyValuesOptions) => { - const requests = useAutoRequestResolution({ - requests: passedInRequests, - viewport, - }); - - const cacheClient = useMemo(() => ASSET_PROPERTY_VALUES_CACHE_CLIENT, []); - - const liveDataIntervals = useLiveDataIntervals({ - viewport, - }); - - const requestExecuter = useMemo( - () => - new GetAssetPropertyValuesRequestExecution({ - cacheClient, - ...requestFns, - }), - [requestFns, cacheClient] - ); - - const requestResolver = useRequestResolverStrategy({ - viewport, - cacheClient, - liveDataIntervals, - }); - - const cachedQueries = useTimeSeriesDataCachedQueries({ - requests, - cacheClient, - }); - - const dataQueries = useTimeSeriesBisectedData({ - requests, - viewport, - cacheClient, - }); - - const requestQueries = useTimeSeriesDataRequestManager({ - requests, - viewport, - cacheClient, - settings, - requestResolver, - }); - - const requestExecutionQueries = useTimeSeriesDataRequestExecuter({ - requestQueries, - cacheClient, - requestExecuter, - }); - - const statuses = useTimeSeriesDataRequestStatus({ - requestQueries, - requestExecutionQueries, - cachedQueries, - dataQueries, - }); - - return useTimeSeriesDataResponse({ cacheClient, statuses, dataQueries }); -}; diff --git a/packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.spec.ts b/packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.spec.ts deleted file mode 100644 index bcf77ed4b..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { secondsSinceEpoch } from './secondsSinceEpoch'; - -const DATE = new Date(2000, 0, 0); - -it('converts date to seconds since epoch', () => { - const seconds = secondsSinceEpoch(DATE); - const dateDeserialized = new Date(0); - - dateDeserialized.setUTCSeconds(seconds); - expect(dateDeserialized.toISOString()).toBe(DATE.toISOString()); -}); - -it('converts date to seconds since epoch with milliseconds truncated', () => { - const seconds = secondsSinceEpoch(new Date(2000, 1, 1, 1, 1, 1, 99)); - - expect(Math.round(seconds) - seconds).toBe(0); -}); diff --git a/packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.ts b/packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.ts deleted file mode 100644 index 7ca43463d..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/utils/secondsSinceEpoch.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const secondsSinceEpoch = (date: Date): number => - Math.round(date.getTime() / 1000); diff --git a/packages/react-components/src/queries/useAssetPropertyValues/utils/timeConstants.ts b/packages/react-components/src/queries/useAssetPropertyValues/utils/timeConstants.ts deleted file mode 100644 index e7a4f9160..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/utils/timeConstants.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const NANO_SECOND_IN_MS = 1 / 1000000; -export const SECOND_IN_MS = 1000; -export const MINUTE_IN_MS = 60 * SECOND_IN_MS; -export const HOUR_IN_MS = 60 * MINUTE_IN_MS; -export const DAY_IN_MS = 24 * HOUR_IN_MS; -export const SITEWISE_PREVIEW_DATE = new Date(2018, 0, 1); diff --git a/packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.spec.ts b/packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.spec.ts deleted file mode 100644 index 3e805580b..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.spec.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { toDataPoint, aggregateToDataPoint } from './toDataPoint'; -import { secondsSinceEpoch } from './secondsSinceEpoch'; -import { NANO_SECOND_IN_MS, SECOND_IN_MS } from './timeConstants'; - -const DATE = new Date(2000, 0, 0); -const SECONDS = secondsSinceEpoch(DATE); - -describe('toDataPoint', () => { - it('converts correctly for a double value', () => { - expect( - toDataPoint({ - timestamp: { timeInSeconds: SECONDS }, - value: { - doubleValue: 100.1, - }, - }) - ).toEqual({ - x: DATE.getTime(), - y: 100.1, - }); - }); - - it('converts timestamp to date correctly taking into account nanoseconds offset', () => { - expect( - toDataPoint({ - timestamp: { - timeInSeconds: SECONDS, - offsetInNanos: 1 / NANO_SECOND_IN_MS, // 1 millisecond offset - }, - value: { - doubleValue: 100.1, - }, - }) - ).toEqual( - expect.objectContaining({ - x: SECONDS * SECOND_IN_MS + 1, - }) - ); - }); - - it('ignores sub-millisecond level of precision', () => { - expect( - toDataPoint({ - timestamp: { - timeInSeconds: SECONDS, - offsetInNanos: 1000, - }, - value: { - doubleValue: 100.1, - }, - }) - ).toEqual( - expect.objectContaining({ - x: SECONDS * SECOND_IN_MS, - }) - ); - }); - - it('converts correctly for a integer value', () => { - expect( - toDataPoint({ - timestamp: { timeInSeconds: SECONDS }, - value: { - integerValue: 100, - }, - }) - ).toEqual({ - x: DATE.getTime(), - y: 100, - }); - }); - - it('does not throw error when no property values passed in', () => { - expect(() => - toDataPoint({ - timestamp: { timeInSeconds: SECONDS }, - value: {}, - }) - ).not.toThrowError(); - }); - - it('converts correctly for a string value', () => { - expect( - toDataPoint({ - timestamp: { timeInSeconds: SECONDS }, - value: { - stringValue: 'hello, world!', - }, - }) - ).toEqual({ - x: DATE.getTime(), - y: 'hello, world!', - }); - }); -}); - -describe('aggregateToDataPoint', () => { - it.each(['average', 'count', 'maximum', 'minimum', 'sum'])( - 'converts correctly for %s', - (aggregationType) => { - const timestamp = new Date(2000, 0, 0); - - expect( - aggregateToDataPoint({ - timestamp, - value: { - [aggregationType as string]: 100, - }, - }) - ).toEqual({ - x: timestamp.getTime(), - y: 100, - }); - } - ); - - it('throws error when invalid aggregation type passed', () => { - const timestamp = new Date(2000, 0, 0); - - expect(() => { - aggregateToDataPoint({ - timestamp, - value: { - ['someInvalidAggregationType' as string]: 100, - }, - }); - }).toThrowError(); - }); -}); diff --git a/packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.ts b/packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.ts deleted file mode 100644 index 807fb55e0..000000000 --- a/packages/react-components/src/queries/useAssetPropertyValues/utils/toDataPoint.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { NANO_SECOND_IN_MS, SECOND_IN_MS } from './timeConstants'; -import type { DataPoint } from '@iot-app-kit/core'; -import type { - AssetPropertyValue, - TimeInNanos, - Variant, - Aggregates, - AggregatedValue, -} from '@aws-sdk/client-iotsitewise'; -import { type Primitive } from '@iot-app-kit/charts-core'; - -/** converts the TimeInNanos to milliseconds */ -export const toTimestamp = (time: TimeInNanos | undefined): number => - (time && - Math.floor( - (time.timeInSeconds || 0) * SECOND_IN_MS + - (time.offsetInNanos || 0) * NANO_SECOND_IN_MS - )) || - 0; - -/** - * Extracts the value out of a SiteWise Model Variant - * - * SiteWise Model values can either be a string, number or boolean. - * - * NOTE: Currently we treat booleans as strings. - */ -export const toValue = (variant: Variant | undefined): Primitive | null => { - if (variant == null) { - throw new Error('variant is undefined'); - } - - const { doubleValue, integerValue, stringValue, booleanValue } = variant; - - if (doubleValue != null) { - return doubleValue; - } - - if (integerValue != null) { - return integerValue; - } - - if (stringValue != null) { - return stringValue; - } - - if (booleanValue != null) { - return booleanValue.toString(); - } - - return null; -}; - -/** - * Converts a SiteWise response for data into a data point understood by IoT App Kit. - */ -export const toDataPoint = ( - assetPropertyValue: AssetPropertyValue | undefined -): DataPoint | undefined => { - if (assetPropertyValue == null) { - return undefined; - } - const { timestamp, value, quality } = assetPropertyValue; - const dataValue = toValue(value); - - if (dataValue == null) { - return undefined; - } - - return { - x: toTimestamp(timestamp), - y: dataValue, - quality, - }; -}; - -// TODO: support outputting multiple sets of DataStream for multiple aggregate types. -const aggregateToValue = ({ - average, - count, - maximum, - minimum, - sum, - standardDeviation, -}: Aggregates): number => { - if (average != null) { - return average; - } - - if (count != null) { - return count; - } - - if (maximum != null) { - return maximum; - } - - if (minimum != null) { - return minimum; - } - - if (sum != null) { - return sum; - } - - if (standardDeviation != null) { - return standardDeviation; - } - - throw new Error( - 'Expected there to be a valid aggregate contained in `Aggregates`' - ); -}; - -/** - * AggregatedValue currently might not return timestamp according to the typescript AggregatedValue interface - */ -const getAggregateTimestamp = (timestamp?: Date) => { - if (timestamp instanceof Date) { - return timestamp.getTime(); - } - - throw new Error('Expected timestamp to be instance of Date'); -}; - -/** - * Aggregates To Data Point - * - * Converts an `AggregatedValue` to the data point view model - */ -export const aggregateToDataPoint = ({ - timestamp, - value, - quality, -}: AggregatedValue): DataPoint => ({ - x: getAggregateTimestamp(timestamp), - y: aggregateToValue(value as Aggregates), - quality, -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/cacheClient/cacheClient.ts b/packages/react-components/src/queries/useTimeSeriesData/cacheClient/cacheClient.ts deleted file mode 100644 index bdf1e1b8d..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/cacheClient/cacheClient.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { - type QueryClient, - type QueryFilters, - type QueryStatus, -} from '@tanstack/react-query'; -import { - IntervalTransformer, - contains, - getViewportType, - overlaps, -} from '../intervals'; -import { type TimeSeriesDataCacheKeyManager } from './keyManager'; -import { type Interval, type Viewport } from '../types'; -import { removeExpiredIntervals } from '../intervals/utils/removeExpiredIntervals'; - -type FilterSettings = { - status?: QueryStatus; - refreshRates?: (number | undefined)[]; - intervalTransformer: IntervalTransformer; -}; - -export abstract class TimeSeriesDataCacheClient { - #keyManager: TimeSeriesDataCacheKeyManager; - #client: QueryClient; - - constructor({ - keyManager, - client, - }: { - keyManager: TimeSeriesDataCacheKeyManager; - client: QueryClient; - }) { - this.#keyManager = keyManager; - this.#client = client; - } - - abstract matchesRequest(requestA: Request, requestB: Request): boolean; - - abstract filterTimeSeriesData(data: Data[], interval: Interval): Data[]; - - abstract addTimeSeriesData(oldData?: Data[], newData?: Data[]): Data[]; - - protected fiterTimeSerisDataRequests( - { request, viewport }: { request: Request; viewport?: Viewport }, - filterSettings: FilterSettings & { - intervalTransformer: IntervalTransformer; - } - ): QueryFilters['predicate'] { - const { intervalTransformer, status, refreshRates } = filterSettings; - - return (query) => { - const isTimeSeriesDataRequestExecutionQuery = - this.#keyManager.isTimeSeriesDataQuery(query.queryKey, ['execution']); - - if (!isTimeSeriesDataRequestExecutionQuery) return false; - - const queryKeyAsRequest = this.#keyManager.toRequest(query.queryKey); - - if (!queryKeyAsRequest) return false; - - const { request: queryRequest, viewport: queryViewport } = - queryKeyAsRequest; - - if (!queryViewport) return false; - - const isApplicableRefreshRate = refreshRates - ? refreshRates.includes(queryViewport.refreshRate) - : true; - - if (!isApplicableRefreshRate) return false; - - let isInViewport = true; - if (viewport) { - const viewportInterval = intervalTransformer.toInterval(viewport); - const queryViewportInterval = intervalTransformer.toInterval( - queryViewport, - query.state.dataUpdatedAt - ); - isInViewport = overlaps(queryViewportInterval)(viewportInterval); - } - - const matches = this.matchesRequest(request, queryRequest); - - return ( - matches && - isInViewport && - (status ? query.state.status === status : true) - ); - }; - } - - getQueryClient() { - return this.#client; - } - - getKeyManager() { - return this.#keyManager; - } - - cancelTimeSeriesDataRequests( - options: { request: Request; viewport?: Viewport }, - filterSettings: FilterSettings - ) { - // can probably refactor filter to not care about viewport? - this.#client.cancelQueries({ - predicate: this.fiterTimeSerisDataRequests(options, filterSettings), - }); - this.#client.removeQueries({ - predicate: this.fiterTimeSerisDataRequests(options, filterSettings), - }); - } - - getCachedTimeSeriesDataRequestIntervals(request: Request) { - return this.#client.getQueryData( - this.#keyManager.toCachedRequestExectutionQueryKey(request) - ) as Interval[]; - } - - isTimeSeriesDataRequestCached(options: { - request: Request; - viewport: Viewport; - }) { - const viewportType = getViewportType(options.viewport); - const now = Date.now(); - - const intervalTransformer = new IntervalTransformer({ - now, - viewportType, - }); - const intervals = this.getCachedTimeSeriesDataRequestIntervals( - options.request - ); - const unexpired = removeExpiredIntervals(intervals, new Date(now)); - return contains( - unexpired, - intervalTransformer.toInterval(options.viewport) - ); - } - - setTimeSeriesRequestData(request: Request, data: Data[]) { - const dataKey = this.#keyManager.toDataCacheQueryKey(request); - this.#client.setQueryData(dataKey, (old: Data[]) => - this.addTimeSeriesData(old, data) - ); - } - - setCachedRequestData(request: Request, interval: Interval) { - const now = new Date(); - const dataKey = this.#keyManager.toCachedRequestExectutionQueryKey(request); - this.#client.setQueryData(dataKey, (old: Interval[] = []) => { - const unexpired = removeExpiredIntervals(old, now); - return [...unexpired, interval]; - }); - } - - getTimeSeriesData({ - request, - viewport, - }: { - request: Request; - viewport: Viewport; - }) { - const viewportType = getViewportType(viewport); - const now = Date.now(); - - const intervalTransformer = new IntervalTransformer({ - now, - viewportType, - }); - - const dataKey = this.#keyManager.toDataCacheQueryKey(request); - const data = this.#client.getQueryData(dataKey) as Data[] | undefined; - - if (!data) return undefined; - - const interval = intervalTransformer.toInterval(viewport); - - return this.filterTimeSeriesData(data, interval); - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/cacheClient/index.ts b/packages/react-components/src/queries/useTimeSeriesData/cacheClient/index.ts deleted file mode 100644 index 64f6f5a5b..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/cacheClient/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cacheClient'; -export * from './keyManager'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/cacheClient/keyManager.ts b/packages/react-components/src/queries/useTimeSeriesData/cacheClient/keyManager.ts deleted file mode 100644 index f53662553..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/cacheClient/keyManager.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { type QueryKey } from '@tanstack/react-query'; -import { type FixedLengthArray } from 'type-fest'; -import { type SeriaizedRequest, type Viewport } from '../types'; - -type TimeSeriesDataCacheKeyShape = FixedLengthArray< - { - resource: string; - requestType: string; - request: SeriaizedRequest; - viewport?: Viewport; - }, - 1 ->; - -type TimeSeriesDataCacheKeyType = 'request' | 'execution' | 'data'; - -export abstract class TimeSeriesDataCacheKeyManager { - #RequestsKey = 'DEDUPE_REQUESTS_time-series-data'; - #RequestExectionKey = 'EXECUTION_time-series-data'; - #DataKey = 'time-series-data'; - #CachedQueriesKey = 'CACHED_QUERIES_time-series-data'; - - abstract RESOURCE: string; - - abstract serializeQueryExecutionRequest(request: Request): SeriaizedRequest; - abstract serializeRequest(request: Request): SeriaizedRequest; - abstract deserializeRequest(serializedRequest: SeriaizedRequest): Request; - - toRequestQueryKey(request: Request, viewport: Viewport): QueryKey { - return [ - { - resource: this.RESOURCE, - requestType: this.#RequestsKey, - request: this.serializeRequest(request), - viewport, - }, - ] as const; - } - - toRequestExectutionQueryKey(request: Request, viewport: Viewport) { - return [ - { - resource: this.RESOURCE, - requestType: this.#RequestExectionKey, - request: this.serializeQueryExecutionRequest(request), - viewport, - }, - ] as const; - } - - toCachedRequestExectutionQueryKey(request: Request) { - return [ - { - resource: this.RESOURCE, - requestType: this.#CachedQueriesKey, - request: this.serializeRequest(request), - }, - ] as const; - } - - toDataCacheQueryKey(request: Request) { - return [ - { - resource: this.RESOURCE, - requestType: this.#DataKey, - request: this.serializeRequest(request), - }, - ] as const; - } - - #toRequestType(cacheKeyType: TimeSeriesDataCacheKeyType) { - if (cacheKeyType === 'request') { - return this.#RequestsKey; - } else if (cacheKeyType === 'execution') { - return this.#RequestExectionKey; - } - return this.#DataKey; - } - - toRequest( - queryKey: QueryKey - ): { request: Request; viewport?: Viewport } | undefined { - if (!this.isTimeSeriesDataCacheKey(queryKey)) return undefined; - - return { - request: this.deserializeRequest(queryKey[0].request), - viewport: queryKey[0].viewport, - }; - } - - isTimeSeriesDataQuery( - queryKey: QueryKey, - requestTypesToInclude: TimeSeriesDataCacheKeyType[] = [ - 'request', - 'execution', - 'data', - ] - ): boolean { - const types = requestTypesToInclude.map((type) => - this.#toRequestType(type) - ); - return this.isTimeSeriesDataCacheKey(queryKey, types); - } - - protected isTimeSeriesDataCacheKey( - queryKey: QueryKey, - requestTypesToMatch: string[] = [ - this.#RequestsKey, - this.#RequestExectionKey, - this.#DataKey, - ] - ): queryKey is TimeSeriesDataCacheKeyShape { - const key = queryKey.at(0); - return ( - // key is object - key != null && - typeof key === 'object' && - // key is cache client key with resource - 'resource' in key && - typeof key.resource === 'string' && - key.resource === this.RESOURCE && - // key matches specific request type - 'requestType' in key && - typeof key.requestType === 'string' && - requestTypesToMatch.includes(key.requestType) && - // key has a serialized request object - 'request' in key && - key.request != null && - typeof key.request === 'object' - ); - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.spec.ts b/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.spec.ts deleted file mode 100644 index 9c53fba3c..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.spec.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { bisector } from 'd3-array'; -import { sub, add } from 'date-fns'; -import { timeSeriesDataFilterer } from './filterTimeSeriesData'; -import { ANCHOR_DATE } from '../intervals/utils/testData'; - -describe('timeSeriesDataFilterer', () => { - const pointToMilliseconds = (point: { x: Date }) => { - return point.x.getTime(); - }; - - const pointBisector = bisector((p: { x: Date }) => pointToMilliseconds(p)); - - const filterPoints = timeSeriesDataFilterer( - pointBisector, - pointToMilliseconds - ); - - describe('get visible data to render within the chart, including boundary points', () => { - it('returns an empty list when provided no data', () => { - expect( - filterPoints([], { - start: sub(ANCHOR_DATE, { minutes: 10 }), - end: add(ANCHOR_DATE, { minutes: 5 }), - }) - ).toHaveLength(0); - }); - - it('returns an empty list when a point is outside the viewport', () => { - expect( - filterPoints( - [{ x: ANCHOR_DATE }], - { - start: sub(ANCHOR_DATE, { minutes: 10 }), - end: sub(ANCHOR_DATE, { minutes: 5 }), - }, - false - ) - ).toHaveLength(0); - }); - - it('returns data within the viewport date range', () => { - expect( - filterPoints( - [{ x: ANCHOR_DATE }, { x: sub(ANCHOR_DATE, { minutes: 1 }) }], - { start: sub(ANCHOR_DATE, { minutes: 10 }), end: ANCHOR_DATE } - ) - ).toHaveLength(2); - }); - - it('returns the two closest points to the view port to include in the visible data', () => { - expect( - filterPoints( - [ - { x: sub(ANCHOR_DATE, { minutes: 6 }) }, - { x: sub(ANCHOR_DATE, { minutes: 5 }) }, - { x: sub(ANCHOR_DATE, { minutes: 4 }) }, - { x: sub(ANCHOR_DATE, { minutes: 3 }) }, - { x: sub(ANCHOR_DATE, { minutes: 2 }) }, - { x: sub(ANCHOR_DATE, { minutes: 1 }) }, - { x: ANCHOR_DATE }, - { x: add(ANCHOR_DATE, { minutes: 1 }) }, - { x: add(ANCHOR_DATE, { minutes: 2 }) }, - { x: add(ANCHOR_DATE, { minutes: 3 }) }, - ], - { - start: sub(ANCHOR_DATE, { minutes: 4 }), - end: sub(ANCHOR_DATE, { minutes: 1 }), - } - ) - ).toHaveLength(6); - }); - }); - - describe('get visible data to render within the chart, not including boundary points', () => { - it('only returns points within viewport', () => { - expect( - filterPoints( - [ - { x: sub(ANCHOR_DATE, { minutes: 5 }) }, - { x: sub(ANCHOR_DATE, { minutes: 4 }) }, - { x: sub(ANCHOR_DATE, { minutes: 3 }) }, - { x: sub(ANCHOR_DATE, { minutes: 2 }) }, - { x: sub(ANCHOR_DATE, { minutes: 1 }) }, - { x: ANCHOR_DATE }, - ], - { - start: sub(ANCHOR_DATE, { minutes: 4 }), - end: sub(ANCHOR_DATE, { minutes: 1 }), - }, - false - ) - ).toHaveLength(4); - }); - }); -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.ts b/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.ts deleted file mode 100644 index 0fb0808fd..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/filterTimeSeriesData.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { type Bisector } from 'd3-array'; -import { type Interval } from '../types'; - -export const timeSeriesDataFilterer = - ( - bisector: Bisector, - extractTime: (point: Point) => number - ) => - (points: Point[], { start, end }: Interval, includeBoundaryPoints = true) => { - if (points.length === 0) { - return []; - } - // If all data is before the view port - if (start.getTime() > extractTime(points[points.length - 1])) { - return []; - } - // If all data is after the view port - if (end.getTime() < extractTime(points[0])) { - return []; - } - - // Otherwise return all the data within the viewport, plus an additional single data point that falls outside of - // the viewport in either direction. - const startIndex = Math.max( - bisector.left(points, start) - (includeBoundaryPoints ? 1 : 0), - 0 - ); - const endIndex = Math.min( - bisector.right(points, end) - (includeBoundaryPoints ? 0 : 1), - points.length - 1 - ); - - return points.slice(startIndex, endIndex + 1); - }; diff --git a/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/index.ts b/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/index.ts deleted file mode 100644 index 270dcd40c..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/cacheUtils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './filterTimeSeriesData'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/index.ts b/packages/react-components/src/queries/useTimeSeriesData/index.ts deleted file mode 100644 index 4aa864ca7..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './types'; -export * from './cacheClient'; -export * from './cacheUtils'; -export * from './queryUtils'; -export * from './requestExecution'; -export * from './requestManager'; -export * from './useRequestStatus'; -export * from './useBisectedData'; -export * from './useCachedQueries'; -export * from './intervals'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/index.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/index.ts deleted file mode 100644 index 931bed15e..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './utils'; -export * from './liveData'; -export * from './useLiveDataIntervals'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/liveData.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/liveData.ts deleted file mode 100644 index 4bbf2c226..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/liveData.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { parseDuration } from '@iot-app-kit/core'; -import { type LiveDataConfiguration, type Viewport } from '../types'; - -/** - * Since each of these interval requests run on their own promise - * and have to resolve NOW timestamp at execution time - * in order to convert a live viewport into a duration one, - * this buffer makes it more likely that we won't miss - * a few MS worth of data between each request. - * - * Maybe a better way to ensure this edge case - * won't happen? - */ -const LIVE_DATA_BUFFER_MS = 3000; - -export const convertToLiveDataIntervals = ( - liveDataPeriods: LiveDataConfiguration[] -) => { - return liveDataPeriods - .sort((a, b) => a.duration - b.duration) - .reduce( - (acc, { refreshRate, duration }) => { - const { intervals, offset } = acc; - - const viewport: Viewport = { - refreshRate, - duration: duration - offset + LIVE_DATA_BUFFER_MS, - startOffset: Math.max(offset - LIVE_DATA_BUFFER_MS, 0), - }; - - return { - intervals: [...intervals, viewport], - offset: duration, - }; - }, - { intervals: [], offset: 0 } as { intervals: Viewport[]; offset: number } - ).intervals; -}; - -export const DEFAULT_LIVE_DATA_CONFIGURATION: LiveDataConfiguration[] = [ - { - duration: parseDuration('72s'), - refreshRate: parseDuration('5s'), - }, - { - duration: parseDuration('3m'), - refreshRate: parseDuration('30s'), - }, - { - duration: parseDuration('20m'), - refreshRate: parseDuration('5m'), - }, -]; - -/** - * convert live data periods into intervals with no overlap. - * These will be used as request viewports where overlap - * would cause us to request ranges more than once. - */ -export const LIVE_DATA_INTERVALS = convertToLiveDataIntervals( - DEFAULT_LIVE_DATA_CONFIGURATION -); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/useLiveDataIntervals.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/useLiveDataIntervals.ts deleted file mode 100644 index 073d90123..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/useLiveDataIntervals.ts +++ /dev/null @@ -1,57 +0,0 @@ -import isEqual from 'lodash-es/isEqual'; -import { useMemo, useState } from 'react'; -import useCustomCompareEffect from 'react-use/esm/useCustomCompareEffect'; -import { type LiveDataConfiguration, type Viewport } from '../types'; -import { - DEFAULT_LIVE_DATA_CONFIGURATION, - convertToLiveDataIntervals, -} from './liveData'; - -type UseLiveDataIntervalsOptions = { - viewport: Viewport; - liveDataConfguration?: LiveDataConfiguration[]; -}; -export const useLiveDataIntervals = ({ - viewport, - liveDataConfguration = DEFAULT_LIVE_DATA_CONFIGURATION, -}: UseLiveDataIntervalsOptions) => { - const [refreshRate, setRefreshRate] = useState(viewport.refreshRate); - - useCustomCompareEffect( - () => { - if (!isEqual(viewport.refreshRate, refreshRate)) { - setRefreshRate(viewport.refreshRate); - } - }, - [viewport, refreshRate], - isEqual - ); - - return useMemo(() => { - if (liveDataConfguration.length === 0) { - return []; - } - - const [firstConfiguration, ...restConfiguration] = - liveDataConfguration.sort((a, b) => a.duration - b.duration); - - /** - * Apply custom refresh rate to the first live data confguration - * The default is last 72 seconds. - */ - if (refreshRate != null) { - return convertToLiveDataIntervals([ - { - ...firstConfiguration, - refreshRate, - }, - ...restConfiguration, - ]); - } - - return convertToLiveDataIntervals([ - firstConfiguration, - ...restConfiguration, - ]); - }, [refreshRate, liveDataConfguration]); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.spec.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.spec.ts deleted file mode 100644 index 75f7bc6f6..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.spec.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { collapse } from './collapse'; -import { - fiveMinuteInterval, - oneDayInterval, - oneHourInterval, - shuffleIntervals, - slideInterval, - tenDaysInterval, - tenHourInterval, - tenMinuteInterval, -} from './testData'; - -describe('collapse intervals', () => { - it('handles an empty interval list', () => { - expect(collapse([])).toEqual([]); - }); - - it('combines overlapping intervals', () => { - expect( - collapse([ - fiveMinuteInterval, - tenMinuteInterval, - oneHourInterval, - tenHourInterval, - oneDayInterval, - tenDaysInterval, - ]) - ).toEqual([ - { - end: fiveMinuteInterval.end, - start: tenDaysInterval.start, - }, - ]); - }); - - it('combines overlapping intervals at the edge', () => { - const offsetFiveMinutes = slideInterval(fiveMinuteInterval, { - minutes: -5, - }); - const offsetTenMinutes = slideInterval(fiveMinuteInterval, { - minutes: -10, - }); - expect( - collapse([fiveMinuteInterval, offsetFiveMinutes, offsetTenMinutes]) - ).toEqual([ - { - end: fiveMinuteInterval.end, - start: offsetTenMinutes.start, - }, - ]); - }); - - it('does nothing if already collapsed', () => { - expect(collapse([fiveMinuteInterval])).toEqual([fiveMinuteInterval]); - }); - - it('does not collapse nonoverlapping intervals', () => { - const nonoverlapping = [ - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: 20 }), - slideInterval(fiveMinuteInterval, { minutes: 40 }), - slideInterval(fiveMinuteInterval, { minutes: 60 }), - ]; - - expect(collapse(nonoverlapping)).toEqual(nonoverlapping); - }); - - it('handles unsorted interval lists', () => { - const shuffledIntervals = shuffleIntervals([ - fiveMinuteInterval, - tenMinuteInterval, - oneHourInterval, - tenHourInterval, - oneDayInterval, - tenDaysInterval, - ]); - - expect(collapse(shuffledIntervals)).toEqual([ - { - end: fiveMinuteInterval.end, - start: tenDaysInterval.start, - }, - ]); - }); -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.ts deleted file mode 100644 index 349e9f0eb..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/collapse.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { isBefore } from 'date-fns'; -import isEqual from 'lodash-es/isEqual'; -import { type Interval } from '../../types'; -import { sortIntervals } from './sort'; - -/** - * - * merge all overlapping intervals together - * - * @param intervals to merge - * @returns merged intervals - */ -export const collapse = (intervals: Interval[]) => { - if (intervals.length === 0) return intervals; - - const sortedIntervals = sortIntervals(intervals); - - const collapsed: Interval[] = []; - - collapsed.push(sortedIntervals[0]); - - for (let i = 1; i < sortedIntervals.length; i++) { - // get interval from stack top - const top = collapsed[collapsed.length - 1]; - const current = sortedIntervals[i]; - - const { end: topEndDate, group: topGroup } = top; - - const { - start: currentStartDate, - end: currentEndDate, - group: currentGroup, - } = current; - - const topEndDates = new Date( - Number((topEndDate.getTime() / 1000).toFixed(0)) * 1000 - ); - const currentStartDates = new Date( - Number((currentStartDate.getTime() / 1000).toFixed(0)) * 1000 - ); - - /** - * if the current interval does not overlap with the - * top interval, add it to the stack - */ - if ( - !isEqual(topGroup, currentGroup) || - isBefore(topEndDates, currentStartDates) - ) { - collapsed.push(current); - } else if (isBefore(topEndDate, currentEndDate)) { - collapsed.pop(); - collapsed.push({ - ...current, - start: top.start, - end: currentEndDate, - }); - } - } - - return collapsed; -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.spec.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.spec.ts deleted file mode 100644 index de2456ed8..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.spec.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { contains } from './contains'; -import { - fiveMinuteInterval, - oneDayInterval, - oneHourInterval, - shuffleIntervals, - slideInterval, - tenDaysInterval, - tenHourInterval, - tenMinuteInterval, -} from './testData'; - -describe('contains intervals', () => { - it('handles an empty interval list', () => { - expect(contains([], fiveMinuteInterval)).toEqual(false); - }); - - it('handles a single item interval list', () => { - expect(contains([fiveMinuteInterval], fiveMinuteInterval)).toEqual(true); - }); - - it('handles unsorted interval lists', () => { - const shuffledIntervals = shuffleIntervals([ - fiveMinuteInterval, - tenMinuteInterval, - oneHourInterval, - tenHourInterval, - oneDayInterval, - tenDaysInterval, - ]); - - expect(contains(shuffledIntervals, fiveMinuteInterval)).toEqual(true); - }); - - it('is false if the target end is not covered', () => { - const intervals = [ - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: -5 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -20 }), - ]; - - expect( - contains(intervals, slideInterval(fiveMinuteInterval, { minutes: 2 })) - ).toEqual(false); - }); - - it('is false if the target start is not covered', () => { - const intervals = [ - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: -5 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -20 }), - ]; - - expect( - contains(intervals, slideInterval(fiveMinuteInterval, { minutes: -22 })) - ).toEqual(false); - }); - - it('is false if the list has gaps', () => { - const intervals = [ - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: -7 }), - ] as const; - - expect( - contains([...intervals], { - start: intervals[1].start, - end: intervals[0].end, - }) - ).toEqual(false); - }); - - it('is true if the target is covered at the ends', () => { - const intervals = [ - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: -5 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -20 }), - ] as const; - - expect( - contains([...intervals], { - start: intervals[4].start, - end: intervals[0].end, - }) - ).toEqual(true); - }); - - it('is true if the target is within the bounds of the list', () => { - const intervals = [ - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: -5 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -20 }), - ] as const; - - expect( - contains([...intervals], { - start: intervals[1].start, - end: intervals[3].end, - }) - ).toEqual(true); - }); -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.ts deleted file mode 100644 index eb44c6fae..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/contains.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { isWithinInterval } from 'date-fns'; -import { type Interval } from '../../types'; -import { collapse } from './collapse'; - -/** - * - * Checks that an interval list fully covers a target - * - * @param intervals intervals to check - * @param interval target interval - */ -export const contains = (intervals: Interval[], target: Interval) => { - const intervalsWithoutGrouping = intervals.map( - ({ group: _group, ...intervalDates }) => ({ ...intervalDates }) - ); - const collapsedIntervals = collapse(intervalsWithoutGrouping); - - /** - * intervals should completely cover the target interval - * without any gaps. No gaps means they are all - * collapsible into 1 interval - * - * group is ignored here for simplicity - */ - if (collapsedIntervals.length !== 1) return false; - - const [interval] = collapsedIntervals; - - return ( - isWithinInterval(target.start, interval) && - isWithinInterval(target.end, interval) - ); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/divideInterval.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/divideInterval.ts deleted file mode 100644 index 49f088e9d..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/divideInterval.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { type Interval } from '../../types'; -import { sortIntervals } from './sort'; -import { subtractIntervals } from './subtractIntervals'; - -export const divideInterval = ( - interval: Interval, - intervalsToDivideBy: Interval[] -) => { - const sortedIntervalsToDivideBy = sortIntervals(intervalsToDivideBy); - - const dividedIntervals = [interval]; - for (let i = 0; i < sortedIntervalsToDivideBy.length; i++) { - const existing = sortedIntervalsToDivideBy[i]; - for (let j = 0; j < dividedIntervals.length; j++) { - const missing = dividedIntervals[j]; - const updatedMissing = subtractIntervals(missing, existing); - dividedIntervals.splice(j, 1, ...updatedMissing); - } - } - - return sortIntervals(dividedIntervals); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/index.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/index.ts deleted file mode 100644 index e82f13315..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './collapse'; -export * from './overlaps'; -export * from './sort'; -export * from './contains'; -export * from './transformer'; -export * from './divideInterval'; -export * from './requestRange'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.spec.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.spec.ts deleted file mode 100644 index a43fd28d6..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { overlaps } from './overlaps'; -import { - fiveMinuteInterval, - slideInterval, - tenHourInterval, - tenMinuteInterval, -} from './testData'; - -describe('overlaps intervals', () => { - it('returns true if the target interval is contained within the given interval', () => { - expect(overlaps(fiveMinuteInterval)(fiveMinuteInterval)).toEqual(true); - expect(overlaps(fiveMinuteInterval)(tenMinuteInterval)).toEqual(true); - expect(overlaps(fiveMinuteInterval)(tenHourInterval)).toEqual(true); - }); - - it('returns true if the target interval fully contains the given interval', () => { - expect(overlaps(tenMinuteInterval)(fiveMinuteInterval)).toEqual(true); - expect(overlaps(tenHourInterval)(fiveMinuteInterval)).toEqual(true); - }); - - it('returns true if the target interval partially overlaps the given interval', () => { - expect( - overlaps(slideInterval(fiveMinuteInterval, { minutes: -2 }))( - fiveMinuteInterval - ) - ).toEqual(true); - }); - - it('returns true if the target interval overlaps the given interval at the edge', () => { - expect( - overlaps(slideInterval(fiveMinuteInterval, { minutes: -5 }))( - fiveMinuteInterval - ) - ).toEqual(true); - expect( - overlaps(slideInterval(fiveMinuteInterval, { minutes: 5 }))( - fiveMinuteInterval - ) - ).toEqual(true); - }); - - it('returns false if the target interval does not overlap the given interval at the edge', () => { - expect( - overlaps(slideInterval(fiveMinuteInterval, { minutes: -20 }))( - fiveMinuteInterval - ) - ).toEqual(false); - }); -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.ts deleted file mode 100644 index 1220b33d3..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/overlaps.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type Interval, areIntervalsOverlapping } from 'date-fns'; - -/** - * do the 2 given intervals overlap - * - * @param target - * @returns - */ -export const overlaps = (target: Interval) => (interval: Interval) => - areIntervalsOverlapping(target, interval, { inclusive: true }); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/removeExpiredIntervals.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/removeExpiredIntervals.ts deleted file mode 100644 index 96d899f5f..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/removeExpiredIntervals.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type Interval } from '../../types'; - -export const removeExpiredIntervals = (intervals: Interval[], now: Date) => { - return intervals.filter((oldInterval) => - oldInterval.group - ? oldInterval.end.getTime() + oldInterval.group >= now.getTime() - : true - ); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/requestRange.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/requestRange.ts deleted file mode 100644 index a7135edc5..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/requestRange.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Returns the number of digits in a natural number (positive integer) e.g. numDigits(145) will return 3 - * @param x - Must be a natural number - */ -const numDigits = (x: number): number => Math.floor(Math.log10(x) + 1); - -export const roundUp = (x: number): number => { - if (x === 0) { - // We cannot utilize log on zero, so we specifically handle this - return 0; - } - const roundDigits = numDigits(x) - 1; - const k = 10 ** roundDigits; - return Math.ceil(x / k) * k; -}; - -/** - * Request Range - * - * Returns the range of dates to request data from. - * - * The request range will be a strictly larger range than the view port, - * which allows the chart to pan and already have data present. - * - * DESIGN - * We have several goals, - * One should be able to get the same request range, for a wide range of start and end dates: - * 1. with start/end dates slightly shifted in either direction - * 2. The duration of time between start and end date becoming larger or smaller. - * - * This is important to prevent quick succession of requesting new date. - */ -export const requestRange = ( - { start, end, max }: { start: Date; end: Date; max: Date }, - buffer?: number -): { start: Date; end: Date } => { - let adjustedStart = start; - let adjustedEnd = end; - - if (buffer) { - const duration = end.getTime() - start.getTime(); - const bufferedDuration = roundUp(duration * (1 + buffer * 2)); - const durationStep = bufferedDuration / 4; - adjustedStart = new Date( - Math.floor(start.getTime() / durationStep) * durationStep - - durationStep / 2 - ); - adjustedEnd = new Date(adjustedStart.getTime() + bufferedDuration); - } - - return { - start: adjustedStart > max ? max : adjustedStart, - end: adjustedEnd > max ? max : adjustedEnd, - }; -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.spec.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.spec.ts deleted file mode 100644 index dec158132..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.spec.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { sortIntervals } from './sort'; -import { - fiveMinuteInterval, - shuffleIntervals, - slideInterval, -} from './testData'; - -describe('sort intervals', () => { - it('handles an empty interval list', () => { - expect(sortIntervals([])).toEqual([]); - }); - - it('handles an already sorted list', () => { - const sorted = [ - slideInterval(fiveMinuteInterval, { minutes: -25 }), - slideInterval(fiveMinuteInterval, { minutes: -20 }), - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - slideInterval(fiveMinuteInterval, { minutes: -5 }), - fiveMinuteInterval, - ]; - expect(sortIntervals(sorted)).toEqual(sorted); - }); - - it('handles an unsorted list', () => { - const sorted = [ - slideInterval(fiveMinuteInterval, { minutes: -25 }), - slideInterval(fiveMinuteInterval, { minutes: -20 }), - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - slideInterval(fiveMinuteInterval, { minutes: -5 }), - fiveMinuteInterval, - ]; - - const unsorted = [ - slideInterval(fiveMinuteInterval, { minutes: -20 }), - slideInterval(fiveMinuteInterval, { minutes: -25 }), - slideInterval(fiveMinuteInterval, { minutes: -10 }), - fiveMinuteInterval, - slideInterval(fiveMinuteInterval, { minutes: -15 }), - slideInterval(fiveMinuteInterval, { minutes: -5 }), - ]; - - expect(sortIntervals(unsorted)).toEqual(sorted); - expect(sortIntervals(shuffleIntervals(sorted))).toEqual(sorted); - }); -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.ts deleted file mode 100644 index 06017519a..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/sort.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type Interval } from '../../types'; - -/** - * Sorts intervals by start time - * - * @param intervals to sort - * @returns - */ -export const sortIntervals = (intervals: Interval[]) => { - return intervals.sort((a, b) => { - return a.start.getTime() - b.start.getTime(); - }); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/subtractIntervals.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/subtractIntervals.ts deleted file mode 100644 index 701ad4b61..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/subtractIntervals.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { type Interval } from '../../types'; - -/** - * - * Remove a range from another range - * - * Returns a list of intervals that exist in the minuend - * but not in the subtrahend. - * - */ -export const subtractIntervals = (minuend: Interval, subtrahend: Interval) => { - return [ - // all minuend until the min of available - { - ...minuend, - start: minuend.start.getTime(), - end: Math.min(minuend.end.getTime(), subtrahend.start.getTime()), - }, - // all minuend after the max of subtrahend - { - ...minuend, - start: Math.max(minuend.start.getTime(), subtrahend.end.getTime()), - end: minuend.end.getTime(), - }, - ] - .filter((result) => result.end > result.start) - .map((result) => ({ - start: new Date(result.start), - end: new Date(result.end), - })); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/testData.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/testData.ts deleted file mode 100644 index 925f0b27c..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/testData.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { sub, add, type Duration } from 'date-fns'; -import { type Interval } from '../../types'; - -export const ANCHOR_DATE = new Date(1720488638812); - -/** - * All dates are anchored to the same point and can be converted via the slide duration - */ -export const fiveMinuteInterval: Interval = { - end: ANCHOR_DATE, - start: sub(ANCHOR_DATE, { minutes: 5 }), -}; - -export const tenMinuteInterval: Interval = { - end: ANCHOR_DATE, - start: sub(ANCHOR_DATE, { minutes: 10 }), -}; - -export const oneHourInterval: Interval = { - end: ANCHOR_DATE, - start: sub(ANCHOR_DATE, { hours: 1 }), -}; - -export const tenHourInterval: Interval = { - end: ANCHOR_DATE, - start: sub(ANCHOR_DATE, { hours: 10 }), -}; - -export const oneDayInterval: Interval = { - end: ANCHOR_DATE, - start: sub(ANCHOR_DATE, { days: 1 }), -}; - -export const tenDaysInterval: Interval = { - end: ANCHOR_DATE, - start: sub(ANCHOR_DATE, { days: 10 }), -}; - -export const slideInterval = ( - interval: Interval, - duration: Duration -): Interval => { - return { - ...interval, - end: add(interval.end, duration), - start: add(interval.start, duration), - }; -}; - -export const shuffleIntervals = (intervals: Interval[]): Interval[] => { - return intervals - .map((value) => ({ value, sort: Math.random() })) - .sort((a, b) => a.sort - b.sort) - .map(({ value }) => value); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.spec.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.spec.ts deleted file mode 100644 index 501d8125f..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.spec.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { sub } from 'date-fns'; -import { type Interval, type Viewport } from '../../types'; -import { IntervalTransformer, getViewportType } from './transformer'; -import { ANCHOR_DATE } from './testData'; - -describe('transform intervals', () => { - it('determines the viewport type of a viewport', () => { - expect(getViewportType({ duration: '5m' })).toEqual('duration'); - expect(getViewportType({ start: new Date(), end: new Date() })).toEqual( - 'historical' - ); - }); - - it('converts duration viewports into intervals', () => { - const now = ANCHOR_DATE.getTime(); - - const transformer = new IntervalTransformer({ - now, - viewportType: 'duration', - }); - - expect(transformer.toInterval({ duration: '5m' })).toEqual({ - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }); - - expect(transformer.toInterval({ duration: '30d' })).toEqual({ - start: sub(new Date(now), { days: 30 }), - end: new Date(now), - }); - }); - - it('converts historical viewports into intervals', () => { - const now = ANCHOR_DATE.getTime(); - - const transformer = new IntervalTransformer({ - now, - viewportType: 'historical', - }); - - const historicalViewport = { - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }; - const historicalViewport2 = { - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }; - - expect(transformer.toInterval(historicalViewport)).toEqual( - historicalViewport - ); - - expect(transformer.toInterval(historicalViewport2)).toEqual( - historicalViewport2 - ); - }); - - it('preserves refresh rate as an interval group', () => { - const now = ANCHOR_DATE.getTime(); - - const transformer = new IntervalTransformer({ - now, - viewportType: 'historical', - }); - - const historicalViewport: Viewport = { - refreshRate: 5000, - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }; - const historicalViewport2: Viewport = { - refreshRate: 20000, - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }; - - expect(transformer.toInterval(historicalViewport)).toEqual({ - start: historicalViewport.start, - end: historicalViewport.end, - group: historicalViewport.refreshRate, - }); - - expect(transformer.toInterval(historicalViewport2)).toEqual({ - start: historicalViewport2.start, - end: historicalViewport2.end, - group: historicalViewport2.refreshRate, - }); - }); - - it('converts an interval to a duration viewport', () => { - const now = ANCHOR_DATE.getTime(); - - const transformer = new IntervalTransformer({ - now, - viewportType: 'duration', - }); - - const interval: Interval = { - group: 5000, - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }; - - expect(transformer.toViewport(interval)).toEqual({ - duration: 300000, - refreshRate: 5000, - startOffset: 0, - }); - - const interval2: Interval = { - group: 5000, - start: sub(new Date(now - 20000), { minutes: 5 }), - end: new Date(now - 20000), - }; - - expect(transformer.toViewport(interval2)).toEqual({ - duration: 300000, - refreshRate: 5000, - startOffset: 20000, - }); - }); - - it('converts an interval to a historical viewport', () => { - const now = ANCHOR_DATE.getTime(); - - const transformer = new IntervalTransformer({ - now, - viewportType: 'historical', - }); - - const interval: Interval = { - group: 5000, - start: sub(new Date(now), { minutes: 5 }), - end: new Date(now), - }; - - expect(transformer.toViewport(interval)).toEqual({ - start: interval.start, - end: interval.end, - refreshRate: 5000, - }); - }); -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.ts b/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.ts deleted file mode 100644 index 30b6a5f21..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/intervals/utils/transformer.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { isHistoricalViewport, parseDuration } from '@iot-app-kit/core'; -import { type Interval, type Viewport, type ViewportType } from '../../types'; - -export const getViewportType = (viewport: Viewport): ViewportType => - isHistoricalViewport(viewport) ? 'historical' : 'duration'; - -export class IntervalTransformer { - #now: number; - #viewportType: ViewportType; - - constructor({ - now = Date.now(), - viewportType, - }: { - now?: number; - viewportType: ViewportType; - }) { - this.#now = now; - this.#viewportType = viewportType; - } - - toInterval(viewport: Viewport, now?: number): Interval { - if (isHistoricalViewport(viewport)) { - return { - start: viewport.start, - end: viewport.end, - group: viewport.refreshRate, - }; - } - - const startOffset = viewport.startOffset ?? 0; - - const end = now ?? this.#now - startOffset; - const start = end - parseDuration(viewport.duration); - - return { - start: new Date(start), - end: new Date(end), - group: viewport.refreshRate, - }; - } - - toViewport(interval: Interval): Viewport { - if (this.#viewportType === 'historical') { - return { - start: interval.start, - end: interval.end, - refreshRate: interval.group, - }; - } - - return { - startOffset: this.#now - interval.end.getTime(), - duration: interval.end.getTime() - interval.start.getTime(), - refreshRate: interval.group, - }; - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/queryUtils/index.ts b/packages/react-components/src/queries/useTimeSeriesData/queryUtils/index.ts deleted file mode 100644 index 0d7f22a0b..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/queryUtils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './queryStatus'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/queryUtils/queryStatus.ts b/packages/react-components/src/queries/useTimeSeriesData/queryUtils/queryStatus.ts deleted file mode 100644 index ba77965e8..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/queryUtils/queryStatus.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type UseQueryResult } from '@tanstack/react-query'; - -export const aggregateStatuses = (statuses: UseQueryResult[]) => ({ - isPending: statuses.some((status) => status.isPending), - isError: statuses.some((status) => status.isError), - isSuccess: statuses.some((status) => status.isSuccess), - isLoading: statuses.some((status) => status.isLoading), - isFetching: statuses.some((status) => status.isFetching), -}); diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/index.ts b/packages/react-components/src/queries/useTimeSeriesData/requestExecution/index.ts deleted file mode 100644 index e90a9b123..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './requestExecution'; -export * from './requestExecutionStrategy'; -export * from './useRequestExecuter'; -export * from './types'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecution.ts b/packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecution.ts deleted file mode 100644 index f27b73c6a..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecution.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { type TimeSeriesDataCacheClient } from '../cacheClient'; -import { type OnRequestSuccessCallback } from './requestExecutionStrategy'; -import { type SendOptions } from './types'; - -export type TimeSeriesDataRequestExecutionOptions = { - cacheClient: TimeSeriesDataCacheClient; -}; - -export abstract class TimeSeriesDataRequestExecution { - protected cacheClient: TimeSeriesDataCacheClient; - - constructor({ - cacheClient, - }: TimeSeriesDataRequestExecutionOptions) { - this.cacheClient = cacheClient; - } - - cacheRequest({ request, interval }: SendOptions) { - this.cacheClient.setCachedRequestData(request, interval); - } - - onRequestSuccess(request: Request, data: Data[]) { - this.cacheClient.setTimeSeriesRequestData(request, data); - } - - async send(sendOptions: SendOptions): Promise { - const response = await this.sendRequest( - sendOptions, - this.onRequestSuccess.bind(this) - ); - - this.cacheRequest(sendOptions); - - return response; - } - - abstract sendRequest( - sendOptions: SendOptions, - onRequestSuccess: OnRequestSuccessCallback - ): Promise; -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecutionStrategy.ts b/packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecutionStrategy.ts deleted file mode 100644 index 49c5b3efb..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/requestExecutionStrategy.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { type SendOptions } from './types'; - -export type OnRequestSuccessCallback = ( - request: Request, - data: Data[] -) => void; - -export interface ExecuteRequestStrategy { - send( - { request, signal }: SendOptions, - onRequestSuccess: OnRequestSuccessCallback - ): Promise; -} - -export class NoopExecuteRequestStrategy - implements ExecuteRequestStrategy -{ - async send(options: SendOptions): Promise { - console.warn( - 'No request strategy implemented. Could not handle: ', - options.request - ); - return []; - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/types.ts b/packages/react-components/src/queries/useTimeSeriesData/requestExecution/types.ts deleted file mode 100644 index e0e68aa97..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { type Interval } from '../types'; - -export type SendOptions = { - request: Request; - interval: Interval; - signal: AbortSignal; -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/useRequestExecuter.ts b/packages/react-components/src/queries/useTimeSeriesData/requestExecution/useRequestExecuter.ts deleted file mode 100644 index c0152802e..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestExecution/useRequestExecuter.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { type QueryFunctionContext, useQueries } from '@tanstack/react-query'; -import groupBy from 'lodash-es/groupBy'; -import zip from 'lodash-es/zip'; -import { useCallback, useMemo } from 'react'; -import { - createNonNullableList, - createNonNullableTupleList, -} from '../../../utils/createNonNullableList'; -import { - type TimeSeriesDataCacheClient, - type TimeSeriesDataCacheKeyManager, -} from '../cacheClient'; -import { IntervalTransformer, getViewportType } from '../intervals'; -import { type TimeSeriesDataRequestExecution } from '../requestExecution/requestExecution'; -import { type useTimeSeriesDataRequestManager } from '../requestManager'; - -type UseRequestExecuterOptions = { - cacheClient: TimeSeriesDataCacheClient; - requestQueries: ReturnType< - typeof useTimeSeriesDataRequestManager - >; - requestExecuter: TimeSeriesDataRequestExecution; -}; - -export const useTimeSeriesDataRequestExecuter = ({ - requestQueries, - cacheClient, - requestExecuter, -}: UseRequestExecuterOptions) => { - const queryFn = useCallback( - async ({ - signal, - queryKey: [{ request: serializedRequest, viewport }], - }: QueryFunctionContext< - ReturnType< - TimeSeriesDataCacheKeyManager['toRequestExectutionQueryKey'] - > - >) => { - const now = Date.now(); - const intervalTransformer = new IntervalTransformer({ - now, - viewportType: getViewportType(viewport), - }); - - const interval = intervalTransformer.toInterval(viewport); - - const request = cacheClient - .getKeyManager() - .deserializeRequest(serializedRequest); - - const result = await requestExecuter.send({ signal, request, interval }); - - return { - serializedRequest, - viewport, - result, - }; - }, - [requestExecuter, cacheClient] - ); - - const requests = useMemo(() => { - return createNonNullableList( - requestQueries.flatMap(({ queryResult }) => - queryResult.data?.map((request) => request) - ) - ); - }, [requestQueries]); - - const queries = useMemo(() => { - return requests.map(({ request, viewport }) => ({ - queryKey: cacheClient - .getKeyManager() - .toRequestExectutionQueryKey(request, viewport), - refetchInterval: viewport.refreshRate, - initialData: () => { - if (cacheClient.isTimeSeriesDataRequestCached({ request, viewport })) { - return cacheClient.getTimeSeriesData({ request, viewport }); - } - - return undefined; - }, - queryFn, - })); - }, [requests, cacheClient, queryFn]); - - const queryResults = useQueries( - { - queries, - }, - cacheClient.getQueryClient() - ); - - return useMemo(() => { - const requestsWithResults = createNonNullableTupleList( - zip(requests, queryResults) - ); - const aggregatedStatues = groupBy(requestsWithResults, ([{ request }]) => - JSON.stringify(cacheClient.getKeyManager().serializeRequest(request)) - ); - return Object.values(aggregatedStatues).map((requestsWithStatuses) => { - // all requests will be the same from the groupby above - const [{ request }] = requestsWithStatuses[0]; - const queryResults = requestsWithStatuses.map( - ([_request, queryResult]) => queryResult - ); - return { - queryRequest: request, - queryResults, - }; - }); - }, [requests, queryResults, cacheClient]); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestManager/absoluteDurationRequestResolver.ts b/packages/react-components/src/queries/useTimeSeriesData/requestManager/absoluteDurationRequestResolver.ts deleted file mode 100644 index a02864404..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestManager/absoluteDurationRequestResolver.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { - IntervalTransformer, - getViewportType, - divideInterval, - requestRange, -} from '../intervals'; -import { type Viewport } from '../types'; -import { - type ResolveOptions, - TimeSeriesDataRequestResolver, -} from './requestResolver'; -import { type RequestSettings } from './types'; - -export class AbsoluteDurationTimeSeriesDataRequestResolver< - Request, - Data -> extends TimeSeriesDataRequestResolver { - resolveViewports( - { request, viewport, now }: ResolveOptions, - settings?: RequestSettings - ): Viewport[] { - const intervalTransformer = new IntervalTransformer({ - now, - viewportType: getViewportType(viewport), - }); - - const interval = intervalTransformer.toInterval(viewport); - - const existingRequestIntervals = - this.cacheClient.getCachedTimeSeriesDataRequestIntervals(request); - - const resolvedRequestRange = requestRange( - { - ...interval, - max: new Date(now), - }, - settings?.requestBuffer - ); - - const missingIntervals = divideInterval( - resolvedRequestRange, - existingRequestIntervals - ); - - return missingIntervals.map((interval) => - intervalTransformer.toViewport(interval) - ); - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestManager/index.ts b/packages/react-components/src/queries/useTimeSeriesData/requestManager/index.ts deleted file mode 100644 index 1918f1c05..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestManager/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './useRequestManager'; -export * from './types'; -export * from './absoluteDurationRequestResolver'; -export * from './liveDurationRequestResolver'; -export * from './requestResolver'; diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestManager/liveDurationRequestResolver.ts b/packages/react-components/src/queries/useTimeSeriesData/requestManager/liveDurationRequestResolver.ts deleted file mode 100644 index d3685f02f..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestManager/liveDurationRequestResolver.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { isBefore } from 'date-fns'; -import { - IntervalTransformer, - overlaps, - sortIntervals, - requestRange, -} from '../intervals'; -import { type Viewport } from '../types'; -import { - type RequestResolverOptions, - type ResolveOptions, - TimeSeriesDataRequestResolver, -} from './requestResolver'; -import { type RequestSettings } from './types'; - -export type LiveDurationTimeSeriesDataRequestResolverOptions = - RequestResolverOptions & { - liveDataIntervals: Viewport[]; - }; - -export class LiveDurationTimeSeriesDataRequestResolver< - Request, - Data -> extends TimeSeriesDataRequestResolver { - #liveDataIntervals: Viewport[]; - - constructor({ - liveDataIntervals, - ...options - }: LiveDurationTimeSeriesDataRequestResolverOptions) { - super(options); - this.#liveDataIntervals = liveDataIntervals; - } - - resolveViewports( - { viewport, now }: ResolveOptions, - settings?: RequestSettings - ): Viewport[] { - const intervalTransformer = new IntervalTransformer({ - now, - viewportType: 'duration', - }); - - const interval = intervalTransformer.toInterval(viewport); - - const liveDataIntervals = this.#liveDataIntervals.map((viewport) => - intervalTransformer.toInterval(viewport) - ); - - const resolvedRequestRange = requestRange( - { - ...interval, - max: new Date(now), - }, - settings?.requestBuffer - ); - - const sortedLiveDataIntervals = sortIntervals([...liveDataIntervals]); - - // interval furthest from the current time - const firstInterval = sortedLiveDataIntervals.at(0); - - let constrainedIntervals = [...sortedLiveDataIntervals]; - - /** - * if the request range is not fully covered by live data intervals - * add in a starting interval - */ - if ( - firstInterval && - isBefore(resolvedRequestRange.start, firstInterval.start) - ) { - constrainedIntervals.unshift({ - start: resolvedRequestRange.start, - end: firstInterval.start, - }); - } - - /** - * if the request range is before the current time - * it means we are not in live mode, and - * we can filter out any live data intervals - * that don't apply to this viewport - */ - if (isBefore(resolvedRequestRange.end, new Date(now))) { - constrainedIntervals = [...constrainedIntervals].filter( - overlaps(resolvedRequestRange) - ); - } - - return constrainedIntervals.map((interval) => - intervalTransformer.toViewport(interval) - ); - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestManager/requestResolver.ts b/packages/react-components/src/queries/useTimeSeriesData/requestManager/requestResolver.ts deleted file mode 100644 index d83a1c71f..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestManager/requestResolver.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { type TimeSeriesDataCacheClient } from '../cacheClient'; -import { IntervalTransformer, getViewportType } from '../intervals'; -import { type Viewport } from '../types'; -import { type RequestResolverStrategy, type RequestSettings } from './types'; - -export type ResolveOptions = { - request: Request; - viewport: Viewport; - now: number; -}; - -export type RequestResolverOptions = { - cacheClient: TimeSeriesDataCacheClient; -}; - -export abstract class TimeSeriesDataRequestResolver - implements RequestResolverStrategy -{ - protected cacheClient: TimeSeriesDataCacheClient; - - constructor({ cacheClient }: RequestResolverOptions) { - this.cacheClient = cacheClient; - } - - abstract resolveViewports( - { viewport, now }: ResolveOptions, - settings?: RequestSettings - ): Viewport[]; - - resolve( - { request, viewport }: { request: Request; viewport: Viewport }, - settings?: RequestSettings - ): { request: Request; viewport: Viewport }[] { - const viewportType = getViewportType(viewport); - const now = Date.now(); - - const intervalTransformer = new IntervalTransformer({ - now, - viewportType, - }); - - this.cacheClient.cancelTimeSeriesDataRequests( - { request, viewport }, - { intervalTransformer, status: 'pending' } - ); - - const resolvedIViewports = this.resolveViewports( - { request, viewport, now }, - settings - ); - - return resolvedIViewports.map((v) => ({ - request, - viewport: v, - })); - } -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestManager/types.ts b/packages/react-components/src/queries/useTimeSeriesData/requestManager/types.ts deleted file mode 100644 index 5d203a8ac..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestManager/types.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { type Viewport } from '../types'; - -export type RequestSettings = { - requestBuffer?: number; - fetchMostRecentBeforeEnd?: boolean; - fetchMostRecentBeforeStart?: boolean; -}; - -export interface RequestResolverStrategy { - resolve( - { request, viewport }: { request: Request; viewport: Viewport }, - settings?: RequestSettings - ): { request: Request; viewport: Viewport }[]; -} diff --git a/packages/react-components/src/queries/useTimeSeriesData/requestManager/useRequestManager.ts b/packages/react-components/src/queries/useTimeSeriesData/requestManager/useRequestManager.ts deleted file mode 100644 index 8b4ad8eee..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/requestManager/useRequestManager.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { useQueries } from '@tanstack/react-query'; -import zip from 'lodash-es/zip'; -import { useCallback, useMemo } from 'react'; -import { createNonNullableTupleList } from '../../../utils/createNonNullableList'; -import { type TimeSeriesDataCacheClient } from '../cacheClient'; -import { type Viewport } from '../types'; -import { type RequestResolverStrategy, type RequestSettings } from './types'; - -type TimeSeriesDataRequestManagerOptions = { - requests: Request[]; - viewport: Viewport; - cacheClient: TimeSeriesDataCacheClient; - settings: RequestSettings; - requestResolver: RequestResolverStrategy; -}; - -export const useTimeSeriesDataRequestManager = ({ - cacheClient, - requests, - viewport, - settings, - requestResolver, -}: TimeSeriesDataRequestManagerOptions) => { - const createQueryFn = useCallback( - (request: Request) => { - return async () => { - return requestResolver.resolve({ request, viewport }, settings); - }; - }, - [requestResolver, viewport, settings] - ); - - const queries = useMemo(() => { - return requests.map((request) => ({ - gcTime: 100, - queryKey: cacheClient - .getKeyManager() - .toRequestQueryKey(request, viewport), - queryFn: createQueryFn(request), - })); - }, [requests, cacheClient, viewport, createQueryFn]); - - const requestQueries = useQueries( - { - queries, - }, - cacheClient.getQueryClient() - ); - - return useMemo(() => { - const zipped = createNonNullableTupleList(zip(requests, requestQueries)); - - return zipped.map(([queryRequest, queryResult]) => ({ - queryRequest, - queryResult, - })); - }, [requests, requestQueries]); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/useBisectedData.ts b/packages/react-components/src/queries/useTimeSeriesData/useBisectedData.ts deleted file mode 100644 index 1901081fa..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/useBisectedData.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { useMemo } from 'react'; -import { type TimeSeriesDataCacheClient } from './cacheClient'; -import { type Viewport } from './types'; -import { useQueries } from '@tanstack/react-query'; -// import { IntervalTransformer } from "./intervals"; - -type UseBisectedDataOptions = { - requests: Request[]; - viewport: Viewport; - cacheClient: TimeSeriesDataCacheClient; -}; -export const useTimeSeriesBisectedData = ({ - requests, - viewport, - cacheClient, -}: UseBisectedDataOptions) => { - const queries = useMemo(() => { - return requests.map((request) => { - return { - queryKey: cacheClient.getKeyManager().toDataCacheQueryKey(request), - queryFn: async () => { - return cacheClient.getTimeSeriesData({ request, viewport }) ?? []; - }, - select: () => { - return { - request, - data: cacheClient.getTimeSeriesData({ request, viewport }), - }; - }, - gcTime: 5000, - }; - }); - }, [requests, viewport, cacheClient]); - - return useQueries( - { - queries, - }, - cacheClient.getQueryClient() - ); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/useCachedQueries.ts b/packages/react-components/src/queries/useTimeSeriesData/useCachedQueries.ts deleted file mode 100644 index 8e774f3a7..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/useCachedQueries.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { useMemo } from 'react'; -import { type TimeSeriesDataCacheClient } from './cacheClient'; -// import { Viewport } from "./types"; -import { useQueries } from '@tanstack/react-query'; -// import { IntervalTransformer } from "./intervals"; - -type UseCachcedQueriesOptions = { - requests: Request[]; - cacheClient: TimeSeriesDataCacheClient; -}; -export const useTimeSeriesDataCachedQueries = ({ - requests, - cacheClient, -}: UseCachcedQueriesOptions) => { - const queries = useMemo(() => { - return requests.map((request) => { - return { - queryKey: cacheClient - .getKeyManager() - .toCachedRequestExectutionQueryKey(request), - queryFn: async () => { - return ( - cacheClient.getCachedTimeSeriesDataRequestIntervals(request) ?? [] - ); - }, - select: () => { - return { - request, - cachedQueries: - cacheClient.getCachedTimeSeriesDataRequestIntervals(request), - }; - }, - gcTime: 5000, - }; - }); - }, [requests, cacheClient]); - - return useQueries( - { - queries, - }, - cacheClient.getQueryClient() - ); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/useRequestStatus.ts b/packages/react-components/src/queries/useTimeSeriesData/useRequestStatus.ts deleted file mode 100644 index 5ba9b480d..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/useRequestStatus.ts +++ /dev/null @@ -1,61 +0,0 @@ -import isEqual from 'lodash-es/isEqual'; -import { useMemo } from 'react'; -import { createNonNullableList } from '../../utils/createNonNullableList'; -import { aggregateStatuses } from './queryUtils'; -import { type useTimeSeriesDataRequestExecuter } from './requestExecution'; -import { type useTimeSeriesDataRequestManager } from './requestManager'; -import { type useTimeSeriesBisectedData } from './useBisectedData'; -import { type useTimeSeriesDataCachedQueries } from './useCachedQueries'; - -type UseRequestStatusOptions = { - requestQueries: ReturnType< - typeof useTimeSeriesDataRequestManager - >; - requestExecutionQueries: ReturnType< - typeof useTimeSeriesDataRequestExecuter - >; - cachedQueries: ReturnType< - typeof useTimeSeriesDataCachedQueries - >; - dataQueries: ReturnType>; -}; - -export const useTimeSeriesDataRequestStatus = ({ - requestQueries, - requestExecutionQueries, - cachedQueries, - dataQueries, -}: UseRequestStatusOptions) => { - return useMemo(() => { - return requestQueries.map(({ queryRequest, queryResult }) => { - const likeRequestExecutionQueries = requestExecutionQueries.find( - ({ queryRequest: queryExecutionRequest }) => { - return isEqual(queryRequest, queryExecutionRequest); - } - ); - - const requestExecutionQueryResults = - likeRequestExecutionQueries?.queryResults ?? []; - - const likeCachedQuery = cachedQueries.find(({ data }) => { - return isEqual(queryRequest, data?.request); - }); - - const likeDataQuery = dataQueries.find(({ data }) => { - return isEqual(queryRequest, data?.request); - }); - - const statuses = createNonNullableList([ - queryResult, - ...requestExecutionQueryResults, - likeCachedQuery, - likeDataQuery, - ]); - - return { - queryRequest, - status: aggregateStatuses(statuses), - }; - }); - }, [requestQueries, requestExecutionQueries, cachedQueries, dataQueries]); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/useResponse.ts b/packages/react-components/src/queries/useTimeSeriesData/useResponse.ts deleted file mode 100644 index 21bb3473c..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/useResponse.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { useMemo } from 'react'; -import { type TimeSeriesDataCacheClient } from './cacheClient'; -import { type useTimeSeriesBisectedData } from './useBisectedData'; -import { type useTimeSeriesDataRequestStatus } from './useRequestStatus'; - -export type UseTimeSeriesDataResponseOptions = { - cacheClient: TimeSeriesDataCacheClient; - dataQueries: ReturnType>; - statuses: ReturnType>; -}; - -export const useTimeSeriesDataResponse = ({ - cacheClient, - dataQueries, - statuses, -}: UseTimeSeriesDataResponseOptions) => { - return useMemo(() => { - return statuses.map(({ queryRequest, status }) => { - const data = - dataQueries.find((query) => { - const request = query.data?.request; - if (!request) return false; - return cacheClient.matchesRequest(request, queryRequest); - })?.data?.data ?? []; - - return { - request: queryRequest, - status, - data, - }; - }); - }, [cacheClient, statuses, dataQueries]); -}; diff --git a/packages/react-components/src/queries/useTimeSeriesData/useTimeSeriesData.ts b/packages/react-components/src/queries/useTimeSeriesData/useTimeSeriesData.ts deleted file mode 100644 index 0730cb1a7..000000000 --- a/packages/react-components/src/queries/useTimeSeriesData/useTimeSeriesData.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - type AssetPropertyValuesRequest, - type AssetPropertyValuesRequestFunctions, -} from '../useAssetPropertyValues'; -import { useAssetPropertyValues } from '../useAssetPropertyValues/useAssetPropertyValues'; -import { type RequestSettings } from './requestManager'; -import { type Viewport } from './types'; - -type Request = AssetPropertyValuesRequest; -type RequestFunctions = AssetPropertyValuesRequestFunctions; - -export type UseTimeSeriesDataOptions = { - requests: Request[]; - viewport: Viewport; - requestFns?: RequestFunctions; - settings?: RequestSettings; -}; - -export const useTimeSeriesData = ({ - requests, - viewport, - requestFns = {}, - settings = {}, -}: UseTimeSeriesDataOptions) => { - const assetPropertyValues = useAssetPropertyValues({ - requests, - viewport, - requestFns, - settings, - }); - - return assetPropertyValues; -}; diff --git a/packages/react-components/src/testing/mockWidgetProperties.ts b/packages/react-components/src/testing/mockWidgetProperties.ts index 2d5f59df9..334ddb214 100644 --- a/packages/react-components/src/testing/mockWidgetProperties.ts +++ b/packages/react-components/src/testing/mockWidgetProperties.ts @@ -4,9 +4,14 @@ import { type Threshold, type DataStream, COMPARISON_OPERATOR, + type HistoricalViewport, } from '@iot-app-kit/core'; -import { DAY_IN_MS } from '../utils/time'; -import { VIEWPORT } from '../utils/testUtil'; +import { DAY_IN_MS } from '@iot-app-kit/core'; + +export const VIEWPORT: HistoricalViewport = { + start: new Date(2000, 0, 0, 0), + end: new Date(2001, 0, 0, 0), +}; export const START_DATE = new Date(2000, 0, 0); diff --git a/packages/react-components/src/utils/aggregationFrequency.ts b/packages/react-components/src/utils/aggregationFrequency.ts index 4dc91cb5d..0720086f0 100644 --- a/packages/react-components/src/utils/aggregationFrequency.ts +++ b/packages/react-components/src/utils/aggregationFrequency.ts @@ -1,4 +1,4 @@ -import { convertMS } from './time'; +import { convertMS } from '@iot-app-kit/core'; const aggregateToString = (aggregate: string): string => { return aggregate.replace(/_/g, ' ').toLowerCase(); diff --git a/packages/react-components/src/utils/breachedThreshold.spec.ts b/packages/react-components/src/utils/breachedThreshold.spec.ts index ee06faf92..0a172140f 100644 --- a/packages/react-components/src/utils/breachedThreshold.spec.ts +++ b/packages/react-components/src/utils/breachedThreshold.spec.ts @@ -1,10 +1,10 @@ -import { DATA_TYPE } from '@iot-app-kit/core'; +import { DATA_TYPE, SECOND_IN_MS } from '@iot-app-kit/core'; import { breachedAlarmThresholds, breachedThreshold, } from './breachedThreshold'; -import { COMPARISON_OPERATOR, StreamType } from '../common/constants'; -import { SECOND_IN_MS } from './time'; +import { COMPARISON_OPERATOR } from '@iot-app-kit/component-core'; +import { StreamType } from '../common/constants'; import type { Threshold, DataStream, DataPoint } from '@iot-app-kit/core'; const ALARM_DATA_STREAM: DataStream = { diff --git a/packages/react-components/src/utils/convertViewportToMs.ts b/packages/react-components/src/utils/convertViewportToMs.ts index 8d106f148..3bbb07046 100644 --- a/packages/react-components/src/utils/convertViewportToMs.ts +++ b/packages/react-components/src/utils/convertViewportToMs.ts @@ -1,5 +1,5 @@ import { type Viewport, parseDuration } from '@iot-app-kit/core'; -import { isDurationViewport } from './isDurationViewport'; +import { isDurationViewport } from '@iot-app-kit/component-core'; // TODO: test this once echarts live mode is supported // the width here represents the width of the view port in milli seconds diff --git a/packages/react-components/src/utils/createNonNullableList.ts b/packages/react-components/src/utils/createNonNullableList.ts deleted file mode 100644 index ae6fe9d89..000000000 --- a/packages/react-components/src/utils/createNonNullableList.ts +++ /dev/null @@ -1,22 +0,0 @@ -export function createNonNullableList( - list: T[] -): NonNullable[] { - return list.filter>( - (item): item is NonNullable => item != null - ); -} - -export const createNonNullableTupleList = ( - tuples: [A | undefined, B | undefined][] -): [NonNullable, NonNullable][] => { - return tuples.filter( - ( - tuple - ): tuple is [ - NonNullable<(typeof tuple)[0]>, - NonNullable<(typeof tuple)[1]> - ] => { - return tuple[0] != null && tuple[1] != null; - } - ); -}; diff --git a/packages/react-components/src/utils/isDurationViewport.ts b/packages/react-components/src/utils/isDurationViewport.ts deleted file mode 100644 index 2ddd83359..000000000 --- a/packages/react-components/src/utils/isDurationViewport.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type DurationViewport, type Viewport } from '@iot-app-kit/core'; - -export const isDurationViewport = ( - viewport: Viewport -): viewport is DurationViewport => - (viewport as DurationViewport).duration !== undefined; diff --git a/packages/react-components/src/utils/thresholdUtils.spec.ts b/packages/react-components/src/utils/thresholdUtils.spec.ts index 0e3a51e1c..2cd349004 100644 --- a/packages/react-components/src/utils/thresholdUtils.spec.ts +++ b/packages/react-components/src/utils/thresholdUtils.spec.ts @@ -11,8 +11,8 @@ import { highestPriorityThreshold, thresholdAppliesToDataStream, } from './breachedThreshold'; -import { COMPARISON_OPERATOR } from '../common/constants'; -import type { Threshold } from '@iot-app-kit/core'; +import { COMPARISON_OPERATOR } from '@iot-app-kit/component-core'; +import { type Threshold } from '@iot-app-kit/core'; describe('annotation logic', () => { describe.each` diff --git a/packages/react-components/src/utils/time.spec.ts b/packages/react-components/src/utils/time.spec.ts index 530d451a0..89c44c2dd 100644 --- a/packages/react-components/src/utils/time.spec.ts +++ b/packages/react-components/src/utils/time.spec.ts @@ -1,320 +1,8 @@ import { - convertMS, - DAY_IN_MS, - displayDate, - HOUR_IN_MS, - MINUTE_IN_MS, - MONTH_IN_MS, - SECOND_IN_MS, - toTimestamp, - YEAR_IN_MS, - formatDate, getPatternForXAxisLabelForAnomalyChart, getPatternForXAxisLabelForLineChart, } from './time'; -describe('convert from milliseconds', () => { - it('throws an error when input milliseconds is less than 0', () => { - expect(() => convertMS(-1)).toThrowError(); - }); - - it('converts from 1000 milliseconds to 1 second', () => { - const convertedMS = convertMS(SECOND_IN_MS); - expect(convertedMS).toEqual({ - seconds: 1, - minute: 0, - hour: 0, - day: 0, - }); - }); - - it('converts from 2000 milliseconds to 2 second', () => { - const convertedMS = convertMS(SECOND_IN_MS * 2); - expect(convertedMS).toEqual({ - seconds: 2, - minute: 0, - hour: 0, - day: 0, - }); - }); - - it('converts from 2005 milliseconds to 2 second', () => { - const convertedMS = convertMS(SECOND_IN_MS * 2 + 5); - expect(convertedMS).toEqual({ - seconds: 2, - minute: 0, - hour: 0, - day: 0, - }); - }); - - it('converts from 60000 milliseconds to 1 min', () => { - const convertedMS = convertMS(MINUTE_IN_MS); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 1, - hour: 0, - day: 0, - }); - }); - - it('converts from 120000 milliseconds to 2 min', () => { - const convertedMS = convertMS(MINUTE_IN_MS * 2); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 2, - hour: 0, - day: 0, - }); - }); - - it('converts from 120100 milliseconds to 2 min', () => { - const convertedMS = convertMS(MINUTE_IN_MS * 2 + 100); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 2, - hour: 0, - day: 0, - }); - }); - - it('converts from 1 hr in milliseconds to 1 hr', () => { - const convertedMS = convertMS(HOUR_IN_MS); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 0, - hour: 1, - day: 0, - }); - }); - - it('converts from 2 hr in milliseconds to 2 hr', () => { - const convertedMS = convertMS(HOUR_IN_MS * 2); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 0, - hour: 2, - day: 0, - }); - }); - - it('converts from 2 hr and 100 milliseconds in milliseconds to 2 hr', () => { - const convertedMS = convertMS(HOUR_IN_MS * 2 + 100); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 0, - hour: 2, - day: 0, - }); - }); - - it('converts from 1 day in milliseconds to 1 day', () => { - const convertedMS = convertMS(DAY_IN_MS); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 0, - hour: 0, - day: 1, - }); - }); - - it('converts from 2 day in milliseconds to 2 day', () => { - const convertedMS = convertMS(DAY_IN_MS * 2); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 0, - hour: 0, - day: 2, - }); - }); - - it('converts from 2 day and 100 milliseconds in milliseconds to 2 day', () => { - const convertedMS = convertMS(DAY_IN_MS * 2); - expect(convertedMS).toEqual({ - seconds: 0, - minute: 0, - hour: 0, - day: 2, - }); - }); -}); - -describe('display date', () => { - const SOME_DATE = new Date(2000, 0, 0); - - describe('with raw resolution', () => { - it('returns timestamp with minutes and seconds for viewport in the scale of seconds', () => { - expect( - displayDate(SOME_DATE, 0, { - start: new Date(2000, 0, 0), - end: new Date(2000, 0, 0, 0, 0, 10), - }) - ).toBe('00:00'); - }); - - it('returns a timestamp with hours, minutes, and seconds for a viewport in the scale of minutes', () => { - expect( - displayDate(SOME_DATE, 0, { - start: new Date(2000, 0, 0), - end: new Date(2000, 0, 0, 0, 5), - }) - ).toBe('12:00:00 AM'); - }); - - it('returns a timestamp with minutes and hours for a viewport larger than a handful of minutes', () => { - expect( - displayDate(SOME_DATE, 0, { - start: new Date(2000, 0, 0), - end: new Date(2000, 0, 0, 0, 20), - }) - ).toBe('12:00 AM'); - }); - - it('returns a timestamp with day, month and hour for a day of time', () => { - expect( - displayDate(SOME_DATE, 0, { - start: new Date(2000, 0, 0), - end: new Date(2000, 0, 1), - }) - ).toBe('12/31, 12:00 AM'); - }); - - it('returns a timestamp with day, month and year for a month time span', () => { - expect( - displayDate(SOME_DATE, 0, { - start: new Date(2000, 0, 0), - end: new Date(2000, 1, 0), - }) - ).toBe('12/31/1999'); - }); - - it('returns a timestamp with day, month and year for a absolutely massive viewport', () => { - expect( - displayDate(SOME_DATE, 0, { - start: new Date(2000, 0, 0), - end: new Date(2020, 0, 0), - }) - ).toBe('12/31/1999'); - }); - }); - - describe('with a non-raw resolution', () => { - it('returns a timestamp with minutes and seconds for a granular resolution and small viewport', () => { - expect( - displayDate(SOME_DATE, 2, { - start: new Date(2000, 0, 0), - end: new Date(2000, 0, 0, 0, 0, 10), - }) - ).toBe('00:00'); - }); - - it('returns a timestamp stamp with month day and hour if given a resolution of one hour', () => { - expect( - displayDate(SOME_DATE, HOUR_IN_MS, { - start: new Date(2000, 0, 0), - end: new Date(2000, 1, 0), - }) - ).toBe('12/31, 12 AM'); - }); - - it('returns a timestamp with a day, month, day and year if given a day long resolution', () => { - expect( - displayDate(SOME_DATE, DAY_IN_MS, { - start: new Date(2000, 0, 0), - end: new Date(2000, 1, 0), - }) - ).toBe('12/31/1999'); - }); - - it('returns a timestamp with a day, month and year if given a month long resolution', () => { - expect( - displayDate(SOME_DATE, MONTH_IN_MS, { - start: new Date(2000, 0, 0), - end: new Date(2000, 1, 0), - }) - ).toBe('12/31/1999'); - }); - - it('returns a timestamp with a day, month and year if given a year long resolution', () => { - expect( - displayDate(SOME_DATE, YEAR_IN_MS, { - start: new Date(2000, 0, 0), - end: new Date(2000, 1, 0), - }) - ).toBe('12/31/1999'); - }); - }); -}); - -describe('toTimestamp', () => { - it('can handle an undefined time', () => { - expect(toTimestamp(undefined)).toBe(0); - expect( - toTimestamp({ - timeInSeconds: undefined, - offsetInNanos: undefined, - }) - ).toBe(0); - }); - it('converts a time with seconds and nanos to milliseconds', () => { - expect( - toTimestamp({ - timeInSeconds: 0.1, - offsetInNanos: 1000000, - }) - ).toBe(101); - }); - it('converts a time with only seconds to milliseconds', () => { - expect( - toTimestamp({ - timeInSeconds: 0.1, - }) - ).toBe(100); - }); - it('converts a time with only nanos to milliseconds', () => { - expect( - toTimestamp({ - timeInSeconds: undefined, - offsetInNanos: 1000000, - }) - ).toBe(1); - }); - it('does not return fractional milliseconds', () => { - expect( - toTimestamp({ - timeInSeconds: undefined, - offsetInNanos: 1000, - }) - ).toBe(0); - }); -}); - -describe('formatDate', () => { - it('correctly converts to a different timezone', () => { - const date = new Date(0).getTime(); - - const formattedDate = formatDate(date, { timeZone: 'America/Denver' }); - - // UTC-7 - expect(formattedDate).toBe('1969-12-31 05:00:00 p.m.'); - - const formattedDate2 = formatDate(date, { timeZone: 'Asia/Tokyo' }); - - // UTC+9 - expect(formattedDate2).toBe('1970-01-01 09:00:00 a.m.'); - }); - - it('converts date to specified pattern', () => { - const date = new Date(0).getTime(); - - const formattedDate = formatDate(date, { - timeZone: 'America/Denver', - pattern: 'hh:mm a', - }); - expect(formattedDate).toBe('05:00 PM'); - }); -}); - describe('getPatternForXAxisLabelForAnomalyChart', () => { it('gets year pattern', () => { const date = new Date(); diff --git a/packages/react-components/src/utils/time.ts b/packages/react-components/src/utils/time.ts index bf2103794..a8dc9b666 100644 --- a/packages/react-components/src/utils/time.ts +++ b/packages/react-components/src/utils/time.ts @@ -1,195 +1,3 @@ -import type { TimeInNanos } from '@aws-sdk/client-iotsitewise'; -import { NANO_SECOND_IN_MS } from '@iot-app-kit/core'; -import parse from 'parse-duration'; -import { utcToZonedTime, format } from 'date-fns-tz'; - -export const SECOND_IN_MS = 1000; -export const MINUTE_IN_MS = 60 * SECOND_IN_MS; -export const HOUR_IN_MS = 60 * MINUTE_IN_MS; -export const DAY_IN_MS = 24 * HOUR_IN_MS; -// Not precisely accurate, only estimates. exact duration depends on start date. use with care. -export const MONTH_IN_MS = 30 * DAY_IN_MS; -export const YEAR_IN_MS = 12 * MONTH_IN_MS; -export const DEFAULT_DATE_TIME = 'yyyy-MM-dd hh:mm:ss aaaa'; - -// Global time format strings -export const SHORT_TIME = 'hh:mm a'; -export const FULL_DATE = 'yyyy-MM-dd hh:mm:ss a'; - -/** - * ConvertMS is a helper function that will take in milliseconds and convert it to the highest detonator - * and does not return the "remainder" - * - * It is important to note that the object returning does not represent equivalence! - * - * For Example: - * convert(MINUTE_IN_MS) will return: - * { - * day: 0, - * hour: 0 - * minute: 1, - * seconds: 0, - * } - * - * IT DOES NOT RETURN: - * - * { - * day: 0, - * hour: 0, - * minute: 1, - * seconds: 60, <--- does not return the "equivalence" - * } - */ -export const convertMS = ( - milliseconds: number -): { - day: number; - hour: number; - minute: number; - seconds: number; -} => { - if (milliseconds < 0) { - throw new Error('Time cannot be negative!'); - } - let seconds = Math.floor(milliseconds / 1000); - let minute = Math.floor(seconds / 60); - let hour = Math.floor(minute / 60); - const day = Math.floor(hour / 24); - - seconds %= 60; - minute %= 60; - hour %= 24; - - return { - day, - hour, - minute, - seconds, - }; -}; - -export const displayDate = ( - date: Date, - resolution: number, - { start, end }: { start: Date; end: Date } -): string => { - const viewportDurationMS = end.getTime() - start.getTime(); - if (resolution < HOUR_IN_MS) { - if (viewportDurationMS < MINUTE_IN_MS) { - return date.toLocaleString('en-US', { - minute: 'numeric', - second: 'numeric', - }); - } - - if (viewportDurationMS <= 10 * MINUTE_IN_MS) { - return date.toLocaleString('en-US', { - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: true, - }); - } - - if (viewportDurationMS <= HOUR_IN_MS) { - return date.toLocaleString('en-US', { - hour: 'numeric', - minute: 'numeric', - hour12: true, - }); - } - - if (viewportDurationMS <= DAY_IN_MS) { - return date.toLocaleString('en-US', { - hour12: true, - hour: 'numeric', - month: 'numeric', - minute: 'numeric', - day: 'numeric', - }); - } - - if (viewportDurationMS <= MONTH_IN_MS) { - return date.toLocaleString('en-US', { - hour12: true, - hour: 'numeric', - year: 'numeric', - month: 'numeric', - day: 'numeric', - }); - } - - return date.toLocaleString('en-US', { - day: 'numeric', - month: 'numeric', - year: 'numeric', - }); - } - - if (resolution <= HOUR_IN_MS) { - return date.toLocaleString('en-US', { - hour: 'numeric', - day: 'numeric', - month: 'numeric', - hour12: true, - }); - } - - if (resolution < DAY_IN_MS) { - return date.toLocaleString('en-US', { - day: 'numeric', - month: 'numeric', - }); - } - - return date.toLocaleString('en-US', { - year: 'numeric', - month: 'numeric', - day: 'numeric', - }); -}; - -export const parseDuration = (duration: number | string): number => { - if (typeof duration === 'number') { - return duration; - } - - const parsedTime = parse(duration, 'ms'); - - // if duration is a string but we cannot parse it, we default to 10 mins. - return parsedTime != null ? parsedTime : 10 * MINUTE_IN_MS; -}; - -/** converts the TimeInNanos to milliseconds */ -export const toTimestamp = (time: TimeInNanos | undefined): number => - (time && - Math.floor( - (time.timeInSeconds || 0) * SECOND_IN_MS + - (time.offsetInNanos || 0) * NANO_SECOND_IN_MS - )) || - 0; - -// https://date-fns.org/v3.6.0/docs/Time-Zones#date-fns-tz -// converts an epoch date to a formatted string in a specific timeZone -export const formatDate = ( - dateTime: number, - options?: { timeZone?: string; pattern?: string } -) => { - const formatPattern = options?.pattern ?? DEFAULT_DATE_TIME; - - const userTimeZone = - options?.timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone; - - // Convert epoch time to a zoned date object - const zonedDate = utcToZonedTime(new Date(dateTime), userTimeZone); - - const formattedString = format(zonedDate, formatPattern, { - timeZone: userTimeZone, - }); - - return formattedString; -}; - // Based on echarts implementation: https://github.com/apache/echarts/blob/master/src/util/time.ts#L223C3-L223C31 // Based on https://github.com/apache/echarts/blob/master/src/util/time.ts#L33 default values export const getPatternForXAxisLabelForAnomalyChart = ( diff --git a/packages/react-components/stories/anomaly/anomaly-timezone.stories.tsx b/packages/react-components/stories/anomaly/anomaly-timezone.stories.tsx index dcc9c377d..a55c77405 100644 --- a/packages/react-components/stories/anomaly/anomaly-timezone.stories.tsx +++ b/packages/react-components/stories/anomaly/anomaly-timezone.stories.tsx @@ -2,7 +2,7 @@ import { type Meta, type StoryFn } from '@storybook/react'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { AnomalyChart } from '../../src/components/anomaly-chart'; import { MOCK_DATA_SOURCE_SUCCESS } from '../../src/components/anomaly-chart/tests/mockDataSources'; -import { queryClient } from '../../src/queries'; +import { queryClient } from '@iot-app-kit/component-core'; export default { title: 'Widgets/Anomaly', diff --git a/packages/react-components/stories/anomaly/anomaly.stories.tsx b/packages/react-components/stories/anomaly/anomaly.stories.tsx index 3b465ff67..d3b4ea634 100644 --- a/packages/react-components/stories/anomaly/anomaly.stories.tsx +++ b/packages/react-components/stories/anomaly/anomaly.stories.tsx @@ -3,7 +3,7 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { TimeSelection, TimeSync } from '../../src'; import { AnomalyChart } from '../../src/components/anomaly-chart'; import { MOCK_DATA_SOURCE_SUCCESS } from '../../src/components/anomaly-chart/tests/mockDataSources'; -import { queryClient } from '../../src/queries'; +import { queryClient } from '@iot-app-kit/component-core'; import { getEnvCredentials, getRegion } from '../utils/query'; import { ConnectedAnomalyChart } from './connected-anomaly-chart'; import { errorMockDatasource } from './mockData'; diff --git a/packages/react-components/stories/anomaly/mockData.ts b/packages/react-components/stories/anomaly/mockData.ts index 9cb310494..79b1eab94 100644 --- a/packages/react-components/stories/anomaly/mockData.ts +++ b/packages/react-components/stories/anomaly/mockData.ts @@ -1,5 +1,5 @@ import shuffle from 'lodash-es/shuffle'; -import { type AnomalyObjectDataSource } from '../../src/data'; +import { type AnomalyObjectDataSource } from '@iot-app-kit/component-core'; const randomValuePicker = ( initialValues = [0.1, 0.1, 0.15, 0.18, 0.22, 0.25] diff --git a/packages/react-components/stories/gauge/connected-gauge.stories.tsx b/packages/react-components/stories/gauge/connected-gauge.stories.tsx index 52c3f5602..6e0a413ca 100644 --- a/packages/react-components/stories/gauge/connected-gauge.stories.tsx +++ b/packages/react-components/stories/gauge/connected-gauge.stories.tsx @@ -42,7 +42,7 @@ export default { //TODO: Getting the data from token not working export const ConnectedGuage: ComponentStory = ({ settings }) => { - const hasAlarmIds = process.env.ALARM_COMPOSITE_MODEL_ID_1 !== null; + const hasAlarmIds = import.meta.env.VITE_ALARM_COMPOSITE_MODEL_ID_1 !== null; const { viewport } = useViewport(); if (!queryConfigured()) { return ( diff --git a/packages/react-components/stories/kpi/connected-kpi.stories.tsx b/packages/react-components/stories/kpi/connected-kpi.stories.tsx index aad9bd139..5d0cb29b9 100644 --- a/packages/react-components/stories/kpi/connected-kpi.stories.tsx +++ b/packages/react-components/stories/kpi/connected-kpi.stories.tsx @@ -22,7 +22,7 @@ export default { } as Meta; export const ConnectedKPIWidget = () => { - const hasAlarmIds = process.env.ALARM_COMPOSITE_MODEL_ID_1 !== null; + const hasAlarmIds = import.meta.env.VITE_ALARM_COMPOSITE_MODEL_ID_1 !== null; if (!queryConfigured()) { return ( diff --git a/packages/react-components/stories/queries/queriesBase.stories.tsx b/packages/react-components/stories/queries/queriesBase.stories.tsx index fc8bc0f92..a86f8f93c 100644 --- a/packages/react-components/stories/queries/queriesBase.stories.tsx +++ b/packages/react-components/stories/queries/queriesBase.stories.tsx @@ -6,17 +6,17 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { sub } from 'date-fns'; import { useEffect, useMemo, useState } from 'react'; import { TimeSelection, TimeSync, useViewport } from '../../src'; -import { useAlarms } from '../../src/hooks/useAlarms'; import { + useAlarms, queryClient, useDescribeAssetModelCompositeModel, useDescribeAssetProperty, useGetAssetPropertyValueHistory, -} from '../../src/queries'; -import { useHistoricalAssetPropertyValues } from '../../src/queries/useHistoricalAssetPropertyValues/useHistoricalAssetPropertyValues'; -import { useLatestAssetPropertyValues } from '../../src/queries/useLatestAssetPropertyValues/useLatestAssetPropertyValues'; -import { useSiteWiseAnomalyDataSource } from '../../src/queries/useSiteWiseAnomalyDataSource'; -import { isDurationViewport } from '../../src/utils/isDurationViewport'; + useHistoricalAssetPropertyValues, + useLatestAssetPropertyValues, + useSiteWiseAnomalyDataSource, + isDurationViewport, +} from '@iot-app-kit/component-core'; import { getEnvCredentials, getRegion } from '../utils/query'; const ASSET_MODEL_ID = '4c8e3da0-d3ec-4818-86b3-44a1e6b98531'; diff --git a/packages/react-components/stories/utils/query.ts b/packages/react-components/stories/utils/query.ts index 99bd0093c..85e5559f1 100644 --- a/packages/react-components/stories/utils/query.ts +++ b/packages/react-components/stories/utils/query.ts @@ -7,8 +7,8 @@ import { export const getEnvCredentials = () => { if ( - process.env.AWS_ACCESS_KEY_ID == null || - process.env.AWS_SECRET_ACCESS_KEY == null + import.meta.env.VITE_AWS_ACCESS_KEY_ID == null || + import.meta.env.VITE_AWS_SECRET_ACCESS_KEY == null ) { throw new Error( 'Missing credentials: must provide the following env variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN within .env' @@ -16,37 +16,37 @@ export const getEnvCredentials = () => { } return { // Provided by `.env` environment variable file - accessKeyId: process.env.AWS_ACCESS_KEY_ID, - secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, - sessionToken: process.env.AWS_SESSION_TOKEN, + accessKeyId: import.meta.env.VITE_AWS_ACCESS_KEY_ID, + secretAccessKey: import.meta.env.VITE_AWS_SECRET_ACCESS_KEY, + sessionToken: import.meta.env.VITE_AWS_SESSION_TOKEN, }; }; export const getRegion = () => { - if (process.env.AWS_REGION == null) { + if (import.meta.env.VITE_AWS_REGION == null) { throw new Error( 'Missing credentials: Must provide the following env variables: AWS_REGION' ); } - return process.env.AWS_REGION; + return import.meta.env.VITE_AWS_REGION; }; const getAssetQuery = () => { if ( - process.env.ASSET_ID_1 == null || - process.env.PROPERTY_ID_1 == null || - process.env.PROPERTY_ID_2 == null || - process.env.PROPERTY_ID_3 == null + import.meta.env.VITE_ASSET_ID_1 == null || + import.meta.env.VITE_PROPERTY_ID_1 == null || + import.meta.env.VITE_PROPERTY_ID_2 == null || + import.meta.env.VITE_PROPERTY_ID_3 == null ) { throw new Error( 'Missing configuration: Must provide the following env variables: ASSET_ID_1. PROPERTY_ID_1. PROPERTY_ID_2 and PROPERTY_ID_3' ); } return { - assetId: process.env.ASSET_ID_1, - propertyId1: process.env.PROPERTY_ID_1, - propertyId2: process.env.PROPERTY_ID_2, - propertyId3: process.env.PROPERTY_ID_3, + assetId: import.meta.env.VITE_ASSET_ID_1, + propertyId1: import.meta.env.VITE_PROPERTY_ID_1, + propertyId2: import.meta.env.VITE_PROPERTY_ID_2, + propertyId3: import.meta.env.VITE_PROPERTY_ID_3, }; }; @@ -87,12 +87,6 @@ export const getTimeSeriesDataQuery = ( aggregationType: 'AVERAGE', resolution: '1m', }, - { - refId: '3', - propertyId: '3179e83f-6d3b-41fd-b131-5f21ff01a7b3', - aggregationType: 'AVERAGE', - resolution: '1m', - }, ], }, ], @@ -133,7 +127,7 @@ export const getSingleValueAlarmDataQuery = ( } const { assetId } = getAssetQuery(); - const alarmId1 = process.env.ALARM_COMPOSITE_MODEL_ID_1; + const alarmId1 = import.meta.env.VITE_ALARM_COMPOSITE_MODEL_ID_1; if (!alarmId1) return getIotSiteWiseQuery().alarmData({}); @@ -156,6 +150,7 @@ export const getSingleValueAlarmDataQuery = ( export const queryConfigured = () => { try { + console.log(import.meta.env); getEnvCredentials(); getRegion(); getAssetQuery(); diff --git a/packages/resource-explorer/.dockerignore b/packages/resource-explorer/.dockerignore new file mode 100644 index 000000000..0dbcd2a51 --- /dev/null +++ b/packages/resource-explorer/.dockerignore @@ -0,0 +1,2 @@ +node_modules +**/node_modules \ No newline at end of file diff --git a/packages/resource-explorer/.env.example b/packages/resource-explorer/.env.example new file mode 100644 index 000000000..f9d0ba292 --- /dev/null +++ b/packages/resource-explorer/.env.example @@ -0,0 +1,9 @@ +AWS_ACCESS_KEY_ID=xxxxxxxxxx +AWS_SECRET_ACCESS_KEY=xxxxxxxxxx +AWS_SESSION_TOKEN=xxxxxxxxxx +AWS_REGION=xxxxxxxxxx + +ASSET_ID_1=xxxxxxxxxx +PROPERTY_ID_1=xxxxxxxxxx +PROPERTY_ID_2=xxxxxxxxxx +PROPERTY_ID_3=xxxxxxxxxx \ No newline at end of file diff --git a/packages/resource-explorer/.eslintignore b/packages/resource-explorer/.eslintignore new file mode 100755 index 000000000..c212b2f71 --- /dev/null +++ b/packages/resource-explorer/.eslintignore @@ -0,0 +1,5 @@ +dist +coverage +storybook-static +stencil-generated +test-results diff --git a/packages/resource-explorer/.eslintrc.cjs b/packages/resource-explorer/.eslintrc.cjs new file mode 100644 index 000000000..19b3d8024 --- /dev/null +++ b/packages/resource-explorer/.eslintrc.cjs @@ -0,0 +1,22 @@ +module.exports = { + root: true, + extends: [ + 'iot-app-kit', + 'plugin:react-hooks/recommended', + 'plugin:jsx-a11y/recommended', + ], + plugins: ['jsx-a11y'], + overrides: [ + { + // Disabling explicit any rule for graph-view component since types are defined in 3p component. + files: [ + '**/src/components/knowledge-graph/graph/graph-view.tsx', + '**/src/components/knowledge-graph/responseParser.tsx', + ], + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + }, + }, + ], +}; diff --git a/packages/resource-explorer/.storybook/global.scss b/packages/resource-explorer/.storybook/global.scss new file mode 100644 index 000000000..97d8f6b91 --- /dev/null +++ b/packages/resource-explorer/.storybook/global.scss @@ -0,0 +1,4 @@ +html, body, #root { + width: 100%; + height: 100%; +} diff --git a/packages/resource-explorer/.storybook/main.ts b/packages/resource-explorer/.storybook/main.ts new file mode 100644 index 000000000..787bf57aa --- /dev/null +++ b/packages/resource-explorer/.storybook/main.ts @@ -0,0 +1,21 @@ +import type { StorybookConfig } from '@storybook/react-vite'; +import dotenv from 'dotenv'; + +dotenv.config(); + +const config = { + stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'], + + addons: ['@storybook/addon-links', '@storybook/addon-essentials', 'storybook-dark-mode'], + + framework: '@storybook/react-vite', + + typescript: { + check: false, + reactDocgen: false, + }, + + docs: {}, +} satisfies StorybookConfig; + +export default config; diff --git a/packages/resource-explorer/.storybook/preview.js b/packages/resource-explorer/.storybook/preview.js new file mode 100644 index 000000000..f1d75d120 --- /dev/null +++ b/packages/resource-explorer/.storybook/preview.js @@ -0,0 +1,12 @@ +import '@iot-app-kit/charts/dist/styles.css'; +import './global.scss'; + +export const parameters = { + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, +}; +export const tags = ['autodocs']; diff --git a/packages/resource-explorer/CHANGELOG.md b/packages/resource-explorer/CHANGELOG.md new file mode 100644 index 000000000..fc097dcd9 --- /dev/null +++ b/packages/resource-explorer/CHANGELOG.md @@ -0,0 +1,2925 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [12.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.4.0...react-components-v12.5.0) (2025-02-03) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/core-util bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 12.4.0 to 12.5.0 + * devDependencies + * @iot-app-kit/core bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/source-iotsitewise bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/testing-util bumped from 12.4.0 to 12.5.0 + * @iot-app-kit/ts-config bumped from 12.4.0 to 12.5.0 + * eslint-config-iot-app-kit bumped from 12.4.0 to 12.5.0 + +## [12.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.3.0...react-components-v12.4.0) (2025-01-16) + + +### Features + +* add null/NaN support ([450fc70](https://github.com/awslabs/iot-app-kit/commit/450fc7080f11e908b9f2bf53218f674b9b9b6185)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/core-util bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 12.3.0 to 12.4.0 + * devDependencies + * @iot-app-kit/core bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/source-iotsitewise bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/testing-util bumped from 12.3.0 to 12.4.0 + * @iot-app-kit/ts-config bumped from 12.3.0 to 12.4.0 + * eslint-config-iot-app-kit bumped from 12.3.0 to 12.4.0 + +## [12.2.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.2.0...react-components-v12.2.1) (2024-12-03) + + +### Bug Fixes + +* helpers package resolution ([2939048](https://github.com/awslabs/iot-app-kit/commit/2939048c5dc5f49167f9058eb6e2e746f7d8485e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/core-util bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/source-iottwinmaker bumped from 12.2.0 to 12.2.1 + * devDependencies + * @iot-app-kit/core bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/source-iotsitewise bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/testing-util bumped from 12.2.0 to 12.2.1 + * @iot-app-kit/ts-config bumped from 12.2.0 to 12.2.1 + * eslint-config-iot-app-kit bumped from 12.2.0 to 12.2.1 + +## [12.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.1.0...react-components-v12.2.0) (2024-11-28) + + +### Features + +* improve prompt engering for assistant dashboard ([f3a1a24](https://github.com/awslabs/iot-app-kit/commit/f3a1a24c6d27f92cdd518527806289b8d53f3b91)) + + +### Bug Fixes + +* disable chatbot button when assistant is loading, improve error messages ([24e8dcb](https://github.com/awslabs/iot-app-kit/commit/24e8dcb805940bd3426029f8699e1b775582d2f2)) +* fix time series data hook reactivity ([4f307ff](https://github.com/awslabs/iot-app-kit/commit/4f307ffa3f9b6be60c2b34a86af5809f299700f2)) +* **react-components:** allow vertical legend reszing when title present on widget ([5734ceb](https://github.com/awslabs/iot-app-kit/commit/5734ceb8cc888486406ce1c69bdc7b302b78001f)) +* type-fest dep ([7afa99d](https://github.com/awslabs/iot-app-kit/commit/7afa99d2cc0d1a1565d30d52c8eaa94bbe9270af)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from * to 12.2.0 + * @iot-app-kit/core-util bumped from * to 12.2.0 + * @iot-app-kit/source-iottwinmaker bumped from * to 12.2.0 + * devDependencies + * @iot-app-kit/core bumped from * to 12.2.0 + * @iot-app-kit/source-iotsitewise bumped from * to 12.2.0 + * @iot-app-kit/testing-util bumped from * to 12.2.0 + * @iot-app-kit/ts-config bumped from * to 12.2.0 + * eslint-config-iot-app-kit bumped from * to 12.2.0 + +## [12.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v12.0.0...react-components-v12.1.0) (2024-11-20) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/core-util bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 12.0.0 to 12.1.0 + * devDependencies + * @iot-app-kit/core bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/jest-config bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/source-iotsitewise bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/testing-util bumped from 12.0.0 to 12.1.0 + * @iot-app-kit/ts-config bumped from 12.0.0 to 12.1.0 + * eslint-config-iot-app-kit bumped from 12.0.0 to 12.1.0 + +## [12.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v11.0.0...react-components-v12.0.0) (2024-11-18) + + +### Features + +* add a widget level loading indicator for x-y plot ([9be5617](https://github.com/awslabs/iot-app-kit/commit/9be5617aabe7a1edf88876406aeb1e83f174a288)) +* add anomaly query ([3c11512](https://github.com/awslabs/iot-app-kit/commit/3c115121db6fc8248bcd6b36989f6ebea3212ba7)) +* add data quality to kpi and status ([7248004](https://github.com/awslabs/iot-app-kit/commit/724800417bc8c74f518d6a39044c815848ef431f)) +* add gauge component in doc site package ([17a02f5](https://github.com/awslabs/iot-app-kit/commit/17a02f54ac811ab384aa6b8ad2dd4f61e0cc1514)) +* add step chart to l4e ([0983438](https://github.com/awslabs/iot-app-kit/commit/0983438c28ad7603e689697b0bd68cc10ce6fb50)) +* add threshold settings to KPI ([2fa0429](https://github.com/awslabs/iot-app-kit/commit/2fa0429b6262092b4b3c86c21b8808b90e2d49fe)) +* add timezone converter util ([e5d59c4](https://github.com/awslabs/iot-app-kit/commit/e5d59c43803a03413e77556f6ca4179b18ecb3d7)) +* added a label time range for viewport picker in dashboard header [#2559](https://github.com/awslabs/iot-app-kit/issues/2559) ([743cb80](https://github.com/awslabs/iot-app-kit/commit/743cb80ec36d116d6ef25e97ec54f2238ddb2ea1)) +* added accessible labels to different toolbar container [#2510](https://github.com/awslabs/iot-app-kit/issues/2510) ([ce5af6f](https://github.com/awslabs/iot-app-kit/commit/ce5af6fbc6e6b887f3fade9395bcbf54da386a88)) +* added data quality icon and text next to value in table [#2664](https://github.com/awslabs/iot-app-kit/issues/2664) ([91cd12f](https://github.com/awslabs/iot-app-kit/commit/91cd12f9e73fa5c77ab8e7209376116f4307526b)) +* added support for border theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([66e6680](https://github.com/awslabs/iot-app-kit/commit/66e6680fbea3f005aba7239c3c47bf13e5184462)) +* added viewport timestamps in xy plot [#2470](https://github.com/awslabs/iot-app-kit/issues/2470) ([46c1d24](https://github.com/awslabs/iot-app-kit/commit/46c1d24b99ff2ca9fb990ceed341ad6820c21f01)) +* adding timezone support to dashboard/widgets ([6435b90](https://github.com/awslabs/iot-app-kit/commit/6435b90d93246e319b939b7c316c6ffbea12ef8d)) +* **anomaly-chart:** added `gestures` enablement option ([4c2402c](https://github.com/awslabs/iot-app-kit/commit/4c2402c44a5c3538fdc60fe8210b626670073479)) +* changed ui experience of chart legend based on legend position [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([de1f147](https://github.com/awslabs/iot-app-kit/commit/de1f14772b614f67156a34ac64300111a6c55126)) +* chart legend support px rem em % unit type ([4e023e6](https://github.com/awslabs/iot-app-kit/commit/4e023e6c4a735189e2db04de886555a0199087b2)) +* chat legend enhancement [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([b1ca8ae](https://github.com/awslabs/iot-app-kit/commit/b1ca8aeda126f09f371e23133fa600d5b56c9b21)) +* conditionally display latest value in legend table [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([d3feb29](https://github.com/awslabs/iot-app-kit/commit/d3feb2920f3c63b0b2ce9580fc07a86475fc1ff1)) +* customize gauge in dashboard config ([8af089e](https://github.com/awslabs/iot-app-kit/commit/8af089e94a2c11cab1c9473d384ed241da7f6461)) +* **dashboard:** add colors to trendcursors ([a890c7d](https://github.com/awslabs/iot-app-kit/commit/a890c7db39df1a836312ac4050c41e2f4fdd9f4a)) +* **dashboard:** add new RE components to dynamic assets tab ([c588848](https://github.com/awslabs/iot-app-kit/commit/c5888485c3205c7ee572ec01d6f0b34d1789da23)) +* **dashboard:** default viewport setting ([0c3f3ef](https://github.com/awslabs/iot-app-kit/commit/0c3f3efa3a48be537d0eed0e6a1a02ecaa7c1f03)) +* **dashboard:** use new RE components to update dashboard RE for modeled and unmodeled data ([d7db11e](https://github.com/awslabs/iot-app-kit/commit/d7db11ee7c16dd012b7ced86dc52cde9a483e24e)) +* display assetname conditionally in legend [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([c4c443f](https://github.com/awslabs/iot-app-kit/commit/c4c443fab77d6e337d32fbecebb308c7f339fab5)) +* display legend unit conditionally [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([9f6440e](https://github.com/awslabs/iot-app-kit/commit/9f6440e9e06c9040a6be46eab3a9141ad02a0509)) +* first click on paginate timeline should move backward from current time duration ([5f9aa42](https://github.com/awslabs/iot-app-kit/commit/5f9aa42aef52d1bade596d0b8cfa1d58d51cce52)) +* gauge widget to dashboard ([17cde64](https://github.com/awslabs/iot-app-kit/commit/17cde64259ab6b69beec2f2de4eaca9750504a5c)) +* guage component data quality and error text ([2dca188](https://github.com/awslabs/iot-app-kit/commit/2dca1889462a6002980b105ae5338265c187b502)) +* guage component initail commit ([305657a](https://github.com/awslabs/iot-app-kit/commit/305657a7aa761883da7a9839d0ae0a3914751a51)) +* kpi and status gated config panel ([1f56b4f](https://github.com/awslabs/iot-app-kit/commit/1f56b4f2e7212ddfcc216fb778e0d4db57309ab2)) +* l4e table ([5bd6898](https://github.com/awslabs/iot-app-kit/commit/5bd68983268d00ff60bf0434e5b810e52254c16c)) +* l4e timeline (mock data only) ([829496c](https://github.com/awslabs/iot-app-kit/commit/829496cd0f51fb4131b5a081c8ecc7d17763b5be)) +* legend resize ([792b617](https://github.com/awslabs/iot-app-kit/commit/792b6170cc19402f3c49fbd60e4a07dc0890c434)) +* legend table is implemeted using tanstack table ([c92533a](https://github.com/awslabs/iot-app-kit/commit/c92533a342c95618d6dcf7d2a13bdad204bb01de)) +* lint accessibility ([0db36ef](https://github.com/awslabs/iot-app-kit/commit/0db36ef6a07fe5e0709d17081dffa7d23669e2fe)) +* new design status (gated) ([69d6c97](https://github.com/awslabs/iot-app-kit/commit/69d6c979d1baefd4fd486cf0d1402b7357e8506b)) +* new KPI and update tests ([328e41a](https://github.com/awslabs/iot-app-kit/commit/328e41ae6f1b25c743a16f03d966a5b97408455a)) +* onViewportChange and currentViewport ([d63c9e3](https://github.com/awslabs/iot-app-kit/commit/d63c9e3a416e78a78b3a453755be39a6879eb07c)) +* **react-components:** add arrow datasource ([efb0d6d](https://github.com/awslabs/iot-app-kit/commit/efb0d6d01549011e57400c6b48033264a7e122c9)) +* **react-components:** add auto resolution and batching ([073029f](https://github.com/awslabs/iot-app-kit/commit/073029f4312c988bf099251284bf63d9515e01fd)) +* **react-components:** add axis option to anomaly widget ([d0733e1](https://github.com/awslabs/iot-app-kit/commit/d0733e12863f4ee2db1e29576c8ea6b1d5964f62)) +* **react-components:** add data quality to xy-plot ([ed18e0d](https://github.com/awslabs/iot-app-kit/commit/ed18e0d891035803dfc0cc646371ae1e20914d2a)) +* **react-components:** add hook for get asset property value history ([c708b4a](https://github.com/awslabs/iot-app-kit/commit/c708b4a6c2c3e9d6e843829692a2046c00ee6950)) +* **react-components:** add hook for latest asset property value ([ce9ec7c](https://github.com/awslabs/iot-app-kit/commit/ce9ec7c714e6c600da59af8f4bffaf210f0041c0)) +* **react-components:** add intl ([c7c30c3](https://github.com/awslabs/iot-app-kit/commit/c7c30c3f969c71de6856d98d59e1043a6c785a45)) +* **react-components:** add l4e datasource ([748f8c1](https://github.com/awslabs/iot-app-kit/commit/748f8c17d56bbef0f2190fde38b5717c29d1d942)) +* **react-components:** add l4e queries ([328da8e](https://github.com/awslabs/iot-app-kit/commit/328da8ed9341c68c8c0a3a6b672170f1fa8eeb37)) +* **react-components:** add max column to legend ([322c20f](https://github.com/awslabs/iot-app-kit/commit/322c20f0d438ecb45ee02fae186f6a198963c5b6)) +* **react-components:** add min column to legend ([69ba923](https://github.com/awslabs/iot-app-kit/commit/69ba92324da42770e267c9a0bce717ebf1ca0dbf)) +* **react-components:** add useLatestAlarmPropertyValue hook to fetch alarm prop vals in useAlarms ([18aa854](https://github.com/awslabs/iot-app-kit/commit/18aa8548bbc9aa9d4343a1d85b3cefdb798e1b25)) +* **react-components:** calculate min/max and store value in store for chart to consume ([41b8551](https://github.com/awslabs/iot-app-kit/commit/41b855103e6643dd79e6e0fc9e7350fddefd9101)) +* **react-components:** hide/show properties from legend ([e666cf1](https://github.com/awslabs/iot-app-kit/commit/e666cf1cfba8343d1a5bbb0f38a4341969a18575)) +* **react-components:** implement request functions and hooks to build clients ([2ca7e6c](https://github.com/awslabs/iot-app-kit/commit/2ca7e6caf771bd929b993d79f91f6e7d3ce21350)) +* **react-components:** initiali implementation for useTimeSeriesData ([50db88f](https://github.com/awslabs/iot-app-kit/commit/50db88f309e6470bfc510824f6deb564c949b794)) +* **react-components:** l4e anomaly tests ([fbff596](https://github.com/awslabs/iot-app-kit/commit/fbff5968b7ddb406fa0eaaa21b84489010d55591)) +* **react-components:** trendcurors using echarts extension ([a7c6bbe](https://github.com/awslabs/iot-app-kit/commit/a7c6bbe064ae746f024b74d885721a70a06716a2)) +* **react-components:** useAlarms hook ([7103db6](https://github.com/awslabs/iot-app-kit/commit/7103db640cd1531823a51fe3277691c869b581ed)) +* **react-components:** useDescribeAssets and useDescribeAssetModels queries implemented ([bfb07e1](https://github.com/awslabs/iot-app-kit/commit/bfb07e16b1fceabdd676ebdb833c4d85baaafb0d)) +* **react-components:** y axis and timestamp options ([bfe2520](https://github.com/awslabs/iot-app-kit/commit/bfe2520a731dc6ea24d0ad928084546d45ed8643)) +* resource explorers ([f604b15](https://github.com/awslabs/iot-app-kit/commit/f604b15dd35e014e78e1f56fd666602767e6b5bd)) +* **ResourceExplorer:** hide properties table when not needed to be displayed ([0fca5e9](https://github.com/awslabs/iot-app-kit/commit/0fca5e9089ac7af52e1d31b2143acb121cb7869b)) +* show/hide aggregation and resolution in KPI ([aef1f14](https://github.com/awslabs/iot-app-kit/commit/aef1f146c6d4db03d759b76896d78e966b1ce1e6)) +* **sitewise-alarms:** add useAlarmModels hook to fetch iot events alarm models in useAlarms ([c4c4986](https://github.com/awslabs/iot-app-kit/commit/c4c4986fde3fd65d7ca7e8b1f7a364fcc079ca10)) +* support theming using cloudscape mechanism [#2667](https://github.com/awslabs/iot-app-kit/issues/2667) ([c342310](https://github.com/awslabs/iot-app-kit/commit/c3423101f4f60410d2168a2605fadeb3c6c2d5bc)) +* updated KPI style (gated) ([31ea2f3](https://github.com/awslabs/iot-app-kit/commit/31ea2f371676be9b6412073772b9110b01c42786)) +* updated the theming support for kpi and tc [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([d32a018](https://github.com/awslabs/iot-app-kit/commit/d32a0184518ef02222ef15359d49bccb68f6ee39)) +* user selected dashboard refresh-rate ([1c1256d](https://github.com/awslabs/iot-app-kit/commit/1c1256da83c938037a47e930c127c2bf3bc14e90)) +* widget tool box on mouse hover and selection state ([c80d42a](https://github.com/awslabs/iot-app-kit/commit/c80d42a3d10223d0d7edd5b3ee1b23c9ab613399)) +* **widgets:** add name style settings for line/table + edit label in config panel ([f5e9b3f](https://github.com/awslabs/iot-app-kit/commit/f5e9b3fc99a176b3d9eb54ef0a387d171791aaf9)) +* xy-plot y axis lable changes [#2378](https://github.com/awslabs/iot-app-kit/issues/2378) ([48389c3](https://github.com/awslabs/iot-app-kit/commit/48389c3e59305525b11b63233c3a79d4a8e3a78d)) + + +### Bug Fixes + +* add default settings to charts ([5917c83](https://github.com/awslabs/iot-app-kit/commit/5917c83674ffe67ced2bc7fe18c226460c115e80)) +* add missing loading indication for widget values ([d90f9a6](https://github.com/awslabs/iot-app-kit/commit/d90f9a68e63b6280c1fb1187b8b34853fc2047ec)) +* add signigicant digits to xy plot ([70a109e](https://github.com/awslabs/iot-app-kit/commit/70a109e8083b6729313f4f0dc362df0f3cf6ea62)) +* add trailing zeros to decimal point rounding, fix rounding function ([9c13177](https://github.com/awslabs/iot-app-kit/commit/9c131779c5a3f5b2ce7c6d1239e54ed82bfbf572)) +* better handling of light and dark mode w thresholds ([bd70051](https://github.com/awslabs/iot-app-kit/commit/bd70051944a9a21e21479f4793614f85a4716b2b)) +* chart gesture icons overlap on mouse hover ([b5e5c0d](https://github.com/awslabs/iot-app-kit/commit/b5e5c0d6115ed8eb9d819a9b4ceef31c7b56db2b)) +* **dashboard:** add descriptions to all RE tables ([f7b4f0c](https://github.com/awslabs/iot-app-kit/commit/f7b4f0c89d8b05be988acac54b8edf35ab3b7367)) +* **dashboard:** add descriptions to all tables in RE ([c7aff00](https://github.com/awslabs/iot-app-kit/commit/c7aff00ea0d6175186317f06ca7eec4c550de7a0)) +* **dashboard:** add timezone support for new RE ([2d4b5dd](https://github.com/awslabs/iot-app-kit/commit/2d4b5ddcbdefe4828168a7864bd679744e5a97eb)) +* **dashboard:** adds resolution and aggregation to new proeprty in gauge widget ([5f5af30](https://github.com/awslabs/iot-app-kit/commit/5f5af3068defeb2a609e68ca0d29cc09f9960cfd)) +* **dashboard:** decimal places fixes ([710a6ae](https://github.com/awslabs/iot-app-kit/commit/710a6aeee8e16fbf7f204d9214dbd8c86fce16e2)) +* **dashboard:** fast follow to clean up messy code for table cell render ([649f75d](https://github.com/awslabs/iot-app-kit/commit/649f75d91bd4865d94db633ecd3fb865098fc1ff)) +* **dashboard:** fix flaky test in dashboard ([6fe3285](https://github.com/awslabs/iot-app-kit/commit/6fe328510bfd4ed36a24935085aa41ac0c83dfa5)) +* **dashboard:** label matches kpi name ([f675d11](https://github.com/awslabs/iot-app-kit/commit/f675d11857c0b0a3869d03d9c1339c405a85d11e)) +* **dashboard:** re reflects significant digits + timezone support for unmodeled ([195be67](https://github.com/awslabs/iot-app-kit/commit/195be67fe0e5b7ef7b262491ff4fec574c62db8c)) +* datastream not show unit if it's undefined [#2660](https://github.com/awslabs/iot-app-kit/issues/2660) ([7418773](https://github.com/awslabs/iot-app-kit/commit/7418773d7a39ef978ad3663e12fcf87082767f54)) +* fix bugs on l4e widget ([17a4896](https://github.com/awslabs/iot-app-kit/commit/17a489631da778b13fcb194b8bd527874e9e2858)) +* fix data-zoom behavior for base chart ([0c66a80](https://github.com/awslabs/iot-app-kit/commit/0c66a8016e2aa827ad3093c3ef89d6437e014d18)) +* fix filtered data on zooms ([99e2f90](https://github.com/awslabs/iot-app-kit/commit/99e2f90aecdbaaa354e62e76b22c88a8530c1509)) +* hidden and highlighted datastreams persist correctly ([5a85bb7](https://github.com/awslabs/iot-app-kit/commit/5a85bb7d40d07dce439a1bfa15550d8893089cbd)) +* **imports:** move luxon dependency to right package ([31235da](https://github.com/awslabs/iot-app-kit/commit/31235da4b31e49ec0fc0f1ec21f649cf7af7e253)) +* improved zoom and default values for y axis ([112e5c5](https://github.com/awslabs/iot-app-kit/commit/112e5c58d7e3478dec03dfbb2eb52ec315b4690d)) +* internal pipeline has issues with lfs, reverting ([968f950](https://github.com/awslabs/iot-app-kit/commit/968f95005c51591d7cb99af323808fd232b8d4e9)) +* l4e bug fixes ([a71673c](https://github.com/awslabs/iot-app-kit/commit/a71673c9fbc701a5e26ed8d8c9bda191bc9b9285)) +* l4e code clean up ([ad19b6c](https://github.com/awslabs/iot-app-kit/commit/ad19b6c68c515182454d9132629f2736f5fa4988)) +* l4e widget quick fixes ([286f724](https://github.com/awslabs/iot-app-kit/commit/286f7244ac501ffc877dd0e0d40d76e97ab98bda)) +* make context menu appear on top of chart tooltip ([e1622c8](https://github.com/awslabs/iot-app-kit/commit/e1622c86bf4ead6856e7e1c9be1d5b8a1d6d4d61)) +* migrated tooltip css to styled component for customizing theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([515ad24](https://github.com/awslabs/iot-app-kit/commit/515ad2478abf20a9490ac725ee80ce7cc6ae111f)) +* min max is sortable and not present on widget add ([7578a2e](https://github.com/awslabs/iot-app-kit/commit/7578a2e113221b2d3c00c01d2ede253e7ce07081)) +* min/max values have correct significant digits ([50e183d](https://github.com/awslabs/iot-app-kit/commit/50e183d240ecf329362e10d21b9864d08cb525ee)) +* move data quality widget on gauge to be closer to value ([d20b65f](https://github.com/awslabs/iot-app-kit/commit/d20b65f5704ffd5d56c4f402877be72d59adcadd)) +* pass in refresh rate through the query instead of props ([b6df585](https://github.com/awslabs/iot-app-kit/commit/b6df5856b4407c74d4746d12a1781d11976f9948)) +* **react components:** updating import for popper.js ([00c1707](https://github.com/awslabs/iot-app-kit/commit/00c17078163cc2ef48a8eb6e370652ca9823e8e2)) +* react-component Chart story book is broken ([c273ad5](https://github.com/awslabs/iot-app-kit/commit/c273ad529a7d78f887a2b8c64b50f76bfc018fc2)) +* **react-components:** add error state ([e16671f](https://github.com/awslabs/iot-app-kit/commit/e16671f11bbae4b768220b93b8cae0fe9ffee9c3)) +* **react-components:** add snapshot tests ([178f0e7](https://github.com/awslabs/iot-app-kit/commit/178f0e7bbba316c711ff7c8fc18455cdccf939fb)) +* **react-components:** add timezone to anomaly chart ([5379bd1](https://github.com/awslabs/iot-app-kit/commit/5379bd19d0d47e62f42a19230e9cf52e2a715d95)) +* **react-components:** anomaly chart move loading state ([581a3c5](https://github.com/awslabs/iot-app-kit/commit/581a3c57734ba460ced0e32e232ed38583f232ba)) +* **react-components:** anomaly chart timestamp padding ([b376bf4](https://github.com/awslabs/iot-app-kit/commit/b376bf4861f58bd5489c907d2ae72107a2178eb3)) +* **react-components:** anomaly chart xaxis formatting ([740ee2a](https://github.com/awslabs/iot-app-kit/commit/740ee2a0ecbbe29c43a02fd04c0193935d79dd0e)) +* **react-components:** anomaly widget error and empty states ([2d70b79](https://github.com/awslabs/iot-app-kit/commit/2d70b79467fe94621dd722bb95e7f52c21b477f2)) +* **react-components:** center error ([12da428](https://github.com/awslabs/iot-app-kit/commit/12da428c354b999a8dc350e3811cd9f3a44ef782)) +* **react-components:** clear ymin and ymax was getting emitted on every loop ([8609a48](https://github.com/awslabs/iot-app-kit/commit/8609a487a1b7ba9d4884750a6e6ee8819873a4b1)) +* **react-components:** comment out flaky resource expl tests ([ca1039d](https://github.com/awslabs/iot-app-kit/commit/ca1039dc5c66cd30cc578651184463c889febd83)) +* **react-components:** confining tootip to the chart area ([1bff986](https://github.com/awslabs/iot-app-kit/commit/1bff986999dc88a261caed22c3a77aab892219ad)) +* **react-components:** do not use decimal places setting in y axis ([f9fbf74](https://github.com/awslabs/iot-app-kit/commit/f9fbf74311af528b89ad34333b36508eeb3d9ae5)) +* **react-components:** ensure anomaly chart colors are in order ([3fd8d87](https://github.com/awslabs/iot-app-kit/commit/3fd8d87c2dee6615a7e22962c0d8dbd0cfff97c0)) +* **react-components:** ensure chart uses initial passed in viewport ([0b17318](https://github.com/awslabs/iot-app-kit/commit/0b173182adb4180ca0065b4238549cd30a0af3d2)) +* **react-components:** ensure enabled flag is never undefined for queries ([eb95ef4](https://github.com/awslabs/iot-app-kit/commit/eb95ef4e8f186f5f969e366321f01d9ab1ea1ab8)) +* **react-components:** export anomaly chart ([30ae675](https://github.com/awslabs/iot-app-kit/commit/30ae675d92acd26d0414f6aa2da953bc0b37d5e7)) +* **react-components:** filter out non anomalous data ([70f0a1c](https://github.com/awslabs/iot-app-kit/commit/70f0a1cdbada92336d9597c6e2a5f456896a15f5)) +* **react-components:** fix chart flickering and bugginess in live mode ([3cc3b41](https://github.com/awslabs/iot-app-kit/commit/3cc3b41d59d5c799b750eb76d809007b30dfe2a8)) +* **react-components:** fix error state display ([dead60a](https://github.com/awslabs/iot-app-kit/commit/dead60a175b236b4d74d1ca65a882821c5e49e26)) +* **react-components:** fix get value history request ([a701ef4](https://github.com/awslabs/iot-app-kit/commit/a701ef48519807612715eaf2714f3eb6a306de05)) +* **react-components:** fix global and chart store persistence ([83f1345](https://github.com/awslabs/iot-app-kit/commit/83f13452cbf350639cc2cc576d47a26138d58832)) +* **react-components:** fix passed in viewport for anomaly widget ([f73fafc](https://github.com/awslabs/iot-app-kit/commit/f73fafcd5dfdf7238f69848f1808fbbb0b17f281)) +* **react-components:** fix support for anomaly datasource outside of time sync ([d45cc6b](https://github.com/awslabs/iot-app-kit/commit/d45cc6b45adb67b8bc44b975a2a65c5942f0d746)) +* **react-components:** fix the mouse events ([7c07a37](https://github.com/awslabs/iot-app-kit/commit/7c07a37eb5e8649a6d967c96b297659caad270a8)) +* **react-components:** gauge properly shows property name again ([ddb65c6](https://github.com/awslabs/iot-app-kit/commit/ddb65c6304c473e01e0c7ae3e868eba98923574c)) +* **react-components:** gauge thresholds ([8e3bec3](https://github.com/awslabs/iot-app-kit/commit/8e3bec3f6058c9c96ac42439c1b33b90a0d3912e)) +* **react-components:** gauge thresholds with negative ranges ([2100221](https://github.com/awslabs/iot-app-kit/commit/21002216dc53230e95762ac3f46734ab90d8d1f6)) +* **react-components:** gestures prop works ([6141c32](https://github.com/awslabs/iot-app-kit/commit/6141c3234095c658240e528207cdcbe3ff6e2d62)) +* **react-components:** improve axis styling and add labels ([490058f](https://github.com/awslabs/iot-app-kit/commit/490058fbdb9ca102ca85abc2ff5770caafa52a71)) +* **react-components:** improve gauge thresholds ([09b352f](https://github.com/awslabs/iot-app-kit/commit/09b352f9a255cf3fb04f8c0382a8013db0f1ae35)) +* **react-components:** lowered min/max throttle to match TC throttle ([e972b1b](https://github.com/awslabs/iot-app-kit/commit/e972b1bfe89a25094b9884c38afd2ac7faa35c5c)) +* **react-components:** make anomaly chart responsive ([4b31b8c](https://github.com/awslabs/iot-app-kit/commit/4b31b8cece18f1a1e1e91447c31ca79ec0b3867f)) +* **react-components:** minor anomaly widget style changes ([19fc67a](https://github.com/awslabs/iot-app-kit/commit/19fc67a7768604d39c728ea4e1df8f318042d8b8)) +* **react-components:** performance fixes for chart component ([403f2bf](https://github.com/awslabs/iot-app-kit/commit/403f2bf6beea75e1e1668e33c60a6149ef1b5436)) +* **react-components:** refactor chart to use dataset ([b403789](https://github.com/awslabs/iot-app-kit/commit/b4037897cd4e7169958373bbf61d29c7454706ef)) +* **react-components:** refactor legend table into modules ([f5eed70](https://github.com/awslabs/iot-app-kit/commit/f5eed7068b70ae9305782f07b08115294b26a3b7)) +* **react-components:** remove data points after a threshold ([cd6a189](https://github.com/awslabs/iot-app-kit/commit/cd6a18913d2c0f3fb8b066dffbdf48f38d6955e4)) +* **react-components:** remove flaky test in new RE ([9e15637](https://github.com/awslabs/iot-app-kit/commit/9e15637ecced497aec52a7189fc1e0adcf1de361)) +* **react-components:** remove padded y axis code ([7e3d365](https://github.com/awslabs/iot-app-kit/commit/7e3d365d07dd4b074c6dda6d2934b7cb05fcde55)) +* **react-components:** remove secondary selection state when using TCs or gestures ([3ba4e6a](https://github.com/awslabs/iot-app-kit/commit/3ba4e6a1cc0c2a7fd48eb130f3b72262fcd97ad5)) +* **react-components:** skip flaky test in new RE ([e7928d3](https://github.com/awslabs/iot-app-kit/commit/e7928d329edef47871ed9978d820994ad2d76dcc)) +* **react-components:** support nanoseconds for datapoints ([34d2dff](https://github.com/awslabs/iot-app-kit/commit/34d2dff489ff77d9eb9226443218b4c7cf725ff2)) +* **react-components:** thresholds properly add and remove series ([bb8e451](https://github.com/awslabs/iot-app-kit/commit/bb8e451fbb4ed57a204b9936cf2e1c8853931c60)) +* **react-components:** timestamp bar correct date ([2063935](https://github.com/awslabs/iot-app-kit/commit/20639352a433cea9abfceee439f7aa9c36db05b9)) +* **react-components:** trendcursor hotkey indicates addition state ([c9d34e0](https://github.com/awslabs/iot-app-kit/commit/c9d34e0ef4ba891522336f05718d1808442949e3)) +* **react-components:** update date-fns dependency ([1267b65](https://github.com/awslabs/iot-app-kit/commit/1267b6583034f17b14b8ca1de52125640bfdf3ea)) +* **react-components:** updates for x-axis panning performance ([07a7624](https://github.com/awslabs/iot-app-kit/commit/07a7624d77962c38e7457abea1602082ebf2f5a3)) +* **react-components:** viewport fixes ([b5846ed](https://github.com/awslabs/iot-app-kit/commit/b5846edf5c795c2bccdfee2a71d6b65f44dd56e5)) +* **react-components:** zoom icons ([4da01df](https://github.com/awslabs/iot-app-kit/commit/4da01df378b1d3e2804c4802bd9250c7e180990f)) +* refresh rate defined in dashboard and on query ([43cc5e4](https://github.com/awslabs/iot-app-kit/commit/43cc5e437543aed60663620655044cba9437a226)) +* relative month test ([5c6e262](https://github.com/awslabs/iot-app-kit/commit/5c6e262b16b8a739c4a4d9e823453094242c67d9)) +* remove duplicate constants and types ([45c155b](https://github.com/awslabs/iot-app-kit/commit/45c155b414a29c767e276060f1c60ce8401ea456)) +* remove fetchMostRecentBeforeStart from status and kpi ([f9b3183](https://github.com/awslabs/iot-app-kit/commit/f9b3183ce5e52462f5120362a130b4aea6588671)) +* removed tanstack table related code ([c8be85d](https://github.com/awslabs/iot-app-kit/commit/c8be85d919faac44441f4b00aa81ac7dbf215599)) +* **resource-explorer:** only use alias to query if present ([ca35aee](https://github.com/awslabs/iot-app-kit/commit/ca35aee4cdd31c79302c282d5965911df6d0b6f5)) +* sort and pagination colors ([4dd6bb9](https://github.com/awslabs/iot-app-kit/commit/4dd6bb94198cd4c40fb1bde2d0b350c97d4ec540)) +* table resize button aria label ([1618d50](https://github.com/awslabs/iot-app-kit/commit/1618d50a713cb1be8b9a74899144ca92cd9ec5f1)) +* **timeZone:** wrap timezone setState in useEffect ([6cd74a1](https://github.com/awslabs/iot-app-kit/commit/6cd74a1019499b8d6586cac0d26d605cdcd9c928)) +* tooltip styled component issue is fixed ([5af6e22](https://github.com/awslabs/iot-app-kit/commit/5af6e2285cfc2e346e417e13f305f3a0a0c05439)) +* update data quality UX to match mocks ([ed62846](https://github.com/awslabs/iot-app-kit/commit/ed628461c0dd582ae2f03f06b81c8d25aab3832c)) +* update react-components public API for status and kpi widgets ([5e7bd49](https://github.com/awslabs/iot-app-kit/commit/5e7bd49fc6ae36fbdbd85e8c02bbb0b4ac082346)) +* updated the new set of design tokens [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([7bdb8b0](https://github.com/awslabs/iot-app-kit/commit/7bdb8b08db1dcdc06153d71eff191a5e5a93a48b)) +* updated theming support for buttons [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([1ffead0](https://github.com/awslabs/iot-app-kit/commit/1ffead0805048445b677f4cd63a31af7d5912095)) +* updates for performance issues ([8863b9a](https://github.com/awslabs/iot-app-kit/commit/8863b9a80d7a8284aa4732ed25298d165a769ea9)) +* use datastream id as legend table row key ([b4c11bc](https://github.com/awslabs/iot-app-kit/commit/b4c11bcd40400d4f7eae680d5ab521f00b638f64)) +* yAxis label collides with yAxis name [#2471](https://github.com/awslabs/iot-app-kit/issues/2471) ([85ac6ac](https://github.com/awslabs/iot-app-kit/commit/85ac6ac4586d560e44cadedbffe5b1a187bd8bb8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from * to 12.0.0 + * @iot-app-kit/core-util bumped from * to 12.0.0 + * @iot-app-kit/source-iottwinmaker bumped from * to 12.0.0 + * devDependencies + * @iot-app-kit/core bumped from * to 12.0.0 + * @iot-app-kit/jest-config bumped from * to 12.0.0 + * @iot-app-kit/source-iotsitewise bumped from * to 12.0.0 + * @iot-app-kit/testing-util bumped from * to 12.0.0 + * @iot-app-kit/ts-config bumped from * to 12.0.0 + * eslint-config-iot-app-kit bumped from * to 12.0.0 + +## [10.13.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.13.0...react-components-v10.13.1) (2024-10-16) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/core bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/core-util bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.13.0 to 10.13.1 + * devDependencies + * @iot-app-kit/core bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/jest-config bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/source-iotsitewise bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/testing-util bumped from 10.13.0 to 10.13.1 + * @iot-app-kit/ts-config bumped from 10.13.0 to 10.13.1 + * eslint-config-iot-app-kit bumped from 10.13.0 to 10.13.1 + +## [10.13.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.12.2...react-components-v10.13.0) (2024-10-10) + + +### Bug Fixes + +* **imports:** move luxon dependency to right package ([31235da](https://github.com/awslabs/iot-app-kit/commit/31235da4b31e49ec0fc0f1ec21f649cf7af7e253)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/core bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/core-util bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.12.2 to 10.13.0 + * devDependencies + * @iot-app-kit/core bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/jest-config bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/source-iotsitewise bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/testing-util bumped from 10.12.2 to 10.13.0 + * @iot-app-kit/ts-config bumped from 10.12.2 to 10.13.0 + * eslint-config-iot-app-kit bumped from 10.12.2 to 10.13.0 + +## [10.12.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.12.1...react-components-v10.12.2) (2024-09-17) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/core bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/core-util bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/source-iottwinmaker bumped from 10.12.1 to 10.12.2 + * devDependencies + * @iot-app-kit/core bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/jest-config bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/source-iotsitewise bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/testing-util bumped from 10.12.1 to 10.12.2 + * @iot-app-kit/ts-config bumped from 10.12.1 to 10.12.2 + * eslint-config-iot-app-kit bumped from 10.12.1 to 10.12.2 + +## [10.12.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.12.0...react-components-v10.12.1) (2024-09-14) + + +### Bug Fixes + +* **resource-explorer:** only use alias to query if present ([ca35aee](https://github.com/awslabs/iot-app-kit/commit/ca35aee4cdd31c79302c282d5965911df6d0b6f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/core bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/core-util bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.12.0 to 10.12.1 + * devDependencies + * @iot-app-kit/core bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/jest-config bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/source-iotsitewise bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/testing-util bumped from 10.12.0 to 10.12.1 + * @iot-app-kit/ts-config bumped from 10.12.0 to 10.12.1 + * eslint-config-iot-app-kit bumped from 10.12.0 to 10.12.1 + +## [10.12.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.11.0...react-components-v10.12.0) (2024-09-13) + + +### Features + +* adding timezone support to dashboard/widgets ([6435b90](https://github.com/awslabs/iot-app-kit/commit/6435b90d93246e319b939b7c316c6ffbea12ef8d)) +* **dashboard:** add new RE components to dynamic assets tab ([c588848](https://github.com/awslabs/iot-app-kit/commit/c5888485c3205c7ee572ec01d6f0b34d1789da23)) +* **dashboard:** use new RE components to update dashboard RE for modeled and unmodeled data ([d7db11e](https://github.com/awslabs/iot-app-kit/commit/d7db11ee7c16dd012b7ced86dc52cde9a483e24e)) +* **react-components:** add auto resolution and batching ([073029f](https://github.com/awslabs/iot-app-kit/commit/073029f4312c988bf099251284bf63d9515e01fd)) +* **react-components:** add hook for get asset property value history ([c708b4a](https://github.com/awslabs/iot-app-kit/commit/c708b4a6c2c3e9d6e843829692a2046c00ee6950)) +* **react-components:** add hook for latest asset property value ([ce9ec7c](https://github.com/awslabs/iot-app-kit/commit/ce9ec7c714e6c600da59af8f4bffaf210f0041c0)) +* **react-components:** add useLatestAlarmPropertyValue hook to fetch alarm prop vals in useAlarms ([18aa854](https://github.com/awslabs/iot-app-kit/commit/18aa8548bbc9aa9d4343a1d85b3cefdb798e1b25)) +* **react-components:** implement request functions and hooks to build clients ([2ca7e6c](https://github.com/awslabs/iot-app-kit/commit/2ca7e6caf771bd929b993d79f91f6e7d3ce21350)) +* **react-components:** initiali implementation for useTimeSeriesData ([50db88f](https://github.com/awslabs/iot-app-kit/commit/50db88f309e6470bfc510824f6deb564c949b794)) +* **react-components:** useAlarms hook ([7103db6](https://github.com/awslabs/iot-app-kit/commit/7103db640cd1531823a51fe3277691c869b581ed)) +* **react-components:** useDescribeAssets and useDescribeAssetModels queries implemented ([bfb07e1](https://github.com/awslabs/iot-app-kit/commit/bfb07e16b1fceabdd676ebdb833c4d85baaafb0d)) +* **sitewise-alarms:** add useAlarmModels hook to fetch iot events alarm models in useAlarms ([c4c4986](https://github.com/awslabs/iot-app-kit/commit/c4c4986fde3fd65d7ca7e8b1f7a364fcc079ca10)) + + +### Bug Fixes + +* **dashboard:** add descriptions to all RE tables ([f7b4f0c](https://github.com/awslabs/iot-app-kit/commit/f7b4f0c89d8b05be988acac54b8edf35ab3b7367)) +* **dashboard:** add descriptions to all tables in RE ([c7aff00](https://github.com/awslabs/iot-app-kit/commit/c7aff00ea0d6175186317f06ca7eec4c550de7a0)) +* **dashboard:** add timezone support for new RE ([2d4b5dd](https://github.com/awslabs/iot-app-kit/commit/2d4b5ddcbdefe4828168a7864bd679744e5a97eb)) +* **dashboard:** fast follow to clean up messy code for table cell render ([649f75d](https://github.com/awslabs/iot-app-kit/commit/649f75d91bd4865d94db633ecd3fb865098fc1ff)) +* **dashboard:** fix flaky test in dashboard ([6fe3285](https://github.com/awslabs/iot-app-kit/commit/6fe328510bfd4ed36a24935085aa41ac0c83dfa5)) +* **dashboard:** label matches kpi name ([f675d11](https://github.com/awslabs/iot-app-kit/commit/f675d11857c0b0a3869d03d9c1339c405a85d11e)) +* **dashboard:** re reflects significant digits + timezone support for unmodeled ([195be67](https://github.com/awslabs/iot-app-kit/commit/195be67fe0e5b7ef7b262491ff4fec574c62db8c)) +* **react-components:** ensure enabled flag is never undefined for queries ([eb95ef4](https://github.com/awslabs/iot-app-kit/commit/eb95ef4e8f186f5f969e366321f01d9ab1ea1ab8)) +* **react-components:** remove flaky test in new RE ([9e15637](https://github.com/awslabs/iot-app-kit/commit/9e15637ecced497aec52a7189fc1e0adcf1de361)) +* **react-components:** skip flaky test in new RE ([e7928d3](https://github.com/awslabs/iot-app-kit/commit/e7928d329edef47871ed9978d820994ad2d76dcc)) +* **timeZone:** wrap timezone setState in useEffect ([6cd74a1](https://github.com/awslabs/iot-app-kit/commit/6cd74a1019499b8d6586cac0d26d605cdcd9c928)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/core bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/core-util bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.11.0 to 10.12.0 + * devDependencies + * @iot-app-kit/core bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/jest-config bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/source-iotsitewise bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/testing-util bumped from 10.11.0 to 10.12.0 + * @iot-app-kit/ts-config bumped from 10.11.0 to 10.12.0 + * eslint-config-iot-app-kit bumped from 10.11.0 to 10.12.0 + +## [10.11.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.10.2...react-components-v10.11.0) (2024-08-28) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/core bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/core-util bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.10.2 to 10.11.0 + * devDependencies + * @iot-app-kit/core bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/jest-config bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/source-iotsitewise bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/testing-util bumped from 10.10.2 to 10.11.0 + * @iot-app-kit/ts-config bumped from 10.10.2 to 10.11.0 + * eslint-config-iot-app-kit bumped from 10.10.2 to 10.11.0 + +## [10.10.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.10.1...react-components-v10.10.2) (2024-08-08) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/core bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/core-util bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/source-iottwinmaker bumped from 10.10.1 to 10.10.2 + * devDependencies + * @iot-app-kit/core bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/jest-config bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/source-iotsitewise bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/testing-util bumped from 10.10.1 to 10.10.2 + * @iot-app-kit/ts-config bumped from 10.10.1 to 10.10.2 + * eslint-config-iot-app-kit bumped from 10.10.1 to 10.10.2 + +## [10.10.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.10.0...react-components-v10.10.1) (2024-08-02) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/core bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/core-util bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.10.0 to 10.10.1 + * devDependencies + * @iot-app-kit/core bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/jest-config bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/source-iotsitewise bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/testing-util bumped from 10.10.0 to 10.10.1 + * @iot-app-kit/ts-config bumped from 10.10.0 to 10.10.1 + * eslint-config-iot-app-kit bumped from 10.10.0 to 10.10.1 + +## [10.10.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.9.0...react-components-v10.10.0) (2024-07-29) + + +### Features + +* add timezone converter util ([e5d59c4](https://github.com/awslabs/iot-app-kit/commit/e5d59c43803a03413e77556f6ca4179b18ecb3d7)) + + +### Bug Fixes + +* **dashboard:** adds resolution and aggregation to new proeprty in gauge widget ([5f5af30](https://github.com/awslabs/iot-app-kit/commit/5f5af3068defeb2a609e68ca0d29cc09f9960cfd)) +* move data quality widget on gauge to be closer to value ([d20b65f](https://github.com/awslabs/iot-app-kit/commit/d20b65f5704ffd5d56c4f402877be72d59adcadd)) +* **react-components:** gauge properly shows property name again ([ddb65c6](https://github.com/awslabs/iot-app-kit/commit/ddb65c6304c473e01e0c7ae3e868eba98923574c)) +* **react-components:** gauge thresholds with negative ranges ([2100221](https://github.com/awslabs/iot-app-kit/commit/21002216dc53230e95762ac3f46734ab90d8d1f6)) +* **react-components:** gestures prop works ([6141c32](https://github.com/awslabs/iot-app-kit/commit/6141c3234095c658240e528207cdcbe3ff6e2d62)) +* update data quality UX to match mocks ([ed62846](https://github.com/awslabs/iot-app-kit/commit/ed628461c0dd582ae2f03f06b81c8d25aab3832c)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/core bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/core-util bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.9.0 to 10.10.0 + * devDependencies + * @iot-app-kit/core bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/jest-config bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/source-iotsitewise bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/testing-util bumped from 10.9.0 to 10.10.0 + * @iot-app-kit/ts-config bumped from 10.9.0 to 10.10.0 + * eslint-config-iot-app-kit bumped from 10.9.0 to 10.10.0 + +## [10.9.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.8.1...react-components-v10.9.0) (2024-07-08) + + +### Bug Fixes + +* **react-components:** anomaly chart move loading state ([581a3c5](https://github.com/awslabs/iot-app-kit/commit/581a3c57734ba460ced0e32e232ed38583f232ba)) +* **react-components:** anomaly chart xaxis formatting ([740ee2a](https://github.com/awslabs/iot-app-kit/commit/740ee2a0ecbbe29c43a02fd04c0193935d79dd0e)) +* **react-components:** ensure anomaly chart colors are in order ([3fd8d87](https://github.com/awslabs/iot-app-kit/commit/3fd8d87c2dee6615a7e22962c0d8dbd0cfff97c0)) +* **react-components:** improve axis styling and add labels ([490058f](https://github.com/awslabs/iot-app-kit/commit/490058fbdb9ca102ca85abc2ff5770caafa52a71)) +* **react-components:** minor anomaly widget style changes ([19fc67a](https://github.com/awslabs/iot-app-kit/commit/19fc67a7768604d39c728ea4e1df8f318042d8b8)) +* **react-components:** zoom icons ([4da01df](https://github.com/awslabs/iot-app-kit/commit/4da01df378b1d3e2804c4802bd9250c7e180990f)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/core bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/core-util bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.8.1 to 10.9.0 + * devDependencies + * @iot-app-kit/core bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/jest-config bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/source-iotsitewise bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/testing-util bumped from 10.8.1 to 10.9.0 + * @iot-app-kit/ts-config bumped from 10.8.1 to 10.9.0 + * eslint-config-iot-app-kit bumped from 10.8.1 to 10.9.0 + +## [10.8.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.8.0...react-components-v10.8.1) (2024-06-27) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/core bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/core-util bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.8.0 to 10.8.1 + * devDependencies + * @iot-app-kit/core bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/jest-config bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/source-iotsitewise bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/testing-util bumped from 10.8.0 to 10.8.1 + * @iot-app-kit/ts-config bumped from 10.8.0 to 10.8.1 + * eslint-config-iot-app-kit bumped from 10.8.0 to 10.8.1 + +## [10.8.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.7.0...react-components-v10.8.0) (2024-06-24) + + +### Features + +* **anomaly-chart:** added `gestures` enablement option ([4c2402c](https://github.com/awslabs/iot-app-kit/commit/4c2402c44a5c3538fdc60fe8210b626670073479)) +* **react-components:** add arrow datasource ([efb0d6d](https://github.com/awslabs/iot-app-kit/commit/efb0d6d01549011e57400c6b48033264a7e122c9)) + + +### Bug Fixes + +* **react-components:** improve gauge thresholds ([09b352f](https://github.com/awslabs/iot-app-kit/commit/09b352f9a255cf3fb04f8c0382a8013db0f1ae35)) +* **react-components:** thresholds properly add and remove series ([bb8e451](https://github.com/awslabs/iot-app-kit/commit/bb8e451fbb4ed57a204b9936cf2e1c8853931c60)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/core bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/core-util bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.7.0 to 10.8.0 + * devDependencies + * @iot-app-kit/core bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/jest-config bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/source-iotsitewise bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/testing-util bumped from 10.7.0 to 10.8.0 + * @iot-app-kit/ts-config bumped from 10.7.0 to 10.8.0 + * eslint-config-iot-app-kit bumped from 10.7.0 to 10.8.0 + +## [10.7.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.6.1...react-components-v10.7.0) (2024-06-18) + + +### Features + +* customize gauge in dashboard config ([8af089e](https://github.com/awslabs/iot-app-kit/commit/8af089e94a2c11cab1c9473d384ed241da7f6461)) +* onViewportChange and currentViewport ([d63c9e3](https://github.com/awslabs/iot-app-kit/commit/d63c9e3a416e78a78b3a453755be39a6879eb07c)) + + +### Bug Fixes + +* **dashboard:** decimal places fixes ([710a6ae](https://github.com/awslabs/iot-app-kit/commit/710a6aeee8e16fbf7f204d9214dbd8c86fce16e2)) +* **react-components:** add timezone to anomaly chart ([5379bd1](https://github.com/awslabs/iot-app-kit/commit/5379bd19d0d47e62f42a19230e9cf52e2a715d95)) +* **react-components:** anomaly chart timestamp padding ([b376bf4](https://github.com/awslabs/iot-app-kit/commit/b376bf4861f58bd5489c907d2ae72107a2178eb3)) +* **react-components:** do not use decimal places setting in y axis ([f9fbf74](https://github.com/awslabs/iot-app-kit/commit/f9fbf74311af528b89ad34333b36508eeb3d9ae5)) +* **react-components:** ensure chart uses initial passed in viewport ([0b17318](https://github.com/awslabs/iot-app-kit/commit/0b173182adb4180ca0065b4238549cd30a0af3d2)) +* **react-components:** fix chart flickering and bugginess in live mode ([3cc3b41](https://github.com/awslabs/iot-app-kit/commit/3cc3b41d59d5c799b750eb76d809007b30dfe2a8)) +* **react-components:** fix passed in viewport for anomaly widget ([f73fafc](https://github.com/awslabs/iot-app-kit/commit/f73fafcd5dfdf7238f69848f1808fbbb0b17f281)) +* **react-components:** fix support for anomaly datasource outside of time sync ([d45cc6b](https://github.com/awslabs/iot-app-kit/commit/d45cc6b45adb67b8bc44b975a2a65c5942f0d746)) +* **react-components:** make anomaly chart responsive ([4b31b8c](https://github.com/awslabs/iot-app-kit/commit/4b31b8cece18f1a1e1e91447c31ca79ec0b3867f)) +* **react-components:** timestamp bar correct date ([2063935](https://github.com/awslabs/iot-app-kit/commit/20639352a433cea9abfceee439f7aa9c36db05b9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/core bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/core-util bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.6.1 to 10.7.0 + * devDependencies + * @iot-app-kit/core bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/jest-config bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/source-iotsitewise bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/testing-util bumped from 10.6.1 to 10.7.0 + * @iot-app-kit/ts-config bumped from 10.6.1 to 10.7.0 + * eslint-config-iot-app-kit bumped from 10.6.1 to 10.7.0 + +## [10.6.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.6.0...react-components-v10.6.1) (2024-06-12) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/core bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/core-util bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.6.0 to 10.6.1 + * devDependencies + * @iot-app-kit/core bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/jest-config bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/source-iotsitewise bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/testing-util bumped from 10.6.0 to 10.6.1 + * @iot-app-kit/ts-config bumped from 10.6.0 to 10.6.1 + * eslint-config-iot-app-kit bumped from 10.6.0 to 10.6.1 + +## [10.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.5.0...react-components-v10.6.0) (2024-06-06) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/core bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/core-util bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.5.0 to 10.6.0 + * devDependencies + * @iot-app-kit/core bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/jest-config bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/source-iotsitewise bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/testing-util bumped from 10.5.0 to 10.6.0 + * @iot-app-kit/ts-config bumped from 10.5.0 to 10.6.0 + * eslint-config-iot-app-kit bumped from 10.5.0 to 10.6.0 + +## [10.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.4.1...react-components-v10.5.0) (2024-05-29) + + +### Features + +* **dashboard:** default viewport setting ([0c3f3ef](https://github.com/awslabs/iot-app-kit/commit/0c3f3efa3a48be537d0eed0e6a1a02ecaa7c1f03)) +* resource explorers ([f604b15](https://github.com/awslabs/iot-app-kit/commit/f604b15dd35e014e78e1f56fd666602767e6b5bd)) + + +### Bug Fixes + +* **react-components:** anomaly widget error and empty states ([2d70b79](https://github.com/awslabs/iot-app-kit/commit/2d70b79467fe94621dd722bb95e7f52c21b477f2)) +* **react-components:** comment out flaky resource expl tests ([ca1039d](https://github.com/awslabs/iot-app-kit/commit/ca1039dc5c66cd30cc578651184463c889febd83)) +* **react-components:** filter out non anomalous data ([70f0a1c](https://github.com/awslabs/iot-app-kit/commit/70f0a1cdbada92336d9597c6e2a5f456896a15f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/core bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/core-util bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.4.1 to 10.5.0 + * devDependencies + * @iot-app-kit/core bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/jest-config bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/source-iotsitewise bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/testing-util bumped from 10.4.1 to 10.5.0 + * @iot-app-kit/ts-config bumped from 10.4.1 to 10.5.0 + * eslint-config-iot-app-kit bumped from 10.4.1 to 10.5.0 + +## [10.4.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.4.0...react-components-v10.4.1) (2024-05-20) + + +### Bug Fixes + +* **react-components:** update date-fns dependency ([1267b65](https://github.com/awslabs/iot-app-kit/commit/1267b6583034f17b14b8ca1de52125640bfdf3ea)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/core bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/core-util bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/source-iottwinmaker bumped from 10.4.0 to 10.4.1 + * devDependencies + * @iot-app-kit/core bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/jest-config bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/source-iotsitewise bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/testing-util bumped from 10.4.0 to 10.4.1 + * @iot-app-kit/ts-config bumped from 10.4.0 to 10.4.1 + * eslint-config-iot-app-kit bumped from 10.4.0 to 10.4.1 + +## [10.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.3.0...react-components-v10.4.0) (2024-05-20) + + +### Features + +* add anomaly query ([3c11512](https://github.com/awslabs/iot-app-kit/commit/3c115121db6fc8248bcd6b36989f6ebea3212ba7)) +* add gauge component in doc site package ([17a02f5](https://github.com/awslabs/iot-app-kit/commit/17a02f54ac811ab384aa6b8ad2dd4f61e0cc1514)) +* add step chart to l4e ([0983438](https://github.com/awslabs/iot-app-kit/commit/0983438c28ad7603e689697b0bd68cc10ce6fb50)) +* gauge widget to dashboard ([17cde64](https://github.com/awslabs/iot-app-kit/commit/17cde64259ab6b69beec2f2de4eaca9750504a5c)) +* guage component data quality and error text ([2dca188](https://github.com/awslabs/iot-app-kit/commit/2dca1889462a6002980b105ae5338265c187b502)) +* guage component initail commit ([305657a](https://github.com/awslabs/iot-app-kit/commit/305657a7aa761883da7a9839d0ae0a3914751a51)) +* **react-components:** add axis option to anomaly widget ([d0733e1](https://github.com/awslabs/iot-app-kit/commit/d0733e12863f4ee2db1e29576c8ea6b1d5964f62)) +* **react-components:** add intl ([c7c30c3](https://github.com/awslabs/iot-app-kit/commit/c7c30c3f969c71de6856d98d59e1043a6c785a45)) +* **react-components:** add l4e datasource ([748f8c1](https://github.com/awslabs/iot-app-kit/commit/748f8c17d56bbef0f2190fde38b5717c29d1d942)) +* **react-components:** add l4e queries ([328da8e](https://github.com/awslabs/iot-app-kit/commit/328da8ed9341c68c8c0a3a6b672170f1fa8eeb37)) +* **react-components:** l4e anomaly tests ([fbff596](https://github.com/awslabs/iot-app-kit/commit/fbff5968b7ddb406fa0eaaa21b84489010d55591)) +* **react-components:** y axis and timestamp options ([bfe2520](https://github.com/awslabs/iot-app-kit/commit/bfe2520a731dc6ea24d0ad928084546d45ed8643)) +* **widgets:** add name style settings for line/table + edit label in config panel ([f5e9b3f](https://github.com/awslabs/iot-app-kit/commit/f5e9b3fc99a176b3d9eb54ef0a387d171791aaf9)) + + +### Bug Fixes + +* add default settings to charts ([5917c83](https://github.com/awslabs/iot-app-kit/commit/5917c83674ffe67ced2bc7fe18c226460c115e80)) +* add trailing zeros to decimal point rounding, fix rounding function ([9c13177](https://github.com/awslabs/iot-app-kit/commit/9c131779c5a3f5b2ce7c6d1239e54ed82bfbf572)) +* better handling of light and dark mode w thresholds ([bd70051](https://github.com/awslabs/iot-app-kit/commit/bd70051944a9a21e21479f4793614f85a4716b2b)) +* fix bugs on l4e widget ([17a4896](https://github.com/awslabs/iot-app-kit/commit/17a489631da778b13fcb194b8bd527874e9e2858)) +* l4e bug fixes ([a71673c](https://github.com/awslabs/iot-app-kit/commit/a71673c9fbc701a5e26ed8d8c9bda191bc9b9285)) +* l4e widget quick fixes ([286f724](https://github.com/awslabs/iot-app-kit/commit/286f7244ac501ffc877dd0e0d40d76e97ab98bda)) +* migrated tooltip css to styled component for customizing theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([515ad24](https://github.com/awslabs/iot-app-kit/commit/515ad2478abf20a9490ac725ee80ce7cc6ae111f)) +* **react-components:** add error state ([e16671f](https://github.com/awslabs/iot-app-kit/commit/e16671f11bbae4b768220b93b8cae0fe9ffee9c3)) +* **react-components:** add snapshot tests ([178f0e7](https://github.com/awslabs/iot-app-kit/commit/178f0e7bbba316c711ff7c8fc18455cdccf939fb)) +* **react-components:** center error ([12da428](https://github.com/awslabs/iot-app-kit/commit/12da428c354b999a8dc350e3811cd9f3a44ef782)) +* **react-components:** export anomaly chart ([30ae675](https://github.com/awslabs/iot-app-kit/commit/30ae675d92acd26d0414f6aa2da953bc0b37d5e7)) +* **react-components:** fix error state display ([dead60a](https://github.com/awslabs/iot-app-kit/commit/dead60a175b236b4d74d1ca65a882821c5e49e26)) +* **react-components:** fix get value history request ([a701ef4](https://github.com/awslabs/iot-app-kit/commit/a701ef48519807612715eaf2714f3eb6a306de05)) +* **react-components:** gauge thresholds ([8e3bec3](https://github.com/awslabs/iot-app-kit/commit/8e3bec3f6058c9c96ac42439c1b33b90a0d3912e)) +* **react-components:** support nanoseconds for datapoints ([34d2dff](https://github.com/awslabs/iot-app-kit/commit/34d2dff489ff77d9eb9226443218b4c7cf725ff2)) +* **react-components:** viewport fixes ([b5846ed](https://github.com/awslabs/iot-app-kit/commit/b5846edf5c795c2bccdfee2a71d6b65f44dd56e5)) +* sort and pagination colors ([4dd6bb9](https://github.com/awslabs/iot-app-kit/commit/4dd6bb94198cd4c40fb1bde2d0b350c97d4ec540)) +* tooltip styled component issue is fixed ([5af6e22](https://github.com/awslabs/iot-app-kit/commit/5af6e2285cfc2e346e417e13f305f3a0a0c05439)) +* updated the new set of design tokens [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([7bdb8b0](https://github.com/awslabs/iot-app-kit/commit/7bdb8b08db1dcdc06153d71eff191a5e5a93a48b)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/core bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/core-util bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.3.0 to 10.4.0 + * devDependencies + * @iot-app-kit/core bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/jest-config bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/source-iotsitewise bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/testing-util bumped from 10.3.0 to 10.4.0 + * @iot-app-kit/ts-config bumped from 10.3.0 to 10.4.0 + * eslint-config-iot-app-kit bumped from 10.3.0 to 10.4.0 + +## [10.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.2.0...react-components-v10.3.0) (2024-05-09) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/core bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/core-util bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.2.0 to 10.3.0 + * devDependencies + * @iot-app-kit/core bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/jest-config bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/source-iotsitewise bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/testing-util bumped from 10.2.0 to 10.3.0 + * @iot-app-kit/ts-config bumped from 10.2.0 to 10.3.0 + * eslint-config-iot-app-kit bumped from 10.2.0 to 10.3.0 + +## [10.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.1.0...react-components-v10.2.0) (2024-03-29) + + +### Features + +* add data quality to kpi and status ([7248004](https://github.com/awslabs/iot-app-kit/commit/724800417bc8c74f518d6a39044c815848ef431f)) +* display assetname conditionally in legend [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([c4c443f](https://github.com/awslabs/iot-app-kit/commit/c4c443fab77d6e337d32fbecebb308c7f339fab5)) +* l4e table ([5bd6898](https://github.com/awslabs/iot-app-kit/commit/5bd68983268d00ff60bf0434e5b810e52254c16c)) +* l4e timeline (mock data only) ([829496c](https://github.com/awslabs/iot-app-kit/commit/829496cd0f51fb4131b5a081c8ecc7d17763b5be)) +* **react-components:** add data quality to xy-plot ([ed18e0d](https://github.com/awslabs/iot-app-kit/commit/ed18e0d891035803dfc0cc646371ae1e20914d2a)) +* updated the theming support for kpi and tc [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([d32a018](https://github.com/awslabs/iot-app-kit/commit/d32a0184518ef02222ef15359d49bccb68f6ee39)) + + +### Bug Fixes + +* l4e code clean up ([ad19b6c](https://github.com/awslabs/iot-app-kit/commit/ad19b6c68c515182454d9132629f2736f5fa4988)) +* updated theming support for buttons [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([1ffead0](https://github.com/awslabs/iot-app-kit/commit/1ffead0805048445b677f4cd63a31af7d5912095)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/core bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/core-util bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.1.0 to 10.2.0 + * devDependencies + * @iot-app-kit/core bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/jest-config bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/source-iotsitewise bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/testing-util bumped from 10.1.0 to 10.2.0 + * @iot-app-kit/ts-config bumped from 10.1.0 to 10.2.0 + * eslint-config-iot-app-kit bumped from 10.1.0 to 10.2.0 + +## [10.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v10.0.0...react-components-v10.1.0) (2024-03-21) + + +### Features + +* add a widget level loading indicator for x-y plot ([9be5617](https://github.com/awslabs/iot-app-kit/commit/9be5617aabe7a1edf88876406aeb1e83f174a288)) +* added data quality icon and text next to value in table [#2664](https://github.com/awslabs/iot-app-kit/issues/2664) ([91cd12f](https://github.com/awslabs/iot-app-kit/commit/91cd12f9e73fa5c77ab8e7209376116f4307526b)) +* added support for border theming options [#2668](https://github.com/awslabs/iot-app-kit/issues/2668) ([66e6680](https://github.com/awslabs/iot-app-kit/commit/66e6680fbea3f005aba7239c3c47bf13e5184462)) +* chart legend support px rem em % unit type ([4e023e6](https://github.com/awslabs/iot-app-kit/commit/4e023e6c4a735189e2db04de886555a0199087b2)) +* new KPI and update tests ([328e41a](https://github.com/awslabs/iot-app-kit/commit/328e41ae6f1b25c743a16f03d966a5b97408455a)) +* support theming using cloudscape mechanism [#2667](https://github.com/awslabs/iot-app-kit/issues/2667) ([c342310](https://github.com/awslabs/iot-app-kit/commit/c3423101f4f60410d2168a2605fadeb3c6c2d5bc)) +* user selected dashboard refresh-rate ([1c1256d](https://github.com/awslabs/iot-app-kit/commit/1c1256da83c938037a47e930c127c2bf3bc14e90)) + + +### Bug Fixes + +* add missing loading indication for widget values ([d90f9a6](https://github.com/awslabs/iot-app-kit/commit/d90f9a68e63b6280c1fb1187b8b34853fc2047ec)) +* datastream not show unit if it's undefined [#2660](https://github.com/awslabs/iot-app-kit/issues/2660) ([7418773](https://github.com/awslabs/iot-app-kit/commit/7418773d7a39ef978ad3663e12fcf87082767f54)) +* pass in refresh rate through the query instead of props ([b6df585](https://github.com/awslabs/iot-app-kit/commit/b6df5856b4407c74d4746d12a1781d11976f9948)) +* **react components:** updating import for popper.js ([00c1707](https://github.com/awslabs/iot-app-kit/commit/00c17078163cc2ef48a8eb6e370652ca9823e8e2)) +* **react-components:** lowered min/max throttle to match TC throttle ([e972b1b](https://github.com/awslabs/iot-app-kit/commit/e972b1bfe89a25094b9884c38afd2ac7faa35c5c)) +* refresh rate defined in dashboard and on query ([43cc5e4](https://github.com/awslabs/iot-app-kit/commit/43cc5e437543aed60663620655044cba9437a226)) +* remove duplicate constants and types ([45c155b](https://github.com/awslabs/iot-app-kit/commit/45c155b414a29c767e276060f1c60ce8401ea456)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/core bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/core-util bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 10.0.0 to 10.1.0 + * devDependencies + * @iot-app-kit/core bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/jest-config bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/source-iotsitewise bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/testing-util bumped from 10.0.0 to 10.1.0 + * @iot-app-kit/ts-config bumped from 10.0.0 to 10.1.0 + * eslint-config-iot-app-kit bumped from 10.0.0 to 10.1.0 + +## [10.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.15.0...react-components-v10.0.0) (2024-02-28) + + +### Features + +* add threshold settings to KPI ([2fa0429](https://github.com/awslabs/iot-app-kit/commit/2fa0429b6262092b4b3c86c21b8808b90e2d49fe)) +* added a label time range for viewport picker in dashboard header [#2559](https://github.com/awslabs/iot-app-kit/issues/2559) ([743cb80](https://github.com/awslabs/iot-app-kit/commit/743cb80ec36d116d6ef25e97ec54f2238ddb2ea1)) +* added accessible labels to different toolbar container [#2510](https://github.com/awslabs/iot-app-kit/issues/2510) ([ce5af6f](https://github.com/awslabs/iot-app-kit/commit/ce5af6fbc6e6b887f3fade9395bcbf54da386a88)) +* added viewport timestamps in xy plot [#2470](https://github.com/awslabs/iot-app-kit/issues/2470) ([46c1d24](https://github.com/awslabs/iot-app-kit/commit/46c1d24b99ff2ca9fb990ceed341ad6820c21f01)) +* conditionally display latest value in legend table [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([d3feb29](https://github.com/awslabs/iot-app-kit/commit/d3feb2920f3c63b0b2ce9580fc07a86475fc1ff1)) +* kpi and status gated config panel ([1f56b4f](https://github.com/awslabs/iot-app-kit/commit/1f56b4f2e7212ddfcc216fb778e0d4db57309ab2)) +* new design status (gated) ([69d6c97](https://github.com/awslabs/iot-app-kit/commit/69d6c979d1baefd4fd486cf0d1402b7357e8506b)) +* **react-components:** add max column to legend ([322c20f](https://github.com/awslabs/iot-app-kit/commit/322c20f0d438ecb45ee02fae186f6a198963c5b6)) +* **react-components:** add min column to legend ([69ba923](https://github.com/awslabs/iot-app-kit/commit/69ba92324da42770e267c9a0bce717ebf1ca0dbf)) +* **react-components:** calculate min/max and store value in store for chart to consume ([41b8551](https://github.com/awslabs/iot-app-kit/commit/41b855103e6643dd79e6e0fc9e7350fddefd9101)) +* show/hide aggregation and resolution in KPI ([aef1f14](https://github.com/awslabs/iot-app-kit/commit/aef1f146c6d4db03d759b76896d78e966b1ce1e6)) +* updated KPI style (gated) ([31ea2f3](https://github.com/awslabs/iot-app-kit/commit/31ea2f371676be9b6412073772b9110b01c42786)) +* widget tool box on mouse hover and selection state ([c80d42a](https://github.com/awslabs/iot-app-kit/commit/c80d42a3d10223d0d7edd5b3ee1b23c9ab613399)) + + +### Bug Fixes + +* chart gesture icons overlap on mouse hover ([b5e5c0d](https://github.com/awslabs/iot-app-kit/commit/b5e5c0d6115ed8eb9d819a9b4ceef31c7b56db2b)) +* internal pipeline has issues with lfs, reverting ([968f950](https://github.com/awslabs/iot-app-kit/commit/968f95005c51591d7cb99af323808fd232b8d4e9)) +* min max is sortable and not present on widget add ([7578a2e](https://github.com/awslabs/iot-app-kit/commit/7578a2e113221b2d3c00c01d2ede253e7ce07081)) +* min/max values have correct significant digits ([50e183d](https://github.com/awslabs/iot-app-kit/commit/50e183d240ecf329362e10d21b9864d08cb525ee)) +* remove fetchMostRecentBeforeStart from status and kpi ([f9b3183](https://github.com/awslabs/iot-app-kit/commit/f9b3183ce5e52462f5120362a130b4aea6588671)) +* update react-components public API for status and kpi widgets ([5e7bd49](https://github.com/awslabs/iot-app-kit/commit/5e7bd49fc6ae36fbdbd85e8c02bbb0b4ac082346)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/core bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/core-util bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.15.0 to 10.0.0 + * devDependencies + * @iot-app-kit/core bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/jest-config bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/source-iotsitewise bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/testing-util bumped from 9.15.0 to 10.0.0 + * @iot-app-kit/ts-config bumped from 9.15.0 to 10.0.0 + * eslint-config-iot-app-kit bumped from 9.15.0 to 10.0.0 + +## [9.15.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.14.0...react-components-v9.15.0) (2024-02-01) + + +### Features + +* display legend unit conditionally [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([9f6440e](https://github.com/awslabs/iot-app-kit/commit/9f6440e9e06c9040a6be46eab3a9141ad02a0509)) +* legend resize ([792b617](https://github.com/awslabs/iot-app-kit/commit/792b6170cc19402f3c49fbd60e4a07dc0890c434)) +* **react-components:** trendcurors using echarts extension ([a7c6bbe](https://github.com/awslabs/iot-app-kit/commit/a7c6bbe064ae746f024b74d885721a70a06716a2)) + + +### Bug Fixes + +* add signigicant digits to xy plot ([70a109e](https://github.com/awslabs/iot-app-kit/commit/70a109e8083b6729313f4f0dc362df0f3cf6ea62)) +* fix filtered data on zooms ([99e2f90](https://github.com/awslabs/iot-app-kit/commit/99e2f90aecdbaaa354e62e76b22c88a8530c1509)) +* hidden and highlighted datastreams persist correctly ([5a85bb7](https://github.com/awslabs/iot-app-kit/commit/5a85bb7d40d07dce439a1bfa15550d8893089cbd)) +* react-component Chart story book is broken ([c273ad5](https://github.com/awslabs/iot-app-kit/commit/c273ad529a7d78f887a2b8c64b50f76bfc018fc2)) +* **react-components:** fix global and chart store persistence ([83f1345](https://github.com/awslabs/iot-app-kit/commit/83f13452cbf350639cc2cc576d47a26138d58832)) +* **react-components:** refactor legend table into modules ([f5eed70](https://github.com/awslabs/iot-app-kit/commit/f5eed7068b70ae9305782f07b08115294b26a3b7)) +* yAxis label collides with yAxis name [#2471](https://github.com/awslabs/iot-app-kit/issues/2471) ([85ac6ac](https://github.com/awslabs/iot-app-kit/commit/85ac6ac4586d560e44cadedbffe5b1a187bd8bb8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/core bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/core-util bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.14.0 to 9.15.0 + * devDependencies + * @iot-app-kit/core bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/jest-config bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/source-iotsitewise bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/testing-util bumped from 9.14.0 to 9.15.0 + * @iot-app-kit/ts-config bumped from 9.14.0 to 9.15.0 + * eslint-config-iot-app-kit bumped from 9.14.0 to 9.15.0 + +## [9.14.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.13.0...react-components-v9.14.0) (2024-01-18) + + +### Features + +* changed ui experience of chart legend based on legend position [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([de1f147](https://github.com/awslabs/iot-app-kit/commit/de1f14772b614f67156a34ac64300111a6c55126)) + + +### Bug Fixes + +* improved zoom and default values for y axis ([112e5c5](https://github.com/awslabs/iot-app-kit/commit/112e5c58d7e3478dec03dfbb2eb52ec315b4690d)) +* make context menu appear on top of chart tooltip ([e1622c8](https://github.com/awslabs/iot-app-kit/commit/e1622c86bf4ead6856e7e1c9be1d5b8a1d6d4d61)) +* **react-components:** fix the mouse events ([7c07a37](https://github.com/awslabs/iot-app-kit/commit/7c07a37eb5e8649a6d967c96b297659caad270a8)) +* **react-components:** refactor chart to use dataset ([b403789](https://github.com/awslabs/iot-app-kit/commit/b4037897cd4e7169958373bbf61d29c7454706ef)) +* removed tanstack table related code ([c8be85d](https://github.com/awslabs/iot-app-kit/commit/c8be85d919faac44441f4b00aa81ac7dbf215599)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/core bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/core-util bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.13.0 to 9.14.0 + * devDependencies + * @iot-app-kit/core bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/jest-config bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/source-iotsitewise bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/testing-util bumped from 9.13.0 to 9.14.0 + * @iot-app-kit/ts-config bumped from 9.13.0 to 9.14.0 + * eslint-config-iot-app-kit bumped from 9.13.0 to 9.14.0 + +## [9.13.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.12.0...react-components-v9.13.0) (2024-01-05) + + +### Features + +* legend table is implemeted using tanstack table ([c92533a](https://github.com/awslabs/iot-app-kit/commit/c92533a342c95618d6dcf7d2a13bdad204bb01de)) +* **react-components:** hide/show properties from legend ([e666cf1](https://github.com/awslabs/iot-app-kit/commit/e666cf1cfba8343d1a5bbb0f38a4341969a18575)) +* **ResourceExplorer:** hide properties table when not needed to be displayed ([0fca5e9](https://github.com/awslabs/iot-app-kit/commit/0fca5e9089ac7af52e1d31b2143acb121cb7869b)) +* xy-plot y axis lable changes [#2378](https://github.com/awslabs/iot-app-kit/issues/2378) ([48389c3](https://github.com/awslabs/iot-app-kit/commit/48389c3e59305525b11b63233c3a79d4a8e3a78d)) + + +### Bug Fixes + +* fix data-zoom behavior for base chart ([0c66a80](https://github.com/awslabs/iot-app-kit/commit/0c66a8016e2aa827ad3093c3ef89d6437e014d18)) +* **react-components:** clear ymin and ymax was getting emitted on every loop ([8609a48](https://github.com/awslabs/iot-app-kit/commit/8609a487a1b7ba9d4884750a6e6ee8819873a4b1)) +* **react-components:** confining tootip to the chart area ([1bff986](https://github.com/awslabs/iot-app-kit/commit/1bff986999dc88a261caed22c3a77aab892219ad)) +* **react-components:** performance fixes for chart component ([403f2bf](https://github.com/awslabs/iot-app-kit/commit/403f2bf6beea75e1e1668e33c60a6149ef1b5436)) +* **react-components:** remove data points after a threshold ([cd6a189](https://github.com/awslabs/iot-app-kit/commit/cd6a18913d2c0f3fb8b066dffbdf48f38d6955e4)) +* **react-components:** remove padded y axis code ([7e3d365](https://github.com/awslabs/iot-app-kit/commit/7e3d365d07dd4b074c6dda6d2934b7cb05fcde55)) +* **react-components:** remove secondary selection state when using TCs or gestures ([3ba4e6a](https://github.com/awslabs/iot-app-kit/commit/3ba4e6a1cc0c2a7fd48eb130f3b72262fcd97ad5)) +* **react-components:** updates for x-axis panning performance ([07a7624](https://github.com/awslabs/iot-app-kit/commit/07a7624d77962c38e7457abea1602082ebf2f5a3)) +* relative month test ([5c6e262](https://github.com/awslabs/iot-app-kit/commit/5c6e262b16b8a739c4a4d9e823453094242c67d9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/core bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/core-util bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.12.0 to 9.13.0 + * devDependencies + * @iot-app-kit/core bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/jest-config bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/source-iotsitewise bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/testing-util bumped from 9.12.0 to 9.13.0 + * @iot-app-kit/ts-config bumped from 9.12.0 to 9.13.0 + * eslint-config-iot-app-kit bumped from 9.12.0 to 9.13.0 + +## [9.12.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.11.0...react-components-v9.12.0) (2023-12-18) + + +### Features + +* chat legend enhancement [#2277](https://github.com/awslabs/iot-app-kit/issues/2277) ([b1ca8ae](https://github.com/awslabs/iot-app-kit/commit/b1ca8aeda126f09f371e23133fa600d5b56c9b21)) +* **dashboard:** add colors to trendcursors ([a890c7d](https://github.com/awslabs/iot-app-kit/commit/a890c7db39df1a836312ac4050c41e2f4fdd9f4a)) +* first click on paginate timeline should move backward from current time duration ([5f9aa42](https://github.com/awslabs/iot-app-kit/commit/5f9aa42aef52d1bade596d0b8cfa1d58d51cce52)) +* lint accessibility ([0db36ef](https://github.com/awslabs/iot-app-kit/commit/0db36ef6a07fe5e0709d17081dffa7d23669e2fe)) + + +### Bug Fixes + +* table resize button aria label ([1618d50](https://github.com/awslabs/iot-app-kit/commit/1618d50a713cb1be8b9a74899144ca92cd9ec5f1)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/core bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/core-util bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.11.0 to 9.12.0 + * devDependencies + * @iot-app-kit/core bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/jest-config bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/source-iotsitewise bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/testing-util bumped from 9.11.0 to 9.12.0 + * @iot-app-kit/ts-config bumped from 9.11.0 to 9.12.0 + * eslint-config-iot-app-kit bumped from 9.11.0 to 9.12.0 + +## [9.11.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.10.0...react-components-v9.11.0) (2023-12-07) + + +### Bug Fixes + +* use datastream id as legend table row key ([b4c11bc](https://github.com/awslabs/iot-app-kit/commit/b4c11bcd40400d4f7eae680d5ab521f00b638f64)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/core bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/core-util bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.10.0 to 9.11.0 + * devDependencies + * @iot-app-kit/core bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/jest-config bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/source-iotsitewise bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/testing-util bumped from 9.10.0 to 9.11.0 + * @iot-app-kit/ts-config bumped from 9.10.0 to 9.11.0 + * eslint-config-iot-app-kit bumped from 9.10.0 to 9.11.0 + +## [9.10.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.9.1...react-components-v9.10.0) (2023-12-07) + + +### Bug Fixes + +* **react-components:** trendcursor hotkey indicates addition state ([c9d34e0](https://github.com/awslabs/iot-app-kit/commit/c9d34e0ef4ba891522336f05718d1808442949e3)) +* updates for performance issues ([8863b9a](https://github.com/awslabs/iot-app-kit/commit/8863b9a80d7a8284aa4732ed25298d165a769ea9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/core bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/core-util bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.9.1 to 9.10.0 + * devDependencies + * @iot-app-kit/core bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/jest-config bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/source-iotsitewise bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/testing-util bumped from 9.9.1 to 9.10.0 + * @iot-app-kit/ts-config bumped from 9.9.1 to 9.10.0 + * eslint-config-iot-app-kit bumped from 9.9.1 to 9.10.0 + +## [9.9.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.9.0...react-components-v9.9.1) (2023-12-06) + + +### Bug Fixes + +* update dependency to not include styles ([e09651e](https://github.com/awslabs/iot-app-kit/commit/e09651e5c065458a269d8d95d1c9c959c5f95ace)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/core bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/core-util bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/source-iottwinmaker bumped from 9.9.0 to 9.9.1 + * devDependencies + * @iot-app-kit/core bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/jest-config bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/source-iotsitewise bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/testing-util bumped from 9.9.0 to 9.9.1 + * @iot-app-kit/ts-config bumped from 9.9.0 to 9.9.1 + * eslint-config-iot-app-kit bumped from 9.9.0 to 9.9.1 + +## [9.9.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.8.0...react-components-v9.9.0) (2023-12-05) + + +### Bug Fixes + +* accessible property filter labels ([30554a1](https://github.com/awslabs/iot-app-kit/commit/30554a1f59f2462b1a5334424866f67ee4507455)) +* fixed property section tooltip gets cut off if property has longer name [#2293](https://github.com/awslabs/iot-app-kit/issues/2293) ([e496e4d](https://github.com/awslabs/iot-app-kit/commit/e496e4d52c566cab3e17e332ef3b587cd9fcc094)) +* panning on chart widget moving [#2294](https://github.com/awslabs/iot-app-kit/issues/2294) ([9cefd9a](https://github.com/awslabs/iot-app-kit/commit/9cefd9a2107465ccde1468f1e0e2a271b0d30381)) +* **react-components:** add echarts extension for handling custom-y-axis ([b481beb](https://github.com/awslabs/iot-app-kit/commit/b481beb1e5a9a014a688d264aa3cb3addc4f51c7)) +* **react-components:** add fallback for property name to id ([a1024d4](https://github.com/awslabs/iot-app-kit/commit/a1024d459fd24d8c7056326706b41ff505eb41ec)) +* **react-components:** mock date in viewport adapter date tests ([06200dd](https://github.com/awslabs/iot-app-kit/commit/06200dda24e5956c6db0a2b4bfe750cdf53c8592)) +* remove line chart tweening animation ([d9e894b](https://github.com/awslabs/iot-app-kit/commit/d9e894b0f651ad24dce87d7f7c4dbe28f43f43e0)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/core bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/core-util bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.8.0 to 9.9.0 + * devDependencies + * @iot-app-kit/core bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/jest-config bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/source-iotsitewise bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/testing-util bumped from 9.8.0 to 9.9.0 + * @iot-app-kit/ts-config bumped from 9.8.0 to 9.9.0 + * eslint-config-iot-app-kit bumped from 9.8.0 to 9.9.0 + +## [9.8.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.7.0...react-components-v9.8.0) (2023-11-25) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/core bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/core-util bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.7.0 to 9.8.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/source-iotsitewise bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/testing-util bumped from 9.7.0 to 9.8.0 + * @iot-app-kit/ts-config bumped from 9.7.0 to 9.8.0 + * eslint-config-iot-app-kit bumped from 9.7.0 to 9.8.0 + +## [9.7.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.6.0...react-components-v9.7.0) (2023-11-21) + + +### Features + +* charts legend resize drag-handle improvements [#2055](https://github.com/awslabs/iot-app-kit/issues/2055) ([9e9db52](https://github.com/awslabs/iot-app-kit/commit/9e9db524cf1b403c9a64c631751ff862349b7ad2)) +* **dashboard:** add model based query support ([b95b60c](https://github.com/awslabs/iot-app-kit/commit/b95b60ccf074069268a8d71071067cfbd8265a20)) +* **dashboard:** gated CSV download button ([645fb1c](https://github.com/awslabs/iot-app-kit/commit/645fb1cc3fdac5e27369a6ee538e0677ab4eb8b3)) +* header design update ([700a913](https://github.com/awslabs/iot-app-kit/commit/700a91366ba57d7f6ca4b2058ee308a7317db9eb)) +* **react-components:** adding significant digits to trendcursors ([ef4c987](https://github.com/awslabs/iot-app-kit/commit/ef4c987f5142a7be0ec22aae49a31397999b45e2)) +* **react-components:** brush zoom ([bddb7e1](https://github.com/awslabs/iot-app-kit/commit/bddb7e1e7b18a2179678fd6bee6a50d0a978d26d)) +* updated the chart legend ux [#1930](https://github.com/awslabs/iot-app-kit/issues/1930) ([68b8618](https://github.com/awslabs/iot-app-kit/commit/68b8618226c5f9ab0c5da64f7ad9210459809232)) + + +### Bug Fixes + +* bugfix for overlapping colors in color palette ([7b4c95b](https://github.com/awslabs/iot-app-kit/commit/7b4c95b45866548f85b10fee3167a35354d73cfb)) +* chart gesture performance ([cdd52c6](https://github.com/awslabs/iot-app-kit/commit/cdd52c627e99f4e712475b90d2869b16a5684038)) +* download button and zoom undo button ([a60a81b](https://github.com/awslabs/iot-app-kit/commit/a60a81b6f6e64b3113b14edcf6efe9fe82ef47f7)) +* immediately change the line chart viewport when updating relative time range ([5ebb2f1](https://github.com/awslabs/iot-app-kit/commit/5ebb2f1597595bf66c63850835e2a64752e4ef9b)) +* immediately change the line chart viewport when updating relative time range ([95b5b7d](https://github.com/awslabs/iot-app-kit/commit/95b5b7d80914a757613c3263f7bf0218acb355b4)) +* **react-components:** adding handling of Yminmax for TC and fixing styling issues ([1581b9f](https://github.com/awslabs/iot-app-kit/commit/1581b9fb7cb77037fa830eaba07155aa253cfa33)) +* **react-components:** echarts grab on canvas update cursor and tooltip ([bfef4e8](https://github.com/awslabs/iot-app-kit/commit/bfef4e878e9a47a9ed1f578767a04b03e6bc8a5e)) +* **react-components:** pagination can move forward on first click from relative range ([fcb04f7](https://github.com/awslabs/iot-app-kit/commit/fcb04f73c3bf3af8a467169a3e9cbd6a6743d462)) +* **react-components:** removing animation for series lines ([b245995](https://github.com/awslabs/iot-app-kit/commit/b245995766c4f2b83bca219e9d8e6f806912cd6c)) +* ungate CSV download feature ([ec11c82](https://github.com/awslabs/iot-app-kit/commit/ec11c82c1b2932a5f7f28d9394f469cac6d68f97)) +* updated the wcag compliance for dashboard resource explorer pane [#2173](https://github.com/awslabs/iot-app-kit/issues/2173) ([26bd618](https://github.com/awslabs/iot-app-kit/commit/26bd6181e4c507360247d6a7cddee7db0ba2c5bd)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/core bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/core-util bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.6.0 to 9.7.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/source-iotsitewise bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/testing-util bumped from 9.6.0 to 9.7.0 + * @iot-app-kit/ts-config bumped from 9.6.0 to 9.7.0 + * eslint-config-iot-app-kit bumped from 9.6.0 to 9.7.0 + +## [9.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.5.0...react-components-v9.6.0) (2023-11-16) + + +### Bug Fixes + +* **video-player:** toggle playback mode and update time range ([a033cb0](https://github.com/awslabs/iot-app-kit/commit/a033cb01824ccff6a63eb4e62d019b691b085a0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/core bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/core-util bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.5.0 to 9.6.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/source-iotsitewise bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/testing-util bumped from 9.5.0 to 9.6.0 + * @iot-app-kit/ts-config bumped from 9.5.0 to 9.6.0 + * eslint-config-iot-app-kit bumped from 9.5.0 to 9.6.0 + +## [9.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.4.0...react-components-v9.5.0) (2023-11-08) + + +### Bug Fixes + +* **react-components:** update viewportAdapter tests for month and minutes ([a269626](https://github.com/awslabs/iot-app-kit/commit/a269626bd3e78a8b5f515b8f3d590848e9f70725)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/core bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/core-util bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.4.0 to 9.5.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/source-iotsitewise bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/testing-util bumped from 9.4.0 to 9.5.0 + * @iot-app-kit/ts-config bumped from 9.4.0 to 9.5.0 + * eslint-config-iot-app-kit bumped from 9.4.0 to 9.5.0 + +## [9.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.3.0...react-components-v9.4.0) (2023-10-26) + + +### Bug Fixes + +* broken tooltip imports ([8a25332](https://github.com/awslabs/iot-app-kit/commit/8a25332379e647911504cd75ff913f6b911a43c4)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/core bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/core-util bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.3.0 to 9.4.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/source-iotsitewise bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/testing-util bumped from 9.3.0 to 9.4.0 + * @iot-app-kit/ts-config bumped from 9.3.0 to 9.4.0 + * eslint-config-iot-app-kit bumped from 9.3.0 to 9.4.0 + +## [9.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.2.0...react-components-v9.3.0) (2023-10-26) + + +### Features + +* charts legend resize drag handle improvements [#2055](https://github.com/awslabs/iot-app-kit/issues/2055) ([0c69b75](https://github.com/awslabs/iot-app-kit/commit/0c69b755e8b1200238dcaac90a44ad07ab222b23)) +* decimal round of in resource table ([a5da972](https://github.com/awslabs/iot-app-kit/commit/a5da9726649ca81a578efd365ba05d0dbe302b55)) +* **react-components:** refactoring echarts ([83e505f](https://github.com/awslabs/iot-app-kit/commit/83e505ffaa9d31fe476be4d7f8029b5ae7c5a3ea)) + + +### Bug Fixes + +* **react-components:** fixing the prod issue of dashboard throwing exception ([7ecd252](https://github.com/awslabs/iot-app-kit/commit/7ecd2526ed5c07f793ec5e97b1d3eb5595e67a7d)) +* **react-components:** hitbox spans entire pagination button ([6a5b2f8](https://github.com/awslabs/iot-app-kit/commit/6a5b2f8eaf237edc4aaae414765f5f186ce09c6a)) +* **react-components:** pagination over time + tooltip ([ff052c9](https://github.com/awslabs/iot-app-kit/commit/ff052c94fa9f57ac8138d025301a384ab217b258)) +* **react-components:** toggle legend hides container ([8d0ae53](https://github.com/awslabs/iot-app-kit/commit/8d0ae53981698bc8121cb0e40831b9d61e693075)) +* **react-component:** updating TC to have a drag area instead of just drag on the line ([05068bd](https://github.com/awslabs/iot-app-kit/commit/05068bddfd3a7ff0876550a11263496765b51080)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/core bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/core-util bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.2.0 to 9.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/source-iotsitewise bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/testing-util bumped from 9.2.0 to 9.3.0 + * @iot-app-kit/ts-config bumped from 9.2.0 to 9.3.0 + * eslint-config-iot-app-kit bumped from 9.2.0 to 9.3.0 + +## [9.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.1.0...react-components-v9.2.0) (2023-10-17) + + +### Bug Fixes + +* **react-components:** echarts grab on canvas update cursor and tooltip ([a29da3a](https://github.com/awslabs/iot-app-kit/commit/a29da3a08a769137610bc37efde5605bf6b62dc2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/core bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/core-util bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.1.0 to 9.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/source-iotsitewise bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/testing-util bumped from 9.1.0 to 9.2.0 + * @iot-app-kit/ts-config bumped from 9.1.0 to 9.2.0 + * eslint-config-iot-app-kit bumped from 9.1.0 to 9.2.0 + +## [9.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v9.0.0...react-components-v9.1.0) (2023-10-13) + + +### Features + +* **composer:** utils to handle model shader component in entity ([95a4be6](https://github.com/awslabs/iot-app-kit/commit/95a4be668b51d413589b16b7edde67fdd40375d1)) + + +### Bug Fixes + +* **dashboard:** improve widget drag and resize ([fcdc586](https://github.com/awslabs/iot-app-kit/commit/fcdc5862fc558f136d510eaa85e241daa61d9988)) +* **echarts:** improved x+y axis min and max ([38741e2](https://github.com/awslabs/iot-app-kit/commit/38741e245b450c7e547b10305349f9652ae1872f)) +* **react-components:** fixing the xaxis and viewport dependency ([139bcc1](https://github.com/awslabs/iot-app-kit/commit/139bcc15aa219c1906544086ab6bf3d24e4035da)) +* style updates and bugfixes for multi y axis ([e11fd3e](https://github.com/awslabs/iot-app-kit/commit/e11fd3eb6629d75b3b2abdb2ad0466d02e66b8ef)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/core bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/core-util bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 9.0.0 to 9.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/source-iotsitewise bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/testing-util bumped from 9.0.0 to 9.1.0 + * @iot-app-kit/ts-config bumped from 9.0.0 to 9.1.0 + * eslint-config-iot-app-kit bumped from 9.0.0 to 9.1.0 + +## [9.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.1.1...react-components-v9.0.0) (2023-10-10) + + +### Features + +* updated the chart legend ux(spacing, legend border color, width, tooltip) ([390cbe3](https://github.com/awslabs/iot-app-kit/commit/390cbe3414286bd7cfb1f041a2d21264552e7bd3)) + + +### Bug Fixes + +* line chart progresses in time ([15876a8](https://github.com/awslabs/iot-app-kit/commit/15876a86e4d3790e41f917758618b3f11cc948c7)) + + +### Reverts + +* updated the chart legend ux(spacing, legend border color, width, tooltip) ([6bbe391](https://github.com/awslabs/iot-app-kit/commit/6bbe39103f286ed6f09bd1f4fdd3353dba833e5a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/core bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/core-util bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 8.1.1 to 9.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/source-iotsitewise bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/testing-util bumped from 8.1.1 to 9.0.0 + * @iot-app-kit/ts-config bumped from 8.1.1 to 9.0.0 + * eslint-config-iot-app-kit bumped from 8.1.1 to 9.0.0 + +## [8.1.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.1.0...react-components-v8.1.1) (2023-10-05) + + +### Bug Fixes + +* add eslint rule for hooks ([de7cc0d](https://github.com/awslabs/iot-app-kit/commit/de7cc0d94ffdb79d3cb2ce622dd322e6d8497d61)) +* **dashboard:** chart respects absolute min and max between data and thresholds ([db16712](https://github.com/awslabs/iot-app-kit/commit/db1671225e300a18765d55a8afd1534640d264de)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/core bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/core-util bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/source-iottwinmaker bumped from 8.1.0 to 8.1.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/source-iotsitewise bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/testing-util bumped from 8.1.0 to 8.1.1 + * @iot-app-kit/ts-config bumped from 8.1.0 to 8.1.1 + * eslint-config-iot-app-kit bumped from 8.1.0 to 8.1.1 + +## [8.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.0.2...react-components-v8.1.0) (2023-10-04) + + +### Bug Fixes + +* **video player:** correcting the VideoPlayer export ([18213d7](https://github.com/awslabs/iot-app-kit/commit/18213d7b254355776900c0e6c735ce6a039ac3f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/core bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/core-util bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 8.0.2 to 8.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/source-iotsitewise bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/testing-util bumped from 8.0.2 to 8.1.0 + * @iot-app-kit/ts-config bumped from 8.0.2 to 8.1.0 + * eslint-config-iot-app-kit bumped from 8.0.2 to 8.1.0 + +## [8.0.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.0.1...react-components-v8.0.2) (2023-09-30) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/core bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/core-util bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/source-iottwinmaker bumped from 8.0.1 to 8.0.2 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/source-iotsitewise bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/testing-util bumped from 8.0.1 to 8.0.2 + * @iot-app-kit/ts-config bumped from 8.0.1 to 8.0.2 + * eslint-config-iot-app-kit bumped from 8.0.1 to 8.0.2 + +## [8.0.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v8.0.0...react-components-v8.0.1) (2023-09-30) + + +### Bug Fixes + +* toggle working linechar ([9ea6117](https://github.com/awslabs/iot-app-kit/commit/9ea61177710b9ece1be169a0c50e1c19fdefb5e6)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/core bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/core-util bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/source-iottwinmaker bumped from 8.0.0 to 8.0.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/source-iotsitewise bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/testing-util bumped from 8.0.0 to 8.0.1 + * @iot-app-kit/ts-config bumped from 8.0.0 to 8.0.1 + * eslint-config-iot-app-kit bumped from 8.0.0 to 8.0.1 + +## [8.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.5.0...react-components-v8.0.0) (2023-09-30) + + +### Features + +* add filtering ability ([51933bc](https://github.com/awslabs/iot-app-kit/commit/51933bc6cc1a76071ae1287ee7f79072c8d4dac7)) +* preferences for pagination in table widget [#1890](https://github.com/awslabs/iot-app-kit/issues/1890) ([8072232](https://github.com/awslabs/iot-app-kit/commit/8072232240a17274556d208fc22d32a811866517)) + + +### Bug Fixes + +* **dashboard:** remove viewport from the dashboard state to use viewport hook ([a9011a8](https://github.com/awslabs/iot-app-kit/commit/a9011a8a22e3bc41076fa6fb64065c016282d012)) +* groupable echarts ([d704292](https://github.com/awslabs/iot-app-kit/commit/d704292964e6434450572154c60863fbdb027dc2)) +* update unit test ([2276584](https://github.com/awslabs/iot-app-kit/commit/2276584325c75b8aa823d24588fb589b18876699)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/core bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/core-util bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.5.0 to 8.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/source-iotsitewise bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/testing-util bumped from 7.5.0 to 8.0.0 + * @iot-app-kit/ts-config bumped from 7.5.0 to 8.0.0 + * eslint-config-iot-app-kit bumped from 7.5.0 to 8.0.0 + +## [7.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.4.0...react-components-v7.5.0) (2023-09-26) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/core bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/core-util bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.4.0 to 7.5.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/source-iotsitewise bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/testing-util bumped from 7.4.0 to 7.5.0 + * @iot-app-kit/ts-config bumped from 7.4.0 to 7.5.0 + * eslint-config-iot-app-kit bumped from 7.4.0 to 7.5.0 + +## [7.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.3.1...react-components-v7.4.0) (2023-09-25) + + +### Features + +* add fixed width and height to the table ([7005009](https://github.com/awslabs/iot-app-kit/commit/7005009b1e325a8f333b281113ce1cf4745b0b19)) +* chart fit and finish - match cloudscape colors for axis and labels [#1929](https://github.com/awslabs/iot-app-kit/issues/1929) ([6fe3424](https://github.com/awslabs/iot-app-kit/commit/6fe3424ec90052d2e63a06a34b874958b9c7bf0c)) +* **dashboard:** new line-scatter-chart ([53768b9](https://github.com/awslabs/iot-app-kit/commit/53768b911a13066b9527c88f0e95a620f0025f7a)) +* **echarts:** allow scroll left and right ([5d2341e](https://github.com/awslabs/iot-app-kit/commit/5d2341e71f531556ac8147e1a0742233992ed82d)) +* **react-components:** adding TrendCursor Sync to dashboard ([d046184](https://github.com/awslabs/iot-app-kit/commit/d046184b836e9cb3670b210eb24c4fd91167b52a)) +* **react-components:** sync echarts viewport ([e04e040](https://github.com/awslabs/iot-app-kit/commit/e04e04079630361047e82d8564678cd4e5857cdd)) +* table widget pagination and sortingdisabled ([b727eae](https://github.com/awslabs/iot-app-kit/commit/b727eae8364f19f2e997fa0c9275e1f0a947f854)) + + +### Bug Fixes + +* **CSS-Loader:** updated sass-loader & fixed style ([aee4abc](https://github.com/awslabs/iot-app-kit/commit/aee4abcd22617cd1b28641711a4be2d1bab4e252)) +* **react-components:** adding debounce to the echarts zoom handler ([b983385](https://github.com/awslabs/iot-app-kit/commit/b98338508da223bab1a99c28641276ff02c537b5)) +* **react-components:** echarts resize drag fix ([19ccc7e](https://github.com/awslabs/iot-app-kit/commit/19ccc7ee4569aea891b43883a8ba1dedf3ac4fc9)) +* **react-components:** fix TC behaviour when there is a change in query ([50edcc1](https://github.com/awslabs/iot-app-kit/commit/50edcc1b2131c03c9e30621407a3d3d201825a90)) +* **react-components:** fixing TCs on data zoom ([379525c](https://github.com/awslabs/iot-app-kit/commit/379525cd1246061398ff8a113963b968466ae11a)) +* **react-components:** fixing the duplicate yAxis values ([60073ef](https://github.com/awslabs/iot-app-kit/commit/60073ef7ea4e1167218c8cdecd021bc677d5cc66)) +* **react-components:** fixing the viewport and some styling elements ([7d3526e](https://github.com/awslabs/iot-app-kit/commit/7d3526e34c86b55632a4d5aa0c7029fd1499a48b)) +* **react-components:** need stop propagation in start and end of resize event ([30e9901](https://github.com/awslabs/iot-app-kit/commit/30e99010bc57e48040ddcac8c41546e745a5a3f9)) +* **react-components:** updating echarts ux ([ddfc9c8](https://github.com/awslabs/iot-app-kit/commit/ddfc9c8cc15f32a8c307653daf5d2159918e58b2)) +* **react-components:** updating echarts with the fixes founf during bug bash ([9f32c21](https://github.com/awslabs/iot-app-kit/commit/9f32c21ae53d99ddac718caa520d9e852a25f499)) +* x-axis toggle will toggle both x and y axis [#1925](https://github.com/awslabs/iot-app-kit/issues/1925) ([58b0dbb](https://github.com/awslabs/iot-app-kit/commit/58b0dbbc72a9dbfd13648a454ea36ac570efd0eb)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/core bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/core-util bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.3.1 to 7.4.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/source-iotsitewise bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/testing-util bumped from 7.3.1 to 7.4.0 + * @iot-app-kit/ts-config bumped from 7.3.1 to 7.4.0 + * eslint-config-iot-app-kit bumped from 7.3.1 to 7.4.0 + +## [7.3.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.3.0...react-components-v7.3.1) (2023-08-24) + + +### Bug Fixes + +* **react-component:** updating the calculateTimeStamp method to use ([e0e1f42](https://github.com/awslabs/iot-app-kit/commit/e0e1f428f012b157938eced89efcd30101f2d7f5)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/core bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/core-util bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/source-iottwinmaker bumped from 7.3.0 to 7.3.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/source-iotsitewise bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/testing-util bumped from 7.3.0 to 7.3.1 + * @iot-app-kit/ts-config bumped from 7.3.0 to 7.3.1 + * eslint-config-iot-app-kit bumped from 7.3.0 to 7.3.1 + +## [7.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.2.1...react-components-v7.3.0) (2023-08-23) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/core bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/core-util bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.2.1 to 7.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/source-iotsitewise bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/testing-util bumped from 7.2.1 to 7.3.0 + * @iot-app-kit/ts-config bumped from 7.2.1 to 7.3.0 + * eslint-config-iot-app-kit bumped from 7.2.1 to 7.3.0 + +## [7.2.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.2.0...react-components-v7.2.1) (2023-08-18) + + +### Bug Fixes + +* **react-components:** the dependencies were added to dashboard instead of react-components ([8b2f12f](https://github.com/awslabs/iot-app-kit/commit/8b2f12fb67a1705ffdb722e02cf8c1ff1ae2ed97)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/core bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/core-util bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/source-iottwinmaker bumped from 7.2.0 to 7.2.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/source-iotsitewise bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/testing-util bumped from 7.2.0 to 7.2.1 + * @iot-app-kit/ts-config bumped from 7.2.0 to 7.2.1 + * eslint-config-iot-app-kit bumped from 7.2.0 to 7.2.1 + +## [7.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.1.0...react-components-v7.2.0) (2023-08-17) + + +### Features + +* **dashboard:** add advanced search using knowledge graph to query editor ([8722b33](https://github.com/awslabs/iot-app-kit/commit/8722b338a919d6fb51b21a861cf7e96e44246dbd)) +* **echarts:** threshold support ([2d7ccfe](https://github.com/awslabs/iot-app-kit/commit/2d7ccfe6695070126b60f352733ef1512c966984)) +* **react-component:** adding config service to toggle echarts ([96d0351](https://github.com/awslabs/iot-app-kit/commit/96d0351b7e20a728154d3ebfed0efd5205b841bd)) +* **react-component:** adding context menu per chart ([a368eb9](https://github.com/awslabs/iot-app-kit/commit/a368eb99b230f2a5a8bb39d7c0bc52e42ae9f5ad)) +* **react-component:** adding sorting ability for the chart legends ([ca330eb](https://github.com/awslabs/iot-app-kit/commit/ca330eb711923a32531871b714c2252fe31850ae)) +* **react-component:** adding trendcursor sync component ([52d6033](https://github.com/awslabs/iot-app-kit/commit/52d6033337937c5b7b1774d5a5b04907e126df60)) +* **react-components:** add a sitewise connected chart story ([b66de3b](https://github.com/awslabs/iot-app-kit/commit/b66de3b4d87ac2a3157c6cae176a216dff1ceb92)) +* **react-components:** add multiple y axis legend ([79023c0](https://github.com/awslabs/iot-app-kit/commit/79023c025e09e3ad485c84ad1d54b0ed2e0e0589)) +* **react-components:** supporting live mode in echarts ([cdf1caa](https://github.com/awslabs/iot-app-kit/commit/cdf1caab9399cc770c91c3fd40ffde23e7795ab5)) + + +### Bug Fixes + +* **3DKG:** fix height flexibility for KG component ([f9943ce](https://github.com/awslabs/iot-app-kit/commit/f9943cee4741da7b5fc2f11f67a429424c2d88b7)) +* **react-component:** removing the dependency of the yMin and Ymax and ([9360fe4](https://github.com/awslabs/iot-app-kit/commit/9360fe42e081263ccd1896f47fb5d8a7ba6b1d0f)) +* **react-component:** removing transition animation for trend cursors ([5e84d15](https://github.com/awslabs/iot-app-kit/commit/5e84d15fcecb7ee0e1f242fd0f1ce47960818696)) +* **react-components:** add memoization for chart reactivity and refactor echarts hook ([128f5b0](https://github.com/awslabs/iot-app-kit/commit/128f5b0c2f8a1c164241ef216d5d489d9d69164c)) +* **react-component:** updating the sytling and adding some visual ques for the trend cursors ([dc50a2c](https://github.com/awslabs/iot-app-kit/commit/dc50a2c8c04167f1137deec350d735847d6d233a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/core bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/core-util bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.1.0 to 7.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/source-iotsitewise bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/testing-util bumped from 7.1.0 to 7.2.0 + * @iot-app-kit/ts-config bumped from 7.1.0 to 7.2.0 + * eslint-config-iot-app-kit bumped from 7.1.0 to 7.2.0 + +## [7.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v7.0.0...react-components-v7.1.0) (2023-07-28) + + +### Miscellaneous Chores + +* **react-components:** Synchronize iot-app-kit versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/core bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/core-util bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 7.0.0 to 7.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/source-iotsitewise bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/testing-util bumped from 7.0.0 to 7.1.0 + * @iot-app-kit/ts-config bumped from 7.0.0 to 7.1.0 + * eslint-config-iot-app-kit bumped from 7.0.0 to 7.1.0 + +## [7.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.3.1...react-components-v7.0.0) (2023-07-25) + + +### Features + +* **react-component:** adding drag and delete to TC ([7c6a017](https://github.com/awslabs/iot-app-kit/commit/7c6a017eaad9fe4c2f6881adb7e807f4b154f93c)) +* **react-component:** adding resizability for Charts components ([3ae7f56](https://github.com/awslabs/iot-app-kit/commit/3ae7f568a30947782c2d29ecf72eacf3df31d18b)) +* **react-component:** adding TC markers ([4105adb](https://github.com/awslabs/iot-app-kit/commit/4105adb218fbf05b6145348d660fc24b2cec0b66)) +* **react-component:** adding the inital implementation of the trend cursors ([ce37fe2](https://github.com/awslabs/iot-app-kit/commit/ce37fe21a36f13fe1438c0653eb47992d774b15e)) +* **react-components:** add menu component ([cdd196e](https://github.com/awslabs/iot-app-kit/commit/cdd196ebcf42b5ddbdc34005fe4b54ae24767609)) +* **react-components:** add time selection component to react components ([e99f301](https://github.com/awslabs/iot-app-kit/commit/e99f3011a063c861cc22264687a9f3d5d9d56841)) +* **react-components:** adding resizing to trend cursors ([400189a](https://github.com/awslabs/iot-app-kit/commit/400189a221f16123ce193222eacd2583ea25360a)) +* **react-components:** feature flag context ([d313682](https://github.com/awslabs/iot-app-kit/commit/d31368282b9f5882c6f6cef0a66c2c085ee56aff)) +* **Vite:** migrate example app to vite ([d2e65be](https://github.com/awslabs/iot-app-kit/commit/d2e65bed32dc3c470b52d418dacb61610c16ab5a)) + + +### Bug Fixes + +* **react-components:** ensure provider is unsubscribed correctly ([2db74d2](https://github.com/awslabs/iot-app-kit/commit/2db74d2d51f1104478540528cb4be982c4afc351)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/core bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/core-util bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.3.1 to 7.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/source-iotsitewise bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/testing-util bumped from 6.3.1 to 7.0.0 + * @iot-app-kit/ts-config bumped from 6.3.1 to 7.0.0 + * eslint-config-iot-app-kit bumped from 6.3.1 to 7.0.0 + +## [6.3.1](https://github.com/awslabs/iot-app-kit/compare/root-v6.3.0...root-v6.3.1) (2023-06-28) + +## Fix +* **Emergency revert** + +## [6.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.2.0...react-components-v6.3.0) (2023-06-23) + + +### Features + +* **react-components:** add significant digits configuration for charts ([41cba0e](https://github.com/awslabs/iot-app-kit/commit/41cba0e655ac944889d6f15db56282a30e53997e)) +* **react-components:** base echarts ([bc6ee62](https://github.com/awslabs/iot-app-kit/commit/bc6ee6250417a7d71f6aaf0692f1a02d4059b8f6)) + + +### Bug Fixes + +* **dashboard:** fixed the flash of graphs on change in query(s) ([45edc69](https://github.com/awslabs/iot-app-kit/commit/45edc69ae67796ce9566c491a8f39921029ad0a0)) +* **KG Component:** ux review changes ([9133094](https://github.com/awslabs/iot-app-kit/commit/9133094b7352676277e951dda2c92cb0db566488)) +* **knowledge-graph:** fix node to node selection and layout adjustment ([98df518](https://github.com/awslabs/iot-app-kit/commit/98df518f25cc3a15254917520a1750d013fc2984)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/core bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/core-util bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.2.0 to 6.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/source-iotsitewise bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/testing-util bumped from 6.2.0 to 6.3.0 + * @iot-app-kit/ts-config bumped from 6.2.0 to 6.3.0 + * eslint-config-iot-app-kit bumped from 6.2.0 to 6.3.0 + +## [6.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.1.0...react-components-v6.2.0) (2023-06-07) + + +### Features + +* **Knowledge Graph:** adding clear and render graph results events ([5479a51](https://github.com/awslabs/iot-app-kit/commit/5479a51b85574d4c751c8e0aba40fa54e76d7504)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/core bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/core-util bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.1.0 to 6.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/source-iotsitewise bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/testing-util bumped from 6.1.0 to 6.2.0 + * @iot-app-kit/ts-config bumped from 6.1.0 to 6.2.0 + * eslint-config-iot-app-kit bumped from 6.1.0 to 6.2.0 + +## [6.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v6.0.0...react-components-v6.1.0) (2023-06-06) + + +### Features + +* **KG Component:** event modeling ([b918237](https://github.com/awslabs/iot-app-kit/commit/b918237e82738cf1dbc61f95c303881b65166abb)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/core bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/core-util bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 6.0.0 to 6.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/source-iotsitewise bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/testing-util bumped from 6.0.0 to 6.1.0 + * @iot-app-kit/ts-config bumped from 6.0.0 to 6.1.0 + * eslint-config-iot-app-kit bumped from 6.0.0 to 6.1.0 + +## [6.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.9.0...react-components-v6.0.0) (2023-06-05) + + +### ⚠ BREAKING CHANGES + +* aggregation and resolution picker + +### Features + +* aggregation and resolution picker ([77a53fe](https://github.com/awslabs/iot-app-kit/commit/77a53feffdb1956707dca5d45f43a1f7ea0c5453)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/core bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/core-util bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.9.0 to 6.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/source-iotsitewise bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/testing-util bumped from 5.9.0 to 6.0.0 + * @iot-app-kit/ts-config bumped from 5.9.0 to 6.0.0 + * eslint-config-iot-app-kit bumped from 5.9.0 to 6.0.0 + +## [5.9.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.8.1...react-components-v5.9.0) (2023-06-01) + + +### Features + +* **Knowledge Graph:** adding KG parent component, search and explore logic ([95cc307](https://github.com/awslabs/iot-app-kit/commit/95cc307d6fcf2592d376830283069ddce463d0cf)) + + +### Bug Fixes + +* graph css not distributed correctly ([d7b2717](https://github.com/awslabs/iot-app-kit/commit/d7b2717647507533bfeda81774c44a3c5727e15c)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/core bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/core-util bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.8.1 to 5.9.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/source-iotsitewise bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/testing-util bumped from 5.8.1 to 5.9.0 + * @iot-app-kit/ts-config bumped from 5.8.1 to 5.9.0 + * eslint-config-iot-app-kit bumped from 5.8.1 to 5.9.0 + +## [5.8.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.8.0...react-components-v5.8.1) (2023-05-19) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/core bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/core-util bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/source-iottwinmaker bumped from 5.8.0 to 5.8.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/source-iotsitewise bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/testing-util bumped from 5.8.0 to 5.8.1 + * @iot-app-kit/ts-config bumped from 5.8.0 to 5.8.1 + * eslint-config-iot-app-kit bumped from 5.8.0 to 5.8.1 + +## [5.8.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.7.0...react-components-v5.8.0) (2023-05-18) + + +### Features + +* **GraphVisualization:** graph data visualizer ([13e004a](https://github.com/awslabs/iot-app-kit/commit/13e004a3c9256cc20af1e49dd52737b17ae7078b)) +* **SkinVisualization:** enable default style for visualization and allow overrides ([6240195](https://github.com/awslabs/iot-app-kit/commit/624019522a940bc9cf5c69253156db871576302d)) + + +### Bug Fixes + +* **scene composer:** refactoring video player to work with react 18 updates ([c177802](https://github.com/awslabs/iot-app-kit/commit/c1778025babf75d89d74c1b355f54e46f2e740be)) +* **video-player:** video seek percent calculation ([828e4f1](https://github.com/awslabs/iot-app-kit/commit/828e4f18dfe5f25ddd6f045f921f24ffba35535c)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/core bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/core-util bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.7.0 to 5.8.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/source-iotsitewise bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/testing-util bumped from 5.7.0 to 5.8.0 + * @iot-app-kit/ts-config bumped from 5.7.0 to 5.8.0 + * eslint-config-iot-app-kit bumped from 5.7.0 to 5.8.0 + +## [5.7.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.6.0...react-components-v5.7.0) (2023-05-02) + + +### Bug Fixes + +* no flash of error, remove ghosting ([5a2723b](https://github.com/awslabs/iot-app-kit/commit/5a2723ba9cb78d3b4fbd6ed64e9c1558d6a01c98)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/core bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/core-util bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.6.0 to 5.7.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/source-iotsitewise bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/testing-util bumped from 5.6.0 to 5.7.0 + * @iot-app-kit/ts-config bumped from 5.6.0 to 5.7.0 + * eslint-config-iot-app-kit bumped from 5.6.0 to 5.7.0 + +## [5.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.5.2...react-components-v5.6.0) (2023-04-20) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/core bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/core-util bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.5.2 to 5.6.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/source-iotsitewise bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/testing-util bumped from 5.5.2 to 5.6.0 + * @iot-app-kit/ts-config bumped from 5.5.2 to 5.6.0 + * eslint-config-iot-app-kit bumped from 5.5.2 to 5.6.0 + +## [5.5.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.5.1...react-components-v5.5.2) (2023-04-19) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/core bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/core-util bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/source-iottwinmaker bumped from 5.5.1 to 5.5.2 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/source-iotsitewise bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/testing-util bumped from 5.5.1 to 5.5.2 + * @iot-app-kit/ts-config bumped from 5.5.1 to 5.5.2 + * eslint-config-iot-app-kit bumped from 5.5.1 to 5.5.2 + +## [5.5.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.5.0...react-components-v5.5.1) (2023-04-14) + + +### Bug Fixes + +* **react-components:** useTimeSeriesData hook works when number of queries changes ([feb6076](https://github.com/awslabs/iot-app-kit/commit/feb607642299fb90fb9f70f8cd4b76007bd5791e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/core bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/core-util bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/source-iottwinmaker bumped from 5.5.0 to 5.5.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/source-iotsitewise bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/testing-util bumped from 5.5.0 to 5.5.1 + * @iot-app-kit/ts-config bumped from 5.5.0 to 5.5.1 + * eslint-config-iot-app-kit bumped from 5.5.0 to 5.5.1 + +## [5.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.4.0...react-components-v5.5.0) (2023-04-13) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/core bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/core-util bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.4.0 to 5.5.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/source-iotsitewise bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/testing-util bumped from 5.4.0 to 5.5.0 + * @iot-app-kit/ts-config bumped from 5.4.0 to 5.5.0 + * eslint-config-iot-app-kit bumped from 5.4.0 to 5.5.0 + +## [5.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.3.0...react-components-v5.4.0) (2023-04-12) + + +### Bug Fixes + +* **dashboard:** fix tooltip positioning ([cc82474](https://github.com/awslabs/iot-app-kit/commit/cc824747e85a56c35c590020dd185d576f45ee6f)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/core bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/core-util bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.3.0 to 5.4.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/source-iotsitewise bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/testing-util bumped from 5.3.0 to 5.4.0 + * @iot-app-kit/ts-config bumped from 5.3.0 to 5.4.0 + * eslint-config-iot-app-kit bumped from 5.3.0 to 5.4.0 + +## [5.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.2.0...react-components-v5.3.0) (2023-04-12) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/core bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/core-util bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.2.0 to 5.3.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/source-iotsitewise bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/testing-util bumped from 5.2.0 to 5.3.0 + * @iot-app-kit/ts-config bumped from 5.2.0 to 5.3.0 + * eslint-config-iot-app-kit bumped from 5.2.0 to 5.3.0 + +## [5.2.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.1.1...react-components-v5.2.0) (2023-04-05) + + +### Bug Fixes + +* **react-components:** add core-util as a dependency ([5c4d420](https://github.com/awslabs/iot-app-kit/commit/5c4d4209d364640aebb78134fc08bc32707795f0)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/core bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/core-util bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.1.1 to 5.2.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/source-iotsitewise bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/testing-util bumped from 5.1.1 to 5.2.0 + * @iot-app-kit/ts-config bumped from 5.1.1 to 5.2.0 + * eslint-config-iot-app-kit bumped from 5.1.1 to 5.2.0 + +## [5.1.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.1.0...react-components-v5.1.1) (2023-04-03) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/core bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/source-iottwinmaker bumped from 5.1.0 to 5.1.1 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/source-iotsitewise bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/testing-util bumped from 5.1.0 to 5.1.1 + * @iot-app-kit/ts-config bumped from 5.1.0 to 5.1.1 + * eslint-config-iot-app-kit bumped from 5.1.0 to 5.1.1 + +## [5.1.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v5.0.0...react-components-v5.1.0) (2023-04-03) + + +### Features + +* **charts:** add legend to charts ([0abfcf6](https://github.com/awslabs/iot-app-kit/commit/0abfcf6c5a325ee24290d5ac990703e24f6db3f0)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/core bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/source-iottwinmaker bumped from 5.0.0 to 5.1.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/source-iotsitewise bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/testing-util bumped from 5.0.0 to 5.1.0 + * @iot-app-kit/ts-config bumped from 5.0.0 to 5.1.0 + * eslint-config-iot-app-kit bumped from 5.0.0 to 5.1.0 + +## [5.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.3...react-components-v5.0.0) (2023-03-31) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([64e64b8](https://github.com/awslabs/iot-app-kit/commit/64e64b800ad3b6ddbee78cfe84c3750e73dead65)) +* **all:** release 4.0.3 ([2b933ba](https://github.com/awslabs/iot-app-kit/commit/2b933ba31e60666323df7bfae0e962698636a4bf)) +* **all:** release version 4.0.2 ([72ca893](https://github.com/awslabs/iot-app-kit/commit/72ca8930db4de95e56381c7f79c9d934230c2283)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([4f17201](https://github.com/awslabs/iot-app-kit/commit/4f17201f5990876b67861f091dbdcdb5345a28c2)) +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([16451b1](https://github.com/awslabs/iot-app-kit/commit/16451b12e0fe2662069275185b2fea61048d3fab)) +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **dashboard:** assign default color based on cloudscape design ([5855096](https://github.com/awslabs/iot-app-kit/commit/58550960ce402c6e18ee25ffee87945a6aeb4f77)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **EnvironmentModel:** Adding support for environment overlay ([#262](https://github.com/awslabs/iot-app-kit/issues/262)) ([0277027](https://github.com/awslabs/iot-app-kit/commit/0277027d59f232c2c8e29fac0bc53399a1eb9c1e)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([f4239cf](https://github.com/awslabs/iot-app-kit/commit/f4239cf1ca201044095004a2e6c358f3a4c90ebc)) +* Introduce alarms ([#135](https://github.com/awslabs/iot-app-kit/issues/135)) ([5c19b99](https://github.com/awslabs/iot-app-kit/commit/5c19b9957c05fbc8df15545ae9847d39030b686b)) +* **props:** adapt props for synchro-charts ([#133](https://github.com/awslabs/iot-app-kit/issues/133)) ([a98bf06](https://github.com/awslabs/iot-app-kit/commit/a98bf064f14979823f51437dbd599259b6bd6d78)) +* **react-comp:** isThresholdBreached checks all comparison ops ([de3fe49](https://github.com/awslabs/iot-app-kit/commit/de3fe495b764d45dd9c364b93f2e5898d2cb661e)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) +* **react-comp:** sync viewports using @iot-app-kit/charts pckg ([08c7eda](https://github.com/awslabs/iot-app-kit/commit/08c7eda38c600120aebe228285c5c1dc311ab8af)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) +* **TwinMaker:** Add TwinMaker packages ([#252](https://github.com/awslabs/iot-app-kit/issues/252)) ([fabbe03](https://github.com/awslabs/iot-app-kit/commit/fabbe0399dd37293e99588124404c37c929f4330)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **charts:** fix live mode viewport scrollingbug ([dbea3ff](https://github.com/awslabs/iot-app-kit/commit/dbea3ff3f1908a6a48b1ca9ee5c654f9b55eb616)) +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **dashboard:** update props passed to kpi and status components based on new api ([e2023c9](https://github.com/awslabs/iot-app-kit/commit/e2023c92ecfea6cac947f5c5f795001395ad2bd4)) +* **react-components, videoPlayer:** fix propertiesNotChanged for videoPlayer ([11665c0](https://github.com/awslabs/iot-app-kit/commit/11665c0af13e98dc6602d8bf8aac7733d063633c)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) +* **ReactComponents:** configure table, kpi and status to always fetch raw data ([c02b566](https://github.com/awslabs/iot-app-kit/commit/c02b566cad9aa2b8e700765f7923df2d4a6fbec4)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) +* **UITests:** fix dashbaord e2e tests ([dd98c0e](https://github.com/awslabs/iot-app-kit/commit/dd98c0ea9ccd6a7dacc9ee5f994ccce7007f0b21)) +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/core bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.3 to 5.0.0 + * devDependencies + * @iot-app-kit/jest-config bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/source-iotsitewise bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/testing-util bumped from 4.0.3 to 5.0.0 + * @iot-app-kit/ts-config bumped from 4.0.3 to 5.0.0 + * eslint-config-iot-app-kit bumped from 4.0.3 to 5.0.0 + +## [4.0.3](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.2...react-components-v4.0.3) (2023-03-31) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([64e64b8](https://github.com/awslabs/iot-app-kit/commit/64e64b800ad3b6ddbee78cfe84c3750e73dead65)) +* **all:** release version 4.0.2 ([72ca893](https://github.com/awslabs/iot-app-kit/commit/72ca8930db4de95e56381c7f79c9d934230c2283)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([4f17201](https://github.com/awslabs/iot-app-kit/commit/4f17201f5990876b67861f091dbdcdb5345a28c2)) +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([16451b1](https://github.com/awslabs/iot-app-kit/commit/16451b12e0fe2662069275185b2fea61048d3fab)) +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **dashboard:** assign default color based on cloudscape design ([5855096](https://github.com/awslabs/iot-app-kit/commit/58550960ce402c6e18ee25ffee87945a6aeb4f77)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **EnvironmentModel:** Adding support for environment overlay ([#262](https://github.com/awslabs/iot-app-kit/issues/262)) ([0277027](https://github.com/awslabs/iot-app-kit/commit/0277027d59f232c2c8e29fac0bc53399a1eb9c1e)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([f4239cf](https://github.com/awslabs/iot-app-kit/commit/f4239cf1ca201044095004a2e6c358f3a4c90ebc)) +* Introduce alarms ([#135](https://github.com/awslabs/iot-app-kit/issues/135)) ([5c19b99](https://github.com/awslabs/iot-app-kit/commit/5c19b9957c05fbc8df15545ae9847d39030b686b)) +* **props:** adapt props for synchro-charts ([#133](https://github.com/awslabs/iot-app-kit/issues/133)) ([a98bf06](https://github.com/awslabs/iot-app-kit/commit/a98bf064f14979823f51437dbd599259b6bd6d78)) +* **react-comp:** isThresholdBreached checks all comparison ops ([de3fe49](https://github.com/awslabs/iot-app-kit/commit/de3fe495b764d45dd9c364b93f2e5898d2cb661e)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) +* **react-comp:** sync viewports using @iot-app-kit/charts pckg ([08c7eda](https://github.com/awslabs/iot-app-kit/commit/08c7eda38c600120aebe228285c5c1dc311ab8af)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) +* **TwinMaker:** Add TwinMaker packages ([#252](https://github.com/awslabs/iot-app-kit/issues/252)) ([fabbe03](https://github.com/awslabs/iot-app-kit/commit/fabbe0399dd37293e99588124404c37c929f4330)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **charts:** fix live mode viewport scrollingbug ([dbea3ff](https://github.com/awslabs/iot-app-kit/commit/dbea3ff3f1908a6a48b1ca9ee5c654f9b55eb616)) +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **dashboard:** update props passed to kpi and status components based on new api ([e2023c9](https://github.com/awslabs/iot-app-kit/commit/e2023c92ecfea6cac947f5c5f795001395ad2bd4)) +* **react-components, videoPlayer:** fix propertiesNotChanged for videoPlayer ([11665c0](https://github.com/awslabs/iot-app-kit/commit/11665c0af13e98dc6602d8bf8aac7733d063633c)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) +* **ReactComponents:** configure table, kpi and status to always fetch raw data ([c02b566](https://github.com/awslabs/iot-app-kit/commit/c02b566cad9aa2b8e700765f7923df2d4a6fbec4)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) +* **UITests:** fix dashbaord e2e tests ([dd98c0e](https://github.com/awslabs/iot-app-kit/commit/dd98c0ea9ccd6a7dacc9ee5f994ccce7007f0b21)) +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/core bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.2 to 4.0.3 + * devDependencies + * @iot-app-kit/jest-config bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/source-iotsitewise bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/testing-util bumped from 4.0.2 to 4.0.3 + * @iot-app-kit/ts-config bumped from 4.0.2 to 4.0.3 + * eslint-config-iot-app-kit bumped from 4.0.2 to 4.0.3 + +## [4.0.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.1...react-components-v4.0.2) (2023-03-30) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([64e64b8](https://github.com/awslabs/iot-app-kit/commit/64e64b800ad3b6ddbee78cfe84c3750e73dead65)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([4f17201](https://github.com/awslabs/iot-app-kit/commit/4f17201f5990876b67861f091dbdcdb5345a28c2)) +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([16451b1](https://github.com/awslabs/iot-app-kit/commit/16451b12e0fe2662069275185b2fea61048d3fab)) +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **dashboard:** assign default color based on cloudscape design ([5855096](https://github.com/awslabs/iot-app-kit/commit/58550960ce402c6e18ee25ffee87945a6aeb4f77)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **EnvironmentModel:** Adding support for environment overlay ([#262](https://github.com/awslabs/iot-app-kit/issues/262)) ([0277027](https://github.com/awslabs/iot-app-kit/commit/0277027d59f232c2c8e29fac0bc53399a1eb9c1e)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([f4239cf](https://github.com/awslabs/iot-app-kit/commit/f4239cf1ca201044095004a2e6c358f3a4c90ebc)) +* Introduce alarms ([#135](https://github.com/awslabs/iot-app-kit/issues/135)) ([5c19b99](https://github.com/awslabs/iot-app-kit/commit/5c19b9957c05fbc8df15545ae9847d39030b686b)) +* **props:** adapt props for synchro-charts ([#133](https://github.com/awslabs/iot-app-kit/issues/133)) ([a98bf06](https://github.com/awslabs/iot-app-kit/commit/a98bf064f14979823f51437dbd599259b6bd6d78)) +* **react-comp:** isThresholdBreached checks all comparison ops ([de3fe49](https://github.com/awslabs/iot-app-kit/commit/de3fe495b764d45dd9c364b93f2e5898d2cb661e)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) +* **react-comp:** sync viewports using @iot-app-kit/charts pckg ([08c7eda](https://github.com/awslabs/iot-app-kit/commit/08c7eda38c600120aebe228285c5c1dc311ab8af)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) +* **TwinMaker:** Add TwinMaker packages ([#252](https://github.com/awslabs/iot-app-kit/issues/252)) ([fabbe03](https://github.com/awslabs/iot-app-kit/commit/fabbe0399dd37293e99588124404c37c929f4330)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **charts:** fix live mode viewport scrollingbug ([dbea3ff](https://github.com/awslabs/iot-app-kit/commit/dbea3ff3f1908a6a48b1ca9ee5c654f9b55eb616)) +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **dashboard:** update props passed to kpi and status components based on new api ([e2023c9](https://github.com/awslabs/iot-app-kit/commit/e2023c92ecfea6cac947f5c5f795001395ad2bd4)) +* **react-components, videoPlayer:** fix propertiesNotChanged for videoPlayer ([11665c0](https://github.com/awslabs/iot-app-kit/commit/11665c0af13e98dc6602d8bf8aac7733d063633c)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) +* **ReactComponents:** configure table, kpi and status to always fetch raw data ([c02b566](https://github.com/awslabs/iot-app-kit/commit/c02b566cad9aa2b8e700765f7923df2d4a6fbec4)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) +* **UITests:** fix dashbaord e2e tests ([dd98c0e](https://github.com/awslabs/iot-app-kit/commit/dd98c0ea9ccd6a7dacc9ee5f994ccce7007f0b21)) +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.1 to 4.0.2 + * @iot-app-kit/core bumped from 4.0.1 to 4.0.2 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.1 to 4.0.2 + * devDependencies + * @iot-app-kit/jest-config bumped from * to 4.0.2 + * @iot-app-kit/source-iotsitewise bumped from 4.0.1 to 4.0.2 + * @iot-app-kit/testing-util bumped from * to 4.0.2 + * @iot-app-kit/ts-config bumped from * to 4.0.2 + * eslint-config-iot-app-kit bumped from * to 4.0.2 + +## [4.0.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v4.0.0...react-components-v4.0.1) (2023-03-28) + + +### ⚠ BREAKING CHANGES + +* **ReactComponents:** remove web-component iot app kit visualizations + +### Features + +* **ReactComponents:** support alarms via thresholds ingested from useTimeSeriesData hook ([4df9ff0](https://github.com/awslabs/iot-app-kit/commit/4df9ff00083239e3eb32b7766ec16396a5f7deb4)) +* **time-sync:** useViewport returns a group ([c12349b](https://github.com/awslabs/iot-app-kit/commit/c12349b17e7ed917babd394a05c7a47f0b8bccc0)) +* **TimeSync:** add a lastUsedBy string to the useViewport hook ([526f059](https://github.com/awslabs/iot-app-kit/commit/526f059dcfe74d8590b9ee0add435700d3ed943d)) + + +### Bug Fixes + +* **BarChart:** prevent bar chart from trying to request raw data by default ([6845d95](https://github.com/awslabs/iot-app-kit/commit/6845d95789861a1d6d97cfb4322f6371983de729)) +* **react-components:** fix binding styles in `useTimeSeriesData` hook ([c1c0125](https://github.com/awslabs/iot-app-kit/commit/c1c012577448c6e07090b23ad988e39a3d530bb6)) + + +### Code Refactoring + +* **ReactComponents:** remove web-component iot app kit visualizations ([e0cb301](https://github.com/awslabs/iot-app-kit/commit/e0cb301d1dc204f55684cbd61d4d5c2b66276556)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 4.0.0 to 4.0.1 + * @iot-app-kit/core bumped from 4.0.0 to 4.0.1 + * @iot-app-kit/source-iottwinmaker bumped from 4.0.0 to 4.0.1 + * devDependencies + * @iot-app-kit/source-iotsitewise bumped from ^4.0.0 to ^4.0.1 + +## [4.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v3.0.0...react-components-v4.0.0) (2023-03-15) + + +### ⚠ BREAKING CHANGES + +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper + +### Features + +* **dashboard:** add table support to dashboard ([1d8d44e](https://github.com/awslabs/iot-app-kit/commit/1d8d44e2a7bb67811de9702efa23dbdd5653f572)) +* **React18:** Adds support for react 18 ([596c6b0](https://github.com/awslabs/iot-app-kit/commit/596c6b0ca2757baf445e4b203c3546e2d041e559)) +* **TableComponent:** replace table annotations API with thresholds, remove stencilJS wrapper ([74880c4](https://github.com/awslabs/iot-app-kit/commit/74880c44117c12a494f6c6591f0c6df21cd7d00f)) + + +### Bug Fixes + +* **components:** fix connector to iot app kit components ([be91864](https://github.com/awslabs/iot-app-kit/commit/be91864aee326c1c3fd5320b30b86d34f9f246d0)) +* **react-components:** set timezone for jest to UTC to prevent local test failures ([44c3793](https://github.com/awslabs/iot-app-kit/commit/44c379338a2a9110600a0502e37ae4dceaf0ab09)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from 3.0.0 to 4.0.0 + * @iot-app-kit/core bumped from 3.0.0 to 4.0.0 + * @iot-app-kit/source-iottwinmaker bumped from 3.0.0 to 4.0.0 + * devDependencies + * @iot-app-kit/source-iotsitewise bumped from ^3.0.0 to ^4.0.0 + +## [3.0.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.5...react-components-v3.0.0) (2023-03-04) + + +### ⚠ BREAKING CHANGES + +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) + +### Features + +* **core, source-iotsitewise, source-iottwinmaker, react-components:** Add toQueryString method on Query type, implement in iotsitewise and iottwinmaker ([#634](https://github.com/awslabs/iot-app-kit/issues/634)) ([38a4b98](https://github.com/awslabs/iot-app-kit/commit/38a4b9833ba45eb54585581d661badd93162540c)) +* **dashboard:** initial dashboard work ([06cc210](https://github.com/awslabs/iot-app-kit/commit/06cc21079dc0446a06c72db676dba27f05a1606f)) +* **react-components:** publish TimeSync component as part of the public API ([#621](https://github.com/awslabs/iot-app-kit/issues/621)) ([a4e2f66](https://github.com/awslabs/iot-app-kit/commit/a4e2f66e6a0a2d58eb1a5316ac3fab4520dd3161)) +* **react-components:** release useViewport hook ([#631](https://github.com/awslabs/iot-app-kit/issues/631)) ([794b4a4](https://github.com/awslabs/iot-app-kit/commit/794b4a49c70824836ac0fadf8008d0937059d16d)) + + +### Bug Fixes + +* Remove unecessary exports, utilize core types instead of SynchroChart types ([#600](https://github.com/awslabs/iot-app-kit/issues/600)) ([15d6740](https://github.com/awslabs/iot-app-kit/commit/15d67401b7e152eeba1e550efc75faf79cefbf7e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/components bumped from * to 3.0.0 + * @iot-app-kit/core bumped from * to 3.0.0 + * @iot-app-kit/source-iottwinmaker bumped from * to 3.0.0 + +## [2.6.5](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.4...react-components-v2.6.5) (2023-01-25) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.4 to ^2.6.5 + * @iot-app-kit/components bumped from ^2.6.4 to ^2.6.5 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.4 to ^2.6.5 + +## [2.6.4](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.3...react-components-v2.6.4) (2023-01-23) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.3 to ^2.6.4 + * @iot-app-kit/components bumped from ^2.6.3 to ^2.6.4 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.3 to ^2.6.4 + +## [2.6.3](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.2...react-components-v2.6.3) (2023-01-13) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.2 to ^2.6.3 + * @iot-app-kit/components bumped from ^2.6.2 to ^2.6.3 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.2 to ^2.6.3 + +## [2.6.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.1...react-components-v2.6.2) (2023-01-09) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.1 to ^2.6.2 + * @iot-app-kit/components bumped from ^2.6.1 to ^2.6.2 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.1 to ^2.6.2 + +## [2.6.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.6.0...react-components-v2.6.1) (2023-01-09) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.6.0 to ^2.6.1 + * @iot-app-kit/components bumped from ^2.6.0 to ^2.6.1 + * @iot-app-kit/source-iottwinmaker bumped from ^2.6.0 to ^2.6.1 + +## [2.6.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.5.1...react-components-v2.6.0) (2022-12-19) + + +### Bug Fixes + +* **video-player:** use static timestamps instead dynamic ones ([1e434a6](https://github.com/awslabs/iot-app-kit/commit/1e434a6632c6dd797f9d0dacd3ed3547622d93c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.5.1 to ^2.6.0 + * @iot-app-kit/components bumped from ^2.5.1 to ^2.6.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.5.1 to ^2.6.0 + +## [2.5.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.5.0...react-components-v2.5.1) (2022-11-16) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.5.0 to ^2.5.1 + * @iot-app-kit/components bumped from ^2.5.0 to ^2.5.1 + * @iot-app-kit/source-iottwinmaker bumped from ^2.5.0 to ^2.5.1 + +## [2.5.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.4.2...react-components-v2.5.0) (2022-11-11) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.4.2 to ^2.5.0 + * @iot-app-kit/components bumped from ^2.4.2 to ^2.5.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.4.2 to ^2.5.0 + +## [2.4.2](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.4.1...react-components-v2.4.2) (2022-11-08) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.4.1 to ^2.4.2 + * @iot-app-kit/components bumped from ^2.4.1 to ^2.4.2 + * @iot-app-kit/source-iottwinmaker bumped from ^2.4.1 to ^2.4.2 + +## [2.4.1](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.4.0...react-components-v2.4.1) (2022-11-07) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.4.0 to ^2.4.1 + * @iot-app-kit/components bumped from ^2.4.0 to ^2.4.1 + * @iot-app-kit/source-iottwinmaker bumped from ^2.4.0 to ^2.4.1 + +## [2.4.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.3.0...react-components-v2.4.0) (2022-11-04) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.3.0 to ^2.4.0 + * @iot-app-kit/components bumped from ^2.3.0 to ^2.4.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.3.0 to ^2.4.0 + +## [2.3.0](https://github.com/awslabs/iot-app-kit/compare/react-components-v2.2.0...react-components-v2.3.0) (2022-11-02) + + +### Miscellaneous Chores + +* **react-components:** Synchronize undefined versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @iot-app-kit/core bumped from ^2.2.0 to ^2.3.0 + * @iot-app-kit/components bumped from ^2.2.0 to ^2.3.0 + * @iot-app-kit/source-iottwinmaker bumped from ^2.2.0 to ^2.3.0 + +## 2.2.0 (2022-10-21) + +### Features + +* source-iotsitewise, core, components: + * Introduce alarms support ([9bc221e](https://github.com/awslabs/iot-app-kit/commit/9bc221ef19fc5a9db4360c1d124f41e7b0d896be)) + +* react-components, scene-composer: + * EnvironmentModelComponent for Adding support for environment overlay ([eb91179](https://github.com/awslabs/iot-app-kit/commit/eb911799e555c07c535853661e93237969159ff0)) + +* core, components: + * Support viewport grouping in iot-table ([be5b588](https://github.com/awslabs/iot-app-kit/commit/be5b588a90ec267a2c8cdce24bdea86b45c97136)) + +* scene-composer: + * Removes the dependency on the feature flag for the top bar camera drowpdown ([fb8e333](https://github.com/awslabs/iot-app-kit/commit/fb8e3330cc4f4933ccd6f9cde32b1d4694897358)) + * Add flag to resizable tags ([560e1b1](https://github.com/awslabs/iot-app-kit/commit/560e1b1a2db0f60700b7246626c71f1bc05f49e1)) + +### Bug Fixes + +* scene-composer: + * Camera Component Editor for Lens and Clipping planes updates when changing between cameras ([94c5978](https://github.com/awslabs/iot-app-kit/commit/94c59786aae02a4c9fd088cfc6c9cea516880f3c)) + * improve ViewCursorWidget performance ([58b70bd](https://github.com/awslabs/iot-app-kit/commit/58b70bdc82cd1e4bbcc0c0e7f66bfef3f064e86b)) + * Allows user to hit Esc key to cancel Enhanced Editing ([9c1b9e6](https://github.com/awslabs/iot-app-kit/commit/9c1b9e64c725671adb0766d1c080297389385fd8)) + * selectedDataBinding not able to update selected node ([b23bce2](https://github.com/awslabs/iot-app-kit/commit/b23bce279b81496583c052a0dc69ac9be5994643)) + * use arrow data as texture to avoid public path issue ([0d2e427](https://github.com/awslabs/iot-app-kit/commit/0d2e427354cbd3c0678d579ceaffab84e5e88e5c)) + * fix show svg ([cb6094e](https://github.com/awslabs/iot-app-kit/commit/cb6094e724465ccc11d9f7ae7f7fe3179d4d2596)) + * fix adding tag always attached to root ([775446a](https://github.com/awslabs/iot-app-kit/commit/775446a210877780c2a220092e6b0210edc7ea2c)) + * Fix the tag scaling with parent scale regression ([4483140](https://github.com/awslabs/iot-app-kit/commit/448314018882912a49c8522786bc8ae3c964b7aa)) + * SceneHierarchy Tree Performance ([c74d1dc](https://github.com/awslabs/iot-app-kit/commit/c74d1dc8be97135529d55e994834e7dd3f352ee8)) + * Minimum FOV check introduced ([720b8e8](https://github.com/awslabs/iot-app-kit/commit/720b8e85d3b8329c898638030e32ad1e910c4e62)) + * Fix the camera zoom field locked to 1 or greater ([cada75e](https://github.com/awslabs/iot-app-kit/commit/cada75ec32c81312bf5ee403f10bbf4567c30c05)) + * Add success popup message when updating camera location ([4af9c07](https://github.com/awslabs/iot-app-kit/commit/4af9c0758c8adc04f35c80fae2f39b60460e903a)) + * Update the text from Cameras in the drop down to Camera View ([5687f5e](https://github.com/awslabs/iot-app-kit/commit/5687f5efc38dabbd0ec06ccc5e395576fa3d57e4)) + * fix model shader material color restore ([0786c4a](https://github.com/awslabs/iot-app-kit/commit/0786c4a038cbe93be8a4d7a4b2f7a57bfacd76c2)) + * CSS updates to Scene Hierarchy ([ab3c749](https://github.com/awslabs/iot-app-kit/commit/ab3c7490add7338611533e6b68cecefe0f9cb3a1)) + +* core: + * add currentTime param to viewportStartDate and `viewportEndDate` ([eb02085](https://github.com/awslabs/iot-app-kit/commit/eb02085fd3b0aa987c38278cedc8eba0e56d9fa9)) + +* react-components: + * fix propertiesNotChanged for videoPlayer ([9a360b1](https://github.com/awslabs/iot-app-kit/commit/9a360b10fc87b2e31b4c6a00d9e49a5224e207d0)) + +### Documentation + +* Updating scene-composer documentation for Storybook ([901ff53](https://github.com/awslabs/iot-app-kit/commit/901ff53efc86d0c68f0cbc15dc7be9dfc00b0243)) +* add TwinMaker components to GettingStarted doc ([84e9fdf](https://github.com/awslabs/iot-app-kit/commit/84e9fdfb3b1af3c47343a91ca1259e5e45f1eaac)) + +### Miscellaneous + +* reduce concurrent workers in testing ([e8d6dbc](https://github.com/awslabs/iot-app-kit/commit/e8d6dbcac3f3e2e503e02db0087d5db324e9b521)) +* easier linking for iot-app-kit packages ([44d454d](https://github.com/awslabs/iot-app-kit/commit/44d454d955e22581228d3d77829b8ad27a24fd52)) + +## 2.1.0 (2022-09-30) + +### Features + +* react-components: + * add VideoPlayer and RequestVideoUpload components ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) +* scene-composer: + * add SceneViewer component ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) +* source-iottwinmaker: + * add source-iottwinmaker module ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) + +### Bug Fixes + +* components: + * import missing CSS style sheets. ([f2450bc](https://github.com/awslabs/iot-app-kit/commit/f2450bc17906bff2ad4ac065eb26b36726d530d6)) + +### Documentation + +* add SceneViewer, VideoPlayer and AWSIoTTwinMakerSource documentation and link to main ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919) & [71e59be](https://github.com/awslabs/iot-app-kit/commit/71e59be2ad0abcabb9136cf88c3c6c1d16606390)) +* doc: update link in Coding Guidelines ([ea041cd](https://github.com/awslabs/iot-app-kit/commit/ea041cd8aadcb65b08c5bc09e6baf2958dbbdd35)) + +### Miscellaneous + +* update react / react-dom versions from >=16 to ^17 ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) +* update jest versions from 28 to 27 to be consistent with other modules ([f08c541](https://github.com/awslabs/iot-app-kit/commit/f08c541f017f4bbefae085e45c2ef2e686eb5919)) + +## 2.0.0 (2022-09-14) + +### Miscellaneous +* Migrate to NPM workspaces ([8e200be](https://github.com/awslabs/iot-app-kit/commit/8e200be0401fe6fa989cbf9a1ad96aafd8305a96)) + + +## 1.4.0 (2022-06-09) + + +### Features + +* support auto-assigning colors for certain components ([8df4f15](https://github.com/awslabs/iot-app-kit/commit/8df4f150be4d8d1d8c3b55fe46ec91e6d9a7bb9a)) +* bump synchro-charts to 4.0.1 ([977f461](https://github.com/awslabs/iot-app-kit/commit/977f461504292409cbde7e82166fa32ef0c9a93c)) +* add expanded property to iot-resource-explorer ([dda6ef8](https://github.com/awslabs/iot-app-kit/commit/dda6ef8957617cfcb1c99d4bea06036a896c6aae)) + + + + +## 1.3.0 (2022-04-29) +* update documentation ([a9154ef](https://github.com/awslabs/iot-app-kit/commit/b02ed4a48f1e4cdbf948ac482062df6b3c9d2ab7)) +* automatically define components for the react-components library ([a9154ef](https://github.com/awslabs/iot-app-kit/commit/b02ed4a48f1e4cdbf948ac482062df6b3c9d2ab7)) + +## 1.2.1 (2022-03-11) + + +### Bug Fixes + +* unsubrscribe data provider on component updates ([a9154ef](https://github.com/awslabs/iot-app-kit/commit/a9154eff3f3fcd55eb5ae501354de8530f706108)) + + + + + +# 1.2.0 (2022-03-03) + + +### Bug Fixes + +* attach ResourceExplorer react component onSelectionChange prop ([#81](https://github.com/awslabs/iot-app-kit/issues/81)) + + +### Features + +* export table react component ([#81](https://github.com/awslabs/iot-app-kit/issues/81)) + + + + + +# 1.1.0 (2022-03-01) + + +### Features + +* Export global styles. This will allow imports from @iot-app-kit/components/styles.css ([#72](https://github.com/awslabs/iot-app-kit/issues/72)) + + + + + +# 1.0.0 (2022-02-28) + + +### Features + +* add npm-publish github workflow ([#68](https://github.com/awslabs/iot-app-kit/issues/68)) ([1d14361](https://github.com/awslabs/iot-app-kit/commit/1d14361b88e86ea44ad2d38409dd53c96f550fd3)) +* backfill component integration tests ([#66](https://github.com/awslabs/iot-app-kit/issues/66)) ([ac16b08](https://github.com/awslabs/iot-app-kit/commit/ac16b0807cdb86cbd700e38154bd7a563222560e)) +* create react-components and source-iotsitewise pkgs ([#57](https://github.com/awslabs/iot-app-kit/issues/57)) ([7b0f3cf](https://github.com/awslabs/iot-app-kit/commit/7b0f3cf443d89ff7f89f334d9c5abb7400ab084b)) +* improve documentation and clarity of react-components pkg ([#60](https://github.com/awslabs/iot-app-kit/issues/60)) ([a1615f9](https://github.com/awslabs/iot-app-kit/commit/a1615f958371b14e75550df97e56e0deca3c34e3)) diff --git a/packages/resource-explorer/README.md b/packages/resource-explorer/README.md new file mode 100644 index 000000000..fd569d7fc --- /dev/null +++ b/packages/resource-explorer/README.md @@ -0,0 +1,22 @@ +# IoT Application Kit +[![NPM Version](https://img.shields.io/npm/v/@iot-app-kit/core)](https://npmjs.org/package/@iot-app-kit/core) +[![License](https://img.shields.io/npm/l/@iot-app-kit/core)](https://github.com/awslabs/iot-app-kit/blob/main/LICENSE) +[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@iot-app-kit/core)](https://bundlephobia.com/package/@iot-app-kit/core) +[![Downloads](https://img.shields.io/npm/dw/@iot-app-kit/core)](https://npmjs.org/package/@iot-app-kit/core) + +## Official IoT App Kit documentation site + +#### Please visit [https://awslabs.github.io/iot-app-kit/](https://awslabs.github.io/iot-app-kit/) for docs, guides and more! + +## Overview + +IoT Application Kit is a development library for building Industrial IoT web based applications. + +IoT App Kit is an open-source library consisting of front-end components and utilities. With IoT App Kit, you can build front-end applications and webpages to utilize IoT data. By default, IoT App Kit helps to retrieve data from [AWS IoT SiteWise](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/what-is-sitewise.html) and [AWS IoT TwinMaker](https://docs.aws.amazon.com/iot-twinmaker/latest/guide/what-is-twinmaker.html) You can also install plugins to retrieve data from your own sources. There’s no charge for using IoT App Kit. + +For an example of a real world use case using the IoT App Kit, [visit this tutorial on how to use IoT App Kit](https://aws.amazon.com/blogs/iot/build-iot-applications-using-aws-iot-application-kit/) + +IoT App Kit Demo + +## License +This project is licensed under the Apache-2.0 License. \ No newline at end of file diff --git a/packages/resource-explorer/package.json b/packages/resource-explorer/package.json new file mode 100644 index 000000000..624a8e93b --- /dev/null +++ b/packages/resource-explorer/package.json @@ -0,0 +1,108 @@ +{ + "name": "@iot-app-kit/resource-explorer", + "version": "12.5.0", + "license": "Apache-2.0", + "source": "./src/index.ts", + "type": "module", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", + "exports": { + ".": { + "types": "./dist/esm/index.d.ts", + "require": "./dist/cjs/index.js", + "import": "./dist/esm/index.js", + "default": "./dist/esm/index.js" + } + }, + "files": [ + "dist", + "CHANGELOG.md", + "*NOTICE", + "*styles.css" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "start": "storybook dev -p 6007", + "build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json && npm run copy-assets:es && npm run copy-assets:cjs", + "build:cjs": "tsc -b ./tsconfig.cjs.json && npm run copy-assets:cjs", + "build:es": "tsc -b ./tsconfig.esm.json && npm run copy-assets:es", + "clean": "rimraf dist storybook-static test-results coverage .turbo .cache", + "clean:nuke": "npm run clean && rimraf node_modules", + "copy-assets:es": "copyfiles -e \"**/*.tsx\" -e \"**/*.ts\" -e \"**/*.snap\" -e \"**/*.js\" -e \"**/*.jsx\" -e \"**/*.json\" \"src/**/*\" -u 1 dist/esm/", + "copy-assets:cjs": "copyfiles -e \"**/*.tsx\" -e \"**/*.ts\" -e \"**/*.snap\" -e \"**/*.js\" -e \"**/*.jsx\" -e \"**/*.json\" \"src/**/*\" -u 1 dist/cjs/", + "copy:styles": "cp ../components/styles.css styles.css", + "dev": "tsc -b ./tsconfig.esm.json --watch", + "dev:resource-explorer": "npm start", + "test": "TZ=utc vitest run --silent --coverage", + "test:watch": "TZ=utc vitest --silent", + "test:types": "tsc -p ./tsconfig.json --noEmit", + "lint": "eslint . --max-warnings=0 --cache --cache-location .cache/eslint/", + "fix": "eslint --fix . --cache --cache-location .cache/eslint/", + "copy:license": "cp ../../LICENSE LICENSE", + "copy:notice": "cp ../../NOTICE NOTICE", + "prepack": "npm run copy:license && npm run copy:notice", + "pack": "npm pack" + }, + "devDependencies": { + "@iot-app-kit/testing-util": "12.5.0", + "@iot-app-kit/ts-config": "12.5.0", + "@playwright/test": "^1.48.2", + "@storybook/addon-essentials": "^8.4.5", + "@storybook/addon-links": "^8.4.5", + "@storybook/preview-api": "^8.5.8", + "@storybook/react": "^8.4.5", + "@storybook/react-vite": "^8.4.5", + "@storybook/test": "^8.4.5", + "@tanstack/eslint-plugin-query": "^5.40.1", + "@tanstack/react-query-devtools": "^5.40.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@types/node": "^18.16.18", + "@types/react": "^18.2.12", + "@types/react-dom": "^18.2.5", + "@vitejs/plugin-react": "^4.3.3", + "@vitest/coverage-v8": "^2.1.5", + "babel-plugin-formatjs": "10.5.3", + "copyfiles": "^2.4.1", + "eslint-config-iot-app-kit": "12.5.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "jest-extended": "^3.2.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "rimraf": "^5.0.1", + "storybook": "^8.4.5", + "storybook-dark-mode": "^3.0.3", + "tsconfig-paths-webpack-plugin": "^4.1.0", + "type-fest": "^4.28.1", + "typescript": "^5.5.4", + "vite": "^5.4.12", + "vitest": "^2.1.5", + "vitest-canvas-mock": "^0.3.3" + }, + "dependencies": { + "@cloudscape-design/collection-hooks": "1.0.49", + "@cloudscape-design/components": "3.0.693", + "@cloudscape-design/design-tokens": "3.0.42", + "@cloudscape-design/global-styles": "1.0.32", + "@iot-app-kit/charts-core": "^2.1.2", + "@iot-app-kit/core": "12.5.0", + "@iot-app-kit/core-util": "12.5.0", + "@iot-app-kit/component-core": "12.5.0", + "@iot-app-kit/source-iotsitewise": "12.5.0", + "@tanstack/react-query": "^5.32.1", + "react-use": "17.4.0" + }, + "peerDependencies": { + "@aws-sdk/client-iotsitewise": "^3.696.0", + "react": "^18", + "react-dom": "^18" + }, + "bugs": { + "url": "https://github.com/awslabs/iot-app-kit/issues" + }, + "homepage": "https://github.com/awslabs/iot-app-kit#readme" +} diff --git a/packages/resource-explorer/playwright.config.ts b/packages/resource-explorer/playwright.config.ts new file mode 100644 index 000000000..36861479b --- /dev/null +++ b/packages/resource-explorer/playwright.config.ts @@ -0,0 +1,76 @@ +import { defineConfig, devices } from '@playwright/test'; + +const SECOND_IN_MS = 1000; +const MINUTE_IN_MS = 60_000; + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: './e2e', + expect: { + /** + * Maximum time expect() should wait for the condition to be met. + * For example in `await expect(locator).toHaveText();` + */ + timeout: 100 * SECOND_IN_MS, + toMatchSnapshot: { maxDiffPixels: 200, maxDiffPixelRatio: 0.05 }, + toHaveScreenshot: { maxDiffPixels: 200, maxDiffPixelRatio: 0.05 }, + }, + timeout: 100 * SECOND_IN_MS, + globalTimeout: 5 * MINUTE_IN_MS, + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: [ + ['html', { host: '0.0.0.0' }], + ] /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */, + use: { + /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ + actionTimeout: 0, + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://localhost:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + baseURL: 'http://localhost:6007/', + storageState: { + cookies: [], + origins: [ + { + origin: 'localhost', + localStorage: [ + { name: 'USE_SVG_FOR_ECHARTS_PLAYWRIGHT_TEST_ONLY', value: 'true' }, + ], + }, + ], + }, + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + }, + ], + + /* Folder for test artifacts such as screenshots, videos, traces, etc. */ + // outputDir: 'test-results/', + + /* Run your local dev server before starting the tests */ + webServer: { + command: 'npm run start', + reuseExistingServer: !process.env.CI, + url: 'http://localhost:6007', + timeout: 5 * MINUTE_IN_MS, + stdout: 'pipe', + stderr: 'pipe', + }, +}); diff --git a/packages/react-components/src/components/resource-explorers/constants/defaults.ts b/packages/resource-explorer/src/constants/defaults.ts similarity index 97% rename from packages/react-components/src/components/resource-explorers/constants/defaults.ts rename to packages/resource-explorer/src/constants/defaults.ts index 4e3d60dd0..34b77befa 100644 --- a/packages/react-components/src/components/resource-explorers/constants/defaults.ts +++ b/packages/resource-explorer/src/constants/defaults.ts @@ -1,4 +1,4 @@ -import type { RequestTimeout } from '@iot-app-kit/core'; +import { formatDate, type RequestTimeout } from '@iot-app-kit/core'; import type { IsResourceDisabled, IsTableFilterEnabled, @@ -22,7 +22,6 @@ import type { TableResourceField, } from '../types/table'; import { type DataStreamResourceWithLatestValue } from '../types/resources'; -import { formatDate } from '../../../utils/time'; import { isNumeric, round } from '@iot-app-kit/core-util'; const NO_OP = () => {}; diff --git a/packages/react-components/src/components/resource-explorers/constants/drop-down-resource-definitions.ts b/packages/resource-explorer/src/constants/drop-down-resource-definitions.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/constants/drop-down-resource-definitions.ts rename to packages/resource-explorer/src/constants/drop-down-resource-definitions.ts diff --git a/packages/react-components/src/components/resource-explorers/constants/table-resource-definitions.ts b/packages/resource-explorer/src/constants/table-resource-definitions.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/constants/table-resource-definitions.ts rename to packages/resource-explorer/src/constants/table-resource-definitions.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/alarm-explorer.tsx b/packages/resource-explorer/src/explorers/alarm-explorer/alarm-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/alarm-explorer.tsx rename to packages/resource-explorer/src/explorers/alarm-explorer/alarm-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/index.ts b/packages/resource-explorer/src/explorers/alarm-explorer/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/index.ts rename to packages/resource-explorer/src/explorers/alarm-explorer/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/internal-alarm-explorer.tsx b/packages/resource-explorer/src/explorers/alarm-explorer/internal-alarm-explorer.tsx similarity index 99% rename from packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/internal-alarm-explorer.tsx rename to packages/resource-explorer/src/explorers/alarm-explorer/internal-alarm-explorer.tsx index cc3f88174..8a8d2036f 100644 --- a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/internal-alarm-explorer.tsx +++ b/packages/resource-explorer/src/explorers/alarm-explorer/internal-alarm-explorer.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { useAlarms } from '../../../../hooks/useAlarms'; +import { useAlarms } from '@iot-app-kit/component-core'; import { DEFAULT_ALARM_RESOURCE_NAME, DEFAULT_DEFAULT_PAGE_SIZE, diff --git a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/transformAlarmData.ts b/packages/resource-explorer/src/explorers/alarm-explorer/transformAlarmData.ts similarity index 90% rename from packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/transformAlarmData.ts rename to packages/resource-explorer/src/explorers/alarm-explorer/transformAlarmData.ts index d0b2cc30a..c0c1ba54d 100644 --- a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/transformAlarmData.ts +++ b/packages/resource-explorer/src/explorers/alarm-explorer/transformAlarmData.ts @@ -1,8 +1,8 @@ import { type AlarmData, type AlarmDataStatus, -} from '../../../../hooks/useAlarms'; -import { parseAlarmStateAssetProperty } from '../../../../hooks/useAlarms/transformers'; + parseAlarmStateAssetProperty, +} from '@iot-app-kit/component-core'; import { type AlarmResource, type AlarmResourceWithLatestValue, diff --git a/packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/types.ts b/packages/resource-explorer/src/explorers/alarm-explorer/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/alarm-explorer/types.ts rename to packages/resource-explorer/src/explorers/alarm-explorer/types.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-explorer.tsx b/packages/resource-explorer/src/explorers/asset-explorer/asset-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-explorer.tsx rename to packages/resource-explorer/src/explorers/asset-explorer/asset-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.spec.tsx b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.spec.tsx rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.tsx b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.tsx rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/asset-hierarchy-path.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/constants.ts b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/constants.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/constants.ts rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/constants.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/index.ts b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/index.ts rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/resource-relationship-path.tsx b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/resource-relationship-path.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/resource-relationship-path.tsx rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/resource-relationship-path.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/types.ts b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/types.ts rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/types.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/use-ancestor-assets.ts b/packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/use-ancestor-assets.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/asset-hierarchy-path/use-ancestor-assets.ts rename to packages/resource-explorer/src/explorers/asset-explorer/asset-hierarchy-path/use-ancestor-assets.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/index.ts b/packages/resource-explorer/src/explorers/asset-explorer/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/index.ts rename to packages/resource-explorer/src/explorers/asset-explorer/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/internal-asset-explorer.tsx b/packages/resource-explorer/src/explorers/asset-explorer/internal-asset-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/internal-asset-explorer.tsx rename to packages/resource-explorer/src/explorers/asset-explorer/internal-asset-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/predicates.ts b/packages/resource-explorer/src/explorers/asset-explorer/predicates.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/predicates.ts rename to packages/resource-explorer/src/explorers/asset-explorer/predicates.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/types.ts b/packages/resource-explorer/src/explorers/asset-explorer/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/types.ts rename to packages/resource-explorer/src/explorers/asset-explorer/types.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/index.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-assets/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/index.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-assets/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-asset-model-assets.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-asset-model-assets.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-asset-model-assets.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-asset-model-assets.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-asset-search.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-asset-search.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-asset-search.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-asset-search.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-assets.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-assets.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-assets.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-assets.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-child-assets.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-child-assets.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-child-assets.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-child-assets.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-root-assets.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-root-assets.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-assets/use-root-assets.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-assets/use-root-assets.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-parent-asset.ts b/packages/resource-explorer/src/explorers/asset-explorer/use-parent-asset.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-explorer/use-parent-asset.ts rename to packages/resource-explorer/src/explorers/asset-explorer/use-parent-asset.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/asset-model-explorer.tsx b/packages/resource-explorer/src/explorers/asset-model-explorer/asset-model-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/asset-model-explorer.tsx rename to packages/resource-explorer/src/explorers/asset-model-explorer/asset-model-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/index.ts b/packages/resource-explorer/src/explorers/asset-model-explorer/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/index.ts rename to packages/resource-explorer/src/explorers/asset-model-explorer/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/internal-asset-model-explorer.tsx b/packages/resource-explorer/src/explorers/asset-model-explorer/internal-asset-model-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/internal-asset-model-explorer.tsx rename to packages/resource-explorer/src/explorers/asset-model-explorer/internal-asset-model-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/types.ts b/packages/resource-explorer/src/explorers/asset-model-explorer/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/types.ts rename to packages/resource-explorer/src/explorers/asset-model-explorer/types.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/use-asset-models.ts b/packages/resource-explorer/src/explorers/asset-model-explorer/use-asset-models.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-model-explorer/use-asset-models.ts rename to packages/resource-explorer/src/explorers/asset-model-explorer/use-asset-models.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/asset-property-explorer.tsx b/packages/resource-explorer/src/explorers/asset-property-explorer/asset-property-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/asset-property-explorer.tsx rename to packages/resource-explorer/src/explorers/asset-property-explorer/asset-property-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/index.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/index.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/internal-asset-property-explorer.tsx b/packages/resource-explorer/src/explorers/asset-property-explorer/internal-asset-property-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/internal-asset-property-explorer.tsx rename to packages/resource-explorer/src/explorers/asset-property-explorer/internal-asset-property-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/types.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/types.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/types.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/index.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/index.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-asset-model-properties.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-asset-model-properties.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-asset-model-properties.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-asset-model-properties.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-asset-properties.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-asset-properties.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-asset-properties.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-asset-properties.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-asset-property-search.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-asset-property-search.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-asset-property-search.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-asset-property-search.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-list-asset-properties.ts b/packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-list-asset-properties.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/asset-property-explorer/use-asset-properties/use-list-asset-properties.ts rename to packages/resource-explorer/src/explorers/asset-property-explorer/use-asset-properties/use-list-asset-properties.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/index.ts b/packages/resource-explorer/src/explorers/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/index.ts rename to packages/resource-explorer/src/explorers/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/index.ts b/packages/resource-explorer/src/explorers/time-series-explorer/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/index.ts rename to packages/resource-explorer/src/explorers/time-series-explorer/index.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/internal-time-series-explorer.tsx b/packages/resource-explorer/src/explorers/time-series-explorer/internal-time-series-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/internal-time-series-explorer.tsx rename to packages/resource-explorer/src/explorers/time-series-explorer/internal-time-series-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/time-series-explorer.tsx b/packages/resource-explorer/src/explorers/time-series-explorer/time-series-explorer.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/time-series-explorer.tsx rename to packages/resource-explorer/src/explorers/time-series-explorer/time-series-explorer.tsx diff --git a/packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/types.ts b/packages/resource-explorer/src/explorers/time-series-explorer/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/types.ts rename to packages/resource-explorer/src/explorers/time-series-explorer/types.ts diff --git a/packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/use-time-series.ts b/packages/resource-explorer/src/explorers/time-series-explorer/use-time-series.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/explorers/time-series-explorer/use-time-series.ts rename to packages/resource-explorer/src/explorers/time-series-explorer/use-time-series.ts diff --git a/packages/react-components/src/components/resource-explorers/helpers/response-transformers.ts b/packages/resource-explorer/src/helpers/response-transformers.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/helpers/response-transformers.ts rename to packages/resource-explorer/src/helpers/response-transformers.ts diff --git a/packages/react-components/src/components/resource-explorers/helpers/search-statement-normalizer.spec.ts b/packages/resource-explorer/src/helpers/search-statement-normalizer.spec.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/helpers/search-statement-normalizer.spec.ts rename to packages/resource-explorer/src/helpers/search-statement-normalizer.spec.ts diff --git a/packages/react-components/src/components/resource-explorers/helpers/search-statement-normalizer.ts b/packages/resource-explorer/src/helpers/search-statement-normalizer.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/helpers/search-statement-normalizer.ts rename to packages/resource-explorer/src/helpers/search-statement-normalizer.ts diff --git a/packages/react-components/src/components/resource-explorers/helpers/use-persistable-state.ts b/packages/resource-explorer/src/helpers/use-persistable-state.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/helpers/use-persistable-state.ts rename to packages/resource-explorer/src/helpers/use-persistable-state.ts diff --git a/packages/react-components/src/components/resource-explorers/helpers/use-user-customization.ts b/packages/resource-explorer/src/helpers/use-user-customization.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/helpers/use-user-customization.ts rename to packages/resource-explorer/src/helpers/use-user-customization.ts diff --git a/packages/react-components/src/components/resource-explorers/index.ts b/packages/resource-explorer/src/index.ts similarity index 76% rename from packages/react-components/src/components/resource-explorers/index.ts rename to packages/resource-explorer/src/index.ts index 03b763fc7..ec6549b8f 100644 --- a/packages/react-components/src/components/resource-explorers/index.ts +++ b/packages/resource-explorer/src/index.ts @@ -13,12 +13,17 @@ export { type TimeSeriesExplorerProps, } from './explorers'; export { resourceExplorerQueryClient } from './requests'; -export type { SelectedResources, SelectionMode } from './types/common'; +export type { + SelectedResources, + SelectionMode, + ResourceFieldFilterOperator, +} from './types/common'; export type { AlarmResource, AssetModelResource, AssetPropertyResource, AssetResource, TimeSeriesResource, + TimeSeriesResourceWithLatestValue, } from './types/resources'; -// TODO: Export additional necessary types for customers to use +export type { TableResourceDefinition } from './types/table'; diff --git a/packages/react-components/src/components/resource-explorers/requests/index.ts b/packages/resource-explorer/src/requests/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/index.ts rename to packages/resource-explorer/src/requests/index.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/resource-explorer-query-client.tsx b/packages/resource-explorer/src/requests/resource-explorer-query-client.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/resource-explorer-query-client.tsx rename to packages/resource-explorer/src/requests/resource-explorer-query-client.tsx diff --git a/packages/react-components/src/components/resource-explorers/requests/use-latest-values/create-data-streams-with-latest-value.ts b/packages/resource-explorer/src/requests/use-latest-values/create-data-streams-with-latest-value.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-latest-values/create-data-streams-with-latest-value.ts rename to packages/resource-explorer/src/requests/use-latest-values/create-data-streams-with-latest-value.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-latest-values/create-request-entry-batches.ts b/packages/resource-explorer/src/requests/use-latest-values/create-request-entry-batches.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-latest-values/create-request-entry-batches.ts rename to packages/resource-explorer/src/requests/use-latest-values/create-request-entry-batches.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-latest-values/index.ts b/packages/resource-explorer/src/requests/use-latest-values/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-latest-values/index.ts rename to packages/resource-explorer/src/requests/use-latest-values/index.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-latest-values/toValue.ts b/packages/resource-explorer/src/requests/use-latest-values/toValue.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-latest-values/toValue.ts rename to packages/resource-explorer/src/requests/use-latest-values/toValue.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-latest-values/types.ts b/packages/resource-explorer/src/requests/use-latest-values/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-latest-values/types.ts rename to packages/resource-explorer/src/requests/use-latest-values/types.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-latest-values/use-latest-values.ts b/packages/resource-explorer/src/requests/use-latest-values/use-latest-values.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-latest-values/use-latest-values.ts rename to packages/resource-explorer/src/requests/use-latest-values/use-latest-values.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-multiple-list-requests/index.ts b/packages/resource-explorer/src/requests/use-multiple-list-requests/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-multiple-list-requests/index.ts rename to packages/resource-explorer/src/requests/use-multiple-list-requests/index.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-multiple-list-requests/types.ts b/packages/resource-explorer/src/requests/use-multiple-list-requests/types.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-multiple-list-requests/types.ts rename to packages/resource-explorer/src/requests/use-multiple-list-requests/types.ts diff --git a/packages/react-components/src/components/resource-explorers/requests/use-multiple-list-requests/use-multiple-list-requests.ts b/packages/resource-explorer/src/requests/use-multiple-list-requests/use-multiple-list-requests.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/requests/use-multiple-list-requests/use-multiple-list-requests.ts rename to packages/resource-explorer/src/requests/use-multiple-list-requests/use-multiple-list-requests.ts diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/alarm-drop-down.spec.tsx b/packages/resource-explorer/src/testing/drop-down-variant/alarm-drop-down.spec.tsx similarity index 99% rename from packages/react-components/src/components/resource-explorers/testing/drop-down-variant/alarm-drop-down.spec.tsx rename to packages/resource-explorer/src/testing/drop-down-variant/alarm-drop-down.spec.tsx index ab81e2164..b33bf0d9f 100644 --- a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/alarm-drop-down.spec.tsx +++ b/packages/resource-explorer/src/testing/drop-down-variant/alarm-drop-down.spec.tsx @@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'; import * as dropDown from '../helpers/drop-down'; import { AlarmExplorer } from '../../explorers'; import { resourceExplorerQueryClient } from '../../requests/resource-explorer-query-client'; -import { queryClient } from '../../../../queries'; +import { queryClient } from '@iot-app-kit/component-core'; describe('asset property drop-down', () => { beforeEach(() => { diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-drop-down.spec.tsx b/packages/resource-explorer/src/testing/drop-down-variant/asset-drop-down.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-drop-down.spec.tsx rename to packages/resource-explorer/src/testing/drop-down-variant/asset-drop-down.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-model-drop-down.spec.tsx b/packages/resource-explorer/src/testing/drop-down-variant/asset-model-drop-down.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-model-drop-down.spec.tsx rename to packages/resource-explorer/src/testing/drop-down-variant/asset-model-drop-down.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-property-drop-down.spec.tsx b/packages/resource-explorer/src/testing/drop-down-variant/asset-property-drop-down.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/drop-down-variant/asset-property-drop-down.spec.tsx rename to packages/resource-explorer/src/testing/drop-down-variant/asset-property-drop-down.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/drop-down-variant/time-series-drop-down.spec.tsx b/packages/resource-explorer/src/testing/drop-down-variant/time-series-drop-down.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/drop-down-variant/time-series-drop-down.spec.tsx rename to packages/resource-explorer/src/testing/drop-down-variant/time-series-drop-down.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/helpers/drop-down.tsx b/packages/resource-explorer/src/testing/helpers/drop-down.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/helpers/drop-down.tsx rename to packages/resource-explorer/src/testing/helpers/drop-down.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/helpers/responses.ts b/packages/resource-explorer/src/testing/helpers/responses.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/helpers/responses.ts rename to packages/resource-explorer/src/testing/helpers/responses.ts diff --git a/packages/react-components/src/components/resource-explorers/testing/helpers/table.tsx b/packages/resource-explorer/src/testing/helpers/table.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/helpers/table.tsx rename to packages/resource-explorer/src/testing/helpers/table.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/table-variant/alarm-table.spec.tsx b/packages/resource-explorer/src/testing/table-variant/alarm-table.spec.tsx similarity index 99% rename from packages/react-components/src/components/resource-explorers/testing/table-variant/alarm-table.spec.tsx rename to packages/resource-explorer/src/testing/table-variant/alarm-table.spec.tsx index 17319a600..b40e72e74 100644 --- a/packages/react-components/src/components/resource-explorers/testing/table-variant/alarm-table.spec.tsx +++ b/packages/resource-explorer/src/testing/table-variant/alarm-table.spec.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import { AlarmExplorer } from '../../explorers'; import { resourceExplorerQueryClient } from '../../requests'; import * as table from '../helpers/table'; -import { queryClient } from '../../../../queries'; +import { queryClient } from '@iot-app-kit/component-core'; describe('alarm table', () => { beforeEach(() => { diff --git a/packages/react-components/src/components/resource-explorers/testing/table-variant/asset-model-table.spec.tsx b/packages/resource-explorer/src/testing/table-variant/asset-model-table.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/table-variant/asset-model-table.spec.tsx rename to packages/resource-explorer/src/testing/table-variant/asset-model-table.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/table-variant/asset-property-table.spec.tsx b/packages/resource-explorer/src/testing/table-variant/asset-property-table.spec.tsx similarity index 99% rename from packages/react-components/src/components/resource-explorers/testing/table-variant/asset-property-table.spec.tsx rename to packages/resource-explorer/src/testing/table-variant/asset-property-table.spec.tsx index e10e40f2b..2fb0ab728 100644 --- a/packages/react-components/src/components/resource-explorers/testing/table-variant/asset-property-table.spec.tsx +++ b/packages/resource-explorer/src/testing/table-variant/asset-property-table.spec.tsx @@ -4,10 +4,10 @@ import type { ListAssetModelProperties, ListAssetProperties, } from '@iot-app-kit/core'; +import { formatDate } from '@iot-app-kit/core'; import { render, screen, within } from '@testing-library/react'; import ue from '@testing-library/user-event'; import { useState } from 'react'; -import { formatDate } from '../../../../utils/time'; import { DEFAULT_LATEST_VALUE_REQUEST_INTERVAL } from '../../constants/defaults'; import { AssetPropertyExplorer } from '../../explorers'; import { resourceExplorerQueryClient } from '../../requests'; diff --git a/packages/react-components/src/components/resource-explorers/testing/table-variant/asset-table.spec.tsx b/packages/resource-explorer/src/testing/table-variant/asset-table.spec.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/testing/table-variant/asset-table.spec.tsx rename to packages/resource-explorer/src/testing/table-variant/asset-table.spec.tsx diff --git a/packages/react-components/src/components/resource-explorers/testing/table-variant/time-series-table.spec.tsx b/packages/resource-explorer/src/testing/table-variant/time-series-table.spec.tsx similarity index 99% rename from packages/react-components/src/components/resource-explorers/testing/table-variant/time-series-table.spec.tsx rename to packages/resource-explorer/src/testing/table-variant/time-series-table.spec.tsx index 73f924974..4c10106b3 100644 --- a/packages/react-components/src/components/resource-explorers/testing/table-variant/time-series-table.spec.tsx +++ b/packages/resource-explorer/src/testing/table-variant/time-series-table.spec.tsx @@ -2,10 +2,10 @@ import type { BatchGetAssetPropertyValue, ListTimeSeries, } from '@iot-app-kit/core'; +import { formatDate } from '@iot-app-kit/core'; import { render, screen, within } from '@testing-library/react'; import ue from '@testing-library/user-event'; import { useState } from 'react'; -import { formatDate } from '../../../../utils/time'; import { DEFAULT_LATEST_VALUE_REQUEST_INTERVAL } from '../../constants/defaults'; import { TimeSeriesExplorer } from '../../explorers'; import { resourceExplorerQueryClient } from '../../requests'; diff --git a/packages/react-components/src/components/resource-explorers/types/common.ts b/packages/resource-explorer/src/types/common.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/types/common.ts rename to packages/resource-explorer/src/types/common.ts diff --git a/packages/react-components/src/components/resource-explorers/types/drop-down.ts b/packages/resource-explorer/src/types/drop-down.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/types/drop-down.ts rename to packages/resource-explorer/src/types/drop-down.ts diff --git a/packages/react-components/src/components/resource-explorers/types/requests.ts b/packages/resource-explorer/src/types/requests.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/types/requests.ts rename to packages/resource-explorer/src/types/requests.ts diff --git a/packages/react-components/src/components/resource-explorers/types/resource-explorer.ts b/packages/resource-explorer/src/types/resource-explorer.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/types/resource-explorer.ts rename to packages/resource-explorer/src/types/resource-explorer.ts diff --git a/packages/react-components/src/components/resource-explorers/types/resources.ts b/packages/resource-explorer/src/types/resources.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/types/resources.ts rename to packages/resource-explorer/src/types/resources.ts diff --git a/packages/react-components/src/components/resource-explorers/types/table.ts b/packages/resource-explorer/src/types/table.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/types/table.ts rename to packages/resource-explorer/src/types/table.ts diff --git a/packages/react-components/src/components/resource-explorers/variants/index.ts b/packages/resource-explorer/src/variants/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/index.ts rename to packages/resource-explorer/src/variants/index.ts diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-drop-down/index.ts b/packages/resource-explorer/src/variants/resource-drop-down/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-drop-down/index.ts rename to packages/resource-explorer/src/variants/resource-drop-down/index.ts diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-drop-down/resource-drop-down.tsx b/packages/resource-explorer/src/variants/resource-drop-down/resource-drop-down.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-drop-down/resource-drop-down.tsx rename to packages/resource-explorer/src/variants/resource-drop-down/resource-drop-down.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/index.ts b/packages/resource-explorer/src/variants/resource-table/index.ts similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/index.ts rename to packages/resource-explorer/src/variants/resource-table/index.ts diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-empty.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-empty.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-empty.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-empty.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-error.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-error.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-error.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-error.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-filter.css b/packages/resource-explorer/src/variants/resource-table/resource-table-filter.css similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-filter.css rename to packages/resource-explorer/src/variants/resource-table/resource-table-filter.css diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-filter.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-filter.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-filter.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-filter.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-header.css b/packages/resource-explorer/src/variants/resource-table/resource-table-header.css similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-header.css rename to packages/resource-explorer/src/variants/resource-table/resource-table-header.css diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-header.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-header.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-header.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-header.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-no-filter-match.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-no-filter-match.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-no-filter-match.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-no-filter-match.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-pagination.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-pagination.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-pagination.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-pagination.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-search.css b/packages/resource-explorer/src/variants/resource-table/resource-table-search.css similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-search.css rename to packages/resource-explorer/src/variants/resource-table/resource-table-search.css diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-search.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-search.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-search.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-search.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-title.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-title.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-title.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-title.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-user-settings.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table-user-settings.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table-user-settings.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table-user-settings.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table.tsx b/packages/resource-explorer/src/variants/resource-table/resource-table.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/resource-table/resource-table.tsx rename to packages/resource-explorer/src/variants/resource-table/resource-table.tsx diff --git a/packages/react-components/src/components/resource-explorers/variants/variant-selector.tsx b/packages/resource-explorer/src/variants/variant-selector.tsx similarity index 100% rename from packages/react-components/src/components/resource-explorers/variants/variant-selector.tsx rename to packages/resource-explorer/src/variants/variant-selector.tsx diff --git a/packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx b/packages/resource-explorer/stories/alarm-explorer.stories.tsx similarity index 95% rename from packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx rename to packages/resource-explorer/stories/alarm-explorer.stories.tsx index c01c9e53a..a537f7537 100644 --- a/packages/react-components/stories/resource-explorers/alarm-explorer.stories.tsx +++ b/packages/resource-explorer/stories/alarm-explorer.stories.tsx @@ -1,9 +1,6 @@ import { type Meta } from '@storybook/react'; import { type ReactElement } from 'react'; -import { - AlarmExplorer, - type AlarmExplorerProps, -} from '../../src/components/resource-explorers'; +import { AlarmExplorer, type AlarmExplorerProps } from '../src/explorers'; import { type CommonResourceExplorerControls, SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx b/packages/resource-explorer/stories/asset-explorer.stories.tsx similarity index 96% rename from packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx rename to packages/resource-explorer/stories/asset-explorer.stories.tsx index ecaaae911..0ad660e02 100644 --- a/packages/react-components/stories/resource-explorers/asset-explorer.stories.tsx +++ b/packages/resource-explorer/stories/asset-explorer.stories.tsx @@ -1,9 +1,6 @@ import { type Meta } from '@storybook/react'; import { type ReactElement } from 'react'; -import { - AssetExplorer, - type AssetExplorerProps, -} from '../../src/components/resource-explorers'; +import { AssetExplorer, type AssetExplorerProps } from '../src/explorers'; import { type CommonResourceExplorerControls, SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx b/packages/resource-explorer/stories/asset-model-explorer.stories.tsx similarity index 98% rename from packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx rename to packages/resource-explorer/stories/asset-model-explorer.stories.tsx index 5e3baedc6..5a45fdc68 100644 --- a/packages/react-components/stories/resource-explorers/asset-model-explorer.stories.tsx +++ b/packages/resource-explorer/stories/asset-model-explorer.stories.tsx @@ -3,7 +3,7 @@ import { type ReactElement } from 'react'; import { AssetModelExplorer, type AssetModelExplorerProps, -} from '../../src/components/resource-explorers'; +} from '../src/explorers'; import { SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, type CommonResourceExplorerControls, diff --git a/packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx b/packages/resource-explorer/stories/asset-property-explorer.stories.tsx similarity index 98% rename from packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx rename to packages/resource-explorer/stories/asset-property-explorer.stories.tsx index b1f4c4a1c..2193d2358 100644 --- a/packages/react-components/stories/resource-explorers/asset-property-explorer.stories.tsx +++ b/packages/resource-explorer/stories/asset-property-explorer.stories.tsx @@ -3,7 +3,7 @@ import { type ReactElement } from 'react'; import { AssetPropertyExplorer, type AssetPropertyExplorerProps, -} from '../../src/components/resource-explorers'; +} from '../src/explorers'; import { type CommonResourceExplorerControls, SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/react-components/stories/resource-explorers/controls.ts b/packages/resource-explorer/stories/controls.ts similarity index 93% rename from packages/react-components/stories/resource-explorers/controls.ts rename to packages/resource-explorer/stories/controls.ts index 5fa762496..d05fc58e1 100644 --- a/packages/react-components/stories/resource-explorers/controls.ts +++ b/packages/resource-explorer/stories/controls.ts @@ -8,8 +8,8 @@ import type { ResourceExplorerVariant, SelectionMode, ShouldPersistUserCustomization, -} from '../../src/components/resource-explorers/types/common'; -import { type IsDropDownFilterEnabled } from '../../src/components/resource-explorers/types/drop-down'; +} from '../src/types/common'; +import { type IsDropDownFilterEnabled } from '../src/types/drop-down'; export interface CommonResourceExplorerControls { selectionMode: SelectionMode; diff --git a/packages/react-components/stories/resource-explorers/data-source.ts b/packages/resource-explorer/stories/data-source.ts similarity index 79% rename from packages/react-components/stories/resource-explorers/data-source.ts rename to packages/resource-explorer/stories/data-source.ts index e71892eda..d5493dbc6 100644 --- a/packages/react-components/stories/resource-explorers/data-source.ts +++ b/packages/resource-explorer/stories/data-source.ts @@ -5,14 +5,16 @@ export const client = new IoTSiteWise({ credentials: { accessKeyId: '', secretAccessKey: '', + sessionToken: '', }, - region: 'us-west-2', + region: 'us-east-1', }); export const eventsClient = new IoTEvents({ credentials: { accessKeyId: '', secretAccessKey: '', + sessionToken: '', }, - region: 'us-west-2', + region: 'us-east-1', }); diff --git a/packages/react-components/stories/resource-explorers/decorators.tsx b/packages/resource-explorer/stories/decorators.tsx similarity index 90% rename from packages/react-components/stories/resource-explorers/decorators.tsx rename to packages/resource-explorer/stories/decorators.tsx index 8edcbc45b..7cb4d2ee5 100644 --- a/packages/react-components/stories/resource-explorers/decorators.tsx +++ b/packages/resource-explorer/stories/decorators.tsx @@ -1,10 +1,10 @@ import { type DecoratorFn } from '@storybook/react'; import { useEffect, useState } from 'react'; -import { resourceExplorerQueryClient } from '../../src/components/resource-explorers/requests'; +import { resourceExplorerQueryClient } from '../src/requests'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode'; import { addons } from '@storybook/preview-api'; -import { useTheme } from '../../src/hooks/useTheming'; +import { useTheme } from '@iot-app-kit/component-core'; // get channel to listen to event emitter const channel = addons.getChannel(); diff --git a/packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx b/packages/resource-explorer/stories/explorer-combinations.stories.tsx similarity index 99% rename from packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx rename to packages/resource-explorer/stories/explorer-combinations.stories.tsx index 4607dca51..c9f635c11 100644 --- a/packages/react-components/stories/resource-explorers/explorer-combinations.stories.tsx +++ b/packages/resource-explorer/stories/explorer-combinations.stories.tsx @@ -9,7 +9,7 @@ import { TimeSeriesExplorer, type AssetExplorerProps, type AssetModelExplorerProps, -} from '../../src/components/resource-explorers'; +} from '../src/explorers'; import { client, eventsClient } from './data-source'; import { StoryWithClearedResourceCache, diff --git a/packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx b/packages/resource-explorer/stories/time-series-explorer.stories.tsx similarity index 98% rename from packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx rename to packages/resource-explorer/stories/time-series-explorer.stories.tsx index 53d039326..62cb6d675 100644 --- a/packages/react-components/stories/resource-explorers/time-series-explorer.stories.tsx +++ b/packages/resource-explorer/stories/time-series-explorer.stories.tsx @@ -3,7 +3,7 @@ import { type ReactElement } from 'react'; import { TimeSeriesExplorer, type TimeSeriesExplorerProps, -} from '../../src/components/resource-explorers'; +} from '../src/explorers'; import { type CommonResourceExplorerControls, SHARED_RESOURCE_EXPLORER_STORY_ARG_TYPES, diff --git a/packages/resource-explorer/tsconfig.cjs.json b/packages/resource-explorer/tsconfig.cjs.json new file mode 100644 index 000000000..727b1d592 --- /dev/null +++ b/packages/resource-explorer/tsconfig.cjs.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@iot-app-kit/ts-config/tsconfig.cjs.json", + "include": ["src"], + "files": [], + "exclude": [ + "./src/**/*.spec.*", + "./src/**/*.test.*", + "./src/**/__mocks__", + "./src/**/testing" + ], + "compilerOptions": { + "types": [], + "outDir": "./dist/cjs", + "tsBuildInfoFile": "./dist/cjs/.tsbuildinfo" + } +} diff --git a/packages/resource-explorer/tsconfig.esm.json b/packages/resource-explorer/tsconfig.esm.json new file mode 100644 index 000000000..72cf67a63 --- /dev/null +++ b/packages/resource-explorer/tsconfig.esm.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@iot-app-kit/ts-config/tsconfig.esm.json", + "include": ["src"], + "files": [], + "exclude": [ + "./src/**/*.spec.*", + "./src/**/*.test.*", + "./src/**/__mocks__", + "./src/**/testing" + ], + "compilerOptions": { + "types": [], + "outDir": "./dist/esm", + "tsBuildInfoFile": "./dist/esm/.tsbuildinfo" + } +} diff --git a/packages/resource-explorer/tsconfig.json b/packages/resource-explorer/tsconfig.json new file mode 100644 index 000000000..da080b641 --- /dev/null +++ b/packages/resource-explorer/tsconfig.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@iot-app-kit/ts-config/tsconfig.base.json", + "include": ["src", "stories", "e2e", "vite.config.ts", "__mocks__"], + "files": ["vitest.setup.ts"], + "compilerOptions": { + "types": ["vite/client", "vitest/globals", "jest-extended"] + } +} diff --git a/packages/resource-explorer/vite.config.ts b/packages/resource-explorer/vite.config.ts new file mode 100644 index 000000000..e68518159 --- /dev/null +++ b/packages/resource-explorer/vite.config.ts @@ -0,0 +1,29 @@ +/// +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + test: { + pool: 'threads', + include: ['./src/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + globals: true, + css: false, + environment: 'happy-dom', + setupFiles: [ + './vitest.setup.ts', + 'vitest-canvas-mock', + 'jest-extended/all', + ], + retry: 3, + coverage: { + thresholds: { + statements: 60, + branches: 75, + functions: 70, + lines: 60, + }, + }, + }, +}); diff --git a/packages/resource-explorer/vitest.setup.ts b/packages/resource-explorer/vitest.setup.ts new file mode 100644 index 000000000..7b0828bfa --- /dev/null +++ b/packages/resource-explorer/vitest.setup.ts @@ -0,0 +1 @@ +import '@testing-library/jest-dom'; diff --git a/smoke-test.sh b/smoke-test.sh index 9b8ff4b9c..c1c2a4436 100755 --- a/smoke-test.sh +++ b/smoke-test.sh @@ -326,6 +326,8 @@ log_debug "Creating ephemeral patch changeset: ${CHANGESET_FILE}" echo "'@iot-app-kit/core-util': patch" echo "'@iot-app-kit/dashboard': patch" echo "'@iot-app-kit/react-components': patch" + echo "'@iot-app-kit/resource-explorer': patch" + echo "'@iot-app-kit/component-core': patch" echo "'@iot-app-kit/source-iotsitewise': patch" echo "'@iot-app-kit/source-iottwinmaker': patch" echo "---" @@ -343,6 +345,8 @@ if ! npm publish -w @iot-app-kit/core \ -w @iot-app-kit/core-util \ -w @iot-app-kit/dashboard \ -w @iot-app-kit/react-components \ + -w @iot-app-kit/resource-explorer \ + -w @iot-app-kit/component-core \ -w @iot-app-kit/source-iotsitewise \ -w @iot-app-kit/source-iottwinmaker; then log_error "Failed to publish packages." diff --git a/turbo.json b/turbo.json index b729a006f..b8757d1fe 100644 --- a/turbo.json +++ b/turbo.json @@ -43,6 +43,23 @@ "@iot-app-kit/react-components#build:es", "@iot-app-kit/source-iotsitewise#build:es", "@iot-app-kit/source-iottwinmaker#build:es", + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" + ], + "outputs": ["dist/**"], + "persistent": true, + "cache": false, + "outputLogs": "full" + }, + "dev:resource-explorer": { + "dependsOn": [ + "@iot-app-kit/core#build:es", + "@iot-app-kit/component-core#build:es", + "@iot-app-kit/core-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/source-iotsitewise#build:es", + "@iot-app-kit/source-iottwinmaker#build:es", "@iot-app-kit/testing-util#build:es" ], "outputs": ["dist/**"], @@ -81,7 +98,20 @@ "@iot-app-kit/react-components#build:es", "@iot-app-kit/source-iotsitewise#build:es", "@iot-app-kit/source-iottwinmaker#build:es", - "@iot-app-kit/testing-util#build:es" + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" + ] + }, + "@iot-app-kit/resource-explorer#lint": { + "dependsOn": [ + "@iot-app-kit/core#build:es", + "@iot-app-kit/core-util#build:es", + "@iot-app-kit/source-iotsitewise#build:es", + "@iot-app-kit/source-iottwinmaker#build:es", + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" ] }, "@iot-app-kit/scene-composer#lint": { @@ -139,7 +169,20 @@ "@iot-app-kit/react-components#build:es", "@iot-app-kit/source-iotsitewise#build:es", "@iot-app-kit/source-iottwinmaker#build:es", - "@iot-app-kit/testing-util#build:es" + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" + ] + }, + "@iot-app-kit/resource-explorer#test": { + "dependsOn": [ + "@iot-app-kit/core#build:es", + "@iot-app-kit/core-util#build:es", + "@iot-app-kit/source-iotsitewise#build:es", + "@iot-app-kit/source-iottwinmaker#build:es", + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" ] }, "@iot-app-kit/scene-composer#test": { @@ -189,7 +232,20 @@ "@iot-app-kit/react-components#build:es", "@iot-app-kit/source-iotsitewise#build:es", "@iot-app-kit/source-iottwinmaker#build:es", - "@iot-app-kit/testing-util#build:es" + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" + ] + }, + "@iot-app-kit/resource-explorer#test:ui:ci": { + "dependsOn": [ + "@iot-app-kit/core#build:es", + "@iot-app-kit/core-util#build:es", + "@iot-app-kit/source-iotsitewise#build:es", + "@iot-app-kit/source-iottwinmaker#build:es", + "@iot-app-kit/testing-util#build:es", + "@iot-app-kit/resource-explorer#build:es", + "@iot-app-kit/component-core#build:es" ] }, "@iot-app-kit/scene-composer#test:ui:ci": { From 55212aa83f52369adc6bda827ac60559c0ce864f Mon Sep 17 00:00:00 2001 From: Tracy French Date: Thu, 6 Mar 2025 16:50:41 -0700 Subject: [PATCH 07/10] fix: smoke test playwright installation --- .github/workflows/validate.yml | 27 +-------------------------- smoke-test.sh | 3 ++- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 23d0deef0..a3cabe6f6 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -225,30 +225,5 @@ jobs: cache: 'npm' cache-dependency-path: '**/package-lock.json' - - name: Get installed Playwright version - id: playwright-version - run: echo "::set-output name=version::$(npm info @playwright/test version)" - working-directory: ./testing/smoke-test - - - name: Playwright cache (smoke test) - uses: actions/cache@v4 - id: playwright-cache - with: - path: | - ~/.cache/ms-playwright - key: '${{ runner.os }}-playwright-smoke-test-${{ steps.playwright-version.outputs.version }}' - restore-keys: | - ${{ runner.os }}-playwright-smoke-test- - - - name: Install Playwright with dependencies - if: steps.playwright-cache.outputs.cache-hit != 'true' - run: npx playwright install --with-deps - working-directory: ./testing/smoke-test - - - name: Install Playwright's dependencies - if: steps.playwright-cache.outputs.cache-hit == 'true' - run: npx playwright install-deps - working-directory: ./testing/smoke-test - - name: Run smoke test - run: ./smoke-test.sh -n + run: ./smoke-test.sh -dn diff --git a/smoke-test.sh b/smoke-test.sh index c1c2a4436..f0973d50b 100755 --- a/smoke-test.sh +++ b/smoke-test.sh @@ -260,7 +260,6 @@ check_for_dependencies() { check_for_package git check_for_package curl check_for_package pgrep - check_for_playwright } ############################################################################### @@ -374,6 +373,8 @@ if ! smoke_test_run_cmd npm run validate:bundling; then log_error "Bundling validation failed." fi +check_for_playwright + log_info "Validating runtime" if ! smoke_test_run_cmd npm run validate:runtime; then log_error "Runtime validation failed." From a521efb7778d53f1ff1fd8fed38859ee0ed40bb1 Mon Sep 17 00:00:00 2001 From: Michelle Xu Date: Thu, 6 Mar 2025 14:49:15 -0800 Subject: [PATCH 08/10] fix: client side errors from unexpected null/undefined values --- .../trendCursors/echartsActions/extension.ts | 11 +++++++-- .../batchGetAggregatedPropertyDataPoints.ts | 24 +++++++++++++------ .../batchGetHistoricalPropertyDataPoints.ts | 24 +++++++++++++------ .../batchGetLatestPropertyDataPoints.ts | 24 +++++++++++++------ 4 files changed, 60 insertions(+), 23 deletions(-) diff --git a/packages/react-components/src/echarts/extensions/trendCursors/echartsActions/extension.ts b/packages/react-components/src/echarts/extensions/trendCursors/echartsActions/extension.ts index 92619d888..d4c55f840 100644 --- a/packages/react-components/src/echarts/extensions/trendCursors/echartsActions/extension.ts +++ b/packages/react-components/src/echarts/extensions/trendCursors/echartsActions/extension.ts @@ -31,6 +31,7 @@ export const actionExtension: any = ( if ( !event || !trendCursor || + !api || ecmodel.getOption().appKitChartId !== chartId || getTrendCursors(ecmodel).length > 4 ) @@ -47,7 +48,8 @@ export const actionExtension: any = ( registers.registerAction( RemoveNearestTrendCursorActionType, ({ event, chartId }: RemoveTrendCursorAction, ecmodel, api) => { - if (!event || ecmodel.getOption().appKitChartId !== chartId) return; + if (!event || !api || ecmodel.getOption().appKitChartId !== chartId) + return; const date = getXAxisDataValue(event.offsetX, api); @@ -67,7 +69,12 @@ export const actionExtension: any = ( registers.registerAction( CopyTrendCursorActionType, ({ event, chartId }: CopyTrendCursorAction, ecmodel, api) => { - if (!event || !chartId || ecmodel.getOption().appKitChartId !== chartId) + if ( + !event || + !chartId || + !api || + ecmodel.getOption().appKitChartId !== chartId + ) return; const date = getXAxisDataValue(event.offsetX, api); diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts index 96855d02e..4906b43a5 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetAggregatedPropertyDataPoints.ts @@ -5,6 +5,10 @@ import { TimeOrdering, type BatchGetAssetPropertyAggregatesErrorEntry, type BatchGetAssetPropertyAggregatesSuccessEntry, + type IoTSiteWiseServiceException, + AccessDeniedException, + InvalidRequestException, + ResourceNotFoundException, } from '@aws-sdk/client-iotsitewise'; import { aggregateToDataPoint } from '../util/toDataPoint'; import { dataStreamFromSiteWise } from '../dataStreamFromSiteWise'; @@ -164,14 +168,20 @@ const sendRequest = ({ }); } }) - .catch((e) => { - Object.entries(callbackCache).forEach(([entryId, { onError }]) => { - onError({ - entryId, - errorCode: e.$metadata?.httpStatusCode, - errorMessage: e.message, + .catch((e: IoTSiteWiseServiceException) => { + if ( + e instanceof AccessDeniedException || + e instanceof InvalidRequestException || + e instanceof ResourceNotFoundException + ) { + Object.entries(callbackCache).forEach(([entryId, { onError }]) => { + onError({ + entryId, + errorCode: e.name, + errorMessage: e.message, + }); }); - }); + } }); }; diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts index ea4e2436f..fa10636a6 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts @@ -4,6 +4,10 @@ import { TimeOrdering, type BatchGetAssetPropertyValueHistoryErrorEntry, type BatchGetAssetPropertyValueHistorySuccessEntry, + type IoTSiteWiseServiceException, + AccessDeniedException, + InvalidRequestException, + ResourceNotFoundException, } from '@aws-sdk/client-iotsitewise'; import { toDataPoint } from '../util/toDataPoint'; import { dataStreamFromSiteWise } from '../dataStreamFromSiteWise'; @@ -159,14 +163,20 @@ const sendRequest = ({ }); } }) - .catch((e) => { - Object.entries(callbackCache).forEach(([entryId, { onError }]) => { - onError({ - entryId, - errorCode: e.$metadata?.httpStatusCode, - errorMessage: e.message, + .catch((e: IoTSiteWiseServiceException) => { + if ( + e instanceof AccessDeniedException || + e instanceof InvalidRequestException || + e instanceof ResourceNotFoundException + ) { + Object.entries(callbackCache).forEach(([entryId, { onError }]) => { + onError({ + entryId, + errorCode: e.name, + errorMessage: e.message, + }); }); - }); + } }); }; diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts index fe8f4cc3c..cc6f761fc 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetLatestPropertyDataPoints.ts @@ -3,6 +3,10 @@ import { type IoTSiteWiseClient, type BatchGetAssetPropertyValueErrorEntry, type BatchGetAssetPropertyValueSuccessEntry, + type IoTSiteWiseServiceException, + AccessDeniedException, + InvalidRequestException, + ResourceNotFoundException, } from '@aws-sdk/client-iotsitewise'; import { toDataPoint } from '../util/toDataPoint'; import { dataStreamFromSiteWise } from '../dataStreamFromSiteWise'; @@ -139,14 +143,20 @@ const sendRequest = ({ }); } }) - .catch((e) => { - Object.entries(callbackCache).forEach(([entryId, { onError }]) => { - onError({ - entryId, - errorCode: e.$metadata?.httpStatusCode, - errorMessage: e.message, + .catch((e: IoTSiteWiseServiceException) => { + if ( + e instanceof AccessDeniedException || + e instanceof InvalidRequestException || + e instanceof ResourceNotFoundException + ) { + Object.entries(callbackCache).forEach(([entryId, { onError }]) => { + onError({ + entryId, + errorCode: e.name, + errorMessage: e.message, + }); }); - }); + } }); }; From 742708329ba7449b0801e51e04f9b5a0f0a2fe4f Mon Sep 17 00:00:00 2001 From: Tracy French Date: Thu, 20 Mar 2025 12:31:33 -0600 Subject: [PATCH 09/10] refactor: simplify dashboard widget deletion --- .../components/internalDashboard/index.tsx | 37 +++++++------------ .../internalDashboard/keyboardShortcuts.ts | 37 +++++-------------- .../src/components/widgets/widgetActions.tsx | 6 +-- .../dashboard/src/hooks/useDeleteWidgets.ts | 18 ++++----- .../store/actions/deleteWidgets/index.spec.ts | 12 +++--- .../src/store/actions/deleteWidgets/index.ts | 15 +++----- 6 files changed, 46 insertions(+), 79 deletions(-) diff --git a/packages/dashboard/src/components/internalDashboard/index.tsx b/packages/dashboard/src/components/internalDashboard/index.tsx index 6a17f3152..200f1836c 100644 --- a/packages/dashboard/src/components/internalDashboard/index.tsx +++ b/packages/dashboard/src/components/internalDashboard/index.tsx @@ -9,7 +9,7 @@ import { colorForegroundControlReadOnly, spaceScaledXxxs, } from '@cloudscape-design/design-tokens'; -import { type Viewport, getPlugin } from '@iot-app-kit/core'; +import { getPlugin, type Viewport } from '@iot-app-kit/core'; import { WebglContext } from '@iot-app-kit/react-components'; import { type CSSProperties, type ReactNode, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; @@ -17,17 +17,21 @@ import { PropertiesPaneIcon } from '../resizablePanes/assets/propertiesPaneIcon' import { selectedRect } from '~/util/select'; +import type { ContextMenuProps } from '../contextMenu'; /** * Component imports */ import ContextMenu from '../contextMenu'; import { useClients } from '../dashboard/clientContext'; import CustomDragLayer from '../dragLayer'; +import type { DropEvent, GesturableGridProps } from '../grid'; import { GestureableGrid, ReadOnlyGrid } from '../grid'; import ComponentPalette from '../palette'; import { QueryEditor } from '../queryEditor'; import { ResizablePanes } from '../resizablePanes'; +import type { UserSelectionProps } from '../userSelection'; import UserSelection from '../userSelection'; +import type { WidgetsProps } from '../widgets/list'; import Widgets from '../widgets/list'; import DashboardEmptyState from './dashboardEmptyState'; @@ -38,7 +42,6 @@ import { onBringWidgetsToFrontAction, onCopyWidgetsAction, onCreateWidgetsAction, - onDeleteWidgetsAction, onPasteWidgetsAction, onSendWidgetsToBackAction, } from '~/store/actions'; @@ -60,11 +63,7 @@ import type { } from '~/types'; import { AssetModelSelection } from '../assetModelSelection/assetModelSelection'; import ConfirmDeleteModal from '../confirmDeleteModal'; -import type { ContextMenuProps } from '../contextMenu'; -import type { DropEvent, GesturableGridProps } from '../grid'; import { useModelBasedQuery } from '../queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/modelBasedQuery/useModelBasedQuery'; -import type { UserSelectionProps } from '../userSelection'; -import type { WidgetsProps } from '../widgets/list'; import DashboardHeader from './dashboardHeader'; import { useChatbotPosition } from '~/hooks/useChatbotPosition'; @@ -76,6 +75,7 @@ import { AssistantFloatingMenu } from '../assistant/assistantFloatingMenu'; import { AssistantIcon } from '../assistant/assistantIcon'; import { Chatbot } from '../assistant/chatbot'; import './index.css'; +import { useDeleteWidgets } from '~/hooks/useDeleteWidgets'; type InternalDashboardProperties = { onSave?: DashboardSave; @@ -179,25 +179,16 @@ const InternalDashboard: React.FC = ({ dispatch(onSendWidgetsToBackAction()); }; - const deleteWidgets = () => { - setVisible(true); - }; - - const onDelete = () => { - dispatch( - onDeleteWidgetsAction({ - widgets: selectedWidgets, - }) - ); + const deleteWidgets = useDeleteWidgets(); + const onPressDelete = () => setVisible(true); + const handleDelete = () => { + deleteWidgets(selectedWidgets.map(({ id }) => id)); setVisible(false); }; - const widgetLength = dashboardConfiguration.widgets.length; + useKeyboardShortcuts({ onPressDelete }); - /** - * setup keyboard shortcuts for actions - */ - useKeyboardShortcuts({ deleteWidgets }); + const widgetLength = dashboardConfiguration.widgets.length; /** * setup gesture handling for grid @@ -288,7 +279,7 @@ const InternalDashboard: React.FC = ({ messageOverrides: DefaultDashboardMessages, copyWidgets, pasteWidgets, - deleteWidgets, + deleteWidgets: onPressDelete, sendWidgetsToBack, bringWidgetsToFront, hasCopiedWidgets: copiedWidgets.length > 0, @@ -540,7 +531,7 @@ const InternalDashboard: React.FC = ({ } handleDismiss={() => setVisible(false)} handleCancel={() => setVisible(false)} - handleSubmit={onDelete} + handleSubmit={handleDelete} /> ); diff --git a/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts b/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts index b3c618238..489854a13 100644 --- a/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts +++ b/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts @@ -1,4 +1,3 @@ -import isFunction from 'lodash-es/isFunction'; import { useCallback } from 'react'; import { useDispatch } from 'react-redux'; import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; @@ -6,20 +5,19 @@ import { useKeyPress } from '../../hooks/useKeyPress'; import { onBringWidgetsToFrontAction, onCopyWidgetsAction, - onDeleteWidgetsAction, onPasteWidgetsAction, onSelectWidgetsAction, onSendWidgetsToBackAction, } from '../../store/actions'; import { DASHBOARD_CONTAINER_ID } from '../grid/getDashboardPosition'; -type useKeyboardShortcutsProps = { - deleteWidgets?: () => void; -}; +export interface UseKeyboardShortcutsOptions { + onPressDelete: VoidFunction; +} export const useKeyboardShortcuts = ({ - deleteWidgets: handleDeleteWidgetModal, -}: useKeyboardShortcutsProps) => { + onPressDelete, +}: UseKeyboardShortcutsOptions) => { const dispatch = useDispatch(); const selectedWidgets = useSelectedWidgets(); @@ -52,25 +50,10 @@ export const useKeyboardShortcuts = ({ dispatch(onSendWidgetsToBackAction()); }; - const deleteWidgets = useCallback(() => { - if (isFunction(handleDeleteWidgetModal)) { - handleDeleteWidgetModal(); - } else { - dispatch( - onDeleteWidgetsAction({ - widgets: selectedWidgets, - }) - ); - } - }, [selectedWidgets, dispatch, handleDeleteWidgetModal]); - - /** - * Keyboard hotkey / shortcut configuration - * key press filter makes sure that the event is not coming from - * other areas where we might use keyboard interactions such as - * the settings pane or a text area in a widget - */ - + // Keyboard hotkey / shortcut configuration + // key press filter makes sure that the event is not coming from + // other areas where we might use keyboard interactions such as + // the settings pane or a text area in a widget const keyPressFilter = (e: KeyboardEvent | ClipboardEvent) => e.target !== null && e.target instanceof Element && @@ -79,7 +62,7 @@ export const useKeyboardShortcuts = ({ useKeyPress('esc', { filter: keyPressFilter, callback: onClearSelection }); useKeyPress('backspace, del', { filter: keyPressFilter, - callback: deleteWidgets, + callback: onPressDelete, }); useKeyPress('mod+c', { filter: keyPressFilter, callback: copyWidgets }); useKeyPress('mod+v', { filter: keyPressFilter, callback: pasteWidgets }); diff --git a/packages/dashboard/src/components/widgets/widgetActions.tsx b/packages/dashboard/src/components/widgets/widgetActions.tsx index 172f3341b..8a76fb116 100644 --- a/packages/dashboard/src/components/widgets/widgetActions.tsx +++ b/packages/dashboard/src/components/widgets/widgetActions.tsx @@ -15,8 +15,8 @@ import { useDeleteWidgets } from '~/hooks/useDeleteWidgets'; import { type DashboardWidget } from '~/types'; import ConfirmDeleteModal from '../confirmDeleteModal'; import { - CSVDownloadButton, canOnlyDownloadLiveMode, + CSVDownloadButton, isQueryEmpty, } from '../csvDownloadButton'; import { useClients } from '../dashboard/clientContext'; @@ -60,7 +60,7 @@ const WidgetActions = ({ widget }: { widget: DashboardWidget }) => { (state: DashboardState) => state.isEdgeModeEnabled ); const { iotSiteWiseClient } = useClients(); - const { onDelete } = useDeleteWidgets(); + const deleteWidgets = useDeleteWidgets(); const metricsRecorder = getPlugin('metricsRecorder'); const readOnly = useSelector((state: DashboardState) => state.readOnly); @@ -80,7 +80,7 @@ const WidgetActions = ({ widget }: { widget: DashboardWidget }) => { const handleSubmit = () => { const widgetType = widget.type; - onDelete(widget); + deleteWidgets([widget.id]); dispatch(onChangeDashboardGridEnabledAction({ enabled: true })); setVisible(false); diff --git a/packages/dashboard/src/hooks/useDeleteWidgets.ts b/packages/dashboard/src/hooks/useDeleteWidgets.ts index 9781e321c..d54880af5 100644 --- a/packages/dashboard/src/hooks/useDeleteWidgets.ts +++ b/packages/dashboard/src/hooks/useDeleteWidgets.ts @@ -1,18 +1,14 @@ +import { useCallback } from 'react'; import { useDispatch } from 'react-redux'; -import { type DashboardWidget } from '..'; import { onDeleteWidgetsAction } from '~/store/actions'; export const useDeleteWidgets = () => { const dispatch = useDispatch(); - const onDelete = (toDelete: DashboardWidget | DashboardWidget[]) => { - dispatch( - onDeleteWidgetsAction({ - widgets: Array.isArray(toDelete) ? toDelete : [toDelete], - }) - ); - }; - return { - onDelete, - }; + return useCallback( + (widgetIds: string[]) => { + dispatch(onDeleteWidgetsAction({ widgetIds })); + }, + [dispatch] + ); }; diff --git a/packages/dashboard/src/store/actions/deleteWidgets/index.spec.ts b/packages/dashboard/src/store/actions/deleteWidgets/index.spec.ts index 656ec22ca..3b8d7cf31 100644 --- a/packages/dashboard/src/store/actions/deleteWidgets/index.spec.ts +++ b/packages/dashboard/src/store/actions/deleteWidgets/index.spec.ts @@ -1,8 +1,8 @@ import { deleteWidgets, onDeleteWidgetsAction } from './index'; +import type { DashboardState } from '../../state'; import { initialState } from '../../state'; import { MOCK_KPI_WIDGET, MockWidgetFactory } from '../../../../testing/mocks'; -import type { DashboardState } from '../../state'; import type { DashboardWidget } from '~/types'; const setupDashboardState = ( @@ -20,7 +20,7 @@ it('returns no widgets when deleting widgets from an empty dashboard', () => { deleteWidgets( setupDashboardState(), onDeleteWidgetsAction({ - widgets: [], + widgetIds: [], }) ).dashboardConfiguration.widgets ).toEqual([]); @@ -31,7 +31,7 @@ it('returns original dashboard when no widgets are specified to be deleted', () deleteWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onDeleteWidgetsAction({ - widgets: [], + widgetIds: [], }) ).dashboardConfiguration.widgets ).toEqual([MOCK_KPI_WIDGET]); @@ -42,7 +42,7 @@ it('removes widgets to be delete from dashboard configuration', () => { deleteWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onDeleteWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], }) ).dashboardConfiguration.widgets ).toEqual([]); @@ -53,7 +53,7 @@ it('does not remove any widgets when widget id specified is not present in the d deleteWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onDeleteWidgetsAction({ - widgets: [MockWidgetFactory.getKpiWidget({ id: 'does-not-exit' })], + widgetIds: [MockWidgetFactory.getKpiWidget({ id: 'does-not-exit' }).id], }) ).dashboardConfiguration.widgets ).toEqual([MOCK_KPI_WIDGET]); @@ -68,7 +68,7 @@ it('only deletes widget that is specified to be deleted when there are multiple deleteWidgets( setupDashboardState([widget1, widget2, widget3]), onDeleteWidgetsAction({ - widgets: [widget1, widget2], + widgetIds: [widget1.id, widget2.id], }) ).dashboardConfiguration.widgets ).toEqual([widget3]); diff --git a/packages/dashboard/src/store/actions/deleteWidgets/index.ts b/packages/dashboard/src/store/actions/deleteWidgets/index.ts index 28b37ad53..52f1860c2 100644 --- a/packages/dashboard/src/store/actions/deleteWidgets/index.ts +++ b/packages/dashboard/src/store/actions/deleteWidgets/index.ts @@ -1,10 +1,9 @@ import type { Action } from 'redux'; -import type { DashboardWidget } from '~/types'; import type { DashboardState } from '../../state'; -type DeleteWidgetsActionPayload = { - widgets: DashboardWidget[]; -}; +interface DeleteWidgetsActionPayload { + widgetIds: string[]; +} export interface DeleteWidgetsAction extends Action { type: 'DELETE_WIDGETS'; @@ -20,20 +19,18 @@ export const onDeleteWidgetsAction = ( export const deleteWidgets = ( state: DashboardState, - action: DeleteWidgetsAction + { payload: { widgetIds } }: DeleteWidgetsAction ): DashboardState => { - const widgetIdsToDelete = action.payload.widgets.map(({ id }) => id); - return { ...state, dashboardConfiguration: { ...state.dashboardConfiguration, widgets: state.dashboardConfiguration.widgets.filter( - ({ id }) => !widgetIdsToDelete.includes(id) + ({ id }) => !widgetIds.includes(id) ), }, selectedWidgets: state.selectedWidgets.filter( - ({ id }) => !widgetIdsToDelete.includes(id) + ({ id }) => !widgetIds.includes(id) ), }; }; From 48b460753d84323a2efcd916b8416c8821c71694 Mon Sep 17 00:00:00 2001 From: Tracy French Date: Thu, 20 Mar 2025 15:44:52 -0600 Subject: [PATCH 10/10] refactor: dashboard widget selection --- .../src/components/actions/index.tsx | 7 +- .../decimalPlaces/decimalPlaces.tsx | 2 +- .../src/components/grid/gestures/types.ts | 2 +- .../grid/gestures/usePointerTracker.ts | 2 +- .../internalDashboard/gestures/index.spec.tsx | 54 +--- .../internalDashboard/gestures/index.ts | 23 +- .../gestures/useMove.spec.tsx | 8 +- .../internalDashboard/gestures/useMove.ts | 18 +- .../gestures/useResize.spec.tsx | 10 +- .../internalDashboard/gestures/useResize.ts | 20 +- .../gestures/useSelection.ts | 27 +- .../components/internalDashboard/index.tsx | 44 +-- .../keyboardShortcuts.test.tsx | 2 +- .../internalDashboard/keyboardShortcuts.ts | 15 +- .../components/queryEditor/queryEditor.tsx | 13 +- .../src/components/queryEditor/useQuery.ts | 12 +- .../dashboard/src/components/widgets/list.tsx | 36 +-- .../src/components/widgets/selectionBox.tsx | 10 +- .../src/components/widgets/widget.tsx | 37 ++- .../src/components/widgets/widgetActions.tsx | 4 +- .../src/customization/hooks/useIsSelected.ts | 6 +- .../src/customization/propertiesSection.ts | 19 +- .../axisSettings/section.spec.tsx | 2 +- .../formatDataSettings/section.tsx | 8 +- .../propertiesPanel/panel.spec.tsx | 278 +++++++++++------- .../propertiesPanel/panel.tsx | 52 ++-- .../textSettings/link.spec.tsx | 2 +- .../textSettings/text.spec.tsx | 2 +- .../thresholdSettings/index.spec.tsx | 2 +- .../widgetTitle/widgetTitle.test.tsx | 8 +- .../dashboard/src/hooks/useDeleteWidgets.ts | 2 +- .../dashboard/src/hooks/useSelectedWidget.ts | 41 +++ .../dashboard/src/hooks/useSelectedWidgets.ts | 15 - .../store/actions/bringToFront/index.spec.ts | 12 +- .../src/store/actions/bringToFront/index.ts | 17 +- .../store/actions/copyWidgets/index.spec.ts | 32 +- .../src/store/actions/copyWidgets/index.ts | 18 +- .../store/actions/createWidget/index.spec.ts | 4 +- .../src/store/actions/createWidget/index.ts | 6 +- .../src/store/actions/deleteWidgets/index.ts | 8 +- .../store/actions/moveWidgets/index.spec.ts | 16 +- .../src/store/actions/moveWidgets/index.ts | 22 +- .../store/actions/pasteWidgets/index.spec.ts | 57 ++-- .../src/store/actions/pasteWidgets/index.ts | 13 +- .../store/actions/resizeWidgets/index.spec.ts | 98 +++--- .../src/store/actions/resizeWidgets/index.ts | 28 +- .../store/actions/selectWidgets/index.spec.ts | 54 ++-- .../src/store/actions/selectWidgets/index.ts | 18 +- .../store/actions/sendToBack/index.spec.ts | 15 +- .../src/store/actions/sendToBack/index.ts | 40 ++- .../src/store/actions/updateWidget/index.ts | 5 - packages/dashboard/src/store/state.ts | 22 +- .../dashboard/src/util/deepFreeze.spec.ts | 29 -- packages/dashboard/src/util/deepFreeze.ts | 9 - packages/dashboard/src/util/select.ts | 13 +- 55 files changed, 607 insertions(+), 712 deletions(-) create mode 100644 packages/dashboard/src/hooks/useSelectedWidget.ts delete mode 100644 packages/dashboard/src/hooks/useSelectedWidgets.ts delete mode 100644 packages/dashboard/src/util/deepFreeze.spec.ts delete mode 100644 packages/dashboard/src/util/deepFreeze.ts diff --git a/packages/dashboard/src/components/actions/index.tsx b/packages/dashboard/src/components/actions/index.tsx index 51eecb7fb..55d01975f 100644 --- a/packages/dashboard/src/components/actions/index.tsx +++ b/packages/dashboard/src/components/actions/index.tsx @@ -66,12 +66,7 @@ const Actions: React.FC = ({ const handleOnReadOnly = () => { dispatch(onToggleReadOnly()); - dispatch( - onSelectWidgetsAction({ - widgets: [], - union: false, - }) - ); + dispatch(onSelectWidgetsAction({ widgetIds: [] })); metricsRecorder?.record({ // When it is readOnly, it is toggled to Edit; Preview otherwise diff --git a/packages/dashboard/src/components/decimalPlaces/decimalPlaces.tsx b/packages/dashboard/src/components/decimalPlaces/decimalPlaces.tsx index 702fcf332..7e90843bb 100644 --- a/packages/dashboard/src/components/decimalPlaces/decimalPlaces.tsx +++ b/packages/dashboard/src/components/decimalPlaces/decimalPlaces.tsx @@ -10,7 +10,7 @@ export const DecimalPlaces = ({ }: { significantDigits?: number; onSignificantDigitsChange: (newValue: string) => void; - shouldClearErrors: boolean | string; + shouldClearErrors: boolean; showFormFieldLabel?: boolean; }) => { const { control, setValue, clearErrors } = useForm<{ diff --git a/packages/dashboard/src/components/grid/gestures/types.ts b/packages/dashboard/src/components/grid/gestures/types.ts index 790d3fb43..29ada70e3 100644 --- a/packages/dashboard/src/components/grid/gestures/types.ts +++ b/packages/dashboard/src/components/grid/gestures/types.ts @@ -10,7 +10,7 @@ export type DragEvent = { export type PointClickEvent = { target?: EventTarget; position: Position; - union: boolean; + shouldAppend: boolean; }; export type DropEvent = { diff --git a/packages/dashboard/src/components/grid/gestures/usePointerTracker.ts b/packages/dashboard/src/components/grid/gestures/usePointerTracker.ts index 19ff0503e..cf63257e8 100644 --- a/packages/dashboard/src/components/grid/gestures/usePointerTracker.ts +++ b/packages/dashboard/src/components/grid/gestures/usePointerTracker.ts @@ -53,7 +53,7 @@ export const usePointerTracker = ({ if (e.button === MouseClick.Left) { click({ position: getDashboardPosition(e), - union, + shouldAppend: union, }); } }; diff --git a/packages/dashboard/src/components/internalDashboard/gestures/index.spec.tsx b/packages/dashboard/src/components/internalDashboard/gestures/index.spec.tsx index 5d2ff2b27..8e95eae20 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/index.spec.tsx +++ b/packages/dashboard/src/components/internalDashboard/gestures/index.spec.tsx @@ -47,7 +47,7 @@ it('sets the active gesture to move when moving an unselected widget', () => { () => useGestures({ dashboardWidgets: MockDashboardFactory.get().widgets, - selectedWidgets: [], + selectedWidgetIds: [], cellSize: 1, }), { wrapper: ({ children }) => } @@ -73,18 +73,7 @@ it('sets the active gesture to move when moving a selected widget', () => { () => useGestures({ dashboardWidgets: MockDashboardFactory.get().widgets, - selectedWidgets: [ - { - id: 'widget-1', - x: 0, - y: 0, - z: 0, - height: 1, - width: 1, - type: 'kpi', - properties: {}, - }, - ], + selectedWidgetIds: ['widget-id'], cellSize: 1, }), { wrapper: ({ children }) => } @@ -110,18 +99,7 @@ it('sets the active gesture to resize when moving an anchor', () => { () => useGestures({ dashboardWidgets: MockDashboardFactory.get().widgets, - selectedWidgets: [ - { - id: 'widget-1', - x: 0, - y: 0, - z: 0, - height: 1, - width: 1, - type: 'kpi', - properties: {}, - }, - ], + selectedWidgetIds: ['widget-1'], cellSize: 1, }), { wrapper: ({ children }) => } @@ -147,18 +125,7 @@ it('sets the active gesture to select when moving on the grid', () => { () => useGestures({ dashboardWidgets: MockDashboardFactory.get().widgets, - selectedWidgets: [ - { - id: 'widget-1', - x: 0, - y: 0, - z: 0, - height: 1, - width: 1, - type: 'kpi', - properties: {}, - }, - ], + selectedWidgetIds: ['widget-1'], cellSize: 1, }), { wrapper: ({ children }) => } @@ -184,18 +151,7 @@ it('resets the active gesture after the gesture ends', () => { () => useGestures({ dashboardWidgets: MockDashboardFactory.get().widgets, - selectedWidgets: [ - { - id: 'widget-1', - x: 0, - y: 0, - z: 0, - height: 1, - width: 1, - type: 'kpi', - properties: {}, - }, - ], + selectedWidgetIds: ['widget-1'], cellSize: 1, }), { wrapper: ({ children }) => } diff --git a/packages/dashboard/src/components/internalDashboard/gestures/index.ts b/packages/dashboard/src/components/internalDashboard/gestures/index.ts index 8af036c03..587a372a5 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/index.ts +++ b/packages/dashboard/src/components/internalDashboard/gestures/index.ts @@ -8,17 +8,17 @@ import type { DashboardWidget } from '~/types'; import type { DragEvent, PointClickEvent } from '../../grid'; import type { Gesture } from './types'; -type GestureHooksProps = { +export interface UseGesturesOptions { dashboardWidgets: DashboardWidget[]; - selectedWidgets: DashboardWidget[]; + selectedWidgetIds: readonly string[]; cellSize: DashboardState['grid']['cellSize']; -}; +} export const useGestures = ({ dashboardWidgets, - selectedWidgets, + selectedWidgetIds, cellSize, -}: GestureHooksProps) => { +}: UseGesturesOptions) => { const [activeGesture, setActiveGesture] = useState( undefined ); @@ -36,12 +36,12 @@ export const useGestures = ({ }); const { onMoveStart, onMoveUpdate, onMoveEnd } = useMoveGestures({ setActiveGesture, - selectedWidgets, + selectedWidgetIds, cellSize: cellSize, }); const { onResizeStart, onResizeUpdate, onResizeEnd } = useResizeGestures({ setActiveGesture, - selectedWidgets, + selectedWidgetIds, cellSize: cellSize, }); @@ -62,14 +62,17 @@ export const useGestures = ({ anchor, } = determineTargetGestures(dragEvent); - const isOnWidgetInSelection = selectedWidgets.some( - (widget) => widget.id === widgetId + const isOnWidgetInSelection = selectedWidgetIds.some( + (id) => id === widgetId ); const isMoveGesture = !isUnion && (isOnWidget || isOnSelection); if (isOnWidget && !isOnSelection && !isOnWidgetInSelection) { - onPointSelect({ position: dragEvent.start, union: dragEvent.union }); + onPointSelect({ + position: dragEvent.start, + shouldAppend: dragEvent.union, + }); } if (isOnResizeHandle) { diff --git a/packages/dashboard/src/components/internalDashboard/gestures/useMove.spec.tsx b/packages/dashboard/src/components/internalDashboard/gestures/useMove.spec.tsx index bb0c2fd63..7cd1b371d 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/useMove.spec.tsx +++ b/packages/dashboard/src/components/internalDashboard/gestures/useMove.spec.tsx @@ -32,7 +32,7 @@ it('sets the gesture to move when performing a move gesture', () => { () => useMoveGestures({ setActiveGesture, - selectedWidgets: [], + selectedWidgetIds: [], cellSize: 1, }), { wrapper: ({ children }) => } @@ -58,7 +58,7 @@ it('dispatches the move action on gesture move update and end', () => { () => useMoveGestures({ setActiveGesture, - selectedWidgets: [], + selectedWidgetIds: [], cellSize: 1, }), { wrapper: ({ children }) => } @@ -78,7 +78,7 @@ it('dispatches the move action on gesture move update and end', () => { }); expect(onMoveWidgetsAction).toBeCalledWith({ - widgets: [], + widgetIds: [], vector: { x: 1, y: 0 }, complete: false, }); @@ -93,7 +93,7 @@ it('dispatches the move action on gesture move update and end', () => { }); expect(onMoveWidgetsAction).toBeCalledWith({ - widgets: [], + widgetIds: [], vector: { x: 1, y: 0 }, complete: true, }); diff --git a/packages/dashboard/src/components/internalDashboard/gestures/useMove.ts b/packages/dashboard/src/components/internalDashboard/gestures/useMove.ts index ebbf76f20..3a23fdb74 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/useMove.ts +++ b/packages/dashboard/src/components/internalDashboard/gestures/useMove.ts @@ -1,37 +1,37 @@ -import { useCallback } from 'react'; import type * as React from 'react'; +import { useCallback } from 'react'; import { useDispatch } from 'react-redux'; import { onMoveWidgetsAction } from '~/store/actions'; import { toGridPosition } from '~/util/position'; import type { DashboardState } from '~/store/state'; -import type { Position, DashboardWidget } from '~/types'; +import type { Position } from '~/types'; import type { DragEvent } from '../../grid'; import type { Gesture } from './types'; -type MoveHooksProps = { +export interface UseMoveGesturesOptions { setActiveGesture: React.Dispatch>; - selectedWidgets: DashboardWidget[]; + selectedWidgetIds: readonly string[]; cellSize: DashboardState['grid']['cellSize']; -}; +} export const useMoveGestures = ({ setActiveGesture, - selectedWidgets, + selectedWidgetIds, cellSize, -}: MoveHooksProps) => { +}: UseMoveGesturesOptions) => { const dispatch = useDispatch(); const moveWidgets = useCallback( (vector: Position, complete?: boolean) => { dispatch( onMoveWidgetsAction({ - widgets: selectedWidgets, + widgetIds: selectedWidgetIds, vector: toGridPosition(vector, cellSize), complete, }) ); }, - [selectedWidgets, cellSize, dispatch] + [selectedWidgetIds, cellSize, dispatch] ); const onMoveStart = () => { diff --git a/packages/dashboard/src/components/internalDashboard/gestures/useResize.spec.tsx b/packages/dashboard/src/components/internalDashboard/gestures/useResize.spec.tsx index 5dd0ed95b..6476445fe 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/useResize.spec.tsx +++ b/packages/dashboard/src/components/internalDashboard/gestures/useResize.spec.tsx @@ -36,7 +36,7 @@ it('sets the gesture to resize when performing a resize gesture', () => { () => useResizeGestures({ setActiveGesture, - selectedWidgets: [], + selectedWidgetIds: [], cellSize: 1, }), { wrapper: ({ children }) => } @@ -62,7 +62,7 @@ it('dispatches the resize action on gesture resize update and end', () => { () => useResizeGestures({ setActiveGesture, - selectedWidgets: [], + selectedWidgetIds: [], cellSize: 1, }), { wrapper: ({ children }) => } @@ -82,7 +82,7 @@ it('dispatches the resize action on gesture resize update and end', () => { }); expect(onResizeWidgetsAction).toBeCalledWith({ - widgets: [], + widgetIds: [], anchor: 'bottom', vector: { x: 1, y: 0 }, complete: false, @@ -98,7 +98,7 @@ it('dispatches the resize action on gesture resize update and end', () => { }); expect(onResizeWidgetsAction).toBeCalledWith({ - widgets: [], + widgetIds: [], anchor: 'bottom', vector: { x: 1, y: 0 }, complete: true, @@ -119,7 +119,7 @@ it('doesnt dispatch the resize action on gesture resize update and end if there () => useResizeGestures({ setActiveGesture, - selectedWidgets: [], + selectedWidgetIds: [], cellSize: 1, }), { wrapper: ({ children }) => } diff --git a/packages/dashboard/src/components/internalDashboard/gestures/useResize.ts b/packages/dashboard/src/components/internalDashboard/gestures/useResize.ts index bcd012278..326a10989 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/useResize.ts +++ b/packages/dashboard/src/components/internalDashboard/gestures/useResize.ts @@ -1,25 +1,25 @@ -import { useCallback, useState } from 'react'; import type * as React from 'react'; +import { useCallback, useState } from 'react'; import { useDispatch } from 'react-redux'; +import type { Anchor } from '~/store/actions'; import { onResizeWidgetsAction } from '~/store/actions'; import { toGridPosition } from '~/util/position'; -import type { Anchor } from '~/store/actions'; import type { DashboardState } from '~/store/state'; -import type { Position, DashboardWidget } from '~/types'; +import type { Position } from '~/types'; import type { DragEvent } from '../../grid'; import type { Gesture } from './types'; -type ResizeHooksProps = { +export interface UseResizeGesturesOptions { setActiveGesture: React.Dispatch>; - selectedWidgets: DashboardWidget[]; + selectedWidgetIds: readonly string[]; cellSize: DashboardState['grid']['cellSize']; -}; +} export const useResizeGestures = ({ setActiveGesture, - selectedWidgets, + selectedWidgetIds, cellSize, -}: ResizeHooksProps) => { +}: UseResizeGesturesOptions) => { const dispatch = useDispatch(); const resizeWidgets = useCallback( @@ -27,13 +27,13 @@ export const useResizeGestures = ({ dispatch( onResizeWidgetsAction({ anchor, - widgets: selectedWidgets, + widgetIds: selectedWidgetIds, vector: toGridPosition(vector, cellSize), complete, }) ); }, - [selectedWidgets, cellSize, dispatch] + [selectedWidgetIds, cellSize, dispatch] ); const [anchor, setAnchor] = useState(null); diff --git a/packages/dashboard/src/components/internalDashboard/gestures/useSelection.ts b/packages/dashboard/src/components/internalDashboard/gestures/useSelection.ts index 171d3af68..ab619c61b 100644 --- a/packages/dashboard/src/components/internalDashboard/gestures/useSelection.ts +++ b/packages/dashboard/src/components/internalDashboard/gestures/useSelection.ts @@ -1,10 +1,10 @@ -import { useCallback, useState } from 'react'; import type * as React from 'react'; +import { useCallback, useState } from 'react'; import { useDispatch } from 'react-redux'; import { onSelectWidgetsAction } from '~/store/actions'; -import { getSelectedWidgets, pointSelect, selectedRect } from '~/util/select'; +import { getSelectedWidgetIds, pointSelect, selectedRect } from '~/util/select'; import type { DashboardState } from '~/store/state'; -import type { Position, Selection, DashboardWidget } from '~/types'; +import type { DashboardWidget, Position, Selection } from '~/types'; import type { DragEvent } from '../../grid'; import type { Gesture } from './types'; @@ -21,11 +21,11 @@ export const useSelectionGestures = ({ }: SelectionHooksProps) => { const dispatch = useDispatch(); const selectWidgets = useCallback( - (widgets: DashboardWidget[], union: boolean) => { + (widgetIds: readonly string[], shouldAppend: boolean) => { dispatch( onSelectWidgetsAction({ - widgets, - union, + widgetIds, + shouldAppend, }) ); }, @@ -37,14 +37,23 @@ export const useSelectionGestures = ({ ); const onPointSelect = useCallback( - ({ position, union }: { position: Position; union: boolean }) => { + ({ + position, + shouldAppend, + }: { + position: Position; + shouldAppend: boolean; + }) => { const intersectedWidget = pointSelect({ dashboardWidgets, cellSize, position, }); - selectWidgets(intersectedWidget ? [intersectedWidget] : [], union); + selectWidgets( + intersectedWidget ? [intersectedWidget.id] : [], + shouldAppend + ); }, [dashboardWidgets, cellSize, selectWidgets] ); @@ -67,7 +76,7 @@ export const useSelectionGestures = ({ const union = dragEvent.union; - const intersectedWidgets = getSelectedWidgets({ + const intersectedWidgets = getSelectedWidgetIds({ selectedRect: selectedRect(updatedSelection), dashboardWidgets, cellSize, diff --git a/packages/dashboard/src/components/internalDashboard/index.tsx b/packages/dashboard/src/components/internalDashboard/index.tsx index 200f1836c..a9fb707bb 100644 --- a/packages/dashboard/src/components/internalDashboard/index.tsx +++ b/packages/dashboard/src/components/internalDashboard/index.tsx @@ -14,13 +14,8 @@ import { WebglContext } from '@iot-app-kit/react-components'; import { type CSSProperties, type ReactNode, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { PropertiesPaneIcon } from '../resizablePanes/assets/propertiesPaneIcon'; - import { selectedRect } from '~/util/select'; - import type { ContextMenuProps } from '../contextMenu'; -/** - * Component imports - */ import ContextMenu from '../contextMenu'; import { useClients } from '../dashboard/clientContext'; import CustomDragLayer from '../dragLayer'; @@ -32,12 +27,8 @@ import { ResizablePanes } from '../resizablePanes'; import type { UserSelectionProps } from '../userSelection'; import UserSelection from '../userSelection'; import type { WidgetsProps } from '../widgets/list'; -import Widgets from '../widgets/list'; +import { Widgets } from '../widgets/list'; import DashboardEmptyState from './dashboardEmptyState'; - -/** - * Store imports - */ import { onBringWidgetsToFrontAction, onCopyWidgetsAction, @@ -46,12 +37,10 @@ import { onSendWidgetsToBackAction, } from '~/store/actions'; import { widgetCreator } from '~/store/actions/createWidget/presets'; - import { toGridPosition } from '~/util/position'; import { useGestures } from './gestures'; import { useKeyboardShortcuts } from './keyboardShortcuts'; - -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgetIds } from '~/hooks/useSelectedWidget'; import { DefaultDashboardMessages } from '~/messages'; import type { DashboardState } from '~/store/state'; import type { @@ -65,7 +54,6 @@ import { AssetModelSelection } from '../assetModelSelection/assetModelSelection' import ConfirmDeleteModal from '../confirmDeleteModal'; import { useModelBasedQuery } from '../queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/modelBasedQuery/useModelBasedQuery'; import DashboardHeader from './dashboardHeader'; - import { useChatbotPosition } from '~/hooks/useChatbotPosition'; import { useDashboardViewport } from '~/hooks/useDashboardViewport'; import { useSyncDashboardConfiguration } from '~/hooks/useSyncDashboardConfiguration'; @@ -122,11 +110,11 @@ const InternalDashboard: React.FC = ({ const grid = useSelector((state: DashboardState) => state.grid); const cellSize = useSelector((state: DashboardState) => state.grid.cellSize); const copiedWidgets = useSelector( - (state: DashboardState) => state.copiedWidgets + (state: DashboardState) => state.copiedWidgetIds ); const readOnly = useSelector((state: DashboardState) => state.readOnly); const assistant = useSelector((state: DashboardState) => state.assistant); - const selectedWidgets = useSelectedWidgets(); + const selectedWidgetIds = useSelectedWidgetIds(); const { assetModelId, hasModelBasedQuery } = useModelBasedQuery(); const hasValidAssetModelData = !!(hasModelBasedQuery && assetModelId); @@ -156,11 +144,7 @@ const InternalDashboard: React.FC = ({ }; const copyWidgets = () => { - dispatch( - onCopyWidgetsAction({ - widgets: selectedWidgets, - }) - ); + dispatch(onCopyWidgetsAction({ widgetIds: selectedWidgetIds })); }; const pasteWidgets = (position?: Position) => { @@ -182,7 +166,7 @@ const InternalDashboard: React.FC = ({ const deleteWidgets = useDeleteWidgets(); const onPressDelete = () => setVisible(true); const handleDelete = () => { - deleteWidgets(selectedWidgets.map(({ id }) => id)); + deleteWidgets(selectedWidgetIds); setVisible(false); }; @@ -202,7 +186,7 @@ const InternalDashboard: React.FC = ({ onGestureEnd, } = useGestures({ dashboardWidgets, - selectedWidgets, + selectedWidgetIds, cellSize, }); @@ -265,7 +249,6 @@ const InternalDashboard: React.FC = ({ const widgetsProps: WidgetsProps = { readOnly, dashboardConfiguration, - selectedWidgets, messageOverrides: DefaultDashboardMessages, cellSize, dragEnabled: grid.enabled, @@ -283,7 +266,7 @@ const InternalDashboard: React.FC = ({ sendWidgetsToBack, bringWidgetsToFront, hasCopiedWidgets: copiedWidgets.length > 0, - hasSelectedWidgets: selectedWidgets.length > 0, + hasSelectedWidgets: selectedWidgetIds.length > 0, }; const dashboardToolbarBottomBorder = { @@ -350,12 +333,7 @@ const InternalDashboard: React.FC = ({ - } + leftPane={} centerPane={
= ({ 1 ? 's' : '' + selectedWidgetIds.length > 1 ? 's' : '' }?`} cancelTitle='Cancel' submitTitle='Delete' @@ -521,7 +499,7 @@ const InternalDashboard: React.FC = ({ {`Do you want to delete the selected widget${ - selectedWidgets.length > 1 ? 's' : '' + selectedWidgetIds.length > 1 ? 's' : '' }? All changes will be lost.`} diff --git a/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.test.tsx b/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.test.tsx index 328979101..17d50516e 100644 --- a/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.test.tsx +++ b/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.test.tsx @@ -97,7 +97,7 @@ it.skip('can clear the selection', () => { renderDashboardAndPressKey({ key: 'Escape', meta: false }); expect(onSelectWidgetsAction).toBeCalledWith({ - widgets: [], + widgetIds: [], union: false, }); }); diff --git a/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts b/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts index 489854a13..3244393c3 100644 --- a/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts +++ b/packages/dashboard/src/components/internalDashboard/keyboardShortcuts.ts @@ -1,6 +1,6 @@ import { useCallback } from 'react'; import { useDispatch } from 'react-redux'; -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgetIds } from '~/hooks/useSelectedWidget'; import { useKeyPress } from '../../hooks/useKeyPress'; import { onBringWidgetsToFrontAction, @@ -19,24 +19,19 @@ export const useKeyboardShortcuts = ({ onPressDelete, }: UseKeyboardShortcutsOptions) => { const dispatch = useDispatch(); - const selectedWidgets = useSelectedWidgets(); + const widgetWidgetIds = useSelectedWidgetIds(); const onClearSelection = () => { - dispatch( - onSelectWidgetsAction({ - widgets: [], - union: false, - }) - ); + dispatch(onSelectWidgetsAction({ widgetIds: [] })); }; const copyWidgets = useCallback(() => { dispatch( onCopyWidgetsAction({ - widgets: selectedWidgets, + widgetIds: widgetWidgetIds, }) ); - }, [dispatch, selectedWidgets]); + }, [dispatch, widgetWidgetIds]); const pasteWidgets = () => { dispatch(onPasteWidgetsAction({ position: undefined })); diff --git a/packages/dashboard/src/components/queryEditor/queryEditor.tsx b/packages/dashboard/src/components/queryEditor/queryEditor.tsx index e162b706a..96a68cfa0 100644 --- a/packages/dashboard/src/components/queryEditor/queryEditor.tsx +++ b/packages/dashboard/src/components/queryEditor/queryEditor.tsx @@ -2,19 +2,18 @@ import { IoTSiteWiseQueryEditor } from './iotSiteWiseQueryEditor'; import { QueryEditorErrorBoundary } from './queryEditorErrorBoundary'; import { useQuery } from './useQuery'; import { type IoTSiteWise } from '@aws-sdk/client-iotsitewise'; -import { type DashboardWidget } from '~/types'; import { useIsAddButtonDisabled } from './helpers/useIsAddButtonDisabled'; import { getCorrectSelectionMode } from './helpers/getCorrectSelectionMode'; import { useAssetsForAssetModel } from './iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetsForAssetModelSelect/useAssetsForAssetModel/useAssetsForAssetModel'; import { useModelBasedQuery } from './iotSiteWiseQueryEditor/assetModelDataStreamExplorer/modelBasedQuery/useModelBasedQuery'; +import { useSelectedWidgets } from '~/hooks/useSelectedWidget'; -export function QueryEditor({ - iotSiteWiseClient, - selectedWidgets, -}: { +export interface QueryEditorProps { iotSiteWiseClient: IoTSiteWise; - selectedWidgets: DashboardWidget[]; -}) { +} + +export function QueryEditor({ iotSiteWiseClient }: QueryEditorProps) { + const selectedWidgets = useSelectedWidgets(); const [_query, setQuery] = useQuery(); const addButtonDisabled = useIsAddButtonDisabled(selectedWidgets); const correctSelectionMode = getCorrectSelectionMode(selectedWidgets); diff --git a/packages/dashboard/src/components/queryEditor/useQuery.ts b/packages/dashboard/src/components/queryEditor/useQuery.ts index e9338c0fc..52222c3a0 100644 --- a/packages/dashboard/src/components/queryEditor/useQuery.ts +++ b/packages/dashboard/src/components/queryEditor/useQuery.ts @@ -1,4 +1,4 @@ -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgets } from '~/hooks/useSelectedWidget'; import { useDispatch } from 'react-redux'; import { onUpdateWidgetsAction } from '~/store/actions'; import { type DashboardWidget, type IoTSiteWiseDataStreamQuery } from '~/types'; @@ -65,9 +65,7 @@ export function useQuery(): [ ) => void ] { const dispatch = useDispatch(); - const selectedWidgets = useSelectedWidgets<{ - queryConfig: { query: IoTSiteWiseDataStreamQuery }; - }>(); + const selectedWidgets = useSelectedWidgets(); const selectedWidget = isOneWidgetSelected(selectedWidgets) ? getFirstWidget(selectedWidgets) : undefined; @@ -114,9 +112,9 @@ export function useQuery(): [ } function isOneWidgetSelected( - widgets: WidgetWithQuery[] -): widgets is [WidgetWithQuery] { - return widgets.length === 1; + widgetIds: DashboardWidget[] | WidgetWithQuery[] +): widgetIds is [WidgetWithQuery] { + return widgetIds.length === 1; } function isWidget( diff --git a/packages/dashboard/src/components/widgets/list.tsx b/packages/dashboard/src/components/widgets/list.tsx index 7db569b17..9e348a4d9 100644 --- a/packages/dashboard/src/components/widgets/list.tsx +++ b/packages/dashboard/src/components/widgets/list.tsx @@ -1,39 +1,24 @@ -import type { SiteWiseQuery } from '@iot-app-kit/source-iotsitewise'; -import includes from 'lodash-es/includes'; -import map from 'lodash-es/map'; import type { DashboardMessages } from '~/messages'; import { type DashboardState } from '~/store/state'; -import type { DashboardWidget } from '~/types'; import './list.css'; import SelectionBox from './selectionBox'; import WidgetComponent from './widget'; -export type WidgetsProps = { +export interface WidgetsProps { readOnly: boolean; - query?: SiteWiseQuery; dashboardConfiguration: DashboardState['dashboardConfiguration']; - selectedWidgets: DashboardWidget[]; cellSize: number; dragEnabled: boolean; messageOverrides: DashboardMessages; -}; +} -const Widgets: React.FC = ({ +export const Widgets = ({ dashboardConfiguration, - selectedWidgets, cellSize, dragEnabled, messageOverrides, - query, readOnly, -}) => { - const { widgets } = dashboardConfiguration; - const isSelected = (id: string) => - includes( - map(selectedWidgets, (sw) => sw.id), - id - ); - +}: WidgetsProps) => { return (
= ({ }} > {!readOnly && ( - + )} - {widgets.map((widget) => ( + {dashboardConfiguration.widgets.map((widget) => ( = ({
); }; - -export default Widgets; diff --git a/packages/dashboard/src/components/widgets/selectionBox.tsx b/packages/dashboard/src/components/widgets/selectionBox.tsx index 657c5ccd2..1ba934783 100644 --- a/packages/dashboard/src/components/widgets/selectionBox.tsx +++ b/packages/dashboard/src/components/widgets/selectionBox.tsx @@ -1,22 +1,20 @@ import { getSelectionBox } from '~/util/getSelectionBox'; import SelectionBoxAnchor from './selectionBoxAnchor'; - -import type { DashboardWidget } from '~/types'; import { gestureable } from '../internalDashboard/gestures/determineTargetGestures'; import { useLayers } from '../internalDashboard/useLayers'; import './selectionBox.css'; +import { useSelectedWidgets } from '~/hooks/useSelectedWidget'; -export type SelectionBoxProps = { - selectedWidgets: DashboardWidget[]; +export interface SelectionBoxProps { cellSize: number; dragEnabled: boolean; -}; +} const SelectionBox: React.FC = ({ - selectedWidgets, cellSize, dragEnabled, }) => { + const selectedWidgets = useSelectedWidgets(); const { selectionBoxLayer, selectionGestureLayer } = useLayers(); const rect = getSelectionBox(selectedWidgets); diff --git a/packages/dashboard/src/components/widgets/widget.tsx b/packages/dashboard/src/components/widgets/widget.tsx index 666f5294f..21a4ecd9a 100644 --- a/packages/dashboard/src/components/widgets/widget.tsx +++ b/packages/dashboard/src/components/widgets/widget.tsx @@ -5,43 +5,42 @@ import { } from '../internalDashboard/gestures/determineTargetGestures'; import DynamicWidgetComponent from './dynamicWidget'; import WidgetActions from './widgetActions'; - -import type { SiteWiseQuery } from '@iot-app-kit/source-iotsitewise'; import type { DashboardMessages } from '~/messages'; import type { DashboardWidget } from '~/types'; import './widget.css'; +import includes from 'lodash-es/includes'; +import map from 'lodash-es/map'; +import { useSelectedWidgetIds } from '~/hooks/useSelectedWidget'; -export type WidgetProps = { +export interface WidgetProps { readOnly: boolean; - query?: SiteWiseQuery; - isSelected: boolean; - numSelected: number; cellSize: number; widget: DashboardWidget; messageOverrides: DashboardMessages; -}; +} /** - * * Component used to position a widget on the dashboard and * mark it with the handles required to capture gestures - * */ const WidgetComponent: React.FC = ({ cellSize, widget, messageOverrides, - isSelected, - numSelected, readOnly, }) => { - const { x, y, z, width, height } = widget; + const selectedWidgetIds = useSelectedWidgetIds(); + const isSelected = (id: string) => + includes( + map(selectedWidgetIds, (widgetId) => widgetId), + id + ); const [showActionButtons, setShowActionButtons] = useState(false); const widgetActions = () => { - if (numSelected > 1) { + if (selectedWidgetIds.length > 1) { return null; - } else if (isSelected) { + } else if (isSelected(widget.id)) { return ; } else { return showActionButtons ? : null; @@ -54,11 +53,11 @@ const WidgetComponent: React.FC = ({ {...idable(widget.id)} className={`widget ${readOnly ? 'widget-readonly' : 'widget-editable'}`} style={{ - ...(!z ? {} : { zIndex: z.toString() }), - top: `${cellSize * y}px`, - left: `${cellSize * x}px`, - width: `${cellSize * width}px`, - height: `${cellSize * height}px`, + ...(!widget.z ? {} : { zIndex: widget.z.toString() }), + top: `${cellSize * widget.y}px`, + left: `${cellSize * widget.x}px`, + width: `${cellSize * widget.width}px`, + height: `${cellSize * widget.height}px`, }} onMouseEnter={() => setShowActionButtons(true)} onMouseLeave={() => setShowActionButtons(false)} diff --git a/packages/dashboard/src/components/widgets/widgetActions.tsx b/packages/dashboard/src/components/widgets/widgetActions.tsx index 8a76fb116..cc92f97e7 100644 --- a/packages/dashboard/src/components/widgets/widgetActions.tsx +++ b/packages/dashboard/src/components/widgets/widgetActions.tsx @@ -69,7 +69,9 @@ const WidgetActions = ({ widget }: { widget: DashboardWidget }) => { const handleDelete: NonNullable = (e) => { e.stopPropagation(); dispatch(onChangeDashboardGridEnabledAction({ enabled: false })); - dispatch(onSelectWidgetsAction({ widgets: [widget], union: false })); + dispatch( + onSelectWidgetsAction({ widgetIds: [widget.id], shouldAppend: false }) + ); setVisible(true); }; diff --git a/packages/dashboard/src/customization/hooks/useIsSelected.ts b/packages/dashboard/src/customization/hooks/useIsSelected.ts index 79bd9d6ef..85d42d4f0 100644 --- a/packages/dashboard/src/customization/hooks/useIsSelected.ts +++ b/packages/dashboard/src/customization/hooks/useIsSelected.ts @@ -1,7 +1,7 @@ import includes from 'lodash-es/includes'; import map from 'lodash-es/map'; import { useCallback } from 'react'; -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgetIds } from '~/hooks/useSelectedWidget'; import type { DashboardWidget } from '~/types'; /** @@ -11,12 +11,12 @@ import type { DashboardWidget } from '~/types'; * */ export const useIsSelected = (widget: T) => { - const selectedWidgets = useSelectedWidgets(); + const selectedWidgets = useSelectedWidgetIds(); const isSelected = useCallback( () => includes( - map(selectedWidgets, (sw) => sw.id), + map(selectedWidgets, (widgetId) => widgetId), widget.id ), [selectedWidgets, widget] diff --git a/packages/dashboard/src/customization/propertiesSection.ts b/packages/dashboard/src/customization/propertiesSection.ts index 3bbba5721..88e5ac936 100644 --- a/packages/dashboard/src/customization/propertiesSection.ts +++ b/packages/dashboard/src/customization/propertiesSection.ts @@ -1,7 +1,7 @@ import isEqual from 'lodash-es/isEqual'; import type * as React from 'react'; import { useDispatch } from 'react-redux'; -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgets } from '~/hooks/useSelectedWidget'; import { onMoveWidgetsAction, onResizeWidgetsAction, @@ -58,7 +58,6 @@ const NO_SIZE = { height: 0, width: 0 }; const NO_POSITION = { x: 0, y: 0 }; /** - * * Helper to convert a list of values of 1 type into a Maybe type * that represents those a singular value of that list * @@ -78,7 +77,6 @@ const compositeValue = (values: T[]): Maybe => values.every((v) => isEqual(v, values[0])) ? Just(values[0]) : Nothing(); /** - * * the most generic predicate function for a dashboard widget list * Is always true. To be used as the default predicate function in useSelection */ @@ -87,7 +85,6 @@ export const isDashboardWidget = ( ): widget is DashboardWidget => !!widget; /** - * * hook that represents the widget selection * * returns other hooks to be used in react components @@ -96,7 +93,6 @@ export const isDashboardWidget = ( * useProperty: hook that allows you to get and set a value on the selection * useSize: hook that allows you to get and set the size of the selection * usePosition: hook that allows you to get and set the position of the selection - * */ export const useSelection = ( { filter }: { filter?: FilterPredicate } = { filter: undefined } @@ -105,10 +101,7 @@ export const useSelection = ( const selectedWidgets = useSelectedWidgets(); const filteredSelection = selectedWidgets.filter(filter ?? isDashboardWidget); - /** - * selection filter does not apply to entire selection - * this means we cannot correctly narrow the selection type - */ + // selection filter does not apply to entire selection this means we cannot correctly narrow the selection type if ( selectedWidgets.length === 0 || !isEqual(selectedWidgets, filteredSelection) @@ -117,9 +110,7 @@ export const useSelection = ( const selection = filteredSelection; - /** - * TECH DEBT: getSelectionBox should never be null given the above check - */ + // TECH DEBT: getSelectionBox should never be null given the above check const { x, y, height, width } = trimRectPosition( getSelectionBox(selection) ?? { ...NO_SIZE, ...NO_POSITION } ); @@ -133,7 +124,7 @@ export const useSelection = ( dispatch( onResizeWidgetsAction({ anchor: 'bottom-right', - widgets: selection, + widgetIds: selection.map(({ id }) => id), vector, }) ), @@ -146,7 +137,7 @@ export const useSelection = ( (vector) => dispatch( onMoveWidgetsAction({ - widgets: selection, + widgetIds: selection.map(({ id }) => id), vector, complete: true, }) diff --git a/packages/dashboard/src/customization/propertiesSections/axisSettings/section.spec.tsx b/packages/dashboard/src/customization/propertiesSections/axisSettings/section.spec.tsx index 2d240e3b7..a52a1490f 100644 --- a/packages/dashboard/src/customization/propertiesSections/axisSettings/section.spec.tsx +++ b/packages/dashboard/src/customization/propertiesSections/axisSettings/section.spec.tsx @@ -10,7 +10,7 @@ const state: Partial = { dashboardConfiguration: { widgets: [MOCK_LINE_CHART_WIDGET], }, - selectedWidgets: [MOCK_LINE_CHART_WIDGET], + selectedWidgetIds: [MOCK_LINE_CHART_WIDGET.id], }; const TestComponent = () => ( diff --git a/packages/dashboard/src/customization/propertiesSections/formatDataSettings/section.tsx b/packages/dashboard/src/customization/propertiesSections/formatDataSettings/section.tsx index d6cdb61cb..21bbc9623 100644 --- a/packages/dashboard/src/customization/propertiesSections/formatDataSettings/section.tsx +++ b/packages/dashboard/src/customization/propertiesSections/formatDataSettings/section.tsx @@ -5,7 +5,7 @@ import './section.css'; import { spaceScaledS } from '@cloudscape-design/design-tokens'; import { isNumeric } from '@iot-app-kit/core'; import DecimalPlaces from '~/components/decimalPlaces'; -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgetIds } from '~/hooks/useSelectedWidget'; import { FormLabel, StyledExpandableSection, @@ -18,8 +18,8 @@ export const DecimalPlacesSection = ({ significantDigits: number | undefined; updateSignificantDigits: (newValue: number | undefined) => void; }) => { - const selectedWidgets = useSelectedWidgets(); - const selectedWidgetId = selectedWidgets[0]?.id; + const selectedWidgets = useSelectedWidgetIds(); + const selectedWidgetId = selectedWidgets.at(0); const onSignificantDigitsChange = (value: string) => { const newValue = isNumeric(value) ? parseInt(value) || 0 : undefined; @@ -46,7 +46,7 @@ export const DecimalPlacesSection = ({
diff --git a/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.spec.tsx b/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.spec.tsx index 036c7eeb7..765ce1d0a 100644 --- a/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.spec.tsx +++ b/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.spec.tsx @@ -1,82 +1,32 @@ -import { QueryClient } from '@tanstack/react-query'; - -vi.mock('../../data/query-client', () => ({ - queryClient: new QueryClient({ - defaultOptions: { - queries: { - retry: false, - }, - }, - }), -})); - import { IoTSiteWise, type IoTSiteWiseClient, } from '@aws-sdk/client-iotsitewise'; import { type IoTTwinMakerClient } from '@aws-sdk/client-iottwinmaker'; -import { - type RenderResult, - act, - waitFor, - cleanup, - fireEvent, - render, - screen, -} from '@testing-library/react'; -import createWrapper from '@cloudscape-design/components/test-utils/dom'; +import { render, screen } from '@testing-library/react'; import { Provider } from 'react-redux'; - import { PropertiesPanel } from './panel'; import { configureDashboardStore } from '~/store'; import { type DashboardState } from '~/store/state'; import { MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET, + MOCK_TEXT_WIDGET, } from '../../../../testing/mocks'; import { mockAssetDescription } from '../../../../testing/mocks/siteWiseSDK'; -import { type SiteWiseAssetQuery } from '@iot-app-kit/source-iotsitewise'; -import { type QueryWidget } from '~/customization/widgets/types'; import { type DashboardIotSiteWiseClients } from '~/types'; import { createMockIoTEventsSDK, createMockSiteWiseSDK, } from '@iot-app-kit/testing-util'; import { ClientContext } from '~/components/dashboard/clientContext'; +import { userEvent } from '@testing-library/user-event'; -const MockAssetQuery: SiteWiseAssetQuery['assets'][number] = { - assetId: 'mock-id', - properties: [ - { propertyId: 'property-1', refId: 'p1' }, - { propertyId: 'property-2', refId: 'p2' }, - { propertyId: 'e70495ff-c016-4175-9012-62c37857e0d1' }, - ], -}; - -const styleSettings = { - p1: { - color: '#00ff00', - }, - p2: { - color: '#0000ff', - }, -}; -const MockWidget: QueryWidget = { - ...MOCK_LINE_CHART_WIDGET, - properties: { - queryConfig: { - source: 'iotsitewise', - query: { - assets: [MockAssetQuery], - }, - }, - styleSettings, - }, -}; +const user = userEvent.setup(); type SetupStoreOptions = { widgets?: DashboardState['dashboardConfiguration']['widgets']; - selectedWidgets?: DashboardState['selectedWidgets']; + selectedWidgets?: DashboardState['selectedWidgetIds']; }; const setupStore = ({ widgets, selectedWidgets }: SetupStoreOptions) => @@ -84,15 +34,12 @@ const setupStore = ({ widgets, selectedWidgets }: SetupStoreOptions) => dashboardConfiguration: { widgets, }, - selectedWidgets, + selectedWidgetIds: selectedWidgets, }); -const renderTestComponentAsync = async ( - options?: SetupStoreOptions -): Promise => { +const renderTestComponent = (options?: SetupStoreOptions) => { const optionsWithDefault = { - widgets: [MockWidget], - selectedWidgets: [MockWidget], + widgets: [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET, MOCK_TEXT_WIDGET], ...options, }; @@ -112,14 +59,12 @@ const renderTestComponentAsync = async ( iotSiteWise: new IoTSiteWise(), }; - const element = await waitFor(async () => - render( - - - - - - ) + const element = render( + + + + + ); if (element === undefined) throw new Error('Something went wrong!'); @@ -127,66 +72,171 @@ const renderTestComponentAsync = async ( return element; }; -describe(`${PropertiesPanel.name}`, () => { - beforeEach(() => { - vi.resetAllMocks(); - }); +beforeEach(() => { + vi.resetAllMocks(); +}); - afterEach(cleanup); +test('empty state when no component selected', () => { + renderTestComponent({ selectedWidgets: [] }); - it('should render tabs', async () => { - await renderTestComponentAsync(); + expect(screen.getByText('Select a widget to configure.')).toBeVisible(); +}); - expect(screen.getByText('Style')).toBeVisible(); - expect(screen.getByText('Properties')).toBeVisible(); - expect(screen.getByText('Thresholds')).toBeVisible(); - }); +test('tabs rendered when component selected', () => { + renderTestComponent({ selectedWidgets: [MOCK_KPI_WIDGET.id] }); + + // style tab is selected initially + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeVisible(); +}); - it('should render an empty selection when nothing is selected', async () => { - await renderTestComponentAsync({ selectedWidgets: [] }); +test('tab selection', async () => { + renderTestComponent({ selectedWidgets: [MOCK_KPI_WIDGET.id] }); + + // style tab is selected + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeVisible(); + + // select properties tab + await user.click( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ); - expect(screen.getByText('Select a widget to configure.')).toBeVisible(); - }); + // properties tab is selected + expect( + screen.getByRole('tab', { name: 'Style', selected: false }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: true }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeVisible(); + + // select thresholds tab + await user.click( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ); - it('should render the style section', async () => { - await renderTestComponentAsync(); + // thresholds tab is selected + expect( + screen.getByRole('tab', { name: 'Style', selected: false }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: true }) + ).toBeVisible(); + + // select style tab + await user.click(screen.getByRole('tab', { name: 'Style', selected: false })); + + // style tab is selected again + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeVisible(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeVisible(); +}); - expect(screen.getByText('Style')).toBeVisible(); - expect(screen.getByText('Axis')).toBeVisible(); - expect(screen.getByText('Format data')).toBeVisible(); +test('should render the style section when switched between widgets', async () => { + const { unmount } = renderTestComponent({ + selectedWidgets: [MOCK_LINE_CHART_WIDGET.id], }); - it('should render the style section when switched between widgets', async () => { - await renderTestComponentAsync(); - - expect(screen.getByText('Style')).toBeVisible(); - expect(screen.getByText('Axis')).toBeVisible(); - expect(screen.getByText('Format data')).toBeVisible(); - const thresholdsTab = screen.getByTestId('thresholds'); - expect(thresholdsTab).toBeVisible(); + // style tab is selected + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeVisible(); - fireEvent.click(thresholdsTab); - expect(screen.getByText('Add a threshold')).toBeVisible(); + // select thresholds tab + await user.click( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ); - const options = { - widgets: [MOCK_KPI_WIDGET], - selectedWidgets: [MOCK_KPI_WIDGET], - }; + // thresholds tab is selected + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: true }) + ).toBeVisible(); - await renderTestComponentAsync(options); - expect(screen.getByText('Format data')).toBeVisible(); + // change selected widget + // FIXME: This is a hack to prevent rendering the component multiple times + unmount(); + renderTestComponent({ + selectedWidgets: [MOCK_KPI_WIDGET.id], }); - it('should render an empty thresholds section', async () => { - const element = await renderTestComponentAsync(); - const trigger = createWrapper(element.baseElement); + // style tab is selected again + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeVisible(); +}); + +// FIXME: Remove widget specific test +test('text widget', async () => { + renderTestComponent({ + selectedWidgets: [MOCK_TEXT_WIDGET.id], + }); - expect(screen.getByText('Thresholds')).toBeVisible(); + // text widget only supports styles tab + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeEnabled(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeDisabled(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeDisabled(); + + // try to select properties tab + await user.click( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ); - act(() => { - trigger.findTabs()?.findTabLinkByIndex(3)?.click(); - }); + // nothing happened + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeEnabled(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeDisabled(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeDisabled(); + + // try to select thresholds tab + await user.click( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ); - expect(screen.getByText('Add a threshold')).toBeVisible(); - }); + // nothing happened + expect( + screen.getByRole('tab', { name: 'Style', selected: true }) + ).toBeEnabled(); + expect( + screen.getByRole('tab', { name: 'Properties', selected: false }) + ).toBeDisabled(); + expect( + screen.getByRole('tab', { name: 'Thresholds', selected: false }) + ).toBeDisabled(); }); diff --git a/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.tsx b/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.tsx index bdbf0a378..31e83d226 100644 --- a/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.tsx +++ b/packages/dashboard/src/customization/propertiesSections/propertiesPanel/panel.tsx @@ -1,42 +1,55 @@ -import { useLayoutEffect, useState } from 'react'; import Box from '@cloudscape-design/components/box'; -import Tabs from '@cloudscape-design/components/tabs'; +import Tabs, { type TabsProps } from '@cloudscape-design/components/tabs'; import SpaceBetween from '@cloudscape-design/components/space-between'; -import { useSelection } from '../../propertiesSection'; import { PropertiesPanelEmpty } from './emptyPanel'; import { StylesSection } from './styleTab'; import { PropertiesAndAlarmsSettingsConfiguration } from '../propertiesAndAlarmsSettings'; import { ThresholdSettingsConfiguration } from '../thresholdSettings'; -import { isJust } from '~/util/maybe'; -import { useSelectedWidgets } from '~/hooks/useSelectedWidgets'; +import { useSelectedWidgets } from '~/hooks/useSelectedWidget'; +import { useCallback, useEffect, useState } from 'react'; + +const STYLE_TAB_ID = 'style'; +const PROPERTIES_TAB_ID = 'properties'; +const THRESHOLDS_TAB_ID = 'thresholds'; +type SelectedTabId = + | typeof STYLE_TAB_ID + | typeof PROPERTIES_TAB_ID + | typeof THRESHOLDS_TAB_ID; /** Panel element responsible for rendering chart configuration sections. */ export const PropertiesPanel = () => { - const selection = useSelection(); + const [selectedTabId, setSelectedTabId] = useState('style'); const selectedWidgets = useSelectedWidgets(); - const selectedWidgetId = selectedWidgets[0]?.id; - const [activeTabId, setActiveTabId] = useState('style'); + const firstSelectedWidget = selectedWidgets.at(0); + + useEffect(() => { + setSelectedTabId('style'); + }, [firstSelectedWidget?.id]); - useLayoutEffect(() => { - setActiveTabId('style'); // Default "Style" tab upon widget selection - }, [selectedWidgetId]); + const handleSelectTab = useCallback( + (e: Parameters>[0]) => { + setSelectedTabId(e.detail.activeTabId as SelectedTabId); + }, + [] + ); - return selection ? ( + return selectedWidgets.length > 0 ? ( setActiveTabId(detail.activeTabId)} - activeTabId={activeTabId} disableContentPaddings + activeTabId={selectedTabId} + onChange={handleSelectTab} tabs={[ { label: 'Style', - id: 'style', + id: STYLE_TAB_ID, content: , }, { label: 'Properties', - id: 'properties', - disabled: isJust(selection.type) && selection.type.value === 'text', + id: PROPERTIES_TAB_ID, + // FIXME: Remove widget specific code + disabled: firstSelectedWidget?.type === 'text', content: ( @@ -45,8 +58,9 @@ export const PropertiesPanel = () => { }, { label: 'Thresholds', - id: 'thresholds', - disabled: isJust(selection.type) && selection.type.value === 'text', + id: THRESHOLDS_TAB_ID, + // FIXME: Remove widget specific code + disabled: firstSelectedWidget?.type === 'text', content: ( diff --git a/packages/dashboard/src/customization/propertiesSections/textSettings/link.spec.tsx b/packages/dashboard/src/customization/propertiesSections/textSettings/link.spec.tsx index 98ea002c1..957e36808 100644 --- a/packages/dashboard/src/customization/propertiesSections/textSettings/link.spec.tsx +++ b/packages/dashboard/src/customization/propertiesSections/textSettings/link.spec.tsx @@ -10,7 +10,7 @@ const state: Partial = { dashboardConfiguration: { widgets: [MOCK_TEXT_LINK_WIDGET], }, - selectedWidgets: [MOCK_TEXT_LINK_WIDGET], + selectedWidgetIds: [MOCK_TEXT_LINK_WIDGET.id], }; const TestComponent = () => ( diff --git a/packages/dashboard/src/customization/propertiesSections/textSettings/text.spec.tsx b/packages/dashboard/src/customization/propertiesSections/textSettings/text.spec.tsx index 5c96da49d..b15ef2f9b 100644 --- a/packages/dashboard/src/customization/propertiesSections/textSettings/text.spec.tsx +++ b/packages/dashboard/src/customization/propertiesSections/textSettings/text.spec.tsx @@ -22,7 +22,7 @@ const state: Partial = { dashboardConfiguration: { widgets: [widget], }, - selectedWidgets: [widget], + selectedWidgetIds: [widget.id], }; it('renders font style settings reflecting the initial values passed in', () => { diff --git a/packages/dashboard/src/customization/propertiesSections/thresholdSettings/index.spec.tsx b/packages/dashboard/src/customization/propertiesSections/thresholdSettings/index.spec.tsx index d4f8b67fc..152c1dd46 100644 --- a/packages/dashboard/src/customization/propertiesSections/thresholdSettings/index.spec.tsx +++ b/packages/dashboard/src/customization/propertiesSections/thresholdSettings/index.spec.tsx @@ -37,7 +37,7 @@ const state: Partial = { dashboardConfiguration: { widgets: [widget], }, - selectedWidgets: [widget], + selectedWidgetIds: [widget.id], }; const TestThresholdSection = () => ( diff --git a/packages/dashboard/src/customization/propertiesSections/widgetTitle/widgetTitle.test.tsx b/packages/dashboard/src/customization/propertiesSections/widgetTitle/widgetTitle.test.tsx index d71ec8710..c816c2457 100644 --- a/packages/dashboard/src/customization/propertiesSections/widgetTitle/widgetTitle.test.tsx +++ b/packages/dashboard/src/customization/propertiesSections/widgetTitle/widgetTitle.test.tsx @@ -10,16 +10,16 @@ import { type DashboardWidget } from '~/types'; import { WidgetTitle } from './index'; import { MOCK_LINE_CHART_WIDGET, - MOCK_TEXT_WIDGET, MOCK_RECTANGLE_WIDGET, + MOCK_TEXT_WIDGET, } from '../../../../testing/mocks'; -const store = (widgets: DashboardWidget) => +const store = (widget: DashboardWidget) => configureDashboardStore({ dashboardConfiguration: { - widgets: [widgets], + widgets: [widget], }, - selectedWidgets: [widgets], + selectedWidgetIds: [widget.id], }); const TestComponent = (widget: DashboardWidget) => ( diff --git a/packages/dashboard/src/hooks/useDeleteWidgets.ts b/packages/dashboard/src/hooks/useDeleteWidgets.ts index d54880af5..3d9b61178 100644 --- a/packages/dashboard/src/hooks/useDeleteWidgets.ts +++ b/packages/dashboard/src/hooks/useDeleteWidgets.ts @@ -6,7 +6,7 @@ export const useDeleteWidgets = () => { const dispatch = useDispatch(); return useCallback( - (widgetIds: string[]) => { + (widgetIds: readonly string[]) => { dispatch(onDeleteWidgetsAction({ widgetIds })); }, [dispatch] diff --git a/packages/dashboard/src/hooks/useSelectedWidget.ts b/packages/dashboard/src/hooks/useSelectedWidget.ts new file mode 100644 index 000000000..624b31131 --- /dev/null +++ b/packages/dashboard/src/hooks/useSelectedWidget.ts @@ -0,0 +1,41 @@ +import isEqual from 'lodash-es/isEqual'; +import { useSelector } from 'react-redux'; +import type { DashboardState } from '~/store/state'; +import { type DashboardWidget } from '~/types'; + +export const useSelectedWidgetIds = < + Properties extends Record = Record +>(): readonly string[] => { + return useSelector( + (state: DashboardState) => state.selectedWidgetIds + ); +}; + +export function useSelectedWidgets() { + return useSelector((state: DashboardState) => { + return getWidgets( + state.selectedWidgetIds, + state.dashboardConfiguration.widgets + ); + }, isEqual); +} + +export function getWidgets( + widgetIds: readonly string[], + widgets: readonly DashboardWidget[] +) { + return widgetIds.map((widgetId) => getWidget(widgetId, widgets)); +} + +export function getWidget( + widgetId: string, + widgets: readonly DashboardWidget[] +) { + const widget = widgets.find(({ id }) => id === widgetId); + + if (!widget) { + throw Error('Expected selected widget to exist.'); + } + + return widget; +} diff --git a/packages/dashboard/src/hooks/useSelectedWidgets.ts b/packages/dashboard/src/hooks/useSelectedWidgets.ts deleted file mode 100644 index 87a0daa21..000000000 --- a/packages/dashboard/src/hooks/useSelectedWidgets.ts +++ /dev/null @@ -1,15 +0,0 @@ -import isEqual from 'lodash-es/isEqual'; -import { useSelector } from 'react-redux'; -import type { DashboardState } from '~/store/state'; -import { type DashboardWidget } from '~/types'; - -const compareSelectedWidgets = (a: DashboardWidget[], b: DashboardWidget[]) => - isEqual(a, b); - -export const useSelectedWidgets = < - Properties extends Record = Record ->() => - useSelector( - (state: DashboardState) => state.selectedWidgets, - compareSelectedWidgets - ); diff --git a/packages/dashboard/src/store/actions/bringToFront/index.spec.ts b/packages/dashboard/src/store/actions/bringToFront/index.spec.ts index 01de61935..fe149c40b 100644 --- a/packages/dashboard/src/store/actions/bringToFront/index.spec.ts +++ b/packages/dashboard/src/store/actions/bringToFront/index.spec.ts @@ -1,20 +1,20 @@ import { bringWidgetsToFront } from '.'; +import type { DashboardState } from '../../state'; import { initialState } from '../../state'; import { MOCK_KPI_WIDGET, MockWidgetFactory } from '../../../../testing/mocks'; -import type { DashboardState } from '../../state'; import type { DashboardWidget } from '~/types'; const setupDashboardState = ( widgets: DashboardWidget[] = [], - selectedWidgets: DashboardWidget[] = [] + selectedWidgetIds: readonly string[] = [] ): DashboardState => ({ ...initialState, dashboardConfiguration: { ...initialState.dashboardConfiguration, widgets, }, - selectedWidgets, + selectedWidgetIds, }); it('does nothing if there are no widgets selected', () => { @@ -27,7 +27,7 @@ it('does nothing if there are no widgets selected', () => { it('does nothing if there all widgets are selected', () => { expect( bringWidgetsToFront( - setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET]) + setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET.id]) ).dashboardConfiguration.widgets ).toEqual([MOCK_KPI_WIDGET]); }); @@ -43,7 +43,7 @@ it('moves selected widget to front', () => { expect( bringWidgetsToFront( - setupDashboardState([MOCK_WIDGET, MOCK_WIDGET_2], [MOCK_WIDGET_2]) + setupDashboardState([MOCK_WIDGET, MOCK_WIDGET_2], [MOCK_WIDGET_2.id]) ).dashboardConfiguration.widgets ).toEqual( expect.arrayContaining([ @@ -72,7 +72,7 @@ it('moves group of widgets and retains their relative order', () => { bringWidgetsToFront( setupDashboardState( [MOCK_WIDGET, MOCK_WIDGET_2, MOCK_WIDGET_3], - [MOCK_WIDGET_2, MOCK_WIDGET_3] + [MOCK_WIDGET_2.id, MOCK_WIDGET_3.id] ) ).dashboardConfiguration.widgets ).toEqual( diff --git a/packages/dashboard/src/store/actions/bringToFront/index.ts b/packages/dashboard/src/store/actions/bringToFront/index.ts index c80331b12..1a7d55465 100644 --- a/packages/dashboard/src/store/actions/bringToFront/index.ts +++ b/packages/dashboard/src/store/actions/bringToFront/index.ts @@ -3,6 +3,7 @@ import maxBy from 'lodash-es/maxBy'; import minBy from 'lodash-es/minBy'; import xorBy from 'lodash-es/xorBy'; import type { DashboardState } from '../../state'; +import { getWidgets } from '~/hooks/useSelectedWidget'; export interface BringWidgetsToFrontAction extends PayloadAction { type: 'BRING_WIDGETS_TO_FRONT'; @@ -15,8 +16,11 @@ export const onBringWidgetsToFrontAction = (): BringWidgetsToFrontAction => ({ export const bringWidgetsToFront = (state: DashboardState): DashboardState => { const widgets = state.dashboardConfiguration.widgets; - const selectedWidgets = state.selectedWidgets; - + const selectedWidgetIds = state.selectedWidgetIds; + const selectedWidgets = getWidgets( + selectedWidgetIds, + state.dashboardConfiguration.widgets + ); const unselectedWidgets = xorBy(widgets, selectedWidgets, 'id'); // We don't need to do anything if all widgets are selected @@ -24,7 +28,6 @@ export const bringWidgetsToFront = (state: DashboardState): DashboardState => { return state; } - const selectedWidgetsIds = selectedWidgets.map(({ id }) => id); const topZIndex = maxBy(unselectedWidgets, 'z')?.z ?? 0; const minSelectedZ = minBy(selectedWidgets, 'z')?.z ?? 0; @@ -32,19 +35,15 @@ export const bringWidgetsToFront = (state: DashboardState): DashboardState => { const translatedWidgets = widgets.map((widget) => ({ ...widget, - z: selectedWidgetsIds.includes(widget.id) ? widget.z + zOffset : widget.z, + z: selectedWidgetIds.includes(widget.id) ? widget.z + zOffset : widget.z, })); - const translatedSelectedWidgets = translatedWidgets.filter((widget) => - selectedWidgetsIds.includes(widget.id) - ); - return { ...state, dashboardConfiguration: { ...state.dashboardConfiguration, widgets: translatedWidgets, }, - selectedWidgets: translatedSelectedWidgets, + selectedWidgetIds, }; }; diff --git a/packages/dashboard/src/store/actions/copyWidgets/index.spec.ts b/packages/dashboard/src/store/actions/copyWidgets/index.spec.ts index 0a9ae2860..671427e3b 100644 --- a/packages/dashboard/src/store/actions/copyWidgets/index.spec.ts +++ b/packages/dashboard/src/store/actions/copyWidgets/index.spec.ts @@ -1,12 +1,11 @@ import { copyWidgets, onCopyWidgetsAction } from '.'; +import type { DashboardState } from '../../state'; import { initialState } from '../../state'; import { MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET, - MOCK_SCATTER_CHART_WIDGET, } from '../../../../testing/mocks'; -import type { DashboardState } from '../../state'; import type { DashboardWidget } from '~/types'; const setupDashboardState = ( @@ -26,9 +25,9 @@ it('does nothing if no widgets are provided', () => { copyWidgets( setupDashboardState(), onCopyWidgetsAction({ - widgets: [], + widgetIds: [], }) - ).copiedWidgets + ).copiedWidgetIds ).toEqual([]); }); @@ -37,10 +36,10 @@ it('adds one widget to the copy group', () => { copyWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onCopyWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], }) - ).copiedWidgets - ).toEqual([MOCK_KPI_WIDGET]); + ).copiedWidgetIds + ).toEqual([MOCK_KPI_WIDGET.id]); }); it('adds many widgets to the copy group', () => { @@ -48,21 +47,10 @@ it('adds many widgets to the copy group', () => { copyWidgets( setupDashboardState([MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET]), onCopyWidgetsAction({ - widgets: [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET], - }) - ).copiedWidgets - ).toEqual([MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET]); -}); - -it('does not add a widget to the copy group that is not in the configuration', () => { - expect( - copyWidgets( - setupDashboardState([MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET]), - onCopyWidgetsAction({ - widgets: [MOCK_SCATTER_CHART_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id], }) - ).copiedWidgets - ).toEqual([]); + ).copiedWidgetIds + ).toEqual([MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id]); }); it('resets paste counter', () => { @@ -70,7 +58,7 @@ it('resets paste counter', () => { copyWidgets( setupDashboardState([MOCK_KPI_WIDGET], 10), onCopyWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], }) ).pasteCounter ).toEqual(0); diff --git a/packages/dashboard/src/store/actions/copyWidgets/index.ts b/packages/dashboard/src/store/actions/copyWidgets/index.ts index 8dd583688..a3d63723d 100644 --- a/packages/dashboard/src/store/actions/copyWidgets/index.ts +++ b/packages/dashboard/src/store/actions/copyWidgets/index.ts @@ -1,11 +1,9 @@ -import intersectionBy from 'lodash-es/intersectionBy'; import type { Action } from 'redux'; -import type { DashboardWidget } from '~/types'; import type { DashboardState } from '../../state'; -type CopyWidgetsActionPayload = { - widgets: DashboardWidget[]; -}; +export interface CopyWidgetsActionPayload { + widgetIds: readonly string[]; +} export interface CopyWidgetsAction extends Action { type: 'COPY_WIDGETS'; @@ -21,17 +19,11 @@ export const onCopyWidgetsAction = ( export const copyWidgets = ( state: DashboardState, - action: CopyWidgetsAction + { payload: { widgetIds } }: CopyWidgetsAction ): DashboardState => { - const copiedWidgets = intersectionBy( - state.dashboardConfiguration.widgets, - action.payload.widgets, - 'id' - ); - return { ...state, - copiedWidgets, + copiedWidgetIds: widgetIds, pasteCounter: 0, }; }; diff --git a/packages/dashboard/src/store/actions/createWidget/index.spec.ts b/packages/dashboard/src/store/actions/createWidget/index.spec.ts index 9437018f0..e2e174035 100644 --- a/packages/dashboard/src/store/actions/createWidget/index.spec.ts +++ b/packages/dashboard/src/store/actions/createWidget/index.spec.ts @@ -76,7 +76,7 @@ it('selects the widgets that are created', () => { onCreateWidgetsAction({ widgets: [MOCK_KPI_WIDGET], }) - ).selectedWidgets; + ).selectedWidgetIds; - expect(selectedWidgets).toEqual([MOCK_KPI_WIDGET]); + expect(selectedWidgets).toEqual([MOCK_KPI_WIDGET.id]); }); diff --git a/packages/dashboard/src/store/actions/createWidget/index.ts b/packages/dashboard/src/store/actions/createWidget/index.ts index 56bfaeef3..1994878d7 100644 --- a/packages/dashboard/src/store/actions/createWidget/index.ts +++ b/packages/dashboard/src/store/actions/createWidget/index.ts @@ -4,9 +4,9 @@ import type { Action } from 'redux'; import type { DashboardWidget } from '~/types'; import type { DashboardState } from '../../state'; -type CreateWidgetsActionPayload = { +export interface CreateWidgetsActionPayload { widgets: DashboardWidget[]; -}; +} export interface CreateWidgetsAction extends Action { type: 'CREATE_WIDGETS'; @@ -39,6 +39,6 @@ export const createWidgets = ( ...state.dashboardConfiguration, widgets: [...state.dashboardConfiguration.widgets, ...widgets], }, - selectedWidgets: widgets, + selectedWidgetIds: widgets.map(({ id }) => id), }; }; diff --git a/packages/dashboard/src/store/actions/deleteWidgets/index.ts b/packages/dashboard/src/store/actions/deleteWidgets/index.ts index 52f1860c2..56ccd43eb 100644 --- a/packages/dashboard/src/store/actions/deleteWidgets/index.ts +++ b/packages/dashboard/src/store/actions/deleteWidgets/index.ts @@ -1,8 +1,8 @@ import type { Action } from 'redux'; import type { DashboardState } from '../../state'; -interface DeleteWidgetsActionPayload { - widgetIds: string[]; +export interface DeleteWidgetsActionPayload { + widgetIds: readonly string[]; } export interface DeleteWidgetsAction extends Action { @@ -29,8 +29,8 @@ export const deleteWidgets = ( ({ id }) => !widgetIds.includes(id) ), }, - selectedWidgets: state.selectedWidgets.filter( - ({ id }) => !widgetIds.includes(id) + selectedWidgetIds: state.selectedWidgetIds.filter( + (id) => !widgetIds.includes(id) ), }; }; diff --git a/packages/dashboard/src/store/actions/moveWidgets/index.spec.ts b/packages/dashboard/src/store/actions/moveWidgets/index.spec.ts index a37af0bbf..f3b583fe0 100644 --- a/packages/dashboard/src/store/actions/moveWidgets/index.spec.ts +++ b/packages/dashboard/src/store/actions/moveWidgets/index.spec.ts @@ -26,7 +26,7 @@ describe('move', () => { moveWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onMoveWidgetsAction({ - widgets: [], + widgetIds: [], vector: { x: 1, y: 0 }, }) ).dashboardConfiguration.widgets @@ -45,7 +45,7 @@ describe('move', () => { moveWidgets( setupDashboardState([widget]), onMoveWidgetsAction({ - widgets: [widget], + widgetIds: [widget.id], vector: { x: 0.1, y: 0.1 }, }) ).dashboardConfiguration.widgets @@ -72,7 +72,7 @@ describe('move', () => { moveWidgets( dashboardState, onMoveWidgetsAction({ - widgets: [widget], + widgetIds: [widget.id], vector: { x: dashboardState.grid.width, y: 0 }, }) ).dashboardConfiguration.widgets @@ -104,7 +104,7 @@ describe('move', () => { moveWidgets( setupDashboardState([widget1, widget2]), onMoveWidgetsAction({ - widgets: [widget1], + widgetIds: [widget1.id], vector: { x: 1, y: 1 }, }) ).dashboardConfiguration.widgets @@ -134,7 +134,7 @@ describe('move', () => { moveWidgets( setupDashboardState([widget]), onMoveWidgetsAction({ - widgets: [widget], + widgetIds: [widget.id], vector: { x: 0, y: 0 }, }) ).dashboardConfiguration.widgets @@ -172,7 +172,7 @@ describe('move', () => { moveWidgets( setupDashboardState([widget1, widget2, widget3]), onMoveWidgetsAction({ - widgets: [widget1, widget2], + widgetIds: [widget1.id, widget2.id], vector: { x: 1, y: 1 }, }) ).dashboardConfiguration.widgets @@ -206,7 +206,7 @@ describe('move', () => { moveWidgets( setupDashboardState([widget1]), onMoveWidgetsAction({ - widgets: [widget1], + widgetIds: [widget1.id], vector: { x: 1.1, y: 1.1 }, complete: true, }) @@ -240,7 +240,7 @@ describe('move', () => { moveWidgets( dashboardState, onMoveWidgetsAction({ - widgets: [widget1, widget2], + widgetIds: [widget1.id, widget2.id], vector: { x: dashboardState.grid.width, y: dashboardState.grid.height, diff --git a/packages/dashboard/src/store/actions/moveWidgets/index.ts b/packages/dashboard/src/store/actions/moveWidgets/index.ts index 1cbe7a387..1614de720 100644 --- a/packages/dashboard/src/store/actions/moveWidgets/index.ts +++ b/packages/dashboard/src/store/actions/moveWidgets/index.ts @@ -1,16 +1,17 @@ import { trimRectPosition } from '~/util/trimRectPosition'; import type { Action } from 'redux'; -import type { Position, DashboardWidget } from '~/types'; +import type { DashboardWidget, Position } from '~/types'; import type { DashboardState } from '../../state'; import { getSelectionBox } from '~/util/getSelectionBox'; import { moveSelectionBox } from '~/util/moveSelectionBox'; import { transformWidget } from '~/util/transformWidget'; +import { getWidgets } from '~/hooks/useSelectedWidget'; -type MoveWidgetsActionPayload = { - widgets: DashboardWidget[]; +interface MoveWidgetsActionPayload { + widgetIds: readonly string[]; vector: Position; complete?: boolean; -}; +} export interface MoveWidgetsAction extends Action { type: 'MOVE_WIDGETS'; @@ -26,11 +27,13 @@ export const onMoveWidgetsAction = ( export const moveWidgets = ( state: DashboardState, - action: MoveWidgetsAction + { payload: { widgetIds, vector, complete } }: MoveWidgetsAction ): DashboardState => { - const { vector, complete, widgets } = action.payload; - const selectedWidgetIds = action.payload.widgets.map((w) => w.id); - const selectionBox = getSelectionBox(widgets); + const selectedWidgets = getWidgets( + widgetIds, + state.dashboardConfiguration.widgets + ); + const selectionBox = getSelectionBox(selectedWidgets); if (!selectionBox) return state; const newSelectionBox = moveSelectionBox({ @@ -48,7 +51,7 @@ export const moveWidgets = ( const updateWidgets = (widgets: DashboardWidget[]) => widgets.map((widget) => { - if (!selectedWidgetIds.includes(widget.id)) return widget; + if (!widgetIds.includes(widget.id)) return widget; return mover(widget); }); @@ -58,6 +61,5 @@ export const moveWidgets = ( ...state.dashboardConfiguration, widgets: updateWidgets(state.dashboardConfiguration.widgets), }, - selectedWidgets: updateWidgets(state.selectedWidgets), }; }; diff --git a/packages/dashboard/src/store/actions/pasteWidgets/index.spec.ts b/packages/dashboard/src/store/actions/pasteWidgets/index.spec.ts index 7f804eb77..5d0577fb4 100644 --- a/packages/dashboard/src/store/actions/pasteWidgets/index.spec.ts +++ b/packages/dashboard/src/store/actions/pasteWidgets/index.spec.ts @@ -1,16 +1,16 @@ import { onPasteWidgetsAction, pasteWidgets } from '.'; +import type { DashboardState } from '../../state'; import { initialState } from '../../state'; import { MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET, } from '../../../../testing/mocks'; -import type { DashboardState } from '../../state'; import type { DashboardWidget } from '~/types'; const setupDashboardState = ( widgets: DashboardWidget[] = [], - copiedWidgets: DashboardWidget[] = [] + copiedWidgetIds: readonly string[] = [] ): DashboardState => ({ ...initialState, grid: { @@ -23,7 +23,7 @@ const setupDashboardState = ( ...initialState.dashboardConfiguration, widgets, }, - copiedWidgets, + copiedWidgetIds, }); it('does nothing when pasting with nothing in the copy group', () => { @@ -36,7 +36,7 @@ it('does nothing when pasting with nothing in the copy group', () => { it('paste single widget', () => { expect( pasteWidgets( - setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET]), + setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET.id]), onPasteWidgetsAction({}) ).dashboardConfiguration.widgets ).toEqual( @@ -57,7 +57,7 @@ it('paste single widget', () => { it('paste single widget a second time, shifts the position down', () => { const state = pasteWidgets( - setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET]), + setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET.id]), onPasteWidgetsAction({}) ); @@ -89,7 +89,7 @@ it('paste multiple widgets', () => { pasteWidgets( setupDashboardState( [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET], - [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET] + [MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id] ), onPasteWidgetsAction({}) ).dashboardConfiguration.widgets @@ -122,7 +122,7 @@ it('paste multiple widgets', () => { it('pastes a widget at a specific location', () => { expect( pasteWidgets( - setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET]), + setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET.id]), onPasteWidgetsAction({ position: { x: 100, y: 100 }, }) @@ -148,7 +148,7 @@ it('pastes multiple widgets at a specific location', () => { pasteWidgets( setupDashboardState( [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET], - [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET] + [MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id] ), onPasteWidgetsAction({ position: { x: 100, y: 100 }, @@ -184,50 +184,27 @@ it('selects the widgets that are pasted', () => { const selectedWidgets = pasteWidgets( setupDashboardState( [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET], - [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET] + [MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id] ), onPasteWidgetsAction({ position: { x: 100, y: 100 }, }) - ).selectedWidgets; + ).selectedWidgetIds; // the newly pasted widgets are selected - expect(selectedWidgets).toEqual( - expect.arrayContaining([ - expect.objectContaining({ - type: MOCK_KPI_WIDGET.type, - x: 10, - y: 10, - }), - expect.objectContaining({ - type: MOCK_LINE_CHART_WIDGET.type, - x: 12, - y: 12, - }), - ]) - ); + expect(selectedWidgets).toEqual([expect.any(String), expect.any(String)]); // the initial copied widgets are not selected - expect(selectedWidgets).not.toEqual( - expect.arrayContaining([ - expect.objectContaining({ - type: MOCK_KPI_WIDGET.type, - x: MOCK_KPI_WIDGET.x, - y: MOCK_KPI_WIDGET.y, - }), - expect.objectContaining({ - type: MOCK_LINE_CHART_WIDGET.type, - x: MOCK_LINE_CHART_WIDGET.x, - y: MOCK_LINE_CHART_WIDGET.y, - }), - ]) - ); + expect(selectedWidgets).not.toEqual([ + MOCK_KPI_WIDGET.id, + MOCK_LINE_CHART_WIDGET.id, + ]); }); it('pastes a widget at right edge location', () => { expect( pasteWidgets( - setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET]), + setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET.id]), onPasteWidgetsAction({ position: { x: 1000, y: 1000 }, }) @@ -253,7 +230,7 @@ it('pastes multiple widgets at right edge location', () => { pasteWidgets( setupDashboardState( [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET], - [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET] + [MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id] ), onPasteWidgetsAction({ position: { x: 1000, y: 1000 }, diff --git a/packages/dashboard/src/store/actions/pasteWidgets/index.ts b/packages/dashboard/src/store/actions/pasteWidgets/index.ts index 177ae490b..697582569 100644 --- a/packages/dashboard/src/store/actions/pasteWidgets/index.ts +++ b/packages/dashboard/src/store/actions/pasteWidgets/index.ts @@ -4,10 +4,12 @@ import type { Action } from 'redux'; import { v4 } from 'uuid'; import type { DashboardWidget, Position } from '~/types'; import type { DashboardState } from '../../state'; +import { getWidgets } from '~/hooks/useSelectedWidget'; -type PasteWidgetsActionPayload = { +export interface PasteWidgetsActionPayload { position?: Position; -}; +} + export interface PasteWidgetsAction extends Action { type: 'PASTE_WIDGETS'; payload: PasteWidgetsActionPayload; @@ -27,7 +29,10 @@ export const pasteWidgets = ( const { position } = action.payload; const cellSize = state.grid.cellSize; - const copyGroup = state.copiedWidgets; + const copyGroup = getWidgets( + state.copiedWidgetIds, + state.dashboardConfiguration.widgets + ); const gridWidth = state.grid.width; const gridHeight = state.grid.height; let pasteCounter = state.pasteCounter + 1; @@ -103,6 +108,6 @@ export const pasteWidgets = ( widgets: [...state.dashboardConfiguration.widgets, ...widgetsToPaste], }, pasteCounter: position !== undefined ? 0 : pasteCounter, - selectedWidgets: widgetsToPaste, + selectedWidgetIds: widgetsToPaste.map(({ id }) => id), }; }; diff --git a/packages/dashboard/src/store/actions/resizeWidgets/index.spec.ts b/packages/dashboard/src/store/actions/resizeWidgets/index.spec.ts index bd0c021e6..e4e519174 100644 --- a/packages/dashboard/src/store/actions/resizeWidgets/index.spec.ts +++ b/packages/dashboard/src/store/actions/resizeWidgets/index.spec.ts @@ -25,7 +25,7 @@ it('does nothing if no widgets are provided', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [], + widgetIds: [], vector: { x: 0.1, y: 0 }, anchor: 'bottom', }) @@ -39,7 +39,7 @@ describe('top-left anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'top-left', }) @@ -60,7 +60,7 @@ describe('top-left anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -0.2, y: -0.2 }, anchor: 'top-left', }) @@ -90,7 +90,7 @@ describe('top-left anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 1, y: 1 }, anchor: 'top-left', }) @@ -113,21 +113,21 @@ describe('top-left anchor', () => { y: 10, height: 20, width: 20, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 30, y: 10, height: 20, width: 20, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 10, y: 10 }, anchor: 'top-left', }) @@ -157,7 +157,7 @@ describe('top anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'top', }) @@ -178,7 +178,7 @@ describe('top anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -100.2, y: -0.2 }, anchor: 'top', }) @@ -208,7 +208,7 @@ describe('top anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 210, y: 1 }, anchor: 'top', }) @@ -231,21 +231,21 @@ describe('top anchor', () => { y: 20, height: 20, width: 20, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 40, y: 20, height: 20, width: 20, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 100, y: 1 }, anchor: 'top', }) @@ -275,7 +275,7 @@ describe('top-right anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'top-right', }) @@ -296,7 +296,7 @@ describe('top-right anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 0.2, y: -0.2 }, anchor: 'top-right', }) @@ -326,7 +326,7 @@ describe('top-right anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -1, y: 1 }, anchor: 'top-right', }) @@ -349,21 +349,21 @@ describe('top-right anchor', () => { y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 6, y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 1, y: 1 }, anchor: 'top-right', }) @@ -393,7 +393,7 @@ describe('right anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'right', }) @@ -414,7 +414,7 @@ describe('right anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 0.2, y: -110.2 }, anchor: 'right', }) @@ -444,7 +444,7 @@ describe('right anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -1, y: 111 }, anchor: 'right', }) @@ -467,21 +467,21 @@ describe('right anchor', () => { y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 6, y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 1, y: 111 }, anchor: 'right', }) @@ -511,7 +511,7 @@ describe('bottom-right anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'bottom-right', }) @@ -532,7 +532,7 @@ describe('bottom-right anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 0.2, y: 0.2 }, anchor: 'bottom-right', }) @@ -562,7 +562,7 @@ describe('bottom-right anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -1, y: -1 }, anchor: 'bottom-right', }) @@ -585,21 +585,21 @@ describe('bottom-right anchor', () => { y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 6, y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 1, y: 1 }, anchor: 'bottom-right', }) @@ -629,7 +629,7 @@ describe('bottom anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'bottom', }) @@ -650,7 +650,7 @@ describe('bottom anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 110.2, y: 0.2 }, anchor: 'bottom', }) @@ -680,7 +680,7 @@ describe('bottom anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -111, y: -1 }, anchor: 'bottom', }) @@ -703,21 +703,21 @@ describe('bottom anchor', () => { y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 6, y: 2, height: 4, width: 4, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 111, y: 1 }, anchor: 'bottom', }) @@ -747,7 +747,7 @@ describe('bottom-left anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'bottom-left', }) @@ -768,7 +768,7 @@ describe('bottom-left anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -1, y: 1 }, anchor: 'bottom-left', }) @@ -798,7 +798,7 @@ describe('bottom-left anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 1, y: -1 }, anchor: 'bottom-left', }) @@ -821,21 +821,21 @@ describe('bottom-left anchor', () => { y: 2, height: 2, width: 2, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 4, y: 2, height: 2, width: 2, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 1, y: 1 }, anchor: 'bottom-left', }) @@ -865,7 +865,7 @@ describe('left anchor', () => { resizeWidgets( setupDashboardState([MOCK_KPI_WIDGET]), onResizeWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], + widgetIds: [MOCK_KPI_WIDGET.id], vector: { x: 0, y: 0 }, anchor: 'left', }) @@ -886,7 +886,7 @@ describe('left anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: -1, y: 1 }, anchor: 'left', }) @@ -916,7 +916,7 @@ describe('left anchor', () => { resizeWidgets( setupDashboardState([lineChartWidget]), onResizeWidgetsAction({ - widgets: [lineChartWidget], + widgetIds: [lineChartWidget.id], vector: { x: 1, y: -1 }, anchor: 'left', }) @@ -939,21 +939,21 @@ describe('left anchor', () => { y: 2, height: 2, width: 2, - id: 'some-id', + id: 'widget-1', }); const lineChartWidget2 = MockWidgetFactory.getLineChartWidget({ x: 4, y: 2, height: 2, width: 2, - id: 'some-id', + id: 'widget-2', }); expect( resizeWidgets( setupDashboardState([lineChartWidget, lineChartWidget2]), onResizeWidgetsAction({ - widgets: [lineChartWidget, lineChartWidget2], + widgetIds: [lineChartWidget.id, lineChartWidget2.id], vector: { x: 1, y: 1 }, anchor: 'left', }) diff --git a/packages/dashboard/src/store/actions/resizeWidgets/index.ts b/packages/dashboard/src/store/actions/resizeWidgets/index.ts index 2e87b1fd2..bddeb2b44 100644 --- a/packages/dashboard/src/store/actions/resizeWidgets/index.ts +++ b/packages/dashboard/src/store/actions/resizeWidgets/index.ts @@ -1,10 +1,11 @@ import { getSelectionBox } from '~/util/getSelectionBox'; import { trimRectPosition } from '~/util/trimRectPosition'; import type { Action } from 'redux'; -import type { Position, DashboardWidget } from '~/types'; +import type { DashboardWidget, Position } from '~/types'; import type { DashboardState } from '../../state'; import { transformWidget } from '~/util/transformWidget'; import { resizeSelectionBox } from '~/util/resizeSelectionBox'; +import { getWidgets } from '~/hooks/useSelectedWidget'; export type Anchor = | 'top-right' @@ -15,12 +16,13 @@ export type Anchor = | 'right' | 'top' | 'bottom'; -type ResizeWidgetsActionPayload = { + +export interface ResizeWidgetsActionPayload { + widgetIds: readonly string[]; anchor: Anchor; - widgets: DashboardWidget[]; vector: Position; complete?: boolean; -}; +} export interface ResizeWidgetsAction extends Action { type: 'RESIZE_WIDGETS'; @@ -36,13 +38,14 @@ export const onResizeWidgetsAction = ( export const resizeWidgets = ( state: DashboardState, - action: ResizeWidgetsAction + { payload: { widgetIds, anchor, vector, complete } }: ResizeWidgetsAction ): DashboardState => { - const { anchor, widgets, vector, complete } = action.payload; + const selectedWidgets = getWidgets( + widgetIds, + state.dashboardConfiguration.widgets + ); - const selectedWidgetIds = widgets.map((w) => w.id); - - const selectionBox = getSelectionBox(widgets); + const selectionBox = getSelectionBox(selectedWidgets); if (!selectionBox) return state; @@ -62,16 +65,17 @@ export const resizeWidgets = ( const updateWidgets = (widgets: DashboardWidget[]) => widgets.map((widget) => { - if (!selectedWidgetIds.includes(widget.id)) return widget; + if (!widgetIds.includes(widget.id)) return widget; return resizer(widget); }); + const widgets = updateWidgets(state.dashboardConfiguration.widgets); + return { ...state, dashboardConfiguration: { ...state.dashboardConfiguration, - widgets: updateWidgets(state.dashboardConfiguration.widgets), + widgets, }, - selectedWidgets: updateWidgets(state.selectedWidgets), }; }; diff --git a/packages/dashboard/src/store/actions/selectWidgets/index.spec.ts b/packages/dashboard/src/store/actions/selectWidgets/index.spec.ts index 1e344e335..add3f1c60 100644 --- a/packages/dashboard/src/store/actions/selectWidgets/index.spec.ts +++ b/packages/dashboard/src/store/actions/selectWidgets/index.spec.ts @@ -1,4 +1,5 @@ -import { selectWidgets, onSelectWidgetsAction } from '.'; +import { onSelectWidgetsAction, selectWidgets } from '.'; +import type { DashboardState } from '../../state'; import { initialState } from '../../state'; import { @@ -6,7 +7,6 @@ import { MOCK_LINE_CHART_WIDGET, MOCK_SCATTER_CHART_WIDGET, } from '../../../../testing/mocks'; -import type { DashboardState } from '../../state'; const dashboardState: DashboardState = { ...initialState, @@ -25,10 +25,10 @@ it('does nothing if no widgets are provided', () => { selectWidgets( dashboardState, onSelectWidgetsAction({ - widgets: [], - union: false, + widgetIds: [], + shouldAppend: false, }) - ).selectedWidgets + ).selectedWidgetIds ).toEqual([]); }); @@ -37,11 +37,11 @@ it('selects a single widget', () => { selectWidgets( dashboardState, onSelectWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], - union: false, + widgetIds: [MOCK_KPI_WIDGET.id], + shouldAppend: false, }) - ).selectedWidgets - ).toEqual([MOCK_KPI_WIDGET]); + ).selectedWidgetIds + ).toEqual([MOCK_KPI_WIDGET.id]); }); it('selects multiple widget', () => { @@ -49,19 +49,19 @@ it('selects multiple widget', () => { selectWidgets( dashboardState, onSelectWidgetsAction({ - widgets: [MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET], - union: false, + widgetIds: [MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id], + shouldAppend: false, }) - ).selectedWidgets - ).toEqual([MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET]); + ).selectedWidgetIds + ).toEqual([MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id]); }); it('adds a single widget to a selection', () => { const state = selectWidgets( dashboardState, onSelectWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], - union: false, + widgetIds: [MOCK_KPI_WIDGET.id], + shouldAppend: false, }) ); @@ -69,19 +69,19 @@ it('adds a single widget to a selection', () => { selectWidgets( state, onSelectWidgetsAction({ - widgets: [MOCK_LINE_CHART_WIDGET], - union: true, + widgetIds: [MOCK_LINE_CHART_WIDGET.id], + shouldAppend: true, }) - ).selectedWidgets - ).toEqual([MOCK_KPI_WIDGET, MOCK_LINE_CHART_WIDGET]); + ).selectedWidgetIds + ).toEqual([MOCK_KPI_WIDGET.id, MOCK_LINE_CHART_WIDGET.id]); }); it('adds multiple widgets to a selection', () => { const state = selectWidgets( dashboardState, onSelectWidgetsAction({ - widgets: [MOCK_KPI_WIDGET], - union: false, + widgetIds: [MOCK_KPI_WIDGET.id], + shouldAppend: false, }) ); @@ -89,13 +89,13 @@ it('adds multiple widgets to a selection', () => { selectWidgets( state, onSelectWidgetsAction({ - widgets: [MOCK_LINE_CHART_WIDGET, MOCK_SCATTER_CHART_WIDGET], - union: true, + widgetIds: [MOCK_LINE_CHART_WIDGET.id, MOCK_SCATTER_CHART_WIDGET.id], + shouldAppend: true, }) - ).selectedWidgets + ).selectedWidgetIds ).toEqual([ - MOCK_KPI_WIDGET, - MOCK_LINE_CHART_WIDGET, - MOCK_SCATTER_CHART_WIDGET, + MOCK_KPI_WIDGET.id, + MOCK_LINE_CHART_WIDGET.id, + MOCK_SCATTER_CHART_WIDGET.id, ]); }); diff --git a/packages/dashboard/src/store/actions/selectWidgets/index.ts b/packages/dashboard/src/store/actions/selectWidgets/index.ts index 99be81b1b..2111e1027 100644 --- a/packages/dashboard/src/store/actions/selectWidgets/index.ts +++ b/packages/dashboard/src/store/actions/selectWidgets/index.ts @@ -1,12 +1,10 @@ -import uniqBy from 'lodash-es/uniqBy'; import type { Action } from 'redux'; -import type { DashboardWidget } from '~/types'; import type { DashboardState } from '../../state'; -type SelectWidgetsActionPayload = { - widgets: DashboardWidget[]; - union: boolean; -}; +interface SelectWidgetsActionPayload { + widgetIds: readonly string[]; + shouldAppend?: boolean; +} export interface SelectWidgetsAction extends Action { type: 'SELECT_WIDGETS'; @@ -22,10 +20,10 @@ export const onSelectWidgetsAction = ( export const selectWidgets = ( state: DashboardState, - action: SelectWidgetsAction + { payload: { widgetIds, shouldAppend = false } }: SelectWidgetsAction ): DashboardState => ({ ...state, - selectedWidgets: action.payload.union - ? uniqBy([...state.selectedWidgets, ...action.payload.widgets], 'id') - : action.payload.widgets, + selectedWidgetIds: shouldAppend + ? [...new Set([...state.selectedWidgetIds, ...widgetIds])] + : widgetIds, }); diff --git a/packages/dashboard/src/store/actions/sendToBack/index.spec.ts b/packages/dashboard/src/store/actions/sendToBack/index.spec.ts index 42c1f1293..7d686510f 100644 --- a/packages/dashboard/src/store/actions/sendToBack/index.spec.ts +++ b/packages/dashboard/src/store/actions/sendToBack/index.spec.ts @@ -1,19 +1,19 @@ import { sendWidgetsToBack } from '.'; import { MOCK_KPI_WIDGET, MockWidgetFactory } from '../../../../testing/mocks'; +import type { DashboardState } from '../../state'; import { initialState } from '../../state'; import type { DashboardWidget } from '~/types'; -import type { DashboardState } from '../../state'; const setupDashboardState = ( widgets: DashboardWidget[] = [], - selectedWidgets: DashboardWidget[] = [] + selectedWidgetIds: readonly string[] = [] ): DashboardState => ({ ...initialState, dashboardConfiguration: { ...initialState.dashboardConfiguration, widgets, }, - selectedWidgets, + selectedWidgetIds, }); it('does nothing if there are no widgets selected', () => { @@ -25,8 +25,9 @@ it('does nothing if there are no widgets selected', () => { it('does nothing if all widgets are selected', () => { expect( - sendWidgetsToBack(setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET])) - .dashboardConfiguration.widgets + sendWidgetsToBack( + setupDashboardState([MOCK_KPI_WIDGET], [MOCK_KPI_WIDGET.id]) + ).dashboardConfiguration.widgets ).toEqual([MOCK_KPI_WIDGET]); }); @@ -41,7 +42,7 @@ it('moves selected widget to back', () => { expect( sendWidgetsToBack( - setupDashboardState([MOCK_WIDGET, MOCK_WIDGET_2], [MOCK_WIDGET]) + setupDashboardState([MOCK_WIDGET, MOCK_WIDGET_2], [MOCK_WIDGET.id]) ).dashboardConfiguration.widgets ).toEqual( expect.arrayContaining([ @@ -70,7 +71,7 @@ it('moves group of widgets and retains their relative order', () => { sendWidgetsToBack( setupDashboardState( [MOCK_WIDGET, MOCK_WIDGET_2, MOCK_WIDGET_3], - [MOCK_WIDGET, MOCK_WIDGET_2] + [MOCK_WIDGET.id, MOCK_WIDGET_2.id] ) ).dashboardConfiguration.widgets ).toEqual( diff --git a/packages/dashboard/src/store/actions/sendToBack/index.ts b/packages/dashboard/src/store/actions/sendToBack/index.ts index f2f1380de..1017c4b42 100644 --- a/packages/dashboard/src/store/actions/sendToBack/index.ts +++ b/packages/dashboard/src/store/actions/sendToBack/index.ts @@ -1,42 +1,41 @@ -import type { PayloadAction } from '@reduxjs/toolkit'; import maxBy from 'lodash-es/maxBy'; import minBy from 'lodash-es/minBy'; import xorBy from 'lodash-es/xorBy'; import type { DashboardState } from '../../state'; +import { getWidgets } from '~/hooks/useSelectedWidget'; -export interface SendWidgetsToBackAction extends PayloadAction { +export interface SendWidgetsToBackAction { type: 'SEND_WIDGETS_TO_BACK'; } export const onSendWidgetsToBackAction = (): SendWidgetsToBackAction => ({ type: 'SEND_WIDGETS_TO_BACK', - payload: null, }); export const sendWidgetsToBack = (state: DashboardState): DashboardState => { - const widgets = state.dashboardConfiguration.widgets; - const selectedWidgets = state.selectedWidgets; - - const unselectedWidgets = xorBy(widgets, selectedWidgets, 'id'); + const selectedWidgets = getWidgets( + state.selectedWidgetIds, + state.dashboardConfiguration.widgets + ); + const unselectedWidgets = xorBy( + state.dashboardConfiguration.widgets, + selectedWidgets, + 'id' + ); // We don't need to do anything if all widgets are selected - if (unselectedWidgets.length === 0) { - return state; - } + if (unselectedWidgets.length === 0) return state; - const selectedWidgetsIds = selectedWidgets.map(({ id }) => id); const bottomZIndex = minBy(unselectedWidgets, 'z')?.z ?? 0; const maxSelectedZ = maxBy(selectedWidgets, 'z')?.z ?? 0; - const zOffset = bottomZIndex - 1 - maxSelectedZ; - - const translatedWidgets = widgets.map((widget) => ({ - ...widget, - z: selectedWidgetsIds.includes(widget.id) ? widget.z + zOffset : widget.z, - })); - - const translatedSelectedWidgets = translatedWidgets.filter((widget) => - selectedWidgetsIds.includes(widget.id) + const translatedWidgets = state.dashboardConfiguration.widgets.map( + (widget) => ({ + ...widget, + z: state.selectedWidgetIds.includes(widget.id) + ? widget.z + zOffset + : widget.z, + }) ); return { @@ -45,6 +44,5 @@ export const sendWidgetsToBack = (state: DashboardState): DashboardState => { ...state.dashboardConfiguration, widgets: translatedWidgets, }, - selectedWidgets: translatedSelectedWidgets, }; }; diff --git a/packages/dashboard/src/store/actions/updateWidget/index.ts b/packages/dashboard/src/store/actions/updateWidget/index.ts index 84e577c97..de9045421 100644 --- a/packages/dashboard/src/store/actions/updateWidget/index.ts +++ b/packages/dashboard/src/store/actions/updateWidget/index.ts @@ -37,16 +37,11 @@ export const updateWidgets = ( return widgets.find((k) => k.id === w.id) || w; }); - const updatedSelectedWidgets = state.selectedWidgets.map((w) => { - return widgets.find((k) => k.id === w.id) || w; - }); - return { ...state, dashboardConfiguration: { ...state.dashboardConfiguration, widgets: [...updatedWidgets], }, - selectedWidgets: [...updatedSelectedWidgets], }; }; diff --git a/packages/dashboard/src/store/state.ts b/packages/dashboard/src/store/state.ts index 5d3deace9..57bd65376 100644 --- a/packages/dashboard/src/store/state.ts +++ b/packages/dashboard/src/store/state.ts @@ -3,7 +3,6 @@ import type { DashboardTimeSeriesSettings, DashboardWidget, } from '~/types'; -import { deepFreeze } from '~/util/deepFreeze'; import { v4 as uuid } from 'uuid'; export type DashboardState< @@ -17,8 +16,8 @@ export type DashboardState< cellSize: number; }; readOnly: boolean; - selectedWidgets: DashboardWidget[]; - copiedWidgets: DashboardWidget[]; + selectedWidgetIds: readonly string[]; + copiedWidgetIds: readonly string[]; pasteCounter: number; dashboardConfiguration: { widgets: DashboardWidget[]; @@ -45,16 +44,7 @@ export type DashboardState< }; }; -/** - * default state for the dashboard to use. - * - * We want to prevent modification of this object - * since it is exported as a singleton and will be - * used to setup the initial dashboard state between - * different instances of dashboard. - * - */ -export const initialState: DashboardState = deepFreeze({ +export const initialState: DashboardState = { isEdgeModeEnabled: false, grid: { enabled: true, @@ -63,8 +53,8 @@ export const initialState: DashboardState = deepFreeze({ cellSize: 20, }, readOnly: false, - selectedWidgets: [], - copiedWidgets: [], + selectedWidgetIds: [], + copiedWidgetIds: [], pasteCounter: 0, dashboardConfiguration: { widgets: [], @@ -80,4 +70,4 @@ export const initialState: DashboardState = deepFreeze({ mode: 'off', selectedQueries: [], }, -}); +} satisfies DashboardState; diff --git a/packages/dashboard/src/util/deepFreeze.spec.ts b/packages/dashboard/src/util/deepFreeze.spec.ts deleted file mode 100644 index c9f1aafac..000000000 --- a/packages/dashboard/src/util/deepFreeze.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { deepFreeze } from './deepFreeze'; - -it('prevents extensions of an object', () => { - const obj = deepFreeze({}); - - const illegalExtension = () => { - /** - * Should prevent extension even if you try to - * circumvent the type restrictions - */ - (obj as any)['test'] = 1; // eslint-disable-line - }; - - expect(illegalExtension).toThrowError(); -}); - -it('prevents modifications of an object', () => { - const obj = deepFreeze({ - nestedObject: { - value: 1, - }, - }); - - const illegalModification = () => { - obj.nestedObject.value = 2; - }; - - expect(illegalModification).toThrowError(); -}); diff --git a/packages/dashboard/src/util/deepFreeze.ts b/packages/dashboard/src/util/deepFreeze.ts deleted file mode 100644 index 685ca3fd1..000000000 --- a/packages/dashboard/src/util/deepFreeze.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const deepFreeze = (obj: T) => { - for (const key in obj) { - const value = obj[key]; - if (value && typeof value === 'object' && !Object.isFrozen(value)) { - deepFreeze(value); - } - } - return Object.freeze(obj); -}; diff --git a/packages/dashboard/src/util/select.ts b/packages/dashboard/src/util/select.ts index 5a9dff8fb..b21d39f5d 100644 --- a/packages/dashboard/src/util/select.ts +++ b/packages/dashboard/src/util/select.ts @@ -42,13 +42,10 @@ export const getSelectedWidgetIds = ({ dashboardWidgets: DashboardWidget[]; }) => getSelectedWidgets({ selectedRect, cellSize, dashboardWidgets }).map( - (widget) => widget.id + ({ id }) => id ); -/** - * - * return the first widget that intersects a position - */ +/** Return the first widget that intersects a position. */ export const pointSelect = ({ position, cellSize, @@ -58,10 +55,8 @@ export const pointSelect = ({ cellSize: number; dashboardWidgets: DashboardWidget[]; }): DashboardWidget | undefined => { - /** - * TODO edge case where bottom most pixel on a widget does not pick up the intersection - * and the top most pixel above a widget picks up the intersection - */ + // TODO: edge case where bottom most pixel on a widget does not pick up the intersection + // and the top most pixel above a widget picks up the intersection const { x, y } = position; const intersectedWidgets = getSelectedWidgets({ selectedRect: { x, y, width: 1, height: 1 },